diff options
author | Hans Goudey <h.goudey@me.com> | 2021-01-19 02:28:47 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-01-19 02:28:47 +0300 |
commit | 09c7c638905230a608a9b0204b68c775cf71bf67 (patch) | |
tree | 4b21efd9b23283ef236e756f46e3f75f5d2e6c61 /source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c | |
parent | 4b4aec288458dd24721fdd61af38d3c316c2520b (diff) |
UI Code Quality: Use "params" struct for area and region callbacks
These functions with many arguments can be unwieldy. Aside from the obvious issues
with rewriting the list of arguments and the opportunities for error and frustration
that presents, the long list of arguments make these systems hard to change. So when
an argument should be added, someone might skip that and add some hack instead.
So, as proposed in T73586#1037210, this patch instead uses a "params" struct for
each of these callbacks.
- Use param argument for `ARegionType.listener`
- Remove unused window field in region listener
- Use param argument for `SpaceType.listener`
- Use params struct for `ARegionType.message_subscribe`
Differential Revision: https://developer.blender.org/D9750
Diffstat (limited to 'source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c')
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c index 479768c3536..12c6eb46c12 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c @@ -1156,7 +1156,7 @@ ListBase *wm_gizmomap_groups_get(wmGizmoMap *gzmap) return &gzmap->groups; } -void WM_gizmomap_message_subscribe(bContext *C, +void WM_gizmomap_message_subscribe(const bContext *C, wmGizmoMap *gzmap, ARegion *region, struct wmMsgBus *mbus) |