clipboard: include mime types in SDL_ClipboarUpdate

This patch modifies the clipboard handling so that when we receive an external
clipboard update, the suppported mime types are included in the SDL_ClipboarUpdate
event. The patch also introduces the owner field that allows to know if the update
is because we own the clipboard (internal update) or if it was an external update.
This commit is contained in:
David Fort
2024-10-02 21:19:42 +02:00
committed by Sam Lantinga
parent 2880b40e33
commit e00b1fdd67
18 changed files with 256 additions and 66 deletions

View File

@@ -845,6 +845,9 @@ typedef struct SDL_ClipboardEvent
SDL_EventType type; /**< SDL_EVENT_CLIPBOARD_UPDATE */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
bool owner; /**< are we owning the clipboard (internal update) */
Sint32 n_mime_types; /**< number of mime types */
const char **mime_types; /**< current mime types */
} SDL_ClipboardEvent;
/**