From d11ebe2ca257769337118d3b0ff3f76ea4928018 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 19 May 2021 07:39:40 +0200 Subject: ui/gtk: add clipboard support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds clipboard support to the qemu gtk ui. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20210519053940.1888907-1-kraxel@redhat.com Message-Id: <20210519053940.1888907-10-kraxel@redhat.com> --- include/ui/gtk.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/ui/gtk.h b/include/ui/gtk.h index 6e75179..9516670 100644 --- a/include/ui/gtk.h +++ b/include/ui/gtk.h @@ -18,6 +18,7 @@ #include #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 */ -- cgit v1.1