aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2025-03-11 17:53:06 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2025-05-24 16:33:18 +0200
commita3f59c70d6c943e3a4d9c44ed138fa15c5ded70b (patch)
treef00254af427a6157f5946ff1aebca9ddd4ec4daa
parentacc6a94a812cd1337785413b27580f8a8f4ac170 (diff)
downloadqemu-a3f59c70d6c943e3a4d9c44ed138fa15c5ded70b.zip
qemu-a3f59c70d6c943e3a4d9c44ed138fa15c5ded70b.tar.gz
qemu-a3f59c70d6c943e3a4d9c44ed138fa15c5ded70b.tar.bz2
ui/clipboard: split out QemuClipboardContent
Allows to use VMSTATE STRUCT in following migration support patch. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
-rw-r--r--include/ui/clipboard.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h
index 14b6099..88cfff9 100644
--- a/include/ui/clipboard.h
+++ b/include/ui/clipboard.h
@@ -25,6 +25,7 @@ typedef enum QemuClipboardSelection QemuClipboardSelection;
typedef struct QemuClipboardPeer QemuClipboardPeer;
typedef struct QemuClipboardNotify QemuClipboardNotify;
typedef struct QemuClipboardInfo QemuClipboardInfo;
+typedef struct QemuClipboardContent QemuClipboardContent;
/**
* enum QemuClipboardType
@@ -97,6 +98,24 @@ struct QemuClipboardNotify {
};
};
+
+/**
+ * struct QemuClipboardContent
+ *
+ * @available: whether the data is available
+ * @requested: whether the data was requested
+ * @size: the size of the @data
+ * @data: the clipboard data
+ *
+ * Clipboard content.
+ */
+struct QemuClipboardContent {
+ bool available;
+ bool requested;
+ uint32_t size;
+ void *data;
+};
+
/**
* struct QemuClipboardInfo
*
@@ -115,12 +134,7 @@ struct QemuClipboardInfo {
int selection; /* QemuClipboardSelection */
bool has_serial;
uint32_t serial;
- struct {
- bool available;
- bool requested;
- size_t size;
- void *data;
- } types[QEMU_CLIPBOARD_TYPE__COUNT];
+ QemuClipboardContent types[QEMU_CLIPBOARD_TYPE__COUNT];
};
/**