diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-09-14 22:33:57 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-21 15:32:05 +1000 |
commit | e73e2fe95dab3e0048b24d16327adbe54326ff3f (patch) | |
tree | 8189d07cfc14fd6eabbfc343faa1157a665e9bad /man | |
parent | 7888d14a499062a1c3b333f31f1330cecf1e97c1 (diff) |
Implement support for XI 2.2
Adds support for the new TouchClass for multitouch-capable servers/devices.
New events:
XITouchOwnershipEvent
New event types handled:
XITouchBegin, XITouchUpdate, XITouchEnd
XIRawTouchBegin, XIRawTouchUpdate, XIRawTouchEnd
New functions:
XIGrabTouchBegin ... passive grabs on touches
XIUngrabTouchBegin
XIAllowTouchEvents ... Allow/reject touch event sequences
New XIQueryDevice classes:
XITouchClassInfo
Requires libX11 1.5 for GetReqSized
Co-authored by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'man')
-rw-r--r-- | man/XIGrabButton.txt | 60 | ||||
-rw-r--r-- | man/XIQueryDevice.txt | 30 |
2 files changed, 67 insertions, 23 deletions
diff --git a/man/XIGrabButton.txt b/man/XIGrabButton.txt index 45ac25e..a046ac7 100644 --- a/man/XIGrabButton.txt +++ b/man/XIGrabButton.txt @@ -49,6 +49,20 @@ SYNOPSIS int num_modifiers, XIGrabModifiers *modifiers); + int XIGrabTouchBegin( Display *display, + int deviceid, + Window grab_window, + Bool owner_events, + XIEventMask *mask, + int num_modifiers, + XIGrabModifiers *modifiers_inout); + + int XIUngrabTouchBegin( Display *display, + int deviceid, + Window grab_window, + int num_modifiers, + XIGrabModifiers *modifiers); + display Specifies the connection to the X server. @@ -101,8 +115,8 @@ SYNOPSIS DESCRIPTION ----------- - XIGrabButton and XIGrabKeycode establishes a passive grab. The - modifier device for a button grab is the paired master device + XIGrabButton, XIGrabKeycode and XIGrabTouchBegin establish a passive + grab. The modifier device for a button grab is the paired master device if deviceid specifies a master pointer. Otherwise, the modifier device is the device specified with deviceid. In the future, the device is actively grabbed (as for XIGrabDevice, the @@ -110,9 +124,9 @@ DESCRIPTION was pressed and the XI_ButtonPress or XI_KeyPress event is reported if all of the following conditions are true: * The device is not grabbed, and the specified button or - keycode is logically pressed when the specified modifier - keys are logically down on the modifier device and no other - buttons or modifier keys are logically down. + keycode is logically pressed or a touch event occurs when the + specified modifier keys are logically down on the modifier device + and no other buttons or modifier keys are logically down. * Either the grab window is an ancestor of (or is) the focus window, OR the grab window is a descendent of the focus window and contains the device. @@ -156,35 +170,36 @@ DESCRIPTION combination. XIGrabButton and XIGrabKeycode have no effect on an active grab. - On success, XIGrabButton and XIGrabKeycode return 0; + On success, XIGrabButton, XIGrabKeycode and XIGrabTouchBegin return 0; If one or more modifier combinations could not be grabbed, - XIGrabButton and XIGrabKeycode return the number of failed - combinations and modifiers_inout contains the failed combinations + XIGrabButton, XIGrabKeycode and XIGrabTouchBegin return the number of + failed combinations and modifiers_inout contains the failed combinations and their respective error codes. - XIGrabButton and XIGrabKeycode can generate BadClass, BadDevice, - BadMatch, BadValue, and BadWindow errors. + XIGrabButton, XIGrabKeycode and XIGrabTouchBegin can generate BadClass, + BadDevice, BadMatch, BadValue, and BadWindow errors. - XIUngrabButton and XIUngrabKeycode releases the passive grab for - a button/modifier or keycode/modifier combination on the - specified window if it was grabbed by this client. A modifier - of XIAnyModifier is equivalent to issuing the ungrab request + XIUngrabButton, XIUngrabKeycode and XIUngrabTouchBegin release the + passive grab for a button/modifier, keycode/modifier or touch/modifier + combination on the specified window if it was grabbed by this client. A + modifier of XIAnyModifier is equivalent to issuing the ungrab request for all possible modifier combinations, including the combination of no modifiers. A button of XIAnyButton is equivalent to issuing the request for all possible buttons. XIUngrabButton and XIUngrabKeycode have no effect on an active grab. - XIUngrabButton and XIUngrabKeycode can generate BadDevice, - BadMatch, BadValue and BadWindow errors. + XIUngrabButton, XIUngrabKeycode and XIUngrabTouchBegin can generate + BadDevice, BadMatch, BadValue and BadWindow errors. RETURN VALUE ------------ - XIGrabButton and XIGrabKeycode return the number of modifier combination - that could not establish a passive grab. The modifiers are returned in - modifiers_inout, along with the respective error for this modifier - combination. If XIGrabButton or XIGrabKeycode return zero, passive grabs - with all requested modifier combinations were established successfully. + XIGrabButton, XIGrabKeycode and XIGrabTouchBegin return the number of + modifier combination that could not establish a passive grab. The + modifiers are returned in modifiers_inout, along with the respective + error for this modifier combination. If XIGrabButton, XIGrabKeycode + or XIGrabTouchBegin return zero, passive grabs with all requested + modifier combinations were established successfully. DIAGNOSTICS ----------- @@ -195,7 +210,8 @@ DIAGNOSTICS BadMatch This error may occur if XIGrabButton specified a device that has no buttons, or XIGrabKeycode specified a device - that has no keys. + that has no keys, or XIGrabTouchBegin specified a device + that is not touch-capable. BadValue Some numeric value falls outside the range of values diff --git a/man/XIQueryDevice.txt b/man/XIQueryDevice.txt index 6b5a622..e5e8251 100644 --- a/man/XIQueryDevice.txt +++ b/man/XIQueryDevice.txt @@ -100,7 +100,8 @@ DESCRIPTION The type field specifies the type of the input class. Currently, the following types are defined: - XIKeyClass, XIButtonClass, XIValuatorClass, XIScrollClass + XIKeyClass, XIButtonClass, XIValuatorClass, XIScrollClass, + XITouchClass In the future, additional types may be added. Clients are required to ignore unknown input classes. @@ -231,6 +232,33 @@ DESCRIPTION the emulation of XI_Motion events when the driver submits legacy scroll button events. + typedef struct + { + int type; + int sourceid; + int mode; + int num_touches; + } XITouchClassInfo; + + A device may have zero or one XITouchClassInfo, denoting + multi-touch capability on the device. A device with a XITouchClassInfo + may send TouchBegin, TouchUpdate, TouchEnd and TouchOwnership events. + + The mode field is either XIDirectTouch for direct-input touch devices + such as touchscreens or XIDependentTouch for indirect input devices such + as touchpads. For XIDirectTouch devices, touch events are sent to window + at the position the touch occured. For XIDependentTouch devices, touch + events are sent to the window at the position of the device's sprite. + + The num_touches field defines the maximum number of simultaneous touches + the device supports. A num_touches of 0 means the maximum number of + simultaneous touches is undefined or unspecified. This field should be + used as a guide only, devices will lie about their capabilities. + + A device with an XITouchClassInfo may still send pointer events. The + valuators must be defined with the respective XIValuatorClass + classes. A valuator may send both pointer and touch-events. + XIQueryDevice can generate a BadDevice error. XIFreeDeviceInfo frees the information returned by |