class ViewRef

Defined at line 439 of file fidling/gen/sdk/fidl/fuchsia.ui.views/fuchsia.ui.views/cpp/fidl/fuchsia.ui.views/cpp/natural_types.h

A ViewRef is a handle to a kernel object which identifies a unique View

across the system. Two ViewRefs to the same View have the same KOID.

Clients use a ViewRef to identify a View, to validate a View, and to

receive a View invalidation signal.

As part of View creation, the client creates a linked

ViewRef/ViewRefControl pair and hands the pair to Scenic (ViewRefControl is

described below). The client must remove the ViewRef's signal

capabilities; otherwise the View is not created.

The client may freely clone its ViewRef and share it, even before sending

it to Scenic.

Example 1. Accessibility accepts a ViewRef from a client to group the

semantic nodes, and semantic operations, associated with a client's View.

It must validate a client's ViewRef with Scenic.

Example 2. We use ViewRefs to create a FocusChain, which identifies Views

considered as "in-focus" down the View hierarchy. When a View is destroyed,

Scenic signals to all FocusChain holders that the ViewRef is now invalid.

Public Methods

void ViewRef (Storage_ storage)
void ViewRef (::zx::eventpair reference)
void ViewRef ()

Default constructs a |ViewRef| only if all of its members are default constructible.

Defined at line 450 of file fidling/gen/sdk/fidl/fuchsia.ui.views/fuchsia.ui.views/cpp/fidl/fuchsia.ui.views/cpp/natural_types.h

void ViewRef (ViewRef && )

Defined at line 453 of file fidling/gen/sdk/fidl/fuchsia.ui.views/fuchsia.ui.views/cpp/fidl/fuchsia.ui.views/cpp/natural_types.h

ViewRef & operator= (ViewRef && )

Defined at line 454 of file fidling/gen/sdk/fidl/fuchsia.ui.views/fuchsia.ui.views/cpp/fidl/fuchsia.ui.views/cpp/natural_types.h

const ::zx::eventpair & reference ()
::zx::eventpair & reference ()
ViewRef & reference (::zx::eventpair value)

Setter for reference.

void ViewRef (::fidl::internal::DefaultConstructPossiblyInvalidObjectTag )

Friends

class MemberVisitor
class NaturalStructCodingTraits