diff options
author | Thomas Herzog <thomas.herzog@mail.com> | 2018-04-05 15:09:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 15:09:35 +0200 |
commit | eaa5dfbdbd1217d62902f966496658770638c3d1 (patch) | |
tree | 9373e48a340eac9312c67131879f4aa7d8bdfc7f /modules/gdnative/nativescript/godot_nativescript.cpp | |
parent | 43f298a783a119a98a2fe91f234870ad70620872 (diff) | |
parent | ad93d3e277e9cf8f9081b4a09d2832f0fbc95dcf (diff) | |
download | redot-engine-eaa5dfbdbd1217d62902f966496658770638c3d1.tar.gz |
Merge pull request #17980 from karroffel/nativescript-1.1-global-type-tags
[NativeScript] added global type tag system
Diffstat (limited to 'modules/gdnative/nativescript/godot_nativescript.cpp')
-rw-r--r-- | modules/gdnative/nativescript/godot_nativescript.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/gdnative/nativescript/godot_nativescript.cpp b/modules/gdnative/nativescript/godot_nativescript.cpp index aea595d0f0..593ff34a62 100644 --- a/modules/gdnative/nativescript/godot_nativescript.cpp +++ b/modules/gdnative/nativescript/godot_nativescript.cpp @@ -313,6 +313,14 @@ void GDAPI godot_nativescript_set_signal_documentation(void *p_gdnative_handle, signal->get().documentation = *(String *)&p_documentation; } +void GDAPI godot_nativescript_set_global_type_tag(int p_idx, const char *p_name, const void *p_type_tag) { + NativeScriptLanguage::get_singleton()->set_global_type_tag(p_idx, StringName(p_name), p_type_tag); +} + +const void GDAPI *godot_nativescript_get_global_type_tag(int p_idx, const char *p_name) { + return NativeScriptLanguage::get_singleton()->get_global_type_tag(p_idx, StringName(p_name)); +} + void GDAPI godot_nativescript_set_type_tag(void *p_gdnative_handle, const char *p_name, const void *p_type_tag) { String *s = (String *)p_gdnative_handle; @@ -347,10 +355,6 @@ const void GDAPI *godot_nativescript_get_type_tag(const godot_object *p_object) return NULL; } -#ifdef __cplusplus -} -#endif - int GDAPI godot_nativescript_register_instance_binding_data_functions(godot_instance_binding_functions p_binding_functions) { return NativeScriptLanguage::get_singleton()->register_binding_functions(p_binding_functions); } @@ -362,3 +366,7 @@ void GDAPI godot_nativescript_unregister_instance_binding_data_functions(int p_i void GDAPI *godot_nativescript_get_instance_binding_data(int p_idx, godot_object *p_object) { return NativeScriptLanguage::get_singleton()->get_instance_binding_data(p_idx, (Object *)p_object); } + +#ifdef __cplusplus +} +#endif |