summaryrefslogtreecommitdiffstats
path: root/modules/gdnative/nativescript/godot_nativescript.cpp
diff options
context:
space:
mode:
authorkarroffel <therzog@mail.de>2018-04-04 21:32:49 +0200
committerkarroffel <therzog@mail.de>2018-04-05 00:06:33 +0200
commitad93d3e277e9cf8f9081b4a09d2832f0fbc95dcf (patch)
tree616ed30f1c20d13d854bcf07cc9f6f2386731af4 /modules/gdnative/nativescript/godot_nativescript.cpp
parentc5bb997a8f2d538cc89ac09ddd0ea8d5cf69df88 (diff)
downloadredot-engine-ad93d3e277e9cf8f9081b4a09d2832f0fbc95dcf.tar.gz
[NativeScript] added global type tag system
Diffstat (limited to 'modules/gdnative/nativescript/godot_nativescript.cpp')
-rw-r--r--modules/gdnative/nativescript/godot_nativescript.cpp16
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