blob: 564b1d8a4c3c7b1325a6958be65bd892cdc78e29 [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.ui.test.scene
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 9</span></div>
## **PROTOCOLS**
## Controller {#Controller}
*Defined in [fuchsia.ui.test.scene/controller.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.test.scene/controller.fidl;l=15)*
<p>Controls a UI test scene. Allows a test to attach test Views to the scene
and add View-related instrumentation.</p>
### AttachClientView {#Controller.AttachClientView}
<p>*** NOTE: <code>ViewProvider</code> is no longer the preferred way for a parent
and child view to agree on a ViewportCreationToken / ViewCreationToken
pair. Flatland-based clients are encouraged to use <code>PresentView</code> (below)
instead of <code>AttachClientView</code>.</p>
<p>Elicits the server to request a view using the
<code>fuchsia.ui.app.ViewProvider</code> handle provided, and attach it to the
scene.</p>
<p>RETURN VALUE</p>
<p>This method returns the KOID for the client view's <code>ViewRef</code>.</p>
<p>SYNCHRONIZATION</p>
<p>This call returns as soon as the client <code>ViewRef</code> is available. Note
that this signal does NOT necessarily indicate that the view has been
attached to the scene.</p>
<p>LIFE CYCLE</p>
<p>Clients may drop the <code>Controller</code> connection once <code>AttachClientView</code> has
returned.</p>
#### Request {#Controller.AttachClientView_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>payload</code></td>
<td>
<code><a class='link' href='#ControllerAttachClientViewRequest'>ControllerAttachClientViewRequest</a></code>
</td>
</tr>
</table>
#### Response {#Controller.AttachClientView_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>view_ref_koid</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#koid'>koid</a></code>
</td>
</tr>
</table>
### PresentClientView {#Controller.PresentClientView}
<p>Elicits the server to create a viewport using <code>viewport_creation_token</code>.</p>
<p>LIFE CYCLE</p>
<p>Clients may drop the <code>Controller</code> connection once <code>PresentClientView</code> has
returned.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
#### Request {#Controller.PresentClientView_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>payload</code></td>
<td>
<code><a class='link' href='#ControllerPresentClientViewRequest'>ControllerPresentClientViewRequest</a></code>
</td>
</tr>
</table>
### RegisterViewTreeWatcher {#Controller.RegisterViewTreeWatcher}
<p>Registers a <code>ViewTreeWatcher</code> on the client's behalf.</p>
<p>The <code>ViewTreeWatcher</code> registered on behalf of the client will currently
be scoped globally; we intend to restrict the scope to the client view's
subtree as soon as it's feasible to do so.</p>
<p>For more information on geometry observation, see the documentation
in //sdk/fidl/fuchsia.ui.observation.geometry/watcher.fidl.</p>
#### Request {#Controller.RegisterViewTreeWatcher_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>watcher</code></td>
<td>
<code>server_end&lt;<a class='link' href='../fuchsia.ui.observation.geometry/'>fuchsia.ui.observation.geometry</a>/<a class='link' href='../fuchsia.ui.observation.geometry/#ViewTreeWatcher'>ViewTreeWatcher</a>&gt;</code>
</td>
</tr>
</table>
#### Response {#Controller.RegisterViewTreeWatcher_Response}
&lt;EMPTY&gt;
## **TABLES**
### ControllerAttachClientViewRequest [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#ControllerAttachClientViewRequest data-text="ControllerAttachClientViewRequest"}
*Defined in [fuchsia.ui.test.scene/controller.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.test.scene/controller.fidl;l=39)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ControllerAttachClientViewRequest.view_provider">
<td><h3 id="ControllerAttachClientViewRequest.view_provider" class="add-link hide-from-toc">1</h3></td>
<td><code>view_provider</code></td>
<td>
<code><a class='link' href='../fuchsia.ui.app/'>fuchsia.ui.app</a>/<a class='link' href='../fuchsia.ui.app/#ViewProvider'>ViewProvider</a></code>
</td>
<td></td>
</tr>
</table>
### ControllerPresentClientViewRequest [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#ControllerPresentClientViewRequest data-text="ControllerPresentClientViewRequest"}
*Defined in [fuchsia.ui.test.scene/controller.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.test.scene/controller.fidl;l=52)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ControllerPresentClientViewRequest.viewport_creation_token">
<td><h3 id="ControllerPresentClientViewRequest.viewport_creation_token" class="add-link hide-from-toc">1</h3></td>
<td><code>viewport_creation_token</code></td>
<td>
<code><a class='link' href='../fuchsia.ui.views/'>fuchsia.ui.views</a>/<a class='link' href='../fuchsia.ui.views/#ViewportCreationToken'>ViewportCreationToken</a></code>
</td>
<td><div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
</table>