| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # fuchsia.accessibility.virtualkeyboard |
| |
| <div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div> |
| |
| |
| ## **PROTOCOLS** |
| |
| ## Listener {#Listener} |
| *Defined in [fuchsia.accessibility.virtualkeyboard/virtual_keyboard.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.accessibility.virtualkeyboard/virtual_keyboard.fidl;l=60)* |
| <p>Provides the ability to inform an interested party ("listener") of changes |
| in virtual keyboard state (e.g. visibility).</p> |
| <h1>Roles</h1> |
| <p>This protocol will typically be:</p> |
| <ul> |
| <li>Implemented by platform components which implement accessibility. |
| For example, a11y_manager.</li> |
| <li>Consumed by components which provide a GUI affordance for text input.</li> |
| </ul> |
| <h1>Notes</h1> |
| <p>When the consumer of this protocol observes that the channel is closed, |
| it (the protocol consumer) should retry <code>Registry.Register()</code>, applying |
| back-off logic to avoid tight loops.</p> |
| |
| |
| ### OnVisibilityChanged {#Listener.OnVisibilityChanged} |
| |
| <p>Informs the <code>Listener</code> of a change in keyboard visibility.</p> |
| <p>Consumers of this protocol should wait for each call to be acknowledged |
| before calling again, to avoid queueing large numbers of updates.</p> |
| |
| |
| |
| #### Request {#Listener.OnVisibilityChanged_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>updated_visibility</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#Listener.OnVisibilityChanged_Response} |
| |
| <EMPTY> |
| |
| ## Registry {#Registry} |
| *Defined in [fuchsia.accessibility.virtualkeyboard/virtual_keyboard.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.accessibility.virtualkeyboard/virtual_keyboard.fidl;l=21)* |
| <p>Provides the ability to register a virtual keyboard.</p> |
| <p>This protocol exists to bind <code>Listener</code>s to <code>View</code>s (via <code>ViewRef</code>s). |
| The binding allows, e.g., the accessibility subsystem determine if an |
| interaction with the <code>View</code> should result in a focus transfer.</p> |
| <h1>Roles</h1> |
| <p>This protocol will typically be:</p> |
| <ul> |
| <li>Implemented by platform components which implement accessibility. |
| For example, a11y_manager.</li> |
| <li>Consumed by components which provide a GUI affordance for text input.</li> |
| </ul> |
| |
| |
| ### Register {#Registry.Register} |
| |
| <p>Registers the <code>View</code> referenced by <code>view_ref</code> as a <code>View</code> |
| which may contain a virtual keyboard.</p> |
| <p>The presence or absence of a virtual keyboard within the <code>View</code> |
| may change dynamically.</p> |
| <ul> |
| <li>The initial state is indicated by <code>is_visible</code>.</li> |
| <li>The <code>Registry</code> consumer will update state by invoking |
| methods on the provided <code>request<Listener></code>.</li> |
| </ul> |
| <h1>Notes</h1> |
| <ul> |
| <li>The implementer may limit the number of simultaneous registrations |
| allowed (e.g. only allowing a single registration at a time).</li> |
| <li>The implementer should monitor the provided <code>ViewRef</code> for a |
| <code>ZX_EVENTPAIR_PEER_CLOSED</code> signal (see documentation for |
| <code>fuchsia.ui.views.ViewRefControl</code>).</li> |
| <li>If the request would exceed the simultaneous registration limit, |
| or when the <code>ViewRef</code> receives <code>ZX_EVENTPAIR_PEER_CLOSED</code>, the |
| implementer should dispose of <code>listener</code>.</li> |
| </ul> |
| |
| |
| |
| #### Request {#Registry.Register_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>view_ref</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.ui.views/'>fuchsia.ui.views</a>/<a class='link' href='../fuchsia.ui.views/#ViewRef'>ViewRef</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>is_visible</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>listener</code></td> |
| <td> |
| <code>server_end<<a class='link' href='#Listener'>Listener</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| |