summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-06-07 13:03:10 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-06-13 12:34:57 +0200
commit5643fc012c2b7335eda43db90bd1e64d912428b0 (patch)
tree918043088f49e2917a45ff2a611a84a2517e41ca /include
parent2a2c4830c0068d70443f3dddc4cc668f0c601b5c (diff)
downloadqemu-5643fc012c2b7335eda43db90bd1e64d912428b0.tar.gz
qemu-5643fc012c2b7335eda43db90bd1e64d912428b0.tar.bz2
qemu-5643fc012c2b7335eda43db90bd1e64d912428b0.zip
spice: add mouse cursor support
So you'll have a mouse pointer when running non-qxl gfx cards with mouse pointer support (virtio-gpu, IIRC vmware too). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/ui/spice-display.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h
index a46bc80019..4252ab856f 100644
--- a/include/ui/spice-display.h
+++ b/include/ui/spice-display.h
@@ -69,6 +69,7 @@ QXLCookie *qxl_cookie_new(int type, uint64_t io);
typedef struct SimpleSpiceDisplay SimpleSpiceDisplay;
typedef struct SimpleSpiceUpdate SimpleSpiceUpdate;
+typedef struct SimpleSpiceCursor SimpleSpiceCursor;
struct SimpleSpiceDisplay {
DisplaySurface *ds;
@@ -92,6 +93,13 @@ struct SimpleSpiceDisplay {
*/
QemuMutex lock;
QTAILQ_HEAD(, SimpleSpiceUpdate) updates;
+
+ /* cursor (without qxl): displaychangelistener -> spice server */
+ SimpleSpiceCursor *ptr_define;
+ SimpleSpiceCursor *ptr_move;
+ uint16_t ptr_x, ptr_y;
+
+ /* cursor (with qxl): qxl local renderer -> displaychangelistener */
QEMUCursor *cursor;
int mouse_x, mouse_y;
};
@@ -104,6 +112,12 @@ struct SimpleSpiceUpdate {
QTAILQ_ENTRY(SimpleSpiceUpdate) next;
};
+struct SimpleSpiceCursor {
+ QXLCursorCmd cmd;
+ QXLCommandExt ext;
+ QXLCursor cursor;
+};
+
int qemu_spice_rect_is_empty(const QXLRect* r);
void qemu_spice_rect_union(QXLRect *dest, const QXLRect *r);