module Godot::Bridge

Defined in:

libgodot/bridge.cr

Class Method Summary

Macro Summary

Class Method Detail

def self.alive_instance_count : Int32 #

def self.alive_instances : Hash(Pointer(Void), Godot::Object) #

Retrieves the active Crystal instance root table for testing and diagnostics


def self.alive_mutex : ::Thread::Mutex #

def self.api : Pointer(LibBridge::BridgeAPI) #

def self.arg_to_string(arg_ptr : Pointer(Void)) : String #

def self.arg_to_string_name(arg_ptr : Pointer(Void)) : String #

def self.available? : Bool #

def self.cached_string_name(str : String | Symbol) : Pointer(Void) #

def self.construct_object(class_name : String) : Pointer(Void) #

def self.debug(msg : String) : Void #

def self.deinit : Void #

def self.emit_signal(godot_obj : Pointer(Void), signal_name : String) : Void #

def self.emit_signal(godot_obj : Pointer(Void), signal_name : String, *args) : Void #

def self.error(desc : String, msg : String = "", func : String = "", file : String = "", line : Int32 = 0) : Void #

def self.find_alive_instance(godot_obj : Pointer(Void)) : Godot::Object | Nil #

def self.free_nodepath(ptr : Pointer(Void) | Nil) : Void #

def self.free_string(ptr : Pointer(Void) | Nil) : Void #

def self.free_string_name(ptr : Pointer(Void) | Nil) : Void #

def self.get_axis(negative_action : String | Symbol, positive_action : String | Symbol) : Float32 #

def self.get_language_object : Pointer(Void) #

def self.get_method_bind(class_name : String, method_name : String, hash : Int64) : Pointer(Void) #

Generic Engine Dispatchers


def self.get_singleton(name : String) : Pointer(Void) #

def self.get_vector(negative_x : String | Symbol, positive_x : String | Symbol, negative_y : String | Symbol, positive_y : String | Symbol, deadzone : Float64 = -1.0) : Vector2 #

def self.get_velocity(godot_obj : Pointer(Void)) : Vector3 #

def self.has_alive_instance?(boxed : Pointer(Void)) : Bool #

def self.highlighter_add_span(ret : Pointer(Void), col : Int64, r : Float32, g : Float32, b : Float32, a : Float32 = 1.0_f32) : Void #

def self.init(api : Pointer(LibBridge::BridgeAPI)) #

def self.init_done=(init_done : Bool) #

def self.init_done? : Bool #

def self.is_action_just_pressed(action : String | Symbol, exact_match : Bool = false) : Bool #

def self.is_action_just_released(action : String | Symbol, exact_match : Bool = false) : Bool #

def self.is_action_pressed(action : String | Symbol, exact_match : Bool = false) : Bool #

def self.is_instance_valid(id : UInt64) : Bool #

def self.is_key_pressed(key : Int32) : Bool #

def self.is_language_registered? : Bool #

def self.is_loader_registered? : Bool #

def self.is_mouse_button_pressed(button : Int64) : Bool #

def self.is_object_valid(obj : Pointer(Void)) : Bool #

def self.is_on_floor(godot_obj : Pointer(Void)) : Bool #

Engine Method Calls


def self.is_physical_key_pressed(key : Int32) : Bool #

def self.is_saver_registered? : Bool #

def self.load_editor_help(xml : String) : Void #

def self.make_nodepath(path : String) : Pointer(Void) #

def self.make_string(str : String) : Pointer(Void) #

def self.make_string_name(str : String) : Pointer(Void) #

def self.move_and_slide(godot_obj : Pointer(Void)) : Bool #

def self.node_find_child(godot_obj : Pointer(Void), pattern : String, recursive : Bool = true, owned : Bool = false) : Pointer(Void) #

def self.node_get_name(godot_obj : Pointer(Void)) : String #

def self.node_get_node(godot_obj : Pointer(Void), path : String) : Pointer(Void) #

def self.node_rpc_config(godot_obj : Pointer(Void), method : String, rpc_mode : Int32, transfer_mode : Int32, call_local : Bool, channel : Int32) : Void #

def self.object_call(godot_obj : Pointer(Void), method_name : String) : Void #

def self.object_call(godot_obj : Pointer(Void), method_name : String, *args) : Void #

def self.object_call_deferred(godot_obj : Pointer(Void), method_name : String) : Void #

def self.object_call_deferred(godot_obj : Pointer(Void), method_name : String, *args) : Void #

def self.object_call_ret_bool(godot_obj : Pointer(Void), method_name : String, *args) : Bool #

def self.object_call_ret_float(godot_obj : Pointer(Void), method_name : String, *args) : Float64 #

def self.object_call_ret_int(godot_obj : Pointer(Void), method_name : String, *args) : Int64 #

def self.object_call_ret_object(godot_obj : Pointer(Void), method_name : String, *args) : Pointer(Void) #

def self.object_call_ret_string(godot_obj : Pointer(Void), method_name : String, *args) : String #

def self.object_class_name(obj : Pointer(Void)) : String #

def self.object_connect_signal(godot_obj : Pointer(Void), signal_name : String, flags : UInt32 = 0_u32) : Void #

def self.object_destroy(godot_obj : Pointer(Void)) : Void #

def self.object_disconnect_signal(godot_obj : Pointer(Void), signal_name : String) : Void #

def self.object_get_instance_from_id(id : UInt64) : Pointer(Void) #

def self.object_get_instance_id(godot_obj : Pointer(Void)) : UInt64 #

def self.object_is_class(obj : Pointer(Void), class_name : String) : Bool #

def self.packed_scene_instantiate(scene_ptr : Pointer(Void), edit_state : Int64 = 0_i64) : Pointer(Void) #

def self.placeholder_script_instance_create(language : Pointer(Void), script : Pointer(Void), owner : Pointer(Void)) : Pointer(Void) #

def self.print(msg : String) : Void #

def self.print_verbose(msg : String) : Void #

def self.printerr(msg : String) : Void #

def self.ptrcall(method_bind : Pointer(Void), instance : Pointer(Void), args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void #

def self.range_set_value(godot_obj : Pointer(Void), value : Float64) : Void #

def self.ref_get_object(ref_ptr : Pointer(Void)) : Pointer(Void) #

def self.register_alive_instance(boxed : Pointer(Void), inst : Godot::Object) : Void #

def self.register_shutdown_callback(&block : -> Void) #

def self.reloading? : Bool #

def self.resource_get_path(res_obj : Pointer(Void)) : String #

def self.resource_loader_load(path : String, type_hint : String = "", cache_mode : Int64 = 0_i64) : Pointer(Void) #

def self.ret_array_empty(ret : Pointer(Void)) : Void #

def self.ret_dictionary_complete_code(ret : Pointer(Void)) : Void #

def self.ret_dictionary_complete_code_ex(ret : Pointer(Void), result : Int64, force : Bool, call_hint : String, options : Slice(BridgeCompletionOption) | Array(BridgeCompletionOption)) : Void #

def self.ret_dictionary_empty(ret : Pointer(Void)) : Void #

def self.ret_dictionary_global_class(ret : Pointer(Void), class_name : String, base_type : String = "Node", icon_path : String = "") : Void #

def self.ret_dictionary_lookup_code(ret : Pointer(Void)) : Void #

def self.ret_dictionary_lookup_code_ex(ret : Pointer(Void), result : Int64, type : Int64, class_name : String, class_member : String, description : String, script_path : String, location : Int64) : Void #

def self.ret_dictionary_validate(ret : Pointer(Void), valid : Bool) : Void #

def self.ret_object(ret : Pointer(Void), obj_ptr : Pointer(Void)) : Void #

def self.ret_packed_string_array(ret : Pointer(Void), strings : Array(String)) : Void #

def self.ret_property_list(ret : Pointer(Void), props : Slice(LibBridge::CrystalPropertyDesc) | Array(LibBridge::CrystalPropertyDesc)) : Void #

def self.ret_ref(ret : Pointer(Void), obj_ptr : Pointer(Void)) : Void #

def self.ret_signal_list(ret : Pointer(Void), signals : Slice(LibBridge::CrystalSignalDesc) | Array(LibBridge::CrystalSignalDesc)) : Void #

def self.ret_string(ret : Pointer(Void), str : String) : Void #

def self.ret_string_name(ret : Pointer(Void), str : String) : Void #

def self.ret_variant_nil(ret : Pointer(Void)) : Void #

def self.ret_variant_object(ret : Pointer(Void), obj_ptr : Pointer(Void)) : Void #

def self.script_get_source_code(script_obj : Pointer(Void)) : String #

def self.set_debugger_cleanup(callback : -> Void) : Void #

def self.set_language_object(obj : Pointer(Void)) : Void #

def self.set_language_registered(registered : Bool) : Void #

def self.set_loader_registered(registered : Bool) : Void #

def self.set_reloading(reloading : Bool) : Void #

def self.set_saver_registered(registered : Bool) : Void #

def self.set_velocity(godot_obj : Pointer(Void), v : Vector3) : Void #

def self.static_ptrcall(method_bind : Pointer(Void), args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void #

def self.text_edit_get_line(text_edit : Pointer(Void), line : Int64) : String #

def self.trigger_debugger_cleanup : Void #

def self.type_from_variant(type : Int32, dst : Pointer(Void), variant_ptr : Pointer(Void)) : Void #

def self.unregister_alive_instance(boxed : Pointer(Void)) : Void #

def self.unregister_alive_instance_by_ptr(godot_obj : Pointer(Void)) : Void #

def self.use_accumulated_input : Bool #

def self.use_accumulated_input=(enable : Bool) : Void #

def self.variant_from_type(type : Int32, variant_ptr : Pointer(Void), src : Pointer(Void)) : Void #

def self.verbose? : Bool #

Engine Logging Helpers


def self.warning(desc : String, msg : String = "", func : String = "", file : String = "", line : Int32 = 0) : Void #

Macro Detail

macro early_register_component(class_name) #

Early-registers an engine component if it is defined in the current compilation unit


macro unregister_component(class_name, display_name = nil) #

Unregisters an engine component during bridge deinitialization if defined in the current compilation unit