Skip to main content

Module callbacks

Module callbacks 

Source
Expand description

Callback handling for layout events

This module provides the CallbackInfo struct and related types for handling UI callbacks. Callbacks need access to layout information (node sizes, positions, hierarchy), which is why this module lives in azul-layout instead of azul-core.

Structs§

CallCallbacksResult
Result of calling callbacks, containing all state changes
Callback
Stores a function pointer that is executed when the given UI element is hit
CallbackInfo
CallbackInfo is a lightweight wrapper around pointers to stack-local data. It can be safely copied because it only contains pointers - the underlying data lives on the stack and outlives the callback invocation. This allows callbacks to “consume” CallbackInfo by value while the caller retains access to the same underlying data.
CallbackInfoRefData
Information about the callback that is passed to the callback whenever a callback is invoked
DeleteResult
FFI-safe wrapper for delete inspection result (range_to_delete, deleted_text)
ExternalSystemCallbacks
Config necessary for threading + animations to work in no_std environments
MenuCallback
Menu callback: What data / function pointer should be called when the menu item is clicked?
PenTilt
FFI-safe wrapper for pen tilt angles (x_tilt, y_tilt) in degrees
RenderImageCallback
Callback that returns a rendered OpenGL texture
RenderImageCallbackInfo
Information passed to image rendering callbacks
SelectAllResult
FFI-safe wrapper for select-all result (full_text, selected_range)

Enums§

CallbackChange
Represents a change made by a callback that will be applied after the callback returns
FocusUpdateRequest
Request to change focus, returned from callbacks
OptionCallback
FFI-safe Option type for C interop.
OptionDeleteResult
OptionMenuCallback
Optional MenuCallback
OptionPenTilt
OptionSelectAllResult
ResultStringString
Result type for functions returning String or a String error
ResultU8VecString
Result type for functions returning U8Vec or a String error
ResultVoidString
Result type for functions returning () or a String error

Functions§

callback_type_to_core
Convert a raw function pointer to CoreCallback
core_callback_to_fn
Safe conversion from CoreCallback to function pointer

Type Aliases§

CallbackType
Main callback type for UI event handling
RenderImageCallbackType
Callback type that renders an OpenGL texture