pub struct FocusChain {
pub focus_chain: Option<Vec<ViewRef>>,
/* private fields */
}
Expand description
A FocusChain tracks the status of the View hierarchy as View focus changes.
Reception. Only certain components may receive a FocusChain, as it captures global information about the scene graph.
Fields§
§focus_chain: Option<Vec<ViewRef>>
The focus_chain
is reported in order of dominance in the View
hierarchy; each adjacent pair of elements represents a
parent-child relationship.
The focus_chain
MAY be unset when FocusChain
message is received, if
the message is sent very early in the scene setup, before the first
view is available.
When focus_chain
is set, however, the root View is always present
and occupies slot 0 in the focus_chain
. 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 any one if its ViewRefs is invalid.
Trait Implementations§
Source§impl Debug for FocusChain
impl Debug for FocusChain
Source§impl Decode<FocusChain, DefaultFuchsiaResourceDialect> for FocusChain
impl Decode<FocusChain, DefaultFuchsiaResourceDialect> for FocusChain
Source§impl Default for FocusChain
impl Default for FocusChain
Source§fn default() -> FocusChain
fn default() -> FocusChain
Source§impl Encode<FocusChain, DefaultFuchsiaResourceDialect> for &mut FocusChain
impl Encode<FocusChain, DefaultFuchsiaResourceDialect> for &mut FocusChain
Source§impl PartialEq for FocusChain
impl PartialEq for FocusChain
Source§impl ResourceTypeMarker for FocusChain
impl ResourceTypeMarker for FocusChain
Source§type Borrowed<'a> = &'a mut FocusChain
type Borrowed<'a> = &'a mut FocusChain
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for FocusChain
impl TypeMarker for FocusChain
Source§type Owned = FocusChain
type Owned = FocusChain
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.