diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-21 19:06:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-21 19:06:46 +0300 |
commit | 7e8784925780642e9db4219cf10000228f775949 (patch) | |
tree | 35d6337135ff2af1232ff3e3fbcb3edfecb50310 /source/blender/windowmanager | |
parent | be89b95e983566a74e72ab51fddacee49b808869 (diff) |
Cleanup: rename manipulator API functions
- WM_manipulatorgrouptype_remove- > free
- WM_manipulator_group -> WM_manipulator_group_type
Naming here is still a bit confusing,
now at least free/remove are differentiated.
Diffstat (limited to 'source/blender/windowmanager')
3 files changed, 33 insertions, 32 deletions
diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_api.h b/source/blender/windowmanager/manipulators/WM_manipulator_api.h index 2939070db01..84e93c2ca29 100644 --- a/source/blender/windowmanager/manipulators/WM_manipulator_api.h +++ b/source/blender/windowmanager/manipulators/WM_manipulator_api.h @@ -141,8 +141,8 @@ void WM_manipulatortype_iter(struct GHashIterator *ghi); struct wmManipulatorGroupType *WM_manipulatorgrouptype_find(const char *idname, bool quiet); struct wmManipulatorGroupType *WM_manipulatorgrouptype_append(void (*wtfunc)(struct wmManipulatorGroupType *)); struct wmManipulatorGroupType *WM_manipulatorgrouptype_append_ptr(void (*mnpfunc)(struct wmManipulatorGroupType *, void *), void *userdata); -bool WM_manipulatorgrouptype_remove(const char *idname); -void WM_manipulatorgrouptype_remove_ptr(struct wmManipulatorGroupType *wt); +bool WM_manipulatorgrouptype_free(const char *idname); +void WM_manipulatorgrouptype_free_ptr(struct wmManipulatorGroupType *wt); void WM_manipulatorgrouptype_iter(struct GHashIterator *ghi); struct wmManipulatorGroupTypeRef *WM_manipulatorgrouptype_append_and_link( @@ -273,28 +273,28 @@ void WM_manipulatormaptype_group_free(struct wmManipulatorGroupTypeRef *wgt); /* Add/Remove (High level API) */ -void WM_manipulator_group_add_ptr_ex( +void WM_manipulator_group_type_add_ptr_ex( struct wmManipulatorGroupType *wgt, struct wmManipulatorMapType *mmap_type); -void WM_manipulator_group_add_ptr( +void WM_manipulator_group_type_add_ptr( struct wmManipulatorGroupType *wgt); -void WM_manipulator_group_add(const char *idname); +void WM_manipulator_group_type_add(const char *idname); -void WM_manipulator_group_remove_ptr_ex( +void WM_manipulator_group_type_remove_ptr_ex( struct Main *bmain, struct wmManipulatorGroupType *wgt, struct wmManipulatorMapType *mmap_type); -void WM_manipulator_group_remove_ptr( +void WM_manipulator_group_type_remove_ptr( struct Main *bmain, struct wmManipulatorGroupType *wgt); -void WM_manipulator_group_remove(struct Main *bmain, const char *idname); +void WM_manipulator_group_type_remove(struct Main *bmain, const char *idname); -void WM_manipulator_group_remove_ptr_delayed_ex( +void WM_manipulator_group_type_remove_ptr_delayed_ex( struct wmManipulatorGroupType *wgt, struct wmManipulatorMapType *mmap_type); -void WM_manipulator_group_remove_ptr_delayed( +void WM_manipulator_group_type_remove_ptr_delayed( struct wmManipulatorGroupType *wgt); -void WM_manipulator_group_remove_delayed(const char *idname); +void WM_manipulator_group_type_remove_delayed(const char *idname); /* Utilities */ -void WM_manipulator_group_is_any_selected(const char *idname); +void WM_manipulator_group_type_is_any_selected(const char *idname); #endif /* __WM_MANIPULATOR_API_H__ */ diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c index 87a5ee11d18..4ace8695555 100644 --- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c +++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c @@ -683,7 +683,7 @@ void wm_manipulatorgrouptype_setup_keymap( * * \note In context of manipulator API these names are a bit misleading, * but for general use terms its OK. - * `WM_manipulator_group_add` would be more correctly called: + * `WM_manipulator_group_type_add` would be more correctly called: * `WM_manipulatormaptype_grouptype_reference_link` * but for general purpose API this is too detailed & annoying. * @@ -691,7 +691,7 @@ void wm_manipulatorgrouptype_setup_keymap( * * \{ */ -void WM_manipulator_group_add_ptr_ex( +void WM_manipulator_group_type_add_ptr_ex( wmManipulatorGroupType *wgt, wmManipulatorMapType *mmap_type) { @@ -700,63 +700,64 @@ void WM_manipulator_group_add_ptr_ex( WM_manipulatorconfig_update_tag_init(mmap_type, wgt); } -void WM_manipulator_group_add_ptr( +void WM_manipulator_group_type_add_ptr( wmManipulatorGroupType *wgt) { wmManipulatorMapType *mmap_type = WM_manipulatormaptype_ensure(&wgt->mmap_params); - WM_manipulator_group_add_ptr_ex(wgt, mmap_type); + WM_manipulator_group_type_add_ptr_ex(wgt, mmap_type); } -void WM_manipulator_group_add(const char *idname) +void WM_manipulator_group_type_add(const char *idname) { wmManipulatorGroupType *wgt = WM_manipulatorgrouptype_find(idname, false); BLI_assert(wgt != NULL); - WM_manipulator_group_add_ptr(wgt); + WM_manipulator_group_type_add_ptr(wgt); } -void WM_manipulator_group_remove_ptr_ex( + +void WM_manipulator_group_type_remove_ptr_ex( struct Main *bmain, wmManipulatorGroupType *wgt, wmManipulatorMapType *mmap_type) { WM_manipulatormaptype_group_unlink(NULL, bmain, mmap_type, wgt); - WM_manipulatorgrouptype_remove_ptr(wgt); + WM_manipulatorgrouptype_free_ptr(wgt); } -void WM_manipulator_group_remove_ptr( +void WM_manipulator_group_type_remove_ptr( struct Main *bmain, wmManipulatorGroupType *wgt) { wmManipulatorMapType *mmap_type = WM_manipulatormaptype_ensure(&wgt->mmap_params); - WM_manipulator_group_remove_ptr_ex(bmain, wgt, mmap_type); + WM_manipulator_group_type_remove_ptr_ex(bmain, wgt, mmap_type); } -void WM_manipulator_group_remove(struct Main *bmain, const char *idname) +void WM_manipulator_group_type_remove(struct Main *bmain, const char *idname) { wmManipulatorGroupType *wgt = WM_manipulatorgrouptype_find(idname, false); BLI_assert(wgt != NULL); - WM_manipulator_group_remove_ptr(bmain, wgt); + WM_manipulator_group_type_remove_ptr(bmain, wgt); } /* delayed versions */ -void WM_manipulator_group_remove_ptr_delayed_ex( +void WM_manipulator_group_type_remove_ptr_delayed_ex( wmManipulatorGroupType *wgt, wmManipulatorMapType *mmap_type) { WM_manipulatorconfig_update_tag_remove(mmap_type, wgt); } -void WM_manipulator_group_remove_ptr_delayed( +void WM_manipulator_group_type_remove_ptr_delayed( wmManipulatorGroupType *wgt) { wmManipulatorMapType *mmap_type = WM_manipulatormaptype_ensure(&wgt->mmap_params); - WM_manipulator_group_remove_ptr_delayed_ex(wgt, mmap_type); + WM_manipulator_group_type_remove_ptr_delayed_ex(wgt, mmap_type); } -void WM_manipulator_group_remove_delayed(const char *idname) +void WM_manipulator_group_type_remove_delayed(const char *idname) { wmManipulatorGroupType *wgt = WM_manipulatorgrouptype_find(idname, false); BLI_assert(wgt != NULL); - WM_manipulator_group_remove_ptr_delayed(wgt); + WM_manipulator_group_type_remove_ptr_delayed(wgt); } /** \} */ diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_group_type.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator_group_type.c index cbe568ecd4c..4c17ffda09c 100644 --- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_group_type.c +++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_group_type.c @@ -151,7 +151,7 @@ static void manipulatorgrouptype_free(wmManipulatorGroupType *wgt) MEM_freeN(wgt); } -void WM_manipulatorgrouptype_remove_ptr(wmManipulatorGroupType *wgt) +void WM_manipulatorgrouptype_free_ptr(wmManipulatorGroupType *wgt) { BLI_assert(wgt == WM_manipulatorgrouptype_find(wgt->idname, false)); @@ -162,7 +162,7 @@ void WM_manipulatorgrouptype_remove_ptr(wmManipulatorGroupType *wgt) /* XXX, TODO, update the world! */ } -bool WM_manipulatorgrouptype_remove(const char *idname) +bool WM_manipulatorgrouptype_free(const char *idname) { wmManipulatorGroupType *wgt = BLI_ghash_lookup(global_manipulatorgrouptype_hash, idname); @@ -170,7 +170,7 @@ bool WM_manipulatorgrouptype_remove(const char *idname) return false; } - WM_manipulatorgrouptype_remove_ptr(wgt); + WM_manipulatorgrouptype_free_ptr(wgt); return true; } |