Top Level Namespace
Defined in:
Method Summary
-
ap_swiftkit_invoke_action(token : UInt64, value : Float64) : Void
----------------------------------------------------------------------------- SwiftKit action trampoline.
-
ap_swiftkit_invoke_action_string(token : UInt64, value : Pointer(UInt8)) : Void
Phase 6.10 Rem 4 (Item 1) — string-valued SwiftKit action trampoline.
- crystal_ui_bool_callback_dispatch(tag : UInt64, value : Int32) : Void
-
crystal_ui_callback_dispatch(tag : UInt64) : Void
C-exported callback for the CrystalActionDispatcher ObjC class.
- crystal_ui_float_callback_dispatch(tag : UInt64, value : Float64) : Void
- crystal_ui_int_callback_dispatch(tag : UInt64, value : Int32) : Void
- crystal_ui_string_bool_callback_dispatch(tag : UInt64, value : Pointer(UInt8)) : Int32
- crystal_ui_string_callback_dispatch(tag : UInt64, value : Pointer(UInt8)) : Void
Method Detail
SwiftKit action trampoline.
Called by AssetPipelineSwiftKit's CallbackBridge.fire(token:value:) via
the @convention(c) function pointer installed by
APSKRuntime.initialize(actionTrampoline:). The pointer to this fun
is what Crystal hands to Swift during sample-app startup.
value carries:
- 0.0 for no-arg callbacks (Button#on_tap)
- the new Float64 for Slider#on_change, Stepper#on_change
- 1.0/0.0 for Toggle#on_change (Bool encoded as Float64)
Unknown tokens are a silent no-op (matches the existing crystal_ui_* convention so a callback firing after teardown does not crash).
Phase 6.10 Rem 4 (Item 1) — string-valued SwiftKit action trampoline.
Called by AssetPipelineSwiftKit's CallbackBridge.fireString(token:value:)
via the @convention(c) function pointer installed by
APSKRuntime.initialize(stringTrampoline:). Receives a NUL-terminated
UTF-8 string that must be copied into a Crystal String before the
pointer becomes invalid (Swift's value.withCString keeps the buffer
alive only for the duration of the trampoline call).
C-exported callback for the CrystalActionDispatcher ObjC class. Called from ObjC when a button's action fires: dispatch: -> crystal_ui_callback_dispatch(tag)