On Thu, Jan 13, 2011 at 11:19:52AM +0100, Gerd Hoffmann wrote: > Hi, > > Just throwing a quick writeup into the ring to kickstart the design > discussion ;)
I apologize for not reading everything before sending, I just don't want to forget this detail: Whatever we design needs to address having multiple mice in a single guest. This will be good for multiple user scenario (multiple vnc connections already possible, multiple spice not yet but planned) where each owns it's own mouse. This is supported already in X for a while (multi pointer, different from the multi touch which is harder and not yet there). > > cheers, > Gerd > #ifndef __QEMU_PVTABLET__ > #define __QEMU_PVTABLET__ 1 > > /* > * qemu patavirtual tablet interface > */ > > #include <inttypes.h> > > /* 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__ */ > _______________________________________________ > Spice-devel mailing list > Spice-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/spice-devel _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel