qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] paravirtual mouse/tablet
@ 2011-01-13 10:19 Gerd Hoffmann
  2011-01-13 11:01 ` [Qemu-devel] Re: [Spice-devel] " Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2011-01-13 10:19 UTC (permalink / raw)
  To: qemu-devel@nongnu.org, spice-devel

[-- Attachment #1: Type: text/plain, Size: 108 bytes --]

   Hi,

Just throwing a quick writeup into the ring to kickstart the design 
discussion ;)

cheers,
   Gerd

[-- Attachment #2: pvtablet.h --]
[-- Type: text/x-chdr, Size: 1725 bytes --]

#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__ */

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2011-01-18 19:58 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 10:19 [Qemu-devel] paravirtual mouse/tablet Gerd Hoffmann
2011-01-13 11:01 ` [Qemu-devel] Re: [Spice-devel] " Stefan Hajnoczi
2011-01-13 11:51   ` Gerd Hoffmann
2011-01-13 15:55     ` Anthony Liguori
2011-01-13 17:08       ` Gerd Hoffmann
2011-01-13 20:41         ` Anthony Liguori
2011-01-14  8:49           ` Gerd Hoffmann
2011-01-14 10:48             ` Daniel P. Berrange
2011-01-14 14:14               ` Anthony Liguori
2011-01-14 14:28               ` Alon Levy
2011-01-14 14:52                 ` Daniel P. Berrange
2011-01-14 16:10                   ` [Spice-devel] [Qemu-devel] " Alon Levy
2011-01-13 15:52 ` [Qemu-devel] " Anthony Liguori
2011-01-13 16:14   ` Avi Kivity
2011-01-13 16:39     ` Anthony Liguori
2011-01-13 17:09       ` Paolo Bonzini
2011-01-13 20:38         ` Anthony Liguori
2011-01-13 17:13       ` Alexander Graf
2011-01-13 20:43         ` Anthony Liguori
2011-01-14 11:27         ` Gerd Hoffmann
2011-01-14 14:36           ` Alexander Graf
2011-01-14 14:56             ` [Spice-devel] " Frédéric Grelot
2011-01-14 15:13             ` Gerd Hoffmann
2011-01-14 15:28               ` Alexander Graf
2011-01-14 15:44                 ` Alexander Graf
2011-01-14 16:31                   ` Gerd Hoffmann
2011-01-14 16:42                     ` Alexander Graf
2011-01-17  7:48                       ` Gerd Hoffmann
2011-01-18 19:57                         ` Alexander Graf
2011-01-15 12:07               ` Alon Levy
2011-01-14 15:37             ` Anthony Liguori
2011-01-14 16:26               ` Gerd Hoffmann
2011-01-14 17:02               ` Peter Maydell
2011-01-17  8:14                 ` Gerd Hoffmann
2011-01-13 16:18 ` Avi Kivity
2011-01-13 16:43   ` Anthony Liguori
2011-01-13 17:19   ` Gerd Hoffmann
2011-01-13 19:21     ` Avi Kivity
2011-01-13 19:55 ` [Qemu-devel] Re: [Spice-devel] " Alon Levy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).