diff options
author | David Robillard <d@drobilla.net> | 2022-05-22 12:24:59 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-05-23 16:50:43 -0400 |
commit | 2501218801437ea413091007b535d7c097801713 (patch) | |
tree | cf938dd335f8aa9b547b458f97f05e7e18d8b9d3 /src/x11.h | |
parent | 0093196a4c624da6d7f78a909a442f2e784c37aa (diff) | |
download | pugl-2501218801437ea413091007b535d7c097801713.tar.gz pugl-2501218801437ea413091007b535d7c097801713.tar.bz2 pugl-2501218801437ea413091007b535d7c097801713.zip |
Add rich clipboard support
This implements a more powerful protocol for working with clipboards, which
supports datatype negotiation, and fixes various issues by mapping more
directly to how things work on X11.
Diffstat (limited to 'src/x11.h')
-rw-r--r-- | src/x11.h | 31 |
1 files changed, 23 insertions, 8 deletions
@@ -27,6 +27,8 @@ typedef struct { Atom NET_WM_STATE; Atom NET_WM_STATE_DEMANDS_ATTENTION; Atom NET_WM_STATE_HIDDEN; + Atom TARGETS; + Atom text_uri_list; } PuglX11Atoms; typedef struct { @@ -35,6 +37,18 @@ typedef struct { uintptr_t id; } PuglTimer; +typedef struct { + Atom selection; + Atom property; + Window source; + Atom* formats; + char** formatStrings; + unsigned long numFormats; + uint32_t acceptedFormatIndex; + Atom acceptedFormat; + PuglBlob data; +} PuglX11Clipboard; + struct PuglWorldInternalsImpl { Display* display; PuglX11Atoms atoms; @@ -49,14 +63,15 @@ struct PuglWorldInternalsImpl { }; struct PuglInternalsImpl { - XVisualInfo* vi; - Window win; - XIC xic; - PuglSurface* surface; - PuglEvent pendingConfigure; - PuglEvent pendingExpose; - int screen; - const char* cursorName; + XVisualInfo* vi; + Window win; + XIC xic; + PuglSurface* surface; + PuglEvent pendingConfigure; + PuglEvent pendingExpose; + PuglX11Clipboard clipboard; + int screen; + const char* cursorName; }; PUGL_WARN_UNUSED_RESULT |