aboutsummaryrefslogtreecommitdiff
path: root/vis-core.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-11-14 22:53:07 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-11-15 12:56:56 +0100
commitd770aa314255313e97b3ecb4c0cafde0fca16c9d (patch)
tree71424a8d671641202d72dbfeb4aa1b05a205ed64 /vis-core.h
parent1c56750f7b6796e850a9299358dc6a187c6278bf (diff)
downloadvis-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.h16
1 files changed, 16 insertions, 0 deletions
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];