From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnYvS-0000tf-Iv for qemu-devel@nongnu.org; Mon, 02 Dec 2013 14:13:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnYvN-0000e1-Jl for qemu-devel@nongnu.org; Mon, 02 Dec 2013 14:12:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnYvN-0000dp-Bk for qemu-devel@nongnu.org; Mon, 02 Dec 2013 14:12:53 -0500 Message-ID: <529CDBB0.5030100@redhat.com> Date: Mon, 02 Dec 2013 12:12:48 -0700 From: Eric Blake MIME-Version: 1.0 References: <1385649010-7034-1-git-send-email-kraxel@redhat.com> <1385649010-7034-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1385649010-7034-4-git-send-email-kraxel@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9HaLeLbNe4c9DA7heqtSKU31c8Fvitasd" Subject: Re: [Qemu-devel] [RFC PATCH 03/15] input: define event types using qapi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel@nongnu.org Cc: Dave Airlie , Markus Armbruster , Luiz Capitulino This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9HaLeLbNe4c9DA7heqtSKU31c8Fvitasd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/28/2013 07:29 AM, Gerd Hoffmann wrote: > Define input event types, using qapi. So we get nicely autogenerated > types for our input events. And when it comes to qmp support some day > things will be alot easier. >=20 > Types are modeled after the linux input layer. There are separate > event types for each value. There is a sync to indicate the end > of a event group. >=20 > Mouse events are splitted into motion events (one for each axis) and s/splitted/split/ (yes, one of those stupid English words whose past-tense spelling is the same as its present tense) > button events, which are grouped by sync. >=20 > Keyboard events are using keycodes instead of scancodes, so we can > rid of the keycode->scancode transformation everywhere in the > ui code. >=20 > Signed-off-by: Gerd Hoffmann > --- > qapi-schema.json | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > + > + > +########################################################### > +# WIP - input event data structures > +# not exposed via qmp yet, needs testing first But still worth documenting, and adding "Since 2.0" annotations to each enum and struct. > + > +{ 'enum' : 'InputButton', > + 'data' : [ 'Left', 'Middle', 'Right' ] } > + > +{ 'enum' : 'InputAxis', > + 'data' : [ 'X', 'Y' ] } > + > +{ 'type' : 'InputKeyEvent', > + 'data' : { 'keycode' : 'int', > + 'down' : 'bool' } } > + > +{ 'type' : 'InputBtnEvent', > + 'data' : { 'button' : 'InputButton', > + 'down' : 'bool' } } > + > +{ 'type' : 'InputMoveEvent', > + 'data' : { 'axis' : 'InputAxis', > + 'value' : 'int' } } > + > +{ 'union' : 'InputEvent', > + 'data' : { 'key' : 'InputKeyEvent', > + 'btn' : 'InputBtnEvent', > + 'rel' : 'InputMoveEvent', > + 'abs' : 'InputMoveEvent' } } >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9HaLeLbNe4c9DA7heqtSKU31c8Fvitasd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSnNuwAAoJEKeha0olJ0NqI6oH/i6bfR2xiyNbkD4/J4yuQZ/k gQUl+d9OXHi0+NLdEMBdoCqzkMhKB5R7IETGoLTZlNS09agx/99vqFfuFP9bOCYB 1FpO0vsCzaofaY3jot5RYYtOLGsq0cESTdrVG3yB3VJ3O4Z5l9gutPVFFb4hbD2F js4mKVy3nsnQipB4/oFBy5UFH1PitsZCsNNi9WeMWThjXQNQqwng+jxx8PKM6tyS pHUeHqPe5GI2XbT6rUzuE0Jff5okPZpql7Fkh9A5nEpP8JAD8vX3RF1XotD4SQWn KYGTO0tbth7ZKKPBNNCrn3MN/Pl0Rj4FF/qF6mBGukEYJnCEXrLwdFi0u6iMdm4= =CRrz -----END PGP SIGNATURE----- --9HaLeLbNe4c9DA7heqtSKU31c8Fvitasd--