diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-06 10:07:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-06 10:09:01 +0300 |
commit | 443904f1f4f9f0b45e4ef10ec4b5c9392559ada0 (patch) | |
tree | 2aac246c487c8b8cf7f068f4554d369005741257 /source/blender/windowmanager/manipulators/WM_manipulator_types.h | |
parent | 2ebde4c82bd478d19a9b3116ac600e715ffc0165 (diff) |
WM: functions for assigning all manipulator callbacks
- Move callbacks into type struct.
- Rename render_3d_intersection -> draw_select.
- Add header for function signatures (needed for types and api headers).
- Add WM_manipulatormaptype_find
Diffstat (limited to 'source/blender/windowmanager/manipulators/WM_manipulator_types.h')
-rw-r--r-- | source/blender/windowmanager/manipulators/WM_manipulator_types.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_types.h b/source/blender/windowmanager/manipulators/WM_manipulator_types.h index 8de33ca923e..5fb909b06cf 100644 --- a/source/blender/windowmanager/manipulators/WM_manipulator_types.h +++ b/source/blender/windowmanager/manipulators/WM_manipulator_types.h @@ -40,13 +40,10 @@ struct wmManipulatorGroupType; struct wmManipulatorGroup; +struct wmManipulator; struct wmKeyConfig; -typedef bool (*wmManipulatorGroupPollFunc)(const struct bContext *, struct wmManipulatorGroupType *) ATTR_WARN_UNUSED_RESULT; -typedef void (*wmManipulatorGroupInitFunc)(const struct bContext *, struct wmManipulatorGroup *); -typedef void (*wmManipulatorGroupRefreshFunc)(const struct bContext *, struct wmManipulatorGroup *); -typedef void (*wmManipulatorGroupDrawPrepareFunc)(const struct bContext *, struct wmManipulatorGroup *); - +#include "wm_manipulator_fn.h" /* -------------------------------------------------------------------- */ /* wmManipulator */ @@ -79,27 +76,33 @@ typedef struct wmManipulatorGroupType { const char *name; /* manipulator-group name - displayed in UI (keymap editor) */ /* poll if manipulator-map should be visible */ - wmManipulatorGroupPollFunc poll; + wmManipulatorGroupFnPoll poll; /* initially create manipulators and set permanent data - stuff you only need to do once */ - wmManipulatorGroupInitFunc init; + wmManipulatorGroupFnInit init; /* refresh data, only called if recreate flag is set (WM_manipulatormap_tag_refresh) */ - wmManipulatorGroupRefreshFunc refresh; + wmManipulatorGroupFnRefresh refresh; /* refresh data for drawing, called before each redraw */ - wmManipulatorGroupDrawPrepareFunc draw_prepare; + wmManipulatorGroupFnDrawPrepare draw_prepare; /* keymap init callback for this manipulator-group */ struct wmKeyMap *(*keymap_init)(const struct wmManipulatorGroupType *, struct wmKeyConfig *); /* keymap created with callback from above */ struct wmKeyMap *keymap; + /* Disable for now, maybe some day we want properties. */ +#if 0 /* rna for properties */ struct StructRNA *srna; +#endif /* RNA integration */ ExtensionRNA ext; int flag; + /* Weak, but needed to store which functions we have. */ + int rna_func_flag; + /* if type is spawned from operator this is set here */ void *op; |