From d770aa314255313e97b3ecb4c0cafde0fca16c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 14 Nov 2016 22:53:07 +0100 Subject: vis: overhaul and unify event generation code Add another layer of indirection, move actual event generation code to a dedicated function. --- vis-core.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'vis-core.h') diff --git a/vis-core.h b/vis-core.h index 05ddca8..5dc2a64 100644 --- a/vis-core.h +++ b/vis-core.h @@ -184,6 +184,22 @@ struct Vis { Array textobjects; }; +enum VisEvents { + VIS_EVENT_INIT, + VIS_EVENT_START, + VIS_EVENT_QUIT, + VIS_EVENT_FILE_OPEN, + VIS_EVENT_FILE_SAVE, + VIS_EVENT_FILE_CLOSE, + VIS_EVENT_WIN_OPEN, + VIS_EVENT_WIN_CLOSE, + VIS_EVENT_WIN_HIGHLIGHT, + VIS_EVENT_WIN_SYNTAX, + VIS_EVENT_WIN_STATUS, +}; + +bool vis_event_emit(Vis*, enum VisEvents, ...); + /** stuff used by multiple of the vis-* files */ extern Mode vis_modes[VIS_MODE_INVALID]; -- cgit v1.2.3