diff options
Diffstat (limited to 'intern/ghost/GHOST_Types.h')
-rw-r--r-- | intern/ghost/GHOST_Types.h | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 01a0a7652aa..e578d66655b 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -44,6 +44,16 @@ GHOST_DECLARE_HANDLE(GHOST_XrContextHandle); typedef void (*GHOST_TBacktraceFn)(void *file_handle); +/** + * A reference to cursor bitmap data. + */ +typedef struct { + /** `RGBA` bytes. */ + const uint8_t *data; + int data_size[2]; + int hot_spot[2]; +} GHOST_CursorBitmapRef; + typedef struct { int flags; } GHOST_GLSettings; @@ -51,7 +61,6 @@ typedef struct { typedef enum { GHOST_glStereoVisual = (1 << 0), GHOST_glDebugContext = (1 << 1), - GHOST_glAlphaBackground = (1 << 2), } GHOST_GLFlags; typedef enum GHOST_DialogOptions { @@ -113,8 +122,8 @@ typedef enum { GHOST_kModifierKeyLeftControl, GHOST_kModifierKeyRightControl, GHOST_kModifierKeyOS, - GHOST_kModifierKeyNumMasks -} GHOST_TModifierKeyMask; + GHOST_kModifierKeyNum +} GHOST_TModifierKey; typedef enum { GHOST_kWindowStateNormal = 0, @@ -153,8 +162,8 @@ typedef enum { /* Trackballs and programmable buttons. */ GHOST_kButtonMaskButton6, GHOST_kButtonMaskButton7, - GHOST_kButtonNumMasks -} GHOST_TButtonMask; + GHOST_kButtonNum +} GHOST_TButton; typedef enum { GHOST_kEventUnknown = 0, @@ -409,9 +418,9 @@ typedef enum { typedef enum { /** Axis that cursor grab will wrap. */ - GHOST_kGrabAxisNone = 0, + GHOST_kAxisNone = 0, GHOST_kAxisX = (1 << 0), - GHOST_kGrabAxisY = (1 << 1), + GHOST_kAxisY = (1 << 1), } GHOST_TAxisFlag; typedef void *GHOST_TEventDataPtr; @@ -427,7 +436,7 @@ typedef struct { typedef struct { /** The mask of the mouse button. */ - GHOST_TButtonMask button; + GHOST_TButton button; /** Associated tablet data. */ GHOST_TabletData tablet; } GHOST_TEventButtonData; @@ -537,21 +546,15 @@ typedef struct { /** The key code. */ GHOST_TKey key; - /* ascii / utf8: both should always be set when possible, - * - ascii may be '\0' however if the user presses a non ascii key - * - unicode may not be set if the system has no unicode support - * - * These values are intended to be used as follows. - * For text input use unicode when available, fallback to ascii. - * For areas where unicode is not needed, number input for example, always - * use ascii, unicode is ignored - campbell. - */ - /** The ascii code for the key event ('\0' if none). */ - char ascii; /** The unicode character. if the length is 6, not NULL terminated if all 6 are set. */ char utf8_buf[6]; - /** Generated by auto-repeat. */ + /** + * Enabled when the key is held (auto-repeat). + * In this case press events are sent without a corresponding release/up event. + * + * All back-ends must set this variable for correct behavior regarding repeatable keys. + */ char is_repeat; } GHOST_TEventKeyData; @@ -600,7 +603,7 @@ typedef int GHOST_TEmbedderWindowID; /** * A timer task callback routine. * \param task: The timer task object. - * \param time: The current time. + * \param time: Time since this timer started (in milliseconds). */ #ifdef __cplusplus class GHOST_ITimerTask; |