Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Carlisle <carlisle.b3d@gmail.com>2021-10-21 02:49:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-21 05:15:41 +0300
commit69102786047dccdcbaee0df6307a8c3364d28fe0 (patch)
tree327a99274ee99dc576cbb2e9657f5e0c6e1c56fc /source/blender/editors/include/UI_view2d.h
parent2905b493fe5b569069d6035c9a17ed855c03fa17 (diff)
Cleanup: Use array as a parameter for event x/y functions
This change simplifies the parameter list for these functions and reduces the chance of typos mixing up array indices. Reviewed By: campbellbarton Ref D12950
Diffstat (limited to 'source/blender/editors/include/UI_view2d.h')
-rw-r--r--source/blender/editors/include/UI_view2d.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index fdfa07a7e02..13895879f01 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -249,19 +249,20 @@ 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 *region, const struct View2D *v2d, int x, int y, int *r_scroll);
+char UI_view2d_mouse_in_scrollers_ex(const struct ARegion *region,
+ const struct View2D *v2d,
+ const int xy[2],
+ int *r_scroll) ATTR_NONNULL(1, 2, 3, 4);
char UI_view2d_mouse_in_scrollers(const struct ARegion *region,
const struct View2D *v2d,
- int x,
- int y);
+ const int xy[2]) ATTR_NONNULL(1, 2, 3);
char UI_view2d_rect_in_scrollers_ex(const struct ARegion *region,
const struct View2D *v2d,
const struct rcti *rect,
- int *r_scroll);
+ int *r_scroll) ATTR_NONNULL(1, 2, 3);
char UI_view2d_rect_in_scrollers(const struct ARegion *region,
const struct View2D *v2d,
- const struct rcti *rect);
+ const struct rcti *rect) ATTR_NONNULL(1, 2, 3);
/* cached text drawing in v2d, to allow pixel-aligned draw as post process */
void UI_view2d_text_cache_add(struct View2D *v2d,
@@ -354,7 +355,8 @@ void UI_view2d_edge_pan_init(struct bContext *C,
void UI_view2d_edge_pan_reset(struct View2DEdgePanData *vpd);
/* Apply transform to view (i.e. adjust 'cur' rect). */
-void UI_view2d_edge_pan_apply(struct bContext *C, struct View2DEdgePanData *vpd, int x, int y);
+void UI_view2d_edge_pan_apply(struct bContext *C, struct View2DEdgePanData *vpd, const int xy[2])
+ ATTR_NONNULL(1, 2, 3);
/* Apply transform to view using mouse events. */
void UI_view2d_edge_pan_apply_event(struct bContext *C,