Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2019-04-24 18:34:48 +0300
committerJacques Lucke <mail@jlucke.com>2019-04-24 18:34:48 +0300
commitea8026438104f7be178fcb06562932e4e3d2f094 (patch)
treea980a39731cce5ac8cb1ba0cb94db467c4567c10 /source/blender/windowmanager/wm_event_system.h
parent7a92b8820b9661af39165f048d716559e513ddab (diff)
Refactor: allow event handlers to have a poll function
Previously only a fixed bounding box could be used. This was not flexible enough. T63193 will benefit from this refactor. Reviewers: brecht, campbellbarton
Diffstat (limited to 'source/blender/windowmanager/wm_event_system.h')
-rw-r--r--source/blender/windowmanager/wm_event_system.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h
index 9a2f8bda041..049e4d44994 100644
--- a/source/blender/windowmanager/wm_event_system.h
+++ b/source/blender/windowmanager/wm_event_system.h
@@ -44,14 +44,15 @@ enum eWM_EventHandlerType {
WM_HANDLER_TYPE_KEYMAP,
};
+typedef bool (*EventHandlerPoll)(const ARegion *ar, const wmEvent *event);
+
typedef struct wmEventHandler {
struct wmEventHandler *next, *prev;
enum eWM_EventHandlerType type;
char flag; /* WM_HANDLER_BLOCKING, ... */
- /** Optional local and windowspace bb. */
- const rcti *bblocal, *bbwin;
+ EventHandlerPoll poll;
} wmEventHandler;
/** Run after the keymap item runs. */