Commit graph

187 commits

Author SHA1 Message Date
Peter Hutterer
4b414dcdbb XI2proto.h: Remove special doxygen tags.
The protocol header does not include enough documentation to make the use of
doxygen really worthwile. Special doxygen tags beyond the very simple use of
/** and /**< contribute too much to the noise and make it hard to actually
read the code itself.

While no extra tags are added now, a run of doxygen over XI2proto and XI.h
still produces an acceptable output.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-27 15:53:29 +10:00
Peter Hutterer
0542581edc XI2proto.txt: Add some XI1 vs. XI2 interoperability descriptions.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-27 14:29:18 +10:00
Peter Hutterer
7cf46d64e0 XI2proto.txt: update list of XI2 event types.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-27 14:21:40 +10:00
Peter Hutterer
0e7af09fce inputproto 1.9.99.15
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-22 13:58:08 +10:00
Peter Hutterer
006afb766a XI2: remove Keysym grabs, use Keycode grabs instead.
Keysym grabs are tricky to get right for applications that are more
complicated than demo applications. otoh, we know keycode grabs are working.
So let's go with keycode grabs for now and add keysym grabs later when we've
sorted out the details.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-20 16:27:57 +10:00
Peter Hutterer
aaefb1e122 inputproto 1.9.99.14
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14 16:15:45 +10:00
Peter Hutterer
1357361d6b Add the enter/leave detail defines, same as the core protocol ones.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14 16:15:45 +10:00
Peter Hutterer
2a3dc6c471 Formatting fix, s/tabs/spaces/ 2009-07-14 16:15:45 +10:00
Daniel Stone
51244a1a4f Device{,Raw}Event: Add flags field.
Add a flags member to DeviceEvent and DeviceKeyEvent; the only currently
defined flag is KeyRepeat, indicating a repeat event (a la XKB detectable
autorepeat), which is only valid for key events.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14 11:52:40 +10:00
Peter Hutterer
c455db2c25 XI2: Split up raw events into multiple event types.
Instead of a single XI_RawEvent type with subtypes to represent the actual
event, split up the event into XI_RawButtonPress, XI_RawButtonRelease, etc.
This way clients can select for specific raw events only instead of all of
them at once.

Note that raw events may be selected on master devices too, the server will
route them through master devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-13 16:04:41 +10:00
Peter Hutterer
f345258bf4 Fix XIMaskLen macro.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-13 14:37:22 +10:00
Peter Hutterer
6280b53cdb inputproto 1.9.99.13 2009-07-12 16:19:19 +10:00
Peter Hutterer
2367e52404 Add effective group and modifiers to XIGroupInfo/XIModifierInfo.
Effective modifiers are easy to calculate but let's send them down the wire
nonetheless. Effective group is slightly more complicated since group
wrapping must be taken into account - sending it down the wire simplifies
clients.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-23 21:02:33 +10:00
Peter Hutterer
3f0067b45e XIDeviceChangedEvents may occur on master devices too.
Prime example is a change in the number of buttons due to the availability
of a new slave device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 00:30:12 +10:00
Peter Hutterer
b40f48b15e inputproto 1.9.99.12
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-17 09:09:56 +10:00
Peter Hutterer
a6edd59c44 Use the term 'labels' to refer to button and axes labels.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-17 08:53:39 +10:00
Peter Hutterer
b0f7e24d21 Include valuator value in XIValuatorClasses
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-16 13:15:24 +10:00
Peter Hutterer
b2fb9f81a2 Include button state in XIButtonClasses.
Without including the state in a button class, it is impossible to know the
state of a device until this device has pressed or released another button
(and thus sends an event).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-14 08:25:01 +10:00
Peter Hutterer
db98b81735 Add a source field to the class information.
In some cases it is required to know the source device of a particular
device class. In the future we might also do lazy copying of classes,
meaning that for a given device, each class may come from a different
source. Hence the source id should be included for each class.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 16:27:38 +10:00
Peter Hutterer
48cf9a5606 Add note that bumping XI_LASTEVENT requires changes to the server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 15:51:08 +10:00
Peter Hutterer
bac0e02889 Ensure XIAnyModifier is an unsigned int.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 15:51:05 +10:00
Peter Hutterer
1d59de593c XISelectEventsReq should use win (not window), like all requests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 15:50:46 +10:00
Peter Hutterer
f711dfae68 XI2proto: document XSetClientPointer behaviour on None window, etc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 15:50:21 +10:00
Peter Hutterer
17a6ad0942 inputproto 1.9.99.11 2009-06-08 15:40:21 +10:00
Peter Hutterer
03309cfbc1 xXIHierarchyEvent should list num_info, not num_devices.
The structures following the request are referred to as "info", having a
name of "num_devices" is misleading as the number of info structs does not
always reflect the number of devices (e.g. if a device got removed).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-08 15:39:53 +10:00
Peter Hutterer
751f2d6c0f Rename XICreateMaster to XIAddMaster for consistency.
We use add/remove for slave devices, add/remove for the hierarchy changed
flags, so let's use add/remove to create a new device as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-08 15:39:52 +10:00
Peter Hutterer
44f2419e56 Update comment referring to an old naming scheme.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-08 15:39:45 +10:00
Peter Hutterer
6e20d1fc25 Document BadValue error for XIHierarchyEvents selection on devices.
These events may only be selected on the XIAllDevices fake device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-08 15:39:42 +10:00
Peter Hutterer
56da196866 XIQueryVersion may return a BadValue for major_version less than 2.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-04 13:35:56 +10:00
Peter Hutterer
0d75208a55 Move the XI2 index into versions[] over to XI2.h 2009-06-01 09:13:22 +10:00
Peter Hutterer
8aff0836af Specify modifier interactions with attached slave devices on passive grabs. 2009-05-29 13:25:32 +10:00
Peter Hutterer
e102c504ec inputproto 1.9.99.10 2009-05-28 14:47:49 +10:00
Peter Hutterer
6b61bef5da Mirror the core enter/focus modes and add the passive grab mode.
If an enter/focus grabs activates (or deactivates), send an extra set of
enter/focus in (or leave/focus out) events to the grabbing client with mode
XIPassiveGrabNotify.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-28 14:47:49 +10:00
Peter Hutterer
1b2dc24bf5 Add Enter/FocusIn passive grabs.
Same behaviour as button/keysym grabs but triggered on enter/leave and
focus in/out events.
2009-05-27 13:35:57 +10:00
Peter Hutterer
d0c6633f7b XI2proto.txt: remove one more keycode mentioning, fix typo 2009-05-27 13:16:36 +10:00
Peter Hutterer
31f492bf94 Add XIGetSelectedEvents request and reply.
Counterpart to XISelectEvents, used to retrieve event masks from the server.
2009-05-25 15:22:15 +10:00
Benjamin Close
f065f6c12a XI2proto.h: fix two comments referring to the old naming scheme.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-19 11:27:03 +10:00
Peter Hutterer
3aca2d6ba5 inputproto 1.9.99.9 2009-05-16 11:49:35 +10:00
Peter Hutterer
8c28723677 Document naming conventions for XI2proto.h. 2009-05-16 11:49:35 +10:00
Peter Hutterer
b32e5830c0 XI2proto: define Window, Cursor, Atom and Time as uint32_t.
Since we're using stdint in the rest of the file, might as well ignore
CARD32 here.
2009-05-16 11:49:34 +10:00
Peter Hutterer
f4f09d40e0 XI2.h: remove XI2Mask, add XISetMask and friends.
XISetMask, XIClearMask, XIMaskIsSet serve to set, clear or check a bit in
the provided array.
XIMaskLen is a macro to get the minimum length of a mask for a given event
type.

They are expected to be common ways to deal with event masks, i.e. clients
will do:

unsigned char mask[XIMaskLen(XI_ButtonRelease)] = {0};
XISetMask(mask, XI_ButtonPress)
XISetMask(mask, XI_ButtonRelease)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-16 11:49:34 +10:00
Peter Hutterer
0ae6581bc6 Add XIAnyButton and XIAnyKeysym. 2009-05-16 11:49:34 +10:00
Peter Hutterer
4cc6992b08 XIQueryPointer needs to include sensible button/modifier state.
This includes shuffling the xXIModifierInfo and xXIGroupInfo structs to the
common structs section.
2009-05-14 12:13:45 +10:00
Peter Hutterer
d041f30777 Add an introduction to XI2proto.txt 2009-05-14 10:29:49 +10:00
Peter Hutterer
e1138da902 XI2proto.txt: remove more mentioning of keycode grabs 2009-05-12 19:24:31 +10:00
Peter Hutterer
7aba20ed4c Remove superfluous "Device" from protocol requests and events.
Anything with prefix XI is per-device anyway.
2009-05-12 19:21:12 +10:00
Peter Hutterer
12635cbd4a Add per-device flags to XIDeviceHierarchyEvents 2009-05-12 16:14:01 +10:00
Peter Hutterer
886d2aceb7 Define Cursor as CARD32.
Reported-by: Benjamin Close <benjamin.close@clearchain.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-12 13:46:20 +10:00
Peter Hutterer
32277164bc XI2proto.h: doxygen-ify 2009-05-11 14:51:12 +10:00
Peter Hutterer
e9dfa40155 XI2proto.h: s/uint32_t/Time/ where appropriate 2009-05-11 13:46:53 +10:00