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: boolWhether the UI should be rendered anyways due to a (programmatic or user input) scroll event
callbacks_update_screen: UpdateWhether 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: boolWhether the cursor changed in the callbacks
Implementations§
Source§impl CallCallbacksResult
impl CallCallbacksResult
pub fn cursor_changed(&self) -> bool
pub fn focus_changed(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CallCallbacksResult
impl RefUnwindSafe for CallCallbacksResult
impl Send for CallCallbacksResult
impl Sync for CallCallbacksResult
impl Unpin for CallCallbacksResult
impl UnwindSafe for CallCallbacksResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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