1*6c119a46SAndroid Build Coastguard Worker<?xml version="1.0" encoding="UTF-8"?> 2*6c119a46SAndroid Build Coastguard Worker<protocol name="pointer_gestures_unstable_v1"> 3*6c119a46SAndroid Build Coastguard Worker 4*6c119a46SAndroid Build Coastguard Worker <interface name="zwp_pointer_gestures_v1" version="2"> 5*6c119a46SAndroid Build Coastguard Worker <description summary="touchpad gestures"> 6*6c119a46SAndroid Build Coastguard Worker A global interface to provide semantic touchpad gestures for a given 7*6c119a46SAndroid Build Coastguard Worker pointer. 8*6c119a46SAndroid Build Coastguard Worker 9*6c119a46SAndroid Build Coastguard Worker Two gestures are currently supported: swipe and pinch. 10*6c119a46SAndroid Build Coastguard Worker All gestures follow a three-stage cycle: begin, update, end and 11*6c119a46SAndroid Build Coastguard Worker are identified by a unique id. 12*6c119a46SAndroid Build Coastguard Worker 13*6c119a46SAndroid Build Coastguard Worker Warning! The protocol described in this file is experimental and 14*6c119a46SAndroid Build Coastguard Worker backward incompatible changes may be made. Backward compatible changes 15*6c119a46SAndroid Build Coastguard Worker may be added together with the corresponding interface version bump. 16*6c119a46SAndroid Build Coastguard Worker Backward incompatible changes are done by bumping the version number in 17*6c119a46SAndroid Build Coastguard Worker the protocol and interface names and resetting the interface version. 18*6c119a46SAndroid Build Coastguard Worker Once the protocol is to be declared stable, the 'z' prefix and the 19*6c119a46SAndroid Build Coastguard Worker version number in the protocol and interface names are removed and the 20*6c119a46SAndroid Build Coastguard Worker interface version number is reset. 21*6c119a46SAndroid Build Coastguard Worker </description> 22*6c119a46SAndroid Build Coastguard Worker 23*6c119a46SAndroid Build Coastguard Worker <request name="get_swipe_gesture"> 24*6c119a46SAndroid Build Coastguard Worker <description summary="get swipe gesture"> 25*6c119a46SAndroid Build Coastguard Worker Create a swipe gesture object. See the 26*6c119a46SAndroid Build Coastguard Worker wl_pointer_gesture_swipe interface for details. 27*6c119a46SAndroid Build Coastguard Worker </description> 28*6c119a46SAndroid Build Coastguard Worker <arg name="id" type="new_id" interface="zwp_pointer_gesture_swipe_v1"/> 29*6c119a46SAndroid Build Coastguard Worker <arg name="pointer" type="object" interface="wl_pointer"/> 30*6c119a46SAndroid Build Coastguard Worker </request> 31*6c119a46SAndroid Build Coastguard Worker 32*6c119a46SAndroid Build Coastguard Worker <request name="get_pinch_gesture"> 33*6c119a46SAndroid Build Coastguard Worker <description summary="get pinch gesture"> 34*6c119a46SAndroid Build Coastguard Worker Create a pinch gesture object. See the 35*6c119a46SAndroid Build Coastguard Worker wl_pointer_gesture_pinch interface for details. 36*6c119a46SAndroid Build Coastguard Worker </description> 37*6c119a46SAndroid Build Coastguard Worker <arg name="id" type="new_id" interface="zwp_pointer_gesture_pinch_v1"/> 38*6c119a46SAndroid Build Coastguard Worker <arg name="pointer" type="object" interface="wl_pointer"/> 39*6c119a46SAndroid Build Coastguard Worker </request> 40*6c119a46SAndroid Build Coastguard Worker 41*6c119a46SAndroid Build Coastguard Worker <!-- Version 2 additions --> 42*6c119a46SAndroid Build Coastguard Worker 43*6c119a46SAndroid Build Coastguard Worker <request name="release" type="destructor" since="2"> 44*6c119a46SAndroid Build Coastguard Worker <description summary="destroy the pointer gesture object"> 45*6c119a46SAndroid Build Coastguard Worker Destroy the pointer gesture object. Swipe and pinch objects created via this 46*6c119a46SAndroid Build Coastguard Worker gesture object remain valid. 47*6c119a46SAndroid Build Coastguard Worker </description> 48*6c119a46SAndroid Build Coastguard Worker </request> 49*6c119a46SAndroid Build Coastguard Worker </interface> 50*6c119a46SAndroid Build Coastguard Worker 51*6c119a46SAndroid Build Coastguard Worker <interface name="zwp_pointer_gesture_swipe_v1" version="2"> 52*6c119a46SAndroid Build Coastguard Worker <description summary="a swipe gesture object"> 53*6c119a46SAndroid Build Coastguard Worker A swipe gesture object notifies a client about a multi-finger swipe 54*6c119a46SAndroid Build Coastguard Worker gesture detected on an indirect input device such as a touchpad. 55*6c119a46SAndroid Build Coastguard Worker The gesture is usually initiated by multiple fingers moving in the 56*6c119a46SAndroid Build Coastguard Worker same direction but once initiated the direction may change. 57*6c119a46SAndroid Build Coastguard Worker The precise conditions of when such a gesture is detected are 58*6c119a46SAndroid Build Coastguard Worker implementation-dependent. 59*6c119a46SAndroid Build Coastguard Worker 60*6c119a46SAndroid Build Coastguard Worker A gesture consists of three stages: begin, update (optional) and end. 61*6c119a46SAndroid Build Coastguard Worker There cannot be multiple simultaneous pinch or swipe gestures on a 62*6c119a46SAndroid Build Coastguard Worker same pointer/seat, how compositors prevent these situations is 63*6c119a46SAndroid Build Coastguard Worker implementation-dependent. 64*6c119a46SAndroid Build Coastguard Worker 65*6c119a46SAndroid Build Coastguard Worker A gesture may be cancelled by the compositor or the hardware. 66*6c119a46SAndroid Build Coastguard Worker Clients should not consider performing permanent or irreversible 67*6c119a46SAndroid Build Coastguard Worker actions until the end of a gesture has been received. 68*6c119a46SAndroid Build Coastguard Worker </description> 69*6c119a46SAndroid Build Coastguard Worker 70*6c119a46SAndroid Build Coastguard Worker <request name="destroy" type="destructor"> 71*6c119a46SAndroid Build Coastguard Worker <description summary="destroy the pointer swipe gesture object"/> 72*6c119a46SAndroid Build Coastguard Worker </request> 73*6c119a46SAndroid Build Coastguard Worker 74*6c119a46SAndroid Build Coastguard Worker <event name="begin"> 75*6c119a46SAndroid Build Coastguard Worker <description summary="multi-finger swipe begin"> 76*6c119a46SAndroid Build Coastguard Worker This event is sent when a multi-finger swipe gesture is detected 77*6c119a46SAndroid Build Coastguard Worker on the device. 78*6c119a46SAndroid Build Coastguard Worker </description> 79*6c119a46SAndroid Build Coastguard Worker <arg name="serial" type="uint"/> 80*6c119a46SAndroid Build Coastguard Worker <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> 81*6c119a46SAndroid Build Coastguard Worker <arg name="surface" type="object" interface="wl_surface"/> 82*6c119a46SAndroid Build Coastguard Worker <arg name="fingers" type="uint" summary="number of fingers"/> 83*6c119a46SAndroid Build Coastguard Worker </event> 84*6c119a46SAndroid Build Coastguard Worker 85*6c119a46SAndroid Build Coastguard Worker <event name="update"> 86*6c119a46SAndroid Build Coastguard Worker <description summary="multi-finger swipe motion"> 87*6c119a46SAndroid Build Coastguard Worker This event is sent when a multi-finger swipe gesture changes the 88*6c119a46SAndroid Build Coastguard Worker position of the logical center. 89*6c119a46SAndroid Build Coastguard Worker 90*6c119a46SAndroid Build Coastguard Worker The dx and dy coordinates are relative coordinates of the logical 91*6c119a46SAndroid Build Coastguard Worker center of the gesture compared to the previous event. 92*6c119a46SAndroid Build Coastguard Worker </description> 93*6c119a46SAndroid Build Coastguard Worker <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> 94*6c119a46SAndroid Build Coastguard Worker <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/> 95*6c119a46SAndroid Build Coastguard Worker <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/> 96*6c119a46SAndroid Build Coastguard Worker </event> 97*6c119a46SAndroid Build Coastguard Worker 98*6c119a46SAndroid Build Coastguard Worker <event name="end"> 99*6c119a46SAndroid Build Coastguard Worker <description summary="multi-finger swipe end"> 100*6c119a46SAndroid Build Coastguard Worker This event is sent when a multi-finger swipe gesture ceases to 101*6c119a46SAndroid Build Coastguard Worker be valid. This may happen when one or more fingers are lifted or 102*6c119a46SAndroid Build Coastguard Worker the gesture is cancelled. 103*6c119a46SAndroid Build Coastguard Worker 104*6c119a46SAndroid Build Coastguard Worker When a gesture is cancelled, the client should undo state changes 105*6c119a46SAndroid Build Coastguard Worker caused by this gesture. What causes a gesture to be cancelled is 106*6c119a46SAndroid Build Coastguard Worker implementation-dependent. 107*6c119a46SAndroid Build Coastguard Worker </description> 108*6c119a46SAndroid Build Coastguard Worker <arg name="serial" type="uint"/> 109*6c119a46SAndroid Build Coastguard Worker <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> 110*6c119a46SAndroid Build Coastguard Worker <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/> 111*6c119a46SAndroid Build Coastguard Worker </event> 112*6c119a46SAndroid Build Coastguard Worker </interface> 113*6c119a46SAndroid Build Coastguard Worker 114*6c119a46SAndroid Build Coastguard Worker <interface name="zwp_pointer_gesture_pinch_v1" version="2"> 115*6c119a46SAndroid Build Coastguard Worker <description summary="a pinch gesture object"> 116*6c119a46SAndroid Build Coastguard Worker A pinch gesture object notifies a client about a multi-finger pinch 117*6c119a46SAndroid Build Coastguard Worker gesture detected on an indirect input device such as a touchpad. 118*6c119a46SAndroid Build Coastguard Worker The gesture is usually initiated by multiple fingers moving towards 119*6c119a46SAndroid Build Coastguard Worker each other or away from each other, or by two or more fingers rotating 120*6c119a46SAndroid Build Coastguard Worker around a logical center of gravity. The precise conditions of when 121*6c119a46SAndroid Build Coastguard Worker such a gesture is detected are implementation-dependent. 122*6c119a46SAndroid Build Coastguard Worker 123*6c119a46SAndroid Build Coastguard Worker A gesture consists of three stages: begin, update (optional) and end. 124*6c119a46SAndroid Build Coastguard Worker There cannot be multiple simultaneous pinch or swipe gestures on a 125*6c119a46SAndroid Build Coastguard Worker same pointer/seat, how compositors prevent these situations is 126*6c119a46SAndroid Build Coastguard Worker implementation-dependent. 127*6c119a46SAndroid Build Coastguard Worker 128*6c119a46SAndroid Build Coastguard Worker A gesture may be cancelled by the compositor or the hardware. 129*6c119a46SAndroid Build Coastguard Worker Clients should not consider performing permanent or irreversible 130*6c119a46SAndroid Build Coastguard Worker actions until the end of a gesture has been received. 131*6c119a46SAndroid Build Coastguard Worker </description> 132*6c119a46SAndroid Build Coastguard Worker 133*6c119a46SAndroid Build Coastguard Worker <request name="destroy" type="destructor"> 134*6c119a46SAndroid Build Coastguard Worker <description summary="destroy the pinch gesture object"/> 135*6c119a46SAndroid Build Coastguard Worker </request> 136*6c119a46SAndroid Build Coastguard Worker 137*6c119a46SAndroid Build Coastguard Worker <event name="begin"> 138*6c119a46SAndroid Build Coastguard Worker <description summary="multi-finger pinch begin"> 139*6c119a46SAndroid Build Coastguard Worker This event is sent when a multi-finger pinch gesture is detected 140*6c119a46SAndroid Build Coastguard Worker on the device. 141*6c119a46SAndroid Build Coastguard Worker </description> 142*6c119a46SAndroid Build Coastguard Worker <arg name="serial" type="uint"/> 143*6c119a46SAndroid Build Coastguard Worker <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> 144*6c119a46SAndroid Build Coastguard Worker <arg name="surface" type="object" interface="wl_surface"/> 145*6c119a46SAndroid Build Coastguard Worker <arg name="fingers" type="uint" summary="number of fingers"/> 146*6c119a46SAndroid Build Coastguard Worker </event> 147*6c119a46SAndroid Build Coastguard Worker 148*6c119a46SAndroid Build Coastguard Worker <event name="update"> 149*6c119a46SAndroid Build Coastguard Worker <description summary="multi-finger pinch motion"> 150*6c119a46SAndroid Build Coastguard Worker This event is sent when a multi-finger pinch gesture changes the 151*6c119a46SAndroid Build Coastguard Worker position of the logical center, the rotation or the relative scale. 152*6c119a46SAndroid Build Coastguard Worker 153*6c119a46SAndroid Build Coastguard Worker The dx and dy coordinates are relative coordinates in the 154*6c119a46SAndroid Build Coastguard Worker surface coordinate space of the logical center of the gesture. 155*6c119a46SAndroid Build Coastguard Worker 156*6c119a46SAndroid Build Coastguard Worker The scale factor is an absolute scale compared to the 157*6c119a46SAndroid Build Coastguard Worker pointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers 158*6c119a46SAndroid Build Coastguard Worker are now twice as far apart as on pointer_gesture_pinch.begin. 159*6c119a46SAndroid Build Coastguard Worker 160*6c119a46SAndroid Build Coastguard Worker The rotation is the relative angle in degrees clockwise compared to the previous 161*6c119a46SAndroid Build Coastguard Worker pointer_gesture_pinch.begin or pointer_gesture_pinch.update event. 162*6c119a46SAndroid Build Coastguard Worker </description> 163*6c119a46SAndroid Build Coastguard Worker <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> 164*6c119a46SAndroid Build Coastguard Worker <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/> 165*6c119a46SAndroid Build Coastguard Worker <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/> 166*6c119a46SAndroid Build Coastguard Worker <arg name="scale" type="fixed" summary="scale relative to the initial finger position"/> 167*6c119a46SAndroid Build Coastguard Worker <arg name="rotation" type="fixed" summary="angle in degrees cw relative to the previous event"/> 168*6c119a46SAndroid Build Coastguard Worker </event> 169*6c119a46SAndroid Build Coastguard Worker 170*6c119a46SAndroid Build Coastguard Worker <event name="end"> 171*6c119a46SAndroid Build Coastguard Worker <description summary="multi-finger pinch end"> 172*6c119a46SAndroid Build Coastguard Worker This event is sent when a multi-finger pinch gesture ceases to 173*6c119a46SAndroid Build Coastguard Worker be valid. This may happen when one or more fingers are lifted or 174*6c119a46SAndroid Build Coastguard Worker the gesture is cancelled. 175*6c119a46SAndroid Build Coastguard Worker 176*6c119a46SAndroid Build Coastguard Worker When a gesture is cancelled, the client should undo state changes 177*6c119a46SAndroid Build Coastguard Worker caused by this gesture. What causes a gesture to be cancelled is 178*6c119a46SAndroid Build Coastguard Worker implementation-dependent. 179*6c119a46SAndroid Build Coastguard Worker </description> 180*6c119a46SAndroid Build Coastguard Worker <arg name="serial" type="uint"/> 181*6c119a46SAndroid Build Coastguard Worker <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> 182*6c119a46SAndroid Build Coastguard Worker <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/> 183*6c119a46SAndroid Build Coastguard Worker </event> 184*6c119a46SAndroid Build Coastguard Worker </interface> 185*6c119a46SAndroid Build Coastguard Worker 186*6c119a46SAndroid Build Coastguard Worker</protocol> 187