fuchsia.ui.focus

PROTOCOLS

FocusChainListener

Defined in fuchsia.ui.focus/focus_chain.fidl

A FocusChainListener receives an updated FocusChain when focus changes.

OnFocusChange

Request

NameType
focus_chain FocusChain

Response

NameType

FocusChainListenerRegistry

Defined in fuchsia.ui.focus/focus_chain.fidl

A FocusChainListenerRegistry allows listening to FocusChain updates.

Register

Request

NameType
listener FocusChainListener

TABLES

FocusChain

Defined in fuchsia.ui.focus/focus_chain.fidl

A FocusChain tracks the status of the View hierarchy as View focus changes.

Description. The focus_chain is a vector of ViewRefs in order of dominance in the View hierarchy; each pair of elements represents a parent-child relationship. The root View is always present and occupies slot 0. The newly-focused View receives a fuchsia.ui.input.FocusEvent and occupies the final slot in the vector. If a View gets destroyed, a FocusChain holder that listens will receive a ZX_EVENTPAIR_PEER_CLOSED signal on the corresponding ViewRef.

Invalidation. A FocusChain is invalid if one if its ViewRefs is invalid. If no View is destroyed, Scenic can still cause invalidation by raising a ZX_USER_SIGNAL_0 on the root ViewRef.

Reception. Only certain components may receive a FocusChain, as it captures global information about the scene graph.

OrdinalNameTypeDescription
1 focus_chain vector<fuchsia.ui.views/ViewRef>