summaryrefslogtreecommitdiff
path: root/XI2.h
AgeCommit message (Collapse)AuthorFilesLines
2011-09-02Move scroll information into a new class.Peter Hutterer1-0/+9
Using labels only to mark smooth scrolling axes disallows scrolling from hardware events (e.g. a mouse wheel). If those axes are marked as scrolling axes instead, the clients lose information which hardware axis this event corresponds to. For example, on Wacom devices, the client can benefit from smooth scrolling on the strip or wheel event but may still require the knowledge whether the axis is a vertical strip (e.g. Intuos3) or a absolute scrolling wheel (e.g. Intuos4). Thus, add a new class to XIQueryDevice that represents scrolling information on a valuator. One of these ScrollClass may exist for each ValuatorClass if that valuator is a scrolling valuator. The increment field of this class removes the requirement for 1.0 == 1 unit of scrolling. This isn't true in most cases, especially where physical scroll axes are involved. Wacom Intuos4 scroll rings have a unit size of 3.0 and the driver historically sent one scroll event per 3.0 increment or decrement. Mapping one scroll event to 1.0 makes the ring mostly unusable through legacy button events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-02Add XIPointerEmulated for emulated eventsDaniel Stone1-0/+1
The XIPointerEmulated flag on pointer events means that the event was emulated from a smooth-scroll or touch event to support legacy events, and the client may ignore this if it is listening to the other events. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-02Announce 2.1 availability through the XI_2_Major and XI_2_Minor definesPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-02Put a warning in about not adding any further libXi definesPeter Hutterer1-1/+2
The matching commit in libXi is e8531dd6a981c6cf19a1d256c29e886e34e8f51a libXi-1.4.2-21-ge8531ddp Add XI2 library-internal array offsets to XIint.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-07Provide convenience defines for owner_events.Peter Hutterer1-0/+4
No functional effect, just to improve readability of code. It's not obvious what "True" or "False" stands for in a function with 11 arguments. Compare XIGrabButton(dpy, deviceid, button, grab_window, cursor, GrabModeAsync, GrabModeSync, True, event_mask, num_modifiers, &modifiers); vs. XIGrabButton(dpy, deviceid, button, grab_window, cursor, GrabModeAsync, GrabModeSync, XIOwnerEvents, event_mask, num_modifiers, &modifiers); Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-06-07Add XI2-specific defines for grab and property requestsPeter Hutterer1-0/+19
XI 2.0 headers forced clients to mix XI2 specific constants with defines for core input. Most notable here are the grab code which required GrabModeAsync or GrabModeSync from core, but _not_ AnyModifier (XIAnymodifier != AnyModifier). This is a hard-to-debug cause for bugs. Add defines for grab modes, grab return codes and property modes as well as a define for the AnyPropertyType. These defines are identical to the ones defined in core but stop the use of input-related defines from either core or XI 1.x. Clients must use the core defines None and CurrentTime where applicable. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-04-14XI2.h: Fix off-by-one error in the XIMaskLen definition.Alexandre Julliard1-1/+1
The previous definition would give the wrong result for events that are a multiple of 8. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-20XI2: remove Keysym grabs, use Keycode grabs instead.Peter Hutterer1-2/+2
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-14Add the enter/leave detail defines, same as the core protocol ones.Peter Hutterer1-0/+10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14Formatting fix, s/tabs/spaces/Peter Hutterer1-2/+2
2009-07-14Device{,Raw}Event: Add flags field.Daniel Stone1-0/+5
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-13XI2: Split up raw events into multiple event types.Peter Hutterer1-4/+12
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-13Fix XIMaskLen macro.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12Add note that bumping XI_LASTEVENT requires changes to the server.Peter Hutterer1-0/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12Ensure XIAnyModifier is an unsigned int.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-08Rename XICreateMaster to XIAddMaster for consistency.Peter Hutterer1-1/+1
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-01Move the XI2 index into versions[] over to XI2.hPeter Hutterer1-0/+9
2009-05-28Mirror the core enter/focus modes and add the passive grab mode.Peter Hutterer1-0/+8
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-27Add Enter/FocusIn passive grabs.Peter Hutterer1-0/+2
Same behaviour as button/keysym grabs but triggered on enter/leave and focus in/out events.
2009-05-16XI2.h: remove XI2Mask, add XISetMask and friends.Peter Hutterer1-2/+6
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-16Add XIAnyButton and XIAnyKeysym.Peter Hutterer1-0/+2
2009-05-12Remove superfluous "Device" from protocol requests and events.Peter Hutterer1-2/+2
Anything with prefix XI is per-device anyway.
2009-05-11XI2proto.h: doxygen-ifyPeter Hutterer1-0/+1
2009-05-07Prefix all XI2 constants with "XI" -> inputproto 1.99.9.8inputproto-1.9.99.8Peter Hutterer1-47/+40
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-07Add XI2 property requests.Peter Hutterer1-1/+7
Basically the same as XI 1.5, save the 16 bit deviceids.
2009-05-07XI2: add passive grabs.Peter Hutterer1-0/+7
Most notably XI2 provides keysym grabs instead of keycode grabs.
2009-04-20Add XIAllowEvents.Peter Hutterer1-0/+7
Basically the same as the core protocol AllowEvents.
2009-03-20Move XI_2_Major/Minor to XI2.hPeter Hutterer1-0/+4
2009-03-20Move AttachToMaster, Floating to XI2.hPeter Hutterer1-0/+3
2009-03-20Move CH_* constants to xi2Peter Hutterer1-0/+6
2009-03-11Add XI2.h and XI2proto.h, and a few required defines to XI.hPeter Hutterer1-0/+103