Azul API docs for version 1.0.0-alpha1
Appconstruction and configurationmod app:
Version of the layout solver to use - future binary versions of azul may have more fields here, necessary so that old compiled applications don't break with newer releases of azul. Newer layout versions are opt-in only.
enum LayoutSolverVersion
Default, current layout solver version
Default
Configuration for optional features, such as whether to enable logging or panic hooks
struct AppConfig
If enabled, logs error and info messages. Default is
LevelFilter::Errorto log all errors by defaultlog_level: AppLogLevel
If the app crashes / panics, a window with a message box pops up. Setting this to
falsedisables the popup box.enable_visual_panic_hook: bool
If this is set to
true(the default), a backtrace + error information gets logged to stdout and the logging file (only if logging is enabled).enable_logging_on_panic: bool
(STUB) Whether keyboard navigation should be enabled (default: true). Currently not implemented.
enable_tab_navigation: bool
termination_behavior: AppTerminationBehavior
constructor new:
arg layout_solver: LayoutSolverVersion
-> AppConfig
Constructs a default
AppConfig, uses the layout solver currently availableConfiguration to set which messages should be logged.
enum AppLogLevel
Off
Error
Warn
Info
Debug
Trace
Main application class
struct AzAppPtr has destructor
ptr: *const c_void
run_destructor: bool
constructor new:
Creates a new App instance from the given
AppConfigfn add_window:
&mut self
arg window: WindowCreateOptions
arg doc: New window, note that this will **not** be spawned as the root window
fn add_image:
fn get_monitors:
&self
List of currently attached monitors, note that this
Vecwill be empty on wasm32-> MonitorVec
fn run:
&self
arg window: WindowCreateOptions
arg doc: Initial state of the root (main) window of the application
Spawn a new window on the screen when the app is run.
Adds a new image identified by an ID to the image cache
Returns a list of monitors - useful for setting the monitor that a window should spawn on.
Runs the application. Due to platform restrictions (specifically
WinMainon Windows), this function never returns.External system callbacks to get the system time or create / manage threads
struct ExternalSystemCallbacks
create_thread_fn: CreateThreadCallback
get_system_time_fn: GetSystemTimeCallback
constructor library_internal:
Use the default, library-internal callbacks instead of providing your own
Window creation / startup configuration
mod window:
Options on how to initially create the window
struct WindowCreateOptions has destructor
state: WindowState
size_to_content: bool
renderer: OptionRendererOptions
theme: OptionWindowTheme
create_callback: OptionCallback
hot_reload: bool
constructor new:
arg layout_callback: LayoutCallbackType
arg doc: The callback to call when the UI of the window should be rendered
Creates a new window configuration with a custom layout callback
Force a specific renderer: note that azul will crash on startup if the
RendererOptionsare not satisfied.struct RendererOptions
vsync: Vsync
srgb: Srgb
hw_accel: HwAcceleration
Whether the renderer has VSync enabled
enum Vsync
Enabled
Disabled
DontCare
Does the renderer render in SRGB color space? By default, azul tries to set it to
Enabledand falls back toDisabledif the OpenGL context can't be initialized properlyenum Srgb
Enabled
Disabled
DontCare
Does the renderer render using hardware acceleration? By default, azul tries to set it to
Enabledand falls back toDisabledif the OpenGL context can't be initialized properlyenum HwAcceleration
Enabled
Disabled
DontCare
Offset in physical pixels (integer units)
struct LayoutPoint
x: isize
y: isize
Size in physical pixels (integer units)
struct LayoutSize
width: isize
height: isize
Represents a rectangle in physical pixels (integer units)
struct LayoutRect
origin: LayoutPoint
size: LayoutSize
Raw platform handle, for integration in / with other toolkits and custom non-azul window extensions
union enum RawWindowHandle
IOS(IOSHandle)
MacOS(MacOSHandle)
Xlib(XlibHandle)
Xcb(XcbHandle)
Wayland(WaylandHandle)
Windows(WindowsHandle)
Web(WebHandle)
Android(AndroidHandle)
Unsupported
struct IOSHandle
ui_window: *mut c_void
ui_view: *mut c_void
ui_view_controller: *mut c_void
struct MacOSHandle
ns_window: *mut c_void
ns_view: *mut c_void
struct XlibHandle
An Xlib Window
window: u64
display: *mut c_void
struct XcbHandle
An X11 xcb_window_t.
window: u32
A pointer to an X server xcb_connection_t.
connection: *mut c_void
struct WaylandHandle
A pointer to a wl_surface
surface: *mut c_void
A pointer to a wl_display.
display: *mut c_void
struct WindowsHandle
A Win32 HWND handle.
hwnd: *mut c_void
The HINSTANCE associated with this type's HWND.
hinstance: *mut c_void
struct WebHandle
An ID value inserted into the data attributes of the canvas element as 'raw-handle' When accessing from JS, the attribute will automatically be called rawHandle. Each canvas created by the windowing system should be assigned their own unique ID. 0 should be reserved for invalid / null IDs.
id: u32
struct AndroidHandle
A pointer to an ANativeWindow.
a_native_window: *mut c_void
X window type. Maps directly to [
_NET_WM_WINDOW_TYPE](https://specifications.freedesktop.org/wm-spec/wm-spec-1.5.html).enum XWindowType
A desktop feature. This can include a single window containing desktop icons with the same dimensions as the screen, allowing the desktop environment to have full control of the desktop, without the need for proxying root window clicks.
Desktop
A dock or panel feature. Typically a Window Manager would keep such windows on top of all other windows.
Dock
Toolbar windows. "Torn off" from the main application.
Toolbar
Pinnable menu windows. "Torn off" from the main application.
Menu
A small persistent utility window, such as a palette or toolbox.
Utility
The window is a splash screen displayed as an application is starting up.
Splash
This is a dialog window.
Dialog
A dropdown menu that usually appears when the user clicks on an item in a menu bar. This property is typically used on override-redirect windows.
DropdownMenu
A popup menu that usually appears when the user right clicks on an object. This property is typically used on override-redirect windows.
PopupMenu
A tooltip window. Usually used to show additional information when hovering over an object with the cursor. This property is typically used on override-redirect windows.
Tooltip
The window is a notification. This property is typically used on override-redirect windows.
Notification
This should be used on the windows that are popped up by combo boxes. This property is typically used on override-redirect windows.
Combo
This indicates the the window is being dragged. This property is typically used on override-redirect windows.
Dnd
This is a normal, top-level window.
Normal
Same as
LayoutPoint, but usesi32instead ofisizestruct PhysicalPositionI32
x: i32
y: i32
Same as
LayoutPoint, but usesu32instead ofisizestruct PhysicalSizeU32
width: u32
height: u32
Logical rectangle area (can differ based on HiDPI settings). Usually this is what you'd want for hit-testing and positioning elements.
struct LogicalRect
origin: LogicalPosition
size: LogicalSize
Logical position (can differ based on HiDPI settings). Usually this is what you'd want for hit-testing and positioning elements.
struct LogicalPosition
x: f32
y: f32
A size in "logical" (non-HiDPI-adjusted) pixels in floating-point units
struct LogicalSize
width: f32
height: f32
fn to_physical:
&self
arg hidpi_factor: f32
Unique hash of a window icon, so that azul does not have to compare the actual bytes to see wether the window icon has changed.
struct IconKey
id: usize
16x16x4 bytes icon
struct SmallWindowIconBytes
key: IconKey
rgba_bytes: U8Vec
16x16x4 bytes icon
struct LargeWindowIconBytes
key: IconKey
rgba_bytes: U8Vec
Window "favicon", usually shown in the top left of the window on Windows
union enum WindowIcon
Small(SmallWindowIconBytes)
32x32x4 bytes icon
Large(LargeWindowIconBytes)
256x256x4 bytes window icon
struct TaskBarIcon
key: IconKey
rgba_bytes: U8Vec
Symbolic name for a keyboard key, does NOT take the keyboard locale into account
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
Utility function for easier creation of a keymap - i.e.
[vec![Ctrl, S], my_function]union enum AcceleratorKey
Ctrl
Alt
Shift
Key(VirtualKeyCode)
Minimum / maximum / current size of the window in logical dimensions
struct WindowSize
Width and height of the window, in logical units (may not correspond to the physical on-screen size)
dimensions: LogicalSize
Actual DPI value (default: 96)
dpi: u32
Minimum dimensions of the window
min_dimensions: OptionLogicalSize
Maximum dimensions of the window
max_dimensions: OptionLogicalSize
fn get_hidpi_factor:
&self
-> f32
Returns the hidpi factor of the bounds
Boolean flags relating to the current window state
struct WindowFlags
Is the window currently maximized, minimized or fullscreen
frame: WindowFrame
User clicked the close button (set by WindowDelegate, checked by event loop) The close_callback can set this to false to prevent closing
close_requested: bool
Window decoration style (title bar, native controls)
decorations: WindowDecorations
Is the window currently visible?
is_visible: bool
Is the window always on top?
is_always_on_top: bool
Whether the window is resizable
is_resizable: bool
Whether the window has focus or not (mutating this will request user attention)
has_focus: bool
Compositor blur/transparency effect material
background_material: WindowBackgroundMaterial
Is smooth scrolling enabled for this window?
smooth_scroll_enabled: bool
Is automatic TAB switching supported?
autotab_enabled: bool
Window type classification (Normal, Menu, Tooltip, Dialog)
window_type: WindowType
Enable client-side decorations (custom titlebar with CSD) Only effective when decorations == WindowDecorations::None
has_decorations: bool
Use native menus (Win32 HMENU, macOS NSMenu) instead of Azul window-based menus Default: true on Windows/macOS, false on Linux
use_native_menus: bool
Use native context menus instead of Azul window-based context menus Default: true on Windows/macOS, false on Linux
use_native_context_menus: bool
Keep window above all others (even from other applications) Platform-specific: Uses SetWindowPos(HWND_TOPMOST) on Windows, [NSWindow setLevel:] on macOS, _NET_WM_STATE_ABOVE on X11, zwlr_layer_shell on Wayland
is_top_level: bool
Prevent system from sleeping while window is open Platform-specific: Uses SetThreadExecutionState on Windows, IOPMAssertionCreateWithName on macOS, org.freedesktop.ScreenSaver.Inhibit on Linux
prevent_system_sleep: bool
State of the window frame (minimized, maximized, fullscreen or normal window)
enum WindowFrame
Normal
Minimized
Maximized
Fullscreen
Toggles webrender debug flags (will make stuff appear on the screen that you might not want to - used for debugging purposes)
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
Determines which keys are pressed currently (modifiers, etc.)
struct KeyboardState has destructor
Currently pressed virtual keycode - DO NOT USE THIS FOR TEXT INPUT. For text input, use the
text_inputparameter in callbacks. For example enteringàwill fire aVirtualKeyCode::Grave, thenVirtualKeyCode::A, so to correctly combine characters, the framework handles text composition internally.current_virtual_keycode: OptionVirtualKeyCode
Currently pressed virtual keycodes (READONLY) - it can happen that more than one key is pressed This is essentially an "extension" of
current_scancodes-current_keysstores the characters, but what if the pressed key is not a character (such asArrowRightorPgUp)? Note that this can have an overlap, so pressing "a" on the keyboard will insert both aVirtualKeyCode::Aintocurrent_virtual_keycodesand text input will be handled by the framework automatically for contenteditable nodes.pressed_virtual_keycodes: VirtualKeyCodeVec
Same as
current_virtual_keycodes, but the scancode identifies the physical key pressed, independent of the keyboard layout. The scancode does not change if the user adjusts the host's keyboard map. Use when the physical location of the key is more important than the key's host GUI semantics, such as for movement controls in a first-person game (German keyboard: Z key, UK keyboard: Y key, etc.)pressed_scancodes: ScanCodeVec
fn shift_down:
&self
-> bool
fn ctrl_down:
&self
-> bool
fn alt_down:
&self
-> bool
fn super_down:
&self
-> bool
fn is_key_down:
&self
arg key: VirtualKeyCode
-> bool
Returns if the
SHIFTkey is held down (left OR right shift)Returns if the
CTRLkey is held downReturns if the
ALTkey is held downReturns if the
SUPER("Windows") key is held downReturns if a key is held down
Current icon of the mouse cursor
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
Current position of the mouse cursor, relative to the window. Set to
Uninitializedon startup (gets initialized on the first frame).union enum CursorPosition
OutOfWindow(LogicalPosition)
Uninitialized
InWindow(LogicalPosition)
fn get_position:
&self
Mouse position, cursor type, user scroll input, etc.
struct MouseState
Current mouse cursor type, set to
Noneif the cursor is hidden. (READWRITE)mouse_cursor_type: OptionMouseCursorType
Where is the mouse cursor currently? Set to
Noneif the window is not focused. (READWRITE)cursor_position: CursorPosition
Is the mouse cursor locked to the current window (important for applications like games)? (READWRITE)
is_cursor_locked: bool
Is the left mouse button down? (READONLY)
left_down: bool
Is the right mouse button down? (READONLY)
right_down: bool
Is the middle mouse button down? (READONLY)
middle_down: bool
Platform-specific window configuration, i.e. WM options that are not cross-platform
struct PlatformSpecificOptions has destructor
windows_options: WindowsWindowOptions
linux_options: LinuxWindowOptions
mac_options: MacWindowOptions
wasm_options: WasmWindowOptions
Window configuration specific to Win32
struct WindowsWindowOptions
STARTUP ONLY: Whether the window should allow drag + drop operations (default: true)
allow_drag_and_drop: bool
STARTUP ONLY: Sets
WS_EX_NOREDIRECTIONBITMAPno_redirection_bitmap: bool
STARTUP ONLY: Window icon (decoded bytes), appears at the top right corner of the window
window_icon: OptionWindowIcon
READWRITE: Taskbar icon (decoded bytes), usually 256x256x4 bytes large (
ICON_BIG). Can be changed in callbacks / at runtime.taskbar_icon: OptionTaskBarIcon
STARTUP ONLY: Pointer (casted to void pointer) to a HWND handle
parent_window: OptionHwndHandle
CSD theme of the window title / button controls
struct WaylandTheme
title_bar_active_background_color: [u8;4]
title_bar_active_separator_color: [u8;4]
title_bar_active_text_color: [u8;4]
title_bar_inactive_background_color: [u8;4]
title_bar_inactive_separator_color: [u8;4]
title_bar_inactive_text_color: [u8;4]
maximize_idle_foreground_inactive_color: [u8;4]
minimize_idle_foreground_inactive_color: [u8;4]
close_idle_foreground_inactive_color: [u8;4]
maximize_hovered_foreground_inactive_color: [u8;4]
minimize_hovered_foreground_inactive_color: [u8;4]
close_hovered_foreground_inactive_color: [u8;4]
maximize_disabled_foreground_inactive_color: [u8;4]
minimize_disabled_foreground_inactive_color: [u8;4]
close_disabled_foreground_inactive_color: [u8;4]
maximize_idle_background_inactive_color: [u8;4]
minimize_idle_background_inactive_color: [u8;4]
close_idle_background_inactive_color: [u8;4]
maximize_hovered_background_inactive_color: [u8;4]
minimize_hovered_background_inactive_color: [u8;4]
close_hovered_background_inactive_color: [u8;4]
maximize_disabled_background_inactive_color: [u8;4]
minimize_disabled_background_inactive_color: [u8;4]
close_disabled_background_inactive_color: [u8;4]
maximize_idle_foreground_active_color: [u8;4]
minimize_idle_foreground_active_color: [u8;4]
close_idle_foreground_active_color: [u8;4]
maximize_hovered_foreground_active_color: [u8;4]
minimize_hovered_foreground_active_color: [u8;4]
close_hovered_foreground_active_color: [u8;4]
maximize_disabled_foreground_active_color: [u8;4]
minimize_disabled_foreground_active_color: [u8;4]
close_disabled_foreground_active_color: [u8;4]
maximize_idle_background_active_color: [u8;4]
minimize_idle_background_active_color: [u8;4]
close_idle_background_active_color: [u8;4]
maximize_hovered_background_active_color: [u8;4]
minimize_hovered_background_active_color: [u8;4]
close_hovered_background_active_color: [u8;4]
maximize_disabled_background_active_color: [u8;4]
minimize_disabled_background_active_color: [u8;4]
close_disabled_background_active_color: [u8;4]
title_bar_font: AzString
title_bar_font_size: f32
Renderer type of the current windows OpenGL context
enum RendererType
Force hardware rendering
Hardware
Force software rendering
Software
struct WindowState has destructor
title: AzString
theme: WindowTheme
size: WindowSize
position: WindowPosition
flags: WindowFlags
debug_state: DebugState
keyboard_state: KeyboardState
mouse_state: MouseState
touch_state: TouchState
ime_position: ImePosition
monitor: Monitor
platform_specific_options: PlatformSpecificOptions
renderer_options: RendererOptions
background_color: ColorU
layout_callback: LayoutCallback
close_callback: OptionCallback
constructor new:
arg layout_callback: LayoutCallbackType
-> WindowState
constructor default:
-> WindowState
Creates a new WindowState with default settings and a custom layout callback
Creates a default WindowState with an empty layout callback - useful only if you use the Rust
WindowState { .. WindowState::default() }intialization syntax.struct LinuxWindowOptions has destructor
(Unimplemented) - Can only be set at window creation, can't be changed in callbacks.
x11_visual: OptionX11Visual
(Unimplemented) - Can only be set at window creation, can't be changed in callbacks.
x11_screen: OptionI32
Build window with
WM_CLASShint; defaults to the name of the binary. Only relevant on X11. Can only be set at window creation, can't be changed in callbacks.x11_wm_classes: StringPairVec
Build window with override-redirect flag; defaults to false. Only relevant on X11. Can only be set at window creation, can't be changed in callbacks.
x11_override_redirect: bool
Build window with
_NET_WM_WINDOW_TYPEhint; defaults toNormal. Only relevant on X11. Can only be set at window creation, can't be changed in callbacks.x11_window_types: XWindowTypeVec
Build window with
_GTK_THEME_VARIANThint set to the specified value. Currently only relevant on X11. Can only be set at window creation, can't be changed in callbacks.x11_gtk_theme_variant: OptionAzString
Build window with resize increment hint. Only implemented on X11. Can only be set at window creation, can't be changed in callbacks.
x11_resize_increments: OptionLogicalSize
Build window with base size hint. Only implemented on X11. Can only be set at window creation, can't be changed in callbacks.
x11_base_size: OptionLogicalSize
Build window with a given application ID. It should match the
.desktopfile distributed with your program. Only relevant on Wayland. Can only be set at window creation, can't be changed in callbacks. For details about application ID conventions, see the [Desktop Entry Spec](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#desktop-file-id)wayland_app_id: OptionAzString
wayland_theme: OptionWaylandTheme
request_user_attention: UserAttentionType
window_icon: OptionWindowIcon
X11-specific: Client-side decoration state (drag position, button hover, etc.)
x11_decorations_state: OptionLinuxDecorationsState
struct MacWindowOptions
_reserved: u8
struct WasmWindowOptions
_reserved: u8
enum FullScreenMode
- macOS: If the window is in windowed mode, transitions it slowly to fullscreen mode - other: Does the same as
FastFullScreen.SlowFullScreen
Window should immediately go into fullscreen mode (on macOS this is not the default behaviour).
FastFullScreen
- macOS: If the window is in fullscreen mode, transitions slowly back to windowed state. - other: Does the same as
FastWindowed.SlowWindowed
If the window is in fullscreen mode, will immediately go back to windowed mode (on macOS this is not the default behaviour).
FastWindowed
State, size, etc of the window, for comparing to the last frame
enum WindowTheme
DarkMode
LightMode
Position of the top left corner of the window relative to the top left of the monitor
union enum WindowPosition
Uninitialized
Initialized(PhysicalPositionI32)
IME composition window rectangle (cursor position + height)
union enum ImePosition
Uninitialized
Initialized(LogicalRect)
Current state of touch devices / touch inputs
struct TouchState
Number of active touch points
num_touches: usize
Complete information about a monitor/display
struct Monitor has destructor
Unique identifier for this monitor (stable across frames)
id: MonitorId
Human-readable name (e.g., "\\.\DISPLAY1", "HDMI-1", "Built-in Retina Display")
name: OptionAzString
Physical size of the monitor in logical pixels
size: LayoutSize
Position of the monitor in the virtual screen coordinate system
position: LayoutPoint
DPI scale factor (1.0 = 96 DPI, 2.0 = 192 DPI for Retina)
scale_factor: f64
Work area (monitor bounds minus taskbars/panels) in logical pixels
work_area: LayoutRect
Available video modes for this monitor
video_modes: VideoModeVec
Whether this is the primary/main monitor
is_primary_monitor: bool
Describes a rendering configuration for a monitor
struct VideoMode
size: LayoutSize
bit_depth: u16
refresh_rate: u16
struct AzStringPair
key: AzString
value: AzString
struct SystemCallbacks
create_thread: *const c_void
get_system_time: *const c_void
enum UserAttentionType
None
Critical
Informational
Window decoration style
enum WindowDecorations
Full decorations: title bar with controls
Normal
No title text but controls visible (extended frame)
NoTitle
No controls visible but title bar area present
NoControls
No decorations at all (borderless)
None
Compositor blur/transparency effects for window background
enum WindowBackgroundMaterial
No transparency or blur
Opaque
Transparent without blur
Transparent
macOS: Sidebar material, Windows: Acrylic light
Sidebar
macOS: Menu material, Windows: Acrylic
Menu
macOS: HUD material, Windows: Acrylic dark
HUD
macOS: Titlebar material, Windows: Mica
Titlebar
Windows: Mica Alt material
MicaAlt
Identifies a specific monitor/display Contains both an index (for fast current-session lookup) and a stable hash (for persistence across app restarts and monitor reconfigurations). -
index: Runtime index (0-based), may change if monitors are added/removed -hash: Stable identifier based on monitor properties (name, size, position) Applications can serializehashto remember which monitor a window was on, then search for matching hash on next launch, falling back to index or PRIMARY.struct MonitorId
Runtime index of the monitor (may change between sessions)
index: usize
Stable hash of monitor properties (for persistence)
hash: u64
Window type classification for behavior control
enum WindowType
Normal application window
Normal
Menu popup window (always-on-top, frameless, auto-closes on focus loss)
Menu
Tooltip window (always-on-top, no interaction)
Tooltip
Dialog window (blocks parent window)
Dialog
Callback type definitions + struct definitions of
CallbackInfosmod callbacks:
union enum LayoutCallback has destructor
Raw(LayoutCallbackInner)
Marshaled(MarshaledLayoutCallback)
C-ABI stable wrapper over a
MarshaledLayoutCallbackstruct MarshaledLayoutCallback has destructor
marshal_data: RefAny
C-ABI stable wrapper over a
MarshaledLayoutCallbackInnerstruct MarshaledLayoutCallbackInner
In order to interact with external VMs (Java, Python, etc.) the callback is often stored as a "function object" In order to callback into external languages, the layout callback has to be able to carry some extra data (the first argument), which usually contains the function object i.e. in the Python VM a PyCallable / PyAny
fnptr MarshaledLayoutCallbackType
arg &mut RefAny
arg &mut RefAny
Marshal-local data (the
marshal_dataof theMarshaledLayoutCallbackstruct)Application state of the
AppUseful information to contitionally return the structure of the DOM based on the width / height of the window
The styled DOM rendered from the application state
-> StyledDom
C-ABI stable wrapper over a
LayoutCallbackTypestruct LayoutCallbackInner
Callback function pointer (has to be a function pointer in order to be compatible with C APIs later on). IMPORTANT: The callback needs to deallocate the
RefAnyPtrandLayoutCallbackInfoPtr, otherwise that memory is leaked. If you use the official auto-generated bindings, this is already done for you. NOTE: The original callback wasfn(&self, LayoutCallbackInfo) -> Domwhich then evolved tofn(&RefAny, LayoutCallbackInfo) -> Dom. The indirection is necessary because of the memory management around the C API See azul-core/ui_state.rs:298 for how the memory is managed across the callback boundary.fnptr LayoutCallbackType
arg &mut RefAny
arg &mut LayoutCallbackInfo
Application state of the
AppUseful information to contitionally return the structure of the DOM based on the width / height of the window
The styled DOM rendered from the application state
-> StyledDom
Stores a function pointer that is executed when the given UI element is hit Must return an
Updatethat denotes if the screen should be redrawn.struct Callback
cb: CallbackType
Main callback type for UI event handling
fnptr CallbackType
arg &mut RefAny
arg &mut CallbackInfo
Reference counted opaque pointer to the data set in the
CallbackDatafor the hit DOM nodeContext struct to allow the callback to manipulate UI structures
Whether this callback has modified the application state in such a way that a full UI redraw is unavoidable. If any callback returns true, the
LayoutCallbackof the window will be called again to render the next frame.-> Update
Information about the callback that is passed to the callback whenever a callback is invoked
struct CallbackInfo
Single reference to all readonly reference data This consolidates 8 individual parameters into 1, improving API ergonomics
ref_data: *const c_void
Platform-specific system style (colors, spacing, etc.) Arc allows safe cloning in callbacks without unsafe pointer manipulation
system_style: Arc < SystemStyle >
The ID of the DOM + the node that was hit
hit_dom_node: DomNodeId
The (x, y) position of the mouse cursor, relative to top left of the element that was hit
cursor_relative_to_item: OptionLogicalPosition
The (x, y) position of the mouse cursor, relative to top left of the window
cursor_in_viewport: OptionLogicalPosition
All changes made by the callback, applied atomically after callback returns
changes: *mut c_void
fn get_hit_node:
&self
-> DomNodeId
&self
fn get_cursor_relative_to_viewport:
&self
fn get_cursor_relative_to_node:
&self
&self
-> WindowState
fn get_current_keyboard_state:
&self
&self
-> MouseState
&self
fn get_previous_keyboard_state:
&self
&self
&self
fn get_gl_context:
&self
&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 dataset: RefAny
&self
arg node_id: DomNodeId
fn get_inline_text:
&self
arg node_id: DomNodeId
fn get_font_ref:
&self
arg node_id: DomNodeId
&self
arg node_id: DomNodeId
fn shape_text:
&mut self
arg node_id: DomNodeId
-> usize
fn get_parent:
&mut self
arg node_id: DomNodeId
&mut self
arg node_id: DomNodeId
fn get_next_sibling:
&mut self
arg node_id: DomNodeId
fn get_first_child:
&mut self
arg node_id: DomNodeId
fn get_last_child:
&mut self
arg node_id: DomNodeId
&mut self
arg node_id: DomNodeId
fn get_node_size:
&mut self
arg node_id: DomNodeId
&mut self
arg node_id: DomNodeId
arg property_type: CssPropertyType
fn set_window_state:
&mut self
arg new_state: WindowState
fn set_focus:
&mut self
arg target: FocusTarget
fn set_css_property:
&mut self
arg node_id: DomNodeId
arg new_property: CssProperty
&mut self
arg node_id: DomNodeId
arg scroll_position: LogicalPosition
fn add_image:
fn has_image:
&self
arg id: AzString
-> bool
fn get_image:
&self
arg id: AzString
fn update_image:
&mut self
arg node_id: DomNodeId
arg new_image: ImageRef
arg image_type: UpdateImageType
fn delete_image:
&mut self
arg id: AzString
fn stop_propagation:
&mut self
fn create_window:
&mut self
arg new_window: WindowCreateOptions
fn start_timer:
fn start_animation:
fn stop_timer:
&mut self
arg timer_id: TimerId
Returns true if the timer was successfully stopped / removed.
-> bool
fn start_thread:
&mut self
arg thread_initialize_data: RefAny
arg writeback_data: RefAny
arg callback: ThreadCallbackType
fn send_thread_msg:
&mut self
arg thread_id: ThreadId
arg msg: ThreadSendMsg
Returns
trueif the ThreadId is valid and the message could be sent, false otherwise-> bool
fn stop_thread:
&mut self
arg thread_id: ThreadId
Returns
trueif the ThreadId is valid, false otherwise-> bool
Returns the
DomNodeIdof the element that the callback was attached to.Returns the function pointer necessary to query the current time.
Returns the
LayoutPointof the cursor in the viewport (relative to the origin of theDom). Set toNoneif the cursor is not in the current window.Returns the
LayoutPointof the cursor in the viewport (relative to the origin of theDom). Set toNoneif the cursor is not hovering over the current node.Returns a copy of the current windows
WindowState.Returns a copy of the internal
KeyboardState. Same asself.get_window_state().keyboard_stateReturns a copy of the internal
MouseState. Same asself.get_window_state().mouse_stateReturns a copy of the current windows
WindowState.Returns a copy of the internal
KeyboardState. Same asself.get_window_state().keyboard_stateReturns a copy of the internal
MouseState. Same asself.get_window_state().mouse_stateReturns a copy of the current windows
RawWindowHandle.Returns a reference-counted copy of the current windows'
Gl(context). You can use this to render OpenGL textures.Returns the x / y offset that this node has been scrolled to by the user or
Noneif the node has not been scrolled.Returns the
datasetproperty of the given Node orNoneif the node doesn't have adatasetproperty.Given a dataset, returns the node ID of the "root"
RefAny, i.e. theRefAnywith the lowestinstancecount that is set as adataseton any node.If the node is a
Textnode, returns a copy of the internal string contents.If the node is a
Textnode, returns the layouted inline glyphs of the text currently rendered on the screenIf the node is a
Textnode, returns theFontRefthat was used to render this node. Useful for getting font metrics for a text stringSimilar to
get_inline_text(): If the node is aTextnode, shape thetextstring with the same parameters as the current text and return the calculated InlineTextLayout. Necessary to calculate text cursor offsets and to detect when a line overflows content.Returns the index of the node relative to the parent node.
Returns the parent
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.Returns the previous siblings
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.Returns the next siblings
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.Returns the next siblings
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.Returns the next siblings
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.Returns the position of a given DOM node in the UI
Returns the size of a given DOM node in the UI
Returns the current computed CSS property of a given DOM node in the UI
Sets the new
WindowStatefor the next frame. The window is updated after all callbacks are run.Sets the new
FocusTargetfor the next frame. Note that this will emit aOn::FocusLostandOn::FocusReceivedevent, if the focused node has changed.Sets a
CssPropertyon a given node to its new value. If this property change affects the layout, this will automatically trigger a relayout and redraw of the screen.Sets the scroll position of the node
If the node is a
Textnode, overwrites theTextcontent with the new string, without requiring the entire UI to be rebuilt.Adds a new image identified by an ID to the image cache
Returns whether an image with a given CSS ID already exists
Returns the image with a given CSS ID
If the node is an
Image, exchanges the current image with a new sourceDeletes an image identified by a CSS ID from the image cache
If the node has an
ImageMask, exchanges the current mask for the new maskStops the propagation of the current callback event type to the parent. Events are bubbled from the inside out (children first, then parents), this event stops the propagation of the event to the parent.
Spawns a new window with the given
WindowCreateOptions.Adds a new
Timerto the runtime. See the documentation forTimerfor more information.Starts an animation timer on a give NodeId - same as a
Timer, but uses a pre-configured interpolation function to drive the animation timerStops / cancels a
Timer. See the documentation forTimerfor more information.Starts a new
Threadto the runtime. See the documentation forThreadfor more information.Sends a message to a background thread
Stops a thread at the nearest possible opportunity. Sends a
ThreadSendMsg::TerminateThreadmessage to the thread and joins the thread.Which type of image should be updated: background image (the CSS background) or content image (the <img src=""> content)
enum UpdateImageType
Background
Content
Specifies if the screen should be updated after the callback function has returned
enum Update
The screen does not need to redraw after the callback has been called
DoNothing
After the callback is called, the screen needs to redraw (layout() function being called again)
RefreshDom
The layout has to be re-calculated for all windows
RefreshDomAllWindows
Gives the
layout()function access to theRendererResourcesand theWindow(for querying images and fonts, as well as width / height)struct LayoutCallbackInfo
Single reference to all readonly reference data This consolidates 4 individual parameters into 1, improving API ergonomics
ref_data: *const c_void
Window size (so that apps can return a different UI depending on the window size - mobile / desktop view). Should be later removed in favor of "resize" handlers and @media queries.
window_size: WindowSize
Registers whether the UI is dependent on the window theme
theme: WindowTheme
Extension for future ABI stability (referenced data)
_abi_ref: *const c_void
Extension for future ABI stability (mutable data)
_abi_mut: *mut c_void
fn get_gl_context:
&self
fn get_system_fonts:
&self
fn get_image:
&self
arg id: AzString
Returns a copy of the OpenGL context
Returns all system-native fonts with their respective file paths as values
Returns an
ImageRefreferenced by a CSS IDID of a DOM - one window can contain multiple, nested DOMs (such as iframes)
struct DomId
inner: usize
Combination of node ID + DOM ID, both together can identify a node
struct DomNodeId
dom: DomId
node: NodeHierarchyItemId
union enum PositionInfo
Static(PositionInfoInner)
Fixed(PositionInfoInner)
Absolute(PositionInfoInner)
Relative(PositionInfoInner)
fn is_positioned:
&self
-> bool
&self
&self
struct PositionInfoInner
x_offset: f32
y_offset: f32
static_x_offset: f32
static_y_offset: f32
Information about the bounds of a laid-out div rectangle. Necessary when invoking
IFrameCallbacksandRenderImageCallbacks, so that they can change what their content is based on their size.struct HidpiAdjustedBounds
logical_size: LogicalSize
hidpi_factor: DpiScaleFactor
fn get_logical_size:
&self
-> LogicalSize
&self
fn get_hidpi_factor:
&self
-> f32
Returns the size of the bounds in logical units
Returns the size of the bounds in physical units
Returns the hidpi factor of the bounds
struct InlineText has destructor
List of lines in this text, relative to the text origin
lines: InlineLineVec
Content size of all text lines
content_size: LogicalSize
Font size in pixels used for layouting this text
font_size_px: f32
Index of the last
Wordin this text (- note that aWordcan also be aSpace,ReturnorTab).last_word_index: usize
NEGATIVE descender of the text baseline (distance from baseline of the text to the bottom of the line)
baseline_descender_px: f32
fn hit_test:
&self
arg position: LogicalPosition
Hit-tests the inline text, returns detailed information about which glyph / word / line, etc. the position (usually the mouse cursor) is currently over. Result may be empty (no hits) or contain more than one result (cursor is hovering over multiple overlapping glyphs at once).
struct InlineLine has destructor
List of words in this line (includes tabs, return and spaces)
words: InlineWordVec
Size and origin of the line, relative to the inline text origin (top left corner)
bounds: LogicalRect
union enum InlineWord has destructor
Tab character, width depends on
TextLayoutOptions.tab_widthTab
Return character
Return
Space character
Space
Actual word containing renderable glyphs
Word(InlineTextContents)
struct InlineTextContents has destructor
List of glyphs in this word
glyphs: InlineGlyphVec
origin and size of the word relative to the line origin (top left corner of the line)
bounds: LogicalRect
struct InlineGlyph
bounds: LogicalRect
unicode_codepoint: OptionChar
glyph_index: u32
struct InlineTextHit
Option<char>, if the glyph was a character (as opposed to a diacritic mark), contains the unicode codepoint of the characterunicode_codepoint: OptionChar
Position of the hit relative to the top left corner of the inline text
hit_relative_to_inline_text: LogicalPosition
Position of the hit relative to the top left corner of the line
hit_relative_to_line: LogicalPosition
Position of the hit relative to the top left corner of the word
hit_relative_to_text_content: LogicalPosition
Position of the hit relative to the top left corner of the glyph
hit_relative_to_glyph: LogicalPosition
Index of the line in the text
line_index_relative_to_text: usize
Index of the word in the text (note: words include
Space,TabandReturn)word_index_relative_to_text: usize
Index of the text content in the text
text_content_index_relative_to_text: usize
Index of the hit glyph in the text (note: one glyph is not one character, glyphs include diacritic marks)
glyph_index_relative_to_text: usize
Index of the hit character (unicode codepoint) in the text.
char_index_relative_to_text: usize
Index of the hit word (note: includes
Tab,Space,Return) in the hit lineword_index_relative_to_line: usize
Index of the hit text content ("word") in the hit line
text_content_index_relative_to_line: usize
Index of the hit glyph in the line (includes diacritic marks)
glyph_index_relative_to_line: usize
Index of the hit character (unicode codepoint) in the line
char_index_relative_to_line: usize
Index of the hit glyph in the word (includes diacritic marks)
glyph_index_relative_to_word: usize
Index of the hit character (unicode codepoint) in the word
char_index_relative_to_word: usize
Defines the focus_targeted node ID for the next frame
union enum FocusTarget
Id(DomNodeId)
Path(FocusTargetPath)
Previous
Next
First
Last
NoFocus
CSS path to set the keyboard input focus
struct FocusTargetPath
dom: DomId
css_path: CssPath
enum ScriptType
Auto-determine script type based on text content
Mixed
Force left-to-right layout
LTR
Force right-to-left layout
RTL
struct ResolvedTextLayoutOptions has destructor
Font size (in pixels) that this text has been laid out with
font_size_px: f32
Multiplier for the line height, default to 1.0
line_height: OptionF32
Additional spacing between glyphs (in pixels)
letter_spacing: OptionF32
Additional spacing between words (in pixels)
word_spacing: OptionF32
How many spaces should a tab character emulate (multiplying value, i.e.
4.0= one tab = 4 spaces)tab_width: OptionF32
Maximum width of the text (in pixels) - if the text is set to
overflow:visible, set this to Nonemax_horizontal_width: OptionF32
How many pixels of leading does the first line have? Note that this added onto to the holes, so for effects like
:first-letter, use a hole instead of a leadingleading: OptionF32
This is more important for inline text layout where items can punch 'holes' into the text flow, for example text that flows around an image
holes: LogicalRectVec
Stop layouting text after y coordinate is reached, useful for limiting long text blocks
max_vertical_height: OptionF32
Whether text can break lines (white-space: wrap | pre | nowrap), default: true (wrap)
can_break: bool
Whether text is hyphenated (hyphens: auto), default: true
can_hyphenate: bool
Custom hyphenation character, necessary to calculate breaking in hyphenated texts, default '-'
hyphenation_character: OptionChar
Force RTL or LTR (Mixed = auto-detect)
is_rtl: ScriptType
Text justification mode (none = aligned depending on LTR / RTL)
text_justify: OptionStyleTextAlign
constructor default:
Animation struct to start a new animation
struct Animation
from: CssProperty
to: CssProperty
duration: AzDuration
repeat: AnimationRepeat
repeat_times: AnimationRepeatCount
easing: AnimationInterpolationFunction
relayout_on_finish: bool
How should an animation repeat (loop, ping-pong, etc.)
enum AnimationRepeat
NoRepeat
Loop
PingPong
How many times should an animation repeat
union enum AnimationRepeatCount
Times(usize)
Infinite
Index of a Node in the internal
NodeDataContainerstruct NodeHierarchyItemId
inner: usize
C-ABI wrapper over an
IFrameCallbackTypestruct IFrameCallback
Type alias for extern "C" fn (&mut RefAny , &mut IFrameCallbackInfo) -> IFrameCallbackReturn
fnptr IFrameCallbackType
arg &mut RefAny
arg &mut IFrameCallbackInfo
An
IFrameCallbackcan have some data passed along from the parent DOM - usually this would be struct containing the widget stateSimilar to
LayoutCallbackInfo, but carries an additionalboundsfield which has information about the size / current scroll position of the IFrame.Contains the returned
StyledDomas well as information about the initial scroll position of the new DOM plus scrollbar / overflow informationstruct IFrameCallbackInfo
reason: IFrameCallbackReason
system_fonts: *const c_void
image_cache: *const c_void
window_theme: WindowTheme
bounds: HidpiAdjustedBounds
scroll_size: LogicalSize
scroll_offset: LogicalPosition
virtual_scroll_size: LogicalSize
virtual_scroll_offset: LogicalPosition
Extension for future ABI stability (referenced data)
_abi_ref: *const c_void
Extension for future ABI stability (mutable data)
_abi_mut: *mut c_void
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- ✅ 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 - ✅ 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 = 800×600, scroll_size = 800×600 (perfectly covered) Frame 1: Window resizes to 1000×700 (larger) -> IFrame bounds = 1000×700 -> Bounds no longer fully covered by scroll_size (800×600) -> ✅ RE-INVOKE callback once Frame 2: Window resizes to 1100×800 (even larger) -> If callback returned scroll_size = 1100×800, fully covered again -> Do NOT re-invoke (content covers new bounds) -> If callback returned scroll_size = 1000×700, not fully covered -> ✅ RE-INVOKE again (new uncovered area) Frame 3: Window resizes to 900×650 (smaller) -> Bounds now smaller than scroll_size -> Do NOT re-invoke (content is just clipped by scrollbars) ## Scroll Near Edge Example text scroll_size = 1000×2000 (width × height) Container = 800×600 Threshold = 200px Current scroll_offset = 0×0 User scrolls to scroll_offset = 0×1500: -> Bottom edge at 1500 + 600 = 2100 -> Within 200px of scroll_size.height (2000) -> Distance from edge: 2100 - 2000 = 100px < 200px -> ✅ RE-INVOKE callback to load more content Callback returns: -> New scroll_size = 1000×4000 (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
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 × 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 × 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
Callback that returns a rendered OpenGL texture IMPORTANT: In azul-core, this is stored as
CoreRenderImageCallbackwith acb: usizefield. When creating callbacks in the data model, function pointers are cast to usize. This type is used in azul-layout where we can safely work with the actual function pointer type.struct RenderImageCallback
Callback type that renders an OpenGL texture IMPORTANT: In azul-core, this is stored as
CoreRenderImageCallbackType = usizeto avoid circular dependencies. The actual function pointer is cast to usize for storage in the data model, then unsafely cast back to this type when invoked.fnptr RenderImageCallbackType
arg &mut RefAny
arg &mut RenderImageCallbackInfo
-> ImageRef
Information passed to image rendering callbacks
struct RenderImageCallbackInfo
The ID of the DOM node that the ImageCallback was attached to
callback_node_id: DomNodeId
Bounds of the laid-out node
bounds: HidpiAdjustedBounds
Optional OpenGL context pointer
gl_context: *const c_void
Image cache for looking up images
image_cache: *const c_void
System font cache
system_fonts: *const c_void
Extension for future ABI stability (referenced data)
_abi_ref: *const c_void
Extension for future ABI stability (mutable data)
_abi_mut: *mut c_void
fn get_gl_context:
&self
fn get_bounds:
&self
&self
-> DomNodeId
fn get_inline_text:
&self
arg node_id: DomNodeId
&mut self
arg node_id: DomNodeId
-> usize
fn get_parent:
&mut self
arg node_id: DomNodeId
&mut self
arg node_id: DomNodeId
fn get_next_sibling:
&mut self
arg node_id: DomNodeId
fn get_first_child:
&mut self
arg node_id: DomNodeId
fn get_last_child:
&mut self
arg node_id: DomNodeId
Returns a copy of the internal
GlReturns a copy of the internal
HidpiAdjustedBoundsReturns the
DomNodeIdthat this callback was called onIf the node is a
Textnode, returns the layouted inline glyphsReturns the index of the node relative to the parent node.
Returns the parent
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.Returns the previous siblings
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.Returns the next siblings
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.Returns the next siblings
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.Returns the next siblings
DomNodeIdof the givenDomNodeId. ReturnsNoneon an invalid NodeId.struct TimerCallback
fnptr TimerCallbackType
arg &mut RefAny
arg &mut TimerCallbackInfo
struct TimerCallbackInfo has destructor
callback_info: CallbackInfo
node_id: OptionDomNodeId
frame_start: Instant
call_count: usize
is_about_to_finish: bool
_abi_ref: *const c_void
_abi_mut: *mut c_void
struct TimerCallbackReturn
should_update: Update
should_terminate: TerminateTimer
fnptr WriteBackCallbackType
arg &mut RefAny
arg &mut RefAny
arg &mut CallbackInfo
-> Update
struct WriteBackCallback
struct ThreadCallback
fnptr ThreadCallbackType
arg RefAny
arg ThreadSender
arg ThreadReceiver
fnptr RefAnyDestructorType
arg c_void
struct RefCount has destructor
ptr: *const RefCountInner
run_destructor: bool
fn increase_ref:
&mut self
fn decrease_ref:
&mut self
fn increase_refmut:
&mut self
fn decrease_refmut:
&mut self
RefAny is a reference-counted, opaque pointer, which stores a reference to a struct.
RefAnycan be up- and downcasted (this usually done via generics and can't be expressed in the Rust API)struct RefAny has destructor
void* to a boxed struct or enum of type "T". RefCount stores the RTTI for this opaque type (can be downcasted by the user)
_internal_ptr: *const c_void
All the metadata information is set on the refcount, so that the metadata has to only be created once per object, not once per copy
sharing_info: RefCount
Instance of this copy (root = 0th copy). Necessary to distinguish between the original copy and all other clones
instance_id: u64
run_destructor: bool
constructor new_c:
arg ptr: *const c_void
arg len: usize
arg align: usize
arg type_id: u64
arg type_name: AzString
arg destructor: RefAnyDestructorType
-> RefAny
fn get_type_id:
&self
-> u64
fn get_type_name:
&self
-> AzString
Which edge triggered a scroll-based re-invocation
enum EdgeType
Top
Bottom
Left
Right
Config necessary for threading + animations to work in no_std environments
struct ExternalSystemCallbacks
create_thread_fn: CreateThreadCallback
get_system_time_fn: GetSystemTimeCallback
Menu callback: What data / function pointer should be called when the menu item is clicked?
struct MenuCallback has destructor
callback: Callback
data: RefAny
Reason why an IFrame callback is being invoked. This helps the callback optimize its behavior based on why it's being called.
union enum IFrameCallbackReason
Initial render - first time the IFrame appears
InitialRender
Parent DOM was recreated (cache invalidated)
DomRecreated
Window/IFrame bounds expanded beyond current scroll_size
BoundsExpanded
Scroll position is near an edge (within 200px threshold)
EdgeScrolled(EdgeType)
Scroll position extends beyond current scroll_size
ScrollBeyondContent
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 new:
constructor body:
-> Dom
constructor div:
-> Dom
constructor br:
-> Dom
constructor text:
constructor image:
constructor iframe:
arg data: RefAny
arg callback: IFrameCallbackType
-> Dom
fn set_node_type:
&mut self
arg node_type: NodeType
fn with_node_type:
fn set_dataset:
&mut self
arg dataset: RefAny
fn with_dataset:
&mut self
arg ids_and_classes: IdOrClassVec
&mut self
arg ids_and_classes: IdOrClassVec
-> Dom
fn set_callbacks:
&mut self
arg callbacks: CallbackDataVec
fn with_callbacks:
&mut self
arg callbacks: CallbackDataVec
-> Dom
&mut self
arg css_properties: NodeDataInlineCssPropertyVec
&mut self
arg css_properties: NodeDataInlineCssPropertyVec
-> Dom
fn add_callback:
&mut self
arg event: EventFilter
arg data: RefAny
arg callback: CallbackType
fn with_callback:
&mut 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: AzString
fn with_id:
fn add_class:
&mut self
arg class: AzString
fn with_class:
fn add_css_property:
&mut self
arg prop: CssProperty
&mut self
arg prop: CssProperty
-> Dom
&mut self
arg prop: CssProperty
&mut self
arg prop: CssProperty
-> Dom
&mut self
arg prop: CssProperty
&mut self
arg prop: CssProperty
-> Dom
&mut self
arg prop: CssProperty
&mut self
arg prop: CssProperty
-> Dom
fn set_inline_style:
&mut self
arg style: AzString
&mut self
arg style: AzString
&mut self
arg style: AzString
&mut self
arg style: AzString
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
&mut self
arg accessibility_info: AccessibilityInfo
-> Dom
fn hash:
&self
-> u64
fn node_count:
&self
-> usize
fn get_html_string:
&mut self
-> AzString
&mut self
-> AzString
fn style:
Adds a child node to this DOM (potentially heap-allocates in Rust code). Swaps
selfwith a defaultDomin order to prevent accidental copies.Same as add_child, but as a builder method.
Adds a child node to this DOM (potentially heap-allocates in Rust code). Swaps
selfwith a defaultDomin order to prevent accidental copies.Same as add_child, but as a builder method.
Adds a child node to this DOM (potentially heap-allocates in Rust code). Swaps
selfwith a defaultDomin order to prevent accidental copies.Same as set_children, but as a builder method.
Adds an CSS ID to the DOM root node.
Same as add_id, but as a builder method
Adds a CSS class to the DOM root node.
Same as add_class, but as a builder method
Adds an inline (normal) CSS property to the DOM root node.
Same as add_class, but as a builder method
Adds an inline (hover) CSS property to the DOM root node.
Same as add_class, but as a builder method
Adds an inline (hover) CSS property to the DOM root node.
Same as add_class, but as a builder method
Adds an inline (hover) CSS property to the DOM root node.
Same as add_class, but as a builder method
Sets the clip mask for the DOM root node.
Same as set_clip_mask, but as a builder method
Sets the tab index for the DOM root node.
Same as set_tab_index, but as a builder method
Sets accessibility attributes for the DOM root node.
Same as set_accessibility_info, but as a builder method
Sets the menu bar for the DOM root node. See
NodeData::set_menu_barfor more information.Same as set_accessibility_info, but as a builder method
Sets the context menu for the DOM root node. See
NodeData::set_context_menufor more information.Same as set_context_menu, but as a builder method
Calculates the hash of this node (note: in order to be truly unique, you also have to hash the DOM and Node ID).
Returns the number of nodes in the DOM, including all child DOM trees. Result is equal to
self.total_children + 1(count of all child trees + the root node)Returns a HTML string that you can write to a file in order to debug the UI structure and debug potential cascading issues
Returns a HTML for unit testing
Same as
StyledDom::new(dom, css): NOTE - replaces self with an empty DOM, in order to prevent cloning the DOM entirelyContains the necessary information to render an embedded
IFramenode.struct IFrameNode has destructor
The callback function that returns the DOM for the iframe's content.
callback: IFrameCallback
The application data passed to the iframe's layout callback.
data: RefAny
struct CallbackData has destructor
event: EventFilter
callback: Callback
data: RefAny
Represents all data associated with a single DOM node, such as its type, classes, IDs, callbacks, and inline styles.
struct NodeData has destructor
div,p,img, etc.node_type: NodeType
data-*attributes for this node, useful to store UI-related data on the node itself.dataset: OptionRefAny
Stores all ids and classes as one vec - size optimization since most nodes don't have any classes or IDs.
ids_and_classes: IdOrClassVec
Strongly-typed HTML attributes (aria-*, href, alt, etc.)
attributes: AttributeVec
Callbacks attached to this node:
On::MouseUp->Callback(my_button_click_handler)callbacks: CoreCallbackDataVec
Stores the inline CSS properties, same as in HTML.
inline_css_props: NodeDataInlineCssPropertyVec
Tab index (commonly used property).
tab_index: OptionTabIndex
Stores "extra", not commonly used data of the node: accessibility, clip-mask, tab-index, etc. SHOULD NOT EXPOSED IN THE API - necessary to retroactively add functionality to the node without breaking the ABI.
extra: *const c_void
constructor new:
constructor body:
-> NodeData
constructor div:
-> NodeData
constructor br:
-> NodeData
constructor text:
constructor image:
constructor iframe:
arg data: RefAny
arg callback: IFrameCallbackType
-> NodeData
Creates an new, empty
NodeDatastructfn set_node_type:
&mut self
arg node_type: NodeType
fn with_node_type:
fn set_dataset:
&mut self
arg dataset: RefAny
fn with_dataset:
&mut self
arg ids_and_classes: IdOrClassVec
&mut self
arg ids_and_classes: IdOrClassVec
-> NodeData
fn add_callback:
&mut self
arg event: EventFilter
arg data: RefAny
arg callback: CallbackType
fn with_callback:
&mut self
arg event: EventFilter
arg data: RefAny
arg callback: CallbackType
-> NodeData
fn set_callbacks:
&mut self
arg callbacks: CallbackDataVec
fn with_callbacks:
&mut self
arg callbacks: CallbackDataVec
-> NodeData
&mut self
arg css_properties: NodeDataInlineCssPropertyVec
&mut self
arg css_properties: NodeDataInlineCssPropertyVec
-> NodeData
fn set_inline_style:
&mut self
arg style: AzString
&mut self
arg style: AzString
&mut self
arg style: AzString
&mut self
arg style: AzString
fn set_clip_mask:
&mut self
arg image_mask: ImageMask
fn set_tab_index:
&mut self
arg tab_index: TabIndex
&mut self
arg accessibility_info: AccessibilityInfo
fn hash:
&self
-> u64
Adds a callback this DOM (potentially heap-allocates in Rust code)
Same as add_child, but as a builder method.
Sets the
extra.clip_maskfield for this nodeSets the tab index for this node
Sets accessibility attributes for this node
Adds a (native) menu bar: If this node is the root node the menu bar will be added to the window, else it will be displayed using the width and position of the bounding rectangle
Signalizes that this node has a (native) context-aware menu. If set, the user can left-click the node to open the menu
Calculates the hash of this node (note: in order to be truly unique, you also have to hash the DOM and Node ID).
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(AzString)
Image element, ::image
Image(ImageRef)
IFrame (embedded content)
IFrame(IFrameNode)
Defines the type of event that can trigger a callback action.
enum On
Mouse cursor is hovering over the element.
MouseOver
Mouse cursor has is over element and is pressed (not good for "click" events - use
MouseUpinstead).MouseDown
(Specialization of
MouseDown). Fires only if the left mouse button has been pressed while cursor was over the element.LeftMouseDown
(Specialization of
MouseDown). Fires only if the middle mouse button has been pressed while cursor was over the element.MiddleMouseDown
(Specialization of
MouseDown). Fires only if the right mouse button has been pressed while cursor was over the element.RightMouseDown
Mouse button has been released while cursor was over the element.
MouseUp
(Specialization of
MouseUp). Fires only if the left mouse button has been released while cursor was over the element.LeftMouseUp
(Specialization of
MouseUp). Fires only if the middle mouse button has been released while cursor was over the element.MiddleMouseUp
(Specialization of
MouseUp). Fires only if the right mouse button has been released while cursor was over the element.RightMouseUp
Mouse cursor has entered the element.
MouseEnter
Mouse cursor has left the element.
MouseLeave
Mousewheel / touchpad scrolling.
Scroll
The window received a unicode character (also respects the system locale). Check
keyboard_state.current_charto get the current pressed character.TextInput
A virtual keycode was pressed. Note: This is only the virtual keycode, not the actual char. If you want to get the character, use
TextInputinstead. A virtual key does not have to map to a printable character. You can get all currently pressed virtual keycodes in thekeyboard_state.current_virtual_keycodesand / or just the last keycode in thekeyboard_state.latest_virtual_keycode.VirtualKeyDown
A virtual keycode was release. See
VirtualKeyDownfor more info.VirtualKeyUp
A file has been dropped on the element.
HoveredFile
A file is being hovered on the element.
DroppedFile
A file was hovered, but has exited the window.
HoveredFileCancelled
Equivalent to
onfocus.FocusReceived
Equivalent to
onblur.FocusLost
Default action triggered by screen reader (usually same as click/activate)
Default
Element should collapse (e.g., accordion panel, tree node)
Collapse
Element should expand (e.g., accordion panel, tree node)
Expand
Increment value (e.g., number input, slider)
Increment
Decrement value (e.g., number input, slider)
Decrement
self
-> EventFilter
Converts the
Onshorthand into aEventFilterunion enum EventFilter
Calls the attached callback when the mouse is actively over the given element.
Hover(HoverEventFilter)
Inverse of
Hover- calls the attached callback if the mouse is not over the given element. This is particularly useful for popover menus where you want to close the menu when the user clicks anywhere else but the menu itself.Not(NotEventFilter)
Calls the attached callback when the element is currently focused.
Focus(FocusEventFilter)
Calls the callback when anything related to the window is happening. The "hit item" will be the root item of the DOM. For example, this can be useful for tracking the mouse position (in relation to the window). In difference to
Desktop, this only fires when the window is focused. This can also be good for capturing controller input, touch input (i.e. global gestures that aren't attached to any component, but rather the "window" itself).Window(WindowEventFilter)
API stub: Something happened with the node itself (node resized, created or removed)
Component(ComponentEventFilter)
Something happened with the application (started, shutdown, device plugged in)
Application(ApplicationEventFilter)
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
DoubleClick
Drag
DragEnd
DragStart
LongPress
PenDown
PenEnter
PenLeave
PenMove
PenUp
PinchIn
PinchOut
RotateClockwise
RotateCounterClockwise
SwipeDown
SwipeLeft
SwipeRight
SwipeUp
SystemTextSingleClick
SystemTextDoubleClick
SystemTextTripleClick
enum FocusEventFilter
MouseOver
MouseDown
LeftMouseDown
RightMouseDown
MiddleMouseDown
MouseUp
LeftMouseUp
RightMouseUp
MiddleMouseUp
MouseEnter
MouseLeave
Scroll
ScrollStart
ScrollEnd
TextInput
VirtualKeyDown
VirtualKeyUp
FocusReceived
FocusLost
DoubleClick
Drag
DragEnd
DragStart
LongPress
PenDown
PenMove
PenUp
PinchIn
PinchOut
RotateClockwise
RotateCounterClockwise
SwipeDown
SwipeLeft
SwipeRight
SwipeUp
union enum NotEventFilter
Hover(HoverEventFilter)
Focus(FocusEventFilter)
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
DoubleClick
Drag
DragEnd
DragStart
LongPress
PenDown
PenEnter
PenLeave
PenMove
PenUp
PinchIn
PinchOut
RotateClockwise
RotateCounterClockwise
SwipeDown
SwipeLeft
SwipeRight
SwipeUp
enum ComponentEventFilter
AfterMount
BeforeUnmount
NodeResized
DefaultAction
Selected
enum ApplicationEventFilter
DeviceConnected
DeviceDisconnected
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
Get the "name" of the
IAccessible, for example the name of a button, checkbox or menu item. Try to use unique names for each item in a dialog so that voice dictation software doesn't have to deal with extra ambiguity.name: OptionAzString
Get the "value" of the
IAccessible, for example a number in a slider, a URL for a link, the text a user entered in a field.value: OptionAzString
Get an enumerated value representing what this IAccessible is used for, for example is it a link, static text, editable text, a checkbox, or a table cell, etc.
role: AccessibilityRole
Possible on/off states, such as focused, focusable, selected, selectable, visible, protected (for passwords), checked, etc.
states: AccessibilityStateVec
Optional keyboard accelerator.
accelerator: OptionVirtualKeyCodeCombo
Optional "default action" description. Only used when there is at least one
ComponentEventFilter::DefaultActioncallback present on this node.default_action: OptionAzString
A list of actions the user can perform on this element. Maps to accesskit's Action enum.
supported_actions: AccessibilityActionVec
For live regions that update automatically (e.g., chat messages, timers). Maps to accesskit's
Liveproperty.is_live_region: bool
ID of another node that labels this one (for
aria-labelledby).labelled_by: OptionDomNodeId
ID of another node that describes this one (for
aria-describedby).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) 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
An enum that holds either a CSS ID or a class name as a string.
union enum IdOrClass
Id(AzString)
Class(AzString)
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
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
The css path (full selector) of the style ruleset
path: CssPath
"justify-content: center"=>CssDeclaration::Static(CssProperty::JustifyContent(LayoutJustifyContent::Center))declarations: CssDeclarationVec
Represents a full CSS path (i.e. the "div#id.class" selector belonging to a CSS "content group" (the following key-value block)). no_run,ignore "#div > .my_class:focus" == [ CssPathSelector::Type(NodeTypeTag::Div), CssPathSelector::PseudoSelector(CssPathPseudoSelector::LimitChildren), CssPathSelector::Class("my_class"), CssPathSelector::PseudoSelector(CssPathPseudoSelector::Focus), ]
struct CssPath
selectors: CssPathSelectorVec
union enum CssPathSelector
Represents the
*selectorGlobal
div,p, etc.Type(NodeTypeTag)
.somethingClass(AzString)
#somethingId(AzString)
:somethingPseudoSelector(CssPathPseudoSelector)
Represents the
>selector (direct child)DirectChildren
Represents the
selector (descendant)Children
Represents the
+selector (adjacent sibling)AdjacentSibling
Represents the
~selector (general sibling)GeneralSibling
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(LayoutBottomValue)
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)
fn get_key_string:
&self
-> AzString
fn get_value_string:
&self
-> AzString
&self
-> AzString
fn interpolate:
&self
arg other: CssProperty
arg t: f32
arg context: InterpolateResolver
-> CssProperty
Returns the key of the CSS property as a string, i.e.
backgroundReturns the value of the CSS property as a string, i.e.
linear-gradient(red, blue)Returns the CSS key-value pair as a string, i.e.
background: linear-gradient(red, blue)Interpolates two CSS properties given a value
tranging from 0.0 to 1.0. The interpolation function can be set on thecontext(Ease,Linear, etc.).union enum CssPathPseudoSelector
:firstFirst
:lastLast
:nth-childNthChild(CssNthChildSelector)
:hover- mouse is over elementHover
:active- mouse is pressed and over elementActive
:focus- element has received focusFocus
union enum CssNthChildSelector
Number(u32)
Even
Odd
Pattern(CssNthChildPattern)
struct CssNthChildPattern
repeat: u32
offset: u32
struct Stylesheet
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
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:
Returns an empty CSS style
Returns a CSS style parsed from a
StringContains one parsed
key: valuepair, static or dynamicunion enum CssDeclaration
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
The stringified ID of this property, i.e. the
"my_id"inwidth: var(--my_id, 500px).dynamic_id: AzString
Default values for this properties - one single value can control multiple properties!
default_value: CssProperty
Represents a CSS key (for example
"border-radius"=>BorderRadius). You can also derive this key from aCssPropertyby callingCssProperty::get_type().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
Represents an animation timing function.
union enum AnimationInterpolationFunction
Ease
Linear
EaseIn
EaseOut
EaseInOut
CubicBezier(SvgCubicCurve)
Signifies the type of a DOM node without carrying any associated data
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
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
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: [PixelValueNoPercent; 2]
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
matrix: [FloatValue; 20]
struct StyleFilterOffset
x: PixelValue
y: PixelValue
union enum StyleCompositeFilter
Over
In
Atop
Out
Xor
Lighter
Arithmetic([FloatValue; 4])
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
struct LayoutBottom
inner: PixelValue
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
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
struct LayoutMarginBottom
inner: PixelValue
struct LayoutMarginLeft
inner: PixelValue
struct LayoutMarginRight
inner: PixelValue
struct LayoutMarginTop
inner: PixelValue
struct LayoutMaxHeight
inner: PixelValue
struct LayoutMaxWidth
inner: PixelValue
struct LayoutMinHeight
inner: PixelValue
struct LayoutMinWidth
inner: PixelValue
struct LayoutPaddingBottom
inner: PixelValue
struct LayoutPaddingLeft
inner: PixelValue
struct LayoutPaddingRight
inner: PixelValue
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
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 get_degrees:
&self
-> f32
struct NormalizedLinearColorStop
offset: PercentageValue
color: ColorU
struct NormalizedRadialColorStop
angle: AngleValue
color: ColorU
enum DirectionCorner
Right
Left
Top
Bottom
TopRight
TopLeft
BottomRight
BottomLeft
struct DirectionCorners
from: DirectionCorner
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)
Whether a
gradientshould be repeated or clamped to the edges.enum ExtendMode
Clamp
Repeat
struct LinearGradient
direction: Direction
extend_mode: ExtendMode
stops: NormalizedLinearColorStopVec
enum Shape
Ellipse
Circle
enum RadialGradientSize
ClosestSide
ClosestCorner
FarthestSide
FarthestCorner
struct RadialGradient
shape: Shape
size: RadialGradientSize
position: StyleBackgroundPosition
extend_mode: ExtendMode
stops: NormalizedLinearColorStopVec
struct ConicGradient
extend_mode: ExtendMode
center: StyleBackgroundPosition
angle: AngleValue
stops: NormalizedRadialColorStopVec
union enum StyleBackgroundContent
LinearGradient(LinearGradient)
RadialGradient(RadialGradient)
ConicGradient(ConicGradient)
Image(AzString)
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
Repeat
RepeatX
RepeatY
union enum StyleBackgroundSize
ExactSize([PixelValue; 2])
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
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
Horizontal scrollbar style, if any
horizontal: ScrollbarInfo
Vertical scrollbar style, if any
vertical: ScrollbarInfo
Represents a
cursorattribute, defining the mouse cursor to be displayed when pointing over an element.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
Represents a
font-familyattributeunion enum StyleFontFamily
System(AzString)
File(AzString)
Ref(FontRef)
Represents a
font-sizeattributestruct StyleFontSize
inner: PixelValue
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
struct InterpolateResolver
interpolate_func: AnimationInterpolationFunction
parent_rect_width: f32
parent_rect_height: f32
current_rect_width: f32
current_rect_height: f32
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
Type alias for CssPropertyValue < StyleBoxShadow >
union enum StyleBoxShadowValue
Auto
None
Inherit
Initial
Exact(StyleBoxShadow)
Type alias for CssPropertyValue < LayoutAlignContent >
union enum LayoutAlignContentValue
Auto
None
Inherit
Initial
Exact(LayoutAlignContent)
Type alias for CssPropertyValue < LayoutAlignItems >
union enum LayoutAlignItemsValue
Auto
None
Inherit
Initial
Exact(LayoutAlignItems)
Type alias for CssPropertyValue < LayoutBottom >
union enum LayoutBottomValue
Auto
None
Inherit
Initial
Exact(LayoutBottom)
Type alias for CssPropertyValue < LayoutBoxSizing >
union enum LayoutBoxSizingValue
Auto
None
Inherit
Initial
Exact(LayoutBoxSizing)
Type alias for CssPropertyValue < LayoutFlexDirection >
union enum LayoutFlexDirectionValue
Auto
None
Inherit
Initial
Exact(LayoutFlexDirection)
Type alias for CssPropertyValue < LayoutDisplay >
union enum LayoutDisplayValue
Auto
None
Inherit
Initial
Exact(LayoutDisplay)
Type alias for CssPropertyValue < LayoutFlexGrow >
union enum LayoutFlexGrowValue
Auto
None
Inherit
Initial
Exact(LayoutFlexGrow)
Type alias for CssPropertyValue < LayoutFlexShrink >
union enum LayoutFlexShrinkValue
Auto
None
Inherit
Initial
Exact(LayoutFlexShrink)
Type alias for CssPropertyValue < LayoutFloat >
union enum LayoutFloatValue
Auto
None
Inherit
Initial
Exact(LayoutFloat)
Type alias for CssPropertyValue < LayoutHeight >
union enum LayoutHeightValue
Auto
None
Inherit
Initial
Exact(LayoutHeight)
Type alias for CssPropertyValue < LayoutJustifyContent >
union enum LayoutJustifyContentValue
Auto
None
Inherit
Initial
Exact(LayoutJustifyContent)
Type alias for CssPropertyValue < LayoutLeft >
union enum LayoutLeftValue
Auto
None
Inherit
Initial
Exact(LayoutLeft)
Type alias for CssPropertyValue < LayoutMarginBottom >
union enum LayoutMarginBottomValue
Auto
None
Inherit
Initial
Exact(LayoutMarginBottom)
Type alias for CssPropertyValue < LayoutMarginLeft >
union enum LayoutMarginLeftValue
Auto
None
Inherit
Initial
Exact(LayoutMarginLeft)
Type alias for CssPropertyValue < LayoutMarginRight >
union enum LayoutMarginRightValue
Auto
None
Inherit
Initial
Exact(LayoutMarginRight)
Type alias for CssPropertyValue < LayoutMarginTop >
union enum LayoutMarginTopValue
Auto
None
Inherit
Initial
Exact(LayoutMarginTop)
Type alias for CssPropertyValue < LayoutMaxHeight >
union enum LayoutMaxHeightValue
Auto
None
Inherit
Initial
Exact(LayoutMaxHeight)
Type alias for CssPropertyValue < LayoutMaxWidth >
union enum LayoutMaxWidthValue
Auto
None
Inherit
Initial
Exact(LayoutMaxWidth)
Type alias for CssPropertyValue < LayoutMinHeight >
union enum LayoutMinHeightValue
Auto
None
Inherit
Initial
Exact(LayoutMinHeight)
Type alias for CssPropertyValue < LayoutMinWidth >
union enum LayoutMinWidthValue
Auto
None
Inherit
Initial
Exact(LayoutMinWidth)
Type alias for CssPropertyValue < LayoutPaddingBottom >
union enum LayoutPaddingBottomValue
Auto
None
Inherit
Initial
Exact(LayoutPaddingBottom)
Type alias for CssPropertyValue < LayoutPaddingLeft >
union enum LayoutPaddingLeftValue
Auto
None
Inherit
Initial
Exact(LayoutPaddingLeft)
Type alias for CssPropertyValue < LayoutPaddingRight >
union enum LayoutPaddingRightValue
Auto
None
Inherit
Initial
Exact(LayoutPaddingRight)
Type alias for CssPropertyValue < LayoutPaddingTop >
union enum LayoutPaddingTopValue
Auto
None
Inherit
Initial
Exact(LayoutPaddingTop)
Type alias for CssPropertyValue < LayoutPosition >
union enum LayoutPositionValue
Auto
None
Inherit
Initial
Exact(LayoutPosition)
Type alias for CssPropertyValue < LayoutRight >
union enum LayoutRightValue
Auto
None
Inherit
Initial
Exact(LayoutRight)
Type alias for CssPropertyValue < LayoutTop >
union enum LayoutTopValue
Auto
None
Inherit
Initial
Exact(LayoutTop)
Type alias for CssPropertyValue < LayoutWidth >
union enum LayoutWidthValue
Auto
None
Inherit
Initial
Exact(LayoutWidth)
Type alias for CssPropertyValue < LayoutFlexWrap >
union enum LayoutFlexWrapValue
Auto
None
Inherit
Initial
Exact(LayoutFlexWrap)
Type alias for CssPropertyValue < LayoutOverflow >
union enum LayoutOverflowValue
Auto
None
Inherit
Initial
Exact(LayoutOverflow)
Type alias for CssPropertyValue < ScrollbarStyle >
union enum ScrollbarStyleValue
Auto
None
Inherit
Initial
Exact(ScrollbarStyle)
Type alias for CssPropertyValue < StyleBackgroundContentVec >
union enum StyleBackgroundContentVecValue
Auto
None
Inherit
Initial
Exact(StyleBackgroundContentVec)
Type alias for CssPropertyValue < StyleBackgroundPositionVec >
union enum StyleBackgroundPositionVecValue
Auto
None
Inherit
Initial
Exact(StyleBackgroundPositionVec)
Type alias for CssPropertyValue < StyleBackgroundRepeatVec >
union enum StyleBackgroundRepeatVecValue
Auto
None
Inherit
Initial
Exact(StyleBackgroundRepeatVec)
Type alias for CssPropertyValue < StyleBackgroundSizeVec >
union enum StyleBackgroundSizeVecValue
Auto
None
Inherit
Initial
Exact(StyleBackgroundSizeVec)
Type alias for CssPropertyValue < StyleBorderBottomColor >
union enum StyleBorderBottomColorValue
Auto
None
Inherit
Initial
Exact(StyleBorderBottomColor)
Type alias for CssPropertyValue < StyleBorderBottomLeftRadius >
union enum StyleBorderBottomLeftRadiusValue
Auto
None
Inherit
Initial
Exact(StyleBorderBottomLeftRadius)
Type alias for CssPropertyValue < StyleBorderBottomRightRadius >
union enum StyleBorderBottomRightRadiusValue
Auto
None
Inherit
Initial
Exact(StyleBorderBottomRightRadius)
Type alias for CssPropertyValue < StyleBorderBottomStyle >
union enum StyleBorderBottomStyleValue
Auto
None
Inherit
Initial
Exact(StyleBorderBottomStyle)
Type alias for CssPropertyValue < LayoutBorderBottomWidth >
union enum LayoutBorderBottomWidthValue
Auto
None
Inherit
Initial
Exact(LayoutBorderBottomWidth)
Type alias for CssPropertyValue < StyleBorderLeftColor >
union enum StyleBorderLeftColorValue
Auto
None
Inherit
Initial
Exact(StyleBorderLeftColor)
Type alias for CssPropertyValue < StyleBorderLeftStyle >
union enum StyleBorderLeftStyleValue
Auto
None
Inherit
Initial
Exact(StyleBorderLeftStyle)
Type alias for CssPropertyValue < LayoutBorderLeftWidth >
union enum LayoutBorderLeftWidthValue
Auto
None
Inherit
Initial
Exact(LayoutBorderLeftWidth)
Type alias for CssPropertyValue < StyleBorderRightColor >
union enum StyleBorderRightColorValue
Auto
None
Inherit
Initial
Exact(StyleBorderRightColor)
Type alias for CssPropertyValue < StyleBorderRightStyle >
union enum StyleBorderRightStyleValue
Auto
None
Inherit
Initial
Exact(StyleBorderRightStyle)
Type alias for CssPropertyValue < LayoutBorderRightWidth >
union enum LayoutBorderRightWidthValue
Auto
None
Inherit
Initial
Exact(LayoutBorderRightWidth)
Type alias for CssPropertyValue < StyleBorderTopColor >
union enum StyleBorderTopColorValue
Auto
None
Inherit
Initial
Exact(StyleBorderTopColor)
Type alias for CssPropertyValue < StyleBorderTopLeftRadius >
union enum StyleBorderTopLeftRadiusValue
Auto
None
Inherit
Initial
Exact(StyleBorderTopLeftRadius)
Type alias for CssPropertyValue < StyleBorderTopRightRadius >
union enum StyleBorderTopRightRadiusValue
Auto
None
Inherit
Initial
Exact(StyleBorderTopRightRadius)
Type alias for CssPropertyValue < StyleBorderTopStyle >
union enum StyleBorderTopStyleValue
Auto
None
Inherit
Initial
Exact(StyleBorderTopStyle)
Type alias for CssPropertyValue < LayoutBorderTopWidth >
union enum LayoutBorderTopWidthValue
Auto
None
Inherit
Initial
Exact(LayoutBorderTopWidth)
Type alias for CssPropertyValue < StyleCursor >
union enum StyleCursorValue
Auto
None
Inherit
Initial
Exact(StyleCursor)
Type alias for CssPropertyValue < StyleFontFamilyVec >
union enum StyleFontFamilyVecValue
Auto
None
Inherit
Initial
Exact(StyleFontFamilyVec)
Type alias for CssPropertyValue < StyleFontSize >
union enum StyleFontSizeValue
Auto
None
Inherit
Initial
Exact(StyleFontSize)
Type alias for CssPropertyValue < StyleLetterSpacing >
union enum StyleLetterSpacingValue
Auto
None
Inherit
Initial
Exact(StyleLetterSpacing)
Type alias for CssPropertyValue < StyleLineHeight >
union enum StyleLineHeightValue
Auto
None
Inherit
Initial
Exact(StyleLineHeight)
Type alias for CssPropertyValue < StyleTabWidth >
union enum StyleTabWidthValue
Auto
None
Inherit
Initial
Exact(StyleTabWidth)
Type alias for CssPropertyValue < StyleTextAlign >
union enum StyleTextAlignValue
Auto
None
Inherit
Initial
Exact(StyleTextAlign)
Type alias for CssPropertyValue < StyleTextColor >
union enum StyleTextColorValue
Auto
None
Inherit
Initial
Exact(StyleTextColor)
Type alias for CssPropertyValue < StyleWordSpacing >
union enum StyleWordSpacingValue
Auto
None
Inherit
Initial
Exact(StyleWordSpacing)
Type alias for CssPropertyValue < StyleOpacity >
union enum StyleOpacityValue
Auto
None
Inherit
Initial
Exact(StyleOpacity)
Type alias for CssPropertyValue < StyleTransformVec >
union enum StyleTransformVecValue
Auto
None
Inherit
Initial
Exact(StyleTransformVec)
Type alias for CssPropertyValue < StyleTransformOrigin >
union enum StyleTransformOriginValue
Auto
None
Inherit
Initial
Exact(StyleTransformOrigin)
Type alias for CssPropertyValue < StylePerspectiveOrigin >
union enum StylePerspectiveOriginValue
Auto
None
Inherit
Initial
Exact(StyleTransformOrigin)
Type alias for CssPropertyValue < StyleBackfaceVisibility >
union enum StyleBackfaceVisibilityValue
Auto
None
Inherit
Initial
Exact(StyleBackfaceVisibility)
Type alias for CssPropertyValue < StyleMixBlendMode >
union enum StyleMixBlendModeValue
Auto
None
Inherit
Initial
Exact(StyleMixBlendMode)
Type alias for CssPropertyValue < StyleFilterVec >
union enum StyleFilterVecValue
Auto
None
Inherit
Initial
Exact(StyleFilterVec)
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
counter_name: AzString
value: i32
Represents a grid line position (start or end)
union enum GridLine
auto
Auto
Line number (1-based, negative for counting from end)
Line(i32)
Named line with optional span count
Named(String, Option < i32 >)
span N
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
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
Pointer to the parsed font data (e.g., ParsedFont)
parsed: *const c_void
Reference counter for memory management
copies: *const c_void
Whether to run the destructor on drop
run_destructor: bool
Destructor function for the parsed data
parsed_destructor: fn (*mut c_void)
Represents the detected platform.
union enum Platform
Windows
MacOs
Linux(DesktopEnvironment)
Android
Ios
Unknown
enum ColumnSpan
None
All
Represents a
clearattributeenum LayoutClear
None
Left
Right
Both
Only used for calculations: Point coordinate (x, y) in layout space.
struct LayoutPoint
x: isize
y: isize
How to handle white space inside an element.
enum StyleWhiteSpace
Normal
Pre
Nowrap
Common system metrics for UI element sizing and spacing.
struct SystemMetrics
The corner radius for standard elements like buttons.
corner_radius: OptionPixelValue
The width of standard borders.
border_width: OptionPixelValue
A unified collection of discovered system style properties.
struct SystemStyle
theme: Theme
platform: Platform
colors: SystemColors
fonts: SystemFonts
metrics: SystemMetrics
scrollbar: OptionComputedScrollbarStyle
An optional, user-provided stylesheet loaded from a conventional location (
~/.config/azul/styles/<app_name>.css), allowing for application-specific "ricing". This is only loaded when the "io" feature is enabled and not disabled by theAZUL_DISABLE_RICINGenv var.app_specific_stylesheet: *const c_void
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: [u8;10]
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
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: Duration
struct ColumnRuleStyle
inner: BorderStyle
struct SvgPoint
x: f32
y: f32
Represents
grid-roworgrid-column(start / end)struct GridPlacement
start: GridLine
end: GridLine
struct StringSet
inner: AzString
union enum ShapeOutside
None
Shape(String)
struct SvgVector
x: f64
y: f64
Represents the detected Linux Desktop Environment.
union enum DesktopEnvironment
Gnome
Kde
Other(AzString)
union enum ColumnCount
Auto
Integer(u32)
Represents a
writing-modeattributeenum LayoutWritingMode
HorizontalTb
VerticalRl
VerticalLr
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
Common system colors used for UI elements.
struct SystemColors
text: OptionColorU
background: OptionColorU
accent: OptionColorU
accent_text: OptionColorU
button_face: OptionColorU
button_text: OptionColorU
window_background: OptionColorU
selection_background: OptionColorU
selection_text: OptionColorU
Only used for calculations: Rectangle (x, y, width, height) in layout space.
struct LayoutRect
origin: LayoutPoint
size: LayoutSize
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
union enum FlowInto
None
Named(AzString)
Represents
grid-template-columnsorgrid-template-rowsstruct GridTemplate
tracks: GridTrackSizingVec
Represents
justify-selffor grid itemsenum LayoutJustifySelf
Auto
Start
End
Center
Stretch
struct Content
inner: AzString
Hyphenation rules.
enum StyleHyphens
Auto
None
struct LayoutGap
inner: PixelValue
Text direction.
enum StyleDirection
Ltr
Rtl
Represents a
flex-basisattributeunion enum LayoutFlexBasis
auto
Auto
Fixed size
Exact(PixelValue)
struct ShapeMargin
inner: PixelValue
enum LayoutTextJustify
Auto
None
InterWord
InterCharacter
Distribute
union enum ColumnWidth
Auto
Length(PixelValue)
struct CounterIncrement
counter_name: AzString
value: i32
Represents a
box-decoration-breakCSS property value.enum BoxDecorationBreak
Slice
Clone
struct SvgCubicCurve
start: SvgPoint
ctrl_1: SvgPoint
ctrl_2: SvgPoint
end: SvgPoint
struct SvgQuadraticCurve
start: SvgPoint
ctrl: SvgPoint
end: SvgPoint
struct SelectionColor
inner: ColorU
Represents a
visibilityattribute, controlling element visibility.enum StyleVisibility
Visible
Hidden
Collapse
The overall theme type.
enum Theme
Light
Dark
struct ShapeImageThreshold
inner: FloatValue
Represents the
grid-auto-flowpropertyenum LayoutGridAutoFlow
Row
Column
RowDense
ColumnDense
struct ColumnRuleWidth
inner: PixelValue
struct AzString
vec: U8Vec
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
enum ColumnFill
Auto
Balance
Common system font settings.
struct SystemFonts
The primary font used for UI elements like buttons and labels.
ui_font: OptionAzString
The default font size for UI elements, in points.
ui_font_size: OptionF32
The font used for code or other monospaced text.
monospace_font: OptionAzString
union enum FlowFrom
None
Named(AzString)
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(ColorU, ColorU)
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
None
Shape(Shape)
struct SelectionRadius
inner: PixelValue
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
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 css .element { -azul-exclusion-margin: 10.5; }struct StyleExclusionMargin
inner: FloatValue
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
None
Shape(Shape)
-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 css .element { -azul-hyphenation-language: "en-US"; }struct StyleHyphenationLanguage
inner: AzString
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
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: usize
sink: Optionusize
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)
Default, built-in widgets (button, label, textinput, etc.)
mod widgets:
struct Ribbon
tab_active: i32
fn dom:
&mut self
arg callback: RibbonOnTabClickedCallback
arg data: RefAny
-> Dom
struct RibbonOnTabClickedCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , i32) -> Update
fnptr RibbonOnTabClickedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg i32
-> Update
struct Button has destructor
Content (image or text) of this button, centered by default
label: AzString
Optional image that is displayed next to the label
image: OptionImageRef
Style for this button container
container_style: NodeDataInlineCssPropertyVec
Style of the label
label_style: NodeDataInlineCssPropertyVec
Style of the image
image_style: NodeDataInlineCssPropertyVec
Optional: Function to call when the button is clicked
on_click: OptionButtonOnClick
fn set_on_click:
&mut self
arg data: RefAny
arg callback: CallbackType
fn with_on_click:
&mut self
arg data: RefAny
arg callback: CallbackType
-> Button
fn dom:
&mut self
-> Dom
struct ButtonOnClick has destructor
data: RefAny
callback: Callback
struct FileInput has destructor
State of the file input
state: FileInputStateWrapper
Default text to display when no file has been selected (default = "Select File...")
default_text: AzString
Optional image that is displayed next to the label
image: OptionImageRef
Style for this button container
container_style: NodeDataInlineCssPropertyVec
Style of the label
label_style: NodeDataInlineCssPropertyVec
Style of the image
image_style: NodeDataInlineCssPropertyVec
constructor new:
arg path: OptionAzString
-> FileInput
Creates a new file input button
fn set_default_text:
&mut self
arg default_text: AzString
&mut self
arg data: RefAny
arg callback: FileInputOnPathChangeCallbackType
&mut self
arg data: RefAny
arg callback: FileInputOnPathChangeCallbackType
-> FileInput
fn dom:
&mut self
-> Dom
struct FileInputStateWrapper has destructor
inner: FileInputState
on_path_change: OptionFileInputOnPathChange
Title displayed in the file selection dialog
file_dialog_title: AzString
Default directory of file input
default_dir: OptionAzString
Selectable file types (default: None = user is able to select all file types)
file_types: OptionFileTypeList
struct FileInputState
path: OptionAzString
struct FileInputOnPathChange has destructor
data: RefAny
callback: FileInputOnPathChangeCallback
struct FileInputOnPathChangeCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &FileInputState) -> Update
fnptr FileInputOnPathChangeCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & FileInputState
-> Update
struct CheckBox has destructor
state: CheckBoxStateWrapper
Style for the checkbox container
container_style: NodeDataInlineCssPropertyVec
Style for the checkbox content
content_style: NodeDataInlineCssPropertyVec
fn set_on_toggle:
&mut self
arg data: RefAny
arg callback: CheckBoxOnToggleCallbackType
fn with_on_toggle:
&mut self
arg data: RefAny
arg callback: CheckBoxOnToggleCallbackType
-> CheckBox
fn dom:
&mut self
-> Dom
struct CheckBoxStateWrapper has destructor
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 has destructor
data: RefAny
callback: CheckBoxOnToggleCallback
struct CheckBoxOnToggleCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &CheckBoxState) -> Update
fnptr CheckBoxOnToggleCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & CheckBoxState
-> Update
struct CheckBoxState
checked: bool
struct Label has destructor
string: AzString
label_style: NodeDataInlineCssPropertyVec
struct ColorInput has destructor
state: ColorInputStateWrapper
style: NodeDataInlineCssPropertyVec
constructor new:
arg color: ColorU
-> ColorInput
&mut self
arg data: RefAny
arg callback: ColorInputOnValueChangeCallbackType
&mut self
arg data: RefAny
arg callback: ColorInputOnValueChangeCallbackType
-> ColorInput
fn dom:
&mut self
-> Dom
struct ColorInputStateWrapper has destructor
inner: ColorInputState
title: AzString
on_value_change: OptionColorInputOnValueChange
struct ColorInputState
color: ColorU
struct ColorInputOnValueChange has destructor
data: RefAny
callback: ColorInputOnValueChangeCallback
struct ColorInputOnValueChangeCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &ColorInputState) -> Update
fnptr ColorInputOnValueChangeCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & ColorInputState
-> Update
struct TextInput has destructor
state: TextInputStateWrapper
placeholder_style: NodeDataInlineCssPropertyVec
container_style: NodeDataInlineCssPropertyVec
label_style: NodeDataInlineCssPropertyVec
fn set_text:
&mut self
arg text: AzString
fn with_text:
fn set_placeholder:
&mut self
arg text: AzString
fn with_placeholder:
&mut self
arg data: RefAny
arg callback: TextInputOnTextInputCallbackType
&mut self
arg data: RefAny
arg callback: TextInputOnTextInputCallbackType
-> TextInput
&mut self
arg data: RefAny
arg callback: TextInputOnVirtualKeyDownCallbackType
&mut self
arg data: RefAny
arg callback: TextInputOnVirtualKeyDownCallbackType
-> TextInput
&mut self
arg data: RefAny
arg callback: TextInputOnFocusLostCallbackType
&mut self
arg data: RefAny
arg callback: TextInputOnFocusLostCallbackType
-> TextInput
&mut self
arg placeholder_style: NodeDataInlineCssPropertyVec
&mut self
arg placeholder_style: NodeDataInlineCssPropertyVec
-> TextInput
&mut self
arg container_style: NodeDataInlineCssPropertyVec
&mut self
arg container_style: NodeDataInlineCssPropertyVec
-> TextInput
fn set_label_style:
&mut self
arg label_style: NodeDataInlineCssPropertyVec
fn with_label_style:
&mut self
arg label_style: NodeDataInlineCssPropertyVec
-> TextInput
fn dom:
&mut 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
text: U32Vec
placeholder: OptionAzString
max_len: usize
selection: OptionTextInputSelection
cursor_pos: usize
union enum TextInputSelection
All
FromTo(TextInputSelectionRange)
struct TextInputSelectionRange
from: usize
to: usize
struct TextInputOnTextInput has destructor
data: RefAny
callback: TextInputOnTextInputCallback
struct TextInputOnTextInputCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &TextInputState) -> OnTextInputReturn
fnptr TextInputOnTextInputCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & TextInputState
struct TextInputOnVirtualKeyDown has destructor
data: RefAny
callback: TextInputOnVirtualKeyDownCallback
struct TextInputOnVirtualKeyDownCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &TextInputState) -> OnTextInputReturn
fnptr TextInputOnVirtualKeyDownCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & TextInputState
struct TextInputOnFocusLost has destructor
data: RefAny
callback: TextInputOnFocusLostCallback
struct TextInputOnFocusLostCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &TextInputState) -> Update
fnptr TextInputOnFocusLostCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & TextInputState
-> Update
struct OnTextInputReturn
update: Update
valid: TextInputValid
enum TextInputValid
Yes
No
struct NumberInput has destructor
text_input: TextInput
state: NumberInputStateWrapper
constructor new:
arg number: f32
-> NumberInput
&mut self
arg data: RefAny
arg callback: TextInputOnTextInputCallbackType
&mut self
arg data: RefAny
arg callback: TextInputOnTextInputCallbackType
-> NumberInput
&mut self
arg data: RefAny
arg callback: TextInputOnVirtualKeyDownCallbackType
&mut self
arg data: RefAny
arg callback: TextInputOnVirtualKeyDownCallbackType
-> NumberInput
&mut self
arg data: RefAny
arg callback: NumberInputOnFocusLostCallbackType
&mut self
arg data: RefAny
arg callback: NumberInputOnFocusLostCallbackType
-> NumberInput
&mut self
arg style: NodeDataInlineCssPropertyVec
&mut self
arg style: NodeDataInlineCssPropertyVec
-> NumberInput
&mut self
arg style: NodeDataInlineCssPropertyVec
&mut self
arg style: NodeDataInlineCssPropertyVec
-> NumberInput
fn set_label_style:
&mut self
arg style: NodeDataInlineCssPropertyVec
fn with_label_style:
&mut self
arg style: NodeDataInlineCssPropertyVec
-> NumberInput
&mut self
arg data: RefAny
arg callback: NumberInputOnValueChangeCallbackType
&mut self
arg data: RefAny
arg callback: NumberInputOnValueChangeCallbackType
-> NumberInput
fn dom:
&mut self
-> Dom
struct NumberInputStateWrapper has destructor
inner: NumberInputState
on_value_change: OptionNumberInputOnValueChange
on_focus_lost: OptionNumberInputOnFocusLost
struct NumberInputState
previous: f32
number: f32
min: f32
max: f32
struct NumberInputOnValueChange has destructor
data: RefAny
callback: NumberInputOnValueChangeCallback
struct NumberInputOnValueChangeCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &NumberInputState) -> Update
fnptr NumberInputOnValueChangeCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & NumberInputState
-> Update
struct NumberInputOnFocusLost has destructor
data: RefAny
callback: NumberInputOnFocusLostCallback
struct NumberInputOnFocusLostCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &NumberInputState) -> Update
fnptr NumberInputOnFocusLostCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & NumberInputState
-> Update
struct ProgressBar
state: ProgressBarState
height: PixelValue
bar_background: StyleBackgroundContentVec
container_background: StyleBackgroundContentVec
constructor new:
arg percent_done: f32
-> ProgressBar
fn set_height:
&mut self
arg height: PixelValue
fn with_height:
&mut self
arg height: PixelValue
-> ProgressBar
&mut self
arg background: StyleBackgroundContentVec
&mut self
arg background: StyleBackgroundContentVec
-> ProgressBar
&mut self
arg background: StyleBackgroundContentVec
&mut self
arg background: StyleBackgroundContentVec
-> ProgressBar
fn dom:
&mut 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:
&mut self
arg active_tab: usize
-> TabHeader
fn set_on_click:
&mut self
arg data: RefAny
arg callback: TabOnClickCallbackType
fn with_on_click:
&mut self
arg data: RefAny
arg callback: TabOnClickCallbackType
-> TabHeader
fn dom:
&mut self
-> Dom
struct TabHeaderState
active_tab: usize
struct TabContent has destructor
content: Dom
has_padding: bool
constructor new:
arg content: Dom
-> TabContent
fn set_padding:
&mut self
arg has_padding: bool
fn with_padding:
&mut self
arg has_padding: bool
-> TabContent
fn dom:
&mut self
-> Dom
struct TabOnClick has destructor
data: RefAny
callback: TabOnClickCallback
struct TabOnClickCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &TabHeaderState) -> Update
fnptr TabOnClickCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & TabHeaderState
-> Update
struct Frame has destructor
title: AzString
flex_grow: f32
content: Dom
fn set_flex_grow:
&mut self
arg flex_grow: f32
fn with_flex_grow:
&mut self
arg flex_grow: f32
-> Frame
fn dom:
&mut self
-> Dom
Same as the NodeGraph but without generics and without the actual data
struct NodeGraph has destructor
node_types: NodeTypeIdInfoMapVec
input_output_types: InputOutputTypeIdInfoMapVec
nodes: NodeIdNodeMapVec
allow_multiple_root_nodes: bool
offset: LogicalPosition
style: NodeGraphStyle
callbacks: NodeGraphCallbacks
add_node_str: AzString
scale_factor: f32
struct NodeTypeIdInfoMap has destructor
node_type_id: NodeTypeId
node_type_info: NodeTypeInfo
struct InputOutputTypeIdInfoMap
io_type_id: InputOutputTypeId
io_info: InputOutputInfo
struct NodeIdNodeMap
node_id: NodeGraphNodeId
node: Node
enum NodeGraphStyle
Default
struct NodeGraphCallbacks has destructor
on_node_added: OptionOnNodeAdded
on_node_removed: OptionOnNodeRemoved
on_node_dragged: OptionOnNodeDragged
on_node_graph_dragged: OptionOnNodeGraphDragged
on_node_connected: OptionOnNodeConnected
on_node_input_disconnected: OptionOnNodeInputDisconnected
on_node_output_disconnected: OptionOnNodeOutputDisconnected
on_node_field_edited: OptionOnNodeFieldEdited
fnptr NodeGraphOnNodeAddedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeTypeId
arg NodeGraphNodeId
arg NodePosition
-> Update
struct DropDownOnChoiceChange has destructor
data: RefAny
callback: DropDownOnChoiceChangeCallback
struct OnNodeAddedCallback
fnptr NodeGraphOnNodeRemovedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
-> Update
struct OnNodeAdded has destructor
data: RefAny
callback: OnNodeAddedCallback
struct OnNodeRemovedCallback
fnptr NodeGraphOnNodeGraphDraggedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg GraphDragAmount
-> Update
struct OnNodeRemoved has destructor
data: RefAny
callback: OnNodeRemovedCallback
struct OnNodeGraphDraggedCallback
fnptr NodeGraphOnNodeDraggedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg NodeDragAmount
-> Update
struct OnNodeGraphDragged has destructor
data: RefAny
callback: OnNodeGraphDraggedCallback
struct OnNodeDraggedCallback
fnptr NodeGraphOnNodeConnectedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg usize
arg NodeGraphNodeId
arg usize
-> Update
struct OnNodeDragged has destructor
data: RefAny
callback: OnNodeDraggedCallback
struct OnNodeConnectedCallback
fnptr NodeGraphOnNodeInputDisconnectedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg usize
-> Update
struct OnNodeConnected has destructor
data: RefAny
callback: OnNodeConnectedCallback
struct OnNodeInputDisconnectedCallback
fnptr NodeGraphOnNodeOutputDisconnectedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg usize
-> Update
struct OnNodeInputDisconnected has destructor
data: RefAny
callback: OnNodeInputDisconnectedCallback
struct OnNodeOutputDisconnectedCallback
fnptr NodeGraphOnNodeFieldEditedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg usize
arg NodeTypeId
-> Update
struct OnNodeOutputDisconnected has destructor
data: RefAny
callback: OnNodeOutputDisconnectedCallback
struct OnNodeFieldEditedCallback
struct InputOutputTypeId
inner: u64
struct NodeTypeId
inner: u64
struct NodeGraphNodeId
inner: u64
struct Node
parent: OptionNodeId
previous_sibling: OptionNodeId
next_sibling: OptionNodeId
last_child: OptionNodeId
struct NodeTypeField
key: AzString
value: NodeTypeFieldValue
union enum NodeTypeFieldValue
TextInput(AzString)
NumberInput(f32)
CheckBox(bool)
ColorInput(ColorU)
FileInput(OptionAzString)
struct InputConnection has destructor
input_index: usize
connects_to: OutputNodeAndIndexVec
struct OutputNodeAndIndex
node_id: NodeGraphNodeId
output_index: usize
struct OutputConnection has destructor
output_index: usize
connects_to: InputNodeAndIndexVec
struct InputNodeAndIndex
node_id: NodeGraphNodeId
input_index: usize
struct NodeTypeInfo has destructor
Whether this node type is a "root" type
is_root: bool
Name of the node type
name: AzString
List of inputs for this node
inputs: InputOutputTypeIdVec
List of outputs for this node
outputs: InputOutputTypeIdVec
struct InputOutputInfo
Data type of this input / output
data_type: AzString
Which color to use for the input / output
color: ColorU
Things only relevant to the display of the node in an interactive editor - such as x and y position in the node graph, name, etc.
struct NodePosition
X Position of the node
x: f32
Y Position of the node
y: f32
struct GraphDragAmount
x: f32
y: f32
struct NodeDragAmount
x: f32
y: f32
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:
&mut self
arg rows: ListViewRowVec
-> ListView
fn dom:
&mut 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
State of the ListView, but without row data
struct ListViewState
Copy of the current column names
columns: StringVec
Which column the rows are currently sorted by
sorted_by: OptionUsize
Row count of rows currently loaded in the DOM
current_row_count: usize
Y-offset currently applied to the rows
scroll_offset: PixelValueNoPercent
Current position where the user has scrolled the ListView to
current_scroll_position: LogicalPosition
Current height of the row container
current_content_height: LogicalSize
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &ListViewState) -> Update
fnptr ListViewOnLazyLoadScrollCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & ListViewState
-> Update
struct ListViewOnLazyLoadScrollCallback
struct ListViewOnLazyLoadScroll has destructor
data: RefAny
callback: ListViewOnLazyLoadScrollCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &ListViewState , column_clicked : usize) -> Update
fnptr ListViewOnColumnClickCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & ListViewState
arg usize
-> Update
struct ListViewOnColumnClickCallback
struct ListViewOnColumnClick has destructor
data: RefAny
callback: ListViewOnColumnClickCallback
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , &ListViewState , row_clicked : usize) -> Update
fnptr ListViewOnRowClickCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & ListViewState
arg usize
-> Update
struct ListViewOnRowClickCallback
struct ListViewOnRowClick has destructor
data: RefAny
callback: ListViewOnRowClickCallback
struct TreeView
root: AzString
struct DropDown has destructor
choices: StringVec
selected: usize
on_choice_change: OptionDropDownOnChoiceChange
Type alias for extern "C" fn (&mut RefAny , &mut CallbackInfo , usize) -> Update
fnptr DropDownOnChoiceChangeCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg usize
-> Update
struct DropDownOnChoiceChangeCallback
struct OnNodeFieldEdited has destructor
data: RefAny
callback: OnNodeFieldEditedCallback
DOM to CSS cascading and styling module
mod style:
struct NodeHierarchyItem
parent: usize
previous_sibling: usize
next_sibling: usize
last_child: usize
Has all the necessary information about the style CSS path
struct CascadeInfo
index_in_parent: u32
is_last_child: bool
union enum CssPropertySource
Css(CssPath)
Inline
struct StyledNodeState
normal: bool
hover: bool
active: bool
focused: bool
struct StyledNode
Current state of this styled node (used later for caching the style / layout)
state: StyledNodeState
Optional tag ID NOTE: The tag ID has to be adjusted after the layout is done (due to scroll tags)
tag_id: OptionTagId
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
The ID of this DOM in the layout tree (for multi-DOM support with IFrames)
dom_id: DomId
constructor new:
constructor default:
-> StyledDom
constructor from_xml:
constructor from_file:
Styles a
Domwith the givenCss, returning theStyledDom- complexityO(count(dom_nodes) * count(css_blocks)): make sure that theDomand theCssare as small as possible, use inline CSS if the performance isn't good enoughReturns a default, empty
Dom, usually returned if you don't want to crash in an error case.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 dom: StyledDom
fn with_child:
fn restyle:
&mut self
arg css: Css
fn node_count:
&self
-> usize
fn get_html_string:
&self
-> AzString
&self
-> AzString
Appends an already styled list of DOM nodes to the current
dom.root- complexityO(count(dom.dom_nodes))Same as
append_child(), but as a builder methodRestyles an already styled DOM with a new CSS - overwrites old styles, but does not replace them, useful for implementing user styles that are applied on top of the existing application style
Returns the number of nodes in the styled DOM
Returns a HTML string that you can write to a file in order to debug the UI structure and debug potential cascading issues
Returns a HTML for unit testing
Adds a menu to the root node
Adds a menu to the root node (builder method)
Adds a context menu to the root node
Adds a context menu to the root node (builder method)
struct TagIdToNodeIdMapping has destructor
tag_id: AzTagId
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 ParentWithNodeDepth
depth: usize
node_id: NodeHierarchyItemId
struct AzTagId
inner: u64
struct CssPropertyCachePtr has destructor
ptr: BoxCssPropertyCache
run_destructor: bool
OpenGl helper types (
Texture,Gl, etc.)mod gl:
OpenGL texture, use
ReadOnlyWindow::create_textureto create a texturestruct Texture has destructor
Raw OpenGL texture ID
texture_id: GLuint
Hints and flags for optimization purposes
flags: TextureFlags
Size of this texture (in pixels)
size: PhysicalSizeU32
Background color of this texture
background_color: ColorU
A reference-counted pointer to the OpenGL context (so that the texture can be deleted in the destructor)
gl_context: GlContextPtr
Format of the texture (rgba8, brga8, etc.)
format: RawImageFormat
Reference count, shared across
refcount: *const c_void
run_destructor: bool
constructor new:
arg texture_id: u32
arg flags: TextureFlags
arg size: PhysicalSizeU32
arg background_color: ColorU
arg gl_context: GlContextPtr
arg format: RawImageFormat
-> Texture
constructor allocate_rgba8:
arg gl: 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)
Allocates an OpenGL texture of a given size with a single red channel (used for image masks)
fn clear:
&mut self
fn draw_clip_mask:
&mut self
arg node: TessellatedSvgNode
-> bool
fn draw_tesselated_svg_gpu_node:
&mut self
arg node: *const TessellatedGPUSvgNode
arg size: PhysicalSizeU32
arg color: ColorU
arg transforms: StyleTransformVec
-> bool
fn draw_tesselated_colored_svg_gpu_node:
&mut self
arg node: *const TessellatedColoredGPUSvgNode
arg size: PhysicalSizeU32
arg transforms: StyleTransformVec
-> bool
fn apply_fxaa:
&mut self
-> bool
Clears the texture with the currently set background color
Draws a vertex / index buffer (aka.
&TessellatedSvgNode) to the textureDraws a
&TessellatedGPUSvgNodewith the given color to the textureDraws a
&TessellatedColoredGPUSvgNodewith the given color to the textureApplies an FXAA filter to the texture
Passing *const c_void is not easily possible when generating APIs, so this wrapper struct is for easier API generation
struct GlVoidPtrConst has destructor
ptr: *const c_void
run_destructor: bool
struct GlVoidPtrMut
ptr: *mut GLvoid
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
constructor default:
-> TextureFlags
Default texture flags (not opaque, not a video texture)
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
enum VertexAttributeType
Vertex attribute has type
f32Float
Vertex attribute has type
f64Double
Vertex attribute has type
u8UnsignedByte
Vertex attribute has type
u16UnsignedShort
Vertex attribute has type
u32UnsignedInt
struct VertexAttribute
Attribute name of the vertex attribute in the vertex shader, i.e.
"vAttrXY"name: AzString
If the vertex shader has a specific location, (like
layout(location = 2) vAttrXY), use this instead of the name to look up the uniform location.layout_location: OptionUsize
Type of items of this attribute (i.e. for a
FloatVec2, would beVertexAttributeType::Float)attribute_type: VertexAttributeType
Number of items of this attribute (i.e. for a
FloatVec2, would be2(= 2 consecutive f32 values))item_count: usize
struct VertexLayout has destructor
fields: VertexAttributeVec
struct VertexArrayObject has destructor
vertex_layout: VertexLayout
vao_id: GLuint
gl_context: GlContextPtr
refcount: *const c_void
run_destructor: bool
constructor new:
arg vertex_layout: VertexLayout
arg vao_id: u32
arg gl_context: GlContextPtr
enum IndexBufferFormat
Points
Lines
LineStrip
Triangles
TriangleStrip
TriangleFan
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: *const c_void
run_destructor: bool
constructor new:
arg vertex_buffer_id: u32
arg vertex_buffer_len: usize
arg vao: VertexArrayObject
arg index_buffer_id: u32
arg index_buffer_len: usize
arg index_buffer_format: IndexBufferFormat
-> VertexBuffer
struct GlContextPtr has destructor
ptr: *const c_void
Whether to force a hardware or software renderer
renderer_type: RendererType
run_destructor: bool
fn get_type:
&self
-> AzGlType
&self
arg target: u32
arg size: isize
arg data: GlVoidPtrConst
arg usage: u32
&self
arg target: u32
arg offset: isize
arg size: isize
arg data: GlVoidPtrConst
fn map_buffer:
&self
arg target: u32
arg access: u32
-> GlVoidPtrMut
fn map_buffer_range:
&self
arg target: u32
arg offset: isize
arg length: isize
arg access: u32
-> GlVoidPtrMut
fn unmap_buffer:
&self
arg target: u32
-> u8
fn tex_buffer:
&self
arg target: u32
arg internal_format: u32
arg buffer: u32
fn shader_source:
&self
arg shader: u32
arg strings: StringVec
fn read_buffer:
&self
arg mode: u32
&self
arg x: i32
arg y: i32
arg width: i32
arg height: i32
arg format: u32
arg pixel_type: u32
arg dst_buffer: U8VecRefMut
fn read_pixels:
&self
arg x: i32
arg y: i32
arg width: i32
arg height: i32
arg format: u32
arg pixel_type: u32
-> U8Vec
&self
arg x: i32
arg y: i32
arg width: i32
arg height: i32
arg format: u32
arg pixel_type: u32
fn sample_coverage:
&self
arg value: f32
arg invert: bool
fn polygon_offset:
&self
arg factor: f32
arg units: f32
fn pixel_store_i:
&self
arg name: u32
arg param: i32
fn gen_buffers:
&self
arg n: i32
-> GLuintVec
&self
arg n: i32
-> GLuintVec
fn gen_framebuffers:
&self
arg n: i32
-> GLuintVec
fn gen_textures:
&self
arg n: i32
-> GLuintVec
&self
arg n: i32
-> GLuintVec
fn gen_queries:
&self
arg n: i32
-> GLuintVec
fn begin_query:
&self
arg target: u32
arg id: u32
fn end_query:
&self
arg target: u32
fn query_counter:
&self
arg id: u32
arg target: u32
&self
arg id: u32
arg pname: u32
-> i32
&self
arg id: u32
arg pname: u32
-> u32
&self
arg id: u32
arg pname: u32
-> i64
&self
arg id: u32
arg pname: u32
-> u64
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
&self
arg target: u32
arg attachment: u32
arg renderbuffertarget: u32
arg renderbuffer: u32
&self
arg target: u32
arg internalformat: u32
arg width: i32
arg height: i32
fn depth_func:
&self
arg func: u32
fn active_texture:
&self
arg texture: u32
fn attach_shader:
&self
arg program: u32
arg shader: u32
&self
arg program: u32
arg index: u32
arg name: Refstr
fn get_uniform_iv:
&self
arg program: u32
arg location: i32
arg result: GLintVecRefMut
fn get_uniform_fv:
&self
arg program: u32
arg location: i32
arg result: GLfloatVecRefMut
&self
arg program: u32
arg name: Refstr
-> u32
&self
arg program: u32
arg names: RefstrVecRef
-> GLuintVec
fn bind_buffer_base:
&self
arg target: u32
arg index: u32
arg buffer: u32
&self
arg target: u32
arg index: u32
arg buffer: u32
arg offset: isize
arg size: isize
&self
arg program: u32
arg uniform_block_index: u32
arg uniform_block_binding: u32
fn bind_buffer:
&self
arg target: u32
arg buffer: u32
&self
arg vao: u32
&self
arg target: u32
arg renderbuffer: u32
fn bind_framebuffer:
&self
arg target: u32
arg framebuffer: u32
fn bind_texture:
&self
arg target: u32
arg texture: u32
fn draw_buffers:
&self
arg bufs: GLenumVecRef
fn tex_image_2d:
&self
arg target: u32
arg level: i32
arg internal_format: i32
arg width: i32
arg height: i32
arg border: i32
arg format: u32
arg ty: u32
arg opt_data: OptionU8VecRef
&self
arg target: u32
arg level: i32
arg internal_format: u32
arg width: i32
arg height: i32
arg border: i32
arg data: U8VecRef
fn compressed_tex_sub_image_2d:
&self
arg target: u32
arg level: i32
arg xoffset: i32
arg yoffset: i32
arg width: i32
arg height: i32
arg format: u32
arg data: U8VecRef
fn tex_image_3d:
&self
arg target: u32
arg level: i32
arg internal_format: i32
arg width: i32
arg height: i32
arg depth: i32
arg border: i32
arg format: u32
arg ty: u32
arg opt_data: OptionU8VecRef
&self
arg target: u32
arg level: i32
arg internal_format: u32
arg x: i32
arg y: i32
arg width: i32
arg height: i32
arg border: i32
&self
arg target: u32
arg level: i32
arg xoffset: i32
arg yoffset: i32
arg x: i32
arg y: i32
arg width: i32
arg height: i32
&self
arg target: u32
arg level: i32
arg xoffset: i32
arg yoffset: i32
arg zoffset: i32
arg x: i32
arg y: i32
arg width: i32
arg height: i32
fn tex_sub_image_2d:
&self
arg target: u32
arg level: i32
arg xoffset: i32
arg yoffset: i32
arg width: i32
arg height: i32
arg format: u32
arg ty: u32
arg data: U8VecRef
&self
arg target: u32
arg level: i32
arg xoffset: i32
arg yoffset: i32
arg width: i32
arg height: i32
arg format: u32
arg ty: u32
arg offset: usize
fn tex_sub_image_3d:
&self
arg target: u32
arg level: i32
arg xoffset: i32
arg yoffset: i32
arg zoffset: i32
arg width: i32
arg height: i32
arg depth: i32
arg format: u32
arg ty: u32
arg data: U8VecRef
&self
arg target: u32
arg level: i32
arg xoffset: i32
arg yoffset: i32
arg zoffset: i32
arg width: i32
arg height: i32
arg depth: i32
arg format: u32
arg ty: u32
arg offset: usize
fn tex_storage_2d:
&self
arg target: u32
arg levels: i32
arg internal_format: u32
arg width: i32
arg height: i32
fn tex_storage_3d:
&self
arg target: u32
arg levels: i32
arg internal_format: u32
arg width: i32
arg height: i32
arg depth: i32
&self
arg target: u32
arg level: i32
arg format: u32
arg ty: u32
arg output: U8VecRefMut
&self
arg src_name: u32
arg src_target: u32
arg src_level: i32
arg src_x: i32
arg src_y: i32
arg src_z: i32
arg dst_name: u32
arg dst_target: u32
arg dst_level: i32
arg dst_x: i32
arg dst_y: i32
arg dst_z: i32
arg src_width: i32
arg src_height: i32
arg src_depth: i32
&self
arg target: u32
arg attachments: GLenumVecRef
fn invalidate_sub_framebuffer:
&self
arg target: u32
arg attachments: GLenumVecRef
arg xoffset: i32
arg yoffset: i32
arg width: i32
arg height: i32
fn get_integer_v:
&self
arg name: u32
arg result: GLintVecRefMut
fn get_integer_64v:
&self
arg name: u32
arg result: GLint64VecRefMut
fn get_integer_iv:
&self
arg name: u32
arg index: u32
arg result: GLintVecRefMut
fn get_integer_64iv:
&self
arg name: u32
arg index: u32
arg result: GLint64VecRefMut
fn get_boolean_v:
&self
arg name: u32
arg result: GLbooleanVecRefMut
fn get_float_v:
&self
arg name: u32
arg result: GLfloatVecRefMut
fn get_framebuffer_attachment_parameter_iv:
&self
arg target: u32
arg attachment: u32
arg pname: u32
-> i32
fn get_renderbuffer_parameter_iv:
&self
arg target: u32
arg pname: u32
-> i32
&self
arg target: u32
arg name: u32
-> i32
&self
arg target: u32
arg name: u32
-> f32
fn tex_parameter_i:
&self
arg target: u32
arg pname: u32
arg param: i32
fn tex_parameter_f:
&self
arg target: u32
arg pname: u32
arg param: f32
&self
arg target: u32
arg attachment: u32
arg textarget: u32
arg texture: u32
arg level: i32
&self
arg target: u32
arg attachment: u32
arg texture: u32
arg level: i32
arg layer: i32
fn blit_framebuffer:
&self
arg src_x0: i32
arg src_y0: i32
arg src_x1: i32
arg src_y1: i32
arg dst_x0: i32
arg dst_y0: i32
arg dst_x1: i32
arg dst_y1: i32
arg mask: u32
arg filter: u32
fn vertex_attrib_4f:
&self
arg index: u32
arg x: f32
arg y: f32
arg z: f32
arg w: f32
&self
arg index: u32
arg size: i32
arg normalized: bool
arg stride: i32
arg offset: u32
&self
arg index: u32
arg size: i32
arg type_: u32
arg normalized: bool
arg stride: i32
arg offset: u32
&self
arg index: u32
arg size: i32
arg type_: u32
arg stride: i32
arg offset: u32
&self
arg index: u32
arg divisor: u32
fn viewport:
&self
arg x: i32
arg y: i32
arg width: i32
arg height: i32
fn scissor:
&self
arg x: i32
arg y: i32
arg width: i32
arg height: i32
fn line_width:
&self
arg width: f32
fn use_program:
&self
arg program: u32
fn validate_program:
&self
arg program: u32
fn draw_arrays:
&self
arg mode: u32
arg first: i32
arg count: i32
&self
arg mode: u32
arg first: i32
arg count: i32
arg primcount: i32
fn draw_elements:
&self
arg mode: u32
arg count: i32
arg element_type: u32
arg indices_offset: u32
&self
arg mode: u32
arg count: i32
arg element_type: u32
arg indices_offset: u32
arg primcount: i32
fn blend_color:
&self
arg r: f32
arg g: f32
arg b: f32
arg a: f32
fn blend_func:
&self
arg sfactor: u32
arg dfactor: u32
&self
arg src_rgb: u32
arg dest_rgb: u32
arg src_alpha: u32
arg dest_alpha: u32
fn blend_equation:
&self
arg mode: u32
&self
arg mode_rgb: u32
arg mode_alpha: u32
fn color_mask:
&self
arg r: bool
arg g: bool
arg b: bool
arg a: bool
fn cull_face:
&self
arg mode: u32
fn front_face:
&self
arg mode: u32
fn enable:
&self
arg cap: u32
fn disable:
&self
arg cap: u32
fn hint:
&self
arg param_name: u32
arg param_val: u32
fn is_enabled:
&self
arg cap: u32
-> u8
fn is_shader:
&self
arg shader: u32
-> u8
fn is_texture:
&self
arg texture: u32
-> u8
fn is_framebuffer:
&self
arg framebuffer: u32
-> u8
fn is_renderbuffer:
&self
arg renderbuffer: u32
-> u8
&self
arg target: u32
-> u32
fn enable_vertex_attrib_array:
&self
arg index: u32
fn disable_vertex_attrib_array:
&self
arg index: u32
fn uniform_1f:
&self
arg location: i32
arg v0: f32
fn uniform_1fv:
&self
arg location: i32
arg values: F32VecRef
fn uniform_1i:
&self
arg location: i32
arg v0: i32
fn uniform_1iv:
&self
arg location: i32
arg values: I32VecRef
fn uniform_1ui:
&self
arg location: i32
arg v0: u32
fn uniform_2f:
&self
arg location: i32
arg v0: f32
arg v1: f32
fn uniform_2fv:
&self
arg location: i32
arg values: F32VecRef
fn uniform_2i:
&self
arg location: i32
arg v0: i32
arg v1: i32
fn uniform_2iv:
&self
arg location: i32
arg values: I32VecRef
fn uniform_2ui:
&self
arg location: i32
arg v0: u32
arg v1: u32
fn uniform_3f:
&self
arg location: i32
arg v0: f32
arg v1: f32
arg v2: f32
fn uniform_3fv:
&self
arg location: i32
arg values: F32VecRef
fn uniform_3i:
&self
arg location: i32
arg v0: i32
arg v1: i32
arg v2: i32
fn uniform_3iv:
&self
arg location: i32
arg values: I32VecRef
fn uniform_3ui:
&self
arg location: i32
arg v0: u32
arg v1: u32
arg v2: u32
fn uniform_4f:
&self
arg location: i32
arg x: f32
arg y: f32
arg z: f32
arg w: f32
fn uniform_4i:
&self
arg location: i32
arg x: i32
arg y: i32
arg z: i32
arg w: i32
fn uniform_4iv:
&self
arg location: i32
arg values: I32VecRef
fn uniform_4ui:
&self
arg location: i32
arg x: u32
arg y: u32
arg z: u32
arg w: u32
fn uniform_4fv:
&self
arg location: i32
arg values: F32VecRef
&self
arg location: i32
arg transpose: bool
arg value: F32VecRef
&self
arg location: i32
arg transpose: bool
arg value: F32VecRef
&self
arg location: i32
arg transpose: bool
arg value: F32VecRef
fn depth_mask:
&self
arg flag: bool
fn depth_range:
&self
arg near: f64
arg far: f64
&self
arg program: u32
arg index: u32
&self
arg program: u32
arg index: u32
fn get_active_uniform_block_i:
&self
arg program: u32
arg index: u32
arg pname: u32
-> i32
fn get_active_uniform_block_iv:
&self
arg program: u32
arg index: u32
arg pname: u32
-> GLintVec
fn get_active_uniform_block_name:
&self
arg program: u32
arg index: u32
-> AzString
&self
arg program: u32
arg name: Refstr
-> i32
&self
arg program: u32
arg name: Refstr
-> i32
&self
arg program: u32
arg name: Refstr
-> i32
&self
arg program: u32
-> AzString
fn get_program_iv:
&self
arg program: u32
arg pname: u32
arg result: GLintVecRefMut
&self
arg program: u32
fn program_binary:
&self
arg program: u32
arg format: u32
arg binary: U8VecRef
&self
arg program: u32
arg pname: u32
arg value: i32
&self
arg index: u32
arg pname: u32
arg result: GLintVecRefMut
&self
arg index: u32
arg pname: u32
arg result: GLfloatVecRefMut
fn get_vertex_attrib_pointer_v:
&self
arg index: u32
arg pname: u32
-> isize
&self
arg target: u32
arg pname: u32
-> i32
&self
arg shader: u32
-> AzString
fn get_string:
&self
arg which: u32
-> AzString
fn get_string_i:
&self
arg which: u32
arg index: u32
-> AzString
fn get_shader_iv:
&self
arg shader: u32
arg pname: u32
arg result: GLintVecRefMut
fn get_shader_precision_format:
&self
arg shader_type: u32
arg precision_type: u32
fn compile_shader:
&self
arg shader: u32
fn create_program:
&self
-> u32
fn delete_program:
&self
arg program: u32
fn create_shader:
&self
arg shader_type: u32
-> u32
fn delete_shader:
&self
arg shader: u32
fn detach_shader:
&self
arg program: u32
arg shader: u32
fn link_program:
&self
arg program: u32
fn clear_color:
&self
arg r: f32
arg g: f32
arg b: f32
arg a: f32
fn clear:
&self
arg buffer_mask: u32
fn clear_depth:
&self
arg depth: f64
fn clear_stencil:
&self
arg s: i32
fn flush:
&self
fn finish:
&self
fn get_error:
&self
-> u32
fn stencil_mask:
&self
arg mask: u32
&self
arg face: u32
arg mask: u32
fn stencil_func:
&self
arg func: u32
arg ref_: i32
arg mask: u32
&self
arg face: u32
arg func: u32
arg ref_: i32
arg mask: u32
fn stencil_op:
&self
arg sfail: u32
arg dpfail: u32
arg dppass: u32
&self
arg face: u32
arg sfail: u32
arg dpfail: u32
arg dppass: u32
fn egl_image_target_texture2d_oes:
&self
arg target: u32
arg image: GlVoidPtrConst
fn generate_mipmap:
&self
arg target: u32
&self
arg message: Refstr
&self
arg message: Refstr
&self
&self
arg source: u32
arg type_: u32
arg id: u32
arg severity: u32
arg message: Refstr
&self
arg source: u32
arg id: u32
arg message: Refstr
&self
fn fence_sync:
&self
arg condition: u32
arg flags: u32
-> GLsyncPtr
fn client_wait_sync:
&self
arg sync: GLsyncPtr
arg flags: u32
arg timeout: u64
-> u32
fn wait_sync:
&self
arg sync: GLsyncPtr
arg flags: u32
arg timeout: u64
fn delete_sync:
&self
arg sync: GLsyncPtr
&self
arg target: u32
arg data: U8VecRef
fn gen_fences_apple:
&self
arg n: i32
-> GLuintVec
&self
arg fences: GLuintVecRef
fn set_fence_apple:
&self
arg fence: u32
&self
arg fence: u32
fn test_fence_apple:
&self
arg fence: u32
&self
arg object: u32
arg name: u32
-> u8
&self
arg object: u32
arg name: u32
&self
arg program: u32
arg name: Refstr
-> i32
&self
fn bind_frag_data_location_indexed:
&self
arg program: u32
arg color_number: u32
arg index: u32
arg name: Refstr
&self
&self
arg mode: u32
&self
arg n: i32
-> GLuintVec
&self
arg vao: u32
fn delete_vertex_arrays_apple:
&self
arg vertex_arrays: GLuintVecRef
&self
arg source_id: u32
arg source_level: i32
arg dest_target: u32
arg dest_id: u32
arg dest_level: i32
arg internal_format: i32
arg dest_type: u32
arg unpack_flip_y: u8
arg unpack_premultiply_alpha: u8
arg unpack_unmultiply_alpha: u8
&self
arg source_id: u32
arg source_level: i32
arg dest_target: u32
arg dest_id: u32
arg dest_level: i32
arg x_offset: i32
arg y_offset: i32
arg x: i32
arg y: i32
arg width: i32
arg height: i32
arg unpack_flip_y: u8
arg unpack_premultiply_alpha: u8
arg unpack_unmultiply_alpha: u8
fn egl_image_target_renderbuffer_storage_oes:
&self
arg target: u32
arg image: GlVoidPtrConst
&self
arg source_id: u32
arg source_level: i32
arg dest_target: u32
arg dest_id: u32
arg dest_level: i32
arg internal_format: i32
arg dest_type: u32
arg unpack_flip_y: u8
arg unpack_premultiply_alpha: u8
arg unpack_unmultiply_alpha: u8
&self
arg source_id: u32
arg source_level: i32
arg dest_target: u32
arg dest_id: u32
arg dest_level: i32
arg x_offset: i32
arg y_offset: i32
arg z_offset: i32
arg x: i32
arg y: i32
arg z: i32
arg width: i32
arg height: i32
arg depth: i32
arg unpack_flip_y: u8
arg unpack_premultiply_alpha: u8
arg unpack_unmultiply_alpha: u8
fn buffer_storage:
&self
arg target: u32
arg size: isize
arg data: GlVoidPtrConst
arg flags: u32
&self
arg target: u32
arg offset: isize
arg length: isize
enum AzGlType
Gl
Gles
C-ABI stable reexport of
&[u8]struct U8VecRef
ptr: *const c_void
len: usize
C-ABI stable reexport of
&mut [u8]struct U8VecRefMut
ptr: *mut c_void
len: usize
C-ABI stable reexport of
&[f32]struct F32VecRef
ptr: *const c_void
len: usize
C-ABI stable reexport of
&[i32]struct I32VecRef
ptr: *const c_void
len: usize
C-ABI stable reexport of
&[GLuint]aka&[u32]struct GLuintVecRef
ptr: *const c_void
len: usize
C-ABI stable reexport of
&[GLenum]aka&[u32]struct GLenumVecRef
ptr: *const c_void
len: usize
C-ABI stable reexport of
&mut [GLint]aka&mut [i32]struct GLintVecRefMut
ptr: *mut c_void
len: usize
C-ABI stable reexport of
&mut [GLint64]aka&mut [i64]struct GLint64VecRefMut
ptr: *mut c_void
len: usize
C-ABI stable reexport of
&mut [GLboolean]aka&mut [u8]struct GLbooleanVecRefMut
ptr: *mut c_void
len: usize
C-ABI stable reexport of
&mut [GLfloat]aka&mut [f32]struct GLfloatVecRefMut
ptr: *mut c_void
len: usize
C-ABI stable reexport of
&[Refstr]aka&mut [&str]struct RefstrVecRef
ptr: *const c_void
len: usize
C-ABI stable reexport of
&strstruct Refstr
ptr: *const c_void
len: usize
C-ABI stable reexport of
(U8Vec, u32)struct GetProgramBinaryReturn
_0: U8Vec
_1: u32
C-ABI stable reexport of
(i32, u32, AzString)struct GetActiveAttribReturn
_0: i32
_1: u32
_2: AzString
C-ABI stable reexport of
*const gleam::gl::GLsyncstruct GLsyncPtr has destructor
ptr: *const c_void
run_destructor: bool
C-ABI stable reexport of
(i32, u32, AzString)struct GetActiveUniformReturn
_0: i32
_1: u32
_2: AzString
struct AzDebugMessage
message: AzString
source: GLenum
ty: GLenum
id: GLenum
severity: GLenum
Struct definitions for image loading
mod image:
struct ImageRef has destructor
Shared pointer to an opaque implementation of the decoded image
data: *const DecodedImage
How many copies does this image have (if 0, the font data will be deleted on drop)
copies: *const AtomicUsize
run_destructor: bool
constructor null_image:
arg width: usize
arg height: usize
arg format: RawImageFormat
arg tag: U8Vec
-> ImageRef
constructor raw_image:
arg data: RawImage
constructor gl_texture:
constructor callback:
arg data: RefAny
arg callback: RenderImageCallbackType
-> ImageRef
Creates an "invalid" image with a width and height that reserves an image key, but does not render anything
Creates an image reference from a CPU-backed buffer
Creates an image reference from an OpenGL texture
Creates an image reference from a callback that is going to be rendered with the given nodes computed size
fn clone_bytes:
&self
-> ImageRef
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 get_hash:
&self
-> u64
Creates a new copy of the image bytes instead of shallow-copying the reference
Returns whether the image is a null (invalid) image
Returns whether the image is a GL texture
Returns whether the image is a raw (CPU-decoded) image
Returns whether the image is a
RenderImageCallbackIf the image is a RawImage, returns a COPY of the internal image bytes (useful for encoding the RawImage / exporting the ImageRef to a file)
Returns the hash of the ImageRef (fast)
struct RawImage
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 draw_clip_mask:
fn encode_bmp:
&self
fn encode_png:
&self
fn encode_jpeg:
&self
arg quality: u8
arg doc: Output JPEG quality, value from 0 to 100
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
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
enum EncodeImageError
Crate was not compiled with the given encoder flags
EncoderNotAvailable
InsufficientMemory
DimensionError
InvalidData
Unknown
enum DecodeImageError
InsufficientMemory
DimensionError
UnsupportedImageFormat
Unknown
union enum RawImageData
U8(U8Vec)
U16(U16Vec)
F32(F32Vec)
Font decoding / parsing module
mod font:
fnptr ParsedFontDestructorFnType
arg c_void
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: [u8;10]
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
arg target_font_size: f32
-> f32
fn get_descender:
&self
arg target_font_size: f32
-> f32
fn get_line_gap:
&self
arg target_font_size: f32
-> f32
fn get_x_min:
&self
arg target_font_size: f32
-> f32
fn get_y_min:
&self
arg target_font_size: f32
-> f32
fn get_x_max:
&self
arg target_font_size: f32
-> f32
fn get_y_max:
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
fn get_min_right_side_bearing:
&self
arg target_font_size: f32
-> f32
fn get_x_max_extent:
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
fn get_y_superscript_x_offset:
&self
arg target_font_size: f32
-> f32
fn get_y_superscript_y_offset:
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
&self
arg target_font_size: f32
-> f32
If set, use
OS/2.sTypoAscender - OS/2.sTypoDescender + OS/2.sTypoLineGapto calculate the height.Atomically reference-counted parsed font data
struct FontRef has destructor
parsed: *const c_void
copies: *const AtomicUsize
run_destructor: bool
parsed_destructor: fn(*mut c_void)
constructor parse:
arg source: LoadedFontSource
Parses a new font from bytes. Returns
Noneif the font could not be parsed correctly.fn get_bytes:
&self
-> U8Vec
fn get_font_metrics:
&self
-> FontMetrics
fn shape_text:
&self
arg text: Refstr
arg options: ResolvedTextLayoutOptions
-> InlineText
fn get_hash:
&self
-> u64
Returns the font bytes of the underlying font source
Returns the font metrics of the parsed font
Returns the text layout of the shaped text
Returns the hash of the FontRef (fast)
Source data of a font file (bytes)
struct LoadedFontSource
data: U8Vec
index: u32
load_outlines: bool
SVG parsing and rendering functions
mod svg:
struct Svg has destructor
tree: *const c_void
run_destructor: bool
constructor from_string:
arg svg_string: AzString
arg parse_options: SvgParseOptions
constructor from_bytes:
arg svg_bytes: U8VecRef
arg parse_options: SvgParseOptions
fn get_root:
&self
-> SvgXmlNode
fn render:
&self
arg options: SvgRenderOptions
fn to_string:
&self
arg options: SvgXmlOptions
-> AzString
struct SvgXmlNode has destructor
node: *const c_void
run_destructor: bool
constructor parse_from:
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
One
SvgNodecorresponds to one SVG<path></path>elementunion enum SvgNode has destructor
Multiple multipolygons, merged to one CPU buf for efficient drawing
MultiPolygonCollection(SvgMultiPolygonVec)
MultiPolygon(SvgMultiPolygon)
MultiShape(SvgSimpleNodeVec)
Path(SvgPath)
Circle(SvgCircle)
Rect(SvgRect)
fn tessellate_fill:
&self
arg fill_style: SvgFillStyle
&self
arg stroke_style: SvgStrokeStyle
fn is_closed:
&self
-> bool
fn contains_point:
&self
arg point: SvgPoint
arg fill_rule: SvgFillRule
arg tolerance: f32
-> bool
fn get_bounds:
&self
-> SvgRect
Returns whether the shape is closed
Returns the bounds of the polygon
One
SvgSimpleNodeis either a path, a rect or a circleunion enum SvgSimpleNode has destructor
Path(SvgPath)
Circle(SvgCircle)
Rect(SvgRect)
CircleHole(SvgCircle)
RectHole(SvgRect)
fn get_bounds:
&self
-> SvgRect
struct SvgStyledNode has destructor
geometry: SvgNode
style: SvgStyle
fn tessellate:
&self
struct SvgCircle
center_x: f32
center_y: f32
radius: f32
fn tessellate_fill:
&self
arg fill_style: SvgFillStyle
&self
arg stroke_style: SvgStrokeStyle
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:
&mut self
-> SvgRect
fn join_with:
&mut self
arg path: SvgPath
fn offset:
&mut self
arg distance: f32
arg join: SvgLineJoin
arg cap: SvgLineCap
-> SvgPath
fn bevel:
&mut self
arg distance: f32
-> SvgPath
fn tessellate_fill:
&self
arg fill_style: SvgFillStyle
&self
arg stroke_style: SvgStrokeStyle
Returns whether the path is closed
Reverses the order of points in the path so that the path runs in the opposite direction afterwards
Returns the first point of the path (or None if path has no items)
Returns the first point of the path (or None if path has no items)
Returns the axis-aligned bounding rect of this path
Adds a path to the end of the current path
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
&self
arg stroke_style: SvgStrokeStyle
Reverses the order of points in the path so that the path 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 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
arg t: f64
-> SvgVector
fn intersect:
&self
arg other: SvgLine
&self
arg stroke_style: SvgStrokeStyle
Reverses the order of points in the path so that the path 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)
Intersect two lines EVEN IF THEY ARE DISTINCT. Only returns None on parallel lines (never intersect)
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
&self
arg stroke_style: SvgStrokeStyle
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
&self
arg stroke_style: SvgStrokeStyle
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
fn tessellate_fill:
&self
arg fill_style: SvgFillStyle
&self
arg stroke_style: SvgStrokeStyle
struct SvgColoredVertex
x: f32
y: f32
z: f32
r: f32
g: f32
b: f32
a: f32
struct TessellatedColoredSvgNode has destructor
vertices: SvgColoredVertexVec
indices: U32Vec
constructor empty:
constructor from_nodes:
arg nodes: TessellatedColoredSvgNodeVecRef
Returns an empty buffer vertices / indices
Creates a new TessellatedColoredSvgNode 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).Rust wrapper over a
&[TessellatedColoredSvgNode]or&Vec<TessellatedColoredSvgNode>struct TessellatedColoredSvgNodeVecRef
ptr: *const c_void
len: usize
struct TessellatedColoredGPUSvgNode has destructor
vertex_index_buffer: VertexBuffer
constructor new:
arg tessellated_node: *const TessellatedColoredSvgNode
arg gl: GlContextPtr
struct SvgVertex
x: f32
y: f32
struct TessellatedSvgNode has destructor
vertices: SvgVertexVec
indices: U32Vec
constructor empty:
constructor from_nodes:
arg nodes: TessellatedSvgNodeVecRef
Returns an empty buffer vertices / indices
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).Rust wrapper over a
&[TessellatedSvgNode]or&Vec<TessellatedSvgNode>struct TessellatedSvgNodeVecRef
ptr: *const c_void
len: usize
struct TessellatedGPUSvgNode has destructor
vertex_index_buffer: VertexBuffer
constructor new:
arg tessellated_node: *const TessellatedSvgNode
arg gl: GlContextPtr
struct SvgParseOptions
SVG image path. Used to resolve relative image paths.
relative_image_path: OptionAzString
Target DPI. Impact units conversion. Default: 96.0
dpi: f32
Default font family. Will be used when no font-family attribute is set in the SVG. Default: Times New Roman
default_font_family: AzString
A default font size. Will be used when no font-size attribute is set in the SVG. Default: 12
font_size: f32
A list of languages. Will be used to resolve a systemLanguage conditional attribute. Format: en, en-US. Default: [en]
languages: StringVec
Specifies the default shape rendering method. Will be used when an SVG element's shape-rendering property is set to auto. Default: GeometricPrecision
shape_rendering: ShapeRendering
Specifies the default text rendering method. Will be used when an SVG element's text-rendering property is set to auto. Default: OptimizeLegibility
text_rendering: TextRendering
Specifies the default image rendering method. Will be used when an SVG element's image-rendering property is set to auto. Default: OptimizeQuality
image_rendering: ImageRendering
Keep named groups. If set to true, all non-empty groups with id attribute will not be removed. Default: false
keep_named_groups: bool
When empty, text elements will be skipped. Default:
Systemfontdb: FontDatabase
constructor default:
enum ShapeRendering
OptimizeSpeed
CrispEdges
GeometricPrecision
enum TextRendering
OptimizeSpeed
OptimizeLegibility
GeometricPrecision
enum ImageRendering
OptimizeQuality
OptimizeSpeed
enum FontDatabase
Empty
System
struct SvgRenderOptions
target_size: OptionLayoutSize
background_color: OptionColorU
fit: SvgFitTo
transform: SvgRenderTransform
constructor default:
struct SvgRenderTransform
sx: f32
kx: f32
ky: f32
sy: f32
tx: f32
ty: f32
struct SvgDashPattern
offset: f32
length_1: f32
gap_1: f32
length_2: f32
gap_2: f32
length_3: f32
gap_3: f32
union enum Indent
None
Spaces(u8)
Tabs
union enum SvgFitTo
Original
Width(u32)
Height(u32)
Zoom(f32)
union enum SvgStyle
Fill(SvgFillStyle)
Stroke(SvgStrokeStyle)
enum SvgFillRule
Winding
EvenOdd
struct SvgTransform
sx: f32
kx: f32
ky: f32
sy: f32
tx: f32
ty: f32
struct SvgFillStyle
See the SVG specification. Default value:
LineJoin::Miter.line_join: SvgLineJoin
See the SVG specification. Must be greater than or equal to 1.0. Default value:
StrokeOptions::DEFAULT_MITER_LIMIT.miter_limit: f32
Maximum allowed distance to the path when building an approximation. See [Flattening and tolerance](index.html#flattening-and-tolerance). Default value:
StrokeOptions::DEFAULT_TOLERANCE.tolerance: f32
Whether to use the "winding" or "even / odd" fill rule when tesselating the path
fill_rule: SvgFillRule
Whether to apply a transform to the points in the path (warning: will be done on the CPU - expensive)
transform: SvgTransform
Whether the fill is intended to be anti-aliased (default: true)
anti_alias: bool
Whether the anti-aliasing has to be of high quality (default: false)
high_quality_aa: bool
constructor default:
-> SvgFillStyle
struct SvgStrokeStyle
What cap to use at the start of each sub-path. Default value:
LineCap::Butt.start_cap: SvgLineCap
What cap to use at the end of each sub-path. Default value:
LineCap::Butt.end_cap: SvgLineCap
See the SVG specification. Default value:
LineJoin::Miter.line_join: SvgLineJoin
Dash pattern
dash_pattern: OptionSvgDashPattern
Line width Default value:
StrokeOptions::DEFAULT_LINE_WIDTH.line_width: f32
See the SVG specification. Must be greater than or equal to 1.0. Default value:
StrokeOptions::DEFAULT_MITER_LIMIT.miter_limit: f32
Maximum allowed distance to the path when building an approximation. See [Flattening and tolerance](index.html#flattening-and-tolerance). Default value:
StrokeOptions::DEFAULT_TOLERANCE.tolerance: f32
Apply line width When set to false, the generated vertices will all be positioned in the centre of the line. The width can be applied later on (eg in a vertex shader) by adding the vertex normal multiplied by the line with to each vertex position. Default value:
true. NOTE: currently unused!apply_line_width: bool
Whether to apply a transform to the points in the path (warning: will be done on the CPU - expensive)
transform: SvgTransform
Whether the fill is intended to be anti-aliased (default: true)
anti_alias: bool
Whether the anti-aliasing has to be of high quality (default: false)
high_quality_aa: bool
constructor default:
enum SvgLineJoin
Miter
MiterClip
Round
Bevel
enum SvgLineCap
Butt
Square
Round
struct SvgXmlOptions
use_single_quote: bool
indent: Indent
attributes_indent: Indent
union enum SvgParseError
NoParserAvailable
ElementsLimitReached
NotAnUtf8Str
MalformedGZip
InvalidSize
ParsingFailed(XmlError)
XML parsing / decoding module
mod xml:
struct Xml has destructor
root: XmlNodeVec
Represents one XML node tag
struct XmlNode has destructor
Type of the node
node_type: XmlTagName
Attributes of an XML node (note: not yet filtered and / or broken into function arguments!)
attributes: XmlAttributeMap
Direct children of this node (can be text or element nodes)
children: XmlNodeChildVec
Filesystem / file input and output module
mod fs:
Interface for system file selection dialogs / popup message boxes, etc.
mod dialog:
struct MsgBox
reserved pointer (currently nullptr) for potential C extension
_reserved: *mut c_void
constructor ok:
arg icon: MsgBoxIcon
arg title: AzString
arg message: AzString
-> bool
constructor info:
arg message: AzString
-> bool
constructor warning:
arg message: AzString
-> bool
constructor error:
arg message: AzString
-> bool
constructor question:
arg message: AzString
-> bool
constructor ok_cancel:
arg icon: MsgBoxIcon
arg title: AzString
arg message: AzString
arg default_value: OkCancel
-> OkCancel
constructor yes_no:
arg icon: MsgBoxIcon
arg title: AzString
arg message: AzString
arg default_value: YesNo
-> YesNo
Opens an informational message box with only an "OK" button
Shorthand for
MsgBox::ok("Info", $message, Icon::Info)Shorthand for
MsgBox::ok("Warning", $message, Icon::Warning)Shorthand for
MsgBox::ok("Error", $message, Icon::Error)Shorthand for
MsgBox::ok("Question", $message, Icon::Question)Opens a ok / cancel message box. Blocks the current thread.
Opens a yes / no message box. Blocks the current thread.
Type of message box icon
enum MsgBoxIcon
Info
Warning
Error
Question
struct ColorPickerDialog
reserved pointer (currently nullptr) for potential C extension
_reserved: *mut c_void
constructor open:
arg title: AzString
arg default_color: OptionColorU
-> OptionColorU
Opens a system-native color picker dialog
Value returned from a yes / no message box
enum YesNo
Yes
No
File picker dialog
struct FileDialog
reserved pointer (currently nullptr) for potential C extension
_reserved: *mut c_void
constructor select_file:
arg title: AzString
arg default_path: OptionAzString
arg filter_list: OptionFileTypeList
The path that the user wants to open,
Noneif the user has cancelled or closed the dialog
constructor select_multiple_files:
arg title: AzString
arg default_path: OptionAzString
arg filter_list: OptionFileTypeList
The path(s) that the user wants to open,
Noneif the user has cancelled or closed the dialog
constructor select_folder:
arg title: AzString
arg default_path: OptionAzString
The folder that the user wants to open,
Noneif the user has cancelled or closed the dialog
constructor save_file:
arg title: AzString
arg default_path: OptionAzString
The path that the user wants to save the file to,
Noneif the user has cancelled or closed the dialog
Select a single file using the system-native file picker. Blocks the current thread.
Select multiple files using the system-native file picker. Blocks the current thread.
Open a dialog prompting the user to select a directory to open. Blocks the current thread.
Open a dialog prompting the user to save a file. Blocks the current thread.
struct FileTypeList
document_types: StringVec
document_descriptor: AzString
Value returned from an ok / cancel message box
enum OkCancel
Ok
Cancel
Rust wrappers for
Instant/Durationclassesmod time:
union enum Instant has destructor
System(AzInstantPtr)
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
fnptr InstantPtrCloneFnType
arg & AzInstantPtr
-> AzInstantPtr
struct AzInstantPtr has destructor
ptr: *const c_void
clone_fn: InstantPtrCloneCallback
destructor: InstantPtrDestructorCallback
run_destructor: bool
fnptr InstantPtrDestructorFnType
arg &mut AzInstantPtr
struct InstantPtrCloneCallback
struct SystemTick
tick_counter: u64
union enum Duration
System(SystemTimeDiff)
Tick(SystemTickDiff)
struct SystemTimeDiff
secs: u64
nanos: u32
struct InstantPtrDestructorCallback
Asyncronous timers / task / thread handlers for easy async loading
mod task:
struct TimerId
id: usize
struct Timer has destructor
data: RefAny
node_id: OptionDomNodeId
created: Instant
last_run: OptionInstant
run_count: usize
delay: OptionDuration
interval: OptionDuration
timeout: OptionDuration
callback: TimerCallback
constructor new:
arg timer_data: RefAny
arg callback: TimerCallbackType
arg get_system_time_fn: GetSystemTimeCallback
-> Timer
fn with_delay:
fn with_interval:
fn with_timeout:
Should a timer terminate or not - used to remove active timers
enum TerminateTimer
Remove the timer from the list of active timers
Terminate
Do nothing and let the timers continue to run
Continue
struct ThreadId
id: usize
struct Thread has destructor
ptr: c_void
run_destructor: bool
struct ThreadSender has destructor
ptr: c_void
run_destructor: bool
fn send:
&mut self
arg msg: ThreadReceiveMsg
-> bool
struct ThreadReceiver has destructor
ptr: *const c_void
run_destructor: bool
fn receive:
&mut self
Message that can be sent from the main thread to the Thread using the ThreadId. The thread can ignore the event.
union enum ThreadSendMsg has destructor
The thread should terminate at the nearest
TerminateThread
Next frame tick
Tick
Custom data
Custom(RefAny)
union enum ThreadReceiveMsg has destructor
WriteBack(ThreadWriteBackMsg)
Update(Update)
struct ThreadWriteBackMsg has destructor
data: RefAny
callback: WriteBackCallback
fnptr CreateThreadFnType
arg RefAny
arg RefAny
arg ThreadCallback
-> Thread
Destructor of the
ThreadReceiverstruct ThreadReceiverDestructorCallback
fnptr GetSystemTimeFnType
-> Instant
struct CreateThreadCallback
Callback that checks whether the thread has finished - the input argument is the
dropcheckfield on the Thread.fnptr CheckThreadFinishedFnType
arg c_void
-> bool
Get the current system time, equivalent to
std::time::Instant::now(), except it also works on systems that work with "ticks" instead of timersstruct GetSystemTimeCallback
fnptr LibrarySendThreadMsgFnType
arg c_void
arg ThreadSendMsg
-> bool
Function called to check if the thread has finished
struct CheckThreadFinishedCallback
fnptr LibraryReceiveThreadMsgFnType
arg c_void
Function to send a message to the thread
struct LibrarySendThreadMsgCallback
fnptr ThreadRecvFnType
arg c_void
Function to receive a message from the thread
struct LibraryReceiveThreadMsgCallback
fnptr ThreadSendFnType
arg c_void
arg ThreadReceiveMsg
-> bool
Function that the running
Threadcan call to receive messages from the main UI threadstruct ThreadRecvCallback
fnptr ThreadDestructorFnType
arg &mut Thread
Function that the running
Threadcan call to receive messages from the main UI threadstruct ThreadSendCallback
fnptr ThreadReceiverDestructorFnType
arg &mut ThreadReceiver
Destructor of the
Threadstruct ThreadDestructorCallback
fnptr ThreadSenderDestructorFnType
arg &mut ThreadSender
Destructor of the
ThreadSenderstruct ThreadSenderDestructorCallback
Type alias for extern "C" fn (*const c_void) -> bool
fnptr CheckThreadFinishedCallbackType
-> bool
Type alias for extern "C" fn (*mut AzInstantPtr)
fnptr InstantPtrDestructorCallbackType
arg c_void
-> c_void
Type alias for extern "C" fn (*mut ThreadReceiverInner)
fnptr ThreadReceiverDestructorCallbackType
arg c_void
-> c_void
Type alias for extern "C" fn (*const c_void) -> OptionThreadSendMsg
fnptr ThreadRecvCallbackType
arg c_void
-> c_void
Get the current system type, equivalent to
std::time::Instant::now(), except it also works on systems that don't have a clock (such as embedded timers)fnptr GetSystemTimeCallbackType
-> SystemTick
Type alias for extern "C" fn (*const AzInstantPtr) -> AzInstantPtr
fnptr InstantPtrCloneCallbackType
arg c_void
-> c_void
Definition of azuls internal
Stringwrappersmod str:
union enum FmtValue
Bool(bool)
Uchar(u8)
Schar(i8)
Ushort(u16)
Sshort(i16)
Uint(u32)
Sint(i32)
Ulong(u64)
Slong(i64)
Isize(isize)
Usize(usize)
Float(f32)
Double(f64)
Str(AzString)
StrVec(StringVec)
struct FmtArg
key: AzString
value: FmtValue
struct AzString
vec: U8Vec
constructor format:
constructor copy_from_bytes:
arg ptr: *const u8
arg start: usize
arg len: usize
-> AzString
Creates a dynamically formatted String from a fomat string + named arguments
Creates a new String from an arbitary pointer, a start offset (bytes from the start pointer, usually 0) and a length (in bytes). The bytes are expected to point to a UTF-8 encoded string, no error checking is performed.
Definition of azuls internal
Vec<*>wrappersmod vec:
Wrapper over a Rust-allocated
Vec<ListViewRow>struct ListViewRowVec has destructor
ptr: *const ListViewRow
len: usize
cap: usize
destructor: ListViewRowVecDestructor
Wrapper over a Rust-allocated
Vec<StyleFilter>struct StyleFilterVec has destructor
ptr: *const StyleFilter
len: usize
cap: usize
destructor: StyleFilterVecDestructor
Wrapper over a Rust-allocated
Vec<LogicalRect>struct LogicalRectVec has destructor
ptr: *const LogicalRect
len: usize
cap: usize
destructor: LogicalRectVecDestructor
Wrapper over a Rust-allocated
Vec<NodeTypeIdInfoMap>struct NodeTypeIdInfoMapVec has destructor
ptr: *const NodeTypeIdInfoMap
len: usize
cap: usize
destructor: NodeTypeIdInfoMapVecDestructor
Wrapper over a Rust-allocated
Vec<InputOutputTypeIdInfoMap>struct InputOutputTypeIdInfoMapVec has destructor
ptr: *const InputOutputTypeIdInfoMap
len: usize
cap: usize
destructor: InputOutputTypeIdInfoMapVecDestructor
Wrapper over a Rust-allocated
Vec<NodeIdNodeMap>struct NodeIdNodeMapVec has destructor
ptr: *const NodeIdNodeMap
len: usize
cap: usize
destructor: NodeIdNodeMapVecDestructor
Wrapper over a Rust-allocated
Vec<InputOutputTypeId>struct InputOutputTypeIdVec has destructor
ptr: *const InputOutputTypeId
len: usize
cap: usize
destructor: InputOutputTypeIdVecDestructor
Wrapper over a Rust-allocated
Vec<NodeTypeField>struct NodeTypeFieldVec has destructor
ptr: *const NodeTypeField
len: usize
cap: usize
destructor: NodeTypeFieldVecDestructor
Wrapper over a Rust-allocated
Vec<InputConnection>struct InputConnectionVec has destructor
ptr: *const InputConnection
len: usize
cap: usize
destructor: InputConnectionVecDestructor
Wrapper over a Rust-allocated
Vec<OutputNodeAndIndex>struct OutputNodeAndIndexVec has destructor
ptr: *const OutputNodeAndIndex
len: usize
cap: usize
destructor: OutputNodeAndIndexVecDestructor
Wrapper over a Rust-allocated
Vec<OutputConnection>struct OutputConnectionVec has destructor
ptr: *const OutputConnection
len: usize
cap: usize
destructor: OutputConnectionVecDestructor
Wrapper over a Rust-allocated
Vec<InputNodeAndIndex>struct InputNodeAndIndexVec has destructor
ptr: *const InputNodeAndIndex
len: usize
cap: usize
destructor: InputNodeAndIndexVecDestructor
Wrapper over a Rust-allocated
Vec<AccessibilityState>struct AccessibilityStateVec has destructor
ptr: *const AccessibilityState
len: usize
cap: usize
destructor: AccessibilityStateVecDestructor
Wrapper over a Rust-allocated
Vec<MenuItem>struct MenuItemVec has destructor
ptr: *const MenuItem
len: usize
cap: usize
destructor: MenuItemVecDestructor
Wrapper over a Rust-allocated
Vec<TessellatedSvgNode>struct TessellatedSvgNodeVec has destructor
ptr: *const TessellatedSvgNode
len: usize
cap: usize
destructor: TessellatedSvgNodeVecDestructor
fn as_ref_vec:
&self
Returns the
TessellatedSvgNodeVecas a non-owning slice, NOTE: TheU8Vecthat this slice was borrowed from MUST NOT be deleted before theU8VecRefWrapper over a Rust-allocated
Vec<TessellatedColoredSvgNode>struct TessellatedColoredSvgNodeVec has destructor
ptr: *const TessellatedColoredSvgNode
len: usize
cap: usize
destructor: TessellatedColoredSvgNodeVecDestructor
fn as_ref_vec:
&self
Returns the
TessellatedColoredSvgNodeVecas a non-owning slice, NOTE: TheTessellatedColoredSvgNodeVecthat this slice was borrowed from MUST NOT be deleted before theU8VecRefWrapper over a Rust-allocated
Vec<StyleFontFamily>struct StyleFontFamilyVec has destructor
ptr: *const StyleFontFamily
len: usize
cap: usize
destructor: StyleFontFamilyVecDestructor
Wrapper over a Rust-allocated
Vec<XmlNode>struct XmlNodeVec has destructor
ptr: *const XmlNode
len: usize
cap: usize
destructor: XmlNodeVecDestructor
Wrapper over a Rust-allocated
Vec<FmtArg>struct FmtArgVec has destructor
ptr: *const FmtArg
len: usize
cap: usize
destructor: FmtArgVecDestructor
Wrapper over a Rust-allocated
Vec<InlineLine>struct InlineLineVec has destructor
ptr: *const InlineLine
len: usize
cap: usize
destructor: InlineLineVecDestructor
Wrapper over a Rust-allocated
Vec<InlineWord>struct InlineWordVec has destructor
ptr: *const InlineWord
len: usize
cap: usize
destructor: InlineWordVecDestructor
Wrapper over a Rust-allocated
Vec<InlineGlyph>struct InlineGlyphVec has destructor
ptr: *const InlineGlyph
len: usize
cap: usize
destructor: InlineGlyphVecDestructor
Wrapper over a Rust-allocated
Vec<InlineTextHit>struct InlineTextHitVec has destructor
ptr: *const InlineTextHit
len: usize
cap: usize
destructor: InlineTextHitVecDestructor
Wrapper over a Rust-allocated
Vec<Monitor>struct MonitorVec has destructor
ptr: *const Monitor
len: usize
cap: usize
destructor: MonitorVecDestructor
Wrapper over a Rust-allocated
Vec<VideoMode>struct VideoModeVec has destructor
ptr: *const VideoMode
len: usize
cap: usize
destructor: VideoModeVecDestructor
Wrapper over a Rust-allocated
Vec<Dom>struct DomVec has destructor
ptr: *const Dom
len: usize
cap: usize
destructor: DomVecDestructor
Wrapper over a Rust-allocated
Vec<IdOrClass>struct IdOrClassVec has destructor
ptr: *const IdOrClass
len: usize
cap: usize
destructor: IdOrClassVecDestructor
Wrapper over a Rust-allocated
Vec<NodeDataInlineCssProperty>struct NodeDataInlineCssPropertyVec has destructor
ptr: *const NodeDataInlineCssProperty
len: usize
cap: usize
destructor: NodeDataInlineCssPropertyVecDestructor
Wrapper over a Rust-allocated
Vec<StyleBackgroundContent>struct StyleBackgroundContentVec has destructor
ptr: *const StyleBackgroundContent
len: usize
cap: usize
destructor: StyleBackgroundContentVecDestructor
Wrapper over a Rust-allocated
Vec<StyleBackgroundPosition>struct StyleBackgroundPositionVec has destructor
ptr: *const StyleBackgroundPosition
len: usize
cap: usize
destructor: StyleBackgroundPositionVecDestructor
Wrapper over a Rust-allocated
Vec<StyleBackgroundRepeat>struct StyleBackgroundRepeatVec has destructor
ptr: *const StyleBackgroundRepeat
len: usize
cap: usize
destructor: StyleBackgroundRepeatVecDestructor
Wrapper over a Rust-allocated
Vec<StyleBackgroundSize>struct StyleBackgroundSizeVec has destructor
ptr: *const StyleBackgroundSize
len: usize
cap: usize
destructor: StyleBackgroundSizeVecDestructor
Wrapper over a Rust-allocated
Vec<StyleTransform>struct StyleTransformVec has destructor
ptr: *const StyleTransform
len: usize
cap: usize
destructor: StyleTransformVecDestructor
Wrapper over a Rust-allocated
Vec<CssProperty>struct CssPropertyVec has destructor
ptr: *const CssProperty
len: usize
cap: usize
destructor: CssPropertyVecDestructor
Wrapper over a Rust-allocated
Vec<SvgMultiPolygon>struct SvgMultiPolygonVec has destructor
ptr: *const SvgMultiPolygon
len: usize
cap: usize
destructor: SvgMultiPolygonVecDestructor
Wrapper over a Rust-allocated
Vec<SvgSimpleNode>struct SvgSimpleNodeVec has destructor
ptr: *const SvgSimpleNode
len: usize
cap: usize
destructor: SvgSimpleNodeVecDestructor
Wrapper over a Rust-allocated
Vec<SvgPath>struct SvgPathVec has destructor
ptr: *const SvgPath
len: usize
cap: usize
destructor: SvgPathVecDestructor
Wrapper over a Rust-allocated
Vec<VertexAttribute>struct VertexAttributeVec has destructor
ptr: *const VertexAttribute
len: usize
cap: usize
destructor: VertexAttributeVecDestructor
Wrapper over a Rust-allocated
Vec<SvgPathElement>struct SvgPathElementVec has destructor
ptr: *const SvgPathElement
len: usize
cap: usize
destructor: SvgPathElementVecDestructor
Wrapper over a Rust-allocated
Vec<SvgVertex>struct SvgVertexVec has destructor
ptr: *const SvgVertex
len: usize
cap: usize
destructor: SvgVertexVecDestructor
Wrapper over a Rust-allocated
Vec<SvgColoredVertex>struct SvgColoredVertexVec has destructor
ptr: *const SvgColoredVertex
len: usize
cap: usize
destructor: SvgColoredVertexVecDestructor
Wrapper over a Rust-allocated
Vec<U32>struct U32Vec has destructor
ptr: *const U32
len: usize
cap: usize
destructor: U32VecDestructor
Wrapper over a Rust-allocated
Vec<XWindowType>struct XWindowTypeVec has destructor
ptr: *const XWindowType
len: usize
cap: usize
destructor: XWindowTypeVecDestructor
Wrapper over a Rust-allocated
Vec<VirtualKeyCode>struct VirtualKeyCodeVec has destructor
ptr: *const VirtualKeyCode
len: usize
cap: usize
destructor: VirtualKeyCodeVecDestructor
Wrapper over a Rust-allocated
Vec<CascadeInfo>struct CascadeInfoVec has destructor
ptr: *const CascadeInfo
len: usize
cap: usize
destructor: CascadeInfoVecDestructor
Wrapper over a Rust-allocated
Vec<ScanCode>struct ScanCodeVec has destructor
ptr: *const ScanCode
len: usize
cap: usize
destructor: ScanCodeVecDestructor
Wrapper over a Rust-allocated
Vec<CssDeclaration>struct CssDeclarationVec has destructor
ptr: *const CssDeclaration
len: usize
cap: usize
destructor: CssDeclarationVecDestructor
Wrapper over a Rust-allocated
Vec<CssPathSelector>struct CssPathSelectorVec has destructor
ptr: *const CssPathSelector
len: usize
cap: usize
destructor: CssPathSelectorVecDestructor
Wrapper over a Rust-allocated
Vec<Stylesheet>struct StylesheetVec has destructor
ptr: *const Stylesheet
len: usize
cap: usize
destructor: StylesheetVecDestructor
Wrapper over a Rust-allocated
Vec<CssRuleBlock>struct CssRuleBlockVec has destructor
ptr: *const CssRuleBlock
len: usize
cap: usize
destructor: CssRuleBlockVecDestructor
Wrapper over a Rust-allocated
Vec<U16>struct U16Vec has destructor
ptr: *const U16
len: usize
cap: usize
destructor: U16VecDestructor
Wrapper over a Rust-allocated
Vec<F32>struct F32Vec has destructor
ptr: *const F32
len: usize
cap: usize
destructor: F32VecDestructor
Wrapper over a Rust-allocated
Vec<U8>struct U8Vec has destructor
ptr: *const U8
len: usize
cap: usize
destructor: U8VecDestructor
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
CallbackDatastruct CallbackDataVec has destructor
ptr: *const CallbackData
len: usize
cap: usize
destructor: CallbackDataVecDestructor
fnptr NodeDataVecDestructorType
arg &mut NodeDataVec
Wrapper over a Rust-allocated
Vec<GLuint>struct GLuintVec has destructor
ptr: *const GLuint
len: usize
cap: usize
destructor: GLuintVecDestructor
Wrapper over a Rust-allocated
Vec<GLint>struct GLintVec has destructor
ptr: *const GLint
len: usize
cap: usize
destructor: GLintVecDestructor
Wrapper over a Rust-allocated
Vec<String>struct StringVec has destructor
ptr: *const String
len: usize
cap: usize
destructor: StringVecDestructor
Wrapper over a Rust-allocated
Vec<StringPair>struct StringPairVec has destructor
ptr: *const StringPair
len: usize
cap: usize
destructor: StringPairVecDestructor
Wrapper over a Rust-allocated
Vec<NormalizedLinearColorStop>struct NormalizedLinearColorStopVec has destructor
ptr: *const NormalizedLinearColorStop
len: usize
cap: usize
destructor: NormalizedLinearColorStopVecDestructor
Wrapper over a Rust-allocated
Vec<NormalizedRadialColorStop>struct NormalizedRadialColorStopVec has destructor
ptr: *const NormalizedRadialColorStop
len: usize
cap: usize
destructor: NormalizedRadialColorStopVecDestructor
Wrapper over a Rust-allocated
Vec<NodeId>struct NodeIdVec has destructor
ptr: *const NodeId
len: usize
cap: usize
destructor: NodeIdVecDestructor
Wrapper over a Rust-allocated
Vec<NodeHierarchyItem>struct NodeHierarchyItemVec has destructor
ptr: *const NodeHierarchyItem
len: usize
cap: usize
destructor: NodeHierarchyItemVecDestructor
Wrapper over a Rust-allocated
Vec<StyledNode>struct StyledNodeVec has destructor
ptr: *const StyledNode
len: usize
cap: usize
destructor: StyledNodeVecDestructor
Wrapper over a Rust-allocated
Vec<TagIdToNodeIdMapping>struct TagIdToNodeIdMappingVec has destructor
ptr: *const TagIdToNodeIdMapping
len: usize
cap: usize
destructor: TagIdToNodeIdMappingVecDestructor
Wrapper over a Rust-allocated
Vec<ParentWithNodeDepth>struct ParentWithNodeDepthVec has destructor
ptr: *const ParentWithNodeDepth
len: usize
cap: usize
destructor: ParentWithNodeDepthVecDestructor
Wrapper over a Rust-allocated
Vec<NodeData>struct NodeDataVec has destructor
ptr: *const NodeData
len: usize
cap: usize
destructor: NodeDataVecDestructor
union enum StyleFontFamilyVecDestructor
DefaultRust
NoDestructor
External(StyleFontFamilyVecDestructorType)
fnptr StyleFontFamilyVecDestructorType
arg &mut StyleFontFamilyVec
union enum ListViewRowVecDestructor
DefaultRust
NoDestructor
External(ListViewRowVecDestructorType)
fnptr ListViewRowVecDestructorType
arg &mut ListViewRowVec
union enum StyleFilterVecDestructor
DefaultRust
NoDestructor
External(StyleFilterVecDestructorType)
fnptr StyleFilterVecDestructorType
arg &mut StyleFilterVec
union enum LogicalRectVecDestructor
DefaultRust
NoDestructor
External(LogicalRectVecDestructorType)
fnptr LogicalRectVecDestructorType
arg &mut LogicalRectVec
union enum NodeTypeIdInfoMapVecDestructor
DefaultRust
NoDestructor
External(NodeTypeIdInfoMapVecDestructorType)
fnptr NodeTypeIdInfoMapVecDestructorType
arg &mut NodeTypeIdInfoMapVec
union enum InputOutputTypeIdInfoMapVecDestructor
DefaultRust
NoDestructor
fnptr InputOutputTypeIdInfoMapVecDestructorType
arg &mut InputOutputTypeIdInfoMapVec
union enum NodeIdNodeMapVecDestructor
DefaultRust
NoDestructor
External(NodeIdNodeMapVecDestructorType)
fnptr NodeIdNodeMapVecDestructorType
arg &mut NodeIdNodeMapVec
union enum InputOutputTypeIdVecDestructor
DefaultRust
NoDestructor
External(InputOutputTypeIdVecDestructorType)
fnptr InputOutputTypeIdVecDestructorType
arg &mut InputOutputTypeIdVec
union enum NodeTypeFieldVecDestructor
DefaultRust
NoDestructor
External(NodeTypeFieldVecDestructorType)
fnptr NodeTypeFieldVecDestructorType
arg &mut NodeTypeFieldVec
union enum InputConnectionVecDestructor
DefaultRust
NoDestructor
External(InputConnectionVecDestructorType)
fnptr InputConnectionVecDestructorType
arg &mut InputConnectionVec
union enum OutputNodeAndIndexVecDestructor
DefaultRust
NoDestructor
External(OutputNodeAndIndexVecDestructorType)
fnptr OutputNodeAndIndexVecDestructorType
arg &mut OutputNodeAndIndexVec
union enum OutputConnectionVecDestructor
DefaultRust
NoDestructor
External(OutputConnectionVecDestructorType)
fnptr OutputConnectionVecDestructorType
arg &mut OutputConnectionVec
union enum InputNodeAndIndexVecDestructor
DefaultRust
NoDestructor
External(InputNodeAndIndexVecDestructorType)
fnptr InputNodeAndIndexVecDestructorType
arg &mut InputNodeAndIndexVec
union enum AccessibilityStateVecDestructor
DefaultRust
NoDestructor
External(AccessibilityStateVecDestructorType)
fnptr AccessibilityStateVecDestructorType
arg &mut AccessibilityStateVec
union enum MenuItemVecDestructor
DefaultRust
NoDestructor
External(MenuItemVecDestructorType)
fnptr MenuItemVecDestructorType
arg &mut MenuItemVec
union enum TessellatedSvgNodeVecDestructor
DefaultRust
NoDestructor
External(TessellatedSvgNodeVecDestructorType)
fnptr TessellatedSvgNodeVecDestructorType
arg &mut TessellatedSvgNodeVec
union enum TessellatedColoredSvgNodeVecDestructor
DefaultRust
NoDestructor
fnptr TessellatedColoredSvgNodeVecDestructorType
arg &mut TessellatedColoredSvgNodeVec
union enum XmlNodeVecDestructor
DefaultRust
NoDestructor
External(XmlNodeVecDestructorType)
fnptr XmlNodeVecDestructorType
arg &mut XmlNodeVec
union enum FmtArgVecDestructor
DefaultRust
NoDestructor
External(FmtArgVecDestructorType)
fnptr FmtArgVecDestructorType
arg &mut FmtArgVec
union enum InlineLineVecDestructor
DefaultRust
NoDestructor
External(InlineLineVecDestructorType)
fnptr InlineLineVecDestructorType
arg &mut InlineLineVec
union enum InlineWordVecDestructor
DefaultRust
NoDestructor
External(InlineWordVecDestructorType)
fnptr InlineWordVecDestructorType
arg &mut InlineWordVec
union enum InlineGlyphVecDestructor
DefaultRust
NoDestructor
External(InlineGlyphVecDestructorType)
fnptr InlineGlyphVecDestructorType
arg &mut InlineGlyphVec
union enum InlineTextHitVecDestructor
DefaultRust
NoDestructor
External(InlineTextHitVecDestructorType)
fnptr InlineTextHitVecDestructorType
arg &mut InlineTextHitVec
union enum MonitorVecDestructor
DefaultRust
NoDestructor
External(MonitorVecDestructorType)
fnptr MonitorVecDestructorType
arg &mut MonitorVec
union enum VideoModeVecDestructor
DefaultRust
NoDestructor
External(VideoModeVecDestructorType)
fnptr VideoModeVecDestructorType
arg &mut VideoModeVec
union enum DomVecDestructor
DefaultRust
NoDestructor
External(DomVecDestructorType)
fnptr DomVecDestructorType
arg &mut DomVec
union enum IdOrClassVecDestructor
DefaultRust
NoDestructor
External(IdOrClassVecDestructorType)
fnptr IdOrClassVecDestructorType
arg &mut IdOrClassVec
union enum NodeDataInlineCssPropertyVecDestructor
DefaultRust
NoDestructor
fnptr NodeDataInlineCssPropertyVecDestructorType
arg &mut NodeDataInlineCssPropertyVec
union enum StyleBackgroundContentVecDestructor
DefaultRust
NoDestructor
External(StyleBackgroundContentVecDestructorType)
fnptr StyleBackgroundContentVecDestructorType
arg &mut StyleBackgroundContentVec
union enum StyleBackgroundPositionVecDestructor
DefaultRust
NoDestructor
External(StyleBackgroundPositionVecDestructorType)
fnptr StyleBackgroundPositionVecDestructorType
arg &mut StyleBackgroundPositionVec
union enum StyleBackgroundRepeatVecDestructor
DefaultRust
NoDestructor
External(StyleBackgroundRepeatVecDestructorType)
fnptr StyleBackgroundRepeatVecDestructorType
arg &mut StyleBackgroundRepeatVec
union enum StyleBackgroundSizeVecDestructor
DefaultRust
NoDestructor
External(StyleBackgroundSizeVecDestructorType)
fnptr StyleBackgroundSizeVecDestructorType
arg &mut StyleBackgroundSizeVec
union enum StyleTransformVecDestructor
DefaultRust
NoDestructor
External(StyleTransformVecDestructorType)
fnptr StyleTransformVecDestructorType
arg &mut StyleTransformVec
union enum CssPropertyVecDestructor
DefaultRust
NoDestructor
External(CssPropertyVecDestructorType)
fnptr CssPropertyVecDestructorType
arg &mut CssPropertyVec
union enum SvgMultiPolygonVecDestructor
DefaultRust
NoDestructor
External(SvgMultiPolygonVecDestructorType)
fnptr SvgMultiPolygonVecDestructorType
arg &mut SvgMultiPolygonVec
union enum SvgSimpleNodeVecDestructor
DefaultRust
NoDestructor
External(SvgSimpleNodeVecDestructorType)
fnptr SvgSimpleNodeVecDestructorType
arg &mut SvgSimpleNodeVec
union enum SvgPathVecDestructor
DefaultRust
NoDestructor
External(SvgPathVecDestructorType)
fnptr SvgPathVecDestructorType
arg &mut SvgPathVec
union enum VertexAttributeVecDestructor
DefaultRust
NoDestructor
External(VertexAttributeVecDestructorType)
fnptr VertexAttributeVecDestructorType
arg &mut VertexAttributeVec
union enum SvgPathElementVecDestructor
DefaultRust
NoDestructor
External(SvgPathElementVecDestructorType)
fnptr SvgPathElementVecDestructorType
arg &mut SvgPathElementVec
union enum SvgVertexVecDestructor
DefaultRust
NoDestructor
External(SvgVertexVecDestructorType)
fnptr SvgVertexVecDestructorType
arg &mut SvgVertexVec
union enum SvgColoredVertexVecDestructor
DefaultRust
NoDestructor
External(SvgColoredVertexVecDestructorType)
fnptr SvgColoredVertexVecDestructorType
arg &mut SvgColoredVertexVec
union enum U32VecDestructor
DefaultRust
NoDestructor
External(U32VecDestructorType)
fnptr U32VecDestructorType
arg &mut U32Vec
union enum XWindowTypeVecDestructor
DefaultRust
NoDestructor
External(XWindowTypeVecDestructorType)
fnptr XWindowTypeVecDestructorType
arg &mut XWindowTypeVec
union enum VirtualKeyCodeVecDestructor
DefaultRust
NoDestructor
External(VirtualKeyCodeVecDestructorType)
fnptr VirtualKeyCodeVecDestructorType
arg &mut VirtualKeyCodeVec
union enum CascadeInfoVecDestructor
DefaultRust
NoDestructor
External(CascadeInfoVecDestructorType)
fnptr CascadeInfoVecDestructorType
arg &mut CascadeInfoVec
union enum ScanCodeVecDestructor
DefaultRust
NoDestructor
External(ScanCodeVecDestructorType)
fnptr ScanCodeVecDestructorType
arg &mut ScanCodeVec
union enum CssDeclarationVecDestructor
DefaultRust
NoDestructor
External(CssDeclarationVecDestructorType)
fnptr CssDeclarationVecDestructorType
arg &mut CssDeclarationVec
union enum CssPathSelectorVecDestructor
DefaultRust
NoDestructor
External(CssPathSelectorVecDestructorType)
fnptr CssPathSelectorVecDestructorType
arg &mut CssPathSelectorVec
union enum StylesheetVecDestructor
DefaultRust
NoDestructor
External(StylesheetVecDestructorType)
fnptr StylesheetVecDestructorType
arg &mut StylesheetVec
union enum CssRuleBlockVecDestructor
DefaultRust
NoDestructor
External(CssRuleBlockVecDestructorType)
fnptr CssRuleBlockVecDestructorType
arg &mut CssRuleBlockVec
union enum F32VecDestructor
DefaultRust
NoDestructor
External(F32VecDestructorType)
fnptr F32VecDestructorType
arg &mut F32Vec
union enum U16VecDestructor
DefaultRust
NoDestructor
External(U16VecDestructorType)
fnptr U16VecDestructorType
arg &mut U16Vec
union enum U8VecDestructor
DefaultRust
NoDestructor
External(U8VecDestructorType)
fnptr U8VecDestructorType
arg &mut U8Vec
union enum CallbackDataVecDestructor
DefaultRust
NoDestructor
External(CallbackDataVecDestructorType)
fnptr CallbackDataVecDestructorType
arg &mut CallbackDataVec
Wrapper over a Rust-allocated
Vec<AzDebugMessage>struct AzDebugMessageVec has destructor
ptr: *const AzDebugMessage
len: usize
cap: usize
destructor: AzDebugMessageVecDestructor
fnptr DebugMessageVecDestructorType
arg &mut AzDebugMessageVec
union enum GLuintVecDestructor
DefaultRust
NoDestructor
External(GLuintVecDestructorType)
fnptr GLuintVecDestructorType
arg &mut GLuintVec
union enum GLintVecDestructor
DefaultRust
NoDestructor
External(GLintVecDestructorType)
fnptr GLintVecDestructorType
arg &mut GLintVec
union enum StringVecDestructor
DefaultRust
NoDestructor
External(StringVecDestructorType)
fnptr StringVecDestructorType
arg &mut StringVec
union enum StringPairVecDestructor
DefaultRust
NoDestructor
External(StringPairVecDestructorType)
fnptr StringPairVecDestructorType
arg &mut StringPairVec
union enum NormalizedLinearColorStopVecDestructor
DefaultRust
NoDestructor
fnptr NormalizedLinearColorStopVecDestructorType
arg &mut NormalizedLinearColorStopVec
union enum NormalizedRadialColorStopVecDestructor
DefaultRust
NoDestructor
fnptr NormalizedRadialColorStopVecDestructorType
arg &mut NormalizedRadialColorStopVec
union enum NodeIdVecDestructor
DefaultRust
NoDestructor
External(NodeIdVecDestructorType)
fnptr NodeIdVecDestructorType
arg &mut NodeIdVec
union enum NodeHierarchyItemVecDestructor
DefaultRust
NoDestructor
External(NodeHierarchyItemVecDestructorType)
fnptr NodeHierarchyItemVecDestructorType
arg &mut NodeHierarchyItemVec
union enum StyledNodeVecDestructor
DefaultRust
NoDestructor
External(StyledNodeVecDestructorType)
fnptr StyledNodeVecDestructorType
arg &mut StyledNodeVec
union enum TagIdToNodeIdMappingVecDestructor
DefaultRust
NoDestructor
External(TagIdToNodeIdMappingVecDestructorType)
fnptr TagIdToNodeIdMappingVecDestructorType
arg &mut TagIdToNodeIdMappingVec
union enum ParentWithNodeDepthVecDestructor
DefaultRust
NoDestructor
External(ParentWithNodeDepthVecDestructorType)
fnptr ParentWithNodeDepthVecDestructorType
arg &mut ParentWithNodeDepthVec
union enum NodeDataVecDestructor
DefaultRust
NoDestructor
External(NodeDataVecDestructorType)
union enum AzDebugMessageVecDestructor
DefaultRust
NoDestructor
External(AzDebugMessageVecDestructorType)
fnptr OptionU8VecDestructorType
arg &mut OptionU8Vec
Wrapper over a Rust-allocated
Vec<Attribute>struct AttributeVec has destructor
ptr: *const Attribute
len: usize
cap: usize
destructor: AttributeVecDestructor
union enum OptionU8VecDestructor
DefaultRust
NoDestructor
External(OptionU8VecDestructorType)
Wrapper over a Rust-allocated
Vec<CoreCallbackData>struct CoreCallbackDataVec has destructor
ptr: *const CoreCallbackData
len: usize
cap: usize
destructor: CoreCallbackDataVecDestructor
fnptr XmlNodeChildVecDestructorType
arg &mut XmlNodeChildVec
union enum OptionStringVecDestructor
DefaultRust
NoDestructor
External(OptionStringVecDestructorType)
fnptr AttributeVecDestructorType
arg &mut AttributeVec
Wrapper over a Rust-allocated
Vec<AccessibilityAction>struct AccessibilityActionVec has destructor
ptr: *const AccessibilityAction
len: usize
cap: usize
destructor: AccessibilityActionVecDestructor
union enum XmlNodeChildVecDestructor
DefaultRust
NoDestructor
External(XmlNodeChildVecDestructorType)
fnptr AccessibilityActionVecDestructorType
arg &mut AccessibilityActionVec
Wrapper over a Rust-allocated
Vec<XmlNodeChild>struct XmlNodeChildVec has destructor
ptr: *const XmlNodeChild
len: usize
cap: usize
destructor: XmlNodeChildVecDestructor
fnptr OptionStringVecDestructorType
arg &mut OptionStringVec
union enum AttributeVecDestructor
DefaultRust
NoDestructor
External(AttributeVecDestructorType)
fnptr AzDebugMessageVecDestructorType
arg &mut AzDebugMessageVec
fnptr CoreCallbackDataVecDestructorType
arg &mut CoreCallbackDataVec
union enum AccessibilityActionVecDestructor
DefaultRust
NoDestructor
External(AccessibilityActionVecDestructorType)
Wrapper over a Rust-allocated
Vec<OptionString>struct OptionStringVec has destructor
ptr: *const OptionString
len: usize
cap: usize
destructor: OptionStringVecDestructor
union enum CoreCallbackDataVecDestructor
DefaultRust
NoDestructor
External(CoreCallbackDataVecDestructorType)
Wrapper over a Rust-allocated
Vec<OptionU8>struct OptionU8Vec has destructor
ptr: *const OptionU8
len: usize
cap: usize
destructor: OptionU8VecDestructor
Definition of azuls internal
Option<*>wrappersmod option:
union enum OptionSvgPoint
None
Some(SvgPoint)
union enum OptionStyleTextAlign
None
Some(StyleTextAlign)
union enum OptionListViewOnRowClick has destructor
None
Some(ListViewOnRowClick)
union enum OptionListViewOnColumnClick has destructor
None
Some(ListViewOnColumnClick)
union enum OptionListViewOnLazyLoadScroll has destructor
None
Some(ListViewOnLazyLoadScroll)
union enum OptionMenu has destructor
None
Some(Menu)
union enum OptionPixelValueNoPercent
None
Some(PixelValueNoPercent)
union enum OptionDropDownOnChoiceChange has destructor
None
Some(DropDownOnChoiceChange)
union enum OptionResolvedTextLayoutOptions has destructor
None
union enum OptionU8VecRef
None
Some(U8VecRef)
union enum OptionOnNodeAdded has destructor
None
Some(OnNodeAdded)
union enum OptionOnNodeRemoved has destructor
None
Some(OnNodeRemoved)
union enum OptionOnNodeGraphDragged has destructor
None
Some(OnNodeGraphDragged)
union enum OptionOnNodeDragged has destructor
None
Some(OnNodeDragged)
union enum OptionOnNodeConnected has destructor
None
Some(OnNodeConnected)
union enum OptionOnNodeInputDisconnected has destructor
None
Some(OnNodeInputDisconnected)
union enum OptionOnNodeOutputDisconnected has destructor
None
Some(OnNodeOutputDisconnected)
union enum OptionColorInputOnValueChange has destructor
None
Some(ColorInputOnValueChange)
union enum OptionButtonOnClick has destructor
None
Some(ButtonOnClick)
union enum OptionTabOnClick has destructor
None
Some(TabOnClick)
union enum OptionFileInputOnPathChange has destructor
None
Some(FileInputOnPathChange)
union enum OptionCheckBoxOnToggle has destructor
None
Some(CheckBoxOnToggle)
union enum OptionTextInputOnTextInput has destructor
None
Some(TextInputOnTextInput)
union enum OptionTextInputOnVirtualKeyDown has destructor
None
union enum OptionTextInputOnFocusLost has destructor
None
Some(TextInputOnFocusLost)
union enum OptionTextInputSelection
None
Some(TextInputSelection)
union enum OptionNumberInputOnFocusLost has destructor
None
Some(NumberInputOnFocusLost)
union enum OptionNumberInputOnValueChange has destructor
None
Some(NumberInputOnValueChange)
union enum OptionMenuItemIcon has destructor
None
Some(MenuItemIcon)
Optional MenuCallback
union enum OptionMenuCallback has destructor
None
Some(MenuCallback)
union enum OptionVirtualKeyCodeCombo has destructor
None
Some(VirtualKeyCodeCombo)
union enum OptionCssProperty
None
Some(CssProperty)
union enum OptionPositionInfo
None
Some(PositionInfo)
union enum OptionTimerId
None
Some(TimerId)
union enum OptionThreadId
None
Some(ThreadId)
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
None
Some(FontRef)
union enum OptionOnNodeFieldEdited has destructor
None
Some(OnNodeFieldEdited)
union enum OptionFileTypeList
None
Some(FileTypeList)
union enum OptionWindowState has destructor
None
Some(WindowState)
union enum OptionMouseState
None
Some(MouseState)
union enum OptionKeyboardState has destructor
None
Some(KeyboardState)
union enum OptionStringVec
None
Some(StringVec)
union enum OptionFile
None
Some(File)
union enum OptionClipboard
None
Some(Clipboard)
union enum OptionThreadReceiveMsg has destructor
None
Some(ThreadReceiveMsg)
union enum OptionPercentageValue
None
Some(PercentageValue)
union enum OptionAngleValue
None
Some(AngleValue)
union enum OptionRendererOptions
None
Some(RendererOptions)
Optional Callback
union enum OptionCallback
None
Some(Callback)
union enum OptionThreadSendMsg has destructor
None
Some(ThreadSendMsg)
union enum OptionLayoutRect
None
Some(LayoutRect)
union enum OptionRefAny has destructor
None
Some(RefAny)
union enum OptionInlineText has destructor
None
Some(InlineText)
union enum OptionLayoutPoint
None
Some(LayoutPoint)
union enum OptionLayoutSize
None
Some(LayoutSize)
union enum OptionWindowTheme
None
Some(WindowTheme)
union enum OptionNodeId
None
Some(NodeHierarchyItemId)
union enum OptionDomNodeId
None
Some(DomNodeId)
union enum OptionColorU
None
Some(ColorU)
union enum OptionRawImage
None
Some(RawImage)
union enum OptionSvgDashPattern
None
Some(SvgDashPattern)
union enum OptionWaylandTheme
None
Some(WaylandTheme)
union enum OptionTaskBarIcon
None
Some(TaskBarIcon)
union enum OptionHwndHandle
None
Some(*mut c_void)
union enum OptionLogicalPosition
None
Some(LogicalPosition)
union enum OptionPhysicalPositionI32
None
Some(PhysicalPositionI32)
union enum OptionWindowIcon
None
Some(WindowIcon)
union enum OptionGlContextPtr has destructor
None
Some(GlContextPtr)
union enum OptionX11Visual
None
Some(*const c_void)
union enum OptionI32
None
Some(i32)
union enum OptionF32
None
Some(f32)
union enum OptionMouseCursorType
None
Some(MouseCursorType)
union enum OptionLogicalSize
None
Some(LogicalSize)
Option<char> but the char is a u32, for C FFI stability reasons
union enum OptionChar
None
Some(u32)
union enum OptionVirtualKeyCode
None
Some(VirtualKeyCode)
union enum OptionDom has destructor
None
Some(Dom)
union enum OptionTexture has destructor
None
Some(Texture)
union enum OptionImageMask has destructor
None
Some(ImageMask)
union enum OptionTabIndex
None
Some(TabIndex)
union enum OptionTagId
None
Some(AzTagId)
union enum OptionDuration
None
Some(Duration)
union enum OptionInstant has destructor
None
Some(Instant)
union enum OptionUsize
None
Some(usize)
union enum OptionU8Vec
None
Some(U8Vec)
union enum OptionAzString
None
Some(AzString)
Definition of error and
Result<T, E>typesmod error:
union enum ResultXmlXmlError has destructor
Ok(Xml)
Err(XmlError)
union enum ResultRawImageDecodeImageError
Ok(RawImage)
Err(DecodeImageError)
union enum ResultU8VecEncodeImageError
Ok(U8Vec)
Err(EncodeImageError)
union enum ResultSvgXmlNodeSvgParseError has destructor
Ok(SvgXmlNode)
Err(SvgParseError)
union enum ResultSvgSvgParseError has destructor
Ok(Svg)
Err(SvgParseError)
union enum SvgParseError
NoParserAvailable
ElementsLimitReached
NotAnUtf8Str
MalformedGZip
InvalidSize
ParsingFailed(XmlError)
union enum XmlError
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(AzString, AzString)
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
ns: AzString
pos: XmlTextPos
struct UnknownNamespaceError
ns: AzString
pos: XmlTextPos
struct UnexpectedCloseTagError
expected: AzString
actual: AzString
pos: XmlTextPos
struct UnknownEntityReferenceError
entity: AzString
pos: XmlTextPos
struct DuplicatedAttributeError
attribute: AzString
pos: XmlTextPos
union enum XmlParseError
InvalidDeclaration(XmlTextError)
InvalidComment(XmlTextError)
InvalidPI(XmlTextError)
InvalidDoctype(XmlTextError)
InvalidEntity(XmlTextError)
InvalidElement(XmlTextError)
InvalidAttribute(XmlTextError)
InvalidCdata(XmlTextError)
InvalidCharData(XmlTextError)
UnknownToken(XmlTextPos)
struct XmlTextError
stream_error: XmlStreamError
pos: XmlTextPos
union enum XmlStreamError
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
expected: u8
got: U8Vec
pos: XmlTextPos
struct InvalidQuoteError
got: u8
pos: XmlTextPos
struct InvalidSpaceError
got: u8
pos: XmlTextPos
struct InvalidStringError
got: AzString
pos: XmlTextPos
struct XmlTextPos
row: u32
col: u32
Resource management
mod resources:
Stores the resources for the application, souch as fonts, images and cached texts, also clipboard strings Images and fonts can be references across window contexts (not yet tested, but should work).
struct ImageCache
The AzString is the string used in the CSS, i.e. url("my_image") = "my_image" -> ImageId(4) NOTE: This is the only map that is modifiable by the user and that has to be manually managed all other maps are library-internal only and automatically delete their resources once they aren't needed anymore
image_id_map: FastHashMap < AzString , ImageRef >
struct FontCache
ptr: *const c_void
enum RawImageFormat
R8
RG8
RGB8
RGBA8
R16
RG16
RGB16
RGBA16
BGR8
BGRA8
RGBF32
RGBAF32
enum AppLogLevel
Off
Error
Warn
Info
Debug
Trace
union enum RawImageData
U8(U8Vec)
U16(U16Vec)
F32(F32Vec)
struct LoadedFontSource
data: U8Vec
index: u32
load_outlines: bool
Configuration for optional features, such as whether to enable logging or panic hooks
struct AppConfig
If enabled, logs error and info messages. Default is
LevelFilter::Errorto log all errors by defaultlog_level: AppLogLevel
If the app crashes / panics, a window with a message box pops up. Setting this to
falsedisables the popup box.enable_visual_panic_hook: bool
If this is set to
true(the default), a backtrace + error information gets logged to stdout and the logging file (only if logging is enabled).enable_logging_on_panic: bool
(STUB) Whether keyboard navigation should be enabled (default: true). Currently not implemented.
enable_tab_navigation: bool
Determines what happens when all windows are closed. Default: EndProcess (terminate when last window closes).
termination_behavior: AppTerminationBehavior
struct ImageMask has destructor
image: ImageRef
rect: LogicalRect
repeat: bool
struct ImageRef
Shared pointer to an opaque implementation of the decoded image
data: *const c_void
How many copies does this image have (if 0, the font data will be deleted on drop)
copies: *const c_void
run_destructor: bool
struct RawImage
pixels: RawImageData
width: usize
height: usize
premultiplied_alpha: bool
data_format: RawImageFormat
tag: U8Vec
struct DpiScaleFactor
inner: FloatValue
Determines what happens when all application windows are closed
enum AppTerminationBehavior
Return control to main() when all windows are closed (if platform supports it). On macOS, this exits the NSApplication run loop and returns to main(). This is useful if you want to clean up resources or restart the event loop.
ReturnToMain
Keep the application running even when all windows are closed. This is the standard macOS behavior (app stays in dock until explicitly quit).
RunForever
Immediately terminate the process when all windows are closed. Calls std::process::exit(0).
EndProcess
mod thread:
Callback for sending messages from thread to main thread
fnptr ThreadSendCallbackType
arg c_void
arg ThreadReceiveMsg
-> bool
struct ThreadSendCallback
struct ThreadSenderDestructorCallback
struct ThreadDestructorCallback
ThreadSender allows sending messages from the background thread to the main thread
struct ThreadSender
ptr: *const c_void
run_destructor: bool
struct ThreadCallback
struct LibraryReceiveThreadMsgCallback
Message that is sent back from the running thread to the main thread
union enum ThreadReceiveMsg has destructor
WriteBack(ThreadWriteBackMsg)
Update(Update)
Wrapper around Thread because Thread needs to be clone-able
struct Thread
ptr: *const c_void
run_destructor: bool
Callback that can run when a thread receives a
WriteBackmessagestruct WriteBackCallback
struct CreateThreadCallback
Message containing writeback data and callback
struct ThreadWriteBackMsg has destructor
data: RefAny
callback: WriteBackCallback
Type alias for c_void) -> OptionThreadReceiveMsg
fnptr LibraryReceiveThreadMsgCallbackType
arg c_void
mod node_graph:
mod dialogs:
Color picker dialog wrapper for reserved integration purposes
struct ColorPickerDialog
reserved pointer (currently nullptr) for potential C extension
_reserved: *mut c_void
enum OkCancel
Ok
Cancel
File dialog wrapper for reserved integration purposes
struct FileDialog
reserved pointer (currently nullptr) for potential C extension
_reserved: *mut c_void
struct FileTypeList
document_types: StringVec
document_descriptor: AzString
Yes or No result, returned from the
msg_box_yes_nofunctionenum YesNo
Yes
No
Button dialog wrapper for reserved integration purposes
struct MsgBox
reserved pointer (currently nullptr) for potential C extension
_reserved: *mut c_void
MsgBox icon to use in the
msg_box_*functionsenum MsgBoxIcon
Info
Warning
Error
Question
mod timer:
Information passed to timer callbacks This wraps
CallbackInfoand adds timer-specific fields like call_count and frame_start. ThroughDeref<Target = CallbackInfo>, all methods fromCallbackInfoare available, including the transactionalpush_change()API. # Example ignore extern "C" fn animate_timer( data: &mut RefAny, info: &mut TimerCallbackInfo, ) -> TimerCallbackReturn { // Timer-specific fields let call_count = info.call_count; let frame_start = info.frame_start; // All CallbackInfo methods are available via Deref: info.update_image_callback(dom_id, node_id); // ← from CallbackInfo info.add_timer(timer_id, timer); // ← from CallbackInfo TimerCallbackReturn::continue_unchanged() }struct TimerCallbackInfo has destructor
callback_info: CallbackInfo
node_id: OptionDomNodeId
frame_start: Instant
call_count: usize
is_about_to_finish: bool
_abi_ref: *const c_void
_abi_mut: *mut c_void
Callback that runs on every frame on the main thread
struct TimerCallback
A
Timeris a function that runs on every frame or at intervals.struct Timer has destructor
data: RefAny
node_id: OptionDomNodeId
created: Instant
last_run: OptionInstant
run_count: usize
delay: OptionDuration
interval: OptionDuration
timeout: OptionDuration
callback: TimerCallback
mod drop_down:
mod list_view:
mod text_input:
mod events:
The inverse of an
onclickevent filter, fires when an item is *not* hovered / focused. This is useful for cleanly implementing things like popover dialogs or dropdown boxes that want to close when the user clicks any where *but* the item itself.union enum NotEventFilter
Hover(HoverEventFilter)
Focus(FocusEventFilter)
Sets the target for what events can reach the callbacks specifically. This determines the condition under which an event is fired, such as whether the node is hovered, focused, or if the event is window-global.
union enum EventFilter
Calls the attached callback when the mouse is actively over the given element.
Hover(HoverEventFilter)
Inverse of
Hover- calls the attached callback if the mouse is not over the given element. This is particularly useful for popover menus where you want to close the menu when the user clicks anywhere else but the menu itself.Not(NotEventFilter)
Calls the attached callback when the element is currently focused.
Focus(FocusEventFilter)
Calls the callback when anything related to the window is happening. The "hit item" will be the root item of the DOM. For example, this can be useful for tracking the mouse position (in relation to the window). In difference to
Desktop, this only fires when the window is focused. This can also be good for capturing controller input, touch input (i.e. global gestures that aren't attached to any component, but rather the "window" itself).Window(WindowEventFilter)
API stub: Something happened with the node itself (node resized, created or removed).
Component(ComponentEventFilter)
Something happened with the application (started, shutdown, device plugged in).
Application(ApplicationEventFilter)
Event filter similar to
HoverEventFilterthat only fires when the element is focused. Important: In order for this to fire, the item must have atabindexattribute (to indicate that the item is focus-able).enum FocusEventFilter
MouseOver
MouseDown
LeftMouseDown
RightMouseDown
MiddleMouseDown
MouseUp
LeftMouseUp
RightMouseUp
MiddleMouseUp
MouseEnter
MouseLeave
Scroll
ScrollStart
ScrollEnd
TextInput
VirtualKeyDown
VirtualKeyUp
FocusReceived
FocusLost
Pen events on focused element
PenDown
PenMove
PenUp
Drag started on focused element
DragStart
Drag in progress on focused element
Drag
Drag ended on focused element
DragEnd
Double-click on focused element
DoubleClick
Long press on focused element
LongPress
Swipe gestures on focused element
SwipeLeft
SwipeRight
SwipeUp
SwipeDown
Pinch gesture on focused element
PinchIn
PinchOut
Rotation gesture on focused element
RotateClockwise
RotateCounterClockwise
Defines events related to the lifecycle of a DOM node itself.
enum ComponentEventFilter
Fired after the component is first mounted into the DOM.
AfterMount
Fired just before the component is removed from the DOM.
BeforeUnmount
Fired when the node's layout rectangle has been resized.
NodeResized
Fired to trigger the default action for an accessibility component.
DefaultAction
Fired when the component becomes selected.
Selected
Event filter that only fires when an element is hovered over.
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
Pen/stylus made contact with surface
PenDown
Pen/stylus moved while in contact
PenMove
Pen/stylus lifted from surface
PenUp
Pen/stylus entered proximity (hovering without contact)
PenEnter
Pen/stylus left proximity
PenLeave
Drag started (mouse moved beyond threshold while button down)
DragStart
Drag in progress (mouse moved during drag)
Drag
Drag ended (mouse button released after drag)
DragEnd
Double-click detected (two clicks within time/distance threshold)
DoubleClick
Long press detected (button held down for extended time)
LongPress
Swipe gesture detected (fast directional movement)
SwipeLeft
SwipeRight
SwipeUp
SwipeDown
Pinch gesture (two-finger zoom)
PinchIn
PinchOut
Rotation gesture (two-finger rotate)
RotateClockwise
RotateCounterClockwise
Internal: Single click detected (for text cursor placement) This is distinct from MouseDown - it fires after MouseUp on the same element
SystemTextSingleClick
Internal: Double click detected (for word selection)
SystemTextDoubleClick
Internal: Triple click detected (for paragraph/line selection)
SystemTextTripleClick
Event filter that fires when any action fires on the entire window (regardless of whether any element is hovered or focused over).
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
Pen events anywhere in window
PenDown
PenMove
PenUp
PenEnter
PenLeave
Drag started anywhere in window
DragStart
Drag in progress anywhere in window
Drag
Drag ended anywhere in window
DragEnd
Double-click anywhere in window
DoubleClick
Long press anywhere in window
LongPress
Swipe gestures anywhere in window
SwipeLeft
SwipeRight
SwipeUp
SwipeDown
Pinch gesture anywhere in window
PinchIn
PinchOut
Rotation gesture anywhere in window
RotateClockwise
RotateCounterClockwise
Defines application-level events not tied to a specific window or node.
enum ApplicationEventFilter
Fired when a new hardware device is connected.
DeviceConnected
Fired when a hardware device is disconnected.
DeviceDisconnected
mod file:
mod animation:
Specifies how many times an animation cycle should repeat.
union enum AnimationRepeatCount
The animation repeats for a specific number of cycles.
Times(usize)
The animation repeats indefinitely.
Infinite
Specifies which image layer of an element an animation should apply to.
enum UpdateImageType
The animation targets the element's background.
Background
The animation targets the element's main content.
Content
Describes the behavior of an animation when it reaches the end of a cycle.
enum AnimationRepeat
The animation plays once and then stops.
NoRepeat
The animation restarts from the beginning after finishing.
Loop
The animation plays forwards, then backwards, alternating each cycle.
PingPong
Defines the static configuration for a CSS animation, parsed from a stylesheet.
struct Animation
The
CssPropertyat the beginning of the animation (0% keyframe).from: CssProperty
The
CssPropertyat the end of the animation (100% keyframe).to: CssProperty
The time it takes for the animation to complete one cycle.
duration: AzDuration
The repetition behavior to apply when a cycle finishes.
repeat: AnimationRepeat
How many times the animation should repeat.
repeat_times: AnimationRepeatCount
The easing function that dictates the animation's rate of change.
easing: AnimationInterpolationFunction
If
true, a full relayout is performed after the animation concludes.relayout_on_finish: bool
mod default:
mod number_input:
mod prop_cache:
struct CssPropertyCachePtr
ptr: *const c_void
run_destructor: bool
mod color_input:
mod ribbon:
mod file_input:
mod geom:
struct LogicalSize
width: f32
height: f32
struct PhysicalPosition
x: T
y: T
struct LogicalRect
origin: LogicalPosition
size: LogicalSize
struct LogicalPosition
x: f32
y: f32
struct PhysicalSize
width: T
height: T
mod tabs:
mod check_box:
mod window_state:
Options for creating a new window
struct WindowCreateOptions has destructor
state: FullWindowState
size_to_content: bool
renderer: OptionRendererOptions
theme: OptionWindowTheme
create_callback: OptionCallback
hot_reload: bool
Full window state including internal fields not exposed to callbacks
struct FullWindowState has destructor
theme: WindowTheme
title: AzString
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 (not the full Monitor struct - just the identifier)
monitor_id: Optionu32
window_focused: bool
mod button:
mod refany:
Wrapper around a heap-allocated
RefCountInner. This is the shared metadata that allRefAnyclones point to. When the lastRefCountis dropped, theRefCountInneris deallocated, but the actual data deallocation is handled byRefAny::drop. # Whyrun_destructor: boolThis flag prevents double-free when aRefAnyclones theRefCount. Only the owningRefAnyshould handle data deallocation.struct RefCount
ptr: *const c_void
run_destructor: bool
Type-erased, reference-counted smart pointer with runtime borrow checking.
RefAnyis similar toArc<RefCell<dyn Any>>, providing: - Type erasure (stores any'statictype) - Reference counting (clones share the same data) - Runtime borrow checking (enforces Rust's borrowing rules at runtime) - FFI compatibility (#[repr(C)]and C-compatible API) # Thread Safety -Send: Can be moved between threads (heap-allocated data, atomic counters) -Sync: Can be shared between threads (downcast_ref/mutrequire&mut self) # Memory Safety Fixed critical UB bugs in alignment, copy count, and pointer provenance (see REFANY_UB_FIXES.md). All operations are verified with Miri to ensure absence of undefined behavior. # Usage# use azul_core::refany::RefAny; let data = RefAny::new(42i32); let mut data_clone = data.clone(); // shares the same heap allocation // Runtime-checked downcasting with type safety if let Some(value_ref) = data_clone.downcast_ref::<i32>() { assert_eq!(*value_ref, 42); }; // Runtime-checked mutable borrowing if let Some(mut value_mut) = data_clone.downcast_mut::<i32>() { *value_mut = 100; };struct RefAny has destructor
Type-erased pointer to heap-allocated data. SAFETY: Must be properly aligned for the stored type (guaranteed by
Layout::from_size_aligninnew_c). Never null for non-ZST types._internal_ptr: *const c_void
Shared metadata: reference counts, type info, destructor. All
RefAnyclones point to the sameRefCountInnervia this field.sharing_info: RefCount
Unique ID for this specific clone (root = 0, subsequent clones increment). Used to distinguish between the original and clones for debugging.
instance_id: u64
Whether this instance should run the destructor on drop. Set to false when data is moved out or explicitly prevented.
run_destructor: bool
mod id:
Hierarchical information about a node (stores the indicies of the parent / child nodes).
struct Node
parent: OptionNodeId
previous_sibling: OptionNodeId
next_sibling: OptionNodeId
last_child: OptionNodeId
mod shade: