class
Godot::TypedSignal(*T)
- Godot::TypedSignal(*T)
- Godot::BoundSignal
- Reference
- Object
Overview
Strongly-typed signal binding offering compile-time type safety for signal connections and await.
Defined in:
libgodot/object.crConstructors
Instance Method Summary
-
#<<(&block : *T -> Void) : SignalSubscription
Operator
<<syntactic sugar for type-safe connect with a block -
#<<(proc : Proc(*T, R)) : SignalSubscription forall R
Operator
<<syntactic sugar for type-safe connect with a Proc -
#<<(proc : Proc(R)) : SignalSubscription forall R
Operator
<<syntactic sugar for 0-argument Proc -
#await(timeout_sec : Float64 | Nil = nil)
Cooperatively awaits this typed signal returning unboxed values or tuple
-
#await(timeout_sec : Number)
Cooperatively awaits this signal with timeout in seconds
-
#connect(flags : ConnectFlags = ConnectFlags::None, &block : *T -> Void) : SignalSubscription
Type-safe connect with automatic unboxing into block parameters
-
#connect_one_shot(&block : *T -> Void) : SignalSubscription
Backwards-compatibility helper redirecting to ConnectFlags::OneShot
-
#emit(*args : *T) : Void
Emits this typed signal with compile-time type safety matching the signal declaration
-
#once(&block : *T -> Void) : SignalSubscription
Idiomatic shorthand alias for
#connect_one_shot
Instance methods inherited from class Godot::BoundSignal
<<(&block : Array(Variant) -> Void) : SignalSubscription<<(proc : Proc(Array(Variant), R)) : SignalSubscription forall R
<<(proc : Proc(R)) : SignalSubscription forall R <<, alive? : Bool alive?, await(timeout_sec : Float64 | Nil = nil) : Array(Variant)
await(timeout_sec : Number) : Array(Variant) await, connect(flags : ConnectFlags = ConnectFlags::None, callback : Proc(Array(Variant), Void) | Nil = nil) : SignalSubscription
connect(flags : ConnectFlags = ConnectFlags::None, &block : Array(Variant) -> Void) : SignalSubscription
connect(listener_target : Godot::Object, method_name : Symbol, flags : ConnectFlags = ConnectFlags::None) : SignalSubscription connect, connect_one_shot(&block : Array(Variant) -> Void) : SignalSubscription connect_one_shot, connected? : Bool connected?, connection_count : Int32 connection_count, disconnect : Void disconnect, emit(*args) : Void emit, has_connections? : Bool has_connections?, name : String name, once(&block : Array(Variant) -> Void) : SignalSubscription once, target : Godot::Object target, target_id : UInt64 target_id, to_s(io : IO) : Void to_s
Constructor methods inherited from class Godot::BoundSignal
new(target : Godot::Object, name : String)
new
Constructor Detail
Instance Method Detail
Operator << syntactic sugar for type-safe connect with a block
Operator << syntactic sugar for type-safe connect with a Proc
Operator << syntactic sugar for 0-argument Proc
Cooperatively awaits this typed signal returning unboxed values or tuple
Cooperatively awaits this signal with timeout in seconds
Type-safe connect with automatic unboxing into block parameters
Backwards-compatibility helper redirecting to ConnectFlags::OneShot
Emits this typed signal with compile-time type safety matching the signal declaration