From 498f079d2c3644b47ff5c004bc1cf93a9ba6604b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 18 Jun 2022 15:10:03 +1000 Subject: GHOST/Wayland: support displaying custom software cursors Add a method to access the custom cursor from GHOST which is used for drawing a software cursor. This means the knife tools cursor now work as expected. Although non-custom cursors are still not supported. --- intern/ghost/GHOST_Types.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'intern/ghost/GHOST_Types.h') diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 78f2b24ea78..35bde3d4413 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; -- cgit v1.2.3