diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-26 15:31:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-26 15:31:48 +0300 |
commit | b29ad7c91aac1398377000c24a56038a73a3e597 (patch) | |
tree | 960a28d2f9075cb504f63747f8bef41c9e419f9b /source/blender/windowmanager/wm_cursors.h | |
parent | 3bf4610347376d326ac376e62a810e20661f1479 (diff) |
WM: clean up cursors constants and code
There was a mix of old and new constants. Now have one list of WM_CURSOR_*
cursor types, using GHOST standard cursors when available and otherwise falling
back to our custom cursors.
Ref D5197
Diffstat (limited to 'source/blender/windowmanager/wm_cursors.h')
-rw-r--r-- | source/blender/windowmanager/wm_cursors.h | 80 |
1 files changed, 36 insertions, 44 deletions
diff --git a/source/blender/windowmanager/wm_cursors.h b/source/blender/windowmanager/wm_cursors.h index 6793937c413..b5604fe23b6 100644 --- a/source/blender/windowmanager/wm_cursors.h +++ b/source/blender/windowmanager/wm_cursors.h @@ -26,22 +26,6 @@ void wm_init_cursor_data(void); -#define BC_GHOST_CURSORS 1000 - -/* old cursors */ -enum { - CURSOR_FACESEL = BC_GHOST_CURSORS, - CURSOR_WAIT, - CURSOR_EDIT, - CURSOR_X_MOVE, - CURSOR_Y_MOVE, - CURSOR_HELP, - CURSOR_STD, - CURSOR_NONE, - CURSOR_PENCIL, - CURSOR_COPY, -}; - // typedef struct BCursor_s BCursor; typedef struct BCursor { @@ -65,35 +49,43 @@ typedef struct BCursor { } BCursor; -#define SYSCURSOR 1 -enum { - BC_NW_ARROWCURSOR = 2, - BC_NS_ARROWCURSOR, - BC_EW_ARROWCURSOR, - BC_WAITCURSOR, - BC_CROSSCURSOR, - BC_EDITCROSSCURSOR, - BC_BOXSELCURSOR, - BC_KNIFECURSOR, - BC_VLOOPCURSOR, - BC_TEXTEDITCURSOR, - BC_PAINTBRUSHCURSOR, - BC_HANDCURSOR, - BC_NSEW_SCROLLCURSOR, - BC_NS_SCROLLCURSOR, - BC_EW_SCROLLCURSOR, - BC_EYEDROPPER_CURSOR, - BC_SWAPAREA_CURSOR, - BC_H_SPLITCURSOR, - BC_V_SPLITCURSOR, - BC_N_ARROWCURSOR, - BC_S_ARROWCURSOR, - BC_E_ARROWCURSOR, - BC_W_ARROWCURSOR, - BC_STOPCURSOR, +typedef enum WMCursorType { + WM_CURSOR_DEFAULT = 1, + WM_CURSOR_WAIT, + WM_CURSOR_EDIT, + WM_CURSOR_X_MOVE, + WM_CURSOR_Y_MOVE, + WM_CURSOR_COPY, + + WM_CURSOR_NW_ARROW, + WM_CURSOR_NS_ARROW, + WM_CURSOR_EW_ARROW, + WM_CURSOR_CROSS, + WM_CURSOR_EDITCROSS, + WM_CURSOR_BOXSEL, + WM_CURSOR_KNIFE, + WM_CURSOR_VERTEX_LOOP, + WM_CURSOR_TEXT_EDIT, + WM_CURSOR_PAINT_BRUSH, + WM_CURSOR_HAND, + WM_CURSOR_NSEW_SCROLL, + WM_CURSOR_NS_SCROLL, + WM_CURSOR_EW_SCROLL, + WM_CURSOR_EYEDROPPER, + WM_CURSOR_SWAP_AREA, + WM_CURSOR_H_SPLIT, + WM_CURSOR_V_SPLIT, + WM_CURSOR_N_ARROW, + WM_CURSOR_S_ARROW, + WM_CURSOR_E_ARROW, + WM_CURSOR_W_ARROW, + WM_CURSOR_STOP, + + WM_CURSOR_NONE, + /* --- ALWAYS LAST ----- */ - BC_NUMCURSORS, -}; + WM_CURSOR_NUM, +} WMCursorType; struct wmEvent; struct wmWindow; |