diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-30 07:17:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-30 08:02:53 +0300 |
commit | 82e8e5c871f86e65f332cdde3bd484a55e7e8572 (patch) | |
tree | ccbd4e45e339bd4c62231d12b3499bdfdeaed6e4 /source/blender/windowmanager/WM_api.h | |
parent | 2437a8b6f02144d796829a32461878ff2160c791 (diff) |
Cleanup: move click/drag events to functions
Simplifies future changes to dragging checks and avoids
each check for drag using slightly different logic.
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index de6db8876f7..7eefbb4d648 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -604,6 +604,10 @@ void WM_event_print(const struct wmEvent *event); void WM_operator_region_active_win_set(struct bContext *C); +int WM_event_drag_threshold(const struct wmEvent *event); +bool WM_event_drag_test(const struct wmEvent *event, const int prev_xy[2]); +bool WM_event_drag_test_with_delta(const struct wmEvent *event, const int delta[2]); + /* drag and drop */ struct wmDrag *WM_event_start_drag( struct bContext *C, int icon, int type, void *poin, double value, unsigned int flags); |