Skip to main content

CallbackChangeResult

Struct CallbackChangeResult 

Source
pub struct CallbackChangeResult {
Show 22 fields pub timers: FastHashMap<TimerId, Timer>, pub threads: FastHashMap<ThreadId, Thread>, pub timers_removed: FastBTreeSet<TimerId>, pub threads_removed: 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 stop_propagation: bool, pub prevent_default: bool, pub focus_target: Option<FocusTarget>, pub words_changed: BTreeMap<DomId, BTreeMap<NodeId, AzString>>, pub images_changed: BTreeMap<DomId, BTreeMap<NodeId, (ImageRef, UpdateImageType)>>, pub image_callbacks_changed: BTreeMap<DomId, FastBTreeSet<NodeId>>, pub iframes_to_update: BTreeMap<DomId, FastBTreeSet<NodeId>>, pub image_masks_changed: BTreeMap<DomId, BTreeMap<NodeId, ImageMask>>, pub css_properties_changed: BTreeMap<DomId, BTreeMap<NodeId, CssPropertyVec>>, pub nodes_scrolled: BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, LogicalPosition>>, pub modified_window_state: FullWindowState, pub queued_window_states: Vec<FullWindowState>, pub hit_test_update_requested: Option<LogicalPosition>, pub text_input_triggered: Vec<(DomNodeId, Vec<EventFilter>)>,
}
Expand description

Result of applying callback changes

This struct consolidates all the outputs from apply_callback_changes(), eliminating the need for 18+ mutable reference parameters.

Fields§

§timers: FastHashMap<TimerId, Timer>

Timers to add

§threads: FastHashMap<ThreadId, Thread>

Threads to add

§timers_removed: FastBTreeSet<TimerId>

Timers to remove

§threads_removed: FastBTreeSet<ThreadId>

Threads to remove

§windows_created: Vec<WindowCreateOptions>

New windows to create

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

Menus to open

§tooltips_to_show: Vec<(AzString, LogicalPosition)>

Tooltips to show

§hide_tooltip: bool

Whether to hide tooltip

§stop_propagation: bool

Whether stopPropagation() was called

§prevent_default: bool

Whether preventDefault() was called

§focus_target: Option<FocusTarget>

Focus target change

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

Text changes that don’t require full relayout

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

Image changes (for animated images/video)

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

Image callback nodes that need to be re-rendered (for resize/animations) Unlike images_changed, this triggers a callback re-invocation

§iframes_to_update: BTreeMap<DomId, FastBTreeSet<NodeId>>

IFrame nodes that need to be re-rendered (for content updates) This triggers the IFrame callback to be called with DomRecreated reason

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

Clip mask changes (for vector animations)

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

CSS property changes from callbacks

§nodes_scrolled: BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, LogicalPosition>>

Scroll position changes from callbacks

§modified_window_state: FullWindowState

Modified window state

§queued_window_states: Vec<FullWindowState>

Queued window states to apply in sequence (for simulating clicks, etc.) Each state will trigger separate event processing to detect state changes.

§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 processing events

§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

Trait Implementations§

Source§

impl Debug for CallbackChangeResult

Source§

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

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

impl Default for CallbackChangeResult

Source§

fn default() -> CallbackChangeResult

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