Top Level Namespace

Defined in:

Method Summary

Method Detail

def ap_swiftkit_invoke_action(token : UInt64, value : Float64) : Void #

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).


[View source]
def ap_swiftkit_invoke_action_string(token : UInt64, value : Pointer(UInt8)) : Void #

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).


[View source]
def crystal_ui_bool_callback_dispatch(tag : UInt64, value : Int32) : Void #

[View source]
def crystal_ui_callback_dispatch(tag : UInt64) : Void #

C-exported callback for the CrystalActionDispatcher ObjC class. Called from ObjC when a button's action fires: dispatch: -> crystal_ui_callback_dispatch(tag)


[View source]
def crystal_ui_float_callback_dispatch(tag : UInt64, value : Float64) : Void #

[View source]
def crystal_ui_int_callback_dispatch(tag : UInt64, value : Int32) : Void #

[View source]
def crystal_ui_string_bool_callback_dispatch(tag : UInt64, value : Pointer(UInt8)) : Int32 #

[View source]
def crystal_ui_string_callback_dispatch(tag : UInt64, value : Pointer(UInt8)) : Void #

[View source]