summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2021-05-19 07:39:40 +0200
committerGerd Hoffmann <kraxel@redhat.com>2021-05-21 09:42:44 +0200
commitd11ebe2ca257769337118d3b0ff3f76ea4928018 (patch)
treecea1b41349fd55cc587af847863d6e43833c1a05 /include
parent5f692f57843d33aa32dc58de76286a7a86ada4c1 (diff)
downloadfocaccia-qemu-d11ebe2ca257769337118d3b0ff3f76ea4928018.tar.gz
focaccia-qemu-d11ebe2ca257769337118d3b0ff3f76ea4928018.zip
ui/gtk: add clipboard support
This patch adds clipboard support to the qemu gtk ui.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20210519053940.1888907-1-kraxel@redhat.com
Message-Id: <20210519053940.1888907-10-kraxel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/ui/gtk.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/ui/gtk.h b/include/ui/gtk.h
index 6e75179404..9516670ebc 100644
--- a/include/ui/gtk.h
+++ b/include/ui/gtk.h
@@ -18,6 +18,7 @@
 #include <gdk/gdkwayland.h>
 #endif
 
+#include "ui/clipboard.h"
 #include "ui/console.h"
 #include "ui/kbd-state.h"
 #if defined(CONFIG_OPENGL)
@@ -137,6 +138,12 @@ struct GtkDisplayState {
 
     bool external_pause_update;
 
+    QemuClipboardPeer cbpeer;
+    QemuClipboardInfo *cbinfo[QEMU_CLIPBOARD_SELECTION__COUNT];
+    uint32_t cbpending[QEMU_CLIPBOARD_SELECTION__COUNT];
+    GtkClipboard *gtkcb[QEMU_CLIPBOARD_SELECTION__COUNT];
+    bool cbowner[QEMU_CLIPBOARD_SELECTION__COUNT];
+
     DisplayOptions *opts;
 };
 
@@ -207,4 +214,7 @@ void gtk_gl_area_init(void);
 int gd_gl_area_make_current(DisplayChangeListener *dcl,
                             QEMUGLContext ctx);
 
+/* gtk-clipboard.c */
+void gd_clipboard_init(GtkDisplayState *gd);
+
 #endif /* UI_GTK_H */