CallbackInfo

Struct CallbackInfo 

Source
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

Source

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

Source

pub fn get_hit_node(&self) -> DomNodeId

Source

pub fn get_system_time_fn(&self) -> GetSystemTimeCallback

Source

pub fn get_thread_create_fn(&self) -> CreateThreadCallback

Source

pub fn get_cursor_relative_to_node(&self) -> OptionLogicalPosition

Source

pub fn get_cursor_relative_to_viewport(&self) -> OptionLogicalPosition

Source

pub fn get_current_window_state(&self) -> WindowState

Source

pub fn get_current_window_flags(&self) -> WindowFlags

Source

pub fn get_current_keyboard_state(&self) -> KeyboardState

Source

pub fn get_current_mouse_state(&self) -> MouseState

Source

pub fn get_previous_window_state(&self) -> Option<WindowState>

Source

pub fn get_previous_keyboard_state(&self) -> Option<KeyboardState>

Source

pub fn get_previous_mouse_state(&self) -> Option<MouseState>

Source

pub fn get_current_window_handle(&self) -> RawWindowHandle

Source

pub fn get_current_time(&self) -> Instant

Source

pub fn get_gl_context(&self) -> OptionGlContextPtr

Source

pub fn get_scroll_position(&self, node_id: DomNodeId) -> Option<LogicalPosition>

Source

pub fn set_scroll_position( &mut self, node_id: DomNodeId, scroll_position: LogicalPosition, )

Source

pub fn get_parent(&self, node_id: DomNodeId) -> Option<DomNodeId>

Source

pub fn get_previous_sibling(&self, node_id: DomNodeId) -> Option<DomNodeId>

Source

pub fn get_next_sibling(&self, node_id: DomNodeId) -> Option<DomNodeId>

Source

pub fn get_first_child(&self, node_id: DomNodeId) -> Option<DomNodeId>

Source

pub fn get_last_child(&self, node_id: DomNodeId) -> Option<DomNodeId>

Source

pub fn get_dataset(&mut self, node_id: DomNodeId) -> Option<RefAny>

Source

pub fn get_node_id_of_root_dataset( &mut self, search_key: RefAny, ) -> Option<DomNodeId>

Source

pub fn set_window_state(&mut self, new_state: WindowState)

Source

pub fn set_window_flags(&mut self, new_flags: WindowFlags)

Source

pub fn set_css_property(&mut self, node_id: DomNodeId, prop: CssProperty)

Source

pub fn set_focus(&mut self, target: FocusTarget)

Source

pub fn get_string_contents(&self, node_id: DomNodeId) -> Option<AzString>

Source

pub fn set_string_contents( &mut self, node_id: DomNodeId, new_string_contents: AzString, )

Source

pub fn get_inline_text(&self, node_id: DomNodeId) -> Option<InlineText>

Source

pub fn get_font_ref(&self, node_id: DomNodeId) -> Option<FontRef>

Returns the FontRef for the given NodeId

Source

pub fn get_text_layout_options( &self, node_id: DomNodeId, ) -> Option<ResolvedTextLayoutOptions>

Source

pub fn get_computed_css_property( &self, node_id: DomNodeId, property_type: CssPropertyType, ) -> Option<CssProperty>

Source

pub fn stop_propagation(&mut self)

Source

pub fn create_window(&mut self, window: WindowCreateOptions)

Source

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

Source

pub fn send_thread_msg( &mut self, thread_id: ThreadId, msg: ThreadSendMsg, ) -> bool

Source

pub fn stop_thread(&mut self, thread_id: ThreadId) -> bool

Removes and stops a thread, sending one last ThreadSendMsg::TerminateThread

Source

pub fn start_timer(&mut self, timer: Timer) -> TimerId

Source

pub fn start_animation( &mut self, dom_node_id: DomNodeId, animation: Animation, ) -> Option<TimerId>

Source

pub fn stop_timer(&mut self, timer_id: TimerId) -> bool

Source

pub fn get_node_position(&self, node_id: DomNodeId) -> Option<PositionInfo>

Source

pub fn get_node_size(&self, node_id: DomNodeId) -> Option<LogicalSize>

Source

pub fn add_image(&mut self, css_id: AzString, image: ImageRef)

Adds an image to the internal image cache

Source

pub fn has_image(&self, css_id: &AzString) -> bool

Source

pub fn get_image(&self, css_id: &AzString) -> Option<ImageRef>

Source

pub fn delete_image(&mut self, css_id: &AzString)

Deletes an image from the internal image cache

Source

pub fn update_image( &mut self, node_id: DomNodeId, new_image: ImageRef, image_type: UpdateImageType, )

Source

pub fn update_image_mask( &mut self, node_id: DomNodeId, new_image_mask: ImageMask, )

Trait Implementations§

Source§

impl Clone for CallbackInfo

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CallbackInfo

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.