PROTOCOLS
Listener
Defined in fuchsia.accessibility.gesture/gesture_listener.fidl
An interface to listen for accessibility gestures.
Accessibility services offer a set of gestures defined in Type above, which can be targeted by a system UI. Generally, in a touch screen system, there is a set of system-wide gestures which can be performed anywhere, triggering an action that changes some state of the UI. For example, some can offer a way to close an application and go back to their home screen, while others can offer a way to bring a list of running applications that users can choose from. Because those gestures can conflict with assistive technology gestures, accessibility services offer some alternative ones which can be bound to the UI actions.
OnGesture
When accessibility services detect a gesture, the listener is informed of which gesture was performed. The listener has the chance to handle the gesture, setting the result in |handled|. In addition, an |utterance| is also passed back to accessibility, with a custom message to be spoken. The message is expected to be localized, matching the same locale that the UI component is displaying its content. If the utterance is empty, it is assumed that no spoken output is necessary to describe the result of the action.
Request
Name | Type |
---|---|
gesture_type |
Type
|
Response
Name | Type |
---|---|
handled |
bool
|
utterance |
string:16384?
|
ListenerRegistry
Defined in fuchsia.accessibility.gesture/gesture_listener.fidl
An interface for registering a listener of accessibility gestures.
Register
A UI registers itself to start listening for accessibility gestures
through listener
.
Only one listener can be registered at a time.
This registry honors the last Register() call, and a previous listener
is closed.
In case of any failure, the channel of the listener is closed with an
epitaph.
Request
Name | Type |
---|---|
listener |
client_end:Listener
|
Response
<EMPTY>
ENUMS
Type strict
Type: uint32
Defined in fuchsia.accessibility.gesture/gesture_listener.fidl
Gestures types that accessibility offers to a UI component for listening.
Name | Value | Description |
---|---|---|
THREE_FINGER_SWIPE_UP |
1 |
A three-finger swipe up. |
THREE_FINGER_SWIPE_DOWN |
2 |
A three-finger swipe down. |
THREE_FINGER_SWIPE_RIGHT |
3 |
A three-finger swipe right. |
THREE_FINGER_SWIPE_LEFT |
4 |
A three-finger swipe left. |
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
MAX_UTTERANCE_SIZE |
16384
|
uint64 |
Maximum size of a returned utterance. |