From 905c0269f302e8e0e7a27dda8d5256fdcd06ce60 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 3 Apr 2020 13:25:03 +0200 Subject: Cleanup: Rename ScrArea variables from sa to area Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files. --- source/blender/editors/include/ED_anim_api.h | 6 +-- source/blender/editors/include/ED_gpencil.h | 10 ++--- source/blender/editors/include/ED_mask.h | 19 +++++---- source/blender/editors/include/ED_node.h | 4 +- source/blender/editors/include/ED_render.h | 2 +- source/blender/editors/include/ED_screen.h | 58 +++++++++++++-------------- source/blender/editors/include/ED_util.h | 2 +- source/blender/editors/include/ED_view3d.h | 6 +-- source/blender/editors/include/UI_interface.h | 4 +- source/blender/editors/include/UI_view2d.h | 2 +- 10 files changed, 58 insertions(+), 55 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 7f4c3470020..fe249ce8bfe 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -74,13 +74,13 @@ typedef struct bAnimContext { /** editor->mode */ short mode; - /** sa->spacetype */ + /** area->spacetype */ short spacetype; /** active region -> type (channels or main) */ short regiontype; /** editor host */ - struct ScrArea *sa; + struct ScrArea *area; /** editor data */ struct SpaceLink *sl; /** region within editor */ @@ -840,7 +840,7 @@ void ED_animedit_unlink_action(struct bContext *C, bool force_delete); /* Drivers Editor - Utility to set up UI correctly */ -void ED_drivers_editor_init(struct bContext *C, struct ScrArea *sa); +void ED_drivers_editor_init(struct bContext *C, struct ScrArea *area); /* ************************************************ */ diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 511e892f29a..d63353d3886 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -88,20 +88,20 @@ struct bGPdata *ED_gpencil_data_get_active(const struct bContext *C); struct bGPdata *ED_gpencil_data_get_active_evaluated(const struct bContext *C); /* Context independent (i.e. each required part is passed in instead) */ -struct bGPdata **ED_gpencil_data_get_pointers_direct(struct ScrArea *sa, +struct bGPdata **ED_gpencil_data_get_pointers_direct(struct ScrArea *area, struct Object *ob, struct PointerRNA *r_ptr); -struct bGPdata *ED_gpencil_data_get_active_direct(struct ScrArea *sa, struct Object *ob); +struct bGPdata *ED_gpencil_data_get_active_direct(struct ScrArea *area, struct Object *ob); struct bGPdata *ED_annotation_data_get_active(const struct bContext *C); struct bGPdata **ED_annotation_data_get_pointers(const struct bContext *C, struct PointerRNA *r_ptr); struct bGPdata **ED_annotation_data_get_pointers_direct(struct ID *screen_id, - struct ScrArea *sa, + struct ScrArea *area, struct Scene *scene, struct PointerRNA *r_ptr); struct bGPdata *ED_annotation_data_get_active_direct(struct ID *screen_id, - struct ScrArea *sa, + struct ScrArea *area, struct Scene *scene); bool ED_gpencil_data_owner_is_annotation(struct PointerRNA *owner_ptr); @@ -111,7 +111,7 @@ bool ED_gpencil_has_keyframe_v3d(struct Scene *scene, struct Object *ob, int cfr /* ----------- Stroke Editing Utilities ---------------- */ -bool ED_gpencil_stroke_can_use_direct(const struct ScrArea *sa, const struct bGPDstroke *gps); +bool ED_gpencil_stroke_can_use_direct(const struct ScrArea *area, const struct bGPDstroke *gps); bool ED_gpencil_stroke_can_use(const struct bContext *C, const struct bGPDstroke *gps); bool ED_gpencil_stroke_color_use(struct Object *ob, const struct bGPDlayer *gpl, diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h index 7d314c0c462..5aafc0702da 100644 --- a/source/blender/editors/include/ED_mask.h +++ b/source/blender/editors/include/ED_mask.h @@ -43,22 +43,25 @@ void ED_keymap_mask(struct wmKeyConfig *keyconf); void ED_operatormacros_mask(void); /* mask_query.c */ -void ED_mask_get_size(struct ScrArea *sa, int *width, int *height); -void ED_mask_zoom(struct ScrArea *sa, struct ARegion *region, float *zoomx, float *zoomy); -void ED_mask_get_aspect(struct ScrArea *sa, struct ARegion *region, float *aspx, float *aspy); +void ED_mask_get_size(struct ScrArea *area, int *width, int *height); +void ED_mask_zoom(struct ScrArea *area, struct ARegion *region, float *zoomx, float *zoomy); +void ED_mask_get_aspect(struct ScrArea *area, struct ARegion *region, float *aspx, float *aspy); -void ED_mask_pixelspace_factor(struct ScrArea *sa, +void ED_mask_pixelspace_factor(struct ScrArea *area, struct ARegion *region, float *scalex, float *scaley); -void ED_mask_mouse_pos(struct ScrArea *sa, struct ARegion *region, const int mval[2], float co[2]); +void ED_mask_mouse_pos(struct ScrArea *area, + struct ARegion *region, + const int mval[2], + float co[2]); void ED_mask_point_pos( - struct ScrArea *sa, struct ARegion *region, float x, float y, float *xr, float *yr); + struct ScrArea *area, struct ARegion *region, float x, float y, float *xr, float *yr); void ED_mask_point_pos__reverse( - struct ScrArea *sa, struct ARegion *region, float x, float y, float *xr, float *yr); + struct ScrArea *area, struct ARegion *region, float x, float y, float *xr, float *yr); -void ED_mask_cursor_location_get(struct ScrArea *sa, float cursor[2]); +void ED_mask_cursor_location_get(struct ScrArea *area, float cursor[2]); bool ED_mask_selected_minmax(const struct bContext *C, float min[2], float max[2]); /* mask_draw.c */ diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index ae2b4989069..7a1f64b61d4 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -86,8 +86,8 @@ void ED_node_sort(struct bNodeTree *ntree); float ED_node_grid_size(void); /* node_relationships.c */ -void ED_node_link_intersect_test(struct ScrArea *sa, int test); -void ED_node_link_insert(struct Main *bmain, struct ScrArea *sa); +void ED_node_link_intersect_test(struct ScrArea *area, int test); +void ED_node_link_insert(struct Main *bmain, struct ScrArea *area); /* node_edit.c */ void ED_node_set_tree_type(struct SpaceNode *snode, struct bNodeTreeType *typeinfo); diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h index 0645b256a15..6db45a653b5 100644 --- a/source/blender/editors/include/ED_render.h +++ b/source/blender/editors/include/ED_render.h @@ -48,7 +48,7 @@ void ED_operatortypes_render(void); /* render_update.c */ void ED_render_engine_changed(struct Main *bmain); -void ED_render_engine_area_exit(struct Main *bmain, struct ScrArea *sa); +void ED_render_engine_area_exit(struct Main *bmain, struct ScrArea *area); void ED_render_view_layer_changed(struct Main *bmain, struct bScreen *sc); /* Callbacks handling data update events coming from depsgraph. */ diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 7430f491d91..62d4324d37e 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -63,14 +63,14 @@ struct wmWindowManager; /* regions */ void ED_region_do_listen(struct wmWindow *win, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region, struct wmNotifier *note, const Scene *scene); void ED_region_do_layout(struct bContext *C, struct ARegion *region); void ED_region_do_draw(struct bContext *C, struct ARegion *region); void ED_region_exit(struct bContext *C, struct ARegion *region); -void ED_region_remove(struct bContext *C, struct ScrArea *sa, struct ARegion *region); +void ED_region_remove(struct bContext *C, struct ScrArea *area, struct ARegion *region); void ED_region_pixelspace(struct ARegion *region); void ED_region_update_rect(struct ARegion *region); void ED_region_floating_initialize(struct ARegion *region); @@ -104,14 +104,14 @@ void ED_region_header(const struct bContext *C, struct ARegion *region); void ED_region_header_layout(const struct bContext *C, struct ARegion *region); void ED_region_header_draw(const struct bContext *C, struct ARegion *region); -void ED_region_cursor_set(struct wmWindow *win, struct ScrArea *sa, struct ARegion *region); +void ED_region_cursor_set(struct wmWindow *win, struct ScrArea *area, struct ARegion *region); void ED_region_toggle_hidden(struct bContext *C, struct ARegion *region); void ED_region_visibility_change_update(struct bContext *C, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region); /* screen_ops.c */ void ED_region_visibility_change_update_animated(struct bContext *C, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region); void ED_region_info_draw(struct ARegion *region, @@ -146,14 +146,14 @@ void ED_area_do_mgs_subscribe_for_tool_header(const struct bContext *C, struct WorkSpace *workspace, struct Scene *scene, struct bScreen *screen, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region, struct wmMsgBus *mbus); void ED_area_do_mgs_subscribe_for_tool_ui(const struct bContext *C, struct WorkSpace *workspace, struct Scene *scene, struct bScreen *screen, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region, struct wmMsgBus *mbus); @@ -162,7 +162,7 @@ void ED_region_message_subscribe(struct bContext *C, struct WorkSpace *workspace, struct Scene *scene, struct bScreen *screen, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region, struct wmMsgBus *mbus); @@ -171,21 +171,21 @@ void ED_spacetypes_keymap(struct wmKeyConfig *keyconf); int ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco); /* areas */ -void ED_area_initialize(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *sa); -void ED_area_exit(struct bContext *C, struct ScrArea *sa); +void ED_area_initialize(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *area); +void ED_area_exit(struct bContext *C, struct ScrArea *area); int ED_screen_area_active(const struct bContext *C); void ED_screen_global_areas_refresh(struct wmWindow *win); void ED_screen_global_areas_sync(struct wmWindow *win); -void ED_area_do_listen(struct wmWindow *win, ScrArea *sa, struct wmNotifier *note, Scene *scene); -void ED_area_tag_redraw(ScrArea *sa); -void ED_area_tag_redraw_no_rebuild(ScrArea *sa); -void ED_area_tag_redraw_regiontype(ScrArea *sa, int type); -void ED_area_tag_refresh(ScrArea *sa); -void ED_area_do_refresh(struct bContext *C, ScrArea *sa); -struct AZone *ED_area_azones_update(ScrArea *sa, const int mouse_xy[]); -void ED_area_status_text(ScrArea *sa, const char *str); -void ED_area_newspace(struct bContext *C, ScrArea *sa, int type, const bool skip_region_exit); -void ED_area_prevspace(struct bContext *C, ScrArea *sa); +void ED_area_do_listen(struct wmWindow *win, ScrArea *area, struct wmNotifier *note, Scene *scene); +void ED_area_tag_redraw(ScrArea *area); +void ED_area_tag_redraw_no_rebuild(ScrArea *area); +void ED_area_tag_redraw_regiontype(ScrArea *area, int type); +void ED_area_tag_refresh(ScrArea *area); +void ED_area_do_refresh(struct bContext *C, ScrArea *area); +struct AZone *ED_area_azones_update(ScrArea *area, const int mouse_xy[]); +void ED_area_status_text(ScrArea *area, const char *str); +void ED_area_newspace(struct bContext *C, ScrArea *area, int type, const bool skip_region_exit); +void ED_area_prevspace(struct bContext *C, ScrArea *area); void ED_area_swapspace(struct bContext *C, ScrArea *sa1, ScrArea *sa2); int ED_area_headersize(void); int ED_area_header_alignment_or_fallback(const ScrArea *area, int fallback); @@ -224,7 +224,7 @@ ScrArea *ED_screen_areas_iter_next(const bScreen *screen, const ScrArea *area); void ED_screens_initialize(struct Main *bmain, struct wmWindowManager *wm); void ED_screen_draw_edges(struct wmWindow *win); void ED_screen_draw_join_shape(struct ScrArea *sa1, struct ScrArea *sa2); -void ED_screen_draw_split_preview(struct ScrArea *sa, const int dir, const float fac); +void ED_screen_draw_split_preview(struct ScrArea *area, const int dir, const float fac); void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win); void ED_screen_ensure_updated(struct wmWindowManager *wm, struct wmWindow *win, @@ -236,13 +236,13 @@ void ED_screen_set_active_region(struct bContext *C, struct wmWindow *win, const void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen); void ED_screen_animation_timer(struct bContext *C, int redraws, int sync, int enable); void ED_screen_animation_timer_update(struct bScreen *screen, int redraws); -void ED_screen_restore_temp_type(struct bContext *C, ScrArea *sa); -ScrArea *ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type); -void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa); -void ED_screen_full_restore(struct bContext *C, ScrArea *sa); +void ED_screen_restore_temp_type(struct bContext *C, ScrArea *area); +ScrArea *ED_screen_full_newspace(struct bContext *C, ScrArea *area, int type); +void ED_screen_full_prevspace(struct bContext *C, ScrArea *area); +void ED_screen_full_restore(struct bContext *C, ScrArea *area); struct ScrArea *ED_screen_state_toggle(struct bContext *C, struct wmWindow *win, - struct ScrArea *sa, + struct ScrArea *area, const short state); ScrArea *ED_screen_temp_space_open(struct bContext *C, const char *title, @@ -422,7 +422,7 @@ void ED_region_generic_tools_region_message_subscribe(const struct bContext *C, struct WorkSpace *workspace, struct Scene *scene, struct bScreen *screen, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region, struct wmMsgBus *mbus); int ED_region_generic_tools_region_snap_size(const struct ARegion *region, int size, int axis); @@ -449,8 +449,8 @@ bool ED_region_contains_xy(const struct ARegion *region, const int event_xy[2]); /* interface_region_hud.c */ struct ARegionType *ED_area_type_hud(int space_type); -void ED_area_type_hud_clear(struct wmWindowManager *wm, ScrArea *sa_keep); -void ED_area_type_hud_ensure(struct bContext *C, struct ScrArea *sa); +void ED_area_type_hud_clear(struct wmWindowManager *wm, ScrArea *area_keep); +void ED_area_type_hud_ensure(struct bContext *C, struct ScrArea *area); /* default keymaps, bitflags (matches order of evaluation). */ enum { diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 8b4829446c3..1f2706957a7 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -48,7 +48,7 @@ bool ED_editors_flush_edits_for_object(struct Main *bmain, struct Object *ob); bool ED_editors_flush_edits_ex(struct Main *bmain, bool for_render, bool check_needs_flush); bool ED_editors_flush_edits(struct Main *bmain); -void ED_spacedata_id_remap(struct ScrArea *sa, +void ED_spacedata_id_remap(struct ScrArea *area, struct SpaceLink *sl, struct ID *old_id, struct ID *new_id); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 86ad35cfa9f..668ca3c6437 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -561,7 +561,7 @@ struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C); bool ED_view3d_context_user_region(struct bContext *C, struct View3D **r_v3d, struct ARegion **r_region); -bool ED_view3d_area_user_region(const struct ScrArea *sa, +bool ED_view3d_area_user_region(const struct ScrArea *area, const struct View3D *v3d, struct ARegion **r_region); bool ED_operator_rv3d_user_region_poll(struct bContext *C); @@ -600,7 +600,7 @@ void ED_view3d_draw_setup_view(const struct wmWindowManager *wm, struct Base *ED_view3d_give_base_under_cursor(struct bContext *C, const int mval[2]); struct Object *ED_view3d_give_object_under_cursor(struct bContext *C, const int mval[2]); bool ED_view3d_is_object_under_cursor(struct bContext *C, const int mval[2]); -void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *region, bool do_clip); +void ED_view3d_quadview_update(struct ScrArea *area, struct ARegion *region, bool do_clip); void ED_view3d_update_viewmat(struct Depsgraph *depsgraph, const struct Scene *scene, struct View3D *v3d, @@ -702,7 +702,7 @@ void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, /* render */ void ED_view3d_stop_render_preview(struct wmWindowManager *wm, struct ARegion *region); -void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa); +void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *area); #define XRAY_ALPHA(v3d) \ (((v3d)->shading.type == OB_WIRE) ? (v3d)->shading.xray_alpha_wire : (v3d)->shading.xray_alpha) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 1fa6e5b12c1..e8d50886c8b 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1650,14 +1650,14 @@ void UI_panels_end(const struct bContext *C, struct ARegion *region, int *r_x, i void UI_panels_draw(const struct bContext *C, struct ARegion *region); struct Panel *UI_panel_find_by_type(struct ListBase *lb, struct PanelType *pt); -struct Panel *UI_panel_begin(struct ScrArea *sa, +struct Panel *UI_panel_begin(struct ScrArea *area, struct ARegion *region, struct ListBase *lb, uiBlock *block, struct PanelType *pt, struct Panel *pa, bool *r_open); -void UI_panel_end(const struct ScrArea *sa, +void UI_panel_end(const struct ScrArea *area, const struct ARegion *region, uiBlock *block, int width, diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index ff9719d4674..d4db1b14074 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -119,7 +119,7 @@ void UI_view2d_region_reinit(struct View2D *v2d, short type, int winx, int winy) void UI_view2d_curRect_validate(struct View2D *v2d); void UI_view2d_curRect_reset(struct View2D *v2d); -void UI_view2d_sync(struct bScreen *screen, struct ScrArea *sa, struct View2D *v2dcur, int flag); +void UI_view2d_sync(struct bScreen *screen, struct ScrArea *area, struct View2D *v2dcur, int flag); void UI_view2d_totRect_set(struct View2D *v2d, int width, int height); void UI_view2d_totRect_set_resize(struct View2D *v2d, int width, int height, bool resize); -- cgit v1.2.3