pub struct CallbackInfo { /* private fields */ }Expand description
Information about the callback that is passed to the callback whenever a callback is invoked
Implementations§
Source§impl CallbackInfo
impl CallbackInfo
pub fn new<'a, 'b>( layout_results: &'a [LayoutResult], renderer_resources: &'a RendererResources, previous_window_state: &'a Option<FullWindowState>, current_window_state: &'a FullWindowState, modifiable_window_state: &'a mut WindowState, gl_context: &'a OptionGlContextPtr, image_cache: &'a mut ImageCache, system_fonts: &'a mut FcFontCache, timers: &'a mut FastHashMap<TimerId, Timer>, threads: &'a mut FastHashMap<ThreadId, Thread>, timers_removed: &'a mut FastBTreeSet<TimerId>, threads_removed: &'a mut FastBTreeSet<ThreadId>, current_window_handle: &'a RawWindowHandle, new_windows: &'a mut Vec<WindowCreateOptions>, system_callbacks: &'a ExternalSystemCallbacks, stop_propagation: &'a mut bool, focus_target: &'a mut Option<FocusTarget>, words_changed_in_callbacks: &'a mut BTreeMap<DomId, BTreeMap<NodeId, AzString>>, images_changed_in_callbacks: &'a mut BTreeMap<DomId, BTreeMap<NodeId, (ImageRef, UpdateImageType)>>, image_masks_changed_in_callbacks: &'a mut BTreeMap<DomId, BTreeMap<NodeId, ImageMask>>, css_properties_changed_in_callbacks: &'a mut BTreeMap<DomId, BTreeMap<NodeId, Vec<CssProperty>>>, current_scroll_states: &'a BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, ScrollPosition>>, nodes_scrolled_in_callback: &'a mut BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, LogicalPosition>>, hit_dom_node: DomNodeId, cursor_relative_to_item: OptionLogicalPosition, cursor_in_viewport: OptionLogicalPosition, ) -> Self
pub fn get_hit_node(&self) -> DomNodeId
pub fn get_system_time_fn(&self) -> GetSystemTimeCallback
pub fn get_thread_create_fn(&self) -> CreateThreadCallback
pub fn get_cursor_relative_to_node(&self) -> OptionLogicalPosition
pub fn get_cursor_relative_to_viewport(&self) -> OptionLogicalPosition
pub fn get_current_window_state(&self) -> WindowState
pub fn get_current_window_flags(&self) -> WindowFlags
pub fn get_current_keyboard_state(&self) -> KeyboardState
pub fn get_current_mouse_state(&self) -> MouseState
pub fn get_previous_window_state(&self) -> Option<WindowState>
pub fn get_previous_keyboard_state(&self) -> Option<KeyboardState>
pub fn get_previous_mouse_state(&self) -> Option<MouseState>
pub fn get_current_window_handle(&self) -> RawWindowHandle
pub fn get_current_time(&self) -> Instant
pub fn get_gl_context(&self) -> OptionGlContextPtr
pub fn get_scroll_position(&self, node_id: DomNodeId) -> Option<LogicalPosition>
pub fn set_scroll_position( &mut self, node_id: DomNodeId, scroll_position: LogicalPosition, )
pub fn get_parent(&self, node_id: DomNodeId) -> Option<DomNodeId>
pub fn get_previous_sibling(&self, node_id: DomNodeId) -> Option<DomNodeId>
pub fn get_next_sibling(&self, node_id: DomNodeId) -> Option<DomNodeId>
pub fn get_first_child(&self, node_id: DomNodeId) -> Option<DomNodeId>
pub fn get_last_child(&self, node_id: DomNodeId) -> Option<DomNodeId>
pub fn get_dataset(&mut self, node_id: DomNodeId) -> Option<RefAny>
pub fn get_node_id_of_root_dataset( &mut self, search_key: RefAny, ) -> Option<DomNodeId>
pub fn set_window_state(&mut self, new_state: WindowState)
pub fn set_window_flags(&mut self, new_flags: WindowFlags)
pub fn set_css_property(&mut self, node_id: DomNodeId, prop: CssProperty)
pub fn set_focus(&mut self, target: FocusTarget)
pub fn get_string_contents(&self, node_id: DomNodeId) -> Option<AzString>
pub fn set_string_contents( &mut self, node_id: DomNodeId, new_string_contents: AzString, )
pub fn get_inline_text(&self, node_id: DomNodeId) -> Option<InlineText>
Sourcepub fn get_font_ref(&self, node_id: DomNodeId) -> Option<FontRef>
pub fn get_font_ref(&self, node_id: DomNodeId) -> Option<FontRef>
Returns the FontRef for the given NodeId
pub fn get_text_layout_options( &self, node_id: DomNodeId, ) -> Option<ResolvedTextLayoutOptions>
pub fn get_computed_css_property( &self, node_id: DomNodeId, property_type: CssPropertyType, ) -> Option<CssProperty>
pub fn stop_propagation(&mut self)
pub fn create_window(&mut self, window: WindowCreateOptions)
Sourcepub fn start_thread(
&mut self,
thread_initialize_data: RefAny,
writeback_data: RefAny,
callback: ThreadCallbackType,
) -> Option<ThreadId>
pub fn start_thread( &mut self, thread_initialize_data: RefAny, writeback_data: RefAny, callback: ThreadCallbackType, ) -> Option<ThreadId>
Starts a thread, returns Some(thread_id) if the thread_initialize_data is the only copy
pub fn send_thread_msg( &mut self, thread_id: ThreadId, msg: ThreadSendMsg, ) -> bool
Sourcepub fn stop_thread(&mut self, thread_id: ThreadId) -> bool
pub fn stop_thread(&mut self, thread_id: ThreadId) -> bool
Removes and stops a thread, sending one last ThreadSendMsg::TerminateThread
pub fn start_timer(&mut self, timer: Timer) -> TimerId
pub fn start_animation( &mut self, dom_node_id: DomNodeId, animation: Animation, ) -> Option<TimerId>
pub fn stop_timer(&mut self, timer_id: TimerId) -> bool
pub fn get_node_position(&self, node_id: DomNodeId) -> Option<PositionInfo>
pub fn get_node_size(&self, node_id: DomNodeId) -> Option<LogicalSize>
Sourcepub fn add_image(&mut self, css_id: AzString, image: ImageRef)
pub fn add_image(&mut self, css_id: AzString, image: ImageRef)
Adds an image to the internal image cache
pub fn has_image(&self, css_id: &AzString) -> bool
pub fn get_image(&self, css_id: &AzString) -> Option<ImageRef>
Sourcepub fn delete_image(&mut self, css_id: &AzString)
pub fn delete_image(&mut self, css_id: &AzString)
Deletes an image from the internal image cache
pub fn update_image( &mut self, node_id: DomNodeId, new_image: ImageRef, image_type: UpdateImageType, )
pub fn update_image_mask( &mut self, node_id: DomNodeId, new_image_mask: ImageMask, )
Trait Implementations§
Source§impl Clone for CallbackInfo
impl Clone for CallbackInfo
Auto Trait Implementations§
impl Freeze for CallbackInfo
impl RefUnwindSafe for CallbackInfo
impl !Send for CallbackInfo
impl !Sync for CallbackInfo
impl Unpin for CallbackInfo
impl UnwindSafe for CallbackInfo
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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