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:
authorCampbell Barton <ideasman42@gmail.com>2014-06-03 02:58:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-06-03 03:30:08 +0400
commitbf640a6a7faff2246d6be117fa758dd69154f27f (patch)
tree13dea778bd0dbf4e21f2939423a3ec776f90a09c /source/blender/windowmanager/WM_api.h
parent9016d6d7a0cb41cb266c5fc1de05ee2c674db0d4 (diff)
Code cleanup: use typedefs for ui handler functions
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 64cada9f005..9e50b01cd23 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -145,19 +145,22 @@ struct wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers,
void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap);
+typedef int (*wmUIHandlerFunc)(struct bContext *C, const struct wmEvent *event, void *userdata);
+typedef void (*wmUIHandlerRemoveFunc)(struct bContext *C, void *userdata);
+
struct wmEventHandler *WM_event_add_ui_handler(
const struct bContext *C, ListBase *handlers,
- int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
- void (*remove)(struct bContext *C, void *userdata), void *userdata);
-
-void WM_event_remove_ui_handler(ListBase *handlers,
- int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
- void (*remove)(struct bContext *C, void *userdata),
- void *userdata, const bool postpone);
-void WM_event_remove_area_handler(struct ListBase *handlers, void *area);
-void WM_event_free_ui_handler_all(struct bContext *C, ListBase *handlers,
- int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
- void (*remove)(struct bContext *C, void *userdata));
+ wmUIHandlerFunc ui_handle, wmUIHandlerRemoveFunc ui_remove,
+ void *userdata);
+void WM_event_remove_ui_handler(
+ ListBase *handlers,
+ wmUIHandlerFunc ui_handle, wmUIHandlerRemoveFunc ui_remove,
+ void *userdata, const bool postpone);
+void WM_event_remove_area_handler(
+ struct ListBase *handlers, void *area);
+void WM_event_free_ui_handler_all(
+ struct bContext *C, ListBase *handlers,
+ wmUIHandlerFunc ui_handle, wmUIHandlerRemoveFunc ui_remove);
struct wmEventHandler *WM_event_add_modal_handler(struct bContext *C, struct wmOperator *op);
void WM_event_remove_handlers(struct bContext *C, ListBase *handlers);