summaryrefslogtreecommitdiff
path: root/modules/gdnative/include/nativescript
diff options
context:
space:
mode:
authorkarroffel <therzog@mail.de>2018-02-09 15:04:41 +0100
committerkarroffel <therzog@mail.de>2018-02-09 15:04:41 +0100
commit0b2afa24b8d3bc0bed579f402a0eec5e544d2429 (patch)
treef25fea8ba83e3b171c3e500736692a6febbeaafc /modules/gdnative/include/nativescript
parent2fb66df669eea236938388a56c2bb2bf490b8a62 (diff)
add initial NativeScript 1.1 extension
This commit adds new functionality to NativeScript, namely: - ability to set and get documentation for classes, methods, signals and properties - ability to set names and type information to method arguments - ability to set and get type tags for nativescripts - ability to register instance binding data management functions - ability to use instance binding data
Diffstat (limited to 'modules/gdnative/include/nativescript')
-rw-r--r--modules/gdnative/include/nativescript/godot_nativescript.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/modules/gdnative/include/nativescript/godot_nativescript.h b/modules/gdnative/include/nativescript/godot_nativescript.h
index 11017ae78d..747328bc41 100644
--- a/modules/gdnative/include/nativescript/godot_nativescript.h
+++ b/modules/gdnative/include/nativescript/godot_nativescript.h
@@ -185,6 +185,52 @@ void GDAPI godot_nativescript_register_signal(void *p_gdnative_handle, const cha
void GDAPI *godot_nativescript_get_userdata(godot_object *p_instance);
+/*
+ *
+ *
+ * NativeScript 1.1
+ *
+ *
+ */
+
+// method registering with argument names
+
+typedef struct {
+ godot_string name;
+
+ godot_variant_type type;
+ godot_property_hint hint;
+ godot_string hint_string;
+} godot_method_arg;
+
+void GDAPI godot_nativescript_set_method_argument_information(void *p_gdnative_handle, const char *p_name, const char *p_function_name, int p_num_args, const godot_method_arg *p_args);
+
+// documentation
+
+void GDAPI godot_nativescript_set_class_documentation(void *p_gdnative_handle, const char *p_name, godot_string p_documentation);
+void GDAPI godot_nativescript_set_method_documentation(void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_string p_documentation);
+void GDAPI godot_nativescript_set_property_documentation(void *p_gdnative_handle, const char *p_name, const char *p_path, godot_string p_documentation);
+void GDAPI godot_nativescript_set_signal_documentation(void *p_gdnative_handle, const char *p_name, const char *p_signal_name, godot_string p_documentation);
+
+// type tag API
+
+void GDAPI godot_nativescript_set_type_tag(void *p_gdnative_handle, const char *p_name, const void *p_type_tag);
+const void GDAPI *godot_nativescript_get_type_tag(const godot_object *p_object);
+
+// instance binding API
+
+typedef struct {
+ void *(*alloc_instance_binding_data)(void *, godot_object *);
+ void (*free_instance_binding_data)(void *, void *);
+ void *data;
+ void (*free_func)(void *);
+} godot_instance_binding_functions;
+
+int GDAPI godot_nativescript_register_instance_binding_data_functions(godot_instance_binding_functions p_binding_functions);
+void GDAPI godot_nativescript_unregister_instance_binding_data_functions(int p_idx);
+
+void GDAPI *godot_nativescript_get_instance_binding_data(int p_idx, godot_object *p_object);
+
#ifdef __cplusplus
}
#endif