diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-02 12:47:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-02 12:51:31 +0300 |
commit | b88e51dd55c62bdc160f33f9b2ae1727a892560a (patch) | |
tree | c9b9e00d51be18250df443c47ad31b1341a50f01 /source/blender/windowmanager/WM_api.h | |
parent | bfbfb1c47e8c60732f45638513ed7e39bedc730a (diff) |
Cleanup: use bool for poll functions
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index cfaef2c3f58..95d5a481385 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -129,10 +129,11 @@ void WM_cursor_grab_enable(struct wmWindow *win, bool wrap, bool hide, int boun void WM_cursor_grab_disable(struct wmWindow *win, const int mouse_ungrab_xy[2]); void WM_cursor_time (struct wmWindow *win, int nr); -void *WM_paint_cursor_activate(struct wmWindowManager *wm, - int (*poll)(struct bContext *C), - void (*draw)(struct bContext *C, int, int, void *customdata), - void *customdata); +void *WM_paint_cursor_activate( + struct wmWindowManager *wm, + bool (*poll)(struct bContext *C), + void (*draw)(struct bContext *C, int, int, void *customdata), + void *customdata); void WM_paint_cursor_end(struct wmWindowManager *wm, void *handle); void WM_paint_cursor_tag_redraw(struct wmWindow *win, struct ARegion *ar); @@ -238,7 +239,7 @@ int WM_operator_confirm (struct bContext *C, struct wmOperator *op, const str int WM_operator_filesel (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFormatData *im_format); /* poll callback, context checks */ -int WM_operator_winactive (struct bContext *C); +bool WM_operator_winactive (struct bContext *C); /* invoke callback, exec + redo popup */ int WM_operator_props_popup_confirm(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_operator_props_popup_call(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); @@ -273,8 +274,8 @@ struct wmOperatorType *WM_operatortype_append_macro(const char *idname, const ch struct wmOperatorTypeMacro *WM_operatortype_macro_define(struct wmOperatorType *ot, const char *idname); -int WM_operator_poll (struct bContext *C, struct wmOperatorType *ot); -int WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, short context); +bool WM_operator_poll (struct bContext *C, struct wmOperatorType *ot); +bool WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, short context); int WM_operator_call_ex(struct bContext *C, struct wmOperator *op, const bool store); int WM_operator_call (struct bContext *C, struct wmOperator *op); int WM_operator_call_notest(struct bContext *C, struct wmOperator *op); @@ -417,8 +418,9 @@ void WM_event_drag_image(struct wmDrag *, struct ImBuf *, float scale, int sx void WM_drag_free(struct wmDrag *drag); void WM_drag_free_list(struct ListBase *lb); -struct wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(struct bContext *, struct wmDrag *, const struct wmEvent *event), - void (*copy)(struct wmDrag *, struct wmDropBox *)); +struct wmDropBox *WM_dropbox_add( + ListBase *lb, const char *idname, bool (*poll)(struct bContext *, struct wmDrag *, const struct wmEvent *event), + void (*copy)(struct wmDrag *, struct wmDropBox *)); ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid); /* Set a subwindow active in pixelspace view, with optional scissor subset */ |