Interface WlTouchEventsV9
- All Superinterfaces:
WlTouchEvents
,WlTouchEventsV2
,WlTouchEventsV3
,WlTouchEventsV4
,WlTouchEventsV5
,WlTouchEventsV6
,WlTouchEventsV7
,WlTouchEventsV8
The wl_touch interface represents a touchscreen associated with a seat.
Touch interactions can consist of one or more contacts. For each contact, a series of events is generated, starting with a down event, followed by zero or more motion events, and ending with an up event. Events relating to the same contact point can be identified by the ID of the sequence.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel
(WlTouchProxy emitter) touch session cancelledvoid
down
(WlTouchProxy emitter, int serial, int time, WlSurfaceProxy surface, int id, Fixed x, Fixed y) touch down event and beginning of a touch sequencevoid
frame
(WlTouchProxy emitter) end of touch frame eventvoid
motion
(WlTouchProxy emitter, int time, int id, Fixed x, Fixed y) update of touch point coordinatesvoid
orientation
(WlTouchProxy emitter, int id, Fixed orientation) update orientation of touch pointvoid
shape
(WlTouchProxy emitter, int id, Fixed major, Fixed minor) update shape of touch pointvoid
up
(WlTouchProxy emitter, int serial, int time, int id) end of a touch event sequence
-
Field Details
-
VERSION
static final int VERSION- See Also:
-
-
Method Details
-
down
void down(WlTouchProxy emitter, int serial, int time, @Nonnull WlSurfaceProxy surface, int id, @Nonnull Fixed x, @Nonnull Fixed y) touch down event and beginning of a touch sequenceA new touch point has appeared on the surface. This touch point is assigned a unique ID. Future events from this touch point reference this ID. The ID ceases to be valid after a touch up event and may be reused in the future.
- Specified by:
down
in interfaceWlTouchEvents
- Specified by:
down
in interfaceWlTouchEventsV2
- Specified by:
down
in interfaceWlTouchEventsV3
- Specified by:
down
in interfaceWlTouchEventsV4
- Specified by:
down
in interfaceWlTouchEventsV5
- Specified by:
down
in interfaceWlTouchEventsV6
- Specified by:
down
in interfaceWlTouchEventsV7
- Specified by:
down
in interfaceWlTouchEventsV8
- Parameters:
emitter
- The protocol object that emitted the event.serial
- serial number of the touch down eventtime
- timestamp with millisecond granularitysurface
- surface touchedid
- the unique ID of this touch pointx
- surface-local x coordinatey
- surface-local y coordinate
-
up
end of a touch event sequenceThe touch point has disappeared. No further events will be sent for this touch point and the touch point's ID is released and may be reused in a future touch down event.
- Specified by:
up
in interfaceWlTouchEvents
- Specified by:
up
in interfaceWlTouchEventsV2
- Specified by:
up
in interfaceWlTouchEventsV3
- Specified by:
up
in interfaceWlTouchEventsV4
- Specified by:
up
in interfaceWlTouchEventsV5
- Specified by:
up
in interfaceWlTouchEventsV6
- Specified by:
up
in interfaceWlTouchEventsV7
- Specified by:
up
in interfaceWlTouchEventsV8
- Parameters:
emitter
- The protocol object that emitted the event.serial
- serial number of the touch up eventtime
- timestamp with millisecond granularityid
- the unique ID of this touch point
-
motion
update of touch point coordinatesA touch point has changed coordinates.
- Specified by:
motion
in interfaceWlTouchEvents
- Specified by:
motion
in interfaceWlTouchEventsV2
- Specified by:
motion
in interfaceWlTouchEventsV3
- Specified by:
motion
in interfaceWlTouchEventsV4
- Specified by:
motion
in interfaceWlTouchEventsV5
- Specified by:
motion
in interfaceWlTouchEventsV6
- Specified by:
motion
in interfaceWlTouchEventsV7
- Specified by:
motion
in interfaceWlTouchEventsV8
- Parameters:
emitter
- The protocol object that emitted the event.time
- timestamp with millisecond granularityid
- the unique ID of this touch pointx
- surface-local x coordinatey
- surface-local y coordinate
-
frame
end of touch frame eventIndicates the end of a set of events that logically belong together. A client is expected to accumulate the data in all events within the frame before proceeding.
A wl_touch.frame terminates at least one event but otherwise no guarantee is provided about the set of events within a frame. A client must assume that any state not updated in a frame is unchanged from the previously known state.
- Specified by:
frame
in interfaceWlTouchEvents
- Specified by:
frame
in interfaceWlTouchEventsV2
- Specified by:
frame
in interfaceWlTouchEventsV3
- Specified by:
frame
in interfaceWlTouchEventsV4
- Specified by:
frame
in interfaceWlTouchEventsV5
- Specified by:
frame
in interfaceWlTouchEventsV6
- Specified by:
frame
in interfaceWlTouchEventsV7
- Specified by:
frame
in interfaceWlTouchEventsV8
- Parameters:
emitter
- The protocol object that emitted the event.
-
cancel
touch session cancelledSent if the compositor decides the touch stream is a global gesture. No further events are sent to the clients from that particular gesture. Touch cancellation applies to all touch points currently active on this client's surface. The client is responsible for finalizing the touch points, future touch points on this surface may reuse the touch point ID.
No frame event is required after the cancel event.
- Specified by:
cancel
in interfaceWlTouchEvents
- Specified by:
cancel
in interfaceWlTouchEventsV2
- Specified by:
cancel
in interfaceWlTouchEventsV3
- Specified by:
cancel
in interfaceWlTouchEventsV4
- Specified by:
cancel
in interfaceWlTouchEventsV5
- Specified by:
cancel
in interfaceWlTouchEventsV6
- Specified by:
cancel
in interfaceWlTouchEventsV7
- Specified by:
cancel
in interfaceWlTouchEventsV8
- Parameters:
emitter
- The protocol object that emitted the event.
-
shape
update shape of touch pointSent when a touchpoint has changed its shape.
This event does not occur on its own. It is sent before a wl_touch.frame event and carries the new shape information for any previously reported, or new touch points of that frame.
Other events describing the touch point such as wl_touch.down, wl_touch.motion or wl_touch.orientation may be sent within the same wl_touch.frame. A client should treat these events as a single logical touch point update. The order of wl_touch.shape, wl_touch.orientation and wl_touch.motion is not guaranteed. A wl_touch.down event is guaranteed to occur before the first wl_touch.shape event for this touch ID but both events may occur within the same wl_touch.frame.
A touchpoint shape is approximated by an ellipse through the major and minor axis length. The major axis length describes the longer diameter of the ellipse, while the minor axis length describes the shorter diameter. Major and minor are orthogonal and both are specified in surface-local coordinates. The center of the ellipse is always at the touchpoint location as reported by wl_touch.down or wl_touch.move.
This event is only sent by the compositor if the touch device supports shape reports. The client has to make reasonable assumptions about the shape if it did not receive this event.
- Specified by:
shape
in interfaceWlTouchEventsV6
- Specified by:
shape
in interfaceWlTouchEventsV7
- Specified by:
shape
in interfaceWlTouchEventsV8
- Parameters:
emitter
- The protocol object that emitted the event.id
- the unique ID of this touch pointmajor
- length of the major axis in surface-local coordinatesminor
- length of the minor axis in surface-local coordinates
-
orientation
update orientation of touch pointSent when a touchpoint has changed its orientation.
This event does not occur on its own. It is sent before a wl_touch.frame event and carries the new shape information for any previously reported, or new touch points of that frame.
Other events describing the touch point such as wl_touch.down, wl_touch.motion or wl_touch.shape may be sent within the same wl_touch.frame. A client should treat these events as a single logical touch point update. The order of wl_touch.shape, wl_touch.orientation and wl_touch.motion is not guaranteed. A wl_touch.down event is guaranteed to occur before the first wl_touch.orientation event for this touch ID but both events may occur within the same wl_touch.frame.
The orientation describes the clockwise angle of a touchpoint's major axis to the positive surface y-axis and is normalized to the -180 to +180 degree range. The granularity of orientation depends on the touch device, some devices only support binary rotation values between 0 and 90 degrees.
This event is only sent by the compositor if the touch device supports orientation reports.
- Specified by:
orientation
in interfaceWlTouchEventsV6
- Specified by:
orientation
in interfaceWlTouchEventsV7
- Specified by:
orientation
in interfaceWlTouchEventsV8
- Parameters:
emitter
- The protocol object that emitted the event.id
- the unique ID of this touch pointorientation
- angle between major axis and positive surface y-axis in degrees
-