aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-04-12 21:09:08 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-04-12 21:09:08 +0000
commit09b26c5ec06ff7531a2a2a7b1146011c87285f81 (patch)
tree332307939fbad1e7953b9f0f2af1388cc015318d /vl.c
parent6a15fd12ca1bccb72335132686db7adef5937a0a (diff)
USB tablet support (Brad Campbell, Anthony Liguori)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1810 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 83c6716129..8fba6e76ee 100644
--- a/vl.c
+++ b/vl.c
@@ -474,6 +474,7 @@ static QEMUPutKBDEvent *qemu_put_kbd_event;
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 @@ void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque)
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 @@ void kbd_mouse_event(int dx, int dy, int dz, int buttons_state)
}
}
+int kbd_mouse_is_absolute(void)
+{
+ return qemu_put_mouse_event_absolute;
+}
+
/***********************************************************/
/* timers */
@@ -3242,6 +3249,10 @@ static int usb_device_add(const char *devname)
dev = usb_mouse_init();
if (!dev)
return -1;
+ } else if (!strcmp(devname, "tablet")) {
+ dev = usb_tablet_init();
+ if (!dev)
+ return -1;
} else {
return -1;
}