USB tablet support (Brad Campbell, Anthony Liguori)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1810 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/vl.c b/vl.c
index 83c6716..8fba6e7 100644
--- a/vl.c
+++ b/vl.c
@@ -474,6 +474,7 @@
static void *qemu_put_kbd_event_opaque;
static QEMUPutMouseEvent *qemu_put_mouse_event;
static void *qemu_put_mouse_event_opaque;
+static int qemu_put_mouse_event_absolute;
void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque)
{
@@ -481,10 +482,11 @@
qemu_put_kbd_event = func;
}
-void qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, void *opaque)
+void qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, void *opaque, int absolute)
{
qemu_put_mouse_event_opaque = opaque;
qemu_put_mouse_event = func;
+ qemu_put_mouse_event_absolute = absolute;
}
void kbd_put_keycode(int keycode)
@@ -502,6 +504,11 @@
}
}
+int kbd_mouse_is_absolute(void)
+{
+ return qemu_put_mouse_event_absolute;
+}
+
/***********************************************************/
/* timers */
@@ -3242,6 +3249,10 @@
dev = usb_mouse_init();
if (!dev)
return -1;
+ } else if (!strcmp(devname, "tablet")) {
+ dev = usb_tablet_init();
+ if (!dev)
+ return -1;
} else {
return -1;
}