summaryrefslogtreecommitdiff
path: root/XI2.h
AgeCommit message (Collapse)Author
2014-05-30XI2: Fix XI_TouchOwnershipChangedMask valueDaniel Martin
A none existing define XI_TouchOwnershipChanged had been used to set the value of XI_TouchOwnershipChangedMask. Fix this by using XI_TouchOwnership. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-09Add support for pointer barrier eventsJasper St. Pierre
Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-07Claim support for XI 2.3Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-03Set a flag on the pointer-emulating touch eventPeter Hutterer
Toolkits need to know which touch event emulated a pointer event and which ones do not. To quote Carlos Garnacho: GTK+ does client-side windows by default (GdkWindows without a backing X window), for this to work the toplevel window in the client needs to select for more events that it wouldn't normally select for in order to cater for the event masks in such child "windows". This means that ideally GTK+ should set the touch events mask in the toplevel, and then find out whether the "window" would receive pointer or touch events for the sequence emulating the pointer, and perform the emulation itself. Reported-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Remove XI2.1 and XI2.2 warnings and errorsPeter Hutterer
This is too much of a pain, anyone who includes XI headers needs to define this. And that affects input and output drivers as well as legacy clients that don't even need the new stuff. Removing the need for defines would be enough but then the warnings clog up the output and hide real warnings. Just ditch them and laugh at those that use an experimental branch and expect it to work. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-03XI2: swap (Raw)TouchUpdate and (Raw)TouchEndPeter Hutterer
Not having the event codes in the order begin/update/end does my head in when debugging. It also means there's no symmetry between raw and normal touch events as the ownership event is wedged in between. Rearrange event codes to be Begin/Update/End for both, with the OwnershipEvent being in between. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-09-14Fix Xi 2.x version comment in XI2.hChase Douglas
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-09-14Extend XIAllowEvents for handling touch grab processingChase Douglas
This removes the XIAllowTouchEvents request, which was the only new request added for multitouch. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-13Really kill touch valuatorsChase Douglas
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-09-13Switch multitouch additions to XI 2.2Chase Douglas
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-09-13Merge remote-tracking branch 'inputproto/master' into multitouch-develChase Douglas
Conflicts: XI2.h XI2proto.h specs/XI2proto.txt Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-09-12Revert "Specify dependent device pointer/touch handling"Chase Douglas
See parent commit for details. This reverts commit 4adfb5ad6c064981e2c7eb57db4bdd81cc7029ea. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-09-07specs: extend XI2.1 raw events to include touch eventsPeter Hutterer
RawEvents are simple enough that we can re-use the detail field for the touch ID tracking and just update the respective event types. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-09-07Add comment to XI2.h to mark where the 2.1 events startPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-09-02Move scroll information into a new class.Peter Hutterer
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 Stone
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 Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-24Introduce Touch grab modeChase Douglas
Touch grabs are not really synchronous nor asynchronous. Use a separate grab mode value for touch grabs, just to make the protocol seem more sane. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-05Specify dependent device pointer/touch handlingChase Douglas
With the added rules, trackpads should be manageable no matter what occurs (button presses and pointer motion). Gesture and touch semantics during these actions are not well defined, and cancelling touches cleans up the protocol and implementation. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05Remove touch "Observe" grabsChase Douglas
The semantics of these grabs doesn't work for all use cases. Raw touch events will likely work better. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05Fix up pointer event emulation sectionChase Douglas
* Wording cleanups for tense and to make some sentences flow better. * Upon further review, it does seem to make more sense to deliver emulated pointer events through the same slave device rather than the master device. Thus, slave devices (including floating devices) may emit emulated pointer events. * Peter is correct, it doesn't make sense to set the PointerEmulated flag on touch events. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05Update device type terminologyChase Douglas
Remove IndepedentTouch and SemiMultitouch devices. These may be handled in an implementation specific manner through the props array of ATOMs in the touch class information. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-02Merge remote-tracking branch 'origin/master' into multitouchChase Douglas
Conflicts: XI2.h
2011-08-02Put a warning in about not adding any further libXi definesPeter Hutterer
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 Hutterer
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 Hutterer
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-22Put a #warning and #error in to avoid unsuspecting XI 2.1 users.Peter Hutterer
The #warning directive is intentionally outside the define to disable the error. Early adopters of the protocol can't see this warning often enough. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-14XI2.h: Fix off-by-one error in the XIMaskLen definition.Alexandre Julliard
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>
2011-03-10Many more updates to the XI 2.1 protocolChase Douglas
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-02-22Updates for pointer emulation and more touch device modesChase Douglas
Also includes resolutions for dependent devices and implicit grabs and how to handle slave touch device attachment and touch selections. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-02-15Add touch classes and events, bump to 2.1Daniel Stone
Introduce multitouch support through a new TouchClass, as well as new TouchBegin, TouchEnd, TouchOwnership, TouchUpdate, and TouchUpdateUnowned events. Bump to version 2.1. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Co-authored-by: Chase Douglas <chase.douglas@canonical.com> Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-20XI2: remove Keysym grabs, use Keycode grabs instead.Peter Hutterer
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 Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14Formatting fix, s/tabs/spaces/Peter Hutterer
2009-07-14Device{,Raw}Event: Add flags field.Daniel Stone
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 Hutterer
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 Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12Add note that bumping XI_LASTEVENT requires changes to the server.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12Ensure XIAnyModifier is an unsigned int.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-08Rename XICreateMaster to XIAddMaster for consistency.Peter Hutterer
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 Hutterer
2009-05-28Mirror the core enter/focus modes and add the passive grab mode.Peter Hutterer
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 Hutterer
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 Hutterer
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 Hutterer
2009-05-12Remove superfluous "Device" from protocol requests and events.Peter Hutterer
Anything with prefix XI is per-device anyway.
2009-05-11XI2proto.h: doxygen-ifyPeter Hutterer
2009-05-07Prefix all XI2 constants with "XI" -> inputproto 1.99.9.8Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-07Add XI2 property requests.Peter Hutterer
Basically the same as XI 1.5, save the 16 bit deviceids.
2009-05-07XI2: add passive grabs.Peter Hutterer
Most notably XI2 provides keysym grabs instead of keycode grabs.