CallCallbacksResult

Struct CallCallbacksResult 

Source
pub struct CallCallbacksResult {
Show 15 fields pub should_scroll_render: bool, pub callbacks_update_screen: Update, pub modified_window_state: Option<WindowState>, pub words_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, AzString>>>, pub images_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, (ImageRef, UpdateImageType)>>>, pub image_masks_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, ImageMask>>>, pub css_properties_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, Vec<CssProperty>>>>, pub nodes_scrolled_in_callbacks: Option<BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, LogicalPosition>>>, pub update_focused_node: Option<Option<DomNodeId>>, pub timers: Option<FastHashMap<TimerId, Timer>>, pub threads: Option<FastHashMap<ThreadId, Thread>>, pub timers_removed: Option<FastBTreeSet<TimerId>>, pub threads_removed: Option<FastBTreeSet<ThreadId>>, pub windows_created: Vec<WindowCreateOptions>, pub cursor_changed: bool,
}

Fields§

§should_scroll_render: bool

Whether the UI should be rendered anyways due to a (programmatic or user input) scroll event

§callbacks_update_screen: Update

Whether the callbacks say to rebuild the UI or not

§modified_window_state: Option<WindowState>

WindowState that was (potentially) modified in the callbacks

§words_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, AzString>>>

If a word changed (often times the case with text input), we don’t need to relayout / rerender the whole screen. The result is passed to the relayout() function, which will only change the single node that was modified

§images_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, (ImageRef, UpdateImageType)>>>

A callback can “exchange” and image for a new one without requiring a new display list to be rebuilt. This is important for animated images, especially video.

§image_masks_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, ImageMask>>>

Same as images, clip masks can be changed in callbacks, often the case with vector animations

§css_properties_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, Vec<CssProperty>>>>

If the focus target changes in the callbacks, the function will automatically restyle the DOM and set the new focus target

§nodes_scrolled_in_callbacks: Option<BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, LogicalPosition>>>

If the callbacks have scrolled any nodes, the new scroll position will be stored here

§update_focused_node: Option<Option<DomNodeId>>

Whether the focused node was changed from the callbacks

§timers: Option<FastHashMap<TimerId, Timer>>

Timers that were added in the callbacks

§threads: Option<FastHashMap<ThreadId, Thread>>

Tasks that were added in the callbacks

§timers_removed: Option<FastBTreeSet<TimerId>>

Timers that were added in the callbacks

§threads_removed: Option<FastBTreeSet<ThreadId>>

Tasks that were added in the callbacks

§windows_created: Vec<WindowCreateOptions>

Windows that were created in the callbacks

§cursor_changed: bool

Whether the cursor changed in the callbacks

Implementations§

Trait Implementations§

Source§

impl Debug for CallCallbacksResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.