WM: add utility to lookup a keymap item from an event

Useful for modal operators to be able to match events
against regular keymaps.
This commit is contained in:
2019-10-28 04:53:44 +11:00
parent ae55523013
commit dd904f6761
3 changed files with 36 additions and 7 deletions

View File

@@ -243,6 +243,10 @@ void WM_event_set_keymap_handler_post_callback(struct wmEventHandler_Keymap *han
wmKeyMap *WM_event_get_keymap_from_handler(wmWindowManager *wm,
struct wmEventHandler_Keymap *handler);
wmKeyMapItem *WM_event_match_keymap_item(struct bContext *C,
wmKeyMap *keymap,
const struct wmEvent *event);
typedef int (*wmUIHandlerFunc)(struct bContext *C, const struct wmEvent *event, void *userdata);
typedef void (*wmUIHandlerRemoveFunc)(struct bContext *C, void *userdata);