diff options
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index e9f12287d29..cdbaa2739ba 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -560,6 +560,22 @@ typedef struct wmGesture { /* ************** wmEvent ************************ */ +typedef enum eWM_EventFlag { + /** + * True if the operating system inverted the delta x/y values and resulting + * `prev_xy` values, for natural scroll direction. + * For absolute scroll direction, the delta must be negated again. + */ + WM_EVENT_SCROLL_INVERT = (1 << 0), + /** + * Generated by auto-repeat, note that this must only ever be set for keyboard events + * where `ISKEYBOARD(event->type) == true`. + * + * See #KMI_REPEAT_IGNORE for details on how key-map handling uses this. + */ + WM_EVENT_IS_REPEAT = (1 << 1), +} eWM_EventFlag; + typedef struct wmTabletData { /** 0=EVT_TABLET_NONE, 1=EVT_TABLET_STYLUS, 2=EVT_TABLET_ERASER. */ int active; @@ -616,14 +632,6 @@ typedef struct wmEvent { /** From ghost, fallback if utf8 isn't set. */ char ascii; - /** - * Generated by auto-repeat, note that this must only ever be set for keyboard events - * where `ISKEYBOARD(event->type) == true`. - * - * See #KMI_REPEAT_IGNORE for details on how key-map handling uses this. - */ - char is_repeat; - /** The previous value of `type`. */ short prev_type; /** The previous value of `val`. */ @@ -656,20 +664,14 @@ typedef struct wmEvent { /** Tablet info, available for mouse move and button events. */ wmTabletData tablet; + eWM_EventFlag flag; + /* Custom data. */ /** Custom data type, stylus, 6dof, see wm_event_types.h */ short custom; short customdata_free; - int pad2; /** Ascii, unicode, mouse-coords, angles, vectors, NDOF data, drag-drop info. */ void *customdata; - - /** - * True if the operating system inverted the delta x/y values and resulting - * `prev_xy` values, for natural scroll direction. - * For absolute scroll direction, the delta must be negated again. - */ - char is_direction_inverted; } wmEvent; /** |