Expand description
Shared datatypes for azul-* crates
azul-core provides the platform-independent core types used throughout
the Azul toolkit. Key modules include dom for DOM construction,
callbacks for event callback types, styled_dom for the CSSOM,
and window for OS windowing abstractions.
This crate depends on azul_css for CSS property definitions and is
consumed by azul-layout, azul-dll, and the platform shell crates.
It supports no_std environments via #![cfg_attr(not(feature = "std"), no_std)].
Modules§
- a11y
- Accessibility types for screen-reader integration (AccessKit). Accessibility types for screen reader support.
- animation
- CSS animation and transition configuration. Core data structures for configuring and tracking CSS animations
- audio
- Audio POD types —
AudioConfig(stream format) +AudioFrame(interleaved f32 samples). The unit captured from the mic, played back, and (P8) shared over UDP. Backend (rodio / cpal / AVAudioEngine / AAudio) lives dll-side. POD types for the audio surface (SUPER_PLAN_2 §4 P7). - biometric
- Biometric-auth POD types —
BiometricKind+BiometricResult+BiometricPrompt. Stateful manager lives inazul_layout::managers::biometric. POD types for the biometric-authentication surface (SUPER_PLAN_2 §1 feature 4 + research/02). - callbacks
- Callback types: layout, event, timer, thread, and focus handling. Callback types for the Azul UI framework.
- camera
- Camera-capture POD types —
CaptureStreamId+CameraConfig+CameraFacing+StreamState+ … . The statefulCameraStream/CameraManager(which own the sharedImageReftexture) live inazul_layout::managers::camera. POD types for the camera-capture surface (SUPER_PLAN_2 §4 Priority 6 + research/01). - compact_
cache_ builder - Converts
CssPropertyCacheinto compact three-tier numeric cache. Builder function to convert CssPropertyCache → CompactLayoutCache. - db
- SQL database POD types —
DbValue+DbRows(engine-agnostic). TheDbhandle + SQLite engine live inazul_dllbehinddb-sqlite. POD types for the SQL database surface (SUPER_PLAN_2 §4 P4.3). - debug
- Debug logging system with category filtering. Debug logging types and macros for Azul.
- diff
- Linear-time DOM diffing for incremental updates. DOM Reconciliation Module
- dom
- DOM construction:
Dom,NodeData,NodeType, and the CSS-in-Rust API. Defines the core Document Object Model (DOM) structures. - drag
- Drag context for text selection, scrollbar, node, and window drags. Unified drag context for all drag operations.
- events
- Event filtering: mouse, keyboard, window, and synthetic events. Event and callback filtering module
- gamepad
- Gamepad POD types —
GamepadId+GamepadButton+GamepadAxis+GamepadState. Stateful manager lives inazul_layout::managers::gamepad. POD types for the gamepad / game-controller surface (SUPER_PLAN_2 §1 feature 6 + research/03 §“Feature 6”). - geolocation
- Geolocation POD types —
LocationFix+GeolocationProbeConfig. Stateful manager lives inazul_layout::managers::geolocation. POD types for the geolocation surface. Defined here inazul-coresoNodeType::GeolocationProbe(GeolocationProbeConfig)can carry the config withoutazul-layouthaving to be aazul-coredependency. - geom
- Logical and physical coordinate types (
LogicalSize,PhysicalPosition, etc.). Logical and physical coordinate types for the GUI toolkit. - gl
- OpenGL context wrappers, shader compilation, and texture cache. OpenGL context wrappers, texture cache management, shader compilation, vertex buffer abstractions, and FFI-safe GL type aliases for the C/Python API.
- gl_fxaa
- FXAA (Fast Approximate Anti-Aliasing) shader. FXAA (Fast Approximate Anti-Aliasing) shader implementation.
- glconst
- OpenGL constants (GL 1.1 through GL 4.x). OpenGL constants (GL 1.1 through GL 4.x and common extensions).
- gpu
- GPU value cache for CSS transforms and opacity. GPU value caching for CSS transforms and opacity.
- hit_
test - Hit-test results: which DOM nodes are under the cursor. Hit-test result types for determining which DOM nodes are under the cursor, scroll state tracking, and pipeline/document identification. These types feed into the event dispatch system.
- hit_
test_ tag - Type-safe hit-test tag system for compositor integration. Type-safe hit-test tag system for WebRender integration.
- host_
invoker - Host-language callback invoker registry — the C-ABI surface managed-FFI
bindings (Lua, Ruby, …) use to register one per-kind invoker + a single
shared releaser, so callbacks can be created via
_createFromHostHandlewithout the host having to generate trampolines for struct-by-value signatures their FFI library can’t handle. Host-language callback invoker registry. - icon
- Icon provider system for loading icons from fonts, images, or zip packs. Generic icon provider system for Azul
- id
- Arena-based node tree storage and hierarchy management. Node tree data structures and hierarchy management.
- json
- JSON value types for the C API (no serde dependency). JSON value types for C API (data definitions only, no serde_json dependency)
- keyring
- System-keyring POD types —
KeyringRequest+KeyringResult. Stateful manager lives inazul_layout::managers::keyring. POD types for the system-keyring surface (SUPER_PLAN_2 §4 P4.2 + research/02 §0 “hardware-bound” storage). - macros
- Internal macros for
Vec,Option, and callback boilerplate. Utility macros for implementing common trait patterns on callback types and enum conversions (From,Display). Used by thecore,layout, andcsscrates. - menu
- Menu system: context menus, dropdown menus, and menu bars. Menu system for context menus, dropdown menus, and application menus.
- profile
- Unified
AZ_PROFILEgate for memory and CPU profiling instrumentation. Unified profiling gate. - prop_
cache - CSS property cache for efficient per-node style resolution. CSS property cache for efficient style resolution and animation.
- refany
- Type-erased, ref-counted smart pointer with runtime borrow checking. Type-erased, reference-counted smart pointer with runtime borrow checking.
- resources
- Resource management: font/image loading, caching, and garbage collection. Resource management types for the application.
- screencap
- Screen-capture POD types —
ScreenCaptureSource+ScreenCaptureConfig. Symmetric to the camera surface (a “dumb widget” inazul_layout::widgets::screencap); reusescamera’s capture status types. POD types for the screen-capture surface (SUPER_PLAN_2 §4 Priority 6 + research/01). - selection
- Text selection and cursor positioning for inline content. Text selection and cursor positioning for inline content.
- sensors
- Motion-sensor POD types —
SensorKind+SensorReading. Stateful manager lives inazul_layout::managers::sensors. POD types for the motion-sensor surface (SUPER_PLAN_2 §1 feature 5 + research/03 §“Feature 5”). - style
- CSS cascade: selector matching, specificity, and property inheritance. DOM tree to CSS style tree cascading.
- styled_
dom StyledDom— the result of applying CSS to a DOM tree (the CSSOM).StyledDom— the result of applying CSS styles to a DOM tree.- svg
- SVG rendering, path tessellation, and geometric operations. SVG rendering and path tessellation.
- svg_
path_ parser - SVG
d=""path data parser. SVGd=""path data parser. - task
- Timer, thread, and async task management. Timer and thread management for asynchronous operations.
- transform
- 3D transform matrix computation for CSS transforms. 3D transform matrix computations for CSS transforms.
- ua_css
- Built-in user-agent default stylesheet. User-Agent Default Stylesheet for Azul
- udp_
framing - UDP chunked-message framing (P8): split a >MTU payload into sequenced
datagrams + reassemble them, tolerating reorder + loss. Pure logic the
dll’s
Udphandle builds on; unit-tested here. Seeudp_framing.rs. UDP chunked-message framing (SUPER_PLAN_2 P8). - ui_
solver - Default font/text constants and small geometry helpers for layout. Small geometry types used by the layout solver and text shaping pipeline.
- video
- Video-playback POD types —
VideoConfig(source URL + autoplay/loop). Same “dumb widget” architecture (azul_layout::widgets::video); decoded via vk-video into the shared GL texture. POD types for the video-playback surface (SUPER_PLAN_2 §4 Priority 6 + research). - window
- Window configuration, input state, and platform-specific options. Window configuration types, input state, and platform-specific options.
- xml
- XML and XHTML parsing for declarative UI definitions. XML and XHTML parsing for declarative UI definitions.
Macros§
- impl_
callback - Implements
Display, Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ordfor a callback struct with.cb(function pointer) and.ctx(OptionRefAny) fields. Also implementsFrom<$callback_ty>to create a callback from a raw function pointer. - impl_
callback_ simple - Macro to implement callback traits for simple system callbacks (no callable field)
- impl_
callback_ traits - Helper macro implementing the shared trait impls (
Display,Debug,Hash,PartialEq,Eq,PartialOrd,Ord) for callback types. Used internally by [impl_callback!] and [impl_callback_simple!]. - impl_
display - Implement
Displayfor an enum. - impl_
from - Implement the
Fromtrait for any type. - impl_
managed_ callback - Macro that expands to the per-callback-kind boilerplate: a static thunk
(compiled into libazul) that the framework calls with by-value args, a
<Wrapper>::create_from_host_handle(u64)constructor, and anAzApp_set<Kind>Invokersetter the host calls once at module load. - log_
debug - Log a message at debug level
- log_
error - Log a message at error level
- log_
info - Log a message at info level
- log_
trace - Log a message at trace level
- log_
warn - Log a message at warn level
Type Aliases§
- FastB
Tree Set - Ordered
Map - Ordered map alias used throughout
azul-core.