You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user