fuchsia.ui.input.accessibility

PROTOCOLS

PointerEventRegistry

Defined in fuchsia.ui.input.accessibility/accessibility.fidl

PointerEventRegistration allows an accessibility service to register a pointer event listener, so that it can intercept pointer events before they reach clients.

Register

Registers a listener to start receiving incoming pointer events. For now, only one listener is allowed and the first to register is honored.

Request

NameType
pointer_event_listener PointerEventListener

PointerEventListener

Defined in fuchsia.ui.input.accessibility/accessibility.fidl

A PointerEventListener receives pointer events and decides to consume them or not. TODO(fxb/36429): Investigate flow control mechanisms for a11y input events.

OnEvent

Sends a PointerEvent to an accessibility service. An event is returned at any time to indicate whether the pointer event stream was consumed / rejected for a particular stream of pointer events related to a device_id and a pointer_id. A stream is a sequence of pointer events starting with an event with phase DOWN, followed by any number of MOVE, ending in an UP phase event. The event can arrive while the stream is in progress or when it has already finished. The resulting behavior depends on how it was handled, please see EventHandling above.

Request

NameType
pointer_event PointerEvent

OnStreamHandled

Response

NameType
device_id uint32
pointer_id uint32
handled EventHandling

ENUMS

EventHandling

Type: uint32

Defined in fuchsia.ui.input.accessibility/accessibility.fidl

Possible ways an accessibility listener can process pointer events.

NameValueDescription
CONSUMED 1

The listener consumes all the pointer events for (device_id, pointer_id) until the next UP event.

REJECTED 2

The listener rejects the remaining pointer events for (device_id, pointer_id), and observed (past) and expected (future) pointer events until the next UP event are to be sent for regular input dispatch.

TABLES

PointerEvent

Defined in fuchsia.ui.input.accessibility/accessibility.fidl

A PointerEvent is a privileged pointer event that has local view and global screen coordinates as well as some metadata about the event type.

OrdinalNameTypeDescription
1 event_time uint64

Time the event was delivered. The time is in nanoseconds and corresponds to the uptime of the machine.

2 device_id uint32

ID of the device that captured this event.

3 pointer_id uint32

ID of the pointer that identifies this event.

4 type fuchsia.ui.input/PointerEventType

Type of this event, e.g. touch, mouse, etc.

5 phase fuchsia.ui.input/PointerEventPhase

Phase of this event, e.g. add, down, etc.

6 ndc_point fuchsia.math/PointF

The coordinate of this pointer event in normalized device coordinates. Normalized device coordinates have dimensions in the range [-1, 1], with (0, 0) being the center of the device and axes aligned with the native display.

7 viewref_koid zx/koid

The viewref koid of the top most view hit for this pointer event. This field is set to ZX_KOID_INVALID when there is no view hit and local_point is undefined.

8 local_point fuchsia.math/PointF

The point of this pointer event in local view coordinates.