From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39360 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdKHf-0004O3-Bs for qemu-devel@nongnu.org; Thu, 13 Jan 2011 05:20:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdKHe-0005hr-AW for qemu-devel@nongnu.org; Thu, 13 Jan 2011 05:19:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdKHe-0005hl-3o for qemu-devel@nongnu.org; Thu, 13 Jan 2011 05:19:58 -0500 Message-ID: <4D2ED1C8.7070304@redhat.com> Date: Thu, 13 Jan 2011 11:19:52 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050108010603000606060500" Subject: [Qemu-devel] paravirtual mouse/tablet List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" , spice-devel This is a multi-part message in MIME format. --------------050108010603000606060500 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Just throwing a quick writeup into the ring to kickstart the design discussion ;) cheers, Gerd --------------050108010603000606060500 Content-Type: text/x-chdr; name="pvtablet.h" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pvtablet.h" #ifndef __QEMU_PVTABLET__ #define __QEMU_PVTABLET__ 1 /* * qemu patavirtual tablet interface */ #include /* our virtio-serial channel */ #define QEMU_PVTABLET_NAME "org.qemu.pvtablet.0" enum qemu_pvtablet_buttons { QEMU_PVTABLET_BTN_LEFT, QEMU_PVTABLET_BTN_RIGHT, QEMU_PVTABLET_BTN_MIDDLE, /* * we can handle up to 32 buttons although * not every has a individual name ;) */ }; /* send button down+up events */ typedef struct qemu_pvtablet_button { uint32_t button; uint32_t mask; } qemu_pvtablet_button; /* send pointer move events */ typedef struct qemu_pvtablet_position { uint32_t pos_x; /* range: 0 -> 0xffff */ uint32_t pos_y; /* range: 0 -> 0xffff */ } qemu_pvtablet_position; /* * specify which display all following events refering to * (for multihead setups). */ typedef struct qemu_pvtablet_display { /* * FIXME: spice just uses the display channel number, but that * doesn't fly in general ... */ uint32_t spice_display_channel; } qemu_pvtablet_display; enum qemu_pvtablet_type { QEMU_PVTABLET_MSG_MOVE, /* qemu_pvtablet_position */ QEMU_PVTABLET_MSG_BTN_DOWN, /* qemu_pvtablet_button */ QEMU_PVTABLET_MSG_BTN_UP, /* qemu_pvtablet_button */ QEMU_PVTABLET_MSG_DISPLAY, /* qemu_pvtablet_display */ }; typedef struct qemu_pvtablet_message { uint32_t size; /* whole message size */ uint32_t type; /* qemu_pvtablet_type */ uint64_t tv_secs; uint64_t tv_usecs; union { qemu_pvtablet_position position; qemu_pvtablet_button button; qemu_pvtablet_display display; } m; } qemu_pvtablet_message; #endif /* __QEMU_PVTABLET__ */ --------------050108010603000606060500--