Patchwork [13/48] multitouch and window close handler

login
register
mail settings
Submitter Riku Voipio
Date March 26, 2010, 4:06 p.m.
Message ID <6b8d2b8ba29cd64e05acfbe1ca841be80b749142.1269617186.git.riku.voipio@nokia.com>
Download mbox | patch
Permalink /patch/48662/
State New
Headers show

Comments

Riku Voipio - March 26, 2010, 4:06 p.m.
From: Juha Riihimäki <juha.riihimaki@nokia.com>

Signed-Off-By: Riku Voipio <riku.voipio@nokia.com>
Signed-Off-By: Juha Riihimäki <juha.riihimaki@nokia.com>

---
 console.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

Patch

diff --git a/console.c b/console.c
index 8bcd00b..8b24318 100644
--- a/console.c
+++ b/console.c
@@ -32,6 +32,24 @@ 
 #define QEMU_RGBA(r, g, b, a) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
 #define QEMU_RGB(r, g, b) QEMU_RGBA(r, g, b, 0xff)
 
+int multitouch_enabled = 0;
+static QEMUDisplayCloseCallback *qemu_display_close_callback = NULL;
+static void *qemu_display_close_callback_opaque = NULL;
+
+void qemu_set_display_close_handler(QEMUDisplayCloseCallback *cb, void *opaque)
+{
+    qemu_display_close_callback = cb;
+    qemu_display_close_callback_opaque = opaque;
+}
+
+int qemu_run_display_close_handler(void)
+{
+    if (qemu_display_close_callback != NULL) {
+        return qemu_display_close_callback(qemu_display_close_callback_opaque);
+    }
+    return 1;
+}
+
 typedef struct TextAttributes {
     uint8_t fgcol:4;
     uint8_t bgcol:4;