ei_gesture_swipe
Swipe Gesture Object
Interface for swipe gesture requests and events.
This interface is only provided once per device and where
a client requests ei_gesture_swipe.release the interface
does not get re-initialized. An EIS implementation may
adjust the behavior of the device (including removing the
device) if the interface is released.
Note that for a client to receive objects of this type, it must announce
support for this interface in ei_handshake.interface_version.
Requests
ei_gesture_swipe.release
Since Version1 Request Opcode0
Notification that the client is no longer interested
in swipe gestures. The EIS implementation will release
any resources related to this gesture and send the
ei_gesture_swipe.destroyed event once complete.
ei_gesture_swipe.begin
Since Version1 Request Opcode1
| Argument | Type | Summary |
|---|---|---|
| fingers | uint32 |
number of fingers |
Note
This request is only available for clients of ei_handshake.context_type.sender.
Starts a new swipe gesture with the given number of fingers.
The finger count must be between 1 and 5 (inclusive). While theoretically it is possible to have single-finger swipe gestures, clients are advised to avoid these as an EIS implementation is likely to immediately cancel (or silently ignore) these.
Only one swipe gesture may be active at any time, it is a protocol
violation to send a ei_gesture_swipe.begin request before
terminating the previous gesture (if any) with
ei_gesture_swipe.end.
A swipe gesture may be aborted by the EIS implementation
with an ei_gesture_swipe.aborted event.
ei_gesture_swipe.update
Since Version1 Request Opcode2
| Argument | Type | Summary |
|---|---|---|
| dx | float |
the delta x movement in logical pixels |
| dy | float |
the delta y movement in logical pixels |
Note
This request is only available for clients of ei_handshake.context_type.sender.
Moves the gesture’s logical center by the given delta.
This request may be sent at most once per device frame and only
after a gesture has begun via ei_gesture_swipe.begin and only
before the gesture terminates with ei_gesture_swipe.end.
This request must not be sent in the same frame as begin or end.
ei_gesture_swipe.end
Since Version1 Request Opcode3
| Argument | Type | Summary |
|---|---|---|
| is_cancelled | uint32 |
1 if the gesture was cancelled or 0 otherwise |
Note
This request is only available for clients of ei_handshake.context_type.sender.
Logically ends this gesture.
Events
ei_gesture_swipe.destroyed
Since Version1 Event Opcode0
| Argument | Type | Summary |
|---|---|---|
| serial | uint32 |
this event’s serial number |
Destructor
Immediately after sending this request, the object is considered destroyed by the EIS implementation. It must no longer be used by the client.
This gesture has been removed and a client should release all associated resources.
This ei_gesture_swipe object will be destroyed by the EIS
implementation immediately after this event is sent
and as such the client must not attempt to use
it after that point.
ei_gesture_swipe.aborted
Since Version1 Event Opcode1
| Argument | Type | Summary |
|---|---|---|
| serial | uint32 |
this event’s serial number |
Note
This event is only available for clients of ei_handshake.context_type.sender.
The current gesture has been aborted by the EIS
implementation. The client must discard the current
gesture and not send further ei_gesture_swipe.update
and ei_gesture_swipe.end events. Due to the
asynchronous nature of the protocol, an EIS
implementation must allow for ei_gesture_swipe.update
and ei_gesture_swipe.end events to be received after
sending ei_gesture_swipe.aborted. These events must
be discarded.
The client may begin a new gesture in the future
using ei_gesture_swipe.begin.
ei_gesture_swipe.begin
Since Version1 Event Opcode2
| Argument | Type | Summary |
|---|---|---|
| fingers | uint32 |
number of fingers |
Note
This event is only available for clients of ei_handshake.context_type.receiver.
See the ei_gesture_swipe.begin request for details.
ei_gesture_swipe.update
Since Version1 Event Opcode3
| Argument | Type | Summary |
|---|---|---|
| dx | float |
the delta x movement in logical pixels |
| dy | float |
the delta y movement in logical pixels |
Note
This event is only available for clients of ei_handshake.context_type.receiver.
See the ei_gesture_swipe.update request for details.
ei_gesture_swipe.end
Since Version1 Event Opcode4
| Argument | Type | Summary |
|---|---|---|
| is_cancelled | uint32 |
1 if the gesture was cancelled or 0 otherwise |
Note
This event is only available for clients of ei_handshake.context_type.receiver.
See the ei_gesture_swipe.end request for details.