ei_touchscreen
Touchscreen Object
Interface for touchscreen requests and events.
This interface is only provided once per device and where a client
requests ei_touchscreen.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 releasd.
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_touchscreen.release
Since Version1 Request Opcode0
ei_touchscreen.release()
Notification that the client is no longer interested in this touchscreen.
The EIS implementation will release any resources related to this touch and
send the ei_touchscreen.destroyed
event once complete.
ei_touchscreen.down
Since Version1 Request Opcode1
ei_touchscreen.down(touchid, x, y)
Argument | Type | Summary |
---|---|---|
touchid | uint32 |
a unique touch id to identify this touch |
x | float |
touch x coordinate in logical pixels |
y | float |
touch y coordinate in logical pixels |
This request is only available for clients of ei_handshake.context_type.sender
.
Notifies the EIS implementation about a new touch logically down at the
given coordinates. The touchid is a unique id for this touch. Touchids
may be re-used after ei_touchscreen.up.
The x/y coordinates must be within the device’s regions or the event and future
ei_touchscreen.motion
events with the same touchid are silently discarded.
It is a protocol violation to send a touch down in the same frame as a touch motion or touch up.
ei_touchscreen.motion
Since Version1 Request Opcode2
ei_touchscreen.motion(touchid, x, y)
Argument | Type | Summary |
---|---|---|
touchid | uint32 |
a unique touch id to identify this touch |
x | float |
touch x coordinate in logical pixels |
y | float |
touch y coordinate in logical pixels |
This request is only available for clients of ei_handshake.context_type.sender
.
Notifies the EIS implementation about an existing touch changing position to
the given coordinates. The touchid is the unique id for this touch previously
sent with ei_touchscreen.down.
The x/y coordinates must be within the device’s regions or the event is silently discarded.
It is a protocol violation to send a touch motion in the same frame as a touch down or touch up.
ei_touchscreen.up
Since Version1 Request Opcode3
ei_touchscreen.up(touchid)
Argument | Type | Summary |
---|---|---|
touchid | uint32 |
a unique touch id to identify this touch |
This request is only available for clients of ei_handshake.context_type.sender
.
Notifies the EIS implementation about an existing touch being logically
up. The touchid is the unique id for this touch previously
sent with ei_touchscreen.down.
If a touch is cancelled via ei_touchscreen.cancel
, the ei_touchscreen.up
request must not be sent for this same touch. Likewise, a touch released
with ei_touchscreen.up
must not be cancelled.
The touchid may be re-used after this request.
It is a protocol violation to send a touch up in the same frame as a touch motion or touch down.
ei_touchscreen.cancel
Since Version2 Request Opcode4
ei_touchscreen.cancel(touchid)
Argument | Type | Summary |
---|---|---|
touchid | uint32 |
a unique touch id to identify this touch |
This request is only available for clients of ei_handshake.context_type.sender
.
Notifies the EIS implementation about an existing touch being cancelled. This typically means that any effects the touch may have had on the user interface should be reverted or otherwise made inconsequential.
This request replaces ei_touchscreen.up
for the same touch.
If a touch is cancelled via ei_touchscreen.cancel
, the ei_touchscreen.up
request must not be sent for this same touch. Likewise, a touch released
with ei_touchscreen.up
must not be cancelled.
The touchid is the unique id for this touch previously
sent with ei_touchscreen.down.
The touchid may be re-used after this request.
It is a protocol violation to send a touch cancel in the same frame as a touch motion or touch down.
Events
ei_touchscreen.destroyed
Since Version1 Event Opcode0
ei_touchscreen.destroyed(serial)
Argument | Type | Summary |
---|---|---|
serial | uint32 |
this event’s serial number |
Immediately after sending this request, the object is considered destroyed by the EIS implementation. It must no longer be used by the client.
This touch has been removed and a client should release all associated resources.
This ei_touchscreen
object will be destroyed by the EIS implementation immmediately after
after this event is sent and as such the client must not attempt to use
it after that point.
ei_touchscreen.down
Since Version1 Event Opcode1
ei_touchscreen.down(touchid, x, y)
Argument | Type | Summary |
---|---|---|
touchid | uint32 |
|
x | float |
|
y | float |
This event is only available for clients of ei_handshake.context_type.receiver
.
See the ei_touchscreen.down
request for details.
It is a protocol violation to send this request for a client
of an ei_handshake.context_type
other than receiver.
It is a protocol violation to send a touch down in the same frame as a touch motion or touch up.
ei_touchscreen.motion
Since Version1 Event Opcode2
ei_touchscreen.motion(touchid, x, y)
Argument | Type | Summary |
---|---|---|
touchid | uint32 |
|
x | float |
|
y | float |
This event is only available for clients of ei_handshake.context_type.receiver
.
See the ei_touchscreen.motion
request for details.
It is a protocol violation to send this request for a client
of an ei_handshake.context_type
other than receiver.
It is a protocol violation to send a touch motion in the same frame as a touch down or touch up.
ei_touchscreen.up
Since Version1 Event Opcode3
ei_touchscreen.up(touchid)
Argument | Type | Summary |
---|---|---|
touchid | uint32 |
This event is only available for clients of ei_handshake.context_type.receiver
.
See the ei_touchscreen.up
request for details.
It is a protocol violation to send this request for a client
of an ei_handshake.context_type
other than receiver.
If a touch is released via ei_touchscreen.up
, no ei_touchscreen.cancel
event is sent for this same touch. Likewise, a touch released
with ei_touchscreen.cancel
must not be released via ei_touchscreen.up.
It is a protocol violation to send a touch up in the same frame as a touch motion or touch down.
ei_touchscreen.cancel
Since Version2 Event Opcode4
ei_touchscreen.cancel(touchid)
Argument | Type | Summary |
---|---|---|
touchid | uint32 |
This event is only available for clients of ei_handshake.context_type.receiver
.
See the ei_touchscreen.cancel
request for details.
It is a protocol violation to send this event for a client
of an ei_handshake.context_type
other than receiver.
If a touch is cancelled via ei_touchscreen.cancel
, no ei_touchscreen.up
event is sent for this same touch. Likewise, a touch released
with ei_touchscreen.up
must not be cancelled via ei_touchscreen.cancel.
It is a protocol violation to send a touch cancel event in the same frame as a touch motion or touch down.