#[repr(C)]pub struct TimerCallbackInfo {
pub callback_info: CallbackInfo,
pub node_id: OptionDomNodeId,
pub frame_start: Instant,
pub call_count: usize,
pub is_about_to_finish: bool,
pub _abi_ref: *const c_void,
pub _abi_mut: *mut c_void,
}Expand description
Information passed to timer callbacks
This wraps CallbackInfo and adds timer-specific fields like call_count and frame_start.
Through Deref<Target = CallbackInfo>, all methods from CallbackInfo are available,
including the transactional push_change() API.
Fields§
§callback_info: CallbackInfo§node_id: OptionDomNodeId§frame_start: Instant§call_count: usize§is_about_to_finish: bool§_abi_ref: *const c_void§_abi_mut: *mut c_voidImplementations§
Source§impl TimerCallbackInfo
impl TimerCallbackInfo
pub fn create( callback_info: CallbackInfo, node_id: OptionDomNodeId, frame_start: Instant, call_count: usize, is_about_to_finish: bool, ) -> Self
pub fn get_attached_node_size(&self) -> Option<LogicalSize>
pub fn get_attached_node_position(&self) -> Option<LogicalPosition>
pub fn get_callback_info(&self) -> &CallbackInfo
pub fn get_callback_info_mut(&mut self) -> &mut CallbackInfo
Sourcepub fn get_ctx(&self) -> OptionRefAny
pub fn get_ctx(&self) -> OptionRefAny
Get the callable for FFI language bindings (Python, etc.)
Sourcepub fn add_timer(&mut self, timer_id: TimerId, timer: Timer)
pub fn add_timer(&mut self, timer_id: TimerId, timer: Timer)
Add a timer to this window (applied after callback returns)
Sourcepub fn remove_timer(&mut self, timer_id: TimerId)
pub fn remove_timer(&mut self, timer_id: TimerId)
Remove a timer from this window (applied after callback returns)
Sourcepub fn add_thread(&mut self, thread_id: ThreadId, thread: Thread)
pub fn add_thread(&mut self, thread_id: ThreadId, thread: Thread)
Add a thread to this window (applied after callback returns)
Sourcepub fn remove_thread(&mut self, thread_id: ThreadId)
pub fn remove_thread(&mut self, thread_id: ThreadId)
Remove a thread from this window (applied after callback returns)
Sourcepub fn stop_propagation(&mut self)
pub fn stop_propagation(&mut self)
Stop event propagation (applied after callback returns)
Sourcepub fn create_window(&mut self, options: WindowCreateOptions)
pub fn create_window(&mut self, options: WindowCreateOptions)
Create a new window (applied after callback returns)
Sourcepub fn close_window(&mut self)
pub fn close_window(&mut self)
Close the current window (applied after callback returns)
Sourcepub fn modify_window_state(&mut self, state: FullWindowState)
pub fn modify_window_state(&mut self, state: FullWindowState)
Modify the window state (applied after callback returns)
Sourcepub fn add_image_to_cache(&mut self, id: AzString, image: ImageRef)
pub fn add_image_to_cache(&mut self, id: AzString, image: ImageRef)
Add an image to the image cache (applied after callback returns)
Sourcepub fn remove_image_from_cache(&mut self, id: AzString)
pub fn remove_image_from_cache(&mut self, id: AzString)
Remove an image from the image cache (applied after callback returns)
Sourcepub fn reload_system_fonts(&mut self)
pub fn reload_system_fonts(&mut self)
Reload system fonts (applied after callback returns)
Sourcepub fn prevent_default(&mut self)
pub fn prevent_default(&mut self)
Prevent the default action
Open a menu
Open a menu at a specific position
Sourcepub fn show_tooltip(&mut self, text: AzString)
pub fn show_tooltip(&mut self, text: AzString)
Show a tooltip at the current cursor position
Sourcepub fn show_tooltip_at(&mut self, text: AzString, position: LogicalPosition)
pub fn show_tooltip_at(&mut self, text: AzString, position: LogicalPosition)
Show a tooltip at a specific position
Sourcepub fn hide_tooltip(&mut self)
pub fn hide_tooltip(&mut self)
Hide the currently displayed tooltip
Open a menu positioned relative to the currently hit node
Sourcepub fn get_current_window_flags(&self) -> WindowFlags
pub fn get_current_window_flags(&self) -> WindowFlags
Get current window flags
Sourcepub fn get_current_keyboard_state(&self) -> KeyboardState
pub fn get_current_keyboard_state(&self) -> KeyboardState
Get current keyboard state
Sourcepub fn get_current_mouse_state(&self) -> MouseState
pub fn get_current_mouse_state(&self) -> MouseState
Get current mouse state
Sourcepub fn get_cursor_relative_to_node(&self) -> OptionLogicalPosition
pub fn get_cursor_relative_to_node(&self) -> OptionLogicalPosition
Get the cursor position relative to the hit node
Sourcepub fn get_cursor_relative_to_viewport(&self) -> OptionLogicalPosition
pub fn get_cursor_relative_to_viewport(&self) -> OptionLogicalPosition
Get the cursor position relative to the viewport
Sourcepub fn get_cursor_position(&self) -> Option<LogicalPosition>
pub fn get_cursor_position(&self) -> Option<LogicalPosition>
Get the current cursor position
Sourcepub fn get_current_time(&self) -> Instant
pub fn get_current_time(&self) -> Instant
Get the current time (when the timer callback started)
Sourcepub fn is_dom_focused(&self) -> bool
pub fn is_dom_focused(&self) -> bool
Check if the DOM is focused
Sourcepub fn is_pen_in_contact(&self) -> bool
pub fn is_pen_in_contact(&self) -> bool
Check if pen is in contact
Sourcepub fn is_pen_eraser(&self) -> bool
pub fn is_pen_eraser(&self) -> bool
Check if pen eraser is active
Check if pen barrel button is pressed
Sourcepub fn is_dragging(&self) -> bool
pub fn is_dragging(&self) -> bool
Check if dragging is active
Sourcepub fn is_drag_active(&self) -> bool
pub fn is_drag_active(&self) -> bool
Check if drag is active
Sourcepub fn is_node_drag_active(&self) -> bool
pub fn is_node_drag_active(&self) -> bool
Check if node drag is active
Sourcepub fn is_file_drag_active(&self) -> bool
pub fn is_file_drag_active(&self) -> bool
Check if file drag is active
Sourcepub fn has_sufficient_history_for_gestures(&self) -> bool
pub fn has_sufficient_history_for_gestures(&self) -> bool
Check if there’s sufficient history for gestures
Sourcepub fn set_cursor_visibility(&mut self, visible: bool)
pub fn set_cursor_visibility(&mut self, visible: bool)
Set cursor visibility state (for cursor blink timer)
Sourcepub fn set_cursor_visibility_toggle(&mut self)
pub fn set_cursor_visibility_toggle(&mut self)
Toggle cursor visibility (for cursor blink timer)
This is a shortcut that reads the current visibility state, toggles it, and queues the change. Used by the cursor blink timer.
Sourcepub fn reset_cursor_blink(&mut self)
pub fn reset_cursor_blink(&mut self)
Reset cursor blink state on user input
Trait Implementations§
Source§impl Clone for TimerCallbackInfo
impl Clone for TimerCallbackInfo
Source§fn clone(&self) -> TimerCallbackInfo
fn clone(&self) -> TimerCallbackInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TimerCallbackInfo
impl !RefUnwindSafe for TimerCallbackInfo
impl !Send for TimerCallbackInfo
impl !Sync for TimerCallbackInfo
impl Unpin for TimerCallbackInfo
impl !UnwindSafe for TimerCallbackInfo
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> 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>
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