diff options
author | Julian Eisel <julian@blender.org> | 2020-03-06 18:56:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-06 19:19:23 +0300 |
commit | b2ee1770d4c31078518f4ec9edd5196a41345162 (patch) | |
tree | 6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/editors/include | |
parent | b825a95ec311a169d33fe21e28418f11a516c82f (diff) |
Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
Diffstat (limited to 'source/blender/editors/include')
20 files changed, 211 insertions, 186 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index f8d0300cb46..2e810297138 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -84,7 +84,7 @@ typedef struct bAnimContext { /** editor data */ struct SpaceLink *sl; /** region within editor */ - struct ARegion *ar; + struct ARegion *region; /** dopesheet data for editor (or which is being used) */ struct bDopeSheet *ads; @@ -407,7 +407,7 @@ typedef enum eAnimFilter_Flags { /* channel heights */ #define ACHANNEL_FIRST_TOP(ac) \ - (UI_view2d_scale_get_y(&(ac)->ar->v2d) * -UI_TIME_SCRUB_MARGIN_Y - ACHANNEL_SKIP) + (UI_view2d_scale_get_y(&(ac)->region->v2d) * -UI_TIME_SCRUB_MARGIN_Y - ACHANNEL_SKIP) #define ACHANNEL_HEIGHT(ac) (0.8f * (ac)->yscale_fac * U.widget_unit) #define ACHANNEL_SKIP (0.1f * U.widget_unit) #define ACHANNEL_STEP(ac) (ACHANNEL_HEIGHT(ac) + ACHANNEL_SKIP) @@ -425,7 +425,7 @@ typedef enum eAnimFilter_Flags { /* NLA channel heights */ #define NLACHANNEL_FIRST_TOP(ac) \ - (UI_view2d_scale_get_y(&(ac)->ar->v2d) * -UI_TIME_SCRUB_MARGIN_Y - NLACHANNEL_SKIP) + (UI_view2d_scale_get_y(&(ac)->region->v2d) * -UI_TIME_SCRUB_MARGIN_Y - NLACHANNEL_SKIP) #define NLACHANNEL_HEIGHT(snla) \ ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? (0.8f * U.widget_unit) : (1.2f * U.widget_unit)) #define NLACHANNEL_SKIP (0.1f * U.widget_unit) diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h index 064e957225e..f270a0324f9 100644 --- a/source/blender/editors/include/ED_clip.h +++ b/source/blender/editors/include/ED_clip.h @@ -50,7 +50,10 @@ bool ED_space_clip_maskedit_mask_poll(struct bContext *C); void ED_space_clip_get_size(struct SpaceClip *sc, int *width, int *height); void ED_space_clip_get_size_fl(struct SpaceClip *sc, float size[2]); -void ED_space_clip_get_zoom(struct SpaceClip *sc, struct ARegion *ar, float *zoomx, float *zoomy); +void ED_space_clip_get_zoom(struct SpaceClip *sc, + struct ARegion *region, + float *zoomx, + float *zoomy); void ED_space_clip_get_aspect(struct SpaceClip *sc, float *aspx, float *aspy); void ED_space_clip_get_aspect_dimension_aware(struct SpaceClip *sc, float *aspx, float *aspy); @@ -63,24 +66,27 @@ struct ImBuf *ED_space_clip_get_stable_buffer(struct SpaceClip *sc, float *angle); bool ED_space_clip_color_sample(struct SpaceClip *sc, - struct ARegion *ar, + struct ARegion *region, int mval[2], float r_col[3]); void ED_clip_update_frame(const struct Main *mainp, int cfra); -bool ED_clip_view_selection(const struct bContext *C, struct ARegion *ar, bool fit); +bool ED_clip_view_selection(const struct bContext *C, struct ARegion *region, bool fit); void ED_clip_select_all(struct SpaceClip *sc, int action, bool *r_has_selection); bool ED_clip_can_select(struct bContext *C); void ED_clip_point_undistorted_pos(struct SpaceClip *sc, const float co[2], float r_co[2]); void ED_clip_point_stable_pos( - struct SpaceClip *sc, struct ARegion *ar, float x, float y, float *xr, float *yr); + struct SpaceClip *sc, struct ARegion *region, float x, float y, float *xr, float *yr); void ED_clip_point_stable_pos__reverse(struct SpaceClip *sc, - struct ARegion *ar, + struct ARegion *region, const float co[2], float r_co[2]); -void ED_clip_mouse_pos(struct SpaceClip *sc, struct ARegion *ar, const int mval[2], float co[2]); +void ED_clip_mouse_pos(struct SpaceClip *sc, + struct ARegion *region, + const int mval[2], + float co[2]); bool ED_space_clip_check_show_trackedit(struct SpaceClip *sc); bool ED_space_clip_check_show_maskedit(struct SpaceClip *sc); diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index 1aed57943e6..06af48cd476 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -110,11 +110,11 @@ void ED_fileselect_params_to_userdef(struct SpaceFile *sfile, void ED_fileselect_reset_params(struct SpaceFile *sfile); -void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar); +void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *region); -FileLayout *ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar); +FileLayout *ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *region); -int ED_fileselect_layout_numfiles(FileLayout *layout, struct ARegion *ar); +int ED_fileselect_layout_numfiles(FileLayout *layout, struct ARegion *region); int ED_fileselect_layout_offset(FileLayout *layout, int x, int y); FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const struct rcti *rect); diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index d8088dd8454..8d2d9b934d4 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -150,7 +150,7 @@ void ED_annotation_draw_view2d(const struct bContext *C, bool onlyv2d); void ED_annotation_draw_view3d(struct Scene *scene, struct Depsgraph *depsgraph, struct View3D *v3d, - struct ARegion *ar, + struct ARegion *region, bool only3d); void ED_annotation_draw_ex(struct Scene *scene, struct bGPdata *gpd, @@ -273,7 +273,7 @@ void ED_gpencil_vgroup_deselect(struct bContext *C, struct Object *ob); int ED_gpencil_join_objects_exec(struct bContext *C, struct wmOperator *op); /* texture coordinate utilities */ -void ED_gpencil_tpoint_to_point(struct ARegion *ar, +void ED_gpencil_tpoint_to_point(struct ARegion *region, float origin[3], const struct tGPspoint *tpt, struct bGPDspoint *pt); diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 6cf633b477c..0e820a1c2d6 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -57,7 +57,7 @@ struct Mask *ED_space_image_get_mask(struct SpaceImage *sima); void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct Mask *mask); bool ED_space_image_color_sample(struct SpaceImage *sima, - struct ARegion *ar, + struct ARegion *region, int mval[2], float r_col[3]); struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock, int tile); @@ -68,7 +68,7 @@ void ED_space_image_get_size(struct SpaceImage *sima, int *width, int *height); void ED_space_image_get_size_fl(struct SpaceImage *sima, float size[2]); void ED_space_image_get_aspect(struct SpaceImage *sima, float *aspx, float *aspy); void ED_space_image_get_zoom(struct SpaceImage *sima, - struct ARegion *ar, + struct ARegion *region, float *zoomx, float *zoomy); void ED_space_image_get_uv_aspect(struct SpaceImage *sima, float *aspx, float *aspy); @@ -84,14 +84,14 @@ void ED_space_image_paint_update(struct Main *bmain, void ED_image_get_uv_aspect(struct Image *ima, struct ImageUser *iuser, float *aspx, float *aspy); void ED_image_mouse_pos(struct SpaceImage *sima, - struct ARegion *ar, + struct ARegion *region, const int mval[2], float co[2]); void ED_image_view_center_to_point(struct SpaceImage *sima, float x, float y); void ED_image_point_pos( - struct SpaceImage *sima, struct ARegion *ar, float x, float y, float *xr, float *yr); + struct SpaceImage *sima, struct ARegion *region, float x, float y, float *xr, float *yr); void ED_image_point_pos__reverse(struct SpaceImage *sima, - struct ARegion *ar, + struct ARegion *region, const float co[2], float r_co[2]); bool ED_image_slot_cycle(struct Image *image, int direction); @@ -108,7 +108,7 @@ bool ED_space_image_maskedit_mask_poll(struct bContext *C); bool ED_space_image_cursor_poll(struct bContext *C); void ED_image_draw_info(struct Scene *scene, - struct ARegion *ar, + struct ARegion *region, bool color_manage, bool use_default_view, int channels, diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h index 852bc8a1394..6abefa98c1a 100644 --- a/source/blender/editors/include/ED_mask.h +++ b/source/blender/editors/include/ED_mask.h @@ -37,19 +37,19 @@ struct wmKeyConfig; /* mask_edit.c */ void ED_mask_get_size(struct ScrArea *sa, int *width, int *height); -void ED_mask_zoom(struct ScrArea *sa, struct ARegion *ar, float *zoomx, float *zoomy); -void ED_mask_get_aspect(struct ScrArea *sa, struct ARegion *ar, float *aspx, float *aspy); +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_pixelspace_factor(struct ScrArea *sa, - struct ARegion *ar, + struct ARegion *region, float *scalex, float *scaley); -void ED_mask_mouse_pos(struct ScrArea *sa, struct ARegion *ar, const int mval[2], float co[2]); +void ED_mask_mouse_pos(struct ScrArea *sa, struct ARegion *region, const int mval[2], float co[2]); void ED_mask_point_pos( - struct ScrArea *sa, struct ARegion *ar, float x, float y, float *xr, float *yr); + struct ScrArea *sa, struct ARegion *region, float x, float y, float *xr, float *yr); void ED_mask_point_pos__reverse( - struct ScrArea *sa, struct ARegion *ar, float x, float y, float *xr, float *yr); + struct ScrArea *sa, struct ARegion *region, float x, float y, float *xr, float *yr); void ED_mask_cursor_location_get(struct ScrArea *sa, float cursor[2]); bool ED_mask_selected_minmax(const struct bContext *C, float min[2], float max[2]); @@ -64,7 +64,7 @@ void ED_operatormacros_mask(void); void ED_mask_draw(const struct bContext *C, const char draw_flag, const char draw_type); void ED_mask_draw_region(struct Depsgraph *depsgraph, struct Mask *mask, - struct ARegion *ar, + struct ARegion *region, const char draw_flag, const char draw_type, const char overlay_mode, @@ -78,7 +78,7 @@ void ED_mask_draw_region(struct Depsgraph *depsgraph, const struct bContext *C); void ED_mask_draw_frames( - struct Mask *mask, struct ARegion *ar, const int cfra, const int sfra, const int efra); + struct Mask *mask, struct ARegion *region, const int cfra, const int sfra, const int efra); /* mask_shapekey.c */ void ED_mask_layer_shape_auto_key(struct MaskLayer *mask_layer, const int frame); diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 95d6d5cab3b..6d3396bb393 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -135,7 +135,7 @@ void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag); bool BMBVH_EdgeVisible(struct BMBVHTree *tree, struct BMEdge *e, struct Depsgraph *depsgraph, - struct ARegion *ar, + struct ARegion *region, struct View3D *v3d, struct Object *obedit); @@ -296,7 +296,7 @@ void ED_keymap_mesh(struct wmKeyConfig *keyconf); /* editmesh_tools.c (could be moved) */ void EDBM_project_snap_verts(struct bContext *C, struct Depsgraph *depsgraph, - struct ARegion *ar, + struct ARegion *region, struct Object *obedit, struct BMEditMesh *em); diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index eedee9d5280..ae2b4989069 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -111,8 +111,11 @@ void ED_node_composite_job(const struct bContext *C, void ED_operatormacros_node(void); /* node_view.c */ -bool ED_space_node_color_sample( - struct Main *bmain, struct SpaceNode *snode, struct ARegion *ar, int mval[2], float r_col[3]); +bool ED_space_node_color_sample(struct Main *bmain, + struct SpaceNode *snode, + struct ARegion *region, + int mval[2], + float r_col[3]); #ifdef __cplusplus } diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 08efc99c5d6..1dd40f27fbb 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -64,75 +64,75 @@ struct wmWindowManager; /* regions */ void ED_region_do_listen(struct wmWindow *win, struct ScrArea *sa, - struct ARegion *ar, + struct ARegion *region, struct wmNotifier *note, const Scene *scene); -void ED_region_do_layout(struct bContext *C, struct ARegion *ar); -void ED_region_do_draw(struct bContext *C, struct ARegion *ar); -void ED_region_exit(struct bContext *C, struct ARegion *ar); -void ED_region_remove(struct bContext *C, struct ScrArea *sa, struct ARegion *ar); -void ED_region_pixelspace(struct ARegion *ar); -void ED_region_update_rect(struct ARegion *ar); -void ED_region_floating_initialize(struct ARegion *ar); -void ED_region_tag_redraw(struct ARegion *ar); -void ED_region_tag_redraw_partial(struct ARegion *ar, const struct rcti *rct, bool rebuild); -void ED_region_tag_redraw_cursor(struct ARegion *ar); -void ED_region_tag_redraw_no_rebuild(struct ARegion *ar); -void ED_region_tag_refresh_ui(struct ARegion *ar); -void ED_region_tag_redraw_editor_overlays(struct ARegion *ar); - -void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *ar); +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_pixelspace(struct ARegion *region); +void ED_region_update_rect(struct ARegion *region); +void ED_region_floating_initialize(struct ARegion *region); +void ED_region_tag_redraw(struct ARegion *region); +void ED_region_tag_redraw_partial(struct ARegion *region, const struct rcti *rct, bool rebuild); +void ED_region_tag_redraw_cursor(struct ARegion *region); +void ED_region_tag_redraw_no_rebuild(struct ARegion *region); +void ED_region_tag_refresh_ui(struct ARegion *region); +void ED_region_tag_redraw_editor_overlays(struct ARegion *region); + +void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *region); void ED_region_panels_ex(const struct bContext *C, - struct ARegion *ar, + struct ARegion *region, const char *contexts[], int contextnr, const bool vertical); -void ED_region_panels(const struct bContext *C, struct ARegion *ar); +void ED_region_panels(const struct bContext *C, struct ARegion *region); void ED_region_panels_layout_ex(const struct bContext *C, - struct ARegion *ar, + struct ARegion *region, struct ListBase *paneltypes, const char *contexts[], int contextnr, const bool vertical, const char *category_override); -void ED_region_panels_layout(const struct bContext *C, struct ARegion *ar); -void ED_region_panels_draw(const struct bContext *C, struct ARegion *ar); +void ED_region_panels_layout(const struct bContext *C, struct ARegion *region); +void ED_region_panels_draw(const struct bContext *C, struct ARegion *region); -void ED_region_header_init(struct ARegion *ar); -void ED_region_header(const struct bContext *C, struct ARegion *ar); -void ED_region_header_layout(const struct bContext *C, struct ARegion *ar); -void ED_region_header_draw(const struct bContext *C, struct ARegion *ar); +void ED_region_header_init(struct ARegion *region); +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 *ar); -void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar); +void ED_region_cursor_set(struct wmWindow *win, struct ScrArea *sa, 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 ARegion *ar); + struct ARegion *region); /* screen_ops.c */ void ED_region_visibility_change_update_animated(struct bContext *C, struct ScrArea *sa, - struct ARegion *ar); + struct ARegion *region); -void ED_region_info_draw(struct ARegion *ar, +void ED_region_info_draw(struct ARegion *region, const char *text, float fill_color[4], const bool full_redraw); -void ED_region_info_draw_multiline(ARegion *ar, +void ED_region_info_draw_multiline(ARegion *region, const char *text_array[], float fill_color[4], const bool full_redraw); void ED_region_image_metadata_draw( int x, int y, struct ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy); void ED_region_image_metadata_panel_draw(struct ImBuf *ibuf, struct uiLayout *layout); -void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy, float x0, float y0); -float ED_region_blend_alpha(struct ARegion *ar); -void ED_region_visible_rect_calc(struct ARegion *ar, struct rcti *rect); -const rcti *ED_region_visible_rect(ARegion *ar); +void ED_region_grid_draw(struct ARegion *region, float zoomx, float zoomy, float x0, float y0); +float ED_region_blend_alpha(struct ARegion *region); +void ED_region_visible_rect_calc(struct ARegion *region, struct rcti *rect); +const rcti *ED_region_visible_rect(ARegion *region); bool ED_region_is_overlap(int spacetype, int regiontype); -int ED_region_snap_size_test(const struct ARegion *ar); -bool ED_region_snap_size_apply(struct ARegion *ar, int snap_flag); +int ED_region_snap_size_test(const struct ARegion *region); +bool ED_region_snap_size_apply(struct ARegion *region, int snap_flag); /* message_bus callbacks */ void ED_region_do_msg_notify_tag_redraw(struct bContext *C, @@ -147,14 +147,14 @@ void ED_area_do_mgs_subscribe_for_tool_header(const struct bContext *C, struct Scene *scene, struct bScreen *screen, struct ScrArea *sa, - struct ARegion *ar, + 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 ARegion *ar, + struct ARegion *region, struct wmMsgBus *mbus); /* message bus */ @@ -163,7 +163,7 @@ void ED_region_message_subscribe(struct bContext *C, struct Scene *scene, struct bScreen *screen, struct ScrArea *sa, - struct ARegion *ar, + struct ARegion *region, struct wmMsgBus *mbus); /* spaces */ @@ -409,10 +409,13 @@ void ED_screen_user_menu_register(void); /* Cache display helpers */ -void ED_region_cache_draw_background(struct ARegion *ar); +void ED_region_cache_draw_background(struct ARegion *region); void ED_region_cache_draw_curfra_label(const int framenr, const float x, const float y); -void ED_region_cache_draw_cached_segments( - struct ARegion *ar, const int num_segments, const int *points, const int sfra, const int efra); +void ED_region_cache_draw_cached_segments(struct ARegion *region, + const int num_segments, + const int *points, + const int sfra, + const int efra); /* area_utils.c */ void ED_region_generic_tools_region_message_subscribe(const struct bContext *C, @@ -420,24 +423,28 @@ void ED_region_generic_tools_region_message_subscribe(const struct bContext *C, struct Scene *scene, struct bScreen *screen, struct ScrArea *sa, - struct ARegion *ar, + struct ARegion *region, struct wmMsgBus *mbus); -int ED_region_generic_tools_region_snap_size(const struct ARegion *ar, int size, int axis); +int ED_region_generic_tools_region_snap_size(const struct ARegion *region, int size, int axis); /* area_query.c */ -bool ED_region_overlap_isect_x(const ARegion *ar, const int event_x); -bool ED_region_overlap_isect_y(const ARegion *ar, const int event_y); -bool ED_region_overlap_isect_xy(const ARegion *ar, const int event_xy[2]); -bool ED_region_overlap_isect_x_with_margin(const ARegion *ar, const int event_x, const int margin); -bool ED_region_overlap_isect_y_with_margin(const ARegion *ar, const int event_y, const int margin); -bool ED_region_overlap_isect_xy_with_margin(const ARegion *ar, +bool ED_region_overlap_isect_x(const ARegion *region, const int event_x); +bool ED_region_overlap_isect_y(const ARegion *region, const int event_y); +bool ED_region_overlap_isect_xy(const ARegion *region, const int event_xy[2]); +bool ED_region_overlap_isect_x_with_margin(const ARegion *region, + const int event_x, + const int margin); +bool ED_region_overlap_isect_y_with_margin(const ARegion *region, + const int event_y, + const int margin); +bool ED_region_overlap_isect_xy_with_margin(const ARegion *region, const int event_xy[2], const int margin); -bool ED_region_panel_category_gutter_calc_rect(const ARegion *ar, rcti *r_ar_gutter); -bool ED_region_panel_category_gutter_isect_xy(const ARegion *ar, const int event_xy[2]); +bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_ar_gutter); +bool ED_region_panel_category_gutter_isect_xy(const ARegion *region, const int event_xy[2]); -bool ED_region_contains_xy(const struct ARegion *ar, const int event_xy[2]); +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); diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h index 2c2c1f8b27d..06c2c3039f5 100644 --- a/source/blender/editors/include/ED_screen_types.h +++ b/source/blender/editors/include/ED_screen_types.h @@ -32,7 +32,7 @@ extern "C" { /* for animplayer */ typedef struct ScreenAnimData { - ARegion *ar; /* do not read from this, only for comparing if region exists */ + ARegion *region; /* do not read from this, only for comparing if region exists */ short redraws; short flag; /* flags for playback */ int sfra; /* frame that playback was started from */ @@ -95,7 +95,7 @@ typedef enum { /* for editing areas/regions */ typedef struct AZone { struct AZone *next, *prev; - ARegion *ar; + ARegion *region; int type; union { diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index cac1621962e..26871cf8dd0 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -37,7 +37,7 @@ struct rcti; /* sculpt.c */ void ED_operatortypes_sculpt(void); -void ED_sculpt_redraw_planes_get(float planes[4][4], struct ARegion *ar, struct Object *ob); +void ED_sculpt_redraw_planes_get(float planes[4][4], struct ARegion *region, struct Object *ob); bool ED_sculpt_mask_box_select(struct bContext *C, struct ViewContext *vc, const struct rcti *rect, diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index 9005ce1b3a5..ae4add2fca2 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -76,7 +76,9 @@ void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int); void ED_region_draw_cb_exit(struct ARegionType *, void *); /* generic callbacks */ /* ed_util.c */ -void ED_region_draw_mouse_line_cb(const struct bContext *C, struct ARegion *ar, void *arg_info); +void ED_region_draw_mouse_line_cb(const struct bContext *C, + struct ARegion *region, + void *arg_info); #ifdef __cplusplus } diff --git a/source/blender/editors/include/ED_text.h b/source/blender/editors/include/ED_text.h index 98370b34665..4f7b76675f0 100644 --- a/source/blender/editors/include/ED_text.h +++ b/source/blender/editors/include/ED_text.h @@ -36,7 +36,7 @@ struct UndoType; struct bContext; bool ED_text_region_location_from_cursor(struct SpaceText *st, - struct ARegion *ar, + struct ARegion *region, const int cursor_co[2], int r_pixel_co[2]); diff --git a/source/blender/editors/include/ED_time_scrub_ui.h b/source/blender/editors/include/ED_time_scrub_ui.h index 0bcc39847c4..d5b9fa2a553 100644 --- a/source/blender/editors/include/ED_time_scrub_ui.h +++ b/source/blender/editors/include/ED_time_scrub_ui.h @@ -32,15 +32,15 @@ struct bContext; struct bDopeSheet; struct wmEvent; -void ED_time_scrub_draw(const struct ARegion *ar, +void ED_time_scrub_draw(const struct ARegion *region, const struct Scene *scene, bool display_seconds, bool discrete_frames); -bool ED_time_scrub_event_in_region(const struct ARegion *ar, const struct wmEvent *event); +bool ED_time_scrub_event_in_region(const struct ARegion *region, const struct wmEvent *event); void ED_time_scrub_channel_search_draw(const struct bContext *C, - struct ARegion *ar, + struct ARegion *region, struct bDopeSheet *dopesheet); #ifdef __cplusplus diff --git a/source/blender/editors/include/ED_transform_snap_object_context.h b/source/blender/editors/include/ED_transform_snap_object_context.h index 1277e01859d..34f2bf8361a 100644 --- a/source/blender/editors/include/ED_transform_snap_object_context.h +++ b/source/blender/editors/include/ED_transform_snap_object_context.h @@ -86,7 +86,7 @@ SnapObjectContext *ED_transform_snap_object_context_create_view3d(struct Main *b struct Depsgraph *depsgraph, int flag, /* extra args for view3d */ - const struct ARegion *ar, + const struct ARegion *region, const struct View3D *v3d); void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx); diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index 1671d220d81..511b33bacc5 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -199,7 +199,7 @@ void ED_uvedit_live_unwrap(const struct Scene *scene, struct Object **objects, i void ED_uvedit_add_simple_uvs(struct Main *bmain, const struct Scene *scene, struct Object *ob); /* uvedit_draw.c */ -void ED_image_draw_cursor(struct ARegion *ar, const float cursor[2]); +void ED_image_draw_cursor(struct ARegion *region, const float cursor[2]); void ED_uvedit_draw_main(struct SpaceImage *sima, const struct Scene *scene, struct ViewLayer *view_layer, diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 9627e7d7617..7b9e4cfe7bf 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -83,7 +83,7 @@ typedef struct ViewContext { struct ViewLayer *view_layer; struct Object *obact; struct Object *obedit; - struct ARegion *ar; + struct ARegion *region; struct View3D *v3d; struct wmWindow *win; struct RegionView3D *rv3d; @@ -93,7 +93,7 @@ typedef struct ViewContext { typedef struct ViewDepths { unsigned short w, h; - short x, y; /* only for temp use for sub-rects, added to ar->winx/y */ + short x, y; /* only for temp use for sub-rects, added to region->winx/y */ float *depths; double depth_range[2]; @@ -105,7 +105,7 @@ typedef struct ViewDrawOffscreenContext { struct Scene *scene; int drawtype; struct View3D *v3d; - struct ARegion *ar; + struct ARegion *region; int winx; int winy; float viewmat[4][4]; @@ -160,12 +160,12 @@ void ED_view3d_to_object(const struct Depsgraph *depsgraph, void ED_view3d_lastview_store(struct RegionView3D *rv3d); /* Depth buffer */ -void ED_view3d_depth_update(struct ARegion *ar); +void ED_view3d_depth_update(struct ARegion *region); float ED_view3d_depth_read_cached(const struct ViewContext *vc, const int mval[2]); bool ED_view3d_depth_read_cached_normal(const ViewContext *vc, const int mval[2], float r_normal[3]); -bool ED_view3d_depth_unproject(const struct ARegion *ar, +bool ED_view3d_depth_unproject(const struct ARegion *region, const int mval[2], const double depth, float r_location_world[3]); @@ -278,61 +278,61 @@ void pose_foreachScreenBone(struct ViewContext *vc, /* *** end iterators *** */ /* view3d_project.c */ -void ED_view3d_project_float_v2_m4(const struct ARegion *ar, +void ED_view3d_project_float_v2_m4(const struct ARegion *region, const float co[3], float r_co[2], float mat[4][4]); -void ED_view3d_project_float_v3_m4(const struct ARegion *ar, +void ED_view3d_project_float_v3_m4(const struct ARegion *region, const float co[3], float r_co[3], float mat[4][4]); -eV3DProjStatus ED_view3d_project_base(const struct ARegion *ar, struct Base *base); +eV3DProjStatus ED_view3d_project_base(const struct ARegion *region, struct Base *base); /* *** short *** */ -eV3DProjStatus ED_view3d_project_short_ex(const struct ARegion *ar, +eV3DProjStatus ED_view3d_project_short_ex(const struct ARegion *region, float perspmat[4][4], const bool is_local, const float co[3], short r_co[2], const eV3DProjTest flag); -eV3DProjStatus ED_view3d_project_short_global(const struct ARegion *ar, +eV3DProjStatus ED_view3d_project_short_global(const struct ARegion *region, const float co[3], short r_co[2], const eV3DProjTest flag); -eV3DProjStatus ED_view3d_project_short_object(const struct ARegion *ar, +eV3DProjStatus ED_view3d_project_short_object(const struct ARegion *region, const float co[3], short r_co[2], const eV3DProjTest flag); /* *** int *** */ -eV3DProjStatus ED_view3d_project_int_ex(const struct ARegion *ar, +eV3DProjStatus ED_view3d_project_int_ex(const struct ARegion *region, float perspmat[4][4], const bool is_local, const float co[3], int r_co[2], const eV3DProjTest flag); -eV3DProjStatus ED_view3d_project_int_global(const struct ARegion *ar, +eV3DProjStatus ED_view3d_project_int_global(const struct ARegion *region, const float co[3], int r_co[2], const eV3DProjTest flag); -eV3DProjStatus ED_view3d_project_int_object(const struct ARegion *ar, +eV3DProjStatus ED_view3d_project_int_object(const struct ARegion *region, const float co[3], int r_co[2], const eV3DProjTest flag); /* *** float *** */ -eV3DProjStatus ED_view3d_project_float_ex(const struct ARegion *ar, +eV3DProjStatus ED_view3d_project_float_ex(const struct ARegion *region, float perspmat[4][4], const bool is_local, const float co[3], float r_co[2], const eV3DProjTest flag); -eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *ar, +eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *region, const float co[3], float r_co[2], const eV3DProjTest flag); -eV3DProjStatus ED_view3d_project_float_object(const struct ARegion *ar, +eV3DProjStatus ED_view3d_project_float_object(const struct ARegion *region, const float co[3], float r_co[2], const eV3DProjTest flag); @@ -343,21 +343,21 @@ float ED_view3d_pixel_size_no_ui_scale(const struct RegionView3D *rv3d, const fl float ED_view3d_calc_zfac(const struct RegionView3D *rv3d, const float co[3], bool *r_flip); bool ED_view3d_clip_segment(const struct RegionView3D *rv3d, float ray_start[3], float ray_end[3]); bool ED_view3d_win_to_ray_clipped(struct Depsgraph *depsgraph, - const struct ARegion *ar, + const struct ARegion *region, const struct View3D *v3d, const float mval[2], float ray_start[3], float ray_normal[3], const bool do_clip); bool ED_view3d_win_to_ray_clipped_ex(struct Depsgraph *depsgraph, - const struct ARegion *ar, + const struct ARegion *region, const struct View3D *v3d, const float mval[2], float r_ray_co[3], float r_ray_normal[3], float r_ray_start[3], bool do_clip); -void ED_view3d_win_to_ray(const struct ARegion *ar, +void ED_view3d_win_to_ray(const struct ARegion *region, const float mval[2], float r_ray_start[3], float r_ray_normal[3]); @@ -365,33 +365,33 @@ void ED_view3d_global_to_vector(const struct RegionView3D *rv3d, const float coord[3], float vec[3]); void ED_view3d_win_to_3d(const struct View3D *v3d, - const struct ARegion *ar, + const struct ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3]); void ED_view3d_win_to_3d_int(const struct View3D *v3d, - const struct ARegion *ar, + const struct ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3]); -bool ED_view3d_win_to_3d_on_plane(const struct ARegion *ar, +bool ED_view3d_win_to_3d_on_plane(const struct ARegion *region, const float plane[4], const float mval[2], const bool do_clip, float r_out[3]); -bool ED_view3d_win_to_3d_on_plane_int(const struct ARegion *ar, +bool ED_view3d_win_to_3d_on_plane_int(const struct ARegion *region, const float plane[4], const int mval[2], const bool do_clip, float r_out[3]); -void ED_view3d_win_to_delta(const struct ARegion *ar, +void ED_view3d_win_to_delta(const struct ARegion *region, const float mval[2], float out[3], const float zfac); -void ED_view3d_win_to_origin(const struct ARegion *ar, const float mval[2], float out[3]); -void ED_view3d_win_to_vector(const struct ARegion *ar, const float mval[2], float out[3]); +void ED_view3d_win_to_origin(const struct ARegion *region, const float mval[2], float out[3]); +void ED_view3d_win_to_vector(const struct ARegion *region, const float mval[2], float out[3]); bool ED_view3d_win_to_segment_clipped(struct Depsgraph *depsgraph, - const struct ARegion *ar, + const struct ARegion *region, struct View3D *v3d, const float mval[2], float r_ray_start[3], @@ -404,9 +404,9 @@ void ED_view3d_ob_project_mat_get_from_obmat(const struct RegionView3D *rv3d, float obmat[4][4], float pmat[4][4]); -void ED_view3d_project(const struct ARegion *ar, const float world[3], float region[3]); +void ED_view3d_project(const struct ARegion *region, const float world[3], float r_region_co[3]); bool ED_view3d_unproject( - const struct ARegion *ar, float regionx, float regiony, float regionz, float world[3]); + const struct ARegion *region, float regionx, float regiony, float regionz, float world[3]); /* end */ @@ -431,21 +431,21 @@ void ED_view3d_polygon_offset(const struct RegionView3D *rv3d, const float dist) void ED_view3d_calc_camera_border(const struct Scene *scene, struct Depsgraph *depsgraph, - const struct ARegion *ar, + const struct ARegion *region, const struct View3D *v3d, const struct RegionView3D *rv3d, struct rctf *r_viewborder, const bool no_shift); void ED_view3d_calc_camera_border_size(const struct Scene *scene, struct Depsgraph *depsgraph, - const struct ARegion *ar, + const struct ARegion *region, const struct View3D *v3d, const struct RegionView3D *rv3d, float r_size[2]); bool ED_view3d_calc_render_border(const struct Scene *scene, struct Depsgraph *depsgraph, struct View3D *v3d, - struct ARegion *ar, + struct ARegion *region, struct rcti *rect); void ED_view3d_clipping_calc_from_boundbox(float clip[6][4], @@ -453,7 +453,7 @@ void ED_view3d_clipping_calc_from_boundbox(float clip[6][4], const bool is_flip); void ED_view3d_clipping_calc(struct BoundBox *bb, float planes[4][4], - const struct ARegion *ar, + const struct ARegion *region, const struct Object *ob, const struct rcti *rect); void ED_view3d_clipping_local(struct RegionView3D *rv3d, float mat[4][4]); @@ -467,7 +467,7 @@ void ED_view3d_clipping_disable(void); float ED_view3d_radius_to_dist_persp(const float angle, const float radius); float ED_view3d_radius_to_dist_ortho(const float lens, const float radius); float ED_view3d_radius_to_dist(const struct View3D *v3d, - const struct ARegion *ar, + const struct ARegion *region, const struct Depsgraph *depsgraph, const char persp, const bool use_aspect, @@ -477,12 +477,12 @@ void imm_drawcircball(const float cent[3], float rad, const float tmat[4][4], un /* backbuffer select and draw support */ void ED_view3d_backbuf_depth_validate(struct ViewContext *vc); -int ED_view3d_backbuf_sample_size_clamp(struct ARegion *ar, const float dist); +int ED_view3d_backbuf_sample_size_clamp(struct ARegion *region, const float dist); void ED_view3d_select_id_validate(struct ViewContext *vc); bool ED_view3d_autodist(struct Depsgraph *depsgraph, - struct ARegion *ar, + struct ARegion *region, struct View3D *v3d, const int mval[2], float mouse_worldloc[3], @@ -491,17 +491,20 @@ bool ED_view3d_autodist(struct Depsgraph *depsgraph, /* only draw so ED_view3d_autodist_simple can be called many times after */ void ED_view3d_autodist_init(struct Depsgraph *depsgraph, - struct ARegion *ar, + struct ARegion *region, struct View3D *v3d, int mode); -bool ED_view3d_autodist_simple(struct ARegion *ar, +bool ED_view3d_autodist_simple(struct ARegion *region, const int mval[2], float mouse_worldloc[3], int margin, float *force_depth); -bool ED_view3d_autodist_depth(struct ARegion *ar, const int mval[2], int margin, float *depth); -bool ED_view3d_autodist_depth_seg( - struct ARegion *ar, const int mval_sta[2], const int mval_end[2], int margin, float *depth); +bool ED_view3d_autodist_depth(struct ARegion *region, const int mval[2], int margin, float *depth); +bool ED_view3d_autodist_depth_seg(struct ARegion *region, + const int mval_sta[2], + const int mval_end[2], + int margin, + float *depth); /* select */ #define MAXPICKELEMS 2500 @@ -545,7 +548,7 @@ void ED_view3d_viewcontext_init(struct bContext *C, struct Depsgraph *depsgraph); void ED_view3d_viewcontext_init_object(struct ViewContext *vc, struct Object *obact); void view3d_operator_needs_opengl(const struct bContext *C); -void view3d_region_operator_needs_opengl(struct wmWindow *win, struct ARegion *ar); +void view3d_region_operator_needs_opengl(struct wmWindow *win, struct ARegion *region); /* XXX should move to BLI_math */ bool edge_inside_circle(const float cent[2], @@ -584,7 +587,7 @@ bool ED_view3d_context_activate(struct bContext *C); void ED_view3d_draw_setup_view(struct wmWindow *win, struct Depsgraph *depsgraph, struct Scene *scene, - struct ARegion *ar, + struct ARegion *region, struct View3D *v3d, float viewmat[4][4], float winmat[4][4], @@ -593,11 +596,11 @@ void ED_view3d_draw_setup_view(struct wmWindow *win, 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 *ar, bool do_clip); +void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *region, bool do_clip); void ED_view3d_update_viewmat(struct Depsgraph *depsgraph, struct Scene *scene, struct View3D *v3d, - struct ARegion *ar, + struct ARegion *region, float viewmat[4][4], float winmat[4][4], const struct rcti *rect, @@ -628,7 +631,7 @@ void ED_view3d_persp_switch_from_camera(const struct Depsgraph *depsgraph, const char persp); bool ED_view3d_persp_ensure(const struct Depsgraph *depsgraph, struct View3D *v3d, - struct ARegion *ar); + struct ARegion *region); /* camera lock functions */ bool ED_view3d_camera_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d); @@ -692,7 +695,7 @@ void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, #endif /* render */ -void ED_view3d_stop_render_preview(struct wmWindowManager *wm, struct ARegion *ar); +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); #define XRAY_ALPHA(v3d) \ @@ -707,7 +710,7 @@ void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrAr /* Try avoid using these more move out of legacy. */ void ED_view3d_draw_bgpic_test(struct Scene *scene, struct Depsgraph *depsgraph, - struct ARegion *ar, + struct ARegion *region, struct View3D *v3d, const bool do_foreground, const bool do_camera_frame); @@ -720,7 +723,7 @@ void ED_view3d_gizmo_mesh_preselect_get_active(struct bContext *C, /* space_view3d.c */ void ED_view3d_buttons_region_layout_ex(const struct bContext *C, - struct ARegion *ar, + struct ARegion *region, const char *category_override); /* view3d_view.c */ diff --git a/source/blender/editors/include/ED_view3d_offscreen.h b/source/blender/editors/include/ED_view3d_offscreen.h index 7d51a8c7ece..359c55d89a5 100644 --- a/source/blender/editors/include/ED_view3d_offscreen.h +++ b/source/blender/editors/include/ED_view3d_offscreen.h @@ -46,7 +46,7 @@ void ED_view3d_draw_offscreen(struct Depsgraph *depsgraph, struct Scene *scene, eDrawType drawtype, struct View3D *v3d, - struct ARegion *ar, + struct ARegion *region, int winx, int winy, float viewmat[4][4], @@ -62,7 +62,7 @@ struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Depsgraph *depsgraph, struct Scene *scene, eDrawType drawtype, struct View3D *v3d, - struct ARegion *ar, + struct ARegion *region, int sizex, int sizey, eImBufFlags imbuf_flag, diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index e83582b19d0..277f330ad50 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -604,7 +604,7 @@ struct uiLayout *UI_pie_menu_layout(struct uiPieMenu *pie); * * Functions used to create popup blocks. These are like popup menus * but allow using all button types and creating an own layout. */ -typedef uiBlock *(*uiBlockCreateFunc)(struct bContext *C, struct ARegion *ar, void *arg1); +typedef uiBlock *(*uiBlockCreateFunc)(struct bContext *C, struct ARegion *region, void *arg1); typedef void (*uiBlockCancelFunc)(struct bContext *C, void *arg1); void UI_popup_block_invoke(struct bContext *C, @@ -728,16 +728,19 @@ void UI_but_type_set_menu_from_pulldown(uiBut *but); /* special button case, only draw it when used actively, for outliner etc */ bool UI_but_active_only_ex(const struct bContext *C, - struct ARegion *ar, + struct ARegion *region, uiBlock *block, uiBut *but, const bool remove_on_failure); -bool UI_but_active_only(const struct bContext *C, struct ARegion *ar, uiBlock *block, uiBut *but); +bool UI_but_active_only(const struct bContext *C, + struct ARegion *region, + uiBlock *block, + uiBut *but); bool UI_block_active_only_flagged_buttons(const struct bContext *C, - struct ARegion *ar, + struct ARegion *region, struct uiBlock *block); -void UI_but_execute(const struct bContext *C, struct ARegion *ar, uiBut *but); +void UI_but_execute(const struct bContext *C, struct ARegion *region, uiBut *but); bool UI_but_online_manual_id(const uiBut *but, char *r_str, @@ -1599,7 +1602,7 @@ void UI_but_tooltip_refresh(struct bContext *C, uiBut *but); void UI_but_tooltip_timer_remove(struct bContext *C, uiBut *but); bool UI_textbutton_activate_rna(const struct bContext *C, - struct ARegion *ar, + struct ARegion *region, const void *rna_poin_data, const char *rna_prop_id); bool UI_textbutton_activate_but(const struct bContext *C, uiBut *but); @@ -1637,42 +1640,43 @@ int UI_autocomplete_end(AutoComplete *autocpl, char *autoname); * could use a good cleanup, though how they will function in 2.5 is * not clear yet so we postpone that. */ -void UI_panels_begin(const struct bContext *C, struct ARegion *ar); -void UI_panels_end(const struct bContext *C, struct ARegion *ar, int *r_x, int *r_y); -void UI_panels_draw(const struct bContext *C, struct ARegion *ar); +void UI_panels_begin(const struct bContext *C, struct ARegion *region); +void UI_panels_end(const struct bContext *C, struct ARegion *region, int *r_x, int *r_y); +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 ARegion *ar, + 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, - const struct ARegion *ar, + const struct ARegion *region, uiBlock *block, int width, int height, bool open); -void UI_panels_scale(struct ARegion *ar, float new_width); +void UI_panels_scale(struct ARegion *region, float new_width); void UI_panel_label_offset(struct uiBlock *block, int *r_x, int *r_y); int UI_panel_size_y(const struct Panel *pa); -bool UI_panel_category_is_visible(const struct ARegion *ar); -void UI_panel_category_add(struct ARegion *ar, const char *name); -struct PanelCategoryDyn *UI_panel_category_find(struct ARegion *ar, const char *idname); -struct PanelCategoryStack *UI_panel_category_active_find(struct ARegion *ar, const char *idname); -const char *UI_panel_category_active_get(struct ARegion *ar, bool set_fallback); -void UI_panel_category_active_set(struct ARegion *ar, const char *idname); -void UI_panel_category_active_set_default(struct ARegion *ar, const char *idname); -struct PanelCategoryDyn *UI_panel_category_find_mouse_over_ex(struct ARegion *ar, +bool UI_panel_category_is_visible(const struct ARegion *region); +void UI_panel_category_add(struct ARegion *region, const char *name); +struct PanelCategoryDyn *UI_panel_category_find(struct ARegion *region, const char *idname); +struct PanelCategoryStack *UI_panel_category_active_find(struct ARegion *region, + const char *idname); +const char *UI_panel_category_active_get(struct ARegion *region, bool set_fallback); +void UI_panel_category_active_set(struct ARegion *region, const char *idname); +void UI_panel_category_active_set_default(struct ARegion *region, const char *idname); +struct PanelCategoryDyn *UI_panel_category_find_mouse_over_ex(struct ARegion *region, const int x, const int y); -struct PanelCategoryDyn *UI_panel_category_find_mouse_over(struct ARegion *ar, +struct PanelCategoryDyn *UI_panel_category_find_mouse_over(struct ARegion *region, const struct wmEvent *event); -void UI_panel_category_clear_all(struct ARegion *ar); -void UI_panel_category_draw_all(struct ARegion *ar, const char *category_id_active); +void UI_panel_category_clear_all(struct ARegion *region); +void UI_panel_category_draw_all(struct ARegion *region, const char *category_id_active); struct PanelType *UI_paneltype_find(int space_id, int region_id, const char *idname); @@ -1805,7 +1809,7 @@ uiLayout *UI_block_layout(uiBlock *block, void UI_block_layout_set_current(uiBlock *block, uiLayout *layout); void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y); -void UI_region_message_subscribe(struct ARegion *ar, struct wmMsgBus *mbus); +void UI_region_message_subscribe(struct ARegion *region, struct wmMsgBus *mbus); uiBlock *uiLayoutGetBlock(uiLayout *layout); @@ -2376,8 +2380,8 @@ void UI_context_active_but_prop_get_templateID(struct bContext *C, struct PropertyRNA **r_prop); struct ID *UI_context_active_but_get_tab_ID(struct bContext *C); -uiBut *UI_region_active_but_get(struct ARegion *ar); -uiBut *UI_region_but_find_rect_over(const struct ARegion *ar, const struct rcti *isect); +uiBut *UI_region_active_but_get(struct ARegion *region); +uiBut *UI_region_but_find_rect_over(const struct ARegion *region, const struct rcti *isect); /* uiFontStyle.align */ typedef enum eFontStyle_Align { @@ -2454,7 +2458,7 @@ struct ARegion *UI_tooltip_create_from_button(struct bContext *C, uiBut *but, bool is_label); struct ARegion *UI_tooltip_create_from_gizmo(struct bContext *C, struct wmGizmo *gz); -void UI_tooltip_free(struct bContext *C, struct bScreen *sc, struct ARegion *ar); +void UI_tooltip_free(struct bContext *C, struct bScreen *sc, struct ARegion *region); /* How long before a tool-tip shows. */ #define UI_TOOLTIP_DELAY 0.5 diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 17d950f5e40..ecdae3ead6b 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -133,7 +133,7 @@ void UI_view2d_zoom_cache_reset(void); /* view matrix operations */ void UI_view2d_view_ortho(const struct View2D *v2d); -void UI_view2d_view_orthoSpecial(struct ARegion *ar, struct View2D *v2d, const bool xaxis); +void UI_view2d_view_orthoSpecial(struct ARegion *region, struct View2D *v2d, const bool xaxis); void UI_view2d_view_restore(const struct bContext *C); /* grid drawing */ @@ -158,21 +158,21 @@ float UI_view2d_grid_resolution_x__frames_or_seconds(const struct View2D *v2d, float UI_view2d_grid_resolution_y__values(const struct View2D *v2d); /* scale indicator text drawing */ -void UI_view2d_draw_scale_y__values(const struct ARegion *ar, +void UI_view2d_draw_scale_y__values(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, int colorid); -void UI_view2d_draw_scale_y__block(const struct ARegion *ar, +void UI_view2d_draw_scale_y__block(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, int colorid); -void UI_view2d_draw_scale_x__discrete_frames_or_seconds(const struct ARegion *ar, +void UI_view2d_draw_scale_x__discrete_frames_or_seconds(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, const struct Scene *scene, bool display_seconds, int colorid); -void UI_view2d_draw_scale_x__frames_or_seconds(const struct ARegion *ar, +void UI_view2d_draw_scale_x__frames_or_seconds(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, const struct Scene *scene, @@ -236,16 +236,16 @@ void UI_view2d_center_set(struct View2D *v2d, float x, float y); void UI_view2d_offset(struct View2D *v2d, float xfac, float yfac); char UI_view2d_mouse_in_scrollers_ex( - const struct ARegion *ar, const struct View2D *v2d, int x, int y, int *r_scroll); -char UI_view2d_mouse_in_scrollers(const struct ARegion *ar, + const struct ARegion *region, const struct View2D *v2d, int x, int y, int *r_scroll); +char UI_view2d_mouse_in_scrollers(const struct ARegion *region, const struct View2D *v2d, int x, int y); -char UI_view2d_rect_in_scrollers_ex(const struct ARegion *ar, +char UI_view2d_rect_in_scrollers_ex(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, int *r_scroll); -char UI_view2d_rect_in_scrollers(const struct ARegion *ar, +char UI_view2d_rect_in_scrollers(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect); @@ -257,14 +257,14 @@ void UI_view2d_text_cache_add_rectf(struct View2D *v2d, const char *str, size_t str_len, const char col[4]); -void UI_view2d_text_cache_draw(struct ARegion *ar); +void UI_view2d_text_cache_draw(struct ARegion *region); /* operators */ void ED_operatortypes_view2d(void); void ED_keymap_view2d(struct wmKeyConfig *keyconf); void UI_view2d_smooth_view(struct bContext *C, - struct ARegion *ar, + struct ARegion *region, const struct rctf *cur, const int smooth_viewtx); |