diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-11-14 22:53:07 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-11-15 12:56:56 +0100 |
| commit | d770aa314255313e97b3ecb4c0cafde0fca16c9d (patch) | |
| tree | 71424a8d671641202d72dbfeb4aa1b05a205ed64 /vis-core.h | |
| parent | 1c56750f7b6796e850a9299358dc6a187c6278bf (diff) | |
| download | vis-d770aa314255313e97b3ecb4c0cafde0fca16c9d.tar.gz vis-d770aa314255313e97b3ecb4c0cafde0fca16c9d.tar.xz | |
vis: overhaul and unify event generation code
Add another layer of indirection, move actual event generation
code to a dedicated function.
Diffstat (limited to 'vis-core.h')
| -rw-r--r-- | vis-core.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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]; |
