v1.0.0-alpha1
App
construction and configurationmod app:
Main application class
struct App has destructor
ptr: *const c_void
run_destructor: bool
constructor new:
Creates a new App instance from the given
AppConfig
fn add_window:
&mut self
arg window: WindowCreateOptions
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
Vec
will be empty on wasm32-> MonitorVec
fn run:
&self
arg window: WindowCreateOptions
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
WinMain
on Windows), this function never returns.Configuration for optional features, such as whether to enable logging or panic hooks
struct AppConfig
Which layout solver version to use, necessary so that future upgrades don't break the layout of old programs
layout_solver: LayoutSolver
If enabled, logs error and info messages
log_level: AppLogLevel
If the app crashes / panics, a window with a message box pops up
enable_visual_panic_hook: bool
If set, a backtrace + error information gets logged to stdout (if the log_level is not
LogLevel::Off
)enable_logging_on_panic: bool
Whether keyboard navigation should be enabled
enable_tab_navigation: bool
External callbacks to create a thread or get the curent time
system_callbacks: SystemCallbacks
constructor new:
arg layout_solver: LayoutSolver
-> AppConfig
Constructs a default
AppConfig
, uses the layout solver currently availableConfiguration to set which messages should be logged.
enum AppLogLevel
No logging
Off
Log errors
Error
Log warnings
Warn
Log informational messages
Info
Log debug messages
Debug
Log tracing information
Trace
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 LayoutSolver
Default, current layout solver version
Default
External system callbacks to get the system time or create / manage threads
struct SystemCallbacks
create_thread_fn: CreateThreadFn
get_system_time_fn: GetSystemTimeFn
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
Initial state of the window on the first frame
state: WindowState
If set, the first UI redraw will be called with a size of (0, 0) and the window size depends on the size of the overflowing UI. This is good for windows that do not want to take up unnecessary extra space
size_to_content: bool
If not
None
, azul will try to create a window with the specific renderer type and crash if the renderer is not available for whatever reasonrenderer_type: OptionRendererOptions
Initially the
theme
on theWindowState
is set to the OS theme - use this field to override the operating systemsDark
orLight
modetheme: OptionWindowTheme
Callback to run once when the window is initially created
create_callback: OptionCallback
If set to true, will hot-reload the UI every 200ms. Default: false
hot_reload: bool
constructor new:
arg layout_callback: LayoutCallbackType
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
RendererOptions
are not satisfied.struct RendererOptions
Force the renderer to enable VSync. Set this only if your application can't run without VSync.
vsync: Vsync
Force the renderer to enable SRGB (OpenGL extension). Set this only if your application can't run without correct SRGB handling and color correctness is a priority.
srgb: Srgb
Force the renderer to enable hardware acceleration. Set this only if your application can't run without hardware acceleration (ex. for games).
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
Enabled
and falls back toDisabled
if 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
Enabled
and falls back toDisabled
if the OpenGL context can't be initialized properlyenum HwAcceleration
Enabled
Disabled
DontCare
Offset in physical pixels (integer units)
struct LayoutPoint
Note: can be negative
x: isize
Note: can be negative
y: isize
Size in physical pixels (integer units)
struct LayoutSize
Note: can be negative
width: isize
Note: can be negative
height: isize
Represents a rectangle in physical pixels (integer units)
struct LayoutRect
Note: can be negative
origin: LayoutPoint
Note: can be negative
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
A pointer to an Xlib
Display
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
Pointer to a
HWND
handlehwnd: *mut c_void
Pointer to a
HINSTANCE
associated with this windowsHWND
.hinstance: *mut c_void
struct WebHandle
An ID value inserted into the data attributes of the canvas element. Set to 0 if invalid.
id: u32
struct AndroidHandle
A pointer to an
ANativeWindow
a_native_window: *mut c_void
X11 window hint: Type of window
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 usesi32
instead ofisize
struct PhysicalPositionI32
x: i32
y: i32
Same as
LayoutPoint
, but usesu32
instead ofisize
struct 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
Can be any number, just has to be unique to the application. You need to generate a new
IconKey
if the window icon of your application has changed.id: usize
Small (16x16x4) window icon, usually shown in the window titlebar
struct SmallWindowIconBytes has destructor
Key / hash of the window icon, so that azul can detect whether the icon has changed and notify the OS about the change.
key: IconKey
Decoded bytes of the window icon, [32x32x4] bytes in length, rgba format
rgba_bytes: U8Vec
Large (32x32x4) window icon, usually used on high-resolution displays (instead of
SmallWindowIcon
)struct LargeWindowIconBytes has destructor
Key / hash of the taskbar icon, so that azul can detect whether the icon has changed and notify the OS about the change.
key: IconKey
Decoded bytes of the window icon, [32x32x4] bytes in length, rgba format
rgba_bytes: U8Vec
Window "favicon", usually shown in the top left of the window on Windows
union enum WindowIcon has destructor
Low-resolution version of the favicon
Small(SmallWindowIconBytes)
High-resolution version of the favicon
Large(LargeWindowIconBytes)
Application taskbar icon, 256x256x4 bytes in size
struct TaskBarIcon has destructor
Unique icon key so that azul can determine whether the application icon has changed and notify the OS about the change
key: IconKey
Decoded bytes of the taskbar icon, 256x256x4 bytes in size, rgba format
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
Symbolic accelerator key (ctrl, alt, shift)
union enum AcceleratorKey
Ctrl
Alt
Shift
Key(VirtualKeyCode)
Minimum / maximum / current size of the window in logical dimensions
struct WindowSize
Current dimensions in logical units
dimensions: LogicalSize
HiDPI factor that can be overridden by the application
hidpi_factor: f32
HiDPI factor of the system - note that some systems report the scaling factor wrong (esp. Linux HiDPI). Usually the same as
hidpi_factor
.system_hidpi_factor: f32
Actual DPI factor (default: 96)
dpi: u32
Maximum size of the window in logical units
min_dimensions: OptionLogicalSize
Minimum size of the window in logical units
max_dimensions: OptionLogicalSize
Boolean flags relating to the current window state
struct WindowFlags
Is the window currently minimized, maximized, fullscreened or normal
frame: WindowFrame
Is the window about to close on the next frame? Setting this to true will close the window.
is_about_to_close: bool
Does the window have decorations (close, minimize, maximize, title bar)?
has_decorations: bool
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 is currently focused (changing this field will request user attention)
has_focus: bool
Whether the window has an "extended frame", i.e. the title bar is not rendered and the maximize / minimize / close buttons bleed into the window content
has_extended_window_frame: bool
Whether the window has a background blur
has_blur_behind_window: bool
Is smooth scrolling enabled for this window?
smooth_scroll_enabled: bool
Is automatic TAB support enabled for this window?
autotab_enabled: bool
State of the window frame (minimized, maximized, fullscreen or normal window)
enum WindowFrame
Normal
Minimized
Maximized
Fullscreen
Debugging information, will be rendered as an overlay on top of the UI
struct DebugState
Display the frame profiler on screen
profiler_dbg: bool
Display intermediate render targets on screen
render_target_dbg: bool
Display all texture cache pages on screen
texture_cache_dbg: bool
Display GPU timing results
gpu_time_queries: bool
Query the number of pixels that pass the depth test divided and show it in the profiler as a percentage of the number of pixels in the screen (window width times height)
gpu_sample_queries: bool
Render each quad with their own draw call.
Terrible for performance but can help with understanding the drawing order when inspecting renderdoc or apitrace recordingsdisable_batching: bool
Display the pipeline epochs
epochs: bool
Print driver messages to stdout
echo_driver_messages: bool
Show an overlay displaying overdraw amount
show_overdraw: bool
Display the contents of GPU cache
gpu_cache_dbg: bool
Clear evicted parts of the texture cache for debugging purposes
texture_cache_dbg_clear_evicted: bool
Show picture caching debug overlay
picture_caching_dbg: bool
Highlight all primitives with colors based on kind
primitive_dbg: bool
Draw a zoom widget showing part of the framebuffer zoomed in
zoom_dbg: bool
Scale the debug renderer down for a smaller screen. This will disrupt any mapping between debug display items and page content, so shouldn't be used with overlays like the picture caching or primitive display
small_screen: bool
Disable various bits of the WebRender pipeline, to help narrow down where slowness might be coming from
disable_opaque_pass: bool
Disable alpha
disable_alpha_pass: bool
Disable all clip masks
disable_clip_masks: bool
Disable text rendering
disable_text_prims: bool
Disable gradients
disable_gradient_prims: bool
Disable image rendering
obscure_images: bool
Taint the transparent area of the glyphs with a random opacity to easily see when glyphs are re-rasterized
glyph_flashing: bool
The profiler only displays information that is out of the ordinary
smart_profiler: bool
Dump picture cache invalidation information to stdout
invalidation_dbg: bool
Print debug information about tile caches
tile_cache_logging_dbg: bool
Capture a profile of the frame to a file
profiler_capture: bool
Force WebRender to render a new frame, even if WR can't determine that the display has changed
force_picture_invalidation: bool
Current keyboard state, stores what keys / characters have been pressed
struct KeyboardState has destructor
Currently pressed
char
- (READONLY)current_char: OptionChar
Currently pressed
VirtualKeyCode
- (READONLY). DO NOT USE THIS FOR TEXT INPUT, USEcurrent_char
andOn::TextInput
instead.current_virtual_keycode: OptionVirtualKeyCode
List of currently held-down
VirtualKeyCodes
- useful to implement combinated shortcuts (ex.Ctrl + Shift + Right
)pressed_virtual_keycodes: VirtualKeyCodeVec
List of currently held-down
ScanCode
s (typedef foru32
). Same ascurrent_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
SHIFT
key is held down (left OR right shift)Returns if the
CTRL
key is held downReturns if the
ALT
key 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
Uninitialized
on startup (gets initialized on the first frame).union enum CursorPosition
The cursor is out of bound of the window. For security reasons, tracking the cursor is not permitted by the library. The payload is set to the position where the cursor left the window.
OutOfWindow(LogicalPosition)
The cursor position is unknown because the app hasn't yet been started. This is the default value and should generally only be set on startup.
Uninitialized
Cursor position relative to the top left corner of the window
InWindow(LogicalPosition)
fn get_position:
&self
Current mouse / cursor state
struct MouseState
Current mouse cursor type, set to
None
if the cursor is hidden. (READWRITE)mouse_cursor_type: OptionMouseCursorType
Current mouse cursor type, set to
None
if the cursor is hidden. (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
Scroll amount in pixels in the horizontal direction. Gets reset to 0 after every frame (READONLY)
scroll_x: OptionF32
Scroll amount in pixels in the vertical direction. Gets reset to 0 after every frame (READONLY)
scroll_y: OptionF32
Platform-specific window configuration, i.e. WM options that are not cross-platform
struct PlatformSpecificOptions has destructor
Windows-specific WM options
windows_options: WindowsWindowOptions
Linux-specific WM options
linux_options: LinuxWindowOptions
Mac-specific WM options
mac_options: MacWindowOptions
Web / WASM-specific WM options
wasm_options: WasmWindowOptions
Window configuration specific to Win32
struct WindowsWindowOptions has destructor
STARTUP ONLY: Whether the window should allow drag + drop operations (default: true)
allow_drag_drop: bool
STARTUP ONLY: Sets
WS_EX_NOREDIRECTIONBITMAP
no_redirection_bitmap: bool
STARTUP ONLY: Window icon (decoded bytes), usually 32x32x4 bytes large (
ICON_SMALL
), appears at the top right corner of the windowwindow_icon: OptionWindowIcon
READWRITE: Taskbar icon (decoded bytes), usually 256x256x4 bytes large (
ICON_BIG
). Can be changed in callbacks / at runtime.taskbar_icon: OptionTaskBarIcon
READWRITE: Taskbar icon (decoded bytes), usually 256x256x4 bytes large (
ICON_BIG
). Can be changed in callbacks / at runtime.parent_window: OptionHwndHandle
CSD theme of the window title / button controls
struct WaylandTheme has destructor
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]
Font of the title bar, "sans-serif" by default
title_bar_font: String
title_bar_font_size: f32
Renderer type of the current windows OpenGL context
enum RendererType
Hardware rendering active (OpenGL 3.1 / OpenGL ES 3.0)
Hardware
Software OpenGL rendering active (swgl)
Software
Key-value pair, used for setting WM hints values specific to GNOME
struct StringPair has destructor
key: String
value: String
struct LinuxWindowOptions has destructor
Which X11 visual to use for the window (unimplemented). Can only be set at window creation, can't be changed in callbacks
x11_visual: OptionX11Visual
Which screen to use when showing the window (unimplemented). Can only be set at window creation, can't be changed in callbacks
x11_screen: OptionI32
Build window with
WM_CLASS
hint; 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_TYPE
hint; 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_VARIANT
hint 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: OptionString
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
.desktop
file distributed with the program. Only relevant on Wayland. Can only be set at window creation, can't be changed in callbacks.wayland_app_id: OptionString
Window decoration of the window minimize / maximize / close buttons
wayland_theme: OptionWaylandTheme
Whether the window icon should blink to request the users attention.
request_user_attention: bool
Sets the window icon of the program
window_icon: OptionWindowIcon
struct MacWindowOptions
Reserved empty field
_reserved: u8
struct WasmWindowOptions
Reserved empty field
_reserved: u8
enum FullScreenMode
- macOS: If the window is in windowed mode, transitions it slowly to fullscreen mode}
- other: Does the same asFastFullScreen
.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 asFastWindowed
.SlowWindowed
If the window is in fullscreen mode, will immediately go back to windowed mode (on macOS this is not the default behaviour).
FastWindowed
Window theme, set by the operating system or
WindowCreateOptions.theme
on startupenum WindowTheme
Dark mode theme
DarkMode
Light mode theme (default)
LightMode
Position of the top left corner of the window relative to the top left of the monitor
union enum WindowPosition
Window position has not been initialized yet (default, only set on startup)
Uninitialized
Initialized window position: modifying this value will move the window
Initialized(PhysicalPositionI32)
Position of the virtual keyboard necessary to insert CJK characters
union enum ImePosition
Uninitialized
Initialized(LogicalPosition)
Current state of touch devices / touch inputs
struct TouchState
unused: u8
Information about a single (or many) monitors, useful for dock widgets
struct Monitor has destructor
Internal ID for the monitor, only useful at startup to specify which screen the window should be created on (unimplemented)
id: usize
Name of the Monitor
name: OptionString
Size of the monitor. Note that this does not say anything about DPI (i.e. the physical, real-world size of the monitor).
size: LayoutSize
Position relative to the top left of the "virtual" monitor size (if two or more monitors are connected, this area will usually be a union of all monitors)
position: LayoutPoint
HiDPI scale factor of this monitor
scale_factor: f64
List of video modes supported by this monitor
video_modes: VideoModeVec
Whether this monitor is set as the primary monitor
is_primary_monitor: bool
Describes a rendering configuration for a monitor
struct VideoMode
Screen resolution in pixels
size: LayoutSize
Returns the bit depth of this video mode, as in how many bits you have available per color. This is generally 24 bits or 32 bits on modern systems, depending on whether the alpha channel is counted or not.
Wayland: always returns 32.
iOS: always returns 32.bit_depth: u16
Returns the refresh rate of this video mode. Note: the returned refresh rate is an integer approximation, and you shouldn't rely on this value to be exact.
refresh_rate: u16
struct WindowState has destructor
Current title of the window
title: String
Current theme of the window (dark or light mode). Will emit a
ThemeChanged
event if it is changed in a callback.theme: WindowTheme
Size of the window + max width / max height: 800 x 600 by default
size: WindowSize
The x and y position, or None to let the WM decide where to put the window (default)
position: WindowPosition
Flags such as whether the window is minimized / maximized, fullscreen, etc.
flags: WindowFlags
Mostly used for debugging, shows WebRender-builtin graphs on the screen. Used for performance monitoring and displaying frame times (rendering-only).
debug_state: DebugState
Current keyboard state - NOTE: mutating this field (currently) does nothing (doesn't get synchronized with OS-level window)!
keyboard_state: KeyboardState
Current mouse state
mouse_state: MouseState
Current touch state, stores all states of currently connected touch input devices, pencils, tablets, etc. - NOTE: readonly field - mutating this field will not get synchronized with the OS
touch_state: TouchState
Sets location of IME candidate box in client area coordinates (relative to the top left of the window)
ime_position: ImePosition
Which monitor the window is currently residing on
monitor: Monitor
Window options that can only be set on a certain platform (
WindowsWindowOptions
/LinuxWindowOptions
/MacWindowOptions
).platform_specific_options: PlatformSpecificOptions
Whether this window has SRGB / vsync / hardware acceleration
renderer_options: RendererOptions
Color of the window background (can be transparent if necessary)
background_color: ColorU
layout_callback: LayoutCallback
Callback to run before the window closes, if
DoNothing
is returned, window won't closeclose_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.
Callback type definitions + struct definitions of
CallbackInfo
smod callbacks:
union enum LayoutCallback has destructor
Raw(LayoutCallbackInner)
Marshaled(MarshaledLayoutCallback)
C-ABI stable wrapper over a
MarshaledLayoutCallback
struct MarshaledLayoutCallback has destructor
marshal_data: RefAny
C-ABI stable wrapper over a
MarshaledLayoutCallbackInner
struct MarshaledLayoutCallbackInner
Marshaled version of LayoutCallback, carrys an extra "marshal_data" containing the (usually external) function object
fnptr MarshaledLayoutCallbackType
arg &mut RefAny
arg &mut RefAny
Marshal-local data (the
marshal_data
of theMarshaledLayoutCallback
struct)Application state of the
App
Useful 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
LayoutCallbackType
struct LayoutCallbackInner
Main callback to layout the UI. azul will only call this callback when necessary (usually when one of the callback or timer returns
RegenerateStyledDomForCurrentWindow
), however azul may also call this callback at any given time, so it should be performant. This is the main entry point for your app UI.fnptr LayoutCallbackType
arg &mut RefAny
arg &mut LayoutCallbackInfo
Application state of the
App
Useful 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
CallbackType
struct Callback
cb: CallbackType
Generic UI callback function pointer: called when the
EventFilter
is activefnptr CallbackType
arg &mut RefAny
arg &mut CallbackInfo
Reference counted opaque pointer to the data set in the
CallbackData
for 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
LayoutCallback
of the window will be called again to render the next frame.-> Update
struct CallbackInfo has destructor
layout_results: *const c_void
layout_results_count: usize
renderer_resources: *const c_void
previous_window_state: *const c_void
current_window_state: *const c_void
modifiable_window_state: *mut WindowState
gl_context: *const OptionGl
image_cache: *mut c_void
system_fonts: *mut c_void
timers: *mut c_void
threads: *mut c_void
timers_removed: *mut c_void
threads_removed: *mut c_void
current_window_handle: *const RawWindowHandle
new_windows: *mut c_void
system_callbacks: *const SystemCallbacks
stop_propagation: *mut bool
focus_target: *mut c_void
words_changed_in_callbacks: *mut c_void
images_changed_in_callbacks: *mut c_void
image_masks_changed_in_callbacks: *mut c_void
css_properties_changed_in_callbacks: *mut c_void
current_scroll_states: *const c_void
nodes_scrolled_in_callback: *mut c_void
hit_dom_node: DomNodeId
cursor_relative_to_item: OptionLogicalPosition
cursor_in_viewport: OptionLogicalPosition
_reserved_ref: *const c_void
_reserved_mut: *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
-> OptionGl
&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
-> OptionString
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: String
-> bool
fn get_image:
&self
arg id: String
fn update_image:
&mut self
arg node_id: DomNodeId
arg new_image: ImageRef
arg image_type: UpdateImageType
fn delete_image:
&mut self
arg id: String
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
true
if the ThreadId is valid and the message could be sent, false otherwise-> bool
fn stop_thread:
&mut self
arg thread_id: ThreadId
Returns
true
if the ThreadId is valid, false otherwise-> bool
Returns the
DomNodeId
of the element that the callback was attached to.Returns the function pointer necessary to query the current time.
Returns the
LayoutPoint
of the cursor in the viewport (relative to the origin of theDom
). Set toNone
if the cursor is not in the current window.Returns the
LayoutPoint
of the cursor in the viewport (relative to the origin of theDom
). Set toNone
if 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_state
Returns a copy of the internal
MouseState
. Same asself.get_window_state().mouse_state
Returns a copy of the current windows
WindowState
.Returns a copy of the internal
KeyboardState
. Same asself.get_window_state().keyboard_state
Returns a copy of the internal
MouseState
. Same asself.get_window_state().mouse_state
Returns 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
None
if the node has not been scrolled.Returns the
dataset
property of the given Node orNone
if the node doesn't have adataset
property.Given a dataset, returns the node ID of the "root"
RefAny
, i.e. theRefAny
with the lowestinstance
count that is set as adataset
on any node.If the node is a
Text
node, returns a copy of the internal string contents.If the node is a
Text
node, returns the layouted inline glyphs of the text currently rendered on the screenIf the node is a
Text
node, returns theFontRef
that was used to render this node. Useful for getting font metrics for a text stringSimilar to
get_inline_text()
: If the node is aText
node, shape thetext
string 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
DomNodeId
of the givenDomNodeId
. ReturnsNone
on an invalid NodeId.Returns the previous siblings
DomNodeId
of the givenDomNodeId
. ReturnsNone
on an invalid NodeId.Returns the next siblings
DomNodeId
of the givenDomNodeId
. ReturnsNone
on an invalid NodeId.Returns the next siblings
DomNodeId
of the givenDomNodeId
. ReturnsNone
on an invalid NodeId.Returns the next siblings
DomNodeId
of the givenDomNodeId
. ReturnsNone
on 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
WindowState
for the next frame. The window is updated after all callbacks are run.Sets the new
FocusTarget
for the next frame. Note that this will emit aOn::FocusLost
andOn::FocusReceived
event, if the focused node has changed.Sets a
CssProperty
on 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
Text
node, overwrites theText
content 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
Timer
to the runtime. See the documentation forTimer
for 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 forTimer
for more information.Starts a new
Thread
to the runtime. See the documentation forThread
for more information.Sends a message to a background thread
Stops a thread at the nearest possible opportunity. Sends a
ThreadSendMsg::TerminateThread
message 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
Update the background image
Background
Update the <img> content of the DOM node
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
After the callback is called, the layout() function needs to be called again for ALL windows
RefreshDomAllWindows
Index of a Node in the internal
NodeDataContainer
struct NodeId
Index of the node into the vector.
Note: theindex
is offset by 1:0 = None
1 = Some(0)
2 = Some(1)
inner: usize
ID of a DOM - one window can contain multiple, nested DOMs (such as iframes)
struct DomId
Index of the dom into the
StyledDomVec
inner: usize
Combination of node ID + DOM ID, both together can identify a node
struct DomNodeId
dom: DomId
node: NodeId
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
struct HidpiAdjustedBounds
logical_size: LogicalSize
hidpi_factor: f32
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
Word
in this text (- note that aWord
can also be aSpace
,Return
orTab
).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_width
Tab
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
origin and size of the glyph - note: origin relative to the word origin (top left corner of the word)
bounds: LogicalRect
Option<char>
: optional unicode codepoint of this glyphunicode_codepoint: OptionChar
Index of the glyph in the font
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
,Tab
andReturn
)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 keyboard input focus target
union enum FocusTarget has destructor
Set the focus by its DOM + Node ID
Id(DomNodeId)
Set the focus by a CSS path
Path(FocusTargetPath)
Sets the focus to the previous focusable node in the DOM or
None
if this was the first focusable DOM nodePrevious
Sets the focus to the next focusable node in the DOM or
None
if this was the last focusable DOM nodeNext
Set the focus to the first focusable DOM or
None
if no nodes are focusableFirst
Set the focus to the last focusable DOM or
None
if no nodes are focusableLast
Unset the keyboard focus
NoFocus
CSS path to set the keyboard input focus
struct FocusTargetPath has destructor
dom: DomId
css_path: CssPath
struct ResolvedTextLayoutOptions has destructor
font_size_px: f32
line_height: OptionF32
letter_spacing: OptionF32
word_spacing: OptionF32
tab_width: OptionF32
max_horizontal_width: OptionF32
leading: OptionF32
holes: LogicalRectVec
constructor default:
Animation struct to start a new animation
struct Animation has destructor
from: CssProperty
to: CssProperty
duration: Duration
repeat: AnimationRepeat
repeat_count: AnimationRepeatCount
easing: AnimationEasing
Whether to reconstruct the DOM when the animation is finished, useful for UI state transitions
relayout_on_finish: bool
How should an animation repeat (loop, ping-pong, etc.)
enum AnimationRepeat
Terminate the animation after the first iteration
NoRepeat
Loop animation, reset the animation on every iteration
Loop
Loop animation, invert
from
andto
after ever iterationPingPong
How many times should an animation repeat
union enum AnimationRepeatCount
Times(usize)
Infinite
Easing function of the animation (ease-in, ease-out, ease-in-out, custom)
union enum AnimationEasing
Ease
Linear
EaseIn
EaseOut
EaseInOut
CubicBezier(SvgCubicCurve)
C-ABI wrapper over an
IFrameCallbackType
struct IFrameCallback
For rendering large or infinite datasets such as tables or lists, azul uses
IFrameCallbacks
that allow the library user to only render the visible portion of DOM nodes, not the entire set. IFrames are rendered after the screen has been laid out, but before it gets composited. IFrames can be used recursively (i.e. iframes within iframes are possible). IFrames are re-rendered once the user scrolls to the bounds (seeIFrameCallbackReturn
on how to set the bounds) or the parent DOM was recreated.fnptr IFrameCallbackType
arg &mut RefAny
arg &mut IFrameCallbackInfo
An
IFrameCallback
can have some data passed along from the parent DOM - usually this would be struct containing the widget stateSimilar to
LayoutCallbackInfo
, but carries an additionalbounds
field which has information about the size / current scroll position of the IFrame.Contains the returned
StyledDom
as well as information about the initial scroll position of the new DOM plus scrollbar / overflow informationstruct IFrameCallbackInfo
Pointer to system fonts
system_fonts: *const c_void
Pointer to the image cache
image_cache: *const c_void
Window theme, so that the IFrame can conditionally style itself
window_theme: WindowTheme
Bounds of the IFrame with HiDPI factor
bounds: HidpiAdjustedBounds
How far the user has scrolled in the virtual scroll frame - useful to set the
scroll_size: LogicalSize
How far the user has scrolled in the virtual scroll frame - useful to set the
scroll_offset: LogicalPosition
How far the user has scrolled in the virtual scroll frame - useful to set the
virtual_scroll_size: LogicalSize
How far the user has scrolled in the virtual scroll frame - useful to set the
virtual_scroll_offset: LogicalPosition
_reserved_ref: *const c_void
_reserved_mut: *mut c_void
<img src="../images/scrollbounds.png"/>
struct IFrameCallbackReturn has destructor
The DOM that is currently visible in the
HidpiAdjustedBounds
.dom: StyledDom
The actual extent of the
dom
in pixels - usually larger than currently visible bounds. When the user scrolls to one of the edges of these bounds, thisIFrameCallback
will be called again, so you'd want to render some extra rows or columns so that the callback doesn't have to get called again on every single scrolled pixel.scroll_size: LogicalSize
Position that the
dom
should be scrolled to, relative to thevirtual_scroll_offset
.scroll_offset: LogicalPosition
While the
scroll_size
is the currently rendered part of a larger scroll area, the virtual scroll size is the total size, even of non-rendered elements. For example, a table might show 30 - 40 rows and 10 columns, but the virtual size could be much larger. This setting only affects is the size of the scrollbar thumb.virtual_scroll_size: LogicalSize
Same as
virtual_scroll_offset
, but only affects the position of the scrollbar thumbvirtual_scroll_offset: LogicalPosition
struct RenderImageCallback
fnptr RenderImageCallbackType
arg &mut RefAny
arg &mut RenderImageCallbackInfo
-> ImageRef
struct RenderImageCallbackInfo has destructor
callback_node_id: DomNodeId
bounds: HidpiAdjustedBounds
gl_context: *const OptionGl
image_cache: *const c_void
system_fonts: *const c_void
node_hierarchy: *const NodeHierarchyItemVec
words_cache: *const c_void
shaped_words_cache: *const c_void
positioned_words_cache: *const c_void
positioned_rects: *const c_void
_reserved_ref: *const c_void
_reserved_mut: *mut c_void
fn get_gl_context:
&self
-> OptionGl
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
Gl
Returns a copy of the internal
HidpiAdjustedBounds
Returns the
DomNodeId
that this callback was called onIf the node is a
Text
node, returns the layouted inline glyphsReturns the index of the node relative to the parent node.
Returns the parent
DomNodeId
of the givenDomNodeId
. ReturnsNone
on an invalid NodeId.Returns the previous siblings
DomNodeId
of the givenDomNodeId
. ReturnsNone
on an invalid NodeId.Returns the next siblings
DomNodeId
of the givenDomNodeId
. ReturnsNone
on an invalid NodeId.Returns the next siblings
DomNodeId
of the givenDomNodeId
. ReturnsNone
on an invalid NodeId.Returns the next siblings
DomNodeId
of the givenDomNodeId
. ReturnsNone
on an invalid NodeId.struct TimerCallback
fnptr TimerCallbackType
arg &mut RefAny
arg &mut TimerCallbackInfo
struct TimerCallbackInfo has destructor
callback_info: CallbackInfo
If the timer is attached to a NodeId, stores the node ID
node_id: OptionDomNodeId
Instant of when the current frame was started, for cancelling timers / animations if they take too long
frame_start: Instant
How many times this animation was called already
call_count: usize
Set to true on the last invocation of the timer, usually necessar to re-render the DOM only on the last frame
is_about_to_finish: bool
_reserved_ref: *const c_void
_reserved_mut: *mut c_void
struct TimerCallbackReturn
Whether the timer affects the screen in any way
should_update: Update
Whether the timer should terminate itself
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 c_void
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.
RefAny
can be up- and downcasted (this usually done via generics and can't be expressed in the Rust API)struct RefAny has destructor
Pointer to the type-erased struct
_internal_ptr: *const c_void
Pointer to the reference count of this
RefAny
. Calling.clone()
will not clone the data, only bump the reference count by 1. When thenum_copies
reaches 0, the destructor of thisRefAny
is calledsharing_info: RefCount
Instance ID of this
RefAny
: should be 0 for theroot
node, and increase for every copy. Necessary to identify the "root"RefAny
, otherwise all instances would have the same priority.instance_id: u64
run_destructor: bool
constructor new_c:
arg ptr: c_void
arg len: usize
arg type_id: u64
arg type_name: String
arg destructor: RefAnyDestructorType
-> RefAny
fn get_type_id:
&self
-> u64
fn get_type_name:
&self
-> String
struct LayoutCallbackInfo has destructor
window_size: WindowSize
theme: WindowTheme
image_cache: *const c_void
gl_context: *const OptionGl
system_fonts: *const c_void
_reserved_ref: *const c_void
_reserved_mut: *mut c_void
fn get_gl_context:
&self
-> OptionGl
fn get_system_fonts:
&self
fn get_image:
&self
arg id: String
Returns a copy of the OpenGL context
Returns all system-native fonts with their respective file paths as values
Returns an
ImageRef
referenced by a CSS ID
Dom
construction and configurationmod dom:
struct Dom has destructor
Root node data - note that the global DOM root should be of
NodeType::Body
root: NodeData
Child nodes of this root node
children: DomVec
Number of child nodes, including all child DOM trees
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: String
fn with_id:
fn add_class:
&mut self
arg class: String
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: String
&mut self
arg style: String
&mut self
arg style: String
&mut self
arg style: String
fn set_clip_mask:
&mut self
arg clip_mask: ImageMask
fn with_clip_mask:
fn set_tab_index:
&mut self
arg tab_index: TabIndex
fn with_tab_index:
&mut self
arg accessibility_info: AccessibilityInfo
&mut self
arg accessibility_info: AccessibilityInfo
-> Dom
fn hash:
&self
-> u64
fn node_count:
&self
-> usize
fn get_html_string:
&mut self
-> String
&mut self
-> String
fn style:
Adds a child node to this DOM (potentially heap-allocates in Rust code). Swaps
self
with a defaultDom
in 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
self
with a defaultDom
in 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
self
with a defaultDom
in 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_bar
for 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_menu
for 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 entirelystruct IFrameNode has destructor
callback: IFrameCallback
data: RefAny
struct CallbackData has destructor
event: EventFilter
callback: Callback
data: RefAny
Represents one single DOM node (node type, classes, ids and callbacks are stored here)
struct NodeData has destructor
Stores the type of the node, i.e.
div
,img
,p
, etc.node_type: NodeType
dataset
attribute of the node, useful to store any UI-related data on the node itselfdataset: OptionRefAny
Stores the ids of the node, i.e.
[#main, #something]
ids_and_classes: IdOrClassVec
Stores the callbacks of the node, i.e.
On::MouseUp
->Callback(my_button_click_handler)
callbacks: CallbackDataVec
Override certain dynamic styling properties for this DOM node
inline_css_props: NodeDataInlineCssPropertyVec
Tab index / focusable property for this DOM node
tab_index: OptionTabIndex
Extra data relevant for this node: Necessary to extend the NodeData without breaking ABI as well as to efficiently store less commonly set options. Default set to
nullptr
(=None
internally)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
NodeData
structfn 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: String
&mut self
arg style: String
&mut self
arg style: String
&mut self
arg style: String
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_mask
field 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 by
azul
union enum NodeType has destructor
body
node, usually used to indicate a root nodeBody
Regular div with no particular type of data attached
Div
Creates a break in an inline text layout
Br
Equivalent to the HTML
<p>
tag, a small label that can be (optionally) be selected by the userText(String)
Equivalent to the HTML
<img>
tag, references an image or textureImage(ImageRef)
Callback that renders a DOM when invoked with a width / height after the layout of the parent DOM is done. Can be selected in CSS with the
"iframe"
selector.IFrame(IFrameNode)
When to call a callback action -
On::MouseOver
,On::MouseOut
, etc.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
MouseUp
instead)MouseDown
(Specialization of
MouseDown
). Fires only if the left mouse button has been pressed while cursor was over the elementLeftMouseDown
(Specialization of
MouseDown
). Fires only if the middle mouse button has been pressed while cursor was over the elementMiddleMouseDown
(Specialization of
MouseDown
). Fires only if the right mouse button has been pressed while cursor was over the elementRightMouseDown
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 elementLeftMouseUp
(Specialization of
MouseUp
). Fires only if the middle mouse button has been released while cursor was over the elementMiddleMouseUp
(Specialization of
MouseUp
). Fires only if the right mouse button has been released while cursor was over the elementRightMouseUp
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)
TextInput
Check
keyboard_state.current_char
to get the current pressed characterVirtualKeyDown
A virtual keycode was pressed. Note: This is only the virtual keycode, not the actual char. If you want to get the character, use
TextInput
instead. NOTE: 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_keycodes
and / or just the last keycode in thekeyboard_state.latest_virtual_keycode
.VirtualKeyUp
HoveredFile
DroppedFile
HoveredFileCancelled
FocusReceived
FocusLost
self
-> EventFilter
Converts the
On
shorthand into aEventFilter
union enum EventFilter
Hover(HoverEventFilter)
Not(NotEventFilter)
Focus(FocusEventFilter)
Window(WindowEventFilter)
Component(ComponentEventFilter)
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
enum FocusEventFilter
MouseOver
MouseDown
LeftMouseDown
RightMouseDown
MiddleMouseDown
MouseUp
LeftMouseUp
RightMouseUp
MiddleMouseUp
MouseEnter
MouseLeave
Scroll
ScrollStart
ScrollEnd
TextInput
VirtualKeyDown
VirtualKeyUp
FocusReceived
FocusLost
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
enum ComponentEventFilter
Node has been added. Internally the DOM tree is diffed and this event fires only once.
AfterMount
Node has been removed (DOM tree has been exchanged)
BeforeUnmount
Item has been resized
NodeResized
Performs the "default action", necessary for accessibility
DefaultAction
Item has been selected using assistive technology (e.g. screen reader)
Selected
enum ApplicationEventFilter
DeviceConnected
DeviceDisconnected
Accessibility information (MSAA wrapper). See
NodeData.set_accessibility_info()
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 ambiguityname: OptionString
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: OptionString
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::DefaultAction
callback present on this nodedefault_action: OptionString
MSAA Accessibility role constants. For information on what each role does, see the <a href="https://docs.microsoft.com/en-us/windows/win32/winauto/object-roles">MSDN Role Constants page</a>
enum AccessibilityRole
Inserted by operating system
TitleBar
MenuBar
ScrollBar
Grip
Sound
Cursor
Caret
Alert
Inserted by operating system
Window
Client
MenuPopup
MenuItem
Tooltip
Application
Document
Pane
Chart
Dialog
Border
Grouping
Separator
Toolbar
StatusBar
Table
ColumnHeader
RowHeader
Column
Row
Cell
Link
HelpBalloon
Character
List
ListItem
Outline
OutlineItem
Pagetab
PropertyPage
Indicator
Graphic
StaticText
Text
PushButton
CheckButton
RadioButton
ComboBox
DropList
ProgressBar
Dial
HotkeyField
Slider
SpinButton
Diagram
Animation
Equation
ButtonDropdown
ButtonMenu
ButtonDropdownGrid
Whitespace
PageTabList
Clock
SplitButton
IpAddress
Nothing
MSAA accessibility state. For information on what each state does, see the <a href="https://docs.microsoft.com/en-us/windows/win32/winauto/object-state-constants">MSDN State Constants page</a>.
enum AccessibilityState
Unavailable
Selected
Focused
Checked
Readonly
Default
Expanded
Collapsed
Busy
Offscreen
Focusable
Selectable
Linked
Traversed
Multiselectable
Protected
union enum TabIndex
Automatic tab index, similar to simply setting
focusable = "true"
ortabindex = 0
, (both have the effect of making the element focusable)Auto
Set the tab index in relation to its parent element (
tabindex = n
)OverrideInParent(u32)
Elements can be focused in callbacks, but are not accessible via keyboard / tab navigation (
tabindex = -1
)NoKeyboardFocus
union enum IdOrClass has destructor
Id(String)
Class(String)
union enum NodeDataInlineCssProperty has destructor
Normal(CssProperty)
Active(CssProperty)
Focus(CssProperty)
Hover(CssProperty)
Css
parsing modulemod css:
struct CssRuleBlock has destructor
path: CssPath
declarations: CssDeclarationVec
union enum CssDeclaration has destructor
Static(CssProperty)
Dynamic(DynamicCssProperty)
struct DynamicCssProperty has destructor
dynamic_id: String
default_value: CssProperty
struct CssPath has destructor
selectors: CssPathSelectorVec
union enum CssPathSelector has destructor
Global
Type(NodeTypeKey)
Class(String)
Id(String)
PseudoSelector(CssPathPseudoSelector)
DirectChildren
Children
enum NodeTypeKey
Body
Div
Br
P
Img
IFrame
union enum CssPathPseudoSelector
First
Last
NthChild(CssNthChildSelector)
Hover
Active
Focus
union enum CssNthChildSelector
Number(u32)
Even
Odd
Pattern(CssNthChildPattern)
struct CssNthChildPattern
repeat: u32
offset: u32
struct Stylesheet has destructor
rules: CssRuleBlockVec
struct Css has destructor
stylesheets: StylesheetVec
constructor empty:
-> Css
constructor from_string:
Returns an empty CSS style
Returns a CSS style parsed from a
String
enum CssPropertyType
TextColor
FontSize
FontFamily
TextAlign
LetterSpacing
LineHeight
WordSpacing
TabWidth
Cursor
Display
Float
BoxSizing
Width
Height
MinWidth
MinHeight
MaxWidth
MaxHeight
Position
Top
Right
Left
Bottom
FlexWrap
FlexDirection
FlexGrow
FlexShrink
JustifyContent
AlignItems
AlignContent
BackgroundContent
BackgroundPosition
BackgroundSize
BackgroundRepeat
OverflowX
OverflowY
PaddingTop
PaddingLeft
PaddingRight
PaddingBottom
MarginTop
MarginLeft
MarginRight
MarginBottom
BorderTopLeftRadius
BorderTopRightRadius
BorderBottomLeftRadius
BorderBottomRightRadius
BorderTopColor
BorderRightColor
BorderLeftColor
BorderBottomColor
BorderTopStyle
BorderRightStyle
BorderLeftStyle
BorderBottomStyle
BorderTopWidth
BorderRightWidth
BorderLeftWidth
BorderBottomWidth
BoxShadowLeft
BoxShadowRight
BoxShadowTop
BoxShadowBottom
ScrollbarStyle
Opacity
Transform
TransformOrigin
PerspectiveOrigin
BackfaceVisibility
MixBlendMode
Filter
BackdropFilter
TextShadow
union enum AnimationInterpolationFunction
Ease
Linear
EaseIn
EaseOut
EaseInOut
CubicBezier(SvgCubicCurve)
struct InterpolateContext
animation_func: AnimationInterpolationFunction
parent_rect_width: f32
parent_rect_height: f32
current_rect_width: f32
current_rect_height: f32
struct ColorU
r: u8
g: u8
b: u8
a: u8
enum SizeMetric
Px
Pt
Em
Percent
struct FloatValue
number: isize
struct PixelValue
metric: SizeMetric
number: FloatValue
struct PixelValueNoPercent
inner: PixelValue
enum BoxShadowClipMode
Outset
Inset
struct StyleBoxShadow
offset: [PixelValueNoPercent;2]
color: ColorU
blur_radius: PixelValueNoPercent
spread_radius: PixelValueNoPercent
clip_mode: BoxShadowClipMode
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])
enum LayoutAlignContent
Default value. Lines stretch to take up the remaining space
Stretch
Lines are packed toward the center of the flex container
Center
Lines are packed toward the start of the flex container
Start
Lines are packed toward the end of the flex container
End
Lines are evenly distributed in the flex container
SpaceBetween
Lines are evenly distributed in the flex container, with half-size spaces on either end
SpaceAround
enum LayoutAlignItems
Items are stretched to fit the container
Stretch
Items are positioned at the center of the container
Center
Items are positioned at the beginning of the container
FlexStart
Items are positioned at the end of the container
FlexEnd
struct LayoutBottom
inner: PixelValue
enum LayoutBoxSizing
ContentBox
BorderBox
enum LayoutFlexDirection
Row
RowReverse
Column
ColumnReverse
enum LayoutDisplay
None
Flex
Block
InlineBlock
struct LayoutFlexGrow
inner: FloatValue
struct LayoutFlexShrink
inner: FloatValue
enum LayoutFloat
Left
Right
struct LayoutHeight
inner: PixelValue
enum LayoutJustifyContent
Default value. Items are positioned at the beginning of the container
Start
Items are positioned at the end of the container
End
Items are positioned at the center of the container
Center
Items are positioned with space between the lines
SpaceBetween
Items are positioned with space before, between, and after the lines
SpaceAround
Items are distributed so that the spacing between any two adjacent alignment subjects, before the first alignment subject, and after the last alignment subject is the same
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
enum LayoutPosition
Static
Relative
Absolute
Fixed
struct LayoutRight
inner: PixelValue
struct LayoutTop
inner: PixelValue
struct LayoutWidth
inner: PixelValue
enum LayoutFlexWrap
Wrap
NoWrap
enum LayoutOverflow
Always shows a scroll bar, overflows on scroll
Scroll
Does not show a scroll bar by default, only when text is overflowing
Auto
Never shows a scroll bar, simply clips text
Hidden
Doesn't show a scroll bar, simply overflows the text
Visible
struct PercentageValue
number: FloatValue
enum AngleMetric
Degree
Radians
Grad
Turn
Percent
struct AngleValue
metric: AngleMetric
number: FloatValue
fn get_degrees:
&self
-> f32
struct NormalizedLinearColorStop
offset: PercentageValue
color: ColorU
struct NormalizedRadialColorStop
offset: AngleValue
color: ColorU
enum DirectionCorner
Right
Left
Top
Bottom
TopRight
TopLeft
BottomRight
BottomLeft
struct DirectionCorners
from: DirectionCorner
to: DirectionCorner
union enum Direction
Angle(AngleValue)
FromTo(DirectionCorners)
enum ExtendMode
Clamp
Repeat
struct LinearGradient has destructor
direction: Direction
extend_mode: ExtendMode
stops: NormalizedLinearColorStopVec
enum Shape
Ellipse
Circle
enum RadialGradientSize
The gradients ending shape meets the side of the box closest to its center (for circles) or meets both the vertical and horizontal sides closest to the center (for ellipses)
ClosestSide
The gradients ending shape is sized so that it exactly meets the closest corner of the box from its center
ClosestCorner
Similar to closest-side, except the ending shape is sized to meet the side of the box farthest from its center (or vertical and horizontal sides)
FarthestSide
The default value, the gradient's ending shape is sized so that it exactly meets the farthest corner of the box from its center
FarthestCorner
struct RadialGradient has destructor
shape: Shape
size: RadialGradientSize
position: StyleBackgroundPosition
extend_mode: ExtendMode
stops: NormalizedLinearColorStopVec
struct ConicGradient has destructor
extend_mode: ExtendMode
center: StyleBackgroundPosition
angle: AngleValue
stops: NormalizedRadialColorStopVec
union enum StyleBackgroundContent has destructor
LinearGradient(LinearGradient)
RadialGradient(RadialGradient)
ConicGradient(ConicGradient)
Image(String)
Color(ColorU)
union enum BackgroundPositionHorizontal
Left
Center
Right
Exact(PixelValue)
union enum BackgroundPositionVertical
Top
Center
Bottom
Exact(PixelValue)
struct StyleBackgroundPosition
horizontal: BackgroundPositionHorizontal
vertical: BackgroundPositionVertical
enum StyleBackgroundRepeat
NoRepeat
Repeat
RepeatX
RepeatY
union enum StyleBackgroundSize
ExactSize([PixelValue;2])
Contain
Cover
struct StyleBorderBottomColor
inner: ColorU
struct StyleBorderBottomLeftRadius
inner: PixelValue
struct StyleBorderBottomRightRadius
inner: PixelValue
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
struct ScrollbarInfo has destructor
width: LayoutWidth
padding_left: LayoutPaddingLeft
padding_right: LayoutPaddingRight
track: StyleBackgroundContent
thumb: StyleBackgroundContent
button: StyleBackgroundContent
corner: StyleBackgroundContent
resizer: StyleBackgroundContent
struct ScrollbarStyle has destructor
horizontal: ScrollbarInfo
vertical: ScrollbarInfo
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
union enum StyleFontFamily has destructor
Postscript identifier for a system-native font (for example "Arial"). Also supports HTML-native values such as
sans-serif
,serif
,monospace
,fantasy
andoblique
.System(String)
Path to a font loaded from a file
File(String)
Reference-counted font bytes - usually used on nodes that have to must be rendered with a specific font
Ref(FontRef)
struct StyleFontSize
inner: PixelValue
struct StyleLetterSpacing
inner: PixelValue
struct StyleLineHeight
inner: PercentageValue
struct StyleTabWidth
inner: PercentageValue
struct StyleOpacity
inner: PercentageValue
struct StyleTransformOrigin
x: PixelValue
y: PixelValue
struct StylePerspectiveOrigin
x: PixelValue
y: PixelValue
enum StyleBackfaceVisibility
Hidden
Visible
union 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(PercentageValue)
SkewY(PercentageValue)
Perspective(PixelValue)
struct StyleTransformMatrix2D
a: PixelValue
b: PixelValue
c: PixelValue
d: PixelValue
tx: PixelValue
ty: PixelValue
struct StyleTransformMatrix3D
m11: PixelValue
m12: PixelValue
m13: PixelValue
m14: PixelValue
m21: PixelValue
m22: PixelValue
m23: PixelValue
m24: PixelValue
m31: PixelValue
m32: PixelValue
m33: PixelValue
m34: PixelValue
m41: PixelValue
m42: PixelValue
m43: PixelValue
m44: PixelValue
struct StyleTransformTranslate2D
x: PixelValue
y: PixelValue
struct StyleTransformTranslate3D
x: PixelValue
y: PixelValue
z: PixelValue
struct StyleTransformRotate3D
angle: AngleValue
struct StyleTransformScale2D
struct StyleTransformScale3D
struct StyleTransformSkew2D
enum StyleTextAlign
Left
Center
Right
struct StyleTextColor
inner: ColorU
struct StyleWordSpacing
inner: PixelValue
union enum StyleBoxShadowValue
Auto
None
Inherit
Initial
Exact(StyleBoxShadow)
union enum LayoutAlignContentValue
Auto
None
Inherit
Initial
Exact(LayoutAlignContent)
union enum LayoutAlignItemsValue
Auto
None
Inherit
Initial
Exact(LayoutAlignItems)
union enum LayoutBottomValue
Auto
None
Inherit
Initial
Exact(LayoutBottom)
union enum LayoutBoxSizingValue
Auto
None
Inherit
Initial
Exact(LayoutBoxSizing)
union enum LayoutFlexDirectionValue
Auto
None
Inherit
Initial
Exact(LayoutFlexDirection)
union enum LayoutDisplayValue
Auto
None
Inherit
Initial
Exact(LayoutDisplay)
union enum LayoutFlexGrowValue
Auto
None
Inherit
Initial
Exact(LayoutFlexGrow)
union enum LayoutFlexShrinkValue
Auto
None
Inherit
Initial
Exact(LayoutFlexShrink)
union enum LayoutFloatValue
Auto
None
Inherit
Initial
Exact(LayoutFloat)
union enum LayoutHeightValue
Auto
None
Inherit
Initial
Exact(LayoutHeight)
union enum LayoutJustifyContentValue
Auto
None
Inherit
Initial
Exact(LayoutJustifyContent)
union enum LayoutLeftValue
Auto
None
Inherit
Initial
Exact(LayoutLeft)
union enum LayoutMarginBottomValue
Auto
None
Inherit
Initial
Exact(LayoutMarginBottom)
union enum LayoutMarginLeftValue
Auto
None
Inherit
Initial
Exact(LayoutMarginLeft)
union enum LayoutMarginRightValue
Auto
None
Inherit
Initial
Exact(LayoutMarginRight)
union enum LayoutMarginTopValue
Auto
None
Inherit
Initial
Exact(LayoutMarginTop)
union enum LayoutMaxHeightValue
Auto
None
Inherit
Initial
Exact(LayoutMaxHeight)
union enum LayoutMaxWidthValue
Auto
None
Inherit
Initial
Exact(LayoutMaxWidth)
union enum LayoutMinHeightValue
Auto
None
Inherit
Initial
Exact(LayoutMinHeight)
union enum LayoutMinWidthValue
Auto
None
Inherit
Initial
Exact(LayoutMinWidth)
union enum LayoutPaddingBottomValue
Auto
None
Inherit
Initial
Exact(LayoutPaddingBottom)
union enum LayoutPaddingLeftValue
Auto
None
Inherit
Initial
Exact(LayoutPaddingLeft)
union enum LayoutPaddingRightValue
Auto
None
Inherit
Initial
Exact(LayoutPaddingRight)
union enum LayoutPaddingTopValue
Auto
None
Inherit
Initial
Exact(LayoutPaddingTop)
union enum LayoutPositionValue
Auto
None
Inherit
Initial
Exact(LayoutPosition)
union enum LayoutRightValue
Auto
None
Inherit
Initial
Exact(LayoutRight)
union enum LayoutTopValue
Auto
None
Inherit
Initial
Exact(LayoutTop)
union enum LayoutWidthValue
Auto
None
Inherit
Initial
Exact(LayoutWidth)
union enum LayoutFlexWrapValue
Auto
None
Inherit
Initial
Exact(LayoutFlexWrap)
union enum LayoutOverflowValue
Auto
None
Inherit
Initial
Exact(LayoutOverflow)
union enum ScrollbarStyleValue has destructor
Auto
None
Inherit
Initial
Exact(ScrollbarStyle)
union enum StyleBackgroundContentVecValue has destructor
Auto
None
Inherit
Initial
Exact(StyleBackgroundContentVec)
union enum StyleBackgroundPositionVecValue has destructor
Auto
None
Inherit
Initial
Exact(StyleBackgroundPositionVec)
union enum StyleBackgroundRepeatVecValue has destructor
Auto
None
Inherit
Initial
Exact(StyleBackgroundRepeatVec)
union enum StyleBackgroundSizeVecValue has destructor
Auto
None
Inherit
Initial
Exact(StyleBackgroundSizeVec)
union enum StyleBorderBottomColorValue
Auto
None
Inherit
Initial
Exact(StyleBorderBottomColor)
union enum StyleBorderBottomLeftRadiusValue
Auto
None
Inherit
Initial
Exact(StyleBorderBottomLeftRadius)
union enum StyleBorderBottomRightRadiusValue
Auto
None
Inherit
Initial
Exact(StyleBorderBottomRightRadius)
union enum StyleBorderBottomStyleValue
Auto
None
Inherit
Initial
Exact(StyleBorderBottomStyle)
union enum LayoutBorderBottomWidthValue
Auto
None
Inherit
Initial
Exact(LayoutBorderBottomWidth)
union enum StyleBorderLeftColorValue
Auto
None
Inherit
Initial
Exact(StyleBorderLeftColor)
union enum StyleBorderLeftStyleValue
Auto
None
Inherit
Initial
Exact(StyleBorderLeftStyle)
union enum LayoutBorderLeftWidthValue
Auto
None
Inherit
Initial
Exact(LayoutBorderLeftWidth)
union enum StyleBorderRightColorValue
Auto
None
Inherit
Initial
Exact(StyleBorderRightColor)
union enum StyleBorderRightStyleValue
Auto
None
Inherit
Initial
Exact(StyleBorderRightStyle)
union enum LayoutBorderRightWidthValue
Auto
None
Inherit
Initial
Exact(LayoutBorderRightWidth)
union enum StyleBorderTopColorValue
Auto
None
Inherit
Initial
Exact(StyleBorderTopColor)
union enum StyleBorderTopLeftRadiusValue
Auto
None
Inherit
Initial
Exact(StyleBorderTopLeftRadius)
union enum StyleBorderTopRightRadiusValue
Auto
None
Inherit
Initial
Exact(StyleBorderTopRightRadius)
union enum StyleBorderTopStyleValue
Auto
None
Inherit
Initial
Exact(StyleBorderTopStyle)
union enum LayoutBorderTopWidthValue
Auto
None
Inherit
Initial
Exact(LayoutBorderTopWidth)
union enum StyleCursorValue
Auto
None
Inherit
Initial
Exact(StyleCursor)
union enum StyleFontFamilyVecValue has destructor
Auto
None
Inherit
Initial
Exact(StyleFontFamilyVec)
union enum StyleFontSizeValue
Auto
None
Inherit
Initial
Exact(StyleFontSize)
union enum StyleLetterSpacingValue
Auto
None
Inherit
Initial
Exact(StyleLetterSpacing)
union enum StyleLineHeightValue
Auto
None
Inherit
Initial
Exact(StyleLineHeight)
union enum StyleTabWidthValue
Auto
None
Inherit
Initial
Exact(StyleTabWidth)
union enum StyleTextAlignValue
Auto
None
Inherit
Initial
Exact(StyleTextAlign)
union enum StyleTextColorValue
Auto
None
Inherit
Initial
Exact(StyleTextColor)
union enum StyleWordSpacingValue
Auto
None
Inherit
Initial
Exact(StyleWordSpacing)
union enum StyleOpacityValue
Auto
None
Inherit
Initial
Exact(StyleOpacity)
union enum StyleTransformVecValue has destructor
Auto
None
Inherit
Initial
Exact(StyleTransformVec)
union enum StyleTransformOriginValue
Auto
None
Inherit
Initial
Exact(StyleTransformOrigin)
union enum StylePerspectiveOriginValue
Auto
None
Inherit
Initial
Exact(StylePerspectiveOrigin)
union enum StyleBackfaceVisibilityValue
Auto
None
Inherit
Initial
Exact(StyleBackfaceVisibility)
union enum StyleMixBlendModeValue
Auto
None
Inherit
Initial
Exact(StyleMixBlendMode)
union enum StyleFilterVecValue has destructor
Auto
None
Inherit
Initial
Exact(StyleFilterVec)
Parsed CSS key-value pair
union enum CssProperty has destructor
TextColor(StyleTextColorValue)
FontSize(StyleFontSizeValue)
FontFamily(StyleFontFamilyVecValue)
TextAlign(StyleTextAlignValue)
LetterSpacing(StyleLetterSpacingValue)
LineHeight(StyleLineHeightValue)
WordSpacing(StyleWordSpacingValue)
TabWidth(StyleTabWidthValue)
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)
FlexWrap(LayoutFlexWrapValue)
FlexDirection(LayoutFlexDirectionValue)
FlexGrow(LayoutFlexGrowValue)
FlexShrink(LayoutFlexShrinkValue)
JustifyContent(LayoutJustifyContentValue)
AlignItems(LayoutAlignItemsValue)
AlignContent(LayoutAlignContentValue)
BackgroundContent(StyleBackgroundContentVecValue)
BackgroundPosition(StyleBackgroundPositionVecValue)
BackgroundSize(StyleBackgroundSizeVecValue)
BackgroundRepeat(StyleBackgroundRepeatVecValue)
OverflowX(LayoutOverflowValue)
OverflowY(LayoutOverflowValue)
PaddingTop(LayoutPaddingTopValue)
PaddingLeft(LayoutPaddingLeftValue)
PaddingRight(LayoutPaddingRightValue)
PaddingBottom(LayoutPaddingBottomValue)
MarginTop(LayoutMarginTopValue)
MarginLeft(LayoutMarginLeftValue)
MarginRight(LayoutMarginRightValue)
MarginBottom(LayoutMarginBottomValue)
BorderTopLeftRadius(StyleBorderTopLeftRadiusValue)
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)
ScrollbarStyle(ScrollbarStyleValue)
Opacity(StyleOpacityValue)
Transform(StyleTransformVecValue)
TransformOrigin(StyleTransformOriginValue)
PerspectiveOrigin(StylePerspectiveOriginValue)
BackfaceVisibility(StyleBackfaceVisibilityValue)
MixBlendMode(StyleMixBlendModeValue)
Filter(StyleFilterVecValue)
BackdropFilter(StyleFilterVecValue)
TextShadow(StyleBoxShadowValue)
fn get_key_string:
&self
-> String
fn get_value_string:
&self
-> String
&self
-> String
fn interpolate:
&self
arg other: CssProperty
arg t: f32
arg context: InterpolateContext
-> CssProperty
Returns the key of the CSS property as a string, i.e.
background
Returns 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
t
ranging from 0.0 to 1.0. The interpolation function can be set on thecontext
(Ease
,Linear
, etc.).
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
fnptr RibbonOnTabClickedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg i32
-> Update
struct Button has destructor
label: String
image: OptionImageRef
container_style: NodeDataInlineCssPropertyVec
label_style: NodeDataInlineCssPropertyVec
image_style: NodeDataInlineCssPropertyVec
on_click: OptionButtonOnClick
fn set_on_click:
&mut self
arg data: RefAny
arg callback: CallbackType
fn with_on_click:
&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: FileInputStateWrapper
default_text: String
image: OptionImageRef
container_style: NodeDataInlineCssPropertyVec
label_style: NodeDataInlineCssPropertyVec
image_style: NodeDataInlineCssPropertyVec
constructor new:
arg path: OptionString
-> FileInput
Creates a new file input button
fn set_default_text:
&mut self
arg default_text: String
&mut self
arg data: RefAny
arg callback: FileInputOnPathChangeCallbackType
&mut self
arg data: RefAny
arg callback: FileInputOnPathChangeCallbackType
-> FileInput
fn dom:
&mut self
-> Dom
struct FileInputStateWrapper has destructor
inner: FileInputState
on_file_path_change: OptionFileInputOnPathChange
file_dialog_title: String
default_dir: OptionString
file_types: OptionFileTypeList
struct FileInputState has destructor
path: OptionString
struct FileInputOnPathChange has destructor
data: RefAny
callback: FileInputOnPathChangeCallback
struct FileInputOnPathChangeCallback
fnptr FileInputOnPathChangeCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & FileInputState
-> Update
struct CheckBox has destructor
state: CheckBoxStateWrapper
container_style: NodeDataInlineCssPropertyVec
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
inner: CheckBoxState
on_toggle: OptionCheckBoxOnToggle
struct CheckBoxOnToggle has destructor
data: RefAny
callback: CheckBoxOnToggleCallback
struct CheckBoxOnToggleCallback
fnptr CheckBoxOnToggleCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & CheckBoxState
-> Update
struct CheckBoxState
checked: bool
struct Label has destructor
text: String
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: String
on_value_change: OptionColorInputOnValueChange
struct ColorInputState
color: ColorU
struct ColorInputOnValueChange has destructor
data: RefAny
callback: ColorInputOnValueChangeCallback
struct ColorInputOnValueChangeCallback
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: String
fn with_text:
fn set_placeholder:
&mut self
arg text: String
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 has destructor
text: U32Vec
placeholder: OptionString
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
fnptr TextInputOnTextInputCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & TextInputState
struct TextInputOnVirtualKeyDown has destructor
data: RefAny
callback: TextInputOnVirtualKeyDownCallback
struct TextInputOnVirtualKeyDownCallback
fnptr TextInputOnVirtualKeyDownCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & TextInputState
struct TextInputOnFocusLost has destructor
data: RefAny
callback: TextInputOnFocusLostCallback
struct TextInputOnFocusLostCallback
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
fnptr NumberInputOnValueChangeCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & NumberInputState
-> Update
struct NumberInputOnFocusLost has destructor
data: RefAny
callback: NumberInputOnFocusLostCallback
struct NumberInputOnFocusLostCallback
fnptr NumberInputOnFocusLostCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & NumberInputState
-> Update
struct ProgressBar has destructor
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
fnptr TabOnClickCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & TabHeaderState
-> Update
struct Frame has destructor
title: String
flex_grow: f32
content: Dom
fn set_flex_grow:
&mut self
arg flex_grow: f32
fn with_flex_grow:
&mut self
arg flex_grow: f32
-> Frame
fn dom:
&mut self
-> Dom
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: String
scale_factor: f32
struct NodeTypeIdInfoMap has destructor
node_type_id: NodeTypeId
node_type_info: NodeTypeInfo
struct InputOutputTypeIdInfoMap has destructor
io_type_id: InputOutputTypeId
io_info: InputOutputInfo
struct NodeIdNodeMap has destructor
node_id: NodeGraphNodeId
node: Node
enum NodeGraphStyle
Default
struct NodeGraphCallbacks has destructor
on_node_added: OptionNodeGraphOnNodeAdded
on_node_removed: OptionNodeGraphOnNodeRemoved
on_node_dragged: OptionNodeGraphOnNodeDragged
on_node_graph_dragged: OptionNodeGraphOnNodeGraphDragged
on_node_connected: OptionNodeGraphOnNodeConnected
on_node_input_disconnected: OptionNodeGraphOnNodeInputDisconnected
on_node_output_disconnected: OptionNodeGraphOnNodeOutputDisconnected
on_node_field_edited: OptionNodeGraphOnNodeFieldEdited
fnptr NodeGraphOnNodeAddedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeTypeId
arg NodeGraphNodeId
arg NodePosition
-> Update
struct NodeGraphOnNodeAddedCallback
struct NodeGraphOnNodeAdded has destructor
data: RefAny
callback: NodeGraphOnNodeAddedCallback
fnptr NodeGraphOnNodeRemovedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
-> Update
struct NodeGraphOnNodeRemovedCallback
struct NodeGraphOnNodeRemoved has destructor
data: RefAny
callback: NodeGraphOnNodeRemovedCallback
fnptr NodeGraphOnNodeGraphDraggedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg GraphDragAmount
-> Update
struct NodeGraphOnNodeGraphDraggedCallback
struct NodeGraphOnNodeGraphDragged has destructor
data: RefAny
callback: NodeGraphOnNodeGraphDraggedCallback
fnptr NodeGraphOnNodeDraggedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg NodeDragAmount
-> Update
struct NodeGraphOnNodeDraggedCallback
struct NodeGraphOnNodeDragged has destructor
data: RefAny
callback: NodeGraphOnNodeDraggedCallback
fnptr NodeGraphOnNodeConnectedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg usize
arg NodeGraphNodeId
arg usize
-> Update
struct NodeGraphOnNodeConnectedCallback
struct NodeGraphOnNodeConnected has destructor
data: RefAny
callback: NodeGraphOnNodeConnectedCallback
fnptr NodeGraphOnNodeInputDisconnectedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg usize
-> Update
struct NodeGraphOnNodeInputDisconnectedCallback
struct NodeGraphOnNodeInputDisconnected has destructor
data: RefAny
callback: NodeGraphOnNodeInputDisconnectedCallback
fnptr NodeGraphOnNodeOutputDisconnectedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg usize
-> Update
struct NodeGraphOnNodeOutputDisconnectedCallback
struct NodeGraphOnNodeOutputDisconnected has destructor
data: RefAny
fnptr NodeGraphOnNodeFieldEditedCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg NodeGraphNodeId
arg usize
arg NodeTypeId
-> Update
struct NodeGraphOnNodeFieldEditedCallback
struct NodeGraphOnNodeFieldEdited has destructor
data: RefAny
callback: NodeGraphOnNodeFieldEditedCallback
struct InputOutputTypeId
inner: u64
struct NodeTypeId
inner: u64
struct NodeGraphNodeId
inner: u64
struct Node has destructor
node_type: NodeTypeId
position: NodePosition
fields: NodeTypeFieldVec
connect_in: InputConnectionVec
connect_out: OutputConnectionVec
struct NodeTypeField has destructor
key: String
value: NodeTypeFieldValue
union enum NodeTypeFieldValue has destructor
TextInput(String)
NumberInput(f32)
CheckBox(bool)
ColorInput(ColorU)
FileInput(OptionString)
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
is_root: bool
name: String
inputs: InputOutputTypeIdVec
outputs: InputOutputTypeIdVec
struct InputOutputInfo has destructor
data_type: String
color: ColorU
struct NodePosition
x: f32
y: f32
struct GraphDragAmount
x: f32
y: f32
struct NodeDragAmount
x: f32
y: f32
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 and then lazy-load once the user has scrolled to the end
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
struct ListViewRow has destructor
Each cell is an opaque Dom object
cells: DomVec
Height of the row, if known beforehand
height: OptionPixelValueNoPercent
struct ListViewState has destructor
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
fnptr ListViewOnLazyLoadScrollCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & ListViewState
-> Update
struct ListViewOnLazyLoadScrollCallback
struct ListViewOnLazyLoadScroll has destructor
data: RefAny
callback: ListViewOnLazyLoadScrollCallback
fnptr ListViewOnColumnClickCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg & ListViewState
arg usize
-> Update
struct ListViewOnColumnClickCallback
struct ListViewOnColumnClick has destructor
data: RefAny
callback: ListViewOnColumnClickCallback
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 has destructor
root: String
struct DropDown has destructor
choices: StringVec
selected: usize
on_choice_change: OptionDropDownOnChoiceChange
fnptr DropDownOnChoiceChangeCallbackType
arg &mut RefAny
arg &mut CallbackInfo
arg usize
-> Update
struct DropDownOnChoiceChangeCallback
struct DropDownOnChoiceChange has destructor
data: RefAny
callback: DropDownOnChoiceChangeCallback
DOM to CSS cascading and styling module
mod style:
struct NodeHierarchyItem
parent: usize
previous_sibling: usize
next_sibling: usize
last_child: usize
struct CascadeInfo
index_in_parent: u32
is_last_child: bool
union enum CssPropertySource has destructor
Css(CssPath)
Inline
struct StyledNodeState
normal: bool
hover: bool
active: bool
focused: bool
struct StyledNode
state: StyledNodeState
Optional hit-testing tag ID (NOTE: The tag ID has to be adjusted after the layout is done (to account for scroll tags))
tag_id: OptionTagId
struct TagId
inner: u64
struct TagIdToNodeIdMapping has destructor
tag_id: TagId
node_id: NodeId
tab_index: OptionTabIndex
parents: NodeIdVec
struct ParentWithNodeDepth
depth: usize
node_id: NodeId
struct CssPropertyCache has destructor
ptr: *mut c_void
run_destructor: bool
struct StyledDom has destructor
root: NodeId
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_and_callbacks: NodeIdVec
tag_ids_to_node_ids: TagIdToNodeIdMappingVec
non_leaf_nodes: ParentWithNodeDepthVec
css_property_cache: CssPropertyCache
constructor new:
constructor default:
-> StyledDom
constructor from_xml:
constructor from_file:
Styles a
Dom
with the givenCss
, returning theStyledDom
- complexityO(count(dom_nodes) * count(css_blocks))
: make sure that theDom
and theCss
are 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
-> String
&self
-> String
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)
OpenGl helper types (
Texture
,Gl
, etc.)mod gl:
struct Texture has destructor
Raw OpenGL texture ID
texture_id: u32
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: Gl
Format of this texture (rgba, brga, etc.)
format: RawImageFormat
Reference count for this texture. Texture will be automatically deleted when the refcount reaches 0.
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: Gl
arg format: RawImageFormat
-> Texture
constructor allocate_rgba8:
arg gl: Gl
arg size: PhysicalSizeU32
arg background: ColorU
-> Texture
constructor allocate_clip_mask:
arg gl: Gl
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 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
&TessellatedGPUSvgNode
with the given color to the textureApplies an FXAA filter to the texture
struct GlVoidPtrConst has destructor
ptr: *const c_void
run_destructor: bool
struct GlVoidPtrMut
ptr: *mut c_void
struct Gl has destructor
Reference-counted pointer to the OpenGL context. Can not be copied between threads.
ptr: *const c_void
Extra flag to see whether we are using hardware OpenGL or software OpenGL
renderer_type: RendererType
run_destructor: bool
fn get_type:
&self
-> GlType
&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
-> String
&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
-> String
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
-> String
fn get_string:
&self
arg which: u32
-> String
fn get_string_i:
&self
arg which: u32
arg index: u32
-> String
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
struct GlShaderPrecisionFormatReturn
_0: i32
_1: i32
_2: i32
enum VertexAttributeType
Vertex attribute has type
f32
Float
Vertex attribute has type
f64
Double
Vertex attribute has type
u8
UnsignedByte
Vertex attribute has type
u16
UnsignedShort
Vertex attribute has type
u32
UnsignedInt
struct VertexAttribute has destructor
name: String
layout_location: OptionUsize
attribute_type: VertexAttributeType
item_count: usize
struct VertexLayout has destructor
fields: VertexAttributeVec
struct VertexArrayObject has destructor
vertex_layout: VertexLayout
vao_id: u32
gl_context: Gl
refcount: *const c_void
run_destructor: bool
constructor new:
arg vertex_layout: VertexLayout
arg vao_id: u32
arg gl_context: Gl
enum IndexBufferFormat
Points
Lines
LineStrip
Triangles
TriangleStrip
TriangleFan
struct VertexBuffer has destructor
vertex_buffer_id: u32
vertex_buffer_len: usize
vao: VertexArrayObject
index_buffer_id: u32
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
enum GlType
Gl
Gles
struct DebugMessage has destructor
message: String
source: u32
ty: u32
id: u32
severity: u32
C-ABI stable reexport of
&[u8]
struct U8VecRef
ptr: *const u8
len: usize
C-ABI stable reexport of
&mut [u8]
struct U8VecRefMut
ptr: *mut u8
len: usize
C-ABI stable reexport of
&[f32]
struct F32VecRef
ptr: *const f32
len: usize
C-ABI stable reexport of
&[i32]
struct I32VecRef
ptr: *const i32
len: usize
C-ABI stable reexport of
&[GLuint]
aka&[u32]
struct GLuintVecRef
ptr: *const u32
len: usize
C-ABI stable reexport of
&[GLenum]
aka&[u32]
struct GLenumVecRef
ptr: *const u32
len: usize
C-ABI stable reexport of
&mut [GLint]
aka&mut [i32]
struct GLintVecRefMut
ptr: *mut i32
len: usize
C-ABI stable reexport of
&mut [GLint64]
aka&mut [i64]
struct GLint64VecRefMut
ptr: *mut i64
len: usize
C-ABI stable reexport of
&mut [GLboolean]
aka&mut [u8]
struct GLbooleanVecRefMut
ptr: *mut u8
len: usize
C-ABI stable reexport of
&mut [GLfloat]
aka&mut [f32]
struct GLfloatVecRefMut
ptr: *mut f32
len: usize
C-ABI stable reexport of
&[Refstr]
aka&mut [&str]
struct RefstrVecRef
ptr: *const Refstr
len: usize
C-ABI stable reexport of
&str
struct Refstr
ptr: *const u8
len: usize
C-ABI stable reexport of
(U8Vec, u32)
struct GetProgramBinaryReturn has destructor
_0: U8Vec
_1: u32
C-ABI stable reexport of
(i32, u32, AzString)
struct GetActiveAttribReturn has destructor
_0: i32
_1: u32
_2: String
C-ABI stable reexport of
*const gleam::gl::GLsync
struct GLsyncPtr has destructor
ptr: *const c_void
run_destructor: bool
C-ABI stable reexport of
(i32, u32, AzString)
struct GetActiveUniformReturn has destructor
_0: i32
_1: u32
_2: String
struct TextureFlags
Whether this texture contains an alpha component
is_opaque: bool
Optimization: use the compositor instead of OpenGL for energy efficiency
is_video_texture: bool
constructor default:
-> TextureFlags
Default texture flags (not opaque, not a video texture)
Struct definitions for image loading
mod image:
struct ImageRef has destructor
data: *const c_void
copies: *const c_void
run_destructor: bool
constructor invalid:
arg width: usize
arg height: usize
arg format: RawImageFormat
-> ImageRef
constructor raw_image:
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
RenderImageCallback
If the image is a RawImage, returns a COPY of the internal image bytes (useful for encoding the RawImage / exporting the ImageRef to a file)
Returns the hash of the ImageRef (fast)
struct RawImage has destructor
Decoded image bytes
pixels: RawImageData
Width of the image
width: usize
Height of the image
height: usize
Whether the image already has the alpha channel premultiplied
alpha_premultiplied: bool
Which data format (channels) the image uses
data_format: RawImageFormat
constructor empty:
-> RawImage
constructor allocate_clip_mask:
arg size: LayoutSize
-> RawImage
constructor decode_image_bytes_any:
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
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
enum EncodeImageError
Library was not compiled with the given encoder
EncoderNotAvailable
Not enough memory available to perform the encoding operation
InsufficientMemory
Width x height x channels does not match the image data
DimensionError
The data did not match the type of data necessary for encoding - for example, HDR can only encode image data of type
F32Vec
, notU8Vec
.InvalidData
Unknown error
Unknown
enum DecodeImageError
Not enough memory available to perform the encoding operation
InsufficientMemory
Width x height x channels does not match the image data
DimensionError
The image format is not supported
UnsupportedImageFormat
Unknown error
Unknown
union enum RawImageData has destructor
8-bit image data
U8(U8Vec)
16-bit image data
U16(U16Vec)
Floating-point image data
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.sTypoLineGap
to calculate the height.Source data of a font file (bytes)
struct FontSource has destructor
data: U8Vec
font_index: u32
parse_glyph_outlines: bool
Atomically reference-counted parsed font data
struct FontRef has destructor
data: *const c_void
copies: *const c_void
run_destructor: bool
constructor parse:
arg source: FontSource
-> FontRef
Parses a new font from bytes. Returns
None
if 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)
SVG parsing and rendering functions
mod svg:
struct Svg has destructor
ptr: *mut c_void
run_destructor: bool
constructor from_string:
arg svg_string: String
arg parse_options: SvgParseOptions
-> Svg
constructor from_bytes:
arg svg_bytes: U8VecRef
arg parse_options: SvgParseOptions
-> Svg
fn get_root:
&self
-> SvgXmlNode
fn render:
&self
arg options: SvgRenderOptions
fn to_string:
&self
arg options: SvgStringFormatOptions
-> String
struct SvgXmlNode has destructor
ptr: *mut c_void
run_destructor: bool
constructor parse_from:
arg svg_bytes: U8VecRef
arg parse_options: SvgParseOptions
-> SvgXmlNode
struct SvgMultiPolygon has destructor
rings: SvgPathVec
fn get_bounds:
&self
-> SvgRect
fn contains_point:
&self
arg point: SvgPoint
arg fill_rule: SvgFillRule
arg tolerance: f32
-> bool
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
union enum SvgNode has destructor
MultiPolygonCollection(SvgMultiPolygonVec)
MultiPolygon(SvgMultiPolygon)
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
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 join_with:
&mut self
arg path: 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
Adds a path to the end of the current path
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
struct SvgLine
start: 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 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 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 tessellate_fill:
&self
arg fill_style: SvgFillStyle
&self
arg stroke_style: SvgStrokeStyle
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 has destructor
ptr: *const TessellatedSvgNode
len: usize
struct TessellatedGPUSvgNode has destructor
vertex_index_buffer: VertexBuffer
constructor new:
arg tessellated_node: *const TessellatedSvgNode
arg gl: Gl
struct SvgParseOptions has destructor
SVG image path. Used to resolve relative image paths.
relative_image_path: OptionString
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: String
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:
System
fontdb: 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 SvgStringFormatOptions
Whether to use single or double quotes when formatting the SVG string
use_single_quote: bool
How to indent SVG nodes when formatting SVG
indent: Indent
How to indent the attributes when formatting SVG
attributes_indent: Indent
union enum Indent
No indentation
None
Indent with n spaces
Spaces(u8)
Indent with tab character
Tabs
union enum SvgFitTo
Original
Width(u32)
Height(u32)
Zoom(f32)
union enum SvgStyle
Fill(SvgFillStyle)
Stroke(SvgStrokeStyle)
enum SvgFillRule
Use the winding order to determine the filled area
Winding
Use the even / odd rule to determine the filled area
EvenOdd
struct SvgTransform
sx: f32
kx: f32
ky: f32
sy: f32
tx: f32
ty: f32
struct SvgFillStyle
How to tessellate edges in a path, default value =
Miter
line_join: SvgLineJoin
Limit for caps on path edges if line_join is set to
Miter
. Must be greater than or equal to 1px. Default value = 1.0miter_limit: f32
Maximum allowed distance between path points when tesselating curves. Default value = 0.1 (px)
tolerance: f32
Fill rule to use when painting the polygon
fill_rule: SvgFillRule
Scaling / rotation / etc. transform to apply to the polygon before painting. NOTE: currently only implemented on CPU renderer
transform: SvgTransform
Whether the polygon is intended to be rendered anti-aliased
anti_alias: bool
Whether anti-aliasing should use the fast approximate solution (true) or the high-quality slow one (false). Default: false
high_quality_aa: bool
constructor default:
-> SvgFillStyle
struct SvgStrokeStyle
What cap to use at the start of each sub-path, default value =
Butt
start_cap: SvgLineCap
What cap to use at the end of each sub-path, default value =
Butt
end_cap: SvgLineCap
How to tessellate edges in a path, default value =
Miter
line_join: SvgLineJoin
Optional dash pattern for the stroke, default value =
None
dash_pattern: OptionSvgDashPattern
Width of the line in px. Default value = 1.09 (px)
line_width: f32
Limit for caps on path edges if line_join is set to
Miter
. Must be greater than or equal to 1.0 (px). Default value = 1.0miter_limit: f32
Maximum allowed distance between path points when tesselating curves. Default value = 0.1 (px)
tolerance: f32
When set to false, the generated vertices will all be positioned in the center. 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 =
false
apply_line_width: bool
Scaling / rotation / etc. transform to apply to the polygon before painting. NOTE: currently only implemented on CPU renderer
transform: SvgTransform
Whether the polygon is intended to be rendered anti-aliased
anti_alias: bool
Whether anti-aliasing should use the fast approximate solution (true) or the high-quality slow one (false). Default: false
high_quality_aa: bool
constructor default:
enum SvgLineJoin
Miter
MiterClip
Round
Bevel
enum SvgLineCap
Butt
Square
Round
struct SvgDashPattern
offset: f32
length_1: f32
gap_1: f32
length_2: f32
gap_2: f32
length_3: f32
gap_3: f32
XML parsing / decoding module
mod xml:
struct Xml has destructor
Root node(s) of the XML document
root: XmlNodeVec
struct XmlNode has destructor
Tag type of the node, i.e. the
p
part of<p id="test">Hello <span>World</span> </p>
tag: String
Attributes of the node, i.e. the
{ key: id, value: test }
part of<p id="test">Hello <span>World</span> </p>
attributes: StringPairVec
Attributes of the node, i.e. the
<span>World</span>
part of<p id="test">Hello <span>World</span> </p>
children: XmlNodeVec
Text content of the node, i.e. the
Hello
part of<p id="test">Hello</p>
text: OptionString
Filesystem / file input and output module
mod fs:
Reference-counted file handle
struct File has destructor
ptr: *const c_void
path: String
run_destructor: bool
constructor open:
arg path: String
-> OptionFile
-> File
constructor create:
arg path: String
-> OptionFile
-> File
Opens a file at the given path. If the file exists, replaces it with a new file
Creates a file at the given path. If the file exists, replaces it with a new file
fn read_to_string:
&mut self
-> OptionString
fn read_to_bytes:
&mut self
-> OptionU8Vec
fn write_string:
&mut self
arg bytes: Refstr
-> bool
fn write_bytes:
&mut self
arg bytes: U8VecRef
-> bool
fn close:
&mut self
Reads the file to a UTF8-encoded String, returns None if the file can't be decoded correctly
Reads the file as bytes, returns None if the file can't be decoded correctly
Writes a string to the file, synchronizes the results before returning
Writes some bytes to the file, synchronizes the results before returning
Destructor, closes the file handle
Interface for system file selection dialogs / popup message boxes, etc.
mod dialog:
struct MsgBox
_reserved: usize
constructor ok:
arg icon: MsgBoxIcon
arg title: String
arg message: String
-> bool
-> MsgBox
constructor info:
constructor warning:
constructor error:
constructor question:
constructor ok_cancel:
arg icon: MsgBoxIcon
arg title: String
arg message: String
arg default_value: MsgBoxOkCancel
-> MsgBox
constructor yes_no:
arg icon: MsgBoxIcon
arg title: String
arg message: String
arg default_value: MsgBoxYesNo
-> MsgBoxYesNo
-> MsgBox
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
Value returned from a yes / no message box
enum MsgBoxYesNo
Yes
No
Value returned from an ok / cancel message box
enum MsgBoxOkCancel
Ok
Cancel
File picker dialog
struct FileDialog
Non-existent field for ABI stability. Do not use.
_reserved: usize
constructor select_file:
arg title: String
arg default_path: OptionString
arg filter_list: OptionFileTypeList
The path that the user wants to open,
None
if the user has cancelled or closed the dialog-> OptionString
-> FileDialog
constructor select_multiple_files:
arg title: String
arg default_path: OptionString
arg filter_list: OptionFileTypeList
The path(s) that the user wants to open,
None
if the user has cancelled or closed the dialog-> FileDialog
constructor select_folder:
arg title: String
arg default_path: OptionString
The folder that the user wants to open,
None
if the user has cancelled or closed the dialog-> OptionString
-> FileDialog
constructor save_file:
arg title: String
arg default_path: OptionString
The path that the user wants to save the file to,
None
if the user has cancelled or closed the dialog-> OptionString
-> FileDialog
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 has destructor
A list of document types, such as ["doc", "docx", "png"]
document_types: StringVec
document_descriptor: String
struct ColorPickerDialog
Non-existent ABI-compatibility field
_reserved: usize
constructor open:
arg title: String
arg default_color: OptionColorU
-> OptionColorU
Opens a system-native color picker dialog
Classes to talk to the system clipboard manager
mod clipboard:
Connection to the system clipboard, on some systems this connection can be cached
struct SystemClipboard has destructor
Native clipboard handle
_native: *const c_void
run_destructor: bool
constructor new:
Creates a new connection to the system clipboard manager
&self
-> OptionString
&mut self
arg contents: String
-> bool
Returns the system clipboard contents or
None
if the clipboard is empty or there was an errorSets the system clipboard contents to the new string, returns true if the system clipboard was updated
Rust wrappers for
Instant
/Duration
classesmod time:
union enum Instant has destructor
System(InstantPtr)
Tick(SystemTick)
fn duration_since:
&self
arg earlier: Instant
fn add_duration:
Returns the duration since and earlier instant or None if the earlier instant is later than self
Adds a duration to the current time instant, returning the new
Instant
Linearly interpolates between [start, end] if the
self
Instant lies between start and end. Returns values between 0.0 and 1.0struct InstantPtr has destructor
ptr: *const c_void
clone_fn: InstantPtrCloneFn
destructor: InstantPtrDestructorFn
run_destructor: bool
fnptr InstantPtrCloneFnType
arg & InstantPtr
-> InstantPtr
struct InstantPtrCloneFn
fnptr InstantPtrDestructorFnType
arg &mut InstantPtr
struct InstantPtrDestructorFn
struct SystemTick
tick_counter: u64
union enum Duration
System(SystemTimeDiff)
Tick(SystemTickDiff)
struct SystemTimeDiff
secs: u64
nanos: u32
struct SystemTickDiff
tick_diff: u64
Asyncronous timers / task / thread handlers for easy async loading
mod task:
struct TimerId
id: usize
struct Timer has destructor
Stores some timer-specific data (usually animation data)
data: RefAny
Whether to attach the timer to a specific DOM node. Timers attached to DOM nodes are removed when the UI is reconstructed.
node_id: OptionDomNodeId
Stores when the timer was created (usually acquired by
Instant::now()
)created: Instant
When the timer was last called (
None
only when the timer hasn't been called yet)last_run: OptionInstant
How often the timer was run already
run_count: usize
If the timer shouldn't start instantly, but rather be delayed by a certain duration
delay: OptionDuration
How frequently the timer should run, i.e. set this to
Some(Duration::from_millis(16))
to run the timer every 16ms. If this value is set toNone
, (the default), the timer will execute the timer as-fast-as-possible (i.e. at a faster framerate than the framework itself) - which might be performance intensive.interval: OptionDuration
When to stop the timer (for example, you can stop the execution after 5s using
Some(Duration::from_secs(5))
).timeout: OptionDuration
Callback to be called for this timer
callback: TimerCallback
constructor new:
arg timer_data: RefAny
arg callback: TimerCallbackType
arg get_system_time_fn: GetSystemTimeFn
-> 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: *const c_void
run_destructor: bool
struct ThreadSender has destructor
ptr: *const 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
union enum ThreadSendMsg has destructor
TerminateThread
Tick
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
struct CreateThreadFn
fnptr GetSystemTimeFnType
-> Instant
Get the current system time, equivalent to
std::time::Instant::now()
, except it also works on systems that work with "ticks" instead of timersstruct GetSystemTimeFn
Callback that checks whether the thread has finished - the input argument is the
dropcheck
field on the Thread.fnptr CheckThreadFinishedFnType
arg c_void
-> bool
Function called to check if the thread has finished
struct CheckThreadFinishedFn
fnptr LibrarySendThreadMsgFnType
arg c_void
arg ThreadSendMsg
-> bool
Function to send a message to the thread
struct LibrarySendThreadMsgFn
fnptr LibraryReceiveThreadMsgFnType
arg c_void
-> OptionThreadReceiveMsg
Function to receive a message from the thread
struct LibraryReceiveThreadMsgFn
fnptr ThreadRecvFnType
arg c_void
-> OptionThreadSendMsg
Function that the running
Thread
can call to receive messages from the main UI threadstruct ThreadRecvFn
cb: ThreadRecvFnType
fnptr ThreadSendFnType
arg c_void
arg ThreadReceiveMsg
-> bool
Function that the running
Thread
can call to receive messages from the main UI threadstruct ThreadSendFn
cb: ThreadSendFnType
fnptr ThreadDestructorFnType
arg &mut Thread
Destructor of the
Thread
struct ThreadDestructorFn
fnptr ThreadReceiverDestructorFnType
arg &mut ThreadReceiver
Destructor of the
ThreadReceiver
struct ThreadReceiverDestructorFn
fnptr ThreadSenderDestructorFnType
arg &mut ThreadSender
Destructor of the
ThreadSender
struct ThreadSenderDestructorFn
Definition of azuls internal
String
wrappersmod str:
union enum FmtValue has destructor
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(String)
StrVec(StringVec)
struct FmtArg has destructor
key: String
value: FmtValue
struct String has destructor
vec: U8Vec
constructor format:
constructor copy_from_bytes:
arg ptr: u8
arg start: usize
arg len: usize
-> String
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
TessellatedSvgNodeVec
as a non-owning slice, NOTE: TheU8Vec
that this slice was borrowed from MUST NOT be deleted before theU8VecRef
Wrapper 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<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
VertexAttribute
struct SvgPathElementVec has destructor
ptr: *const SvgPathElement
len: usize
cap: usize
destructor: SvgPathElementVecDestructor
Wrapper over a Rust-allocated
SvgVertex
struct SvgVertexVec has destructor
ptr: *const SvgVertex
len: usize
cap: usize
destructor: SvgVertexVecDestructor
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
XWindowType
struct XWindowTypeVec has destructor
ptr: *const XWindowType
len: usize
cap: usize
destructor: XWindowTypeVecDestructor
Wrapper over a Rust-allocated
VirtualKeyCode
struct VirtualKeyCodeVec has destructor
ptr: *const VirtualKeyCode
len: usize
cap: usize
destructor: VirtualKeyCodeVecDestructor
Wrapper over a Rust-allocated
CascadeInfo
struct CascadeInfoVec has destructor
ptr: *const CascadeInfo
len: usize
cap: usize
destructor: CascadeInfoVecDestructor
Wrapper over a Rust-allocated
ScanCode
struct ScanCodeVec has destructor
ptr: *const u32
len: usize
cap: usize
destructor: ScanCodeVecDestructor
Wrapper over a Rust-allocated
CssDeclaration
struct CssDeclarationVec has destructor
ptr: *const CssDeclaration
len: usize
cap: usize
destructor: CssDeclarationVecDestructor
Wrapper over a Rust-allocated
CssPathSelector
struct CssPathSelectorVec has destructor
ptr: *const CssPathSelector
len: usize
cap: usize
destructor: CssPathSelectorVecDestructor
Wrapper over a Rust-allocated
Stylesheet
struct StylesheetVec has destructor
ptr: *const Stylesheet
len: usize
cap: usize
destructor: StylesheetVecDestructor
Wrapper over a Rust-allocated
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
U8Vec
struct U8Vec has destructor
ptr: *const u8
len: usize
cap: usize
destructor: U8VecDestructor
constructor copy_from_bytes:
arg ptr: 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
U8Vec
as a non-owning slice, NOTE: TheU8Vec
that this slice was borrowed from MUST NOT be deleted before theU8VecRef
Wrapper over a Rust-allocated
CallbackData
struct CallbackDataVec has destructor
ptr: *const CallbackData
len: usize
cap: usize
destructor: CallbackDataVecDestructor
Wrapper over a Rust-allocated
Vec<DebugMessage>
struct DebugMessageVec has destructor
ptr: *const DebugMessage
len: usize
cap: usize
destructor: DebugMessageVecDestructor
Wrapper over a Rust-allocated
U32Vec
struct GLuintVec has destructor
ptr: *const u32
len: usize
cap: usize
destructor: GLuintVecDestructor
Wrapper over a Rust-allocated
GLintVec
struct GLintVec has destructor
ptr: *const i32
len: usize
cap: usize
destructor: GLintVecDestructor
Wrapper over a Rust-allocated
StringVec
struct StringVec has destructor
ptr: *const String
len: usize
cap: usize
destructor: StringVecDestructor
Wrapper over a Rust-allocated
StringPairVec
struct StringPairVec has destructor
ptr: *const StringPair
len: usize
cap: usize
destructor: StringPairVecDestructor
Wrapper over a Rust-allocated
NormalizedLinearColorStopVec
struct NormalizedLinearColorStopVec has destructor
ptr: *const NormalizedLinearColorStop
len: usize
cap: usize
destructor: NormalizedLinearColorStopVecDestructor
Wrapper over a Rust-allocated
NormalizedRadialColorStopVec
struct NormalizedRadialColorStopVec has destructor
ptr: *const NormalizedRadialColorStop
len: usize
cap: usize
destructor: NormalizedRadialColorStopVecDestructor
Wrapper over a Rust-allocated
NodeIdVec
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
StyledNodeVec
struct StyledNodeVec has destructor
ptr: *const StyledNode
len: usize
cap: usize
destructor: StyledNodeVecDestructor
Wrapper over a Rust-allocated
TagIdToNodeIdMappingVec
struct TagIdToNodeIdMappingVec has destructor
ptr: *const TagIdToNodeIdMapping
len: usize
cap: usize
destructor: TagIdToNodeIdMappingVecDestructor
Wrapper over a Rust-allocated
ParentWithNodeDepthVec
struct ParentWithNodeDepthVec has destructor
ptr: *const ParentWithNodeDepth
len: usize
cap: usize
destructor: ParentWithNodeDepthVecDestructor
Wrapper over a Rust-allocated
NodeDataVec
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 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 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 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
union enum DebugMessageVecDestructor
DefaultRust
NoDestructor
External(DebugMessageVecDestructorType)
fnptr DebugMessageVecDestructorType
arg &mut DebugMessageVec
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)
fnptr NodeDataVecDestructorType
arg &mut NodeDataVec
Definition of azuls internal
Option<*>
wrappersmod option:
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 OptionNodeGraphOnNodeAdded has destructor
None
Some(NodeGraphOnNodeAdded)
union enum OptionNodeGraphOnNodeRemoved has destructor
None
Some(NodeGraphOnNodeRemoved)
union enum OptionNodeGraphOnNodeGraphDragged has destructor
None
union enum OptionNodeGraphOnNodeDragged has destructor
None
Some(NodeGraphOnNodeDragged)
union enum OptionNodeGraphOnNodeConnected has destructor
None
Some(NodeGraphOnNodeConnected)
union enum OptionNodeGraphOnNodeInputDisconnected has destructor
None
union enum OptionNodeGraphOnNodeOutputDisconnected has destructor
None
union enum OptionNodeGraphOnNodeFieldEdited has destructor
None
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)
union enum OptionMenuCallback has destructor
None
Some(MenuCallback)
union enum OptionVirtualKeyCodeCombo has destructor
None
Some(VirtualKeyCodeCombo)
union enum OptionCssProperty has destructor
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 has destructor
None
Some(FontRef)
union enum OptionSystemClipboard has destructor
None
Some(SystemClipboard)
union enum OptionFileTypeList has destructor
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 has destructor
None
Some(StringVec)
union enum OptionFile has destructor
None
Some(File)
union enum OptionGl has destructor
None
Some(Gl)
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)
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(NodeId)
union enum OptionDomNodeId
None
Some(DomNodeId)
union enum OptionColorU
None
Some(ColorU)
union enum OptionRawImage has destructor
None
Some(RawImage)
union enum OptionSvgDashPattern
None
Some(SvgDashPattern)
union enum OptionWaylandTheme has destructor
None
Some(WaylandTheme)
union enum OptionTaskBarIcon has destructor
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 has destructor
None
Some(WindowIcon)
union enum OptionString has destructor
None
Some(String)
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(TagId)
union enum OptionDuration
None
Some(Duration)
union enum OptionInstant has destructor
None
Some(Instant)
union enum OptionUsize
None
Some(usize)
union enum OptionU8Vec has destructor
None
Some(U8Vec)
union enum OptionU8VecRef
None
Some(U8VecRef)
Definition of error and
Result<T, E>
typesmod error:
union enum ResultXmlXmlError has destructor
Ok(Xml)
Err(XmlError)
union enum ResultRawImageDecodeImageError has destructor
Ok(RawImage)
Err(DecodeImageError)
union enum ResultU8VecEncodeImageError has destructor
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 has destructor
NoParserAvailable
ElementsLimitReached
NotAnUtf8Str
MalformedGZip
InvalidSize
ParsingFailed(XmlError)
union enum XmlError has destructor
NoParserAvailable
InvalidXmlPrefixUri(SvgParseErrorPosition)
UnexpectedXmlUri(SvgParseErrorPosition)
UnexpectedXmlnsUri(SvgParseErrorPosition)
InvalidElementNamePrefix(SvgParseErrorPosition)
DuplicatedNamespace(DuplicatedNamespaceError)
UnknownNamespace(UnknownNamespaceError)
UnexpectedCloseTag(UnexpectedCloseTagError)
UnexpectedEntityCloseTag(SvgParseErrorPosition)
UnknownEntityReference(UnknownEntityReferenceError)
MalformedEntityReference(SvgParseErrorPosition)
EntityReferenceLoop(SvgParseErrorPosition)
InvalidAttributeValue(SvgParseErrorPosition)
DuplicatedAttribute(DuplicatedAttributeError)
NoRootNode
SizeLimit
ParserError(XmlParseError)
struct DuplicatedNamespaceError has destructor
ns: String
struct UnknownNamespaceError has destructor
ns: String
struct UnexpectedCloseTagError has destructor
expected: String
actual: String
struct UnknownEntityReferenceError has destructor
entity: String
struct DuplicatedAttributeError has destructor
attribute: String
union enum XmlParseError has destructor
InvalidDeclaration(XmlTextError)
InvalidComment(XmlTextError)
InvalidPI(XmlTextError)
InvalidDoctype(XmlTextError)
InvalidEntity(XmlTextError)
InvalidElement(XmlTextError)
InvalidAttribute(XmlTextError)
InvalidCdata(XmlTextError)
InvalidCharData(XmlTextError)
UnknownToken(SvgParseErrorPosition)
struct XmlTextError has destructor
stream_error: XmlStreamError
union enum XmlStreamError has destructor
UnexpectedEndOfStream
InvalidName
NonXmlChar(NonXmlCharError)
InvalidChar(InvalidCharError)
InvalidCharMultiple(InvalidCharMultipleError)
InvalidQuote(InvalidQuoteError)
InvalidSpace(InvalidSpaceError)
InvalidString(InvalidStringError)
InvalidReference
InvalidExternalID
InvalidCommentData
InvalidCommentEnd
InvalidCharacterData
struct NonXmlCharError
ch: u32
struct InvalidCharError
expected: u8
got: u8
struct InvalidCharMultipleError has destructor
expected: u8
got: U8Vec
struct InvalidQuoteError
got: u8
struct InvalidSpaceError
got: u8
struct InvalidStringError has destructor
got: String
struct SvgParseErrorPosition
row: u32
col: u32