Skip to main content

CallCallbacksResult

Struct CallCallbacksResult 

Source
pub struct CallCallbacksResult {
Show 24 fields pub should_scroll_render: bool, pub callbacks_update_screen: Update, pub modified_window_state: Option<FullWindowState>, 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 image_callbacks_changed: Option<BTreeMap<DomId, FastBTreeSet<NodeId>>>, pub css_properties_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, CssPropertyVec>>>, pub nodes_scrolled_in_callbacks: Option<BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, LogicalPosition>>>, pub update_focused_node: FocusUpdateRequest, 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 menus_to_open: Vec<(Menu, Option<LogicalPosition>)>, pub tooltips_to_show: Vec<(AzString, LogicalPosition)>, pub hide_tooltip: bool, pub cursor_changed: bool, pub stop_propagation: bool, pub prevent_default: bool, pub hit_test_update_requested: Option<LogicalPosition>, pub queued_window_states: Vec<FullWindowState>, pub text_input_triggered: Vec<(DomNodeId, Vec<EventFilter>)>,
}
Expand description

Result of calling callbacks, containing all state changes

Fields§

§should_scroll_render: bool

Whether the UI should be rendered due to a scroll event

§callbacks_update_screen: Update

Whether the callbacks say to rebuild the UI or not

§modified_window_state: Option<FullWindowState>

FullWindowState that was (potentially) modified in the callbacks

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

Text changes that don’t require full relayout

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

Image changes (for animated images/video)

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

Clip mask changes (for vector animations)

§image_callbacks_changed: Option<BTreeMap<DomId, FastBTreeSet<NodeId>>>

Image callback changes (for OpenGL texture updates)

§css_properties_changed: Option<BTreeMap<DomId, BTreeMap<NodeId, CssPropertyVec>>>

CSS property changes from callbacks

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

Scroll position changes from callbacks

§update_focused_node: FocusUpdateRequest

Focus change request from callback (if any)

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

Timers added in callbacks

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

Threads added in callbacks

§timers_removed: Option<FastBTreeSet<TimerId>>

Timers removed in callbacks

§threads_removed: Option<FastBTreeSet<ThreadId>>

Threads removed in callbacks

§windows_created: Vec<WindowCreateOptions>

Windows created in callbacks

§menus_to_open: Vec<(Menu, Option<LogicalPosition>)>

Menus to open (context menus or dropdowns)

§tooltips_to_show: Vec<(AzString, LogicalPosition)>

Tooltips to show

§hide_tooltip: bool

Whether to hide the currently displayed tooltip

§cursor_changed: bool

Whether the cursor changed

§stop_propagation: bool

Whether stopPropagation() was called (prevents bubbling up in DOM-style event propagation)

§prevent_default: bool

Whether preventDefault() was called (prevents default browser behavior)

§hit_test_update_requested: Option<LogicalPosition>

Hit test update requested at this position (for Debug API) When set, the shell layer should perform a hit test update before the next event dispatch

§queued_window_states: Vec<FullWindowState>

Queued window states to apply in sequence (for simulating clicks, etc.) The shell layer should apply these one at a time, processing events after each.

§text_input_triggered: Vec<(DomNodeId, Vec<EventFilter>)>

Text input events triggered by CreateTextInput These need to be processed by the recursive event loop to invoke user callbacks Format: Vec<(DomNodeId, Vec)>

Implementations§

Trait Implementations§

Source§

impl CallbackResultRef for CallCallbacksResult

Source§

impl Debug for CallCallbacksResult

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for CallCallbacksResult

Source§

fn default() -> Self

Returns the “default value” for a type. 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.
Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool