API v1.0.0-alpha1
Window creation / startup configuration
mod window:
enum StyleCursor
Alias
AllScroll
Cell
ColResize
ContextMenu
Copy
Crosshair
Default
EResize
EwResize
Grab
Grabbing
Help
Move
NResize
NsResize
NeswResize
NwseResize
Pointer
Progress
RowResize
SResize
SeResize
Text
Unset
VerticalText
WResize
Wait
ZoomIn
ZoomOut
enum WindowEventFilter
MouseOver
MouseDown
LeftMouseDown
RightMouseDown
MiddleMouseDown
MouseUp
LeftMouseUp
RightMouseUp
MiddleMouseUp
MouseEnter
MouseLeave
Scroll
ScrollStart
ScrollEnd
TextInput
VirtualKeyDown
VirtualKeyUp
HoveredFile
DroppedFile
HoveredFileCancelled
Resized
Moved
TouchStart
TouchMove
TouchEnd
TouchCancel
FocusReceived
FocusLost
CloseRequested
ThemeChanged
WindowFocusReceived
WindowFocusLost
PenDown
PenMove
PenUp
PenEnter
PenLeave
DragStart
Drag
DragEnd
DoubleClick
LongPress
SwipeLeft
SwipeRight
SwipeUp
SwipeDown
PinchIn
PinchOut
RotateClockwise
RotateCounterClockwise
struct HidpiAdjustedBounds
logical_size: LogicalSize
hidpi_factor: DpiScaleFactor
constructor from_bounds:
arg bounds: LayoutSize
arg hidpi_factor: DpiScaleFactor
&self
fn get_logical_size:
&self
-> LogicalSize
fn get_hidpi_factor:
&self
enum WindowTheme
DarkMode
LightMode
struct DpiScaleFactor
inner: FloatValue
enum MouseCursorType
Default
Crosshair
Hand
Arrow
Move
Text
Wait
Help
Progress
NotAllowed
ContextMenu
Cell
VerticalText
Alias
Copy
NoDrop
Grab
Grabbing
AllScroll
ZoomIn
ZoomOut
EResize
NResize
NeResize
NwResize
SResize
SeResize
SwResize
WResize
EwResize
NsResize
NeswResize
NwseResize
ColResize
RowResize
enum WindowFrame
Normal
Minimized
Maximized
Fullscreen
struct LinuxWindowOptions has destructor
x11_visual: OptionX11Visual
x11_screen: OptionI32
x11_wm_classes: StringPairVec
x11_override_redirect: bool
x11_window_types: XWindowTypeVec
x11_gtk_theme_variant: OptionString
x11_resize_increments: OptionLogicalSize
x11_base_size: OptionLogicalSize
wayland_app_id: OptionString
wayland_theme: OptionWaylandTheme
request_user_attention: UserAttentionType
window_icon: OptionWindowIcon
x11_decorations_state: OptionLinuxDecorationsState
struct WaylandTheme has destructor
title_bar_active_background_color: ColorU
title_bar_active_separator_color: ColorU
title_bar_active_text_color: ColorU
title_bar_inactive_background_color: ColorU
title_bar_inactive_separator_color: ColorU
title_bar_inactive_text_color: ColorU
maximize_idle_foreground_inactive_color: ColorU
minimize_idle_foreground_inactive_color: ColorU
close_idle_foreground_inactive_color: ColorU
maximize_hovered_foreground_inactive_color: ColorU
minimize_hovered_foreground_inactive_color: ColorU
close_hovered_foreground_inactive_color: ColorU
maximize_disabled_foreground_inactive_color: ColorU
minimize_disabled_foreground_inactive_color: ColorU
close_disabled_foreground_inactive_color: ColorU
maximize_idle_background_inactive_color: ColorU
minimize_idle_background_inactive_color: ColorU
close_idle_background_inactive_color: ColorU
maximize_hovered_background_inactive_color: ColorU
minimize_hovered_background_inactive_color: ColorU
close_hovered_background_inactive_color: ColorU
maximize_disabled_background_inactive_color: ColorU
minimize_disabled_background_inactive_color: ColorU
close_disabled_background_inactive_color: ColorU
maximize_idle_foreground_active_color: ColorU
minimize_idle_foreground_active_color: ColorU
close_idle_foreground_active_color: ColorU
maximize_hovered_foreground_active_color: ColorU
minimize_hovered_foreground_active_color: ColorU
close_hovered_foreground_active_color: ColorU
maximize_disabled_foreground_active_color: ColorU
minimize_disabled_foreground_active_color: ColorU
close_disabled_foreground_active_color: ColorU
maximize_idle_background_active_color: ColorU
minimize_idle_background_active_color: ColorU
close_idle_background_active_color: ColorU
maximize_hovered_background_active_color: ColorU
minimize_hovered_background_active_color: ColorU
close_hovered_background_active_color: ColorU
maximize_disabled_background_active_color: ColorU
minimize_disabled_background_active_color: ColorU
close_disabled_background_active_color: ColorU
title_bar_font: String
title_bar_font_size: f32
enum UserAttentionType
None
Critical
Informational
struct MonitorId
index: usize
hash: u64
struct WindowFlags
frame: WindowFrame
close_requested: bool
decorations: WindowDecorations
is_visible: bool
is_always_on_top: bool
is_resizable: bool
has_focus: bool
background_material: WindowBackgroundMaterial
smooth_scroll_enabled: bool
autotab_enabled: bool
window_type: WindowType
has_decorations: bool
use_native_menus: bool
use_native_context_menus: bool
is_top_level: bool
prevent_system_sleep: bool
struct TaskBarIcon has destructor
key: IconKey
rgba_bytes: U8Vec
struct WasmWindowOptions
_reserved: u8
struct SmallWindowIconBytes has destructor
key: IconKey
rgba_bytes: U8Vec
struct Monitor has destructor
monitor_id: MonitorId
monitor_name: OptionString
size: LayoutSize
position: LayoutPoint
scale_factor: f64
work_area: LayoutRect
video_modes: VideoModeVec
is_primary_monitor: bool
struct IconKey
icon_id: usize
enum HwAcceleration
Enabled
Disabled
DontCare
struct MacWindowOptions
_reserved: u8
enum Vsync
Enabled
Disabled
DontCare
struct VideoMode
size: LayoutSize
bit_depth: u16
refresh_rate: u16
struct LargeWindowIconBytes has destructor
key: IconKey
rgba_bytes: U8Vec
enum XWindowType
Desktop
Dock
Toolbar
Menu
Utility
Splash
Dialog
DropdownMenu
PopupMenu
Tooltip
Notification
Combo
Dnd
Normal
struct PlatformSpecificOptions has destructor
windows_options: WindowsWindowOptions
linux_options: LinuxWindowOptions
mac_options: MacWindowOptions
wasm_options: WasmWindowOptions
union enum WindowIcon has destructor
Small(SmallWindowIconBytes)
Large(LargeWindowIconBytes)
struct WindowSize
dimensions: LogicalSize
dpi: u32
min_dimensions: OptionLogicalSize
max_dimensions: OptionLogicalSize
struct WindowsWindowOptions has destructor
allow_drag_and_drop: bool
no_redirection_bitmap: bool
window_icon: OptionWindowIcon
taskbar_icon: OptionTaskBarIcon
parent_window: OptionHwndHandle
enum WindowType
Normal
Menu
Tooltip
Dialog
struct WindowCreateOptions has destructor
window_state: FullWindowState
size_to_content: bool
renderer: OptionRendererOptions
theme: OptionWindowTheme
create_callback: OptionCallback
hot_reload: bool
constructor create:
arg layout_callback: LayoutCallbackType
Create a new WindowCreateOptions with a layout callback
struct FullWindowState has destructor
Semantic window identifier for multi-window debugging. Can be set to identify specific windows (e.g., 'main', 'settings', 'popup-1')
window_id: String
theme: WindowTheme
title: String
size: WindowSize
position: WindowPosition
flags: WindowFlags
debug_state: DebugState
keyboard_state: KeyboardState
mouse_state: MouseState
touch_state: TouchState
ime_position: ImePosition
platform_specific_options: PlatformSpecificOptions
renderer_options: RendererOptions
background_color: ColorU
layout_callback: LayoutCallback
close_callback: OptionCallback
monitor_id: OptionU32
window_focused: bool
struct IOSHandle
ui_window: c_void
ui_view: c_void
ui_view_controller: c_void
union enum RawWindowHandle
IOS(IOSHandle)
MacOS(MacOSHandle)
Xlib(XlibHandle)
Xcb(XcbHandle)
Wayland(WaylandHandle)
Windows(WindowsHandle)
Web(WebHandle)
Android(AndroidHandle)
Unsupported
struct MacOSHandle
ns_window: c_void
ns_view: c_void
struct XcbHandle
window: u32
connection: c_void
struct TextCursor
cluster_id: GraphemeClusterId
affinity: CursorAffinity
struct XlibHandle
window: u64
display: c_void
struct WaylandHandle
surface: c_void
display: c_void
struct WindowsHandle
hwnd: c_void
hinstance: c_void
struct WebHandle
id: u32
struct AndroidHandle
a_native_window: c_void
enum CursorAffinity
Leading
Trailing
enum CursorMovement
Left
Right
Up
Down
WordLeft
WordRight
LineStart
LineEnd
DocumentStart
DocumentEnd
Absolute
struct TextOpMoveCursor
old_position: CursorPosition
new_position: CursorPosition
movement: CursorMovement
Callback type definitions + struct definitions of
CallbackInfosmod callbacks:
Main callback type for UI event handling
fnptr CallbackType
arg RefAny
arg CallbackInfo
-> Update
C-ABI wrapper over an
IFrameCallbackTypestruct IFrameCallback
ctx: OptionRefAny
Type alias for extern "C" fn (&mut RefAny , &mut IFrameCallbackInfo) -> IFrameCallbackReturn
fnptr IFrameCallbackType
arg RefAny
Return value for an IFrame rendering callback. # Dual Size Model IFrame callbacks return two size/offset pairs that enable lazy loading and virtualization: ## Actual Content (
scroll_size+scroll_offset) The size and position of content that has actually been rendered. This is the content currently present in the returned DOM. Example: A table view might render only 20 visible rows out of 1000 total rows. ## Virtual Content (virtual_scroll_size+virtual_scroll_offset) The size and position of content that the IFrame pretends to have. This is used for scrollbar sizing and positioning, allowing the scrollbar to represent the full dataset even when only a subset is rendered. Example: The same table might pretend to have all 1000 rows for scrollbar sizing. # Conditional Re-invocation The IFrame callback will be re-invoked only when necessary to avoid performance overhead: 1. Initial render - First time the IFrame appears in the layout 2. Parent DOM recreated - The parent DOM was rebuilt from scratch (not just re-laid-out) 3. Window resize (expansion only) - Window grows and IFrame bounds exceedscroll_size- [OK] Only triggers ONCE per expansion (when bounds become uncovered) - Does NOT trigger when window shrinks (content is clipped, not re-rendered) - Does NOT trigger if expanded area is still within existingscroll_size4. Scroll near edge - User scrolls within threshold (default 200px) of content edge - [OK] Only triggers ONCE per edge approach (prevents repeated calls) - Flag resets when: scroll moves away from edge, or callback returns expanded content 5. Programmatic scroll -set_scroll_position()scrolls beyond renderedscroll_size- Same constraints as rule #4 (threshold and once-per-edge) ## Window Resize Example text Frame 0: IFrame bounds = 800x600, scroll_size = 800x600 (perfectly covered) Frame 1: Window resizes to 1000x700 (larger) -> IFrame bounds = 1000x700 -> Bounds no longer fully covered by scroll_size (800x600) -> [OK] RE-INVOKE callback once Frame 2: Window resizes to 1100x800 (even larger) -> If callback returned scroll_size = 1100x800, fully covered again -> Do NOT re-invoke (content covers new bounds) -> If callback returned scroll_size = 1000x700, not fully covered -> [OK] RE-INVOKE again (new uncovered area) Frame 3: Window resizes to 900x650 (smaller) -> Bounds now smaller than scroll_size -> Do NOT re-invoke (content is just clipped by scrollbars) ## Scroll Near Edge Example text scroll_size = 1000x2000 (width x height) Container = 800x600 Threshold = 200px Current scroll_offset = 0x0 User scrolls to scroll_offset = 0x1500: -> Bottom edge at 1500 + 600 = 2100 -> Within 200px of scroll_size.height (2000) -> Distance from edge: 2100 - 2000 = 100px < 200px -> [OK] RE-INVOKE callback to load more content Callback returns: -> New scroll_size = 1000x4000 (doubled) -> Flag reset (edge no longer near) -> User continues scrolling without re-invoke until near new edge # Optimization: Returning None If the callback determines that no new content is needed (e.g., sufficient content has already been rendered ahead of the scroll position), it can returnOptionStyledDom::Nonefor thedomfield. This signals the layout engine to keep using the current DOM and only update the scroll bounds. ,ignore fn my_iframe_callback(data: &mut MyData, info: &mut IFrameCallbackInfo) -> IFrameCallbackReturn { let current_scroll = info.scroll_offset; // Check if we've already rendered content that covers this scroll position if data.already_rendered_area_covers(current_scroll, info.bounds.size) { return IFrameCallbackReturn { dom: OptionStyledDom::None, // Keep current DOM scroll_size: data.current_scroll_size, scroll_offset: data.current_scroll_offset, virtual_scroll_size: data.virtual_size, virtual_scroll_offset: LogicalPosition::zero(), }; } // Otherwise, render new content let new_dom = data.render_more_content(...); IFrameCallbackReturn { dom: OptionStyledDom::Some(new_dom), ... } } # Example: Basic IFrame ,ignore fn my_iframe_callback(data: &mut MyData, info: &mut IFrameCallbackInfo) -> IFrameCallbackReturn { let dom = Dom::body() .with_child(Dom::text("Hello from IFrame!")); let styled_dom = dom.style(Css::empty()); IFrameCallbackReturn { // The rendered content dom: OptionStyledDom::Some(styled_dom), // Size of actual rendered content (matches container) scroll_size: info.bounds.size, // Content starts at top-left scroll_offset: LogicalPosition::zero(), // Virtual size same as actual (no virtualization needed) virtual_scroll_size: info.bounds.size, virtual_scroll_offset: LogicalPosition::zero(), } } # Example: Virtualized Table (Lazy Loading) ,ignore struct TableData { total_rows: usize, // 1000 rows in full dataset row_height: f32, // 30px per row visible_rows: Vec<Row>, // Currently rendered rows (e.g., rows 0-29) first_visible_row: usize, // Index of first rendered row } fn table_iframe_callback(data: &mut TableData, info: &mut IFrameCallbackInfo) -> IFrameCallbackReturn { let container_height = info.bounds.size.height; let scroll_y = info.scroll_offset.y; // Calculate which rows should be visible based on scroll position let first_row = (scroll_y / data.row_height) as usize; let visible_count = (container_height / data.row_height).ceil() as usize + 2; // +2 for buffer // Fetch and render only the visible rows data.visible_rows = data.fetch_rows(first_row, visible_count); data.first_visible_row = first_row; let dom = Dom::body() .with_children( data.visible_rows.iter().map(|row| { Dom::div() .with_child(Dom::text(row.text.clone())) .with_inline_css_props(css_property_vec![ ("height", format!("{}px", data.row_height)), ]) }).collect() ); IFrameCallbackReturn { dom: OptionStyledDom::Some(dom.style(Css::empty())), // ACTUAL: Size of the ~30 rendered rows (e.g., 900px tall) scroll_size: LogicalSize::new( info.bounds.size.width, data.visible_rows.len() as f32 * data.row_height, ), // ACTUAL: Where these rows start in virtual space (e.g., y=300 if showing rows 10-30) scroll_offset: LogicalPosition::new( 0.0, first_row as f32 * data.row_height, ), // VIRTUAL: Size if all 1000 rows were rendered (30,000px tall) virtual_scroll_size: LogicalSize::new( info.bounds.size.width, data.total_rows as f32 * data.row_height, ), // VIRTUAL: Usually starts at origin virtual_scroll_offset: LogicalPosition::zero(), } } In this example: - Only 20-30 rows are rendered at a time (~600-900px of DOM nodes) - The scrollbar represents all 1000 rows (30,000px virtual height) - When user scrolls near the bottom of rendered content, callback is re-invoked - New rows are rendered, andscroll_size/scroll_offsetare updated - User experiences seamless scrolling through the full dataset # How the Layout Engine Uses These Values ## For Rendering - Usesscroll_sizeto determine the actual size of the IFrame's content box - Usesscroll_offsetto position the content within the virtual space - Clips rendering to the visible viewport ## For Scrollbars - Usesvirtual_scroll_sizeto calculate scrollbar thumb size and track length - Usesvirtual_scroll_offsetas the base for scroll position calculations - User sees scrollbar representing full virtual size, not just rendered content ## For Re-invocation Checks - Compares viewport bounds againstscroll_sizeto detect edge proximity - Compares current scroll position againstscroll_offset + scroll_sizebounds - Triggers callback when user scrolls beyond the rendered content thresholdstruct IFrameCallbackReturn has destructor
The styled DOM with actual rendered content, or None to keep current DOM. -
OptionStyledDom::Some(dom)- Replace current content with this new DOM -OptionStyledDom::None- Keep using the previous DOM, only update scroll bounds ReturningNoneis an optimization when the callback determines that the current content is sufficient (e.g., already rendered ahead of scroll position).dom: OptionStyledDom
Size of the actual rendered content rectangle. This is the size of the content in the
domfield (if Some). It may be smaller thanvirtual_scroll_sizeif only a subset of content is rendered (virtualization). Example: For a table showing rows 10-30, this might be 600px tall (20 rows x 30px each).scroll_size: LogicalSize
Offset of the actual rendered content within the virtual coordinate space. This positions the rendered content within the larger virtual space. For virtualized content, this will be non-zero to indicate where the rendered "window" starts. Example: For a table showing rows 10-30, this might be y=300 (row 10 starts 300px from the top).
scroll_offset: LogicalPosition
Size of the virtual content rectangle (for scrollbar sizing). This is the size the scrollbar will represent. It can be much larger than
scroll_sizeto enable lazy loading and virtualization. Example: For a 1000-row table, this might be 30,000px tall (1000 rows x 30px each), even though only 20 rows are actually rendered.virtual_scroll_size: LogicalSize
Offset of the virtual content (usually zero). This is typically
(0, 0)since the virtual space usually starts at the origin. Advanced use cases might use this for complex virtualization scenarios.virtual_scroll_offset: LogicalPosition
constructor with_dom:
arg dom: StyledDom
arg scroll_size: LogicalSize
arg scroll_offset: LogicalPosition
arg virtual_scroll_size: LogicalSize
arg virtual_scroll_offset: LogicalPosition
constructor keep_current:
arg scroll_size: LogicalSize
arg scroll_offset: LogicalPosition
arg virtual_scroll_size: LogicalSize
arg virtual_scroll_offset: LogicalPosition
Creates a new IFrameCallbackReturn with updated DOM content.
Use this when the callback has rendered new content to display.
# Arguments -dom- The new styled DOM to render -scroll_size- Size of the actual rendered content -scroll_offset- Position of rendered content in virtual space -virtual_scroll_size- Size for scrollbar representation -virtual_scroll_offset- UsuallyLogicalPosition::zero()Creates a return value that keeps the current DOM unchanged.
Use this when the callback determines that the existing content is sufficient (e.g., already rendered ahead of scroll position). This is an optimization to avoid rebuilding the DOM unnecessarily.
# Arguments -scroll_size- Size of the current rendered content -scroll_offset- Position of current content in virtual space -virtual_scroll_size- Size for scrollbar representation -virtual_scroll_offset- UsuallyLogicalPosition::zero()fnptr NumberInputOnFocusLostCallbackType
arg RefAny
arg CallbackInfo
arg NumberInputState
-> Update
fnptr TextInputOnVirtualKeyDownCallbackType
arg RefAny
arg CallbackInfo
arg TextInputState
fnptr ButtonOnClickCallbackType
arg RefAny
arg CallbackInfo
-> Update
fnptr CheckBoxOnToggleCallbackType
arg RefAny
arg CallbackInfo
arg CheckBoxState
-> Update
fnptr NumberInputOnValueChangeCallbackType
arg RefAny
arg CallbackInfo
arg NumberInputState
-> Update
fnptr ListViewOnColumnClickCallbackType
arg RefAny
arg CallbackInfo
arg ListViewState
arg usize
-> Update
fnptr ListViewOnRowClickCallbackType
arg RefAny
arg CallbackInfo
arg ListViewState
arg usize
-> Update
fnptr ColorInputOnValueChangeCallbackType
arg RefAny
arg CallbackInfo
arg ColorInputState
-> Update
fnptr TextInputOnTextInputCallbackType
arg RefAny
arg CallbackInfo
arg TextInputState
fnptr FontRefDestructorCallbackType
arg c_void
fnptr TextInputOnFocusLostCallbackType
arg RefAny
arg CallbackInfo
arg TextInputState
-> Update
fnptr TabOnClickCallbackType
arg RefAny
arg CallbackInfo
arg TabHeaderState
-> Update
fnptr ListViewOnLazyLoadScrollCallbackType
arg RefAny
arg CallbackInfo
arg ListViewState
-> Update
fnptr FileInputOnPathChangeCallbackType
arg RefAny
arg CallbackInfo
arg FileInputState
-> Update
struct IFrameCallbackInfo
reason: IFrameCallbackReason
system_fonts: c_void
image_cache: c_void
window_theme: WindowTheme
bounds: HidpiAdjustedBounds
scroll_size: LogicalSize
scroll_offset: LogicalPosition
virtual_scroll_size: LogicalSize
virtual_scroll_offset: LogicalPosition
callable_ptr: c_void
_abi_mut: c_void
fn get_ctx:
&self
-> OptionRefAny
fn get_bounds:
&self
Get the callable for FFI language bindings (Python, etc.)
struct CallbackInfo
ref_data: c_void
hit_dom_node: DomNodeId
cursor_relative_to_item: OptionLogicalPosition
cursor_in_viewport: OptionLogicalPosition
changes: c_void
fn get_ctx:
&self
-> OptionRefAny
fn get_gl_context:
&self
fn add_timer:
fn remove_timer:
&mut self
arg timer_id: TimerId
fn add_thread:
fn remove_thread:
&mut self
arg thread_id: ThreadId
fn stop_propagation:
&mut self
fn create_window:
&mut self
arg options: WindowCreateOptions
fn close_window:
&mut self
&mut self
arg state: FullWindowState
&mut self
arg id: String
&mut self
fn prevent_default:
&mut self
fn show_tooltip:
&mut self
arg text: String
fn show_tooltip_at:
&mut self
arg text: String
arg position: LogicalPosition
fn hide_tooltip:
&mut self
&self
-> WindowFlags
&self
fn get_current_keyboard_state:
&self
&self
-> MouseState
fn get_cursor_relative_to_node:
&self
fn get_cursor_relative_to_viewport:
&self
&self
fn get_current_time:
&self
-> Instant
fn is_dom_focused:
&self
arg dom_id: DomId
-> bool
&self
-> bool
fn is_pen_eraser:
&self
-> bool
fn is_pen_barrel_button_pressed:
&self
-> bool
fn focus_next:
&mut self
fn focus_previous:
&mut self
fn focus_first:
&mut self
fn focus_last:
&mut self
fn clear_focus:
&mut self
fn is_dragging:
&self
-> bool
fn is_drag_active:
&self
-> bool
&self
-> bool
&self
-> bool
fn has_sufficient_history_for_gestures:
&self
-> bool
fn change_node_text:
fn get_parent_node:
fn set_css_property:
&mut self
arg node_id: DomNodeId
arg property: CssProperty
fn scroll_to:
&mut self
arg dom_id: DomId
arg node_id: NodeHierarchyItemId
arg position: LogicalPosition
fn insert_text:
fn get_node_size:
&self
arg node_id: DomNodeId
&self
arg node_id: DomNodeId
fn get_node_rect:
&self
arg node_id: DomNodeId
&self
fn get_timer:
&self
arg timer_id: TimerId
-> OptionTimer
fn get_timer_ids:
&self
-> TimerIdVec
fn get_thread:
&self
arg thread_id: ThreadId
-> OptionThread
fn get_thread_ids:
&self
-> ThreadIdVec
fn get_dom_ids:
&self
-> DomIdVec
fn get_hit_node:
&self
-> DomNodeId
fn get_parent:
&self
arg node_id: DomNodeId
&self
arg node_id: DomNodeId
fn get_next_sibling:
&self
arg node_id: DomNodeId
fn get_first_child:
&self
arg node_id: DomNodeId
fn get_last_child:
&self
arg node_id: DomNodeId
fn get_dataset:
&mut self
arg node_id: DomNodeId
-> OptionRefAny
fn get_node_id_of_root_dataset:
&mut self
arg search_key: RefAny
&self
arg node_id: DomNodeId
-> OptionString
fn get_selection:
&self
arg dom_id: DomId
fn has_selection:
&self
arg dom_id: DomId
-> bool
&self
arg dom_id: DomId
&self
arg dom_id: DomId
&self
&self
fn get_previous_keyboard_state:
&self
&self
&self
&self
&self
arg node_id: DomNodeId
arg property_type: CssPropertyType
&self
arg node_id: DomNodeId
&self
arg node_id: DomNodeId
&self
fn is_node_focused:
&self
arg node_id: DomNodeId
-> bool
fn get_pen_state:
&self
fn get_pen_pressure:
&self
-> OptionF32
fn get_pen_tilt:
&self
&self
-> OptionU64
fn get_focused_node:
&self
fn has_focus:
&self
arg node_id: DomNodeId
-> bool
fn get_hovered_file:
&self
-> OptionString
fn get_dropped_file:
&self
-> OptionString
fn get_dragged_node:
&self
fn get_dragged_file:
&self
-> OptionString
fn get_drag_state:
&self
fn get_scroll_delta:
fn get_scroll_state:
fn inspect_paste_target_range:
&self
arg target: DomNodeId
fn inspect_select_all_changeset:
&self
arg target: DomNodeId
&self
arg target: DomNodeId
arg forward: bool
&self
&self
arg target: DomNodeId
&self
arg target: DomNodeId
&mut self
arg content: ClipboardContent
fn set_copy_content:
&mut self
arg target: DomNodeId
arg content: ClipboardContent
fn set_cut_content:
&mut self
arg target: DomNodeId
arg content: ClipboardContent
&mut self
arg target: DomNodeId
arg range: SelectionRange
&self
arg target: DomNodeId
-> OptionString
&self
arg target: DomNodeId
&self
arg target: DomNodeId
&self
arg target: DomNodeId
-> bool
&self
arg target: DomNodeId
-> OptionUsize
fn can_undo:
&self
arg node_id: NodeId
-> bool
fn can_redo:
&self
arg node_id: NodeId
-> bool
fn get_undo_text:
&self
arg node_id: NodeId
-> OptionString
fn get_redo_text:
&self
arg node_id: NodeId
-> OptionString
&self
arg node_id: NodeId
&self
arg node_id: NodeId
&self
arg target: DomNodeId
&self
arg target: DomNodeId
&self
arg target: DomNodeId
&self
arg target: DomNodeId
fn inspect_move_cursor_to_line_start:
&self
arg target: DomNodeId
fn inspect_move_cursor_to_line_end:
&self
arg target: DomNodeId
fn inspect_move_cursor_to_document_start:
&self
arg target: DomNodeId
fn inspect_move_cursor_to_document_end:
&self
arg target: DomNodeId
&self
arg target: DomNodeId
fn inspect_delete:
&self
arg target: DomNodeId
fn move_cursor_left:
&mut self
arg target: DomNodeId
arg extend_selection: bool
&mut self
arg target: DomNodeId
arg extend_selection: bool
fn move_cursor_up:
&mut self
arg target: DomNodeId
arg extend_selection: bool
fn move_cursor_down:
&mut self
arg target: DomNodeId
arg extend_selection: bool
&mut self
arg target: DomNodeId
arg extend_selection: bool
&mut self
arg target: DomNodeId
arg extend_selection: bool
fn move_cursor_to_document_start:
&mut self
arg target: DomNodeId
arg extend_selection: bool
fn move_cursor_to_document_end:
&mut self
arg target: DomNodeId
arg extend_selection: bool
fn delete_backward:
&mut self
arg target: DomNodeId
fn delete_forward:
&mut self
arg target: DomNodeId
&self
arg node_id: DomNodeId
-> OptionString
&self
arg node_id: DomNodeId
arg attr_name: String
-> OptionString
fn get_node_classes:
fn get_node_id:
&self
arg node_id: DomNodeId
-> OptionString
fn take_screenshot:
&self
arg dom_id: DomId
&self
arg path: String
fn take_native_screenshot_bytes:
&self
fn take_native_screenshot_base64:
&self
&self
arg dom_id: DomId
Get the callable for FFI language bindings (Python, etc.)
Returns the cloned OptionRefAny if a callable was set, or None if this is a native Rust callback.Returns the OpenGL context if available
Add a timer to this window (applied after callback returns)
Remove a timer from this window (applied after callback returns)
Add a thread to this window (applied after callback returns)
Remove a thread from this window (applied after callback returns)
Stop event propagation (applied after callback returns)
Create a new window (applied after callback returns)
Close the current window (applied after callback returns)
Modify the window state (applied after callback returns)
Add an image to the image cache (applied after callback returns)
Remove an image from the image cache (applied after callback returns)
Reload system fonts (applied after callback returns)
Note: This is an expensive operation that rebuilds the entire font cachePrevent the default text input from being applied
When called in a TextInput callback, prevents the typed text from being inserted. Useful for custom validation, filtering, or text transformation.
# ExampleOpen a menu (context menu or dropdown)
The menu will be displayed either as a native menu or a fallback DOM-based menu depending on the window'suse_native_context_menusflag. Uses the position specified in the menu itself.
# Arguments *menu- The menu to displayOpen a menu at a specific position
# Arguments *menu- The menu to display *position- The position where the menu should appear (overrides menu's position)Show a tooltip at the current cursor position
Displays a simple text tooltip near the mouse cursor. The tooltip will be shown using platform-specific native APIs where available.
Platform implementations: - Windows: UsesTOOLTIPS_CLASSWin32 control - macOS: UsesNSPopoveror customNSWindowwith tooltip styling - X11: Creates transient window with_NET_WM_WINDOW_TYPE_TOOLTIP- Wayland: Useszwlr_layer_shell_v1with overlay layer
# Arguments *text- The tooltip text to display
# ExampleShow a tooltip at a specific position
# Arguments *text- The tooltip text to display *position- The position where the tooltip should appear (in window coordinates)
# ExampleHide the currently displayed tooltip
# ExampleOpen a menu positioned relative to the currently hit node
Convenience method for opening a menu at the element that triggered the callback. Equivalent toopen_menu_for_node(menu, info.get_hit_node()).
# Arguments *menu- The menu to display
# Returns *trueif the menu was queued for opening *falseif no node is currently hit or it has no layout informationGet current window flags
Get the current scroll offset for the hit node (if it's scrollable)
Convenience method that uses thehit_dom_nodefrom this callback. Useget_scroll_offset_for_nodeif you need to query a specific node.Get current keyboard state
Get current mouse state
Get the current cursor position in logical coordinates relative to the window
Check if any node in a specific DOM is focused
Check if pen is currently in contact with surface
Check if pen is in eraser mode
Check if pen barrel button is pressed
Set focus to a node matching a CSS path
Move focus to next focusable element in tab order
Move focus to previous focusable element in tab order
Move focus to first focusable element
Move focus to last focusable element
Remove focus from all elements
Check if a drag gesture is currently active
Convenience method that queries the gesture manager.Check if a node or file drag is currently active
Returns true if either a node drag or file drag is in progress.Check if a node drag is specifically active
Check if a file drag is specifically active
Check if there's sufficient mouse history for gesture detection (at least 2 frames)
Change the text content of a node (applied after callback returns)
This method was previously calledset_string_contentsin older API versions.
# Arguments *node_id- The text node to modify (DomNodeId containing both DOM and node IDs) *text- The new text content
# ExampleRe-render an image callback (for resize/animation updates)
This triggers re-invocation of the RenderImageCallback associated with the node. Useful for: - Responding to window resize (image needs to match new size) - Animation frames (update OpenGL texture each frame) - Interactive content (user input changes rendering)
# ExampleTrigger re-rendering of an IFrame (applied after callback returns)
This forces the IFrame to call its layout callback with reasonDomRecreatedand submit a new display list to WebRender. The IFrame's pipeline will be updated without affecting other parts of the window.
Useful for: - Live preview panes (update when source code changes) - Dynamic content that needs manual refresh - Editor previews (re-parse and display new DOM)
# ExampleFind a node by ID attribute in the layout tree
Returns the NodeId of the first node with the given ID attribute, or None if not found.
# ExampleGet the parent node of the given node
Returns None if the node has no parent (i.e., it's the root node)Get the next sibling of the given node
Returns None if the node has no next siblingGet the previous sibling of the given node
Returns None if the node has no previous siblingGet the first child of the given node
Returns None if the node has no childrenGet the last child of the given node
Returns None if the node has no childrenChange the image mask of a node (applied after callback returns)
Set a single CSS property on a node (convenience method for widgets)
This is a helper method that wrapschange_node_css_propertiesfor the common case of setting a single property. It uses the hit node's DOM ID automatically.
# Arguments *node_id- The node to set the property on (uses hit node's DOM ID) *property- The CSS property to set
# ExampleScroll a node to a specific position (applied after callback returns)
Insert text at the current cursor position in a text node
This operation is transactional - the text will be inserted after the callback returns. If there's a selection, it will be replaced with the inserted text.
# Arguments *dom_id- The DOM containing the text node *node_id- The node to insert text into *text- The text to insert
# ExampleOpen a menu positioned relative to a specific DOM node
This is useful for dropdowns, combo boxes, and context menus that should appear near a specific UI element. The menu will be positioned below the node by default.
# Arguments *menu- The menu to display *node_id- The DOM node to position the menu relative to
# Returns *trueif the menu was queued for opening *falseif the node doesn't exist or has no layout informationGet the bounding rectangle of a node (position + size)
This is particularly useful for menu positioning, where you need to know where a UI element is to popup a menu relative to it.Get the bounding rectangle of the hit node
Convenience method that combines get_hit_node() and get_node_rect(). Useful for menu positioning based on the clicked element.Get a reference to a timer
Get all timer IDs
Get a reference to a thread
Get all thread IDs
Get all DOM IDs that have layout results
Get the current selection state for a DOM
Check if a DOM has any selection
Get the primary cursor for a DOM (first in selection list)
Get all selection ranges (excludes plain cursors)
Get full current window state (immutable reference)
Get previous window flags
Get previous keyboard state
Get previous mouse state
Get the layout rectangle of the currently hit node (in logical coordinates)
Get the computed CSS property for a specific DOM node
This queries the CSS property cache and returns the resolved property value for the given node, taking into account: - User overrides (from callbacks) - Node state (:hover, :active, :focus) - CSS rules from stylesheets - Cascaded properties from parents - Inline styles
# Arguments *node_id- The DOM node to query *property_type- The CSS property type to retrieve
# Returns *Some(CssProperty)if the property is set on this node *Noneif the property is not set (will use default value)Get the computed width of a node from CSS
Convenience method for getting the CSS width property.Get the computed height of a node from CSS
Convenience method for getting the CSS height property.Check if a specific node is currently focused
Get current pen/stylus state if a pen is active
Get current pen pressure (0.0 to 1.0) Returns None if no pen is active, Some(0.5) for mouse
Get current pen tilt angles (x_tilt, y_tilt) in degrees Returns None if no pen is active
Get the event ID of the current event
Set focus to a specific DOM node by ID
Get the currently focused node (if any)
Returns None if no node has focus.Check if a specific node has focus
Get the currently hovered file (if drag-drop is in progress)
Returns None if no file is being hovered over the window.Get the currently dropped file (if a file was just dropped)
This is a one-shot value that is cleared after event processing. Returns None if no file was dropped this frame.Get the node being dragged (if any)
Get the file path being dragged (if any)
Get the current drag/drop state (if any)
Returns None if no drag is active, or Some with drag details.Get the current scroll offset for a specific node (if it's scrollable)
Get the scroll delta for a node in the current frame (for scroll event detection)
Check if a node had scroll activity this frame
Get the scroll state (container rect, content rect, current offset) for a node
Inspect the current selection range that would be affected by paste
Returns the selection range that will be replaced when pasting. Returns None if no selection exists (paste will insert at cursor).Inspect what text would be selected by Select All operation
Returns the full text content and the range that would be selected.Inspect what would be deleted by a backspace/delete operation
Uses the pure functions fromtext3::edit::inspect_delete()to determine what would be deleted without actually performing the deletion.
Returns (range_to_delete, deleted_text). - forward=true: Delete key (delete character after cursor) - forward=false: Backspace key (delete character before cursor)
# ExampleGet clipboard content from system clipboard (available during paste operations)
This returns content that was read from the system clipboard when Ctrl+V was pressed. It's only available in On::Paste callbacks or similar clipboard-related callbacks.
Use this to inspect what will be pasted before allowing or modifying the paste operation.Inspect a pending copy operation
Returns the clipboard content that would be copied from the current selection. Use this to validate or transform content before copying.Inspect a pending cut operation
Returns the clipboard content that would be cut (copied + deleted). Use this to validate or transform content before cutting.Override clipboard content for copy/cut operations
This sets custom content that will be written to the system clipboard. Use this in On::Copy or On::Cut callbacks to modify what gets copied.
# Arguments *content- The clipboard content to write to system clipboard
# ExampleSet/modify the clipboard content before a copy operation
Use this to transform clipboard content before copying. The change is queued and will be applied after the callback returns, if preventDefault() was not called.
# ExampleSet/modify the clipboard content before a cut operation
Similar to set_copy_content but for cut operations. The change is queued and will be applied after the callback returns.Override the selection range for select-all operation
Use this to limit what gets selected (e.g., only select visible text). The change is queued and will be applied after the callback returns.Get the current text content of a node
Helper for inspecting text before operations.Get the current cursor position in a node
Returns the text cursor position if the node is focused.Get the current selection ranges in a node
Returns all active selection ranges for the specified DOM.Check if a specific node has an active selection
This checks if the specific node (identified by DomNodeId) has a selection, as opposed to has_selection(DomId) which checks the entire DOM.Get the length of text in a node
Useful for bounds checking in custom operations.Check if undo is available for a specific node
Returns true if there is at least one undoable operation in the stack.Check if redo is available for a specific node
Returns true if there is at least one redoable operation in the stack.Get the text that would be restored by undo for a specific node
Returns the pre-state text content that would be restored if undo is performed. Returns None if no undo operation is available.Get the text that would be restored by redo for a specific node
Returns the pre-state text content that would be restored if redo is performed. Returns None if no redo operation is available.Inspect a pending undo operation
Returns the full UndoableOperation that would be undone. Use this to inspect the changeset and pre-state before allowing undo.Inspect a pending redo operation
Returns the full UndoableOperation that would be redone. Use this to inspect the changeset and pre-state before allowing redo.Inspect where the cursor would move when pressing left arrow
Returns the new cursor position that would result from moving left. Returns None if the cursor is already at the start of the document.
# Arguments *target- The node containing the cursor
# ExampleInspect where the cursor would move when pressing right arrow
Returns the new cursor position that would result from moving right. Returns None if the cursor is already at the end of the document.Inspect where the cursor would move when pressing up arrow
Returns the new cursor position that would result from moving up one line. Returns None if the cursor is already on the first line.Inspect where the cursor would move when pressing down arrow
Returns the new cursor position that would result from moving down one line. Returns None if the cursor is already on the last line.Inspect where the cursor would move when pressing Home key
Returns the cursor position at the start of the current line.Inspect where the cursor would move when pressing End key
Returns the cursor position at the end of the current line.Inspect where the cursor would move when pressing Ctrl+Home
Returns the cursor position at the start of the document.Inspect where the cursor would move when pressing Ctrl+End
Returns the cursor position at the end of the document.Inspect what text would be deleted by backspace (including Shift+Backspace)
Returns (range_to_delete, deleted_text). This is a convenience wrapper around inspect_delete_changeset(target, false).Inspect what text would be deleted by delete key
Returns (range_to_delete, deleted_text). This is a convenience wrapper around inspect_delete_changeset(target, true).Move cursor left (arrow left key)
# Arguments *target- The node containing the cursor *extend_selection- If true, extends selection (Shift+Left); if false, moves cursor
# ExampleMove cursor right (arrow right key)
Move cursor up (arrow up key)
Move cursor down (arrow down key)
Move cursor to line start (Home key)
Move cursor to line end (End key)
Move cursor to document start (Ctrl+Home)
Move cursor to document end (Ctrl+End)
Delete text backward (backspace or Shift+Backspace)
Queues a backspace operation to be applied after the callback. Use inspect_backspace() to see what would be deleted.Delete text forward (delete key)
Queues a delete operation to be applied after the callback. Use inspect_delete() to see what would be deleted.Get all direct children of a node
Returns a vector of NodeIds for all direct children of the specified node. Does not recurse into children of children (non-recursive).Get the number of direct children of a node
Returns the count of direct children for the specified node. This is more efficient than get_all_children_nodes().len() when you only need the count.Get the HTML tag name of a node
Returns the tag name (e.g., 'div', 'body', 'p', 'input') of the specified node. Returns None if the node doesn't exist.Get a specific attribute value of a node
Returns the value of the specified attribute on the node. Supports standard HTML attributes like 'id', 'class', 'href', 'src', 'alt', etc. Also supports custom data-* attributes and aria-* attributes.
# Arguments *node_id- The DOM node to query *attr_name- The attribute name to look up (e.g., 'id', 'class', 'href')
# Returns *Some(String)if the attribute exists *Noneif the attribute doesn't exist or the node doesn't existGet all CSS classes of a node
Returns a vector of all CSS class names applied to the node.Get the ID attribute of a node
Convenience method for getting the 'id' attribute. Equivalent to get_node_attribute(node_id, 'id').Take a CPU-rendered screenshot of a DOM
Renders the specified DOM to a PNG image using the CPU renderer. This captures only the DOM content without window decorations. Useful for visual regression testing (reftest) and documentation.
# Arguments *dom_id- The DOM to screenshot
# Returns *Ok(Vec<u8>)- PNG-encoded image data *Err(String)- Error message if rendering failedTake a CPU-rendered screenshot and save it to a file
Convenience method that combines take_screenshot with file writing.
# Arguments *dom_id- The DOM to screenshot *path- The file path to save the PNG toTake a native OS-level screenshot of the window including decorations
Captures the actual window as it appears on screen, including the title bar, window borders, and any OS-provided window decorations. This is useful for documentation, tutorials, or visual testing.
# Platform Support - macOS: Uses screencapture command with window ID - Windows: Uses PrintWindow API - Linux: Uses XGetImage (X11)
# Arguments *path- The file path to save the PNG screenshot to
# Returns *Ok(())- Screenshot saved successfully *Err(String)- Error message if screenshot failedTake a native OS-level screenshot and return the PNG data as bytes
Same as take_native_screenshot but returns the PNG data directly instead of saving to a file.
# Returns *Ok(Vec<u8>)- PNG-encoded image data *Err(String)- Error message if screenshot failedTake a native OS-level screenshot and return as a Base64 data URI
Returns the screenshot as a 'data:image/png;base64,...' string that can be directly used in HTML img tags or JSON responses.
# Returns *Ok(String)- Base64 data URI string *Err(String)- Error message if screenshot failedTake a CPU-rendered screenshot and return as a Base64 data URI
Returns the screenshot as a 'data:image/png;base64,...' string. This is the software-rendered version without window decorations.
# Returns *Ok(String)- Base64 data URI string *Err(String)- Error message if rendering failedunion enum IFrameCallbackReason
InitialRender
DomRecreated
BoundsExpanded
EdgeScrolled(EdgeType)
ScrollBeyondContent
fnptr InstantPtrCloneCallbackType
arg InstantPtr
-> InstantPtr
fnptr InstantPtrDestructorCallbackType
arg InstantPtr
fnptr LayoutCallbackType
arg RefAny
-> StyledDom
Wrapper around the layout callback function pointer. For FFI languages (Python, Java, etc.), the RefAny passed to the callback contains both the user data and the callback function object.
struct LayoutCallback
ctx: OptionRefAny
constructor create:
arg cb: LayoutCallbackType
struct LayoutCallbackInfo
ref_data: c_void
window_size: WindowSize
theme: WindowTheme
callable_ptr: c_void
_abi_mut: c_void
fn get_ctx:
&self
-> OptionRefAny
fn get_gl_context:
&self
&self
arg px: f32
-> bool
&self
arg px: f32
-> bool
&self
arg min_px: f32
arg max_px: f32
-> bool
&self
arg px: f32
-> bool
fn window_height_greater_than:
&self
arg px: f32
-> bool
&self
arg min_px: f32
arg max_px: f32
-> bool
fn get_window_width:
&self
-> f32
&self
-> f32
fn get_dpi_factor:
&self
-> f32
Get the callable for FFI language bindings (Python, etc.)
Returns true if the window width is less than the given pixel value
# ExampleReturns true if the window width is greater than the given pixel value
Returns true if the window width is between min and max (inclusive)
Returns true if the window height is less than the given pixel value
Returns true if the window height is greater than the given pixel value
Returns true if the window height is between min and max (inclusive)
Returns the current window width in pixels
Returns the current window height in pixels
Returns the current window DPI factor
struct TimerCallback
ctx: OptionRefAny
fnptr TimerCallbackType
arg RefAny
struct TimerCallbackInfo
callback_info: CallbackInfo
node_id: OptionDomNodeId
frame_start: Instant
call_count: usize
is_about_to_finish: bool
_abi_ref: c_void
_abi_mut: c_void
constructor create:
arg callback_info: CallbackInfo
arg node_id: OptionDomNodeId
arg frame_start: Instant
arg call_count: usize
arg is_about_to_finish: bool
&self
fn get_attached_node_position:
&self
struct TimerCallbackReturn
should_update: Update
should_terminate: TerminateTimer
constructor create:
arg should_update: Update
arg should_terminate: TerminateTimer
constructor continue_unchanged:
constructor continue_and_update:
constructor terminate_unchanged:
constructor terminate_and_update:
Creates a new TimerCallbackReturn with the given update and terminate flags.
Timer continues running, no DOM update needed.
Timer continues running and DOM should be refreshed.
Timer should stop, no DOM update needed.
Timer should stop and DOM should be refreshed.
fnptr ThreadDestructorCallbackType
arg ThreadInner
fnptr WriteBackCallbackType
arg RefAny
arg RefAny
arg CallbackInfo
-> Update
fnptr GetSystemTimeCallbackType
-> Instant
fnptr LibrarySendThreadMsgCallbackType
arg c_void
arg ThreadSendMsg
-> bool
fnptr CheckThreadFinishedCallbackType
arg c_void
-> bool
struct WriteBackCallback
ctx: OptionRefAny
fnptr LibraryReceiveThreadMsgCallbackType
arg c_void
fnptr ThreadCallbackType
arg RefAny
arg ThreadSender
arg ThreadReceiver
struct ThreadCallback
ctx: OptionRefAny
Destructor callback for RefAny - called when the last reference is dropped
fnptr RefAnyDestructorType
arg c_void
enum Update
DoNothing
RefreshDom
RefreshDomAllWindows
struct RefAny
_internal_ptr: c_void
sharing_info: RefCount
instance_id: u64
run_destructor: bool
constructor new_c:
arg ptr: GlVoidPtrConst
arg len: usize
arg align: usize
arg type_id: u64
arg type_name: String
arg destructor: RefAnyDestructorType
-> RefAny
Creates a new RefAny from a raw pointer wrapper, size, alignment, type_id, type_name and destructor
fn get_type_id:
&self
-> u64
fn is_type:
&self
arg type_id: u64
-> bool
Returns the type ID of this RefAny
Returns true if this RefAny is of the given type ID
struct RefCount
ptr: c_void
run_destructor: bool
fn increase_ref:
&self
fn decrease_ref:
&self
fn increase_refmut:
&self
fn decrease_refmut:
&self
Returns true if this RefCount can be shared (no mutable borrows active)
Returns true if this RefCount can be mutably shared (no borrows active)
Increases the shared reference count
Decreases the shared reference count
Increases the mutable reference count
Decreases the mutable reference count
Information passed to image rendering callbacks
struct RenderImageCallbackInfo
callback_node_id: DomNodeId
bounds: HidpiAdjustedBounds
gl_context: c_void
image_cache: c_void
system_fonts: c_void
callable_ptr: c_void
_abi_mut: c_void
fn get_bounds:
&self
&self
-> DomNodeId
fn get_gl_context:
&self
fn get_ctx:
&self
-> OptionRefAny
Returns the bounds of the laid-out node
Returns the DOM node ID that the callback is attached to
Returns the OpenGL context if available
Returns the context RefAny for FFI callbacks
fnptr RenderImageCallbackType
arg RefAny
-> ImageRef
struct PenState
position: LogicalPosition
pressure: f32
tilt: PenTilt
in_contact: bool
is_eraser: bool
barrel_button_pressed: bool
device_id: u64
struct UndoableOperation has destructor
changeset: TextChangeset
pre_state: NodeStateSnapshot
struct GraphemeClusterId
source_run: u32
start_byte_in_run: u32
struct PenTilt
x_tilt: f32
y_tilt: f32
struct ScrollState
scroll_position: LogicalPosition
struct TextChangeset has destructor
id: ChangesetId
target: DomNodeId
operation: TextOperation
timestamp: Instant
enum EdgeType
Top
Bottom
Left
Right
Domconstruction and configurationmod dom:
The document model, similar to HTML. This is a create-only structure, you don't actually read anything back from it. It's designed for ease of construction.
struct Dom has destructor
The data for the root node of this DOM (or sub-DOM).
root: NodeData
The children of this DOM node.
children: DomVec
estimated_total_children: usize
constructor create:
constructor create_body:
-> Dom
constructor create_div:
-> Dom
constructor create_br:
-> Dom
constructor create_text:
constructor create_image:
constructor body:
-> Dom
constructor image:
constructor create_iframe:
arg data: RefAny
arg callback: IFrameCallback
-> Dom
constructor create_node:
constructor from_data:
constructor create_html:
-> Dom
constructor create_head:
-> Dom
constructor create_article:
-> Dom
constructor create_section:
-> Dom
constructor create_aside:
-> Dom
constructor create_header:
-> Dom
constructor create_main:
-> Dom
constructor create_figure:
-> Dom
constructor create_figcaption:
-> Dom
constructor create_details:
-> Dom
constructor summary:
constructor create_dialog:
-> Dom
constructor create_p:
-> Dom
constructor h1:
constructor h2:
constructor h3:
constructor h4:
constructor h5:
constructor h6:
constructor span:
constructor strong:
constructor em:
constructor code:
constructor pre:
constructor blockquote:
constructor cite:
constructor create_abbr:
constructor kbd:
constructor samp:
constructor var:
constructor sub:
constructor sup:
constructor u:
constructor s:
constructor mark:
constructor del:
constructor ins:
constructor dfn:
constructor create_time:
arg text: String
arg datetime: OptionString
-> Dom
constructor bdo:
constructor create_a:
arg href: String
arg label: OptionString
-> Dom
constructor create_button:
constructor create_label:
constructor create_input:
constructor create_textarea:
constructor create_select:
constructor create_option:
constructor create_ul:
-> Dom
constructor create_ol:
-> Dom
constructor create_li:
-> Dom
constructor create_table:
-> Dom
constructor create_caption:
-> Dom
constructor create_thead:
-> Dom
constructor create_tbody:
-> Dom
constructor create_tfoot:
-> Dom
constructor create_tr:
-> Dom
constructor create_th:
-> Dom
constructor create_td:
-> Dom
constructor create_form:
-> Dom
constructor create_fieldset:
-> Dom
constructor create_legend:
-> Dom
constructor create_hr:
-> Dom
constructor create_address:
-> Dom
constructor create_dl:
-> Dom
constructor create_dt:
-> Dom
constructor create_dd:
-> Dom
constructor create_colgroup:
-> Dom
constructor create_col:
arg span: i32
-> Dom
constructor create_optgroup:
constructor create_q:
-> Dom
constructor acronym:
-> Dom
constructor create_output:
-> Dom
constructor create_progress:
arg value: f32
arg max: f32
-> Dom
constructor create_meter:
arg value: f32
arg min: f32
arg max: f32
-> Dom
constructor create_datalist:
-> Dom
constructor create_canvas:
-> Dom
constructor create_object:
-> Dom
constructor create_param:
constructor create_embed:
-> Dom
constructor create_audio:
-> Dom
constructor create_video:
-> Dom
constructor create_source:
constructor create_track:
constructor create_map:
-> Dom
constructor create_area:
-> Dom
constructor title:
constructor meta:
-> Dom
constructor create_link:
-> Dom
constructor create_script:
-> Dom
constructor style_element:
-> Dom
constructor base:
constructor th_with_scope:
constructor td_with_text:
constructor th_with_text:
constructor li_with_text:
constructor p_with_text:
constructor button_with_aria:
arg text: String
arg aria: SmallAriaInfo
-> Dom
constructor link_with_aria:
arg href: String
arg text: String
arg aria: SmallAriaInfo
-> Dom
constructor input_with_aria:
arg input_type: String
arg name: String
arg label: String
arg aria: SmallAriaInfo
-> Dom
constructor textarea_with_aria:
arg name: String
arg label: String
arg aria: SmallAriaInfo
-> Dom
constructor select_with_aria:
arg name: String
arg label: String
arg aria: SmallAriaInfo
-> Dom
constructor table_with_aria:
arg caption: String
arg aria: SmallAriaInfo
-> Dom
constructor label_with_aria:
arg for_id: String
arg text: String
arg aria: SmallAriaInfo
-> Dom
Creates a generic block-level container.
Accessibility: Prefer semantic elements like<article>,<section>,<nav>when applicable.Alias for
create_body()- creates a body container.Alias for
create_image()- creates an image node.Creates an empty DOM with a give
NodeType. Note: This is aconst fnand doesn't allocate, it only allocates once you add at least one child node.Creates the root HTML element.
Accessibility: The<html>element is the root of an HTML document and should have alangattribute.Creates the document head element.
Accessibility: The<head>contains metadata. Use<title>for page titles.Creates an article element.
Accessibility: Represents self-contained content that could be distributed independently. Screen readers can navigate by articles. Consider adding aria-label for multiple articles.Creates a section element.
Accessibility: Represents a thematic grouping of content with a heading. Should typically have a heading (h1-h6) as a child. Consider aria-labelledby.Creates a navigation element.
Accessibility: Represents navigation links. Screen readers can jump to navigation. Use aria-label to distinguish multiple nav elements (e.g., "Main navigation", "Footer links").Creates an aside element.
Accessibility: Represents content tangentially related to main content (sidebars, callouts). Screen readers announce this as complementary content.Creates a header element.
Accessibility: Represents introductory content or navigational aids. Can be used for page headers or section headers.Creates a footer element.
Accessibility: Represents footer for nearest section or page. Typically contains copyright, author info, or related links.Creates a main content element.
Accessibility: Represents the dominant content. There should be only ONE main per page. Screen readers can jump directly to main content. Do not nest inside article/aside/footer/header/nav.Creates a figure element.
Accessibility: Represents self-contained content like diagrams, photos, code listings. Use with<figcaption>to provide a caption. Screen readers associate caption with figure.Creates a figure caption element.
Accessibility: Provides a caption for<figure>. Screen readers announce this as the figure description.Creates a details disclosure element.
Accessibility: Creates a disclosure widget. Screen readers announce expanded/collapsed state. Must contain a<summary>element. Keyboard accessible by default.Creates a summary element for details.
Accessibility: The visible heading/label for<details>. Must be the first child of details. Keyboard accessible (Enter/Space to toggle).Creates a dialog element.
Accessibility: Represents a modal or non-modal dialog. When opened as modal, focus is trapped. Use aria-label or aria-labelledby. Escape key should close modal dialogs.Creates a paragraph element.
Accessibility: Paragraphs provide semantic structure for screen readers.Creates a heading level 1 element.
Accessibility: Useh1for the main page title. There should typically be only oneh1per page.
Parameters: -text: Heading textCreates a heading level 2 element.
Accessibility: Useh2for major section headings underh1.
Parameters: -text: Heading textCreates a heading level 3 element.
Accessibility: Useh3for subsections underh2.
Parameters: -text: Heading textCreates a heading level 4 element.
Parameters: -text: Heading textCreates a heading level 5 element.
Parameters: -text: Heading textCreates a heading level 6 element.
Parameters: -text: Heading textCreates a generic inline container (span).
Accessibility: Prefer semantic elements likestrong,em,code, etc. when applicable.
Parameters: -text: Span contentCreates a strongly emphasized text element (strong importance).
Accessibility: Usestronginstead ofbfor semantic meaning. Screen readers can convey the importance. Use for text that has strong importance, seriousness, or urgency.
Parameters: -text: Text to emphasizeCreates an emphasized text element (stress emphasis).
Accessibility: Useeminstead ofifor semantic meaning. Screen readers can convey the emphasis. Use for text that has stress emphasis.
Parameters: -text: Text to emphasizeCreates a code/computer code element.
Accessibility: Represents a fragment of computer code. Screen readers can identify this as code content.
Parameters: -code: Code contentCreates a preformatted text element.
Accessibility: Preserves whitespace and line breaks. Useful for code blocks or ASCII art. Screen readers will read the content as-is.
Parameters: -text: Preformatted contentCreates a blockquote element.
Accessibility: Represents a section quoted from another source. Screen readers can identify quoted content. Consider adding aciteattribute.
Parameters: -text: Quote contentCreates a citation element.
Accessibility: Represents a reference to a creative work. Screen readers can identify citations.
Parameters: -text: Citation textCreates an abbreviation element.
Accessibility: Represents an abbreviation or acronym. Use with atitleattribute to provide the full expansion for screen readers.
Parameters: -abbr_text: Abbreviated text -title: Full expansionCreates a keyboard input element.
Accessibility: Represents keyboard input or key combinations. Screen readers can identify keyboard instructions.
Parameters: -text: Keyboard instructionCreates a sample output element.
Accessibility: Represents sample output from a program or computing system.
Parameters: -text: Sample textCreates a variable element.
Accessibility: Represents a variable in mathematical expressions or programming.
Parameters: -text: Variable nameCreates a subscript element.
Accessibility: Screen readers may announce subscript formatting.
Parameters: -text: Subscript contentCreates a superscript element.
Accessibility: Screen readers may announce superscript formatting.
Parameters: -text: Superscript contentCreates an underline text element.
Accessibility: Screen readers typically don't announce underline formatting. Use semantic elements when possible (e.g.,<em>for emphasis).Creates a strikethrough text element.
Accessibility: Represents text that is no longer accurate or relevant. Consider using<del>for deleted content with datetime attribute.Creates a marked/highlighted text element.
Accessibility: Represents text marked for reference or notation purposes. Screen readers may announce this as "highlighted".Creates a deleted text element.
Accessibility: Represents deleted content in document edits. Use withdatetimeandciteattributes for edit tracking.Creates an inserted text element.
Accessibility: Represents inserted content in document edits. Use withdatetimeandciteattributes for edit tracking.Creates a definition element.
Accessibility: Represents the defining instance of a term. Often used within a definition list or with<abbr>.Creates a time element.
Accessibility: Represents a specific time or date. Usedatetimeattribute for machine-readable format.
Parameters: -text: Human-readable time/date -datetime: Optional machine-readable datetimeCreates a bi-directional override element.
Accessibility: Overrides text direction. Usedirattribute (ltr/rtl).Creates an anchor/hyperlink element.
Accessibility: Always provide meaningful link text. Avoid "click here" or "read more". Screen readers often navigate by links, so descriptive text is crucial.
Parameters: -href: Link destination URL -label: Link text (passNonefor image-only links with alt text)Creates a button element.
Accessibility: Buttons are keyboard accessible by default. Always provide clear button text or anaria-labelfor icon-only buttons.
Parameters: -text: Button label textCreates a label element for form controls.
Accessibility: Always associate labels with form controls usingforattribute or by wrapping the control. This is critical for screen reader users.
Parameters: -for_id: ID of the associated form control -text: Label textCreates an input element.
Accessibility: Always provide a label oraria-label. Set appropriatetypeandaria-attributes for the input's purpose.
Parameters: -input_type: Input type (text, password, email, etc.) -name: Form field name -label: Accessibility label (required)Creates a textarea element.
Accessibility: Always provide a label oraria-label. Consideraria-describedbyfor additional instructions.
Parameters: -name: Form field name -label: Accessibility label (required)Creates a select dropdown element.
Accessibility: Always provide a label. Group related options withoptgroup.
Parameters: -name: Form field name -label: Accessibility label (required)Creates an option element for select dropdowns.
Parameters: -value: Option value -text: Display textCreates an unordered list element.
Accessibility: Screen readers announce lists and item counts, helping users understand content structure.Creates an ordered list element.
Accessibility: Screen readers announce lists and item counts, helping users understand content structure and numbering.Creates a list item element.
Accessibility: Must be a child oful,ol, ormenu. Screen readers announce list item position (e.g., "2 of 5").Creates a table element.
Accessibility: Use proper table structure withthead,tbody,th, andtd. Provide acaptionfor table purpose. Usescopeattribute on header cells.Creates a table caption element.
Accessibility: Describes the purpose of the table. Screen readers announce this first.Creates a table header element.
Accessibility: Groups header rows. Screen readers can navigate table structure.Creates a table body element.
Accessibility: Groups body rows. Screen readers can navigate table structure.Creates a table footer element.
Accessibility: Groups footer rows. Screen readers can navigate table structure.Creates a table row element.
Creates a table header cell element.
Accessibility: Usescopeattribute ("col" or "row") to associate headers with data cells. Screen readers use this to announce cell context.Creates a table data cell element.
Creates a form element.
Accessibility: Group related form controls withfieldsetandlegend. Provide clear labels for all inputs. Consideraria-describedbyfor instructions.Creates a fieldset element for grouping form controls.
Accessibility: Groups related form controls. Always include alegendas the first child to describe the group. Screen readers announce the legend when entering the fieldset.Creates a legend element for fieldsets.
Accessibility: Describes the purpose of a fieldset. Must be the first child of a fieldset. Screen readers announce this when entering the fieldset.Creates a horizontal rule element.
Accessibility: Represents a thematic break. Screen readers may announce this as a separator. Consider using CSS borders for purely decorative lines.Creates an address element.
Accessibility: Represents contact information. Screen readers identify this as address content.Creates a definition list element.
Accessibility: Screen readers announce definition lists and their structure.Creates a definition term element.
Accessibility: Must be a child ofdl. Represents the term being defined.Creates a definition description element.
Accessibility: Must be a child ofdl. Provides the definition for the term.Creates a table column group element.
Creates a table column element.
Creates an optgroup element for grouping select options.
Parameters: -label: Label for the option groupCreates a quotation element.
Accessibility: Represents an inline quotation.Creates an acronym element.
Note: Deprecated in HTML5. Consider usingabbr()instead.Creates a menu element.
Accessibility: Represents a list of commands. Similar to<ul>but semantic for toolbars/menus.Creates a menu item element.
Accessibility: Represents a command in a menu. Use with appropriate role/aria attributes.Creates an output element.
Accessibility: Represents the result of a calculation or user action. Useforattribute to associate with input elements. Screen readers announce updates.Creates a progress indicator element.
Accessibility: Represents task progress. Usevalueandmaxattributes. Screen readers announce progress percentage. Use aria-label to describe the task.Creates a meter gauge element.
Accessibility: Represents a scalar measurement within a known range. Usevalue,min,max,low,high,optimumattributes. Screen readers announce the measurement. Provide aria-label for context.Creates a datalist element for input suggestions.
Accessibility: Provides autocomplete options for inputs. Associate with input usinglistattribute. Screen readers announce available options.Creates a canvas element for graphics.
Accessibility: Canvas content is not accessible by default. Always provide fallback content as children and/or detailed aria-label. Consider using SVG for accessible graphics when possible.Creates an object element for embedded content.
Accessibility: Provide fallback content as children. Use aria-label to describe content.Creates a param element for object parameters.
Parameters: -name: Parameter name -value: Parameter valueCreates an embed element.
Accessibility: Provide alternative content or link. Use aria-label to describe embedded content.Creates an audio element.
Accessibility: Always provide controls. Use<track>for captions/subtitles. Provide fallback text for unsupported browsers.Creates a video element.
Accessibility: Always provide controls. Use<track>for captions/subtitles/descriptions. Provide fallback text. Consider providing transcript.Creates a source element for media.
Parameters: -src: Media source URL -media_type: MIME type (e.g., "video/mp4", "audio/ogg")Creates a track element for media captions/subtitles.
Accessibility: Essential for deaf/hard-of-hearing users and non-native speakers. Usekind(subtitles/captions/descriptions),srclang, andlabelattributes.
Parameters: -src: Track file URL (WebVTT format) -kind: Track kind ("subtitles", "captions", "descriptions", "chapters", "metadata")Creates a map element for image maps.
Accessibility: Provide text alternatives. Ensure all areas have alt text.Creates an area element for image map regions.
Accessibility: Always providealttext describing the region/link purpose. Keyboard users should be able to navigate areas.Creates a title element for document title.
Accessibility: Required for all pages. Screen readers announce this first. Should be unique and descriptive. Keep under 60 characters.Creates a meta element.
Accessibility: Use for charset, viewport, description. Crucial for proper text display.Creates a link element for external resources.
Accessibility: Use for stylesheets, icons, alternate versions. Provide meaningfultitleattribute for alternate stylesheets.Creates a script element.
Accessibility: Ensure scripted content is accessible. Provide noscript fallbacks for critical functionality.Creates a style element for embedded CSS.
Note: In Azul, use the.style()method instead for styling. This creates a<style>HTML element for embedded stylesheets.Creates a base element for document base URL.
Parameters: -href: Base URL for relative URLs in the documentCreates a table header cell with scope.
Parameters: -scope: "col", "row", "colgroup", or "rowgroup" -text: Header text
Accessibility: The scope attribute is crucial for associating headers with data cells.Creates a table data cell with text.
Parameters: -text: Cell contentCreates a table header cell with text.
Parameters: -text: Header textCreates a list item with text.
Parameters: -text: List item contentCreates a paragraph with text.
Parameters: -text: Paragraph contentCreates a button with text content and accessibility information.
Parameters: -text: The visible button text -aria: Accessibility information (role, description, etc.)
Example:Creates a link (anchor) with href, text, and accessibility information.
Parameters: -href: The link destination -text: The visible link text -aria: Accessibility information (expanded description, etc.)
Example:Creates an input element with type, name, and accessibility information.
Parameters: -input_type: The input type (text, password, email, etc.) -name: The form field name -label: Base accessibility label -aria: Additional accessibility information (description, etc.)
Example:Creates a textarea with name and accessibility information.
Parameters: -name: The form field name -label: Base accessibility label -aria: Additional accessibility information (description, etc.)
Example:Creates a select dropdown with name and accessibility information.
Parameters: -name: The form field name -label: Base accessibility label -aria: Additional accessibility information (description, etc.)
Example:Creates a table with caption and accessibility information.
Parameters: -caption: Table caption (visible title) -aria: Accessibility information describing table purpose
Example:Creates a label for a form control with additional accessibility information.
Parameters: -for_id: The ID of the associated form control -text: The visible label text -aria: Additional accessibility information (description, etc.)
Example:fn set_dataset:
&mut self
arg dataset: RefAny
fn with_dataset:
self
arg data: OptionRefAny
-> Dom
&mut self
arg ids_and_classes: IdOrClassVec
self
arg ids_and_classes: IdOrClassVec
-> Dom
fn set_callbacks:
&mut self
arg callbacks: CoreCallbackDataVec
fn with_callbacks:
self
arg callbacks: CoreCallbackDataVec
-> Dom
fn add_callback:
&mut self
arg event: EventFilter
arg data: RefAny
arg callback: CallbackType
fn with_callback:
self
arg event: EventFilter
arg data: RefAny
arg callback: CallbackType
-> Dom
fn add_child:
&mut self
arg child: Dom
fn with_child:
fn set_children:
&mut self
arg children: DomVec
fn with_children:
fn add_id:
&mut self
arg id: String
fn with_id:
fn add_class:
&mut self
arg class: String
fn with_class:
fn add_css_property:
&mut self
arg prop: CssProperty
self
arg prop: CssProperty
-> Dom
&mut self
arg prop: CssProperty
self
arg prop: CssProperty
-> Dom
&mut self
arg prop: CssProperty
self
arg prop: CssProperty
-> Dom
&mut self
arg prop: CssProperty
self
arg prop: CssProperty
-> Dom
fn set_inline_style:
&mut self
arg style: String
&mut self
arg style: String
&mut self
arg style: String
&mut self
arg style: String
fn set_clip_mask:
&mut self
arg clip_mask: ImageMask
fn with_clip_mask:
fn set_tab_index:
&mut self
arg tab_index: TabIndex
fn with_tab_index:
&mut self
arg accessibility_info: AccessibilityInfo
self
arg accessibility_info: AccessibilityInfo
-> Dom
fn node_count:
&self
-> usize
fn style:
&mut self
-> Dom
&mut self
-> Dom
fn with_attribute:
self
arg attr: AttributeType
-> Dom
fn with_attributes:
self
arg attributes: AttributeVec
-> Dom
&mut self
-> usize
Adds a callback to this DOM node.
Adds an CSS ID to the DOM root node.
Adds a CSS class to the DOM root node.
Adds an inline (normal) CSS property to the DOM root node.
Adds an inline (hover) CSS property to the DOM root node.
Adds an inline (hover) CSS property to the DOM root node.
Adds an inline (hover) CSS property to the DOM root node.
Sets inline CSS styles for the normal state, parsing from a CSS string. This allows setting multiple CSS properties at once using CSS syntax.
Builder method for setting inline CSS styles for the normal state. Parses CSS string and applies properties to the root node.
Sets inline CSS styles for the hover state, parsing from a CSS string.
Builder method for setting inline CSS styles for the hover state.
Sets inline CSS styles for the active state, parsing from a CSS string.
Builder method for setting inline CSS styles for the active state.
Sets inline CSS styles for the focus state, parsing from a CSS string.
Builder method for setting inline CSS styles for the focus state.
Sets the clip mask for the DOM root node.
Sets the tab index for the DOM root node.
Sets accessibility attributes for the DOM root node.
Sets the menu bar for the root node
Sets the context menu for the root node
Adds an attribute to this DOM element.
Example:Adds multiple attributes to this DOM element.
Represents all data associated with a single DOM node, such as its type, classes, IDs, callbacks, and inline styles.
struct NodeData has destructor
node_type: NodeType
dataset: OptionRefAny
ids_and_classes: IdOrClassVec
attributes: AttributeVec
callbacks: CoreCallbackDataVec
inline_css_props: NodeDataInlineCssPropertyVec
tab_index: OptionTabIndex
extra: c_void
constructor create:
constructor create_body:
-> NodeData
constructor create_div:
-> NodeData
constructor create_br:
-> NodeData
constructor create_text:
constructor create_image:
constructor create_iframe:
arg data: RefAny
arg callback: IFrameCallback
-> NodeData
constructor create_node:
Creates an new, empty
NodeDatastructShorthand for
NodeData::create_node(NodeType::Body).Shorthand for
NodeData::create_node(NodeType::Div).Shorthand for
NodeData::create_node(NodeType::Br).Shorthand for
NodeData::create_node(NodeType::Text(value.into())).Shorthand for
NodeData::create_node(NodeType::Image(image_id)).Creates a new
NodeDatainstance from a givenNodeType.fn set_dataset:
&mut self
arg data: OptionRefAny
&mut self
arg ids_and_classes: IdOrClassVec
fn add_callback:
&mut self
arg event: EventFilter
arg data: RefAny
arg callback: CallbackType
fn set_callbacks:
&mut self
arg callbacks: CoreCallbackDataVec
fn set_clip_mask:
&mut self
arg clip_mask: ImageMask
fn set_tab_index:
&mut self
arg tab_index: TabIndex
&mut self
arg accessibility_info: AccessibilityInfo
fn is_text_node:
&self
-> bool
fn is_iframe_node:
&self
-> bool
fn is_anonymous:
&self
-> bool
fn set_anonymous:
&mut self
arg is_anonymous: bool
fn add_id:
&mut self
arg s: String
fn add_class:
&mut self
arg s: String
&mut self
arg p: CssProperty
&mut self
arg p: CssProperty
&mut self
arg p: CssProperty
&mut self
arg p: CssProperty
fn is_focusable:
&self
-> bool
fn debug_print_end:
&self
-> String
Returns whether this node is an anonymous box generated for table layout.
Marks this node as an anonymous box (generated for table layout).
List of core DOM node types built into
azul. This enum defines the building blocks of the UI, similar to HTML tags.union enum NodeType has destructor
Root HTML element.
Html
Document head (metadata container).
Head
Root element of the document body.
Body
Generic block-level container.
Div
Paragraph.
P
Article content.
Article
Section of a document.
Section
Navigation links.
Nav
Sidebar/tangential content.
Aside
Header section.
Header
Footer section.
Footer
Main content.
Main
Figure with optional caption.
Figure
Caption for figure element.
FigCaption
Headings.
H1
H2
H3
H4
H5
H6
Line break.
Br
Horizontal rule.
Hr
Preformatted text.
Pre
Block quote.
BlockQuote
Address.
Address
Details disclosure widget.
Details
Summary for details element.
Summary
Dialog box or window.
Dialog
Unordered list.
Ul
Ordered list.
Ol
List item.
Li
Definition list.
Dl
Definition term.
Dt
Definition description.
Dd
Menu list.
Menu
Menu item.
MenuItem
Directory list (deprecated).
Dir
Table container.
Table
Table caption.
Caption
Table header.
THead
Table body.
TBody
Table footer.
TFoot
Table row.
Tr
Table header cell.
Th
Table data cell.
Td
Table column group.
ColGroup
Table column.
Col
Form container.
Form
Form fieldset.
FieldSet
Fieldset legend.
Legend
Label for form controls.
Label
Input control.
Input
Button control.
Button
Select dropdown.
Select
Option group.
OptGroup
Select option.
SelectOption
Multiline text input.
TextArea
Form output element.
Output
Progress indicator.
Progress
Scalar measurement within a known range.
Meter
List of predefined options for input.
DataList
Generic inline container.
Span
Anchor/hyperlink.
A
Emphasized text.
Em
Strongly emphasized text.
Strong
Bold text (deprecated - use
Dom::strong()for semantic importance).B
Italic text (deprecated - use
Dom::em()for emphasis orDom::cite()for citations).I
Underline text.
U
Strikethrough text.
S
Marked/highlighted text.
Mark
Deleted text.
Del
Inserted text.
Ins
Code.
Code
Sample output.
Samp
Keyboard input.
Kbd
Variable.
Var
Citation.
Cite
Defining instance of a term.
Dfn
Abbreviation.
Abbr
Acronym.
Acronym
Inline quotation.
Q
Date/time.
Time
Subscript.
Sub
Superscript.
Sup
Small text (deprecated - use CSS
font-sizeinstead).Small
Big text (deprecated - use CSS
font-sizeinstead).Big
Bi-directional override.
Bdo
Bi-directional isolate.
Bdi
Word break opportunity.
Wbr
Ruby annotation.
Ruby
Ruby text.
Rt
Ruby text container.
Rtc
Ruby parenthesis.
Rp
Machine-readable data.
Data
Canvas for graphics.
Canvas
Embedded object.
Object
Embedded object parameter.
Param
External resource embed.
Embed
Audio content.
Audio
Video content.
Video
Media source.
Source
Text track for media.
Track
Image map.
Map
Image map area.
Area
SVG graphics.
Svg
Document title.
Title
Metadata.
Meta
External resource link.
Link
Embedded or referenced script.
Script
Style information.
Style
Base URL for relative URLs.
Base
::before pseudo-element.
Before
::after pseudo-element.
After
::marker pseudo-element.
Marker
::placeholder pseudo-element.
Placeholder
Text content, ::text
Text(String)
Image element, ::image
Image(ImageRef)
IFrame (embedded content)
IFrame(IFrameNode)
Holds information about a UI element for accessibility purposes (e.g., screen readers). This is a wrapper for platform-specific accessibility APIs like MSAA.
struct AccessibilityInfo has destructor
accessibility_name: OptionString
accessibility_value: OptionString
role: AccessibilityRole
states: AccessibilityStateVec
accelerator: OptionVirtualKeyCodeCombo
default_action: OptionString
supported_actions: AccessibilityActionVec
is_live_region: bool
labelled_by: OptionDomNodeId
described_by: OptionDomNodeId
Defines the element's purpose for accessibility APIs, informing assistive technologies like screen readers about the function of a UI element. Each variant corresponds to a standard control type or UI structure. For more details, see the [MSDN Role Constants page](https://docs.microsoft.com/en-us/windows/winauto/object-roles).
enum AccessibilityRole
Represents the title or caption bar of a window. - Purpose: To identify the title bar containing the window title and system commands. - When to use: This role is typically inserted by the operating system for standard windows. - Example: The bar at the top of an application window displaying its name and the minimize, maximize, and close buttons.
TitleBar
Represents a menu bar at the top of a window. - Purpose: To contain a set of top-level menus for an application. - When to use: For the main menu bar of an application, such as one containing "File," "Edit," and "View." - Example: The "File", "Edit", "View" menu bar at the top of a text editor.
MenuBar
Represents a vertical or horizontal scroll bar. - Purpose: To enable scrolling through content that is larger than the visible area. - When to use: For any scrollable region of content. - Example: The bar on the side of a web page that allows the user to scroll up and down.
ScrollBar
Represents a handle or grip used for moving or resizing. - Purpose: To provide a user interface element for manipulating another element's size or position. - When to use: For handles that allow resizing of windows, panes, or other objects. - Example: The small textured area in the bottom-right corner of a window that can be dragged to resize it.
Grip
Represents a system sound indicating an event. - Purpose: To associate a sound with a UI event, providing an auditory cue. - When to use: When a sound is the primary representation of an event. - Example: A system notification sound that plays when a new message arrives.
Sound
Represents the system's mouse pointer or other pointing device. - Purpose: To indicate the screen position of the user's pointing device. - When to use: This role is managed by the operating system. - Example: The arrow that moves on the screen as you move the mouse.
Cursor
Represents the text insertion point indicator. - Purpose: To show the current text entry or editing position. - When to use: This role is typically managed by the operating system for text input fields. - Example: The blinking vertical line in a text box that shows where the next character will be typed.
Caret
Represents an alert or notification. - Purpose: To convey an important, non-modal message to the user. - When to use: For non-intrusive notifications that do not require immediate user interaction. - Example: A small, temporary "toast" notification that appears to confirm an action, like "Email sent."
Alert
Represents a window frame. - Purpose: To serve as the container for other objects like a title bar and client area. - When to use: This is a fundamental role, typically managed by the windowing system. - Example: The main window of any application, which contains all other UI elements.
Window
Represents a window's client area, where the main content is displayed. - Purpose: To define the primary content area of a window. - When to use: For the main content region of a window. It's often the default role for a custom control container. - Example: The area of a web browser where the web page content is rendered.
Client
Represents a pop-up menu. - Purpose: To display a list of
MenuItemobjects that appears when a user performs an action. - When to use: For context menus (right-click menus) or drop-down menus. - Example: The menu that appears when you right-click on a file in a file explorer.MenuPopup
Represents an individual item within a menu. - Purpose: To represent a single command, option, or separator within a menu. - When to use: For individual options inside a
MenuBarorMenuPopup. - Example: The "Save" option within the "File" menu.MenuItem
Represents a small pop-up window that provides information. - Purpose: To offer brief, contextual help or information about a UI element. - When to use: For informational pop-ups that appear on mouse hover. - Example: The small box of text that appears when you hover over a button in a toolbar.
Tooltip
Represents the main window of an application. - Purpose: To identify the top-level window of an application. - When to use: For the primary window that represents the application itself. - Example: The main window of a calculator or notepad application.
Application
Represents a document window within an application. - Purpose: To represent a contained document, typically in a Multiple Document Interface (MDI) application. - When to use: For individual document windows inside a larger application shell. - Example: In a photo editor that allows multiple images to be open in separate windows, each image window would be a
Document.Document
Represents a pane or a distinct section of a window. - Purpose: To divide a window into visually and functionally distinct areas. - When to use: For sub-regions of a window, like a navigation pane, preview pane, or sidebar. - Example: The preview pane in an email client that shows the content of the selected email.
Pane
Represents a graphical chart or graph. - Purpose: To display data visually in a chart format. - When to use: For any type of chart, such as a bar chart, line chart, or pie chart. - Example: A bar chart displaying monthly sales figures.
Chart
Represents a dialog box or message box. - Purpose: To create a secondary window that requires user interaction before returning to the main application. - When to use: For modal or non-modal windows that prompt the user for information or a response. - Example: The "Open File" or "Print" dialog in most applications.
Dialog
Represents a window's border. - Purpose: To identify the border of a window, which is often used for resizing. - When to use: This role is typically managed by the windowing system. - Example: The decorative and functional frame around a window.
Border
Represents a group of related controls. - Purpose: To logically group other objects that share a common purpose. - When to use: For grouping controls like a set of radio buttons or a fieldset with a legend. - Example: A "Settings" group box in a dialog that contains several related checkboxes.
Grouping
Represents a visual separator. - Purpose: To visually divide a space or a group of controls. - When to use: For visual separators in menus, toolbars, or between panes. - Example: The horizontal line in a menu that separates groups of related menu items.
Separator
Represents a toolbar containing a group of controls. - Purpose: To group controls, typically buttons, for quick access to frequently used functions. - When to use: For a bar of buttons or other controls, usually at the top of a window or pane. - Example: The toolbar at the top of a word processor with buttons for "Bold," "Italic," and "Underline."
Toolbar
Represents a status bar for displaying information. - Purpose: To display status information about the current state of the application. - When to use: For a bar, typically at the bottom of a window, that displays messages. - Example: The bar at the bottom of a web browser that shows the loading status of a page.
StatusBar
Represents a data table. - Purpose: To present data in a two-dimensional grid of rows and columns. - When to use: For grid-like data presentation. - Example: A spreadsheet or a table of data in a database application.
Table
Represents a column header in a table. - Purpose: To provide a label for a column of data. - When to use: For the headers of columns in a
Table. - Example: The header row in a spreadsheet with labels like "Name," "Date," and "Amount."ColumnHeader
Represents a row header in a table. - Purpose: To provide a label for a row of data. - When to use: For the headers of rows in a
Table. - Example: The numbered rows on the left side of a spreadsheet.RowHeader
Represents a full column of cells in a table. - Purpose: To represent an entire column as a single accessible object. - When to use: When it is useful to interact with a column as a whole. - Example: The "Amount" column in a financial data table.
Column
Represents a full row of cells in a table. - Purpose: To represent an entire row as a single accessible object. - When to use: When it is useful to interact with a row as a whole. - Example: A row representing a single customer's information in a customer list.
Row
Represents a single cell within a table. - Purpose: To represent a single data point or control within a
Table. - When to use: For individual cells in a grid or table. - Example: A single cell in a spreadsheet containing a specific value.Cell
Represents a hyperlink to a resource. - Purpose: To provide a navigational link to another document or location. - When to use: For text or images that, when clicked, navigate to another resource. - Example: A clickable link on a web page.
Link
Represents a help balloon or pop-up. - Purpose: To provide more detailed help information than a standard tooltip. - When to use: For a pop-up that offers extended help text, often initiated by a help button. - Example: A pop-up balloon with a paragraph of help text that appears when a user clicks a help icon.
HelpBalloon
Represents an animated, character-like graphic object. - Purpose: To provide an animated agent for user assistance or entertainment. - When to use: For animated characters or avatars that provide help or guidance. - Example: An animated paperclip that offers tips in a word processor (e.g., Microsoft's Clippy).
Character
Represents a list of items. - Purpose: To contain a set of
ListItemobjects. - When to use: For list boxes or similar controls that present a list of selectable items. - Example: The list of files in a file selection dialog.List
Represents an individual item within a list. - Purpose: To represent a single, selectable item within a
List. - When to use: For each individual item in a list box or combo box. - Example: A single file name in a list of files.ListItem
Represents an outline or tree structure. - Purpose: To display a hierarchical view of data. - When to use: For tree-view controls that show nested items. - Example: A file explorer's folder tree view.
Outline
Represents an individual item within an outline or tree. - Purpose: To represent a single node (which can be a leaf or a branch) in an
Outline. - When to use: For each node in a tree view. - Example: A single folder in a file explorer's tree view.OutlineItem
Represents a single tab in a tabbed interface. - Purpose: To provide a control for switching between different
PropertyPageviews. - When to use: For the individual tabs that the user can click to switch pages. - Example: The "General" and "Security" tabs in a file properties dialog.PageTab
Represents the content of a page in a property sheet. - Purpose: To serve as a container for the controls displayed when a
PageTabis selected. - When to use: For the content area associated with a specific tab. - Example: The set of options displayed when the "Security" tab is active.PropertyPage
Represents a visual indicator, like a slider thumb. - Purpose: To visually indicate the current value or position of another control. - When to use: For a sub-element that indicates status, like the thumb of a scrollbar. - Example: The draggable thumb of a scrollbar that indicates the current scroll position.
Indicator
Represents a picture or graphical image. - Purpose: To display a non-interactive image. - When to use: For images and icons that are purely decorative or informational. - Example: A company logo displayed in an application's "About" dialog.
Graphic
Represents read-only text. - Purpose: To provide a non-editable text label for another control or for displaying information. - When to use: For text that the user cannot edit. - Example: The label "Username:" next to a text input field.
StaticText
Represents editable text or a text area. - Purpose: To allow for user text input or selection. - When to use: For text input fields where the user can type. - Example: A text box for entering a username or password.
Text
Represents a standard push button. - Purpose: To initiate an immediate action. - When to use: For standard buttons that perform an action when clicked. - Example: An "OK" or "Cancel" button in a dialog.
PushButton
Represents a check box control. - Purpose: To allow the user to make a binary choice (checked or unchecked). - When to use: For options that can be toggled on or off independently. - Example: A "Remember me" checkbox on a login form.
CheckButton
Represents a radio button. - Purpose: To allow the user to select one option from a mutually exclusive group. - When to use: For a choice where only one option from a
Groupingcan be selected. - Example: "Male" and "Female" radio buttons for selecting gender.RadioButton
Represents a combination of a text field and a drop-down list. - Purpose: To allow the user to either type a value or select one from a list. - When to use: For controls that offer a list of suggestions but also allow custom input. - Example: A font selector that allows you to type a font name or choose one from a list.
ComboBox
Represents a drop-down list box. - Purpose: To allow the user to select an item from a non-editable list that drops down. - When to use: For selecting a single item from a predefined list of options. - Example: A country selection drop-down menu.
DropList
Represents a progress bar. - Purpose: To indicate the progress of a lengthy operation. - When to use: To provide feedback for tasks like file downloads or installations. - Example: The bar that fills up to show the progress of a file copy operation.
ProgressBar
Represents a dial or knob. - Purpose: To allow selecting a value from a continuous or discrete range, often circularly. - When to use: For controls that resemble real-world dials, like a volume knob. - Example: A volume control knob in a media player application.
Dial
Represents a control for entering a keyboard shortcut. - Purpose: To capture a key combination from the user. - When to use: In settings where users can define their own keyboard shortcuts. - Example: A text field in a settings dialog where a user can press a key combination to assign it to a command.
HotkeyField
Represents a slider for selecting a value within a range. - Purpose: To allow the user to adjust a setting along a continuous or discrete range. - When to use: For adjusting values like volume, brightness, or zoom level. - Example: A slider to control the volume of a video.
Slider
Represents a spin button (up/down arrows) for incrementing or decrementing a value. - Purpose: To provide fine-tuned adjustment of a value, typically numeric. - When to use: For controls that allow stepping through a range of values. - Example: The up and down arrows next to a number input for setting the font size.
SpinButton
Represents a diagram or flowchart. - Purpose: To represent data or relationships in a schematic form. - When to use: For visual representations of structures that are not charts, like a database schema diagram. - Example: A flowchart illustrating a business process.
Diagram
Represents an animation control. - Purpose: To display a sequence of images or indicate an ongoing process. - When to use: For animations that show that an operation is in progress. - Example: The animation that plays while files are being copied.
Animation
Represents a mathematical equation. - Purpose: To display a mathematical formula in the correct format. - When to use: For displaying mathematical equations. - Example: A rendered mathematical equation in a scientific document editor.
Equation
Represents a button that drops down a list of items. - Purpose: To combine a default action button with a list of alternative actions. - When to use: For buttons that have a primary action and a secondary list of options. - Example: A "Send" button with a dropdown arrow that reveals "Send and Archive."
ButtonDropdown
Represents a button that drops down a full menu. - Purpose: To provide a button that opens a menu of choices rather than performing a single action. - When to use: When a button's primary purpose is to reveal a menu. - Example: A "Tools" button that opens a menu with various tool options.
ButtonMenu
Represents a button that drops down a grid for selection. - Purpose: To allow selection from a two-dimensional grid of options. - When to use: For buttons that open a grid-based selection UI. - Example: A color picker button that opens a grid of color swatches.
ButtonDropdownGrid
Represents blank space between other objects. - Purpose: To represent significant empty areas in a UI that are part of the layout. - When to use: Sparingly, to signify that a large area is intentionally blank. - Example: A large empty panel in a complex layout might use this role.
Whitespace
Represents the container for a set of tabs. - Purpose: To group a set of
PageTabelements. - When to use: To act as the parent container for a row or column of tabs. - Example: The entire row of tabs at the top of a properties dialog.PageTabList
Represents a clock control. - Purpose: To display the current time. - When to use: For any UI element that displays time. - Example: The clock in the system tray of the operating system.
Clock
Represents a button with two parts: a default action and a dropdown. - Purpose: To combine a frequently used action with a set of related, less-used actions. - When to use: When a button has a default action and other related actions available in a dropdown. - Example: A "Save" split button where the primary part saves, and the dropdown offers "Save As."
SplitButton
Represents a control for entering an IP address. - Purpose: To provide a specialized input field for IP addresses, often with formatting and validation. - When to use: For dedicated IP address input fields. - Example: A network configuration dialog with a field for entering a static IP address.
IpAddress
Represents an element with no specific role. - Purpose: To indicate an element that has no semantic meaning for accessibility. - When to use: Should be used sparingly for purely decorative elements that should be ignored by assistive technologies. - Example: A decorative graphical flourish that has no function or information to convey.
Nothing
Unknown or unspecified role. - Purpose: Default fallback when no specific role is assigned. - When to use: As a default value or when role information is unavailable.
Unknown
Defines the current state of an element for accessibility APIs (e.g., focused, checked). These states provide dynamic information to assistive technologies about the element's condition. See the [MSDN State Constants page](https://docs.microsoft.com/en-us/windows/win32/winauto/object-state-constants) for more details.
enum AccessibilityState
The element is unavailable and cannot be interacted with. - Purpose: To indicate that a control is disabled or grayed out. - When to use: For disabled buttons, non-interactive menu items, or any control that is temporarily non-functional. - Example: A "Save" button that is disabled until the user makes changes to a document.
Unavailable
The element is selected. - Purpose: To indicate that an item is currently chosen or highlighted. This is distinct from having focus. - When to use: For selected items in a list, highlighted text, or the currently active tab in a tab list. - Example: A file highlighted in a file explorer, or multiple selected emails in an inbox.
Selected
The element has the keyboard focus. - Purpose: To identify the single element that will receive keyboard input. - When to use: For the control that is currently active and ready to be manipulated by the keyboard. - Example: A text box with a blinking cursor, or a button with a dotted outline around it.
Focused
The element is checked, toggled, or in a mixed state. - Purpose: To represent the state of controls like checkboxes, radio buttons, and toggle buttons. - When to use: For checkboxes that are ticked, selected radio buttons, or toggle buttons that are "on." - Example: A checked "I agree" checkbox, a selected "Yes" radio button, or an active "Bold" button in a toolbar.
Checked
The element's content cannot be edited by the user. - Purpose: To indicate that the element's value can be viewed and copied, but not modified. - When to use: For display-only text fields or documents. - Example: A text box displaying a license agreement that the user can scroll through but cannot edit.
Readonly
The element is the default action in a dialog or form. - Purpose: To identify the button that will be activated if the user presses the Enter key. - When to use: For the primary confirmation button in a dialog. - Example: The "OK" button in a dialog box, which often has a thicker or colored border.
Default
The element is expanded, showing its child items. - Purpose: To indicate that a collapsible element is currently open and its contents are visible. - When to use: For tree view nodes, combo boxes with their lists open, or expanded accordion panels. - Example: A folder in a file explorer's tree view that has been clicked to show its subfolders.
Expanded
The element is collapsed, hiding its child items. - Purpose: To indicate that a collapsible element is closed and its contents are hidden. - When to use: The counterpart to
Expandedfor any collapsible UI element. - Example: A closed folder in a file explorer's tree view, hiding its contents.Collapsed
The element is busy and cannot respond to user interaction. - Purpose: To indicate that the element or application is performing an operation and is temporarily unresponsive. - When to use: When an application is loading, processing data, or otherwise occupied. - Example: A window that is grayed out and shows a spinning cursor while saving a large file.
Busy
The element is not currently visible on the screen. - Purpose: To indicate that an element exists but is currently scrolled out of the visible area. - When to use: For items in a long list or a large document that are not within the current viewport. - Example: A list item in a long dropdown that you would have to scroll down to see.
Offscreen
The element can accept keyboard focus. - Purpose: To indicate that the user can navigate to this element using the keyboard (e.g., with the Tab key). - When to use: On all interactive elements like buttons, links, and input fields, whether they currently have focus or not. - Example: A button that can receive focus, even if it is not the currently focused element.
Focusable
The element is a container whose children can be selected. - Purpose: To indicate that the element contains items that can be chosen. - When to use: On container controls like list boxes, tree views, or text spans where text can be highlighted. - Example: A list box control is
Selectable, while its individual list items have theSelectedstate when chosen.Selectable
The element is a hyperlink. - Purpose: To identify an object that navigates to another resource or location when activated. - When to use: On any object that functions as a hyperlink. - Example: Text or an image that, when clicked, opens a web page.
Linked
The element is a hyperlink that has been visited. - Purpose: To indicate that a hyperlink has already been followed by the user. - When to use: On a
Linkedobject that the user has previously activated. - Example: A hyperlink on a web page that has changed color to show it has been visited.Traversed
The element allows multiple of its children to be selected at once. - Purpose: To indicate that a container control supports multi-selection. - When to use: On container controls like list boxes or file explorers that support multiple selections (e.g., with Ctrl-click). - Example: A file list that allows the user to select several files at once for a copy operation.
Multiselectable
The element contains protected content that should not be read aloud. - Purpose: To prevent assistive technologies from speaking the content of a sensitive field. - When to use: Primarily for password input fields. - Example: A password text box where typed characters are masked with asterisks or dots.
Protected
Determines the behavior of an element in sequential focus navigation
union enum TabIndex
Automatic tab index, similar to simply setting
focusable = "true"ortabindex = 0(both have the effect of making the element focusable). Sidenote: See https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute for interesting notes on tabindex and accessibilityAuto
Set the tab index in relation to its parent element. I.e. if you have a list of elements, the focusing order is restricted to the current parent. Ex. a div might have: no_run,ignore div (Auto) |- element1 (OverrideInParent 0) <- current focus |- element2 (OverrideInParent 5) |- element3 (OverrideInParent 2) |- element4 (Global 5) ignore When pressing tab repeatedly, the focusing order will be "element3, element2, element4, div", since OverrideInParent elements take precedence among global order.
OverrideInParent(u32)
Elements can be focused in callbacks, but are not accessible via keyboard / tab navigation (-1).
NoKeyboardFocus
Represents an inline CSS property attached to a node for a specific interaction state. This allows defining styles for
:hover,:focus, etc., directly on a DOM node.union enum NodeDataInlineCssProperty
A standard, non-interactive style property. - CSS Equivalent:
(no pseudo-class)Normal(CssProperty)
A style property that applies when the element is active (e.g., being clicked). - CSS Equivalent:
:activeActive(CssProperty)
A style property that applies when the element has focus. - CSS Equivalent:
:focusFocus(CssProperty)
A style property that applies when the element is being hovered by the mouse. - CSS Equivalent:
:hoverHover(CssProperty)
A style property that applies when the element is disabled and cannot be interacted with. - CSS Equivalent:
:disabledDisabled(CssProperty)
A style property that applies when the element is checked (e.g., a checkbox or radio button). - CSS Equivalent:
:checkedChecked(CssProperty)
A style property that applies when the element or one of its descendants has focus. - CSS Equivalent:
:focus-withinFocusWithin(CssProperty)
A style property that applies to a link that has been visited. - CSS Equivalent:
:visitedVisited(CssProperty)
A unique, runtime-generated identifier for a single
Dominstance.struct DomId
inner: usize
A UUID for a DOM node within a
LayoutWindow.struct DomNodeId
The ID of the
Domthis node belongs to.dom: DomId
The hierarchical ID of the node within its
Dom.node: NodeHierarchyItemId
union enum AccessibilityAction has destructor
Default
Focus
Blur
Collapse
Expand
ScrollIntoView
Increment
Decrement
ShowContextMenu
HideTooltip
ShowTooltip
ScrollUp
ScrollDown
ScrollLeft
ScrollRight
ReplaceSelectedText(String)
ScrollToPoint(LogicalPosition)
SetScrollOffset(LogicalPosition)
SetTextSelection(TextSelectionStartEnd)
SetSequentialFocusNavigationStartingPoint
SetValue(String)
SetNumericValue(FloatValue)
CustomAction(i32)
struct ListViewOnColumnClickCallback
cb: ListViewOnColumnClickCallbackType
callable: OptionRefAny
struct TagIdToNodeIdMapping has destructor
tag_id: TagId
Node ID of the node that has a tag
node_id: NodeHierarchyItemId
Whether this node has a tab-index field
tab_index: OptionTabIndex
Parents of this NodeID, sorted in depth order, necessary for efficient hit-testing
parent_node_ids: NodeIdVec
struct CoreCallback
cb: CoreCallbackType
ctx: OptionRefAny
struct NodeHierarchyItemId
inner: usize
constructor from_raw:
arg value: usize
Creates an
NodeHierarchyItemIdfrom a raw 1-based encoded value.
# Warning
The value must use 1-based encoding (0 = None, n = NodeId(n-1)). Prefer using [NodeHierarchyItemId::from_crate_internal] instead.fn into_raw:
&self
-> usize
Returns the raw 1-based encoded value.
# Warning
The returned value uses 1-based encoding. Do NOT use as an array index!struct CoreCallbackData
event: EventFilter
callback: CoreCallback
refany: RefAny
struct ListViewOnRowClickCallback
cb: ListViewOnRowClickCallbackType
callable: OptionRefAny
union enum SvgSimpleNode has destructor
Path(SvgPath)
Circle(SvgCircle)
Rect(SvgRect)
CircleHole(SvgCircle)
RectHole(SvgRect)
struct CoreMenuCallback
refany: RefAny
callback: CoreCallback
struct AttributeNameValue has destructor
attr_name: String
value: String
Tag of an XML node, such as the "button" in
<button>Hello</button>.struct XmlTagName has destructor
inner: String
struct CheckBoxOnToggleCallback
cb: CheckBoxOnToggleCallbackType
callable: OptionRefAny
struct TabOnClickCallback
callable: OptionRefAny
struct ParentWithNodeDepth
depth: usize
node_id: NodeHierarchyItemId
struct ListViewOnLazyLoadScrollCallback
cb: ListViewOnLazyLoadScrollCallbackType
callable: OptionRefAny
union enum AttributeType has destructor
Id(String)
Class(String)
AriaLabel(String)
AriaLabelledBy(String)
AriaDescribedBy(String)
AriaRole(String)
AriaState(AttributeNameValue)
AriaProperty(AttributeNameValue)
Href(String)
Rel(String)
Target(String)
Src(String)
Alt(String)
Title(String)
Name(String)
Value(String)
InputType(String)
Placeholder(String)
Required
Disabled
Readonly
Checked
Selected
Max(String)
Min(String)
Step(String)
Pattern(String)
MinLength(i32)
MaxLength(i32)
Autocomplete(String)
Scope(String)
ColSpan(i32)
RowSpan(i32)
TabIndex(i32)
Focusable
Lang(String)
Dir(String)
ContentEditable(bool)
Draggable(bool)
Hidden
Data(AttributeNameValue)
Custom(AttributeNameValue)
union enum XmlNodeChild has destructor
Text(String)
Element(XmlNode)
struct NodeHierarchyItem
parent: usize
previous_sibling: usize
next_sibling: usize
last_child: usize
struct ButtonOnClickCallback
callable: OptionRefAny
struct XmlNode has destructor
node_type: XmlTagName
attributes: XmlAttributeMap
children: XmlNodeChildVec
struct TagId
inner: u64
Attributes of an XML node, such as
["color" => "blue"]in<button color="blue" />.struct XmlAttributeMap has destructor
inner: StringPairVec
enum NodeTypeTag
Html
Head
Body
Div
P
Article
Section
Nav
Aside
Header
Footer
Main
Figure
FigCaption
H1
H2
H3
H4
H5
H6
Br
Hr
Pre
BlockQuote
Address
Details
Summary
Dialog
Ul
Ol
Li
Dl
Dt
Dd
Menu
MenuItem
Dir
Table
Caption
THead
TBody
TFoot
Tr
Th
Td
ColGroup
Col
Form
FieldSet
Legend
Label
Input
Button
Select
OptGroup
SelectOption
TextArea
Output
Progress
Meter
DataList
Span
A
Em
Strong
B
I
U
S
Mark
Del
Ins
Code
Samp
Kbd
Var
Cite
Dfn
Abbr
Acronym
Q
Time
Sub
Sup
Small
Big
Bdo
Bdi
Wbr
Ruby
Rt
Rtc
Rp
Data
Canvas
Object
Param
Embed
Audio
Video
Source
Track
Map
Area
Svg
Title
Meta
Link
Script
Style
Base
Text
Img
IFrame
Before
After
Marker
Placeholder
enum VertexAttributeType
Float
Double
UnsignedByte
UnsignedShort
UnsignedInt
struct VertexAttribute has destructor
va_name: String
layout_location: OptionUsize
attribute_type: VertexAttributeType
item_count: usize
struct InstantPtrCloneCallback
struct InstantPtrDestructorCallback
struct Callback
cb: CallbackType
ctx: OptionRefAny
constructor create:
arg cb: CallbackType
-> Callback
Create a new callback with just a function pointer (for native Rust code)
fn to_core:
self
-> CoreCallback
Converts this Callback to a CoreCallback for use with Dom::set_callback
struct DebugState
profiler_dbg: bool
render_target_dbg: bool
texture_cache_dbg: bool
gpu_time_queries: bool
gpu_sample_queries: bool
disable_batching: bool
epochs: bool
echo_driver_messages: bool
show_overdraw: bool
gpu_cache_dbg: bool
texture_cache_dbg_clear_evicted: bool
picture_caching_dbg: bool
primitive_dbg: bool
zoom_dbg: bool
small_screen: bool
disable_opaque_pass: bool
disable_alpha_pass: bool
disable_clip_masks: bool
disable_text_prims: bool
disable_gradient_prims: bool
obscure_images: bool
glyph_flashing: bool
smart_profiler: bool
invalidation_dbg: bool
tile_cache_logging_dbg: bool
profiler_capture: bool
force_picture_invalidation: bool
struct KeyboardState has destructor
current_virtual_keycode: OptionVirtualKeyCode
pressed_virtual_keycodes: VirtualKeyCodeVec
pressed_scancodes: ScanCodeVec
struct TouchState
num_touches: usize
struct MouseState
mouse_cursor_type: OptionMouseCursorType
cursor_position: CursorPosition
is_cursor_locked: bool
left_down: bool
right_down: bool
middle_down: bool
struct NodeId
inner: usize
constructor new:
arg value: usize
-> NodeId
Creates a new
NodeIdfrom a zero-based index.
# Panics
In debug mode, panics if the index would overflow when incremented. In release mode, saturates to the maximum value.
# Examplesfn index:
&self
-> usize
struct CoreRenderImageCallback
cb: CoreRenderImageCallbackType
ctx: OptionRefAny
struct CoreImageCallback
refany: RefAny
callback: CoreRenderImageCallback
struct LibraryReceiveThreadMsgCallback
struct ClipboardContent has destructor
plain_text: String
styled_runs: StyledTextRunVec
union enum Selection
Cursor(TextCursor)
Range(SelectionRange)
struct CheckThreadFinishedCallback
union enum TextInputSelection
All
FromTo(TextInputSelectionRange)
struct SelectionRange
start: TextCursor
end: TextCursor
struct TextInputSelectionRange
dir_from: usize
dir_to: usize
struct TextSelectionStartEnd
selection_start: usize
selection_end: usize
struct LibrarySendThreadMsgCallback
struct VirtualKeyCodeCombo has destructor
keys: VirtualKeyCodeVec
struct SelectionColor
inner: ColorU
struct ThreadDestructorCallback
struct SelectionRadius
inner: PixelValue
struct TextInputOnVirtualKeyDown
data: RefAny
callback: TextInputOnVirtualKeyDownCallback
struct TextInputOnVirtualKeyDownCallback
cb: TextInputOnVirtualKeyDownCallbackType
callable: OptionRefAny
struct SelectionState
selections: SelectionVec
node_id: DomNodeId
enum VirtualKeyCode
Key1
Key2
Key3
Key4
Key5
Key6
Key7
Key8
Key9
Key0
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Escape
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
F16
F17
F18
F19
F20
F21
F22
F23
F24
Snapshot
Scroll
Pause
Insert
Home
Delete
End
PageDown
PageUp
Left
Up
Right
Down
Back
Return
Space
Compose
Caret
Numlock
Numpad0
Numpad1
Numpad2
Numpad3
Numpad4
Numpad5
Numpad6
Numpad7
Numpad8
Numpad9
NumpadAdd
NumpadDivide
NumpadDecimal
NumpadComma
NumpadEnter
NumpadEquals
NumpadMultiply
NumpadSubtract
AbntC1
AbntC2
Apostrophe
Apps
Asterisk
At
Ax
Backslash
Calculator
Capital
Colon
Comma
Convert
Equals
Grave
Kana
Kanji
LAlt
LBracket
LControl
LShift
LWin
Mail
MediaSelect
MediaStop
Minus
Mute
MyComputer
NavigateForward
NavigateBackward
NextTrack
NoConvert
OEM102
Period
PlayPause
Plus
Power
PrevTrack
RAlt
RBracket
RControl
RShift
RWin
Semicolon
Slash
Sleep
Stop
Sysrq
Tab
Underline
Unlabeled
VolumeDown
VolumeUp
Wake
WebBack
WebFavorites
WebForward
WebHome
WebRefresh
WebSearch
WebStop
Yen
Copy
Paste
Cut
struct TextOpExtendSelection
old_range: SelectionRange
new_range: SelectionRange
direction: SelectionDirection
Callback for rendering dynamic images
struct RenderImageCallback
ctx: OptionRefAny
constructor create:
arg cb: RenderImageCallbackType
Creates a new RenderImageCallback from a function pointer
fn to_core:
self
Converts this RenderImageCallback to a CoreRenderImageCallback for use with ImageRef::callback
enum SelectionDirection
Forward
Backward
struct DragState has destructor
drag_type: DragType
source_node: OptionDomNodeId
current_drop_target: OptionDomNodeId
file_path: OptionString
struct TextOpSetSelection
old_range: OptionSelectionRange
new_range: SelectionRange
struct TextOpClearSelection
old_range: SelectionRange
struct NodeStateSnapshot has destructor
node_id: NodeId
text_content: String
cursor_position: OptionTextCursor
selection_range: OptionSelectionRange
timestamp: Instant
enum DragType
Node
File
struct SmallAriaInfo has destructor
label: OptionString
role: OptionAccessibilityRole
description: OptionString
union enum IdOrClass has destructor
Id(String)
Class(String)
Cssparsing modulemod css:
One block of rules that applies a bunch of rules to a "path" in the style, i.e.
div#myid.myclass -> { ("justify-content", "center") }struct CssRuleBlock has destructor
The css path (full selector) of the style ruleset
path: CssPath
"justify-content: center"=>CssDeclaration::Static(CssProperty::JustifyContent(LayoutJustifyContent::Center))declarations: CssDeclarationVec
Represents one parsed CSS key-value pair, such as
"width: 20px"=>CssProperty::Width(LayoutWidth::px(20.0))union enum CssProperty
CaretColor(CaretColorValue)
CaretAnimationDuration(CaretAnimationDurationValue)
SelectionBackgroundColor(SelectionBackgroundColorValue)
SelectionColor(SelectionColorValue)
SelectionRadius(SelectionRadiusValue)
TextColor(StyleTextColorValue)
FontSize(StyleFontSizeValue)
FontFamily(StyleFontFamilyVecValue)
FontWeight(StyleFontWeightValue)
FontStyle(StyleFontStyleValue)
TextAlign(StyleTextAlignValue)
TextJustify(LayoutTextJustifyValue)
VerticalAlign(StyleVerticalAlignValue)
LetterSpacing(StyleLetterSpacingValue)
TextIndent(StyleTextIndentValue)
InitialLetter(StyleInitialLetterValue)
LineClamp(StyleLineClampValue)
HangingPunctuation(StyleHangingPunctuationValue)
TextCombineUpright(StyleTextCombineUprightValue)
ExclusionMargin(StyleExclusionMarginValue)
HyphenationLanguage(StyleHyphenationLanguageValue)
LineHeight(StyleLineHeightValue)
WordSpacing(StyleWordSpacingValue)
TabWidth(StyleTabWidthValue)
WhiteSpace(StyleWhiteSpaceValue)
Hyphens(StyleHyphensValue)
Direction(StyleDirectionValue)
UserSelect(StyleUserSelectValue)
TextDecoration(StyleTextDecorationValue)
Cursor(StyleCursorValue)
Display(LayoutDisplayValue)
Float(LayoutFloatValue)
BoxSizing(LayoutBoxSizingValue)
Width(LayoutWidthValue)
Height(LayoutHeightValue)
MinWidth(LayoutMinWidthValue)
MinHeight(LayoutMinHeightValue)
MaxWidth(LayoutMaxWidthValue)
MaxHeight(LayoutMaxHeightValue)
Position(LayoutPositionValue)
Top(LayoutTopValue)
Right(LayoutRightValue)
Left(LayoutLeftValue)
Bottom(LayoutInsetBottomValue)
ZIndex(LayoutZIndexValue)
FlexWrap(LayoutFlexWrapValue)
FlexDirection(LayoutFlexDirectionValue)
FlexGrow(LayoutFlexGrowValue)
FlexShrink(LayoutFlexShrinkValue)
FlexBasis(LayoutFlexBasisValue)
JustifyContent(LayoutJustifyContentValue)
AlignItems(LayoutAlignItemsValue)
AlignContent(LayoutAlignContentValue)
ColumnGap(LayoutColumnGapValue)
RowGap(LayoutRowGapValue)
GridTemplateColumns(LayoutGridTemplateColumnsValue)
GridTemplateRows(LayoutGridTemplateRowsValue)
GridAutoColumns(LayoutGridAutoColumnsValue)
GridAutoRows(LayoutGridAutoRowsValue)
GridColumn(LayoutGridColumnValue)
GridRow(LayoutGridRowValue)
WritingMode(LayoutWritingModeValue)
Clear(LayoutClearValue)
BackgroundContent(StyleBackgroundContentVecValue)
BackgroundPosition(StyleBackgroundPositionVecValue)
BackgroundSize(StyleBackgroundSizeVecValue)
BackgroundRepeat(StyleBackgroundRepeatVecValue)
OverflowX(LayoutOverflowValue)
OverflowY(LayoutOverflowValue)
GridAutoFlow(LayoutGridAutoFlowValue)
JustifySelf(LayoutJustifySelfValue)
JustifyItems(LayoutJustifyItemsValue)
Gap(LayoutGapValue)
GridGap(LayoutGapValue)
AlignSelf(LayoutAlignSelfValue)
Font(StyleFontValue)
PaddingTop(LayoutPaddingTopValue)
PaddingLeft(LayoutPaddingLeftValue)
PaddingRight(LayoutPaddingRightValue)
PaddingBottom(LayoutPaddingBottomValue)
PaddingInlineStart(LayoutPaddingInlineStartValue)
PaddingInlineEnd(LayoutPaddingInlineEndValue)
MarginTop(LayoutMarginTopValue)
MarginLeft(LayoutMarginLeftValue)
MarginRight(LayoutMarginRightValue)
MarginBottom(LayoutMarginBottomValue)
BorderTopLeftRadius(StyleBorderTopLeftRadiusValue)
LayoutTextJustify(LayoutTextJustifyValue)
BorderTopRightRadius(StyleBorderTopRightRadiusValue)
BorderBottomLeftRadius(StyleBorderBottomLeftRadiusValue)
BorderBottomRightRadius(StyleBorderBottomRightRadiusValue)
BorderTopColor(StyleBorderTopColorValue)
BorderRightColor(StyleBorderRightColorValue)
BorderLeftColor(StyleBorderLeftColorValue)
BorderBottomColor(StyleBorderBottomColorValue)
BorderTopStyle(StyleBorderTopStyleValue)
BorderRightStyle(StyleBorderRightStyleValue)
BorderLeftStyle(StyleBorderLeftStyleValue)
BorderBottomStyle(StyleBorderBottomStyleValue)
BorderTopWidth(LayoutBorderTopWidthValue)
BorderRightWidth(LayoutBorderRightWidthValue)
BorderLeftWidth(LayoutBorderLeftWidthValue)
BorderBottomWidth(LayoutBorderBottomWidthValue)
BoxShadowLeft(StyleBoxShadowValue)
BoxShadowRight(StyleBoxShadowValue)
BoxShadowTop(StyleBoxShadowValue)
BoxShadowBottom(StyleBoxShadowValue)
Scrollbar(ScrollbarStyleValue)
ScrollbarWidth(LayoutScrollbarWidthValue)
ScrollbarColor(StyleScrollbarColorValue)
Opacity(StyleOpacityValue)
Visibility(StyleVisibilityValue)
Transform(StyleTransformVecValue)
TransformOrigin(StyleTransformOriginValue)
PerspectiveOrigin(StylePerspectiveOriginValue)
BackfaceVisibility(StyleBackfaceVisibilityValue)
MixBlendMode(StyleMixBlendModeValue)
Filter(StyleFilterVecValue)
BackdropFilter(StyleFilterVecValue)
TextShadow(StyleBoxShadowValue)
BreakBefore(PageBreakValue)
BreakAfter(PageBreakValue)
BreakInside(BreakInsideValue)
Orphans(OrphansValue)
Widows(WidowsValue)
BoxDecorationBreak(BoxDecorationBreakValue)
ColumnCount(ColumnCountValue)
ColumnWidth(ColumnWidthValue)
ColumnSpan(ColumnSpanValue)
ColumnFill(ColumnFillValue)
ColumnRuleWidth(ColumnRuleWidthValue)
ColumnRuleStyle(ColumnRuleStyleValue)
ColumnRuleColor(ColumnRuleColorValue)
FlowInto(FlowIntoValue)
FlowFrom(FlowFromValue)
ShapeOutside(ShapeOutsideValue)
ShapeInside(ShapeInsideValue)
ClipPath(ClipPathValue)
ShapeMargin(ShapeMarginValue)
ShapeImageThreshold(ShapeImageThresholdValue)
TableLayout(LayoutTableLayoutValue)
BorderCollapse(StyleBorderCollapseValue)
BorderSpacing(LayoutBorderSpacingValue)
CaptionSide(StyleCaptionSideValue)
EmptyCells(StyleEmptyCellsValue)
Content(ContentValue)
CounterReset(CounterResetValue)
CounterIncrement(CounterIncrementValue)
ListStyleType(StyleListStyleTypeValue)
ListStylePosition(StyleListStylePositionValue)
StringSet(StringSetValue)
constructor none:
arg prop_type: CssPropertyType
-> CssProperty
constructor auto:
arg prop_type: CssPropertyType
-> CssProperty
constructor initial:
arg prop_type: CssPropertyType
-> CssProperty
constructor inherit:
arg prop_type: CssPropertyType
-> CssProperty
constructor text_color:
arg input: StyleTextColor
-> CssProperty
constructor font_size:
arg input: StyleFontSize
-> CssProperty
constructor font_family:
arg input: StyleFontFamilyVec
-> CssProperty
constructor font_weight:
arg input: StyleFontWeight
-> CssProperty
constructor font_style:
arg input: StyleFontStyle
-> CssProperty
constructor text_align:
arg input: StyleTextAlign
-> CssProperty
constructor text_justify:
arg input: LayoutTextJustify
-> CssProperty
constructor vertical_align:
arg input: StyleVerticalAlign
-> CssProperty
constructor letter_spacing:
arg input: StyleLetterSpacing
-> CssProperty
constructor text_indent:
arg input: StyleTextIndent
-> CssProperty
constructor line_height:
arg input: StyleLineHeight
-> CssProperty
constructor word_spacing:
arg input: StyleWordSpacing
-> CssProperty
constructor tab_width:
arg input: StyleTabWidth
-> CssProperty
constructor cursor:
arg input: StyleCursor
-> CssProperty
constructor user_select:
arg input: StyleUserSelect
-> CssProperty
constructor text_decoration:
arg input: StyleTextDecoration
-> CssProperty
constructor display:
arg input: LayoutDisplay
-> CssProperty
constructor box_sizing:
arg input: LayoutBoxSizing
-> CssProperty
constructor width:
arg input: LayoutWidth
-> CssProperty
constructor height:
arg input: LayoutHeight
-> CssProperty
constructor min_width:
arg input: LayoutMinWidth
-> CssProperty
constructor caret_color:
arg input: CaretColor
-> CssProperty
constructor caret_animation_duration:
arg input: CaretAnimationDuration
-> CssProperty
constructor selection_background_color:
arg input: SelectionBackgroundColor
-> CssProperty
constructor selection_color:
arg input: SelectionColor
-> CssProperty
constructor min_height:
arg input: LayoutMinHeight
-> CssProperty
constructor max_width:
arg input: LayoutMaxWidth
-> CssProperty
constructor max_height:
arg input: LayoutMaxHeight
-> CssProperty
constructor position:
arg input: LayoutPosition
-> CssProperty
constructor top:
arg input: LayoutTop
-> CssProperty
constructor right:
arg input: LayoutRight
-> CssProperty
constructor left:
arg input: LayoutLeft
-> CssProperty
constructor bottom:
arg input: LayoutInsetBottom
-> CssProperty
constructor z_index:
arg input: LayoutZIndex
-> CssProperty
constructor flex_wrap:
arg input: LayoutFlexWrap
-> CssProperty
constructor flex_direction:
arg input: LayoutFlexDirection
-> CssProperty
constructor flex_grow:
arg input: LayoutFlexGrow
-> CssProperty
constructor flex_shrink:
arg input: LayoutFlexShrink
-> CssProperty
constructor justify_content:
arg input: LayoutJustifyContent
-> CssProperty
constructor grid_auto_flow:
arg input: LayoutGridAutoFlow
-> CssProperty
constructor justify_self:
arg input: LayoutJustifySelf
-> CssProperty
constructor justify_items:
arg input: LayoutJustifyItems
-> CssProperty
constructor gap:
arg input: LayoutGap
-> CssProperty
constructor grid_gap:
arg input: LayoutGap
-> CssProperty
constructor align_self:
arg input: LayoutAlignSelf
-> CssProperty
constructor font:
arg input: StyleFontFamilyVec
-> CssProperty
constructor align_items:
arg input: LayoutAlignItems
-> CssProperty
constructor align_content:
arg input: LayoutAlignContent
-> CssProperty
constructor background_content:
arg input: StyleBackgroundContentVec
-> CssProperty
constructor background_position:
arg input: StyleBackgroundPositionVec
-> CssProperty
constructor background_size:
arg input: StyleBackgroundSizeVec
-> CssProperty
constructor background_repeat:
arg input: StyleBackgroundRepeatVec
-> CssProperty
constructor overflow_x:
arg input: LayoutOverflow
-> CssProperty
constructor overflow_y:
arg input: LayoutOverflow
-> CssProperty
constructor padding_top:
arg input: LayoutPaddingTop
-> CssProperty
constructor padding_left:
arg input: LayoutPaddingLeft
-> CssProperty
constructor padding_right:
arg input: LayoutPaddingRight
-> CssProperty
constructor padding_bottom:
arg input: LayoutPaddingBottom
-> CssProperty
constructor margin_top:
arg input: LayoutMarginTop
-> CssProperty
constructor margin_left:
arg input: LayoutMarginLeft
-> CssProperty
constructor margin_right:
arg input: LayoutMarginRight
-> CssProperty
constructor margin_bottom:
arg input: LayoutMarginBottom
-> CssProperty
constructor border_top_left_radius:
arg input: StyleBorderTopLeftRadius
-> CssProperty
constructor border_top_right_radius:
arg input: StyleBorderTopRightRadius
-> CssProperty
constructor border_bottom_left_radius:
arg input: StyleBorderBottomLeftRadius
-> CssProperty
constructor border_bottom_right_radius:
arg input: StyleBorderBottomRightRadius
-> CssProperty
constructor border_top_color:
arg input: StyleBorderTopColor
-> CssProperty
constructor border_right_color:
arg input: StyleBorderRightColor
-> CssProperty
constructor border_left_color:
arg input: StyleBorderLeftColor
-> CssProperty
constructor border_bottom_color:
arg input: StyleBorderBottomColor
-> CssProperty
constructor border_top_style:
arg input: StyleBorderTopStyle
-> CssProperty
constructor border_right_style:
arg input: StyleBorderRightStyle
-> CssProperty
constructor border_left_style:
arg input: StyleBorderLeftStyle
-> CssProperty
constructor border_bottom_style:
arg input: StyleBorderBottomStyle
-> CssProperty
constructor border_top_width:
arg input: LayoutBorderTopWidth
-> CssProperty
constructor border_right_width:
arg input: LayoutBorderRightWidth
-> CssProperty
constructor border_left_width:
arg input: LayoutBorderLeftWidth
-> CssProperty
constructor border_bottom_width:
arg input: LayoutBorderBottomWidth
-> CssProperty
constructor box_shadow_left:
arg input: StyleBoxShadow
-> CssProperty
constructor box_shadow_right:
arg input: StyleBoxShadow
-> CssProperty
constructor box_shadow_top:
arg input: StyleBoxShadow
-> CssProperty
constructor box_shadow_bottom:
arg input: StyleBoxShadow
-> CssProperty
constructor opacity:
arg input: StyleOpacity
-> CssProperty
constructor visibility:
arg input: StyleVisibility
-> CssProperty
constructor transform:
arg input: StyleTransformVec
-> CssProperty
constructor transform_origin:
arg input: StyleTransformOrigin
-> CssProperty
constructor perspective_origin:
arg input: StylePerspectiveOrigin
-> CssProperty
constructor backface_visiblity:
arg input: StyleBackfaceVisibility
-> CssProperty
constructor break_before:
arg input: PageBreak
-> CssProperty
constructor break_after:
arg input: PageBreak
-> CssProperty
constructor break_inside:
arg input: BreakInside
-> CssProperty
constructor orphans:
arg input: Orphans
-> CssProperty
constructor widows:
arg input: Widows
-> CssProperty
constructor box_decoration_break:
arg input: BoxDecorationBreak
-> CssProperty
constructor column_count:
arg input: ColumnCount
-> CssProperty
constructor column_width:
arg input: ColumnWidth
-> CssProperty
constructor column_span:
arg input: ColumnSpan
-> CssProperty
constructor column_fill:
arg input: ColumnFill
-> CssProperty
constructor column_rule_width:
arg input: ColumnRuleWidth
-> CssProperty
constructor column_rule_style:
arg input: ColumnRuleStyle
-> CssProperty
constructor column_rule_color:
arg input: ColumnRuleColor
-> CssProperty
constructor flow_into:
arg input: FlowInto
-> CssProperty
constructor flow_from:
arg input: FlowFrom
-> CssProperty
constructor shape_outside:
arg input: ShapeOutside
-> CssProperty
constructor shape_inside:
arg input: ShapeInside
-> CssProperty
constructor clip_path:
arg input: ClipPath
-> CssProperty
constructor shape_margin:
arg input: ShapeMargin
-> CssProperty
constructor shape_image_threshold:
arg input: ShapeImageThreshold
-> CssProperty
constructor content:
arg input: Content
-> CssProperty
constructor counter_reset:
arg input: CounterReset
-> CssProperty
constructor counter_increment:
arg input: CounterIncrement
-> CssProperty
constructor list_style_type:
arg input: StyleListStyleType
-> CssProperty
constructor list_style_position:
arg input: StyleListStylePosition
-> CssProperty
constructor string_set:
arg input: StringSet
-> CssProperty
constructor table_layout:
arg input: LayoutTableLayout
-> CssProperty
constructor border_collapse:
arg input: StyleBorderCollapse
-> CssProperty
constructor border_spacing:
arg input: LayoutBorderSpacing
-> CssProperty
constructor caption_side:
arg input: StyleCaptionSide
-> CssProperty
constructor empty_cells:
arg input: StyleEmptyCells
-> CssProperty
constructor const_none:
arg prop_type: CssPropertyType
-> CssProperty
constructor const_auto:
arg prop_type: CssPropertyType
-> CssProperty
constructor const_initial:
arg prop_type: CssPropertyType
-> CssProperty
constructor const_inherit:
arg prop_type: CssPropertyType
-> CssProperty
constructor const_text_color:
arg input: StyleTextColor
-> CssProperty
constructor const_font_size:
arg input: StyleFontSize
-> CssProperty
constructor const_font_family:
arg input: StyleFontFamilyVec
-> CssProperty
constructor const_text_align:
arg input: StyleTextAlign
-> CssProperty
constructor const_vertical_align:
arg input: StyleVerticalAlign
-> CssProperty
constructor const_letter_spacing:
arg input: StyleLetterSpacing
-> CssProperty
constructor const_text_indent:
arg input: StyleTextIndent
-> CssProperty
constructor const_line_height:
arg input: StyleLineHeight
-> CssProperty
constructor const_word_spacing:
arg input: StyleWordSpacing
-> CssProperty
constructor const_tab_width:
arg input: StyleTabWidth
-> CssProperty
constructor const_cursor:
arg input: StyleCursor
-> CssProperty
constructor const_display:
arg input: LayoutDisplay
-> CssProperty
constructor const_float:
arg input: LayoutFloat
-> CssProperty
constructor const_box_sizing:
arg input: LayoutBoxSizing
-> CssProperty
constructor const_width:
arg input: LayoutWidth
-> CssProperty
constructor const_height:
arg input: LayoutHeight
-> CssProperty
constructor const_min_width:
arg input: LayoutMinWidth
-> CssProperty
constructor const_min_height:
arg input: LayoutMinHeight
-> CssProperty
constructor const_max_width:
arg input: LayoutMaxWidth
-> CssProperty
constructor const_max_height:
arg input: LayoutMaxHeight
-> CssProperty
constructor const_position:
arg input: LayoutPosition
-> CssProperty
constructor const_top:
arg input: LayoutTop
-> CssProperty
constructor const_right:
arg input: LayoutRight
-> CssProperty
constructor const_left:
arg input: LayoutLeft
-> CssProperty
constructor const_bottom:
arg input: LayoutInsetBottom
-> CssProperty
constructor const_flex_wrap:
arg input: LayoutFlexWrap
-> CssProperty
constructor const_flex_direction:
arg input: LayoutFlexDirection
-> CssProperty
constructor const_flex_grow:
arg input: LayoutFlexGrow
-> CssProperty
constructor const_flex_shrink:
arg input: LayoutFlexShrink
-> CssProperty
constructor const_justify_content:
arg input: LayoutJustifyContent
-> CssProperty
constructor const_align_items:
arg input: LayoutAlignItems
-> CssProperty
constructor const_align_content:
arg input: LayoutAlignContent
-> CssProperty
constructor const_background_content:
arg input: StyleBackgroundContentVec
-> CssProperty
constructor const_background_position:
arg input: StyleBackgroundPositionVec
-> CssProperty
constructor const_background_size:
arg input: StyleBackgroundSizeVec
-> CssProperty
constructor const_background_repeat:
arg input: StyleBackgroundRepeatVec
-> CssProperty
constructor const_overflow_x:
arg input: LayoutOverflow
-> CssProperty
constructor const_overflow_y:
arg input: LayoutOverflow
-> CssProperty
constructor const_padding_top:
arg input: LayoutPaddingTop
-> CssProperty
constructor const_padding_left:
arg input: LayoutPaddingLeft
-> CssProperty
constructor const_padding_right:
arg input: LayoutPaddingRight
-> CssProperty
constructor const_padding_bottom:
arg input: LayoutPaddingBottom
-> CssProperty
constructor const_margin_top:
arg input: LayoutMarginTop
-> CssProperty
constructor const_margin_left:
arg input: LayoutMarginLeft
-> CssProperty
constructor const_margin_right:
arg input: LayoutMarginRight
-> CssProperty
constructor const_margin_bottom:
arg input: LayoutMarginBottom
-> CssProperty
constructor const_border_top_left_radius:
arg input: StyleBorderTopLeftRadius
-> CssProperty
constructor const_border_top_right_radius:
arg input: StyleBorderTopRightRadius
-> CssProperty
constructor const_border_bottom_left_radius:
arg input: StyleBorderBottomLeftRadius
-> CssProperty
constructor const_border_bottom_right_radius:
arg input: StyleBorderBottomRightRadius
-> CssProperty
constructor const_border_top_color:
arg input: StyleBorderTopColor
-> CssProperty
constructor const_border_right_color:
arg input: StyleBorderRightColor
-> CssProperty
constructor const_border_left_color:
arg input: StyleBorderLeftColor
-> CssProperty
constructor const_border_bottom_color:
arg input: StyleBorderBottomColor
-> CssProperty
constructor const_border_top_style:
arg input: StyleBorderTopStyle
-> CssProperty
constructor const_border_right_style:
arg input: StyleBorderRightStyle
-> CssProperty
constructor const_border_left_style:
arg input: StyleBorderLeftStyle
-> CssProperty
constructor const_border_bottom_style:
arg input: StyleBorderBottomStyle
-> CssProperty
constructor const_border_top_width:
arg input: LayoutBorderTopWidth
-> CssProperty
constructor const_border_right_width:
arg input: LayoutBorderRightWidth
-> CssProperty
constructor const_border_left_width:
arg input: LayoutBorderLeftWidth
-> CssProperty
constructor const_border_bottom_width:
arg input: LayoutBorderBottomWidth
-> CssProperty
constructor const_box_shadow_left:
arg input: StyleBoxShadow
-> CssProperty
constructor const_box_shadow_right:
arg input: StyleBoxShadow
-> CssProperty
constructor const_box_shadow_top:
arg input: StyleBoxShadow
-> CssProperty
constructor const_box_shadow_bottom:
arg input: StyleBoxShadow
-> CssProperty
constructor const_opacity:
arg input: StyleOpacity
-> CssProperty
constructor const_transform:
arg input: StyleTransformVec
-> CssProperty
constructor const_transform_origin:
arg input: StyleTransformOrigin
-> CssProperty
constructor const_perspective_origin:
arg input: StylePerspectiveOrigin
-> CssProperty
constructor const_backface_visiblity:
arg input: StyleBackfaceVisibility
-> CssProperty
constructor const_break_before:
arg input: PageBreak
-> CssProperty
constructor const_break_after:
arg input: PageBreak
-> CssProperty
constructor const_break_inside:
arg input: BreakInside
-> CssProperty
constructor const_orphans:
arg input: Orphans
-> CssProperty
constructor const_widows:
arg input: Widows
-> CssProperty
constructor const_box_decoration_break:
arg input: BoxDecorationBreak
-> CssProperty
constructor const_column_count:
arg input: ColumnCount
-> CssProperty
constructor const_column_width:
arg input: ColumnWidth
-> CssProperty
constructor const_column_span:
arg input: ColumnSpan
-> CssProperty
constructor const_column_fill:
arg input: ColumnFill
-> CssProperty
constructor const_column_rule_width:
arg input: ColumnRuleWidth
-> CssProperty
constructor const_column_rule_style:
arg input: ColumnRuleStyle
-> CssProperty
constructor const_column_rule_color:
arg input: ColumnRuleColor
-> CssProperty
constructor const_flow_into:
arg input: FlowInto
-> CssProperty
constructor const_flow_from:
arg input: FlowFrom
-> CssProperty
constructor const_shape_outside:
arg input: ShapeOutside
-> CssProperty
constructor const_shape_inside:
arg input: ShapeInside
-> CssProperty
constructor const_clip_path:
arg input: ClipPath
-> CssProperty
constructor const_shape_margin:
arg input: ShapeMargin
-> CssProperty
constructor const_shape_image_threshold:
arg input: ShapeImageThreshold
-> CssProperty
constructor const_content:
arg input: Content
-> CssProperty
constructor const_counter_reset:
arg input: CounterReset
-> CssProperty
constructor const_counter_increment:
arg input: CounterIncrement
-> CssProperty
constructor const_list_style_type:
arg input: StyleListStyleType
-> CssProperty
constructor const_list_style_position:
arg input: StyleListStylePosition
-> CssProperty
constructor const_string_set:
arg input: StringSet
-> CssProperty
constructor const_table_layout:
arg input: LayoutTableLayout
-> CssProperty
constructor const_border_collapse:
arg input: StyleBorderCollapse
-> CssProperty
constructor const_border_spacing:
arg input: LayoutBorderSpacing
-> CssProperty
constructor const_caption_side:
arg input: StyleCaptionSide
-> CssProperty
constructor const_empty_cells:
arg input: StyleEmptyCells
-> CssProperty
fn value:
&self
-> String
fn format_css:
&self
-> String
fn is_initial:
&self
-> bool
union enum CssNthChildSelector
Number(u32)
Even
Odd
Pattern(CssNthChildPattern)
struct CssNthChildPattern
pattern_repeat: u32
offset: u32
struct Stylesheet has destructor
The style rules making up the document - for example, de-duplicated CSS rules
rules: CssRuleBlockVec
Css stylesheet - contains a parsed CSS stylesheet in "rule blocks", i.e. blocks of key-value pairs associated with a selector path.
struct Css has destructor
One CSS stylesheet can hold more than one sub-stylesheet: For example, when overriding native styles, the
.sort_by_specificy()function should not mix the two stylesheets during sorting.stylesheets: StylesheetVec
constructor empty:
-> Css
constructor from_string:
Creates a new, empty CSS with no stylesheets
fn is_empty:
&self
-> bool
&mut self
Contains one parsed
key: valuepair, static or dynamicunion enum CssDeclaration has destructor
Static key-value pair, such as
width: 500pxStatic(CssProperty)
Dynamic key-value pair with default value, such as
width: [[ my_id | 500px ]]Dynamic(DynamicCssProperty)
A
DynamicCssPropertyis a type of css property that can be changed on possibly every frame by the Rust code - for example to implement anOn::Hoverbehaviour. The syntax for such a property looks like this: no_run,ignore #my_div { padding: var(--my_dynamic_property_id, 400px); } Azul will register a dynamic property with the key "my_dynamic_property_id" and the default value of 400px. If the property gets overridden during one frame, the overridden property takes precedence. At runtime the style is immutable (which is a performance optimization - if we can assume that the property never changes at runtime), we can do some optimizations on it. Dynamic style properties can also be used for animations and conditional styles (i.e.hover,focus, etc.), thereby leading to cleaner code, since all of these special cases now use one single API.struct DynamicCssProperty has destructor
The stringified ID of this property, i.e. the
"my_id"inwidth: var(--my_id, 500px).dynamic_id: String
Default values for this properties - one single value can control multiple properties!
default_value: CssProperty
u8-based color, range 0 to 255 (similar to webrenders ColorU)
struct ColorU
r: u8
g: u8
b: u8
a: u8
Enum representing the metric associated with a number (px, pt, em, etc.)
enum SizeMetric
Px
Pt
Em
Rem
In
Cm
Mm
Percent
Viewport width: 1vw = 1% of viewport width
Vw
Viewport height: 1vh = 1% of viewport height
Vh
Viewport minimum: 1vmin = 1% of smaller viewport dimension
Vmin
Viewport maximum: 1vmax = 1% of larger viewport dimension
Vmax
struct PixelValue
metric: SizeMetric
number: FloatValue
constructor zero:
-> PixelValue
constructor px:
arg value: f32
-> PixelValue
constructor em:
arg value: f32
-> PixelValue
constructor rem:
arg value: f32
-> PixelValue
constructor pt:
arg value: f32
-> PixelValue
constructor percent:
arg value: f32
-> PixelValue
constructor from_metric:
arg metric: SizeMetric
arg value: f32
-> PixelValue
Creates a zero pixel value.
Creates a pixel value in px units.
Creates a pixel value in em units.
Creates a pixel value in rem units.
Creates a pixel value in pt units.
Creates a pixel value in percent.
Creates a pixel value from a metric and value.
Two-dimensional size in PixelValue units (width, height) Used for background-size and similar properties
struct PixelValueSize
width: PixelValue
height: PixelValue
Same as PixelValue, but doesn't allow a "%" sign
struct PixelValueNoPercent
inner: PixelValue
What direction should a
box-shadowbe clipped in (inset or outset).enum BoxShadowClipMode
Outset
Inset
Represents a
box-shadowortext-shadowproperty.struct StyleBoxShadow
offset_x: PixelValueNoPercent
offset_y: PixelValueNoPercent
color: ColorU
blur_radius: PixelValueNoPercent
spread_radius: PixelValueNoPercent
clip_mode: BoxShadowClipMode
Represents a
mix-blend-modeattribute, which determines how an element's content should blend with the content of the element's parent.enum StyleMixBlendMode
Normal
Multiply
Screen
Overlay
Darken
Lighten
ColorDodge
ColorBurn
HardLight
SoftLight
Difference
Exclusion
Hue
Saturation
Color
Luminosity
union enum StyleFilter
Blend(StyleMixBlendMode)
Flood(ColorU)
Blur(StyleBlur)
Opacity(PercentageValue)
ColorMatrix(StyleColorMatrix)
DropShadow(StyleBoxShadow)
ComponentTransfer
Offset(StyleFilterOffset)
Composite(StyleCompositeFilter)
struct StyleBlur
width: PixelValue
height: PixelValue
struct StyleColorMatrix
m0: FloatValue
m1: FloatValue
m2: FloatValue
m3: FloatValue
m4: FloatValue
m5: FloatValue
m6: FloatValue
m7: FloatValue
m8: FloatValue
m9: FloatValue
m10: FloatValue
m11: FloatValue
m12: FloatValue
m13: FloatValue
m14: FloatValue
m15: FloatValue
m16: FloatValue
m17: FloatValue
m18: FloatValue
m19: FloatValue
struct StyleFilterOffset
x: PixelValue
y: PixelValue
union enum StyleCompositeFilter
Over
In
Atop
Out
Xor
Lighter
Arithmetic(ArithmeticCoefficients)
Represents an
align-contentattribute, which aligns a flex container's lines within it when there is extra space in the cross-axis. Default:Stretchenum LayoutAlignContent
Stretch
Center
Start
End
SpaceBetween
SpaceAround
Represents an
align-itemsattribute, which defines the default behavior for how flex items are laid out along the cross axis on the current line. Default:Stretchenum LayoutAlignItems
Stretch
Center
Start
End
Baseline
Represents a
box-sizingattributeenum LayoutBoxSizing
ContentBox
BorderBox
Represents a
flex-directionattribute, which establishes the main-axis, thus defining the direction flex items are placed in the flex container. Default:Rowenum LayoutFlexDirection
Row
RowReverse
Column
ColumnReverse
Represents a
displayCSS property valueenum LayoutDisplay
None
Block
Inline
InlineBlock
Flex
InlineFlex
Table
InlineTable
TableRowGroup
TableHeaderGroup
TableFooterGroup
TableRow
TableColumnGroup
TableColumn
TableCell
TableCaption
FlowRoot
ListItem
RunIn
Marker
Grid
InlineGrid
Represents a
flex-growattribute, which dictates what proportion of the remaining space in the flex container should be assigned to the item. Default: 0struct LayoutFlexGrow
inner: FloatValue
constructor new:
arg value: f32
Creates a flex-grow value
Represents a
flex-shrinkattribute, which dictates what proportion of the negative space in the flex container should be removed from the item. Default: 1struct LayoutFlexShrink
inner: FloatValue
Represents a
floatattributeenum LayoutFloat
Left
Right
None
union enum LayoutHeight
Auto
Px(PixelValue)
MinContent
MaxContent
Represents a
justify-contentattribute, which defines the alignment along the main axis. Default:Start(flex-start)enum LayoutJustifyContent
FlexStart
FlexEnd
Start
End
Center
SpaceBetween
SpaceAround
SpaceEvenly
struct LayoutLeft
inner: PixelValue
Layout margin bottom value
struct LayoutMarginBottom
inner: PixelValue
Layout margin left value
struct LayoutMarginLeft
inner: PixelValue
Layout margin right value
struct LayoutMarginRight
inner: PixelValue
Layout margin top value
struct LayoutMarginTop
inner: PixelValue
struct LayoutMaxHeight
inner: PixelValue
struct LayoutMaxWidth
inner: PixelValue
struct LayoutMinHeight
inner: PixelValue
struct LayoutMinWidth
inner: PixelValue
Layout padding bottom value
struct LayoutPaddingBottom
inner: PixelValue
struct LayoutPaddingLeft
inner: PixelValue
Layout padding right value
struct LayoutPaddingRight
inner: PixelValue
Layout padding top value
struct LayoutPaddingTop
inner: PixelValue
Represents a
positionattribute - default:Staticenum LayoutPosition
Static
Relative
Absolute
Fixed
Sticky
struct LayoutRight
inner: PixelValue
struct LayoutTop
inner: PixelValue
union enum LayoutWidth
Auto
Px(PixelValue)
MinContent
MaxContent
Represents a
flex-wrapattribute, which determines whether flex items are forced onto one line or can wrap onto multiple lines. Default:NoWrapenum LayoutFlexWrap
Wrap
NoWrap
WrapReverse
Represents an
overflow-xoroverflow-yproperty. Determines what to do when content overflows an element's box.enum LayoutOverflow
Always shows a scroll bar, overflows on scroll.
Scroll
Shows a scroll bar only when content overflows. This is the default.
Auto
Clips overflowing content. The rest of the content will be invisible.
Hidden
Content is not clipped and renders outside the element's box.
Visible
Similar to
hidden, clips the content at the box's edge.Clip
Wrapper around an f32 value that is internally casted to an isize, in order to provide hash-ability (to avoid numerical instability).
struct FloatValue
number: isize
constructor new:
arg value: f32
-> FloatValue
Creates a new FloatValue from an f32.
fn get:
&self
-> f32
Gets the internal f32 value.
Wrapper around FloatValue, represents a percentage instead of just being a regular floating-point value, i.e
5=5%struct PercentageValue
number: FloatValue
Enum representing the metric associated with an angle (deg, rad, etc.)
enum AngleMetric
Degree
Radians
Grad
Turn
Percent
FloatValue, but associated with a certain metric (i.e. deg, rad, etc.)
struct AngleValue
metric: AngleMetric
number: FloatValue
fn deg:
arg value: f32
-> AngleValue
fn rad:
arg value: f32
-> AngleValue
fn grad:
arg value: f32
-> AngleValue
fn turn:
arg value: f32
-> AngleValue
fn get_degrees:
&self
-> f32
Creates an AngleValue from degrees
Creates an AngleValue from radians
Creates an AngleValue from gradians
Creates an AngleValue from turns (1 turn = 360 degrees)
struct NormalizedLinearColorStop
offset: PercentageValue
color: ColorU
struct NormalizedRadialColorStop
angle: AngleValue
color: ColorU
enum DirectionCorner
Right
Left
Top
Bottom
TopRight
TopLeft
BottomRight
BottomLeft
struct DirectionCorners
dir_from: DirectionCorner
dir_to: DirectionCorner
CSS direction (necessary for gradients). Can either be a fixed angle or a direction ("to right" / "to left", etc.).
union enum Direction
Angle(AngleValue)
FromTo(DirectionCorners)
struct LinearGradient has destructor
direction: Direction
extend_mode: ExtendMode
stops: NormalizedLinearColorStopVec
enum Shape
Ellipse
Circle
enum RadialGradientSize
ClosestSide
ClosestCorner
FarthestSide
FarthestCorner
struct RadialGradient has destructor
shape: Shape
size: RadialGradientSize
position: StyleBackgroundPosition
extend_mode: ExtendMode
stops: NormalizedLinearColorStopVec
struct ConicGradient has destructor
extend_mode: ExtendMode
center: StyleBackgroundPosition
angle: AngleValue
stops: NormalizedRadialColorStopVec
union enum StyleBackgroundContent has destructor
LinearGradient(LinearGradient)
RadialGradient(RadialGradient)
ConicGradient(ConicGradient)
Image(String)
Color(ColorU)
union enum BackgroundPositionHorizontal
Left
Center
Right
Exact(PixelValue)
union enum BackgroundPositionVertical
Top
Center
Bottom
Exact(PixelValue)
struct StyleBackgroundPosition
horizontal: BackgroundPositionHorizontal
vertical: BackgroundPositionVertical
enum StyleBackgroundRepeat
NoRepeat
PatternRepeat
RepeatX
RepeatY
union enum StyleBackgroundSize
ExactSize(PixelValueSize)
Contain
Cover
struct StyleBorderBottomColor
inner: ColorU
struct StyleBorderBottomLeftRadius
inner: PixelValue
struct StyleBorderBottomRightRadius
inner: PixelValue
Style of a
border: solid, double, dash, ridge, etc.enum BorderStyle
None
Solid
Double
Dotted
Dashed
Hidden
Groove
Ridge
Inset
Outset
struct StyleBorderBottomStyle
inner: BorderStyle
struct LayoutBorderBottomWidth
inner: PixelValue
struct StyleBorderLeftColor
inner: ColorU
struct StyleBorderLeftStyle
inner: BorderStyle
struct LayoutBorderLeftWidth
inner: PixelValue
struct StyleBorderRightColor
inner: ColorU
struct StyleBorderRightStyle
inner: BorderStyle
struct LayoutBorderRightWidth
inner: PixelValue
struct StyleBorderTopColor
inner: ColorU
struct StyleBorderTopLeftRadius
inner: PixelValue
struct StyleBorderTopRightRadius
inner: PixelValue
struct StyleBorderTopStyle
inner: BorderStyle
struct LayoutBorderTopWidth
inner: PixelValue
Holds info necessary for layouting / styling -webkit-scrollbar properties.
struct ScrollbarInfo has destructor
Total width (or height for vertical scrollbars) of the scrollbar in pixels
width: LayoutWidth
Padding of the scrollbar tracker, in pixels. The inner bar is
width - paddingpixels wide.padding_left: LayoutPaddingLeft
Padding of the scrollbar (right)
padding_right: LayoutPaddingRight
Style of the scrollbar background (
-webkit-scrollbar/-webkit-scrollbar-track/-webkit-scrollbar-track-piececombined)track: StyleBackgroundContent
Style of the scrollbar thumbs (the "up" / "down" arrows), (
-webkit-scrollbar-thumb)thumb: StyleBackgroundContent
Styles the directional buttons on the scrollbar (
-webkit-scrollbar-button)button: StyleBackgroundContent
If two scrollbars are present, addresses the (usually) bottom corner of the scrollable element, where two scrollbars might meet (
-webkit-scrollbar-corner)corner: StyleBackgroundContent
Addresses the draggable resizing handle that appears above the
cornerat the bottom corner of some elements (-webkit-resizer)resizer: StyleBackgroundContent
Scrollbar style for both horizontal and vertical scrollbars.
struct ScrollbarStyle has destructor
Horizontal scrollbar style, if any
horizontal: ScrollbarInfo
Vertical scrollbar style, if any
vertical: ScrollbarInfo
Represents a
font-familyattributeunion enum StyleFontFamily has destructor
System(String)
File(String)
Ref(FontRef)
Represents a
font-sizeattributestruct StyleFontSize
inner: PixelValue
constructor px:
arg value: f32
Creates a font size from a pixel value
Represents a
letter-spacingattributestruct StyleLetterSpacing
inner: PixelValue
Represents a
line-heightattributestruct StyleLineHeight
inner: PercentageValue
Represents a
tab-widthattributestruct StyleTabWidth
inner: PixelValue
Represents an
opacityattribute, a value from 0.0 to 1.0.struct StyleOpacity
inner: PercentageValue
Represents a
transform-originattributestruct StyleTransformOrigin
x: PixelValue
y: PixelValue
Represents a
backface-visibilityattributeenum StyleBackfaceVisibility
Visible
Hidden
Represents one component of a
transformattributeunion enum StyleTransform
Matrix(StyleTransformMatrix2D)
Matrix3D(StyleTransformMatrix3D)
Translate(StyleTransformTranslate2D)
Translate3D(StyleTransformTranslate3D)
TranslateX(PixelValue)
TranslateY(PixelValue)
TranslateZ(PixelValue)
Rotate(AngleValue)
Rotate3D(StyleTransformRotate3D)
RotateX(AngleValue)
RotateY(AngleValue)
RotateZ(AngleValue)
Scale(StyleTransformScale2D)
Scale3D(StyleTransformScale3D)
ScaleX(PercentageValue)
ScaleY(PercentageValue)
ScaleZ(PercentageValue)
Skew(StyleTransformSkew2D)
SkewX(AngleValue)
SkewY(AngleValue)
Perspective(PixelValue)
struct StyleTransformMatrix2D
a: FloatValue
b: FloatValue
c: FloatValue
d: FloatValue
tx: FloatValue
ty: FloatValue
struct StyleTransformMatrix3D
m11: FloatValue
m12: FloatValue
m13: FloatValue
m14: FloatValue
m21: FloatValue
m22: FloatValue
m23: FloatValue
m24: FloatValue
m31: FloatValue
m32: FloatValue
m33: FloatValue
m34: FloatValue
m41: FloatValue
m42: FloatValue
m43: FloatValue
m44: FloatValue
struct StyleTransformTranslate2D
x: PixelValue
y: PixelValue
struct StyleTransformTranslate3D
x: PixelValue
y: PixelValue
z: PixelValue
struct StyleTransformRotate3D
x: FloatValue
y: FloatValue
z: FloatValue
angle: AngleValue
struct StyleTransformScale2D
x: FloatValue
y: FloatValue
struct StyleTransformScale3D
x: FloatValue
y: FloatValue
z: FloatValue
struct StyleTransformSkew2D
x: AngleValue
y: AngleValue
Horizontal text alignment enum (left, center, right) - default:
Leftenum StyleTextAlign
Left
Center
Right
Justify
Start
End
Represents a
colorattribute.struct StyleTextColor
inner: ColorU
Represents a
word-spacingattributestruct StyleWordSpacing
inner: PixelValue
Generic CSS property value that can be Auto, None, Initial, Inherit, or an exact value
union enum CssPropertyValue
Auto
None
Initial
Inherit
Revert
Unset
Exact(T)
struct CounterReset has destructor
counter_name: String
value: i32
Represents a grid line position (start or end)
union enum GridLine has destructor
Auto
Line(i32)
Named(NamedGridLine)
Span(i32)
Represents a
perspective-originattributestruct StylePerspectiveOrigin
x: PixelValue
y: PixelValue
Represents a
z-indexattribute - controls stacking order of positioned elementsunion enum LayoutZIndex
Auto
Integer(i32)
Represents
justify-itemsfor grid containersenum LayoutJustifyItems
Start
End
Center
Stretch
struct SelectionBackgroundColor
inner: ColorU
struct ColumnRuleColor
inner: ColorU
enum ColumnSpan
None
All
Represents a
clearattributeenum LayoutClear
None
Left
Right
Both
How to handle white space inside an element.
enum StyleWhiteSpace
Normal
Pre
Nowrap
Represents a
break-insideCSS property value.enum BreakInside
Auto
Avoid
AvoidPage
AvoidColumn
Represents an
align-selfattribute, which allows the default alignment (or the one specified by align-items) to be overridden for individual flex items. Default:Autoenum LayoutAlignSelf
Auto
Stretch
Center
Start
End
Baseline
struct CaretAnimationDuration
inner: CssDuration
struct ColumnRuleStyle
inner: BorderStyle
Represents
grid-roworgrid-column(start / end)struct GridPlacement has destructor
grid_start: GridLine
grid_end: GridLine
CSS shape-outside property for wrapping text around shapes
union enum ShapeOutside has destructor
None
Shape(CssShape)
union enum ColumnCount
Auto
Integer(u32)
Represents a
writing-modeattributeenum LayoutWritingMode
HorizontalTb
VerticalRl
VerticalLr
Controls whether the user can select text. Used to prevent accidental text selection on UI controls like buttons.
enum StyleUserSelect
Browser determines selectability (default)
Auto
Text is selectable
Text
Text is not selectable
None
User can select all text with a single action
All
Represents
grid-template-columnsorgrid-template-rowsstruct GridTemplate has destructor
tracks: GridTrackSizingVec
Represents
justify-selffor grid itemsenum LayoutJustifySelf
Auto
Start
End
Center
Stretch
struct Content has destructor
inner: String
Hyphenation rules.
enum StyleHyphens
Auto
None
struct LayoutGap
inner: PixelValue
Text direction.
enum StyleDirection
Ltr
Rtl
Represents a
flex-basisattributeunion enum LayoutFlexBasis
Auto
Exact(PixelValue)
struct ShapeMargin
inner: PixelValue
enum LayoutTextJustify
Auto
None
InterWord
InterCharacter
Distribute
union enum ColumnWidth
Auto
Length(PixelValue)
struct CounterIncrement has destructor
counter_name: String
value: i32
Represents a
box-decoration-breakCSS property value.enum BoxDecorationBreak
Slice
Clone
Represents a
visibilityattribute, controlling element visibility.enum StyleVisibility
Visible
Hidden
Collapse
struct ShapeImageThreshold
inner: FloatValue
Represents the
grid-auto-flowpropertyenum LayoutGridAutoFlow
Row
Column
RowDense
ColumnDense
struct ColumnRuleWidth
inner: PixelValue
Text decoration (underline, overline, line-through).
enum StyleTextDecoration
No decoration
None
Underline
Underline
Line above text
Overline
Strike-through line
LineThrough
struct CaretColor
inner: ColorU
Only used for calculations: Size (width, height) in layout space.
struct LayoutSize
width: isize
height: isize
constructor new:
arg width: isize
arg height: isize
-> LayoutSize
constructor zero:
-> LayoutSize
Creates a new LayoutSize with the given width and height.
Creates a LayoutSize with zero dimensions.
enum ColumnFill
Auto
Balance
Represents grid-auto-columns or grid-auto-rows Structurally identical to GridTemplate but semantically different
struct GridAutoTracks has destructor
tracks: GridTrackSizingVec
Represents a
break-beforeorbreak-afterCSS property value.enum PageBreak
Auto
Avoid
Always
All
Page
AvoidPage
Left
Right
Recto
Verso
Column
AvoidColumn
Represents the standard
scrollbar-widthproperty.enum LayoutScrollbarWidth
Auto
Thin
None
Represents the standard
scrollbar-colorproperty.union enum StyleScrollbarColor
Auto
Custom(ScrollbarColorCustom)
Vertical text alignment enum (top, center, bottom) - default:
Topenum StyleVerticalAlign
Top
Center
Bottom
line-clamp property for limiting visible lines
struct StyleLineClamp
max_lines: usize
CSS shape-inside property for flowing text within shapes
union enum ShapeInside has destructor
None
Shape(CssShape)
struct Orphans
inner: u32
Represents a
text-indentattribute (indentation of first line in a block).struct StyleTextIndent
inner: PixelValue
Sets the distance between the borders of adjacent cells. The
border-spacingproperty is only applicable whenborder-collapseis set toseparate. It can have one or two values: - One value: Sets both horizontal and vertical spacing - Two values: First is horizontal, second is vertical This struct represents a single spacing value (either horizontal or vertical).struct LayoutBorderSpacing
Horizontal spacing between cell borders
horizontal: PixelValue
Vertical spacing between cell borders
vertical: PixelValue
struct LayoutPaddingInlineStart
inner: PixelValue
Represents the
font-weightproperty.enum StyleFontWeight
Lighter
W100
W200
W300
Normal
W500
W600
Bold
W800
W900
Bolder
-azul-exclusion-marginproperty: defines margin around shape exclusions This property controls the spacing between text and shapes that text flows around. It's similar toshape-marginbut specifically for exclusions (text wrapping). # Example ss .element { -azul-exclusion-margin: 10.5; }struct StyleExclusionMargin
inner: FloatValue
struct Widows
inner: u32
struct LayoutColumnGap
inner: PixelValue
struct LayoutPaddingInlineEnd
inner: PixelValue
enum StyleListStyleType
None
Disc
Circle
Square
Decimal
DecimalLeadingZero
LowerRoman
UpperRoman
LowerGreek
UpperGreek
LowerAlpha
UpperAlpha
CSS clip-path property for clipping element rendering
union enum ClipPath has destructor
None
Shape(CssShape)
-azul-hyphenation-languageproperty: specifies language for hyphenation This property defines the language code (BCP 47 format) used for automatic hyphenation. Examples: "en-US", "de-DE", "fr-FR" # Example ss .element { -azul-hyphenation-language: "en-US"; }struct StyleHyphenationLanguage has destructor
inner: String
enum StyleListStylePosition
Inside
Outside
Specifies whether cell borders are collapsed into a single border or separated. The
border-collapseproperty determines the border rendering model: - separate: Each cell has its own border (default, uses border-spacing) - collapse: Adjacent cells share borders (ignores border-spacing)enum StyleBorderCollapse
Borders are separated (default). Each cell has its own border. The
border-spacingproperty defines the distance between borders.Separate
Borders are collapsed. Adjacent cells share a single border. Border conflict resolution rules apply when borders differ.
Collapse
Specifies the placement of a table caption. The
caption-sideproperty positions the caption either above or below the table.enum StyleCaptionSide
Caption is placed above the table (default)
Top
Caption is placed below the table
Bottom
struct LayoutRowGap
inner: PixelValue
hanging-punctuation property for hanging punctuation marks
struct StyleHangingPunctuation
enabled: bool
Controls the algorithm used to lay out table cells, rows, and columns. The
table-layoutproperty determines whether the browser should use: - auto: Column widths are determined by the content (slower but flexible) - fixed: Column widths are determined by the first row (faster and predictable)enum LayoutTableLayout
Use automatic table layout algorithm (content-based, default). Column width is set by the widest unbreakable content in the cells.
Auto
Use fixed table layout algorithm (first-row-based). Column width is set by the width property of the column or first-row cell. Renders faster than auto.
Fixed
initial-letter property for drop caps
struct StyleInitialLetter
size: u32
sink: OptionU32
Specifies whether or not to display borders and background on empty cells. The
empty-cellsproperty only applies whenborder-collapseis set toseparate. A cell is considered empty if it contains no visible content.enum StyleEmptyCells
Show borders and background on empty cells (default)
Show
Hide borders and background on empty cells
Hide
Represents the
font-styleproperty.enum StyleFontStyle
Normal
Italic
Oblique
text-combine-upright property for combining horizontal text in vertical layout
union enum StyleTextCombineUpright
None
All
Digits(u8)
union enum GridTrackSizing
Fixed(PixelValue)
Fr(i32)
MinContent
MaxContent
Auto
MinMax(GridMinMax)
FitContent(PixelValue)
Physical size with u32 dimensions
struct PhysicalSizeU32
width: u32
height: u32
enum HoverEventFilter
MouseOver
MouseDown
LeftMouseDown
RightMouseDown
MiddleMouseDown
MouseUp
LeftMouseUp
RightMouseUp
MiddleMouseUp
MouseEnter
MouseLeave
Scroll
ScrollStart
ScrollEnd
TextInput
VirtualKeyDown
VirtualKeyUp
HoveredFile
DroppedFile
HoveredFileCancelled
TouchStart
TouchMove
TouchEnd
TouchCancel
PenDown
PenMove
PenUp
PenEnter
PenLeave
DragStart
Drag
DragEnd
DoubleClick
LongPress
SwipeLeft
SwipeRight
SwipeUp
SwipeDown
PinchIn
PinchOut
RotateClockwise
RotateCounterClockwise
SystemTextSingleClick
SystemTextDoubleClick
SystemTextTripleClick
enum ShapeRendering
OptimizeSpeed
CrispEdges
GeometricPrecision
enum ApplicationEventFilter
DeviceConnected
DeviceDisconnected
struct XmlTextPos
row: u32
col: u32
struct LogicalSize
width: f32
height: f32
constructor new:
arg width: f32
arg height: f32
-> LogicalSize
constructor zero:
-> LogicalSize
struct StyledNodeState
normal: bool
hover: bool
active: bool
focused: bool
struct CssPropertyCachePtr
ptr: c_void
run_destructor: bool
struct SvgRenderTransform
sx: f32
kx: f32
ky: f32
sy: f32
tx: f32
ty: f32
enum TextRendering
OptimizeSpeed
OptimizeLegibility
GeometricPrecision
enum FocusEventFilter
MouseOver
MouseDown
LeftMouseDown
RightMouseDown
MiddleMouseDown
MouseUp
LeftMouseUp
RightMouseUp
MiddleMouseUp
MouseEnter
MouseLeave
Scroll
ScrollStart
ScrollEnd
TextInput
VirtualKeyDown
VirtualKeyUp
FocusReceived
FocusLost
PenDown
PenMove
PenUp
DragStart
Drag
DragEnd
DoubleClick
LongPress
SwipeLeft
SwipeRight
SwipeUp
SwipeDown
PinchIn
PinchOut
RotateClockwise
RotateCounterClockwise
struct LogicalPosition
x: f32
y: f32
union enum EventFilter
Hover(HoverEventFilter)
Not(NotEventFilter)
Focus(FocusEventFilter)
Window(WindowEventFilter)
Component(ComponentEventFilter)
Application(ApplicationEventFilter)
struct PhysicalSize
width: T
height: T
enum FontDatabase
Empty
System
struct StyledDom has destructor
root: NodeHierarchyItemId
node_hierarchy: NodeHierarchyItemVec
node_data: NodeDataVec
styled_nodes: StyledNodeVec
cascade_info: CascadeInfoVec
nodes_with_window_callbacks: NodeIdVec
nodes_with_not_callbacks: NodeIdVec
nodes_with_datasets: NodeIdVec
tag_ids_to_node_ids: TagIdToNodeIdMappingVec
non_leaf_nodes: ParentWithNodeDepthVec
css_property_cache: CssPropertyCachePtr
dom_id: DomId
constructor from_xml:
constructor from_file:
Returns a DOM loaded from an XML file
Same as
from_xml, but loads the file relative to the current directoryfn append_child:
&mut self
arg other: StyledDom
fn with_child:
fn node_count:
&self
-> usize
fn get_rects_in_rendering_order:
&self
-> ContentGroup
&mut self
-> StyledDom
Appends another
StyledDomas a child to theself.rootwithout re-styling the DOM itselfSame as
append_child(), but as a builder methodReturns the total number of nodes in this StyledDom.
Sets the menu bar for the root node
Builder method for setting the menu bar
Sets the context menu for the root node
Builder method for setting the context menu
Returns nodes grouped by their rendering order (respects z-index and position).
Replaces this StyledDom with default and returns the old value.
union enum NotEventFilter
Hover(HoverEventFilter)
Focus(FocusEventFilter)
enum ComponentEventFilter
AfterMount
BeforeUnmount
NodeResized
DefaultAction
Selected
struct VertexLayout has destructor
fields: VertexAttributeVec
struct GridMinMax
min: c_void
max: c_void
struct NamedGridLine has destructor
grid_line_name: String
span_count: i32
struct ScrollbarColorCustom
thumb: ColorU
track: ColorU
struct ShapeInset
inset_top: f32
inset_right: f32
inset_bottom: f32
inset_left: f32
border_radius: OptionF32
union enum CssShape has destructor
Circle(ShapeCircle)
Ellipse(ShapeEllipse)
Polygon(ShapePolygon)
Inset(ShapeInset)
Path(ShapePath)
struct ShapePath has destructor
data: String
struct ShapeEllipse
center: ShapePoint
radius_x: f32
radius_y: f32
struct ShapePoint
x: f32
y: f32
enum WindowBackgroundMaterial
Opaque
Transparent
Sidebar
Menu
HUD
Titlebar
MicaAlt
struct LayoutRect
origin: LayoutPoint
size: LayoutSize
constructor new:
arg origin: LayoutPoint
arg size: LayoutSize
-> LayoutRect
constructor zero:
-> LayoutRect
Creates a new LayoutRect with the given origin and size.
Creates a LayoutRect at the origin with zero size.
union enum WindowPosition
Uninitialized
Initialized(PhysicalPositionI32)
struct LayoutPoint
x: isize
y: isize
constructor new:
arg x: isize
arg y: isize
-> LayoutPoint
constructor zero:
-> LayoutPoint
Creates a new LayoutPoint with the given x and y coordinates.
Creates a LayoutPoint at the origin (0, 0).
union enum CursorPosition
OutOfWindow(LogicalPosition)
Uninitialized
InWindow(LogicalPosition)
union enum ImePosition
Uninitialized
Initialized(LogicalRect)
enum WindowDecorations
Normal
NoTitle
NoControls
None
struct PhysicalPosition
x: T
y: T
struct LinuxDecorationsState
is_dragging_titlebar: bool
close_button_hover: bool
maximize_button_hover: bool
minimize_button_hover: bool
enum Srgb
Enabled
Disabled
DontCare
struct LayoutInsetBottom
inner: PixelValue
struct ContentGroup
root: NodeHierarchyItemId
children: ContentGroupVec
enum CssPropertyType
CaretColor
CaretAnimationDuration
SelectionBackgroundColor
SelectionColor
SelectionRadius
TextColor
FontSize
FontFamily
FontWeight
FontStyle
TextAlign
TextJustify
VerticalAlign
LetterSpacing
TextIndent
InitialLetter
LineClamp
HangingPunctuation
TextCombineUpright
ExclusionMargin
HyphenationLanguage
LineHeight
WordSpacing
TabWidth
WhiteSpace
Hyphens
Direction
UserSelect
TextDecoration
Cursor
Display
Float
BoxSizing
Width
Height
MinWidth
MinHeight
MaxWidth
MaxHeight
Position
Top
Right
Left
Bottom
ZIndex
FlexWrap
FlexDirection
FlexGrow
FlexShrink
FlexBasis
JustifyContent
AlignItems
AlignContent
ColumnGap
RowGap
GridTemplateColumns
GridTemplateRows
GridAutoColumns
GridAutoRows
GridColumn
GridRow
GridAutoFlow
JustifySelf
JustifyItems
Gap
GridGap
AlignSelf
Font
WritingMode
Clear
BackgroundContent
BackgroundPosition
BackgroundSize
BackgroundRepeat
OverflowX
OverflowY
PaddingTop
PaddingLeft
PaddingRight
PaddingBottom
PaddingInlineStart
PaddingInlineEnd
MarginTop
MarginLeft
MarginRight
MarginBottom
BorderTopLeftRadius
BorderTopRightRadius
BorderBottomLeftRadius
BorderBottomRightRadius
BorderTopColor
BorderRightColor
BorderLeftColor
BorderBottomColor
BorderTopStyle
BorderRightStyle
BorderLeftStyle
BorderBottomStyle
BorderTopWidth
BorderRightWidth
BorderLeftWidth
BorderBottomWidth
BoxShadowLeft
BoxShadowRight
BoxShadowTop
BoxShadowBottom
Scrollbar
ScrollbarWidth
ScrollbarColor
Opacity
Visibility
Transform
TransformOrigin
PerspectiveOrigin
BackfaceVisibility
MixBlendMode
Filter
BackdropFilter
TextShadow
BreakBefore
BreakAfter
BreakInside
Orphans
Widows
BoxDecorationBreak
ColumnCount
ColumnWidth
ColumnSpan
ColumnFill
ColumnRuleWidth
ColumnRuleStyle
ColumnRuleColor
FlowInto
FlowFrom
ShapeOutside
ShapeInside
ClipPath
ShapeMargin
ShapeImageThreshold
TableLayout
BorderCollapse
BorderSpacing
CaptionSide
EmptyCells
Content
CounterReset
CounterIncrement
ListStyleType
ListStylePosition
StringSet
struct StyledNode
styled_node_state: StyledNodeState
tag_id: OptionTagId
struct SvgTransform
sx: f32
kx: f32
ky: f32
sy: f32
tx: f32
ty: f32
struct SvgFillStyle
line_join: SvgLineJoin
miter_limit: f32
tolerance: f32
fill_rule: SvgFillRule
transform: SvgTransform
anti_alias: bool
high_quality_aa: bool
struct StyledTextRun has destructor
text: String
font_family: OptionString
font_size_px: f32
color: ColorU
is_bold: bool
is_italic: bool
struct TextOpReplaceText has destructor
range: SelectionRange
old_text: String
new_text: String
new_cursor: CursorPosition
union enum TextOperation has destructor
InsertText(TextOpInsertText)
DeleteText(TextOpDeleteText)
ReplaceText(TextOpReplaceText)
SetSelection(TextOpSetSelection)
ExtendSelection(TextOpExtendSelection)
ClearSelection(TextOpClearSelection)
MoveCursor(TextOpMoveCursor)
Copy(TextOpCopy)
Cut(TextOpCut)
Paste(TextOpPaste)
SelectAll(TextOpSelectAll)
struct TextOpCopy has destructor
range: SelectionRange
content: ClipboardContent
struct TextOpDeleteText has destructor
range: SelectionRange
deleted_text: String
new_cursor: CursorPosition
struct TextOpSelectAll
old_range: OptionSelectionRange
new_range: SelectionRange
struct TextOpInsertText has destructor
position: CursorPosition
text: String
new_cursor: CursorPosition
struct TextOpPaste has destructor
position: CursorPosition
content: ClipboardContent
new_cursor: CursorPosition
struct TextOpCut has destructor
range: SelectionRange
content: ClipboardContent
new_cursor: CursorPosition
enum ExtendMode
Clamp
Repeat
union enum FlowFrom has destructor
None
Named(String)
union enum FlowInto has destructor
None
Named(String)
struct ArithmeticCoefficients
k1: FloatValue
k2: FloatValue
k3: FloatValue
k4: FloatValue
Has all the necessary information about the style CSS path
struct CascadeInfo
index_in_parent: u32
is_last_child: bool
Default, built-in widgets (button, label, textinput, etc.)
mod widgets:
struct Button has destructor
label: String
image: OptionImageRef
container_style: NodeDataInlineCssPropertyVec
label_style: NodeDataInlineCssPropertyVec
image_style: NodeDataInlineCssPropertyVec
on_click: OptionButtonOnClick
fn set_on_click:
&mut self
arg data: RefAny
arg callback: CallbackType
fn with_on_click:
self
arg data: RefAny
arg callback: CallbackType
-> Button
fn dom:
self
-> Dom
struct ButtonOnClick
data: RefAny
callback: ButtonOnClickCallback
struct FileInput has destructor
file_input_state: FileInputStateWrapper
default_text: String
image: OptionImageRef
container_style: NodeDataInlineCssPropertyVec
label_style: NodeDataInlineCssPropertyVec
image_style: NodeDataInlineCssPropertyVec
constructor create:
arg path: OptionString
-> FileInput
Creates a new file input button
fn set_default_text:
&mut self
arg default_text: String
&mut self
arg data: RefAny
arg callback: FileInputOnPathChangeCallbackType
self
arg data: RefAny
arg callback: FileInputOnPathChangeCallbackType
-> FileInput
fn dom:
self
-> Dom
struct FileInputStateWrapper has destructor
inner: FileInputState
on_path_change: OptionFileInputOnPathChange
file_dialog_title: String
default_dir: OptionString
struct FileInputState has destructor
path: OptionString
struct FileInputOnPathChange
data: RefAny
callback: FileInputOnPathChangeCallback
struct FileInputOnPathChangeCallback
cb: FileInputOnPathChangeCallbackType
callable: OptionRefAny
struct CheckBox has destructor
check_box_state: CheckBoxStateWrapper
container_style: NodeDataInlineCssPropertyVec
content_style: NodeDataInlineCssPropertyVec
fn set_on_toggle:
&mut self
arg data: RefAny
arg callback: CheckBoxOnToggleCallbackType
fn with_on_toggle:
self
arg data: RefAny
arg callback: CheckBoxOnToggleCallbackType
-> CheckBox
fn dom:
self
-> Dom
struct CheckBoxStateWrapper
Content (image or text) of this CheckBox, centered by default
inner: CheckBoxState
Optional: Function to call when the CheckBox is toggled
on_toggle: OptionCheckBoxOnToggle
struct CheckBoxOnToggle
data: RefAny
callback: CheckBoxOnToggleCallback
struct CheckBoxState
checked: bool
struct ColorInput has destructor
color_input_state: ColorInputStateWrapper
style: NodeDataInlineCssPropertyVec
constructor create:
arg color: ColorU
-> ColorInput
&mut self
arg data: RefAny
arg callback: ColorInputOnValueChangeCallbackType
self
arg data: RefAny
arg callback: ColorInputOnValueChangeCallbackType
-> ColorInput
fn dom:
self
-> Dom
struct ColorInputStateWrapper has destructor
inner: ColorInputState
title: String
on_value_change: OptionColorInputOnValueChange
struct ColorInputState
color: ColorU
struct ColorInputOnValueChange
data: RefAny
callback: ColorInputOnValueChangeCallback
struct ColorInputOnValueChangeCallback
cb: ColorInputOnValueChangeCallbackType
callable: OptionRefAny
struct TextInput has destructor
text_input_state: TextInputStateWrapper
placeholder_style: NodeDataInlineCssPropertyVec
container_style: NodeDataInlineCssPropertyVec
label_style: NodeDataInlineCssPropertyVec
fn set_text:
&mut self
arg text: String
fn with_text:
fn set_placeholder:
&mut self
arg text: String
fn with_placeholder:
&mut self
arg data: RefAny
arg callback: TextInputOnTextInputCallbackType
self
arg data: RefAny
arg callback: TextInputOnTextInputCallbackType
-> TextInput
&mut self
arg data: RefAny
arg callback: TextInputOnVirtualKeyDownCallbackType
self
arg data: RefAny
arg callback: TextInputOnVirtualKeyDownCallbackType
-> TextInput
&mut self
arg data: RefAny
arg callback: TextInputOnFocusLostCallbackType
self
arg data: RefAny
arg callback: TextInputOnFocusLostCallbackType
-> TextInput
fn dom:
self
-> Dom
struct TextInputStateWrapper has destructor
inner: TextInputState
on_text_input: OptionTextInputOnTextInput
on_virtual_key_down: OptionTextInputOnVirtualKeyDown
on_focus_lost: OptionTextInputOnFocusLost
update_text_input_before_calling_focus_lost_fn: bool
update_text_input_before_calling_vk_down_fn: bool
cursor_animation: OptionTimerId
struct TextInputState has destructor
text: U32Vec
placeholder: OptionString
max_len: usize
selection: OptionTextInputSelection
cursor_pos: usize
struct TextInputOnTextInput
data: RefAny
callback: TextInputOnTextInputCallback
struct TextInputOnTextInputCallback
cb: TextInputOnTextInputCallbackType
callable: OptionRefAny
struct TextInputOnFocusLost
data: RefAny
callback: TextInputOnFocusLostCallback
struct TextInputOnFocusLostCallback
cb: TextInputOnFocusLostCallbackType
callable: OptionRefAny
struct OnTextInputReturn
update: Update
valid: TextInputValid
enum TextInputValid
Yes
No
struct NumberInput has destructor
number_input_state: NumberInputStateWrapper
text_input: TextInput
style: NodeDataInlineCssPropertyVec
constructor create:
arg number: f32
-> NumberInput
&mut self
arg data: RefAny
arg callback: TextInputOnTextInputCallbackType
self
arg data: RefAny
arg callback: TextInputOnTextInputCallbackType
-> NumberInput
&mut self
arg data: RefAny
arg callback: TextInputOnVirtualKeyDownCallbackType
self
arg data: RefAny
arg callback: TextInputOnVirtualKeyDownCallbackType
-> NumberInput
&mut self
arg data: RefAny
arg callback: NumberInputOnFocusLostCallbackType
self
arg data: RefAny
arg callback: NumberInputOnFocusLostCallbackType
-> NumberInput
&mut self
arg data: RefAny
arg callback: NumberInputOnValueChangeCallbackType
self
arg data: RefAny
arg callback: NumberInputOnValueChangeCallbackType
-> NumberInput
fn dom:
self
-> Dom
struct NumberInputStateWrapper
inner: NumberInputState
on_value_change: OptionNumberInputOnValueChange
on_focus_lost: OptionNumberInputOnFocusLost
struct NumberInputState
previous: f32
number: f32
min: f32
max: f32
struct NumberInputOnValueChange
data: RefAny
callback: NumberInputOnValueChangeCallback
struct NumberInputOnValueChangeCallback
cb: NumberInputOnValueChangeCallbackType
callable: OptionRefAny
struct NumberInputOnFocusLost
data: RefAny
callback: NumberInputOnFocusLostCallback
struct NumberInputOnFocusLostCallback
cb: NumberInputOnFocusLostCallbackType
callable: OptionRefAny
struct ProgressBar has destructor
progressbar_state: ProgressBarState
height: PixelValue
bar_background: StyleBackgroundContentVec
container_background: StyleBackgroundContentVec
constructor create:
arg percent_done: f32
-> ProgressBar
fn set_height:
&mut self
arg height: PixelValue
fn with_height:
self
arg height: PixelValue
-> ProgressBar
&mut self
arg background: StyleBackgroundContentVec
self
arg background: StyleBackgroundContentVec
-> ProgressBar
&mut self
arg background: StyleBackgroundContentVec
self
arg background: StyleBackgroundContentVec
-> ProgressBar
fn dom:
self
-> Dom
struct ProgressBarState
percent_done: f32
display_percentage: bool
struct TabHeader has destructor
tabs: StringVec
active_tab: usize
on_click: OptionTabOnClick
fn set_active_tab:
&mut self
arg active_tab: usize
fn with_active_tab:
self
arg active_tab: usize
-> TabHeader
fn set_on_click:
&mut self
arg data: RefAny
arg callback: TabOnClickCallbackType
fn with_on_click:
self
arg data: RefAny
arg callback: TabOnClickCallbackType
-> TabHeader
fn dom:
self
-> Dom
struct TabOnClick
data: RefAny
callback: TabOnClickCallback
struct Frame has destructor
title: String
flex_grow: f32
content: Dom
fn set_flex_grow:
&mut self
arg flex_grow: f32
fn with_flex_grow:
self
arg flex_grow: f32
-> Frame
fn dom:
self
-> Dom
List view, optionally able to lazy-load data
struct ListView has destructor
Column names
columns: StringVec
Currently rendered rows. Note that the ListView does not have to render all rows at once, usually you'd only render the top 100 rows
rows: ListViewRowVec
Which column is the list view sorted by (default = None)?
sorted_by: OptionUsize
Offset to add to the rows used when layouting row positions during lazy-loaded scrolling. Also affects the scroll position
scroll_offset: PixelValueNoPercent
Height of the content, if not all rows are loaded
content_height: OptionPixelValueNoPercent
Context menu for the columns (usually opens a context menu to select which columns to show)
column_context_menu: OptionMenu
Indicates that this ListView is being lazily loaded, allows control over what happens when the user scrolls the ListView.
on_lazy_load_scroll: OptionListViewOnLazyLoadScroll
What to do when the user left-clicks the column (usually used for storing which column to sort by)
on_column_click: OptionListViewOnColumnClick
What to do when the user left-clicks a row (usually used for selecting the row depending on the state)
on_row_click: OptionListViewOnRowClick
fn with_rows:
self
arg rows: ListViewRowVec
-> ListView
fn dom:
self
-> Dom
Row of the ListView
struct ListViewRow has destructor
Each cell is an opaque Dom object
cells: DomVec
Height of the row, if known beforehand
height: OptionPixelValueNoPercent
struct ListViewOnLazyLoadScroll
data: RefAny
callback: ListViewOnLazyLoadScrollCallback
struct ListViewOnColumnClick
data: RefAny
callback: ListViewOnColumnClickCallback
struct ListViewOnRowClick
data: RefAny
callback: ListViewOnRowClickCallback
struct IFrameNode
callback: IFrameCallback
refany: RefAny
struct ListViewState has destructor
columns: StringVec
sorted_by: OptionUsize
current_row_count: usize
scroll_offset: PixelValueNoPercent
current_scroll_position: LogicalPosition
current_content_height: LogicalSize
struct TabHeaderState
active_tab: usize
OpenGl helper types (
Texture,Gl, etc.)mod gl:
OpenGL texture, use
ReadOnlyWindow::create_textureto create a texturestruct Texture has destructor
texture_id: GLuint
flags: TextureFlags
size: PhysicalSizeU32
background_color: ColorU
gl_context: GlContextPtr
format: RawImageFormat
refcount: c_void
run_destructor: bool
constructor create:
arg texture_id: GLuint
arg flags: TextureFlags
arg size: PhysicalSizeU32
arg background_color: ColorU
arg gl_context: GlContextPtr
arg format: RawImageFormat
-> Texture
constructor allocate_rgba8:
arg gl_context: GlContextPtr
arg size: PhysicalSizeU32
arg background: ColorU
-> Texture
constructor allocate_clip_mask:
arg gl: GlContextPtr
arg size: PhysicalSizeU32
arg background: ColorU
-> Texture
Allocates an OpenGL texture of a given size with a single red channel (used for image masks)
fn clear:
&mut self
fn apply_fxaa:
&mut self
-> bool
fn draw_tesselated_svg_gpu_node:
&mut self
arg node: TessellatedGPUSvgNode
arg size: PhysicalSizeU32
arg color: ColorU
arg transforms: StyleTransformVec
-> bool
fn get_descriptor:
&self
fn draw_tesselated_colored_svg_gpu_node:
&mut self
arg node: TessellatedColoredGPUSvgNode
arg size: PhysicalSizeU32
arg transforms: StyleTransformVec
-> bool
Applies an FXAA filter to the texture
Draws a
TessellatedGPUSvgNodewith the given color to the textureDraws a
TessellatedColoredGPUSvgNodeto the texturePassing *const c_void is not easily possible when generating APIs, so this wrapper struct is for easier API generation
struct GlVoidPtrConst has destructor
ptr: c_void
run_destructor: bool
struct GlVoidPtrMut
ptr: c_void
struct TextureFlags
Whether this texture contains an alpha component
is_opaque: bool
Optimization: use the compositor instead of OpenGL for energy optimization
is_video_texture: bool
For .get_gl_precision_format(), but ABI-safe - returning an array or a tuple is not ABI-safe
struct GlShaderPrecisionFormatReturn
_0: GLint
_1: GLint
_2: GLint
struct GlContextPtr has destructor
ptr: c_void
renderer_type: RendererType
run_destructor: bool
fn get_type:
&self
-> GlType
&self
arg target: GLenum
arg size: GLsizeiptr
arg data: GlVoidPtrConst
arg usage: GLenum
&self
arg target: GLenum
arg offset: isize
arg size: GLsizeiptr
arg data: GlVoidPtrConst
fn map_buffer:
&self
arg target: GLenum
arg access: GLbitfield
-> GlVoidPtrMut
fn map_buffer_range:
&self
arg target: GLenum
arg offset: GLintptr
arg length: GLsizeiptr
arg access: GLbitfield
-> GlVoidPtrMut
fn unmap_buffer:
fn tex_buffer:
fn read_buffer:
&self
arg mode: GLenum
fn read_pixels:
fn sample_coverage:
&self
arg value: GLclampf
arg invert: bool
fn polygon_offset:
fn pixel_store_i:
fn gen_buffers:
fn gen_framebuffers:
fn gen_textures:
fn gen_queries:
fn begin_query:
fn end_query:
&self
arg target: GLenum
fn query_counter:
fn delete_queries:
&self
arg queries: GLuintVecRef
&self
arg vertex_arrays: GLuintVecRef
fn delete_buffers:
&self
arg buffers: GLuintVecRef
&self
arg renderbuffers: GLuintVecRef
&self
arg framebuffers: GLuintVecRef
fn delete_textures:
&self
arg textures: GLuintVecRef
fn depth_func:
&self
arg func: GLenum
fn active_texture:
&self
arg texture: GLenum
fn attach_shader:
fn get_uniform_iv:
&self
arg program: GLuint
arg location: GLint
arg result: GLintVecRefMut
fn get_uniform_fv:
&self
arg program: GLuint
arg location: GLint
arg result: GLfloatVecRefMut
fn bind_buffer_base:
&self
arg target: GLenum
arg index: GLuint
arg buffer: GLuint
arg offset: GLintptr
arg size: GLsizeiptr
fn bind_buffer:
&self
arg vao: GLuint
fn bind_framebuffer:
fn bind_texture:
fn draw_buffers:
&self
arg bufs: GLenumVecRef
fn tex_image_2d:
fn tex_image_3d:
fn tex_sub_image_2d:
fn tex_sub_image_3d:
fn tex_storage_2d:
fn tex_storage_3d:
&self
arg target: GLenum
arg level: GLint
arg format: GLenum
arg ty: GLenum
arg output: U8VecRefMut
&self
arg target: GLenum
arg attachments: GLenumVecRef
fn get_integer_v:
&self
arg name: GLenum
arg result: GLintVecRefMut
fn get_integer_64v:
&self
arg name: GLenum
arg result: GLint64VecRefMut
fn get_integer_iv:
&self
arg name: GLenum
arg index: GLuint
arg result: GLintVecRefMut
fn get_integer_64iv:
&self
arg name: GLenum
arg index: GLuint
arg result: GLint64VecRefMut
fn get_boolean_v:
&self
arg name: GLenum
arg result: GLbooleanVecRefMut
fn get_float_v:
&self
arg name: GLenum
arg result: GLfloatVecRefMut
fn tex_parameter_i:
fn tex_parameter_f:
fn blit_framebuffer:
fn vertex_attrib_4f:
fn viewport:
fn scissor:
fn line_width:
&self
arg width: GLfloat
fn use_program:
&self
arg program: GLuint
fn validate_program:
&self
arg program: GLuint
fn draw_arrays:
fn draw_elements:
fn blend_color:
&self
arg r: f32
arg g: f32
arg b: f32
arg a: f32
fn blend_func:
fn blend_equation:
&self
arg mode: GLenum
fn color_mask:
&self
arg r: bool
arg g: bool
arg b: bool
arg a: bool
fn cull_face:
&self
arg mode: GLenum
fn front_face:
&self
arg mode: GLenum
fn enable:
&self
arg cap: GLenum
fn disable:
&self
arg cap: GLenum
fn hint:
fn is_enabled:
fn is_shader:
fn is_texture:
fn is_framebuffer:
fn is_renderbuffer:
fn enable_vertex_attrib_array:
&self
arg index: GLuint
fn disable_vertex_attrib_array:
&self
arg index: GLuint
fn uniform_1f:
fn uniform_1fv:
fn uniform_1i:
fn uniform_1iv:
fn uniform_1ui:
fn uniform_2f:
fn uniform_2fv:
fn uniform_2i:
fn uniform_2iv:
fn uniform_2ui:
fn uniform_3f:
fn uniform_3fv:
fn uniform_3i:
fn uniform_3iv:
fn uniform_3ui:
fn uniform_4f:
fn uniform_4i:
fn uniform_4iv:
fn uniform_4ui:
fn uniform_4fv:
fn depth_mask:
&self
arg flag: bool
fn depth_range:
&self
arg near: f64
arg far: f64
fn get_program_iv:
&self
arg program: GLuint
arg pname: GLenum
arg result: GLintVecRefMut
&self
arg program: GLuint
fn program_binary:
&self
arg index: GLuint
arg pname: GLenum
arg result: GLintVecRefMut
&self
arg index: GLuint
arg pname: GLenum
arg result: GLfloatVecRefMut
fn get_vertex_attrib_pointer_v:
&self
arg index: GLuint
arg pname: GLenum
-> GLsizeiptr
fn get_shader_iv:
&self
arg shader: GLuint
arg pname: GLenum
arg result: GLintVecRefMut
fn compile_shader:
&self
arg shader: GLuint
fn create_program:
&self
-> GLuint
fn delete_program:
&self
arg program: GLuint
fn create_shader:
fn delete_shader:
&self
arg shader: GLuint
fn detach_shader:
fn link_program:
&self
arg program: GLuint
fn clear_color:
&self
arg r: f32
arg g: f32
arg b: f32
arg a: f32
fn clear:
&self
arg buffer_mask: GLbitfield
fn clear_depth:
&self
arg depth: f64
fn clear_stencil:
&self
arg s: GLint
fn flush:
&self
fn finish:
&self
fn get_error:
&self
-> GLenum
fn stencil_mask:
&self
arg mask: GLuint
fn stencil_func:
fn stencil_op:
fn egl_image_target_texture2d_oes:
&self
arg target: GLenum
arg image: GlVoidPtrConst
fn generate_mipmap:
&self
arg target: GLenum
&self
&self
fn fence_sync:
&self
arg condition: GLenum
arg flags: GLbitfield
-> GLsyncPtr
fn client_wait_sync:
&self
arg sync: GLsyncPtr
arg flags: GLbitfield
arg timeout: GLuint64
-> u32
fn wait_sync:
&self
arg sync: GLsyncPtr
arg flags: GLbitfield
arg timeout: GLuint64
fn delete_sync:
&self
arg sync: GLsyncPtr
fn gen_fences_apple:
&self
arg fences: GLuintVecRef
fn set_fence_apple:
&self
arg fence: GLuint
&self
arg fence: GLuint
fn test_fence_apple:
&self
arg fence: GLuint
&self
&self
&self
arg mode: GLenum
&self
arg vao: GLuint
fn delete_vertex_arrays_apple:
&self
arg vertex_arrays: GLuintVecRef
&self
arg source_id: GLuint
arg source_level: GLint
arg dest_target: GLenum
arg dest_id: GLuint
arg dest_level: GLint
arg x_offset: GLint
arg y_offset: GLint
arg x: GLint
arg y: GLint
arg width: GLsizei
arg height: GLsizei
arg unpack_flip_y: GLboolean
arg unpack_premultiply_alpha: GLboolean
arg unpack_unmultiply_alpha: GLboolean
fn egl_image_target_renderbuffer_storage_oes:
&self
arg target: u32
arg image: GlVoidPtrConst
&self
arg source_id: GLuint
arg source_level: GLint
arg dest_target: GLenum
arg dest_id: GLuint
arg dest_level: GLint
arg x_offset: GLint
arg y_offset: GLint
arg z_offset: GLint
arg x: GLint
arg y: GLint
arg z: GLint
arg width: GLsizei
arg height: GLsizei
arg depth: GLsizei
arg unpack_flip_y: GLboolean
arg unpack_premultiply_alpha: GLboolean
arg unpack_unmultiply_alpha: GLboolean
fn buffer_storage:
&self
arg target: GLenum
arg size: GLsizeiptr
arg data: GlVoidPtrConst
arg flags: GLbitfield
&self
arg target: GLenum
arg offset: GLintptr
arg length: GLsizeiptr
fn get_svg_shader:
&self
-> GLuint
fn get_fxaa_shader:
&self
-> GLuint
fn shader_source:
&self
arg program: GLuint
arg names: RefstrVecRef
-> GLuintVec
fn get_string:
fn get_string_i:
&self
arg message: Refstr
&self
arg message: Refstr
C-ABI stable reexport of
(U8Vec, u32)struct GetProgramBinaryReturn has destructor
_0: U8Vec
_1: u32
C-ABI stable reexport of
(i32, u32, AzString)struct GetActiveAttribReturn has destructor
_0: i32
_1: u32
_2: String
C-ABI stable reexport of
*const gleam::gl::GLsyncstruct GLsyncPtr has destructor
ptr: c_void
run_destructor: bool
C-ABI stable reexport of
(i32, u32, AzString)struct GetActiveUniformReturn has destructor
_0: i32
_1: u32
_2: String
struct SvgVertex
x: f32
y: f32
enum GlType
Gl
Gles
struct VertexArrayObject has destructor
vertex_layout: VertexLayout
vao_id: GLuint
gl_context: GlContextPtr
refcount: c_void
run_destructor: bool
struct VertexBuffer has destructor
vertex_buffer_id: GLuint
vertex_buffer_len: usize
vao: VertexArrayObject
index_buffer_id: GLuint
index_buffer_len: usize
index_buffer_format: IndexBufferFormat
refcount: c_void
run_destructor: bool
enum IndexBufferFormat
Points
Lines
LineStrip
Triangles
TriangleStrip
TriangleFan
struct DebugMessage has destructor
message: String
source: GLenum
ty: GLenum
id: GLenum
severity: GLenum
Struct definitions for image loading
mod image:
struct ImageRef has destructor
data: c_void
copies: c_void
run_destructor: bool
constructor raw_image:
arg data: RawImage
constructor gl_texture:
constructor callback:
arg callback: CoreRenderImageCallback
arg data: RefAny
-> ImageRef
constructor new_rawimage:
arg image_data: RawImage
constructor new_gltexture:
constructor null_image:
arg width: usize
arg height: usize
arg format: RawImageFormat
arg tag: U8VecRef
-> ImageRef
Creates an image reference from a CPU-backed buffer
Creates an image reference from an OpenGL texture
fn is_invalid:
&self
-> bool
fn is_gl_texture:
&self
-> bool
fn is_raw_image:
&self
-> bool
fn is_callback:
&self
-> bool
fn get_raw_image:
&self
fn is_null_image:
&self
-> bool
fn get_rawimage:
&self
fn get_bytes:
&self
fn get_size:
&self
-> LogicalSize
fn get_hash:
&self
-> ImageRefHash
&self
&mut self
fn deep_copy:
&self
-> ImageRef
fn get_bytes_ptr:
&self
-> u8
Returns whether the image is a null (invalid) image
If the image is a RawImage, returns a COPY of the internal image bytes (useful for encoding the RawImage / exporting the ImageRef to a file)
Get raw bytes from the image as a slice Returns None if this is not a Raw image or if it's an External image
NOTE: returns (0, 0) for a Callback
In difference to the default shallow copy, creates a new image ref
Get a pointer to the raw bytes for debugging/profiling purposes Returns a unique pointer for this ImageRef's data
struct RawImage has destructor
pixels: RawImageData
width: usize
height: usize
premultiplied_alpha: bool
data_format: RawImageFormat
tag: U8Vec
constructor empty:
-> RawImage
constructor allocate_clip_mask:
arg size: LayoutSize
-> RawImage
constructor decode_image_bytes_any:
arg bytes: U8VecRef
Returns a zero-sized image
Allocates a width * height, single-channel image with zeroed bytes
Decodes a RawImage from any supported image format - automatically guesses the format based on magic header
fn encode_bmp:
&self
fn encode_png:
&self
fn encode_jpeg:
&self
arg quality: u8
fn encode_tga:
&self
fn encode_pnm:
&self
fn encode_gif:
&self
fn encode_tiff:
&self
Encodes the RawImage in the BMP image format
Encodes the RawImage in the PNG image format
Encodes the RawImage in the JPG image format. Quality is a value from 0 to 100.
Encodes the RawImage in the TGA image format
Encodes the RawImage in the PNM image format
Encodes the RawImage in the GIF image format
Encodes the RawImage in the TIFF image format
struct ImageMask has destructor
image: ImageRef
rect: LogicalRect
repeat: bool
enum RawImageFormat
R8
RG8
RGB8
RGBA8
R16
RG16
RGB16
RGBA16
BGR8
BGRA8
RGBF32
RGBAF32
union enum RawImageData has destructor
U8(U8Vec)
U16(U16Vec)
F32(F32Vec)
enum ImageRendering
OptimizeQuality
OptimizeSpeed
struct ImageDescriptor
format: RawImageFormat
width: usize
height: usize
stride: OptionI32
offset: i32
flags: ImageDescriptorFlags
struct ImageDescriptorFlags
is_opaque: bool
allow_mipmaps: bool
struct ImageRefHash
inner: usize
Font decoding / parsing module
mod font:
Font metrics structure containing all font-related measurements from the font file tables (head, hhea, and os/2 tables).
struct FontMetrics
units_per_em: u16
font_flags: u16
x_min: i16
y_min: i16
x_max: i16
y_max: i16
ascender: i16
descender: i16
line_gap: i16
advance_width_max: u16
min_left_side_bearing: i16
min_right_side_bearing: i16
x_max_extent: i16
caret_slope_rise: i16
caret_slope_run: i16
caret_offset: i16
num_h_metrics: u16
x_avg_char_width: i16
us_weight_class: u16
us_width_class: u16
fs_type: u16
y_subscript_x_size: i16
y_subscript_y_size: i16
y_subscript_x_offset: i16
y_subscript_y_offset: i16
y_superscript_x_size: i16
y_superscript_y_size: i16
y_superscript_x_offset: i16
y_superscript_y_offset: i16
y_strikeout_size: i16
y_strikeout_position: i16
s_family_class: i16
panose: Panose
ul_unicode_range1: u32
ul_unicode_range2: u32
ul_unicode_range3: u32
ul_unicode_range4: u32
ach_vend_id: u32
fs_selection: u16
us_first_char_index: u16
us_last_char_index: u16
s_typo_ascender: OptionI16
s_typo_descender: OptionI16
s_typo_line_gap: OptionI16
us_win_ascent: OptionU16
us_win_descent: OptionU16
ul_code_page_range1: OptionU32
ul_code_page_range2: OptionU32
sx_height: OptionI16
s_cap_height: OptionI16
us_default_char: OptionU16
us_break_char: OptionU16
us_max_context: OptionU16
us_lower_optical_point_size: OptionU16
us_upper_optical_point_size: OptionU16
constructor zero:
-> FontMetrics
Returns a FontMetrics struct with all fields set to 0
fn use_typo_metrics:
&self
-> bool
fn get_ascender:
&self
-> i16
fn get_descender:
&self
-> i16
fn get_line_gap:
&self
-> i16
fn get_x_min:
&self
-> i16
fn get_y_min:
&self
-> i16
fn get_x_max:
&self
-> i16
fn get_y_max:
&self
-> i16
&self
-> u16
&self
-> i16
fn get_min_right_side_bearing:
&self
-> i16
fn get_x_max_extent:
&self
-> i16
&self
-> i16
&self
-> i16
&self
-> i16
&self
-> i16
&self
-> i16
&self
-> i16
&self
-> i16
fn get_y_superscript_x_offset:
&self
-> i16
fn get_y_superscript_y_offset:
&self
-> i16
Returns whether typographic metrics should be used (from fs_selection flag)
Returns the ascender value from the hhea table
Returns the descender value from the hhea table
Returns the line gap value from the hhea table
Returns the x_min value from the head table
Returns the y_min value from the head table
Returns the x_max value from the head table
Returns the y_max value from the head table
Returns the maximum advance width from the hhea table
Returns the minimum left side bearing from the hhea table
Returns the minimum right side bearing from the hhea table
Returns the maximum extent in the x direction from the hhea table
Returns the average character width from the os/2 table
Returns the subscript x size from the os/2 table
Returns the subscript y size from the os/2 table
Returns the subscript x offset from the os/2 table
Returns the subscript y offset from the os/2 table
Returns the superscript x size from the os/2 table
Returns the superscript y size from the os/2 table
Returns the superscript x offset from the os/2 table
Returns the superscript y offset from the os/2 table
FontRef is a reference-counted pointer to a parsed font. It holds a *const c_void that points to the actual parsed font data (typically a ParsedFont from the layout crate). The parsed data is managed via atomic reference counting, allowing safe sharing across threads without duplicating the font data.
struct FontRef has destructor
parsed: c_void
copies: c_void
run_destructor: bool
parsed_destructor: FontRefDestructorCallbackType
constructor parse:
arg source: LoadedFontSource
constructor new:
arg parsed: *const c_void
arg destructor: FontRefDestructorCallbackType
-> FontRef
Parses a new font from bytes. Returns
Noneif the font could not be parsed correctly.Create a new FontRef from parsed font data
# Arguments *parsed- Pointer to parsed font data (e.g., Arc::into_raw(Arc::new(ParsedFont))) *destructor- Function to clean up the parsed datafn get_bytes:
&self
-> U8Vec
fn get_font_metrics:
&self
-> FontMetrics
fn get_hash:
&self
-> u64
Returns the font bytes of the underlying font source
Returns the font metrics of the parsed font
Returns the hash of the FontRef (fast)
Source data of a font file (bytes)
struct LoadedFontSource has destructor
data: U8Vec
index: u32
load_outlines: bool
struct Panose
family_type: u8
serif_style: u8
weight: u8
proportion: u8
contrast: u8
stroke_variation: u8
arm_style: u8
letterform: u8
midline: u8
x_height: u8
SVG parsing and rendering functions
mod svg:
struct Svg has destructor
tree: c_void
run_destructor: bool
constructor from_string:
arg svg_string: String
arg parse_options: SvgParseOptions
constructor from_bytes:
arg svg_bytes: U8VecRef
arg parse_options: SvgParseOptions
struct SvgMultiPolygon has destructor
NOTE: If a ring represends a hole, simply reverse the order of points
rings: SvgPathVec
fn get_bounds:
&self
-> SvgRect
fn contains_point:
&self
arg point: SvgPoint
arg fill_rule: SvgFillRule
arg tolerance: f32
-> bool
fn union:
&self
arg other: SvgMultiPolygon
fn intersection:
&self
arg other: SvgMultiPolygon
fn difference:
&self
arg other: SvgMultiPolygon
fn xor:
&self
arg other: SvgMultiPolygon
fn tessellate_fill:
&self
arg fill_style: SvgFillStyle
&self
arg stroke_style: SvgStrokeStyle
Returns the bounds of the polygon
Returns whether the polygon contains a point
Unions two MultiPolygons, returns the unioned MultiPolygon
Intersects two MultiPolygons, returns the intersected MultiPolygon
Calculates the difference two MultiPolygons, returns a MultiPolygon
Xors two MultiPolygons, returns a MultiPolygon
struct SvgCircle
center_x: f32
center_y: f32
radius: f32
struct SvgPath has destructor
items: SvgPathElementVec
fn is_closed:
&self
-> bool
fn reverse:
&mut self
fn get_start:
&self
fn get_end:
&self
fn get_bounds:
&self
-> SvgRect
fn join_with:
&mut self
arg path: SvgPath
-> bool
fn offset:
&mut self
arg distance: f32
arg join: SvgLineJoin
arg cap: SvgLineCap
-> SvgPath
fn bevel:
&mut self
arg distance: f32
-> SvgPath
fn close:
&mut self
Offset the path by a certain distance. Will create bezier curves around the edges when the path is closed
Round the edges with a cubic curve
union enum SvgPathElement
Line(SvgLine)
QuadraticCurve(SvgQuadraticCurve)
CubicCurve(SvgCubicCurve)
fn reverse:
&mut self
fn get_start:
&self
-> SvgPoint
fn get_end:
&self
-> SvgPoint
fn get_bounds:
&self
-> SvgRect
fn get_length:
&self
-> f64
fn get_t_at_offset:
&self
arg offset: f64
-> f64
fn get_x_at_t:
&self
arg t: f64
-> f64
fn get_y_at_t:
&self
arg t: f64
-> f64
&self
arg t: f64
-> SvgVector
fn set_last:
&mut self
arg point: SvgPoint
fn set_first:
&mut self
arg point: SvgPoint
struct SvgPoint
x: f32
y: f32
struct SvgVector
x: f64
y: f64
fn angle_degrees:
&self
-> f64
fn normalize:
&self
-> SvgVector
fn rotate_90deg_ccw:
&self
-> SvgVector
Returns the angle of this vector in degrees
Normalizes the vector, returning the normalized vector
Rotates the vector 90 degrees counter clockwise, returning the rotated vector
A line segment in 2D space.
struct SvgLine
Start point of the line
start: SvgPoint
End point of the line
end: SvgPoint
fn reverse:
&mut self
fn get_start:
&self
-> SvgPoint
fn get_end:
&self
-> SvgPoint
fn get_bounds:
&self
-> SvgRect
fn get_length:
&self
-> f64
fn get_t_at_offset:
&self
arg offset: f64
-> f64
fn get_x_at_t:
&self
arg t: f64
-> f64
fn get_y_at_t:
&self
arg t: f64
-> f64
&self
-> SvgVector
fn intersect:
&self
arg other: SvgLine
fn inwards_normal:
&self
fn outwards_normal:
&self
Returns the tangent vector of the line. For a line, the tangent is constant (same direction everywhere), so no
tparameter is needed.Intersect two lines EVEN IF THEY ARE DISTINCT. Only returns None on parallel lines (never intersect)
Computes the inward-facing normal vector for this line.
The normal points 90 degrees to the right of the line direction. ReturnsNoneif the line has zero length.struct SvgQuadraticCurve
start: SvgPoint
ctrl: SvgPoint
end: SvgPoint
fn reverse:
&mut self
fn get_start:
&self
-> SvgPoint
fn get_end:
&self
-> SvgPoint
fn get_bounds:
&self
-> SvgRect
fn get_length:
&self
-> f64
fn get_t_at_offset:
&self
arg offset: f64
-> f64
fn get_x_at_t:
&self
arg t: f64
-> f64
fn get_y_at_t:
&self
arg t: f64
-> f64
&self
arg t: f64
-> SvgVector
Reverses the order of points in the curve so that the curve runs in the opposite direction afterwards
Returns the starting point of this item
Returns the ending point of this item
Returns the bounding box of this item
Returns the length of the line or curve
Returns the interpolation value t (between 0 and 1) at the given offset from the line or curve start
Returns the point on the line or curve at t (t = interpolation value between 0 and 1)
Returns the y position of the line or curve at t
Returns the angle in DEGREES of the line or curve at t (t = interpolation value between 0 and 1)
struct SvgCubicCurve
start: SvgPoint
ctrl_1: SvgPoint
ctrl_2: SvgPoint
end: SvgPoint
fn reverse:
&mut self
fn get_start:
&self
-> SvgPoint
fn get_end:
&self
-> SvgPoint
fn get_bounds:
&self
-> SvgRect
fn get_length:
&self
-> f64
fn get_t_at_offset:
&self
arg offset: f64
-> f64
fn get_x_at_t:
&self
arg t: f64
-> f64
fn get_y_at_t:
&self
arg t: f64
-> f64
&self
arg t: f64
-> SvgVector
Reverses the order of points in the curve so that the curve runs in the opposite direction afterwards
Returns the starting point of this item
Returns the ending point of this item
Returns the bounding box of this item
Returns the length of the line or curve
Returns the interpolation value t (between 0 and 1) at the given offset from the line or curve start
Returns the point on the line or curve at t (t = interpolation value between 0 and 1)
Returns the y position of the line or curve at t
Returns the angle in DEGREES of the line or curve at t (t = interpolation value between 0 and 1)
struct SvgRect
width: f32
height: f32
x: f32
y: f32
radius_top_left: f32
radius_top_right: f32
radius_bottom_left: f32
radius_bottom_right: f32
fn get_center:
&self
-> SvgPoint
fn contains_point:
&self
arg point: SvgPoint
-> bool
fn expand:
&self
arg padding_top: f32
arg padding_bottom: f32
arg padding_left: f32
arg padding_right: f32
-> SvgRect
struct TessellatedSvgNode has destructor
vertices: SvgVertexVec
indices: U32Vec
constructor empty:
constructor from_nodes:
arg nodes: TessellatedSvgNodeVecRef
Creates a new TessellatedSvgNode by joining all the given nodes together into one array and inserting a
GL_RESTART_INDEX(u32::MAX) into the indices (so that the resulting buffer can be drawn in one draw call).struct SvgDashPattern
offset: f32
length_1: f32
gap_1: f32
length_2: f32
gap_2: f32
length_3: f32
gap_3: f32
union enum SvgFitTo
Original
Width(u32)
Height(u32)
Zoom(f32)
enum SvgFillRule
Winding
EvenOdd
enum SvgLineJoin
Miter
MiterClip
Round
Bevel
enum SvgLineCap
Butt
Square
Round
union enum CssPathPseudoSelector
First
Last
NthChild(CssNthChildSelector)
Hover
Active
Focus
struct LogicalRect
origin: LogicalPosition
size: LogicalSize
constructor new:
arg origin: LogicalPosition
arg size: LogicalSize
-> LogicalRect
constructor zero:
-> LogicalRect
fn max_x:
&self
-> f32
fn min_x:
&self
-> f32
fn max_y:
&self
-> f32
fn min_y:
&self
-> f32
fn contains:
&self
arg point: LogicalPosition
-> bool
fn intersects:
&self
arg other: LogicalRect
-> bool
Returns whether this rectangle contains the given point
Returns whether this rectangle intersects with another rectangle
union enum CssPathSelector has destructor
Global
Type(NodeTypeTag)
Class(String)
Id(String)
PseudoSelector(CssPathPseudoSelector)
DirectChildren
Children
AdjacentSibling
GeneralSibling
struct CssPath has destructor
selectors: CssPathSelectorVec
struct ShapeCircle
center: ShapePoint
radius: f32
struct ShapePolygon
points: ShapePointVec
struct TessellatedGPUSvgNode has destructor
vertex_index_buffer: VertexBuffer
constructor new:
arg node: TessellatedSvgNode
arg gl: GlContextPtr
Uploads the tesselated SVG node to GPU memory
fn draw:
&self
arg texture: &mut Texture
arg target_size: PhysicalSizeU32
arg color: ColorU
arg transforms: StyleTransformVec
-> bool
Draw the vertex buffer to the texture with the given color and transform
struct SvgStrokeStyle
start_cap: SvgLineCap
end_cap: SvgLineCap
line_join: SvgLineJoin
dash_pattern: OptionSvgDashPattern
line_width: f32
miter_limit: f32
tolerance: f32
apply_line_width: bool
transform: SvgTransform
anti_alias: bool
high_quality_aa: bool
struct TessellatedColoredGPUSvgNode has destructor
vertex_index_buffer: VertexBuffer
XML parsing / decoding module
mod xml:
struct Xml has destructor
root: XmlNodeChildVec
struct ParsedSvg
tree: c_void
run_destructor: bool
constructor from_string:
arg svg_string: String
arg parse_options: SvgParseOptions
constructor from_bytes:
arg svg_bytes: U8VecRef
arg parse_options: SvgParseOptions
Parses an SVG from a string
Parses an SVG from bytes
fn render:
&self
arg options: SvgRenderOptions
Renders the SVG to a raw image
Rust wrappers for
Instant/Durationclassesmod time:
union enum Instant
System(InstantPtr)
Tick(SystemTick)
fn duration_since:
&self
arg earlier: Instant
fn add_duration:
Returns the duration since and earlier instant or None if the earlier instant is later than self
Adds a duration to the current time instant, returning the new
InstantLinearly interpolates between [start, end] if the
selfInstant lies between start and end. Returns values between 0.0 and 1.0struct SystemTickDiff
tick_diff: u64
struct SystemTick
tick_counter: u64
union enum Duration
System(SystemTimeDiff)
Tick(SystemTickDiff)
struct SystemTimeDiff
secs: u64
nanos: u32
constructor from_secs:
arg secs: u64
constructor from_millis:
arg millis: u64
constructor from_nanos:
arg nanos: u64
Creates a duration from whole seconds.
Creates a duration from milliseconds.
Creates a duration from nanoseconds.
fn millis:
&self
-> u64
Returns the total duration in milliseconds.
struct InstantPtr
ptr: c_void
clone_fn: InstantPtrCloneCallback
destructor: InstantPtrDestructorCallback
run_destructor: bool
struct CssDuration
inner: u32
struct GetSystemTimeCallback
Definition of azuls internal
Stringwrappersmod str:
struct String has destructor
vec: U8Vec
constructor copy_from_bytes:
arg ptr: *const u8
arg start: usize
arg len: usize
-> String
constructor from_c_str:
arg ptr: *const i8
-> String
Creates a new String from a null-terminated C string (const char*). This copies the string data into a new allocation.
struct Refstr
ptr: c_void
len: usize
struct StringPair has destructor
key: String
value: String
struct StringSet has destructor
inner: String
Definition of azuls internal
Vec<*>wrappersmod vec:
Wrapper over a Rust-allocated
Vec<ListViewRow>struct ListViewRowVec has destructor
ptr: ListViewRow
len: usize
cap: usize
destructor: ListViewRowVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<StyleFilter>struct StyleFilterVec has destructor
ptr: StyleFilter
len: usize
cap: usize
destructor: StyleFilterVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<AccessibilityState>struct AccessibilityStateVec has destructor
ptr: AccessibilityState
len: usize
cap: usize
destructor: AccessibilityStateVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<MenuItem>struct MenuItemVec has destructor
ptr: MenuItem
len: usize
cap: usize
destructor: MenuItemVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<StyleFontFamily>struct StyleFontFamilyVec has destructor
ptr: StyleFontFamily
len: usize
cap: usize
destructor: StyleFontFamilyVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<Dom>struct DomVec has destructor
ptr: Dom
len: usize
cap: usize
destructor: DomVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<IdOrClass>struct IdOrClassVec has destructor
ptr: IdOrClass
len: usize
cap: usize
destructor: IdOrClassVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<NodeDataInlineCssProperty>struct NodeDataInlineCssPropertyVec has destructor
ptr: NodeDataInlineCssProperty
len: usize
cap: usize
destructor: NodeDataInlineCssPropertyVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<StyleBackgroundContent>struct StyleBackgroundContentVec has destructor
len: usize
cap: usize
destructor: StyleBackgroundContentVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<StyleBackgroundPosition>struct StyleBackgroundPositionVec has destructor
len: usize
cap: usize
destructor: StyleBackgroundPositionVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<StyleBackgroundRepeat>struct StyleBackgroundRepeatVec has destructor
len: usize
cap: usize
destructor: StyleBackgroundRepeatVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<StyleBackgroundSize>struct StyleBackgroundSizeVec has destructor
ptr: StyleBackgroundSize
len: usize
cap: usize
destructor: StyleBackgroundSizeVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<StyleTransform>struct StyleTransformVec has destructor
ptr: StyleTransform
len: usize
cap: usize
destructor: StyleTransformVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<SvgMultiPolygon>struct SvgMultiPolygonVec has destructor
ptr: SvgMultiPolygon
len: usize
cap: usize
destructor: SvgMultiPolygonVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<SvgSimpleNode>struct SvgSimpleNodeVec has destructor
ptr: SvgSimpleNode
len: usize
cap: usize
destructor: SvgSimpleNodeVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<TessellatedSvgNode>struct TessellatedSvgNodeVec has destructor
ptr: TessellatedSvgNode
len: usize
cap: usize
destructor: TessellatedSvgNodeVecDestructor
run_destructor: bool
fn as_ref_vec:
&self
Returns a reference to the underlying slice
Wrapper over a Rust-allocated
Vec<SvgPath>struct SvgPathVec has destructor
ptr: SvgPath
len: usize
cap: usize
destructor: SvgPathVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<SvgPathElement>struct SvgPathElementVec has destructor
ptr: SvgPathElement
len: usize
cap: usize
destructor: SvgPathElementVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<SvgVertex>struct SvgVertexVec has destructor
ptr: SvgVertex
len: usize
cap: usize
destructor: SvgVertexVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<u32>struct U32Vec has destructor
ptr: u32
len: usize
cap: usize
destructor: U32VecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<VirtualKeyCode>struct VirtualKeyCodeVec has destructor
ptr: VirtualKeyCode
len: usize
cap: usize
destructor: VirtualKeyCodeVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<CascadeInfo>struct CascadeInfoVec has destructor
ptr: CascadeInfo
len: usize
cap: usize
destructor: CascadeInfoVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<CssDeclaration>struct CssDeclarationVec has destructor
ptr: CssDeclaration
len: usize
cap: usize
destructor: CssDeclarationVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<CssPathSelector>struct CssPathSelectorVec has destructor
ptr: CssPathSelector
len: usize
cap: usize
destructor: CssPathSelectorVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<Stylesheet>struct StylesheetVec has destructor
ptr: Stylesheet
len: usize
cap: usize
destructor: StylesheetVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<CssRuleBlock>struct CssRuleBlockVec has destructor
ptr: CssRuleBlock
len: usize
cap: usize
destructor: CssRuleBlockVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<u16>struct U16Vec has destructor
ptr: u16
len: usize
cap: usize
destructor: U16VecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<f32>struct F32Vec has destructor
ptr: f32
len: usize
cap: usize
destructor: F32VecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<u8>struct U8Vec has destructor
ptr: u8
len: usize
cap: usize
destructor: U8VecDestructor
run_destructor: bool
constructor copy_from_bytes:
arg ptr: *const u8
arg start: usize
arg len: usize
-> U8Vec
Creates a new, heap-allocated U8Vec by copying the memory into Rust (heap allocation)
fn as_ref_vec:
&self
-> U8VecRef
Returns the
U8Vecas a non-owning slice, NOTE: TheU8Vecthat this slice was borrowed from MUST NOT be deleted before theU8VecRefWrapper over a Rust-allocated
Vec<GLuint>struct GLuintVec has destructor
ptr: GLuint
len: usize
cap: usize
destructor: GLuintVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<GLint>struct GLintVec has destructor
ptr: GLint
len: usize
cap: usize
destructor: GLintVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<String>struct StringVec has destructor
ptr: String
len: usize
cap: usize
destructor: StringVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<StringPair>struct StringPairVec has destructor
ptr: StringPair
len: usize
cap: usize
destructor: StringPairVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<NormalizedLinearColorStop>struct NormalizedLinearColorStopVec has destructor
ptr: NormalizedLinearColorStop
len: usize
cap: usize
destructor: NormalizedLinearColorStopVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<NormalizedRadialColorStop>struct NormalizedRadialColorStopVec has destructor
ptr: NormalizedRadialColorStop
len: usize
cap: usize
destructor: NormalizedRadialColorStopVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<NodeId>struct NodeIdVec has destructor
ptr: NodeHierarchyItemId
len: usize
cap: usize
destructor: NodeIdVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<NodeHierarchyItem>struct NodeHierarchyItemVec has destructor
ptr: NodeHierarchyItem
len: usize
cap: usize
destructor: NodeHierarchyItemVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<TagIdToNodeIdMapping>struct TagIdToNodeIdMappingVec has destructor
ptr: TagIdToNodeIdMapping
len: usize
cap: usize
destructor: TagIdToNodeIdMappingVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<ParentWithNodeDepth>struct ParentWithNodeDepthVec has destructor
ptr: ParentWithNodeDepth
len: usize
cap: usize
destructor: ParentWithNodeDepthVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<NodeData>struct NodeDataVec has destructor
ptr: NodeData
len: usize
cap: usize
destructor: NodeDataVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<Attribute>struct AttributeVec has destructor
ptr: AttributeType
len: usize
cap: usize
destructor: AttributeVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<CoreCallbackData>struct CoreCallbackDataVec has destructor
ptr: CoreCallbackData
len: usize
cap: usize
destructor: CoreCallbackDataVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<AccessibilityAction>struct AccessibilityActionVec has destructor
ptr: AccessibilityAction
len: usize
cap: usize
destructor: AccessibilityActionVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<XmlNodeChild>struct XmlNodeChildVec has destructor
ptr: XmlNodeChild
len: usize
cap: usize
destructor: XmlNodeChildVecDestructor
run_destructor: bool
Wrapper over a Rust-allocated
Vec<GridTrackSizing>struct GridTrackSizingVec has destructor
ptr: GridTrackSizing
len: usize
cap: usize
destructor: GridTrackSizingVecDestructor
run_destructor: bool
struct GLbooleanVecRefMut
ptr: c_void
len: usize
struct GLfloatVecRefMut
ptr: c_void
len: usize
struct U8VecRefMut
ptr: c_void
len: usize
struct TessellatedSvgNodeVecRef
ptr: c_void
len: usize
struct F32VecRef
ptr: c_void
len: usize
struct GLuintVecRef
ptr: c_void
len: usize
struct I32VecRef
ptr: c_void
len: usize
struct U8VecRef
ptr: c_void
len: usize
struct GLintVecRefMut
ptr: c_void
len: usize
struct GLenumVecRef
ptr: c_void
len: usize
struct GLint64VecRefMut
ptr: c_void
len: usize
union enum OptionU8VecRef
None
Some(U8VecRef)
fnptr StyleBackgroundContentVecDestructorType
arg *mut StyleBackgroundContentVec
union enum SvgPathVecDestructor
DefaultRust
NoDestructor
External(SvgPathVecDestructorType)
fnptr StyleBackgroundRepeatVecDestructorType
arg *mut StyleBackgroundRepeatVec
union enum StyleFilterVecDestructor
DefaultRust
NoDestructor
External(StyleFilterVecDestructorType)
union enum StyleTransformVecDestructor
DefaultRust
NoDestructor
External(StyleTransformVecDestructorType)
fnptr MenuItemVecDestructorType
arg *mut MenuItemVec
fnptr AccessibilityStateVecDestructorType
arg *mut AccessibilityStateVec
fnptr NodeDataInlineCssPropertyVecDestructorType
arg *mut NodeDataInlineCssPropertyVec
fnptr NormalizedLinearColorStopVecDestructorType
arg *mut NormalizedLinearColorStopVec
fnptr F32VecDestructorType
arg *mut F32Vec
union enum GLuintVecDestructor
DefaultRust
NoDestructor
External(GLuintVecDestructorType)
union enum XmlNodeChildVecDestructor
DefaultRust
NoDestructor
External(XmlNodeChildVecDestructorType)
fnptr StyleBackgroundSizeVecDestructorType
arg *mut StyleBackgroundSizeVec
union enum StyleBackgroundContentVecDestructor
DefaultRust
NoDestructor
External(StyleBackgroundContentVecDestructorType)
fnptr StringVecDestructorType
arg *mut StringVec
union enum CascadeInfoVecDestructor
DefaultRust
NoDestructor
External(CascadeInfoVecDestructorType)
fnptr DomVecDestructorType
arg *mut DomVec
union enum AccessibilityStateVecDestructor
DefaultRust
NoDestructor
External(AccessibilityStateVecDestructorType)
fnptr StringPairVecDestructorType
arg *mut StringPairVec
union enum DomVecDestructor
DefaultRust
NoDestructor
External(DomVecDestructorType)
union enum StringVecDestructor
DefaultRust
NoDestructor
External(StringVecDestructorType)
fnptr CssRuleBlockVecDestructorType
arg *mut CssRuleBlockVec
union enum NodeDataVecDestructor
DefaultRust
NoDestructor
External(NodeDataVecDestructorType)
union enum MenuItemVecDestructor
DefaultRust
NoDestructor
External(MenuItemVecDestructorType)
fnptr AttributeVecDestructorType
arg *mut AttributeVec
union enum SvgMultiPolygonVecDestructor
DefaultRust
NoDestructor
External(SvgMultiPolygonVecDestructorType)
union enum ListViewRowVecDestructor
DefaultRust
NoDestructor
External(ListViewRowVecDestructorType)
fnptr NodeIdVecDestructorType
arg *mut NodeIdVec
fnptr StyleFilterVecDestructorType
arg *mut StyleFilterVec
fnptr U32VecDestructorType
arg *mut U32Vec
union enum SvgVertexVecDestructor
DefaultRust
NoDestructor
External(SvgVertexVecDestructorType)
union enum StylesheetVecDestructor
DefaultRust
NoDestructor
External(StylesheetVecDestructorType)
union enum U32VecDestructor
DefaultRust
NoDestructor
External(U32VecDestructorType)
union enum CssRuleBlockVecDestructor
DefaultRust
NoDestructor
External(CssRuleBlockVecDestructorType)
fnptr ParentWithNodeDepthVecDestructorType
arg *mut ParentWithNodeDepthVec
union enum NormalizedLinearColorStopVecDestructor
DefaultRust
NoDestructor
fnptr CoreCallbackDataVecDestructorType
arg *mut CoreCallbackDataVec
union enum StyleFontFamilyVecDestructor
DefaultRust
NoDestructor
External(StyleFontFamilyVecDestructorType)
fnptr CascadeInfoVecDestructorType
arg *mut CascadeInfoVec
fnptr U8VecDestructorType
arg *mut U8Vec
fnptr NodeHierarchyItemVecDestructorType
arg *mut NodeHierarchyItemVec
union enum CssPathSelectorVecDestructor
DefaultRust
NoDestructor
External(CssPathSelectorVecDestructorType)
fnptr StyleBackgroundPositionVecDestructorType
arg *mut StyleBackgroundPositionVec
fnptr VirtualKeyCodeVecDestructorType
arg *mut VirtualKeyCodeVec
union enum NodeHierarchyItemVecDestructor
DefaultRust
NoDestructor
External(NodeHierarchyItemVecDestructorType)
union enum VirtualKeyCodeVecDestructor
DefaultRust
NoDestructor
External(VirtualKeyCodeVecDestructorType)
fnptr SvgVertexVecDestructorType
arg *mut SvgVertexVec
union enum F32VecDestructor
DefaultRust
NoDestructor
External(F32VecDestructorType)
fnptr SvgPathElementVecDestructorType
arg *mut SvgPathElementVec
union enum StyleBackgroundRepeatVecDestructor
DefaultRust
NoDestructor
External(StyleBackgroundRepeatVecDestructorType)
union enum AccessibilityActionVecDestructor
DefaultRust
NoDestructor
External(AccessibilityActionVecDestructorType)
fnptr ListViewRowVecDestructorType
arg *mut ListViewRowVec
fnptr GLuintVecDestructorType
arg *mut GLuintVec
fnptr StyleTransformVecDestructorType
arg *mut StyleTransformVec
fnptr TagIdToNodeIdMappingVecDestructorType
arg *mut TagIdToNodeIdMappingVec
union enum U16VecDestructor
DefaultRust
NoDestructor
External(U16VecDestructorType)
union enum TagIdToNodeIdMappingVecDestructor
DefaultRust
NoDestructor
External(TagIdToNodeIdMappingVecDestructorType)
union enum NodeIdVecDestructor
DefaultRust
NoDestructor
External(NodeIdVecDestructorType)
fnptr U16VecDestructorType
arg *mut U16Vec
fnptr SvgSimpleNodeVecDestructorType
arg *mut SvgSimpleNodeVec
fnptr TessellatedSvgNodeVecDestructorType
arg *mut TessellatedSvgNodeVec
fnptr GridTrackSizingVecDestructorType
arg *mut GridTrackSizingVec
fnptr CssDeclarationVecDestructorType
arg *mut CssDeclarationVec
union enum ParentWithNodeDepthVecDestructor
DefaultRust
NoDestructor
External(ParentWithNodeDepthVecDestructorType)
union enum GLintVecDestructor
DefaultRust
NoDestructor
External(GLintVecDestructorType)
union enum NodeDataInlineCssPropertyVecDestructor
DefaultRust
NoDestructor
fnptr NormalizedRadialColorStopVecDestructorType
arg *mut NormalizedRadialColorStopVec
union enum NormalizedRadialColorStopVecDestructor
DefaultRust
NoDestructor
union enum StyleBackgroundPositionVecDestructor
DefaultRust
NoDestructor
External(StyleBackgroundPositionVecDestructorType)
fnptr SvgMultiPolygonVecDestructorType
arg *mut SvgMultiPolygonVec
union enum SvgSimpleNodeVecDestructor
DefaultRust
NoDestructor
External(SvgSimpleNodeVecDestructorType)
union enum TessellatedSvgNodeVecDestructor
DefaultRust
NoDestructor
External(TessellatedSvgNodeVecDestructorType)
fnptr AccessibilityActionVecDestructorType
arg *mut AccessibilityActionVec
fnptr GLintVecDestructorType
arg *mut GLintVec
union enum AttributeVecDestructor
DefaultRust
NoDestructor
External(AttributeVecDestructorType)
fnptr NodeDataVecDestructorType
arg *mut NodeDataVec
union enum CssDeclarationVecDestructor
DefaultRust
NoDestructor
External(CssDeclarationVecDestructorType)
union enum IdOrClassVecDestructor
DefaultRust
NoDestructor
External(IdOrClassVecDestructorType)
union enum StyleBackgroundSizeVecDestructor
DefaultRust
NoDestructor
External(StyleBackgroundSizeVecDestructorType)
fnptr SvgPathVecDestructorType
arg *mut SvgPathVec
fnptr StyleFontFamilyVecDestructorType
arg *mut StyleFontFamilyVec
union enum StringPairVecDestructor
DefaultRust
NoDestructor
External(StringPairVecDestructorType)
union enum CoreCallbackDataVecDestructor
DefaultRust
NoDestructor
External(CoreCallbackDataVecDestructorType)
union enum SvgPathElementVecDestructor
DefaultRust
NoDestructor
External(SvgPathElementVecDestructorType)
union enum U8VecDestructor
DefaultRust
NoDestructor
External(U8VecDestructorType)
union enum GridTrackSizingVecDestructor
DefaultRust
NoDestructor
External(GridTrackSizingVecDestructorType)
fnptr IdOrClassVecDestructorType
arg *mut IdOrClassVec
fnptr XmlNodeChildVecDestructorType
arg *mut XmlNodeChildVec
fnptr StylesheetVecDestructorType
arg *mut StylesheetVec
fnptr CssPathSelectorVecDestructorType
arg *mut CssPathSelectorVec
fnptr VertexAttributeVecDestructorType
arg *mut VertexAttributeVec
union enum VertexAttributeVecDestructor
DefaultRust
NoDestructor
External(VertexAttributeVecDestructorType)
struct VertexAttributeVec has destructor
ptr: VertexAttribute
len: usize
cap: usize
destructor: VertexAttributeVecDestructor
run_destructor: bool
union enum DebugMessageVecDestructor
DefaultRust
NoDestructor
External(DebugMessageVecDestructorType)
fnptr DebugMessageVecDestructorType
arg *mut DebugMessageVec
struct DebugMessageVec has destructor
ptr: DebugMessage
len: usize
cap: usize
destructor: DebugMessageVecDestructor
run_destructor: bool
union enum ShapePointVecDestructor
DefaultRust
NoDestructor
External(ShapePointVecDestructorType)
fnptr ShapePointVecDestructorType
arg *mut ShapePointVec
struct ShapePointVec
ptr: ShapePoint
len: usize
cap: usize
destructor: ShapePointVecDestructor
run_destructor: bool
struct MonitorVec has destructor
ptr: Monitor
len: usize
cap: usize
destructor: MonitorVecDestructor
run_destructor: bool
fnptr VideoModeVecDestructorType
arg *mut VideoModeVec
fnptr ScanCodeVecDestructorType
arg *mut ScanCodeVec
struct VideoModeVec
ptr: VideoMode
len: usize
cap: usize
destructor: VideoModeVecDestructor
run_destructor: bool
struct XWindowTypeVec
ptr: XWindowType
len: usize
cap: usize
destructor: XWindowTypeVecDestructor
run_destructor: bool
union enum XWindowTypeVecDestructor
DefaultRust
NoDestructor
External(XWindowTypeVecDestructorType)
fnptr MonitorVecDestructorType
arg *mut MonitorVec
union enum MonitorVecDestructor
DefaultRust
NoDestructor
External(MonitorVecDestructorType)
union enum VideoModeVecDestructor
DefaultRust
NoDestructor
External(VideoModeVecDestructorType)
fnptr XWindowTypeVecDestructorType
arg *mut XWindowTypeVec
union enum ScanCodeVecDestructor
DefaultRust
NoDestructor
External(ScanCodeVecDestructorType)
struct ScanCodeVec
ptr: ScanCode
len: usize
cap: usize
destructor: ScanCodeVecDestructor
run_destructor: bool
union enum StyledNodeVecDestructor
DefaultRust
NoDestructor
External(StyledNodeVecDestructorType)
struct ContentGroupVec
ptr: ContentGroup
len: usize
cap: usize
destructor: ContentGroupVecDestructor
run_destructor: bool
struct StyledNodeVec
ptr: StyledNode
len: usize
cap: usize
destructor: StyledNodeVecDestructor
run_destructor: bool
fnptr ContentGroupVecDestructorType
arg *mut ContentGroupVec
union enum ContentGroupVecDestructor
DefaultRust
NoDestructor
External(ContentGroupVecDestructorType)
fnptr StyledNodeVecDestructorType
arg *mut StyledNodeVec
fnptr SelectionRangeVecDestructorType
arg *mut SelectionRangeVec
fnptr DomIdVecDestructorType
arg *mut DomIdVec
Wrapper over a Rust-allocated
Vec<DomId>struct DomIdVec has destructor
ptr: DomId
len: usize
cap: usize
destructor: DomIdVecDestructor
run_destructor: bool
union enum DomIdVecDestructor
DefaultRust
NoDestructor
External(DomIdVecDestructorType)
struct RefstrVecRef
ptr: c_void
len: usize
union enum TimerIdVecDestructor
DefaultRust
NoDestructor
External(TimerIdVecDestructorType)
Wrapper over a Rust-allocated
Vec<TimerId>struct TimerIdVec has destructor
ptr: TimerId
len: usize
cap: usize
destructor: TimerIdVecDestructor
run_destructor: bool
struct SelectionRangeVec
ptr: SelectionRange
len: usize
cap: usize
destructor: SelectionRangeVecDestructor
run_destructor: bool
fnptr TimerIdVecDestructorType
arg *mut TimerIdVec
union enum ThreadIdVecDestructor
DefaultRust
NoDestructor
External(ThreadIdVecDestructorType)
Wrapper over a Rust-allocated
Vec<ThreadId>struct ThreadIdVec has destructor
ptr: ThreadId
len: usize
cap: usize
destructor: ThreadIdVecDestructor
run_destructor: bool
union enum SelectionRangeVecDestructor
DefaultRust
NoDestructor
External(SelectionRangeVecDestructorType)
fnptr ThreadIdVecDestructorType
arg *mut ThreadIdVec
union enum StyledTextRunVecDestructor
DefaultRust
NoDestructor
External(StyledTextRunVecDestructorType)
fnptr StyledTextRunVecDestructorType
arg *mut StyledTextRunVec
struct StyledTextRunVec has destructor
ptr: StyledTextRun
len: usize
cap: usize
destructor: StyledTextRunVecDestructor
run_destructor: bool
fnptr SelectionVecDestructorType
arg *mut SelectionVec
struct SelectionVec
ptr: Selection
len: usize
cap: usize
destructor: SelectionVecDestructor
run_destructor: bool
union enum SelectionVecDestructor
DefaultRust
NoDestructor
External(SelectionVecDestructorType)
Definition of azuls internal
Option<*>wrappersmod option:
union enum OptionScrollState
None
Some(ScrollState)
union enum OptionSvgPoint
None
Some(SvgPoint)
union enum OptionListViewOnRowClick
None
Some(ListViewOnRowClick)
union enum OptionListViewOnColumnClick
None
Some(ListViewOnColumnClick)
union enum OptionListViewOnLazyLoadScroll
None
Some(ListViewOnLazyLoadScroll)
union enum OptionMenu has destructor
None
Some(Menu)
union enum OptionPixelValueNoPercent
None
Some(PixelValueNoPercent)
union enum OptionColorInputOnValueChange
None
Some(ColorInputOnValueChange)
union enum OptionButtonOnClick
None
Some(ButtonOnClick)
union enum OptionTabOnClick
None
Some(TabOnClick)
union enum OptionFileInputOnPathChange
None
Some(FileInputOnPathChange)
union enum OptionCheckBoxOnToggle
None
Some(CheckBoxOnToggle)
union enum OptionTextInputOnTextInput
None
Some(TextInputOnTextInput)
union enum OptionTextInputOnVirtualKeyDown
None
union enum OptionTextInputOnFocusLost
None
Some(TextInputOnFocusLost)
union enum OptionTextInputSelection
None
Some(TextInputSelection)
union enum OptionNumberInputOnFocusLost
None
Some(NumberInputOnFocusLost)
union enum OptionNumberInputOnValueChange
None
Some(NumberInputOnValueChange)
union enum OptionMenuItemIcon has destructor
None
Some(MenuItemIcon)
union enum OptionVirtualKeyCodeCombo has destructor
None
Some(VirtualKeyCodeCombo)
union enum OptionTimerId
None
Some(TimerId)
union enum OptionTimer
None
Some(Timer)
union enum OptionThread
None
Some(Thread)
union enum OptionI16
None
Some(i16)
union enum OptionU16
None
Some(u16)
union enum OptionU32
None
Some(u32)
union enum OptionImageRef has destructor
None
Some(ImageRef)
union enum OptionFontRef has destructor
None
Some(FontRef)
union enum OptionRefAny
None
Some(RefAny)
union enum OptionLayoutSize
None
Some(LayoutSize)
union enum OptionDomNodeId
None
Some(DomNodeId)
union enum OptionColorU
None
Some(ColorU)
union enum OptionRawImage has destructor
None
Some(RawImage)
union enum OptionTabIndex
None
Some(TabIndex)
union enum OptionTagId
None
Some(TagId)
union enum OptionDuration
None
Some(Duration)
union enum OptionUsize
None
Some(usize)
union enum OptionCoreMenuCallback
None
Some(CoreMenuCallback)
union enum OptionStyledDom has destructor
None
Some(StyledDom)
struct SvgParseOptions has destructor
relative_image_path: OptionString
dpi: f32
default_font_family: String
font_size: f32
languages: StringVec
shape_rendering: ShapeRendering
text_rendering: TextRendering
image_rendering: ImageRendering
keep_named_groups: bool
fontdb: FontDatabase
struct SvgRenderOptions
target_size: OptionLayoutSize
background_color: OptionColorU
fit: SvgFitTo
transform: SvgRenderTransform
union enum OptionLogicalPosition
None
Some(LogicalPosition)
union enum OptionString has destructor
None
Some(String)
union enum OptionF32
None
Some(f32)
union enum OptionWaylandTheme has destructor
None
Some(WaylandTheme)
union enum OptionMouseCursorType
None
Some(MouseCursorType)
union enum OptionWindowIcon has destructor
None
Some(WindowIcon)
union enum OptionCallback
None
Some(Callback)
union enum OptionTaskBarIcon has destructor
None
Some(TaskBarIcon)
union enum OptionHwndHandle
None
Some(HwndHandle)
union enum OptionLinuxDecorationsState
None
Some(LinuxDecorationsState)
union enum OptionI32
None
Some(i32)
union enum OptionLogicalSize
None
Some(LogicalSize)
union enum OptionLogicalRect
None
Some(LogicalRect)
union enum OptionVirtualKeyCode
None
Some(VirtualKeyCode)
union enum OptionX11Visual
None
Some(X11Visual)
union enum OptionRendererOptions
None
Some(RendererOptions)
union enum OptionWindowTheme
None
Some(WindowTheme)
union enum OptionInstant
None
Some(Instant)
union enum OptionAccessibilityRole
None
Some(AccessibilityRole)
union enum OptionThreadReceiveMsg
None
Some(ThreadReceiveMsg)
union enum OptionGlContextPtr has destructor
None
Some(GlContextPtr)
union enum OptionSvgDashPattern
None
Some(SvgDashPattern)
union enum OptionSelectionRange
None
Some(SelectionRange)
union enum OptionKeyboardState has destructor
None
Some(KeyboardState)
union enum OptionMouseState
None
Some(MouseState)
union enum OptionSelectionState
None
Some(SelectionState)
union enum OptionThreadSendMsg
None
Some(ThreadSendMsg)
union enum OptionCssProperty
None
Some(CssProperty)
union enum OptionTextCursor
None
Some(TextCursor)
union enum OptionU64
None
Some(u64)
union enum OptionWindowFlags
None
Some(WindowFlags)
union enum OptionCoreImageCallback
None
Some(CoreImageCallback)
union enum OptionPenTilt
None
Some(PenTilt)
union enum OptionSelectAllResult has destructor
None
Some(SelectAllResult)
union enum OptionDeleteResult has destructor
None
Some(DeleteResult)
union enum OptionDragState has destructor
None
Some(DragState)
union enum OptionPenState
None
Some(PenState)
union enum OptionUndoableOperation has destructor
None
Some(UndoableOperation)
union enum OptionClipboardContent has destructor
None
Some(ClipboardContent)
Definition of error and
Result<T, E>typesmod error:
union enum ResultXmlXmlError has destructor
Ok(Xml)
Err(XmlError)
union enum ResultSvgSvgParseError has destructor
Ok(Svg)
Err(SvgParseError)
union enum SvgParseError has destructor
NoParserAvailable
ElementsLimitReached
NotAnUtf8Str
MalformedGZip
InvalidSize
ParsingFailed(XmlError)
union enum XmlError has destructor
NoParserAvailable
InvalidXmlPrefixUri(XmlTextPos)
UnexpectedXmlUri(XmlTextPos)
UnexpectedXmlnsUri(XmlTextPos)
InvalidElementNamePrefix(XmlTextPos)
DuplicatedNamespace(DuplicatedNamespaceError)
UnknownNamespace(UnknownNamespaceError)
UnexpectedCloseTag(UnexpectedCloseTagError)
UnexpectedEntityCloseTag(XmlTextPos)
UnknownEntityReference(UnknownEntityReferenceError)
MalformedEntityReference(XmlTextPos)
EntityReferenceLoop(XmlTextPos)
InvalidAttributeValue(XmlTextPos)
DuplicatedAttribute(DuplicatedAttributeError)
NoRootNode
SizeLimit
DtdDetected
Invalid hierarchy close tags, i.e
<app></p></app>MalformedHierarchy(MalformedHierarchyError)
ParserError(XmlParseError)
UnclosedRootNode
UnexpectedDeclaration(XmlTextPos)
NodesLimitReached
AttributesLimitReached
NamespacesLimitReached
InvalidName(XmlTextPos)
NonXmlChar(XmlTextPos)
InvalidChar(XmlTextPos)
InvalidChar2(XmlTextPos)
InvalidString(XmlTextPos)
InvalidExternalID(XmlTextPos)
InvalidComment(XmlTextPos)
InvalidCharacterData(XmlTextPos)
UnknownToken(XmlTextPos)
UnexpectedEndOfStream
struct DuplicatedNamespaceError has destructor
ns: String
pos: XmlTextPos
struct UnknownNamespaceError has destructor
ns: String
pos: XmlTextPos
struct UnexpectedCloseTagError has destructor
expected: String
actual: String
pos: XmlTextPos
struct UnknownEntityReferenceError has destructor
entity: String
pos: XmlTextPos
struct DuplicatedAttributeError has destructor
attribute: String
pos: XmlTextPos
union enum XmlParseError has destructor
InvalidDeclaration(XmlTextError)
InvalidComment(XmlTextError)
InvalidPI(XmlTextError)
InvalidDoctype(XmlTextError)
InvalidEntity(XmlTextError)
InvalidElement(XmlTextError)
InvalidAttribute(XmlTextError)
InvalidCdata(XmlTextError)
InvalidCharData(XmlTextError)
UnknownToken(XmlTextPos)
struct XmlTextError has destructor
stream_error: XmlStreamError
pos: XmlTextPos
union enum XmlStreamError has destructor
UnexpectedEndOfStream
InvalidName
NonXmlChar(NonXmlCharError)
InvalidChar(InvalidCharError)
InvalidCharMultiple(InvalidCharMultipleError)
InvalidQuote(InvalidQuoteError)
InvalidSpace(InvalidSpaceError)
InvalidString(InvalidStringError)
InvalidReference
InvalidExternalID
InvalidCommentData
InvalidCommentEnd
InvalidCharacterData
struct NonXmlCharError
ch: u32
pos: XmlTextPos
struct InvalidCharError
expected: u8
got: u8
pos: XmlTextPos
struct InvalidCharMultipleError has destructor
expected: u8
got: U8Vec
pos: XmlTextPos
struct InvalidQuoteError
got: u8
pos: XmlTextPos
struct InvalidSpaceError
got: u8
pos: XmlTextPos
struct InvalidStringError has destructor
got: String
pos: XmlTextPos
struct MalformedHierarchyError has destructor
expected: String
got: String
enum EncodeImageError
EncoderNotAvailable
InsufficientMemory
DimensionError
InvalidData
Unknown
union enum ResultRawImageDecodeImageError has destructor
Ok(RawImage)
Err(DecodeImageError)
enum DecodeImageError
InsufficientMemory
DimensionError
UnsupportedImageFormat
Unknown
union enum ResultU8VecEncodeImageError has destructor
Ok(U8Vec)
Err(EncodeImageError)
union enum ResultU8VecString has destructor
Ok(U8Vec)
Err(String)
union enum ResultVoidString has destructor
Ok
Err(String)
union enum ResultStringString has destructor
Ok(String)
Err(String)
union enum ResultParsedSvgSvgParseError has destructor
Ok(ParsedSvg)
Err(SvgParseError)
struct SelectAllResult has destructor
full_text: String
selection_range: SelectionRange
struct DeleteResult has destructor
range_to_delete: SelectionRange
deleted_text: String
mod app:
struct AppConfig
log_level: AppLogLevel
enable_visual_panic_hook: bool
enable_logging_on_panic: bool
enable_tab_navigation: bool
termination_behavior: AppTerminationBehavior
struct App
ptr: c_void
run_destructor: bool
fn add_window:
&mut self
arg create_options: WindowCreateOptions
fn get_monitors:
&self
-> MonitorVec
fn run:
&self
arg root_window: WindowCreateOptions
enum AppTerminationBehavior
ReturnToMain
RunForever
EndProcess
enum AppLogLevel
Off
Error
Warn
Info
Debug
Trace
enum RendererType
Hardware
Software
struct RendererOptions
vsync: Vsync
srgb: Srgb
hw_accel: HwAcceleration
mod task:
union enum ThreadSendMsg
TerminateThread
Tick
Custom(RefAny)
struct ThreadSender
ptr: c_void
run_destructor: bool
ctx: OptionRefAny
fn send:
&mut self
arg msg: ThreadReceiveMsg
-> bool
Sends a message from the background thread to the main thread
struct ThreadReceiver
ptr: c_void
run_destructor: bool
ctx: OptionRefAny
fn recv:
&mut self
Receives a message from the main thread, if available
struct Timer
refany: RefAny
node_id: OptionDomNodeId
created: Instant
last_run: OptionInstant
run_count: usize
delay: OptionDuration
interval: OptionDuration
timeout: OptionDuration
callback: TimerCallback
constructor create:
arg refany: RefAny
arg callback: TimerCallback
arg get_system_time_fn: GetSystemTimeCallback
-> Timer
fn tick_millis:
&self
-> u64
&self
-> Instant
fn with_delay:
fn with_interval:
fn with_timeout:
&self
arg instant_now: Instant
-> bool
fn invoke:
&mut self
arg callback_info: CallbackInfo
arg get_system_time_fn: GetSystemTimeCallback
Invoke the timer callback and update internal state
struct ThreadInner
thread_handle: c_void
sender: c_void
receiver: c_void
dropcheck: c_void
writeback_data: RefAny
check_thread_finished_fn: CheckThreadFinishedCallback
send_thread_msg_fn: LibrarySendThreadMsgCallback
receive_thread_msg_fn: LibraryReceiveThreadMsgCallback
thread_destructor_fn: ThreadDestructorCallback
enum TerminateTimer
Terminate
Continue
struct TimerId
id: usize
struct Thread
ptr: c_void
run_destructor: bool
constructor create:
arg thread_initialize_data: RefAny
arg writeback_data: RefAny
arg callback: ThreadCallback
-> Thread
Creates a new thread that will execute the given callback function.
# Arguments *thread_initialize_data- Data passed to the callback when the thread starts *writeback_data- Data that will be passed back when writeback messages are received *callback- The function to execute in the background threadstruct ThreadId
id: usize
struct ThreadWriteBackMsg
refany: RefAny
callback: WriteBackCallback
constructor new:
arg callback: WriteBackCallback
arg data: RefAny
Creates a new ThreadWriteBackMsg with the given callback and data
union enum ThreadReceiveMsg
WriteBack(ThreadWriteBackMsg)
Update(Update)