Skip to main content

Crate azul_core

Crate azul_core 

Source
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.
audio
Audio POD types — AudioConfig (stream format) + AudioFrame (interleaved f32 samples).
biometric
Biometric-auth POD types — BiometricKind + BiometricResult + BiometricPrompt.
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 + … .
compact
Converts CssPropertyCache into compact three-tier numeric cache. Builder function to convert CssPropertyCache → CompactLayoutCache.
db
SQL database POD types — DbValue + DbRows (engine-agnostic). The Db handle + SQLite engine live in azul_dll behind db-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.
geolocation
Geolocation POD types — LocationFix + GeolocationProbeConfig.
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.
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.
hash
no_std-friendly default hasher used for change-detection hashing.
hit_test
Hit-test results (which DOM nodes are under the cursor) + the type-safe hit-test tag system for compositor integration (merged from hit_test_tag).
host_invoker
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.
macros
Internal macros for Vec, Option, and callback boilerplate.
menu
Menu system: context menus, dropdown menus, and menu bars. Menu system for context menus, dropdown menus, and application menus.
paged
Paged-media primitives: the FragmentationContext (continuous vs. paged) and PageMargins. The pagination/slicing logic lives in azul_layout::solver3. Paged media layout primitives.
path_parser
SVG d="" path data parser. SVG d="" path data parser.
profile
Unified AZ_PROFILE gate 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.
selection
Text selection and cursor positioning for inline content. Text selection and cursor positioning for inline content.
sensors
Motion-sensor POD types — SensorKind + SensorReading.
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.
sync
no_std-friendly synchronization primitives.
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
ui_solver
Default font/text constants and small geometry helpers for layout. Small geometry types used by the layout solver and text shaping pipeline.
url
URL POD type (Url/UrlParseError); parsing gated behind the url feature. URL types for the C API.
video
Video-playback POD types — VideoConfig (source URL + autoplay/loop).
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, Ord for a callback struct with .cb (function pointer) and .ctx (OptionRefAny) fields.
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.
impl_display
Implement Display for an enum.
impl_from
Implement the From trait for any type.
impl_managed_callback
Macro that expands to the per-callback-kind boilerplate:
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§

FastBTreeSet
OrderedMap
Ordered map alias used throughout azul-core.