Skip to main content

Module callbacks

Module callbacks 

Source
Expand description

Callback handling for layout events (invocation, result processing). 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§

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.
CallbackInfoRefData
Reference data container for CallbackInfo (all read-only fields)
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

Statics§

CALLBACK_INVOKER
Process-global slot for this callback kind’s host-side invoker.

Functions§

AzApp_setCallbackInvoker
Register the host-side invoker for this callback kind.
AzCallback_createFromHostHandle
C-ABI export wrapping <Wrapper>::create_from_host_handle.
base64_encode
Encode bytes to Base64 string
css_properties_need_relayout
Whether a batch of CSS property overrides can move geometry, i.e. whether applying it has to re-run layout or only has to repaint.

Type Aliases§

AzCallbackInvoker
Pointer-arg variant of this callback kind’s typedef.
CallbackType
Main callback type for UI event handling
RenderImageCallbackType
Callback type that renders an OpenGL texture