High level GDNative
Single header GDNative high level API for C/C++
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
hgdn.h File Reference

hgdn.h – High level GDNative C/C++ API More...

#include <stdint.h>
#include "gdnative_api_struct.gen.h"

Go to the source code of this file.

Data Structures

union  hgdn_vector2
 
union  hgdn_vector3
 
union  hgdn_vector4
 
union  hgdn_rect2
 
union  hgdn_plane
 
union  hgdn_quat
 
union  hgdn_basis
 
union  hgdn_aabb
 
union  hgdn_transform2d
 
union  hgdn_transform
 
struct  hgdn_string
 
struct  hgdn_wide_string
 
struct  hgdn_byte_array
 
struct  hgdn_int_array
 
struct  hgdn_real_array
 
struct  hgdn_vector2_array
 
struct  hgdn_vector3_array
 
struct  hgdn_color_array
 
struct  hgdn_string_array
 
struct  hgdn_dictionary_entry
 
struct  hgdn_dictionary_entry_own
 
struct  hgdn_dictionary_entry_string
 
struct  hgdn_dictionary_entry_string_own
 
struct  hgdn_dictionary_entry_string_string
 
struct  hgdn_dictionary_entry_string_int
 
struct  hgdn_property_info
 
struct  hgdn_method_argument_info
 
struct  hgdn_method_info
 
struct  hgdn_signal_argument_info
 
struct  hgdn_signal_info
 
struct  hgdn_class_info
 

Macros

#define HGDN_DECL   extern
 
#define HGDN_STRING_FORMAT_BUFFER_SIZE   1024
 
#define HGDN_METHOD_ARGUMENTS_INFO_MAX   16
 
#define HGDN_QUAT_IDENTITY   ((hgdn_quat){ .elements = {0, 0, 0, 1} })
 
#define HGDN_BASIS_IDENTITY   ((hgdn_basis){ .elements = {1, 0, 0, 0, 1, 0, 0, 0, 1} })
 
#define HGDN_TRANSFORM2D_IDENTITY   ((hgdn_transform2d){ .elements = {1, 0, 0, 1, 0, 0} })
 
#define HGDN_TRANSFORM3D_IDENTITY   ((hgdn_transform){ .elements = {1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0} })
 
#define HGDN_PRINT_WARNING(fmt, ...)   (hgdn_print_warning(__PRETTY_FUNCTION__, __FILE__, __LINE__, fmt, ##__VA_ARGS__))
 
#define HGDN_PRINT_ERROR(fmt, ...)   (hgdn_print_error(__PRETTY_FUNCTION__, __FILE__, __LINE__, fmt, ##__VA_ARGS__))
 
#define HGDN_ASSERT(cond)   HGDN_ASSERT_MSG((cond), "Assertion error: !(" #cond ")")
 
#define HGDN_ASSERT_MSG(cond, fmt, ...)   if(!(cond)){ HGDN_PRINT_ERROR(fmt, ##__VA_ARGS__); return hgdn_new_nil_variant(); }
 If cond is false, print formatted error message and return nil Variant.
 
#define HGDN_ASSERT_ARRAY_SIZE(arr, min_size)   HGDN_ASSERT_MSG(hgdn_core_api->godot_array_size((arr)) >= (min_size), "Error: array should have size of at least " #min_size ", got %d", hgdn_core_api->godot_array_size((arr)))
 If arr doesn't have at least min_size elements, print error message and return nil Variant.
 
#define HGDN_ASSERT_ARGS_SIZE(argc, min_size)   HGDN_ASSERT_MSG((argc) >= (min_size), "Error: expected at least " #min_size " arguments, got %d", argc)
 If argc isn't at least min_size, print error message and return nil Variant.
 
#define hgdn_new_variant(value)
 Overloaded function/macro for creating Variants from any values. Available in C++ and C11.
 
#define hgdn_new_byte_array_args(...)   (hgdn_new_byte_array((const uint8_t[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_int_array_args(...)   (hgdn_new_int_array((const godot_int[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_real_array_args(...)   (hgdn_new_real_array((const godot_real[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_vector2_array_args(...)   (hgdn_new_vector2_array((const godot_vector2[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_vector3_array_args(...)   (hgdn_new_vector3_array((const godot_vector3[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_color_array_args(...)   (hgdn_new_color_array((const godot_color[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_string_array_args(...)   (hgdn_new_string_array((const char *const []){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_array_args(...)   (hgdn_new_array_own((godot_variant[]){ HGDN__MAP(hgdn_new_variant, __VA_ARGS__) }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_dictionary_args(...)   (hgdn_new_dictionary((const hgdn_dictionary_entry[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_dictionary_string_args(...)   (hgdn_new_dictionary_string((const hgdn_dictionary_entry_string[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_dictionary_string_int_args(...)   (hgdn_new_dictionary_string_int((const hgdn_dictionary_entry_string_int[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_dictionary_string_string_args(...)   (hgdn_new_dictionary_string_string((const hgdn_dictionary_entry_string_string[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_dictionary_own_args(...)   (hgdn_new_dictionary_own((hgdn_dictionary_entry_own[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_new_dictionary_string_own_args(...)   (hgdn_new_dictionary_string_own((hgdn_dictionary_entry_string_own[]){ __VA_ARGS__ }, HGDN__NARG(__VA_ARGS__)))
 
#define hgdn_object_get(instance, property)   (hgdn_object_call(instance, "get", property))
 
#define hgdn_object_set(instance, property, value)   (hgdn_object_call(instance, "set", property, value))
 
#define hgdn_object_call(instance, method, ...)   (hgdn_object_callv_own((instance), (method), hgdn_new_array_args(__VA_ARGS__)))
 
#define hgdn_properties(...)   ((hgdn_property_info[]){ __VA_ARGS__, {} })
 Helper for a literal NULL-terminated array of hgdn_property_info
 
#define hgdn_methods(...)   ((hgdn_method_info[]){ __VA_ARGS__, {} })
 Helper for a literal NULL-terminated array of hgdn_method_info
 
#define hgdn_method_arguments(...)   ((hgdn_method_argument_info[]){ __VA_ARGS__, {} })
 Helper for a literal NULL-terminated array of hgdn_method_argument_info
 
#define hgdn_signals(...)   ((hgdn_signal_info[]){ __VA_ARGS__, {} })
 Helper for a literal NULL-terminated array of hgdn_signal_info
 
#define hgdn_signal_arguments(...)   ((hgdn_signal_argument_info[]){ __VA_ARGS__, {} })
 Helper for a literal NULL-terminated array of hgdn_signal_argument_info
 
#define hgdn_instance_create_func_alloc(ctype)   ((const godot_instance_create_func){ &hgdn_instance_alloc, (void *) sizeof(ctype) })
 Create a godot_instance_create_func that allocates a zero-initialized ctype
 
#define hgdn_instance_destroy_func_free()   ((const godot_instance_destroy_func){ &hgdn_instance_free })
 Create a godot_instance_destroy_func that frees instance data.
 
#define hgdn_property_constant(value)   ((const godot_property_get_func){ &hgdn_property_constant_get, (void *) hgdn_property_constant_alloc(hgdn_new_variant((value))), &hgdn_property_constant_free })
 

Typedefs

typedef hgdn_vector2 godot_vector2
 
typedef hgdn_vector3 godot_vector3
 
typedef hgdn_vector4 godot_color
 Color is present on Pool Arrays and as MultiMesh instance data, so it's convenient having a full vector4 definition for it.
 
typedef hgdn_rect2 godot_rect2
 
typedef hgdn_plane godot_plane
 
typedef hgdn_quat godot_quat
 
typedef hgdn_basis godot_basis
 
typedef hgdn_aabb godot_aabb
 
typedef hgdn_transform2d godot_transform2d
 
typedef hgdn_transform godot_transform
 

Functions

HGDN_DECL void hgdn_gdnative_init (const godot_gdnative_init_options *options)
 
HGDN_DECL void hgdn_gdnative_terminate (const godot_gdnative_terminate_options *options)
 
HGDN_DECL void * hgdn_alloc (size_t size)
 Compatible with malloc
 
HGDN_DECL void * hgdn_realloc (void *ptr, size_t size)
 Compatible with realloc
 
HGDN_DECL void hgdn_free (void *ptr)
 Compatible with free. It is safe to pass NULL without triggering an error message.
 
HGDN_DECL void hgdn_print (const char *fmt,...)
 
HGDN_DECL void hgdn_print_warning (const char *funcname, const char *filename, int line, const char *fmt,...)
 
HGDN_DECL void hgdn_print_error (const char *funcname, const char *filename, int line, const char *fmt,...)
 
HGDN_DECL hgdn_string hgdn_string_get (const godot_string *str)
 
HGDN_DECL hgdn_string hgdn_string_get_own (godot_string str)
 
HGDN_DECL void hgdn_string_destroy (hgdn_string *str)
 
HGDN_DECL hgdn_wide_string hgdn_wide_string_get (const godot_string *str)
 
HGDN_DECL hgdn_wide_string hgdn_wide_string_get_own (godot_string str)
 
HGDN_DECL void hgdn_wide_string_destroy (hgdn_wide_string *str)
 
HGDN_DECL hgdn_byte_array hgdn_byte_array_get (const godot_pool_byte_array *array)
 
HGDN_DECL hgdn_byte_array hgdn_byte_array_get_own (godot_pool_byte_array array)
 
HGDN_DECL void hgdn_byte_array_destroy (hgdn_byte_array *array)
 
HGDN_DECL hgdn_int_array hgdn_int_array_get (const godot_pool_int_array *array)
 
HGDN_DECL hgdn_int_array hgdn_int_array_get_own (godot_pool_int_array array)
 
HGDN_DECL void hgdn_int_array_destroy (hgdn_int_array *array)
 
HGDN_DECL hgdn_real_array hgdn_real_array_get (const godot_pool_real_array *array)
 
HGDN_DECL hgdn_real_array hgdn_real_array_get_own (godot_pool_real_array array)
 
HGDN_DECL void hgdn_real_array_destroy (hgdn_real_array *array)
 
HGDN_DECL hgdn_vector2_array hgdn_vector2_array_get (const godot_pool_vector2_array *array)
 
HGDN_DECL hgdn_vector2_array hgdn_vector2_array_get_own (godot_pool_vector2_array array)
 
HGDN_DECL void hgdn_vector2_array_destroy (hgdn_vector2_array *array)
 
HGDN_DECL hgdn_vector3_array hgdn_vector3_array_get (const godot_pool_vector3_array *array)
 
HGDN_DECL hgdn_vector3_array hgdn_vector3_array_get_own (godot_pool_vector3_array array)
 
HGDN_DECL void hgdn_vector3_array_destroy (hgdn_vector3_array *array)
 
HGDN_DECL hgdn_color_array hgdn_color_array_get (const godot_pool_color_array *array)
 
HGDN_DECL hgdn_color_array hgdn_color_array_get_own (godot_pool_color_array array)
 
HGDN_DECL void hgdn_color_array_destroy (hgdn_color_array *array)
 
HGDN_DECL hgdn_string_array hgdn_string_array_get (const godot_pool_string_array *array)
 
HGDN_DECL hgdn_string_array hgdn_string_array_get_own (godot_pool_string_array array)
 
HGDN_DECL void hgdn_string_array_destroy (hgdn_string_array *array)
 
HGDN_DECL godot_bool hgdn_variant_get_bool (const godot_variant *var)
 
HGDN_DECL uint64_t hgdn_variant_get_uint (const godot_variant *var)
 
HGDN_DECL int64_t hgdn_variant_get_int (const godot_variant *var)
 
HGDN_DECL double hgdn_variant_get_real (const godot_variant *var)
 
HGDN_DECL godot_vector2 hgdn_variant_get_vector2 (const godot_variant *var)
 
HGDN_DECL godot_vector3 hgdn_variant_get_vector3 (const godot_variant *var)
 
HGDN_DECL godot_rect2 hgdn_variant_get_rect2 (const godot_variant *var)
 
HGDN_DECL godot_plane hgdn_variant_get_plane (const godot_variant *var)
 
HGDN_DECL godot_quat hgdn_variant_get_quat (const godot_variant *var)
 
HGDN_DECL godot_aabb hgdn_variant_get_aabb (const godot_variant *var)
 
HGDN_DECL godot_basis hgdn_variant_get_basis (const godot_variant *var)
 
HGDN_DECL godot_transform2d hgdn_variant_get_transform2d (const godot_variant *var)
 
HGDN_DECL godot_transform hgdn_variant_get_transform (const godot_variant *var)
 
HGDN_DECL godot_color hgdn_variant_get_color (const godot_variant *var)
 
HGDN_DECL godot_node_path hgdn_variant_get_node_path (const godot_variant *var)
 
HGDN_DECL godot_rid hgdn_variant_get_rid (const godot_variant *var)
 
HGDN_DECL godot_object * hgdn_variant_get_object (const godot_variant *var)
 
HGDN_DECL godot_dictionary hgdn_variant_get_dictionary (const godot_variant *var)
 
HGDN_DECL godot_array hgdn_variant_get_array (const godot_variant *var)
 
HGDN_DECL hgdn_string hgdn_variant_get_string (const godot_variant *var)
 
HGDN_DECL hgdn_wide_string hgdn_variant_get_wide_string (const godot_variant *var)
 
HGDN_DECL hgdn_byte_array hgdn_variant_get_byte_array (const godot_variant *var)
 
HGDN_DECL hgdn_int_array hgdn_variant_get_int_array (const godot_variant *var)
 
HGDN_DECL hgdn_real_array hgdn_variant_get_real_array (const godot_variant *var)
 
HGDN_DECL hgdn_vector2_array hgdn_variant_get_vector2_array (const godot_variant *var)
 
HGDN_DECL hgdn_vector3_array hgdn_variant_get_vector3_array (const godot_variant *var)
 
HGDN_DECL hgdn_color_array hgdn_variant_get_color_array (const godot_variant *var)
 
HGDN_DECL hgdn_string_array hgdn_variant_get_string_array (const godot_variant *var)
 
HGDN_DECL godot_bool hgdn_variant_get_bool_own (godot_variant var)
 
HGDN_DECL uint64_t hgdn_variant_get_uint_own (godot_variant var)
 
HGDN_DECL int64_t hgdn_variant_get_int_own (godot_variant var)
 
HGDN_DECL double hgdn_variant_get_real_own (godot_variant var)
 
HGDN_DECL godot_vector2 hgdn_variant_get_vector2_own (godot_variant var)
 
HGDN_DECL godot_vector3 hgdn_variant_get_vector3_own (godot_variant var)
 
HGDN_DECL godot_rect2 hgdn_variant_get_rect2_own (godot_variant var)
 
HGDN_DECL godot_plane hgdn_variant_get_plane_own (godot_variant var)
 
HGDN_DECL godot_quat hgdn_variant_get_quat_own (godot_variant var)
 
HGDN_DECL godot_aabb hgdn_variant_get_aabb_own (godot_variant var)
 
HGDN_DECL godot_basis hgdn_variant_get_basis_own (godot_variant var)
 
HGDN_DECL godot_transform2d hgdn_variant_get_transform2d_own (godot_variant var)
 
HGDN_DECL godot_transform hgdn_variant_get_transform_own (godot_variant var)
 
HGDN_DECL godot_color hgdn_variant_get_color_own (godot_variant var)
 
HGDN_DECL godot_node_path hgdn_variant_get_node_path_own (godot_variant var)
 
HGDN_DECL godot_rid hgdn_variant_get_rid_own (godot_variant var)
 
HGDN_DECL godot_object * hgdn_variant_get_object_own (godot_variant var)
 
HGDN_DECL godot_dictionary hgdn_variant_get_dictionary_own (godot_variant var)
 
HGDN_DECL godot_array hgdn_variant_get_array_own (godot_variant var)
 
HGDN_DECL hgdn_string hgdn_variant_get_string_own (godot_variant var)
 
HGDN_DECL hgdn_wide_string hgdn_variant_get_wide_string_own (godot_variant var)
 
HGDN_DECL hgdn_byte_array hgdn_variant_get_byte_array_own (godot_variant var)
 
HGDN_DECL hgdn_int_array hgdn_variant_get_int_array_own (godot_variant var)
 
HGDN_DECL hgdn_real_array hgdn_variant_get_real_array_own (godot_variant var)
 
HGDN_DECL hgdn_vector2_array hgdn_variant_get_vector2_array_own (godot_variant var)
 
HGDN_DECL hgdn_vector3_array hgdn_variant_get_vector3_array_own (godot_variant var)
 
HGDN_DECL hgdn_color_array hgdn_variant_get_color_array_own (godot_variant var)
 
HGDN_DECL hgdn_string_array hgdn_variant_get_string_array_own (godot_variant var)
 
HGDN_DECL godot_bool hgdn_array_get_bool (const godot_array *array, const godot_int index)
 
HGDN_DECL uint64_t hgdn_array_get_uint (const godot_array *array, const godot_int index)
 
HGDN_DECL int64_t hgdn_array_get_int (const godot_array *array, const godot_int index)
 
HGDN_DECL double hgdn_array_get_real (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_vector2 hgdn_array_get_vector2 (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_vector3 hgdn_array_get_vector3 (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_rect2 hgdn_array_get_rect2 (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_plane hgdn_array_get_plane (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_quat hgdn_array_get_quat (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_aabb hgdn_array_get_aabb (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_basis hgdn_array_get_basis (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_transform2d hgdn_array_get_transform2d (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_transform hgdn_array_get_transform (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_color hgdn_array_get_color (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_node_path hgdn_array_get_node_path (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_rid hgdn_array_get_rid (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_object * hgdn_array_get_object (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_dictionary hgdn_array_get_dictionary (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_array hgdn_array_get_array (const godot_array *array, const godot_int index)
 
HGDN_DECL hgdn_string hgdn_array_get_string (const godot_array *array, const godot_int index)
 
HGDN_DECL hgdn_wide_string hgdn_array_get_wide_string (const godot_array *array, const godot_int index)
 
HGDN_DECL hgdn_byte_array hgdn_array_get_byte_array (const godot_array *array, const godot_int index)
 
HGDN_DECL hgdn_int_array hgdn_array_get_int_array (const godot_array *array, const godot_int index)
 
HGDN_DECL hgdn_real_array hgdn_array_get_real_array (const godot_array *array, const godot_int index)
 
HGDN_DECL hgdn_vector2_array hgdn_array_get_vector2_array (const godot_array *array, const godot_int index)
 
HGDN_DECL hgdn_vector3_array hgdn_array_get_vector3_array (const godot_array *array, const godot_int index)
 
HGDN_DECL hgdn_color_array hgdn_array_get_color_array (const godot_array *array, const godot_int index)
 
HGDN_DECL hgdn_string_array hgdn_array_get_string_array (const godot_array *array, const godot_int index)
 
HGDN_DECL godot_bool hgdn_args_get_bool (godot_variant **args, const godot_int index)
 
HGDN_DECL uint64_t hgdn_args_get_uint (godot_variant **args, const godot_int index)
 
HGDN_DECL int64_t hgdn_args_get_int (godot_variant **args, const godot_int index)
 
HGDN_DECL double hgdn_args_get_real (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_vector2 hgdn_args_get_vector2 (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_vector3 hgdn_args_get_vector3 (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_rect2 hgdn_args_get_rect2 (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_plane hgdn_args_get_plane (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_quat hgdn_args_get_quat (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_aabb hgdn_args_get_aabb (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_basis hgdn_args_get_basis (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_transform2d hgdn_args_get_transform2d (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_transform hgdn_args_get_transform (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_color hgdn_args_get_color (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_node_path hgdn_args_get_node_path (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_rid hgdn_args_get_rid (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_object * hgdn_args_get_object (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_dictionary hgdn_args_get_dictionary (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_array hgdn_args_get_array (godot_variant **args, const godot_int index)
 
HGDN_DECL hgdn_string hgdn_args_get_string (godot_variant **args, const godot_int index)
 
HGDN_DECL hgdn_wide_string hgdn_args_get_wide_string (godot_variant **args, const godot_int index)
 
HGDN_DECL hgdn_byte_array hgdn_args_get_byte_array (godot_variant **args, const godot_int index)
 
HGDN_DECL hgdn_int_array hgdn_args_get_int_array (godot_variant **args, const godot_int index)
 
HGDN_DECL hgdn_real_array hgdn_args_get_real_array (godot_variant **args, const godot_int index)
 
HGDN_DECL hgdn_vector2_array hgdn_args_get_vector2_array (godot_variant **args, const godot_int index)
 
HGDN_DECL hgdn_vector3_array hgdn_args_get_vector3_array (godot_variant **args, const godot_int index)
 
HGDN_DECL hgdn_color_array hgdn_args_get_color_array (godot_variant **args, const godot_int index)
 
HGDN_DECL hgdn_string_array hgdn_args_get_string_array (godot_variant **args, const godot_int index)
 
HGDN_DECL godot_bool hgdn_dictionary_get_bool (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL uint64_t hgdn_dictionary_get_uint (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL int64_t hgdn_dictionary_get_int (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL double hgdn_dictionary_get_real (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_vector2 hgdn_dictionary_get_vector2 (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_vector3 hgdn_dictionary_get_vector3 (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_rect2 hgdn_dictionary_get_rect2 (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_plane hgdn_dictionary_get_plane (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_quat hgdn_dictionary_get_quat (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_aabb hgdn_dictionary_get_aabb (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_basis hgdn_dictionary_get_basis (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_transform2d hgdn_dictionary_get_transform2d (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_transform hgdn_dictionary_get_transform (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_color hgdn_dictionary_get_color (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_node_path hgdn_dictionary_get_node_path (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_rid hgdn_dictionary_get_rid (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_object * hgdn_dictionary_get_object (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_dictionary hgdn_dictionary_get_dictionary (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_array hgdn_dictionary_get_array (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL hgdn_string hgdn_dictionary_get_string (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL hgdn_wide_string hgdn_dictionary_get_wide_string (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL hgdn_byte_array hgdn_dictionary_get_byte_array (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL hgdn_int_array hgdn_dictionary_get_int_array (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL hgdn_real_array hgdn_dictionary_get_real_array (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL hgdn_vector2_array hgdn_dictionary_get_vector2_array (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL hgdn_vector3_array hgdn_dictionary_get_vector3_array (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL hgdn_color_array hgdn_dictionary_get_color_array (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL hgdn_string_array hgdn_dictionary_get_string_array (const godot_dictionary *dict, const godot_variant *key)
 
HGDN_DECL godot_bool hgdn_dictionary_string_get_bool (const godot_dictionary *dict, const char *key)
 
HGDN_DECL uint64_t hgdn_dictionary_string_get_uint (const godot_dictionary *dict, const char *key)
 
HGDN_DECL int64_t hgdn_dictionary_string_get_int (const godot_dictionary *dict, const char *key)
 
HGDN_DECL double hgdn_dictionary_string_get_real (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_vector2 hgdn_dictionary_string_get_vector2 (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_vector3 hgdn_dictionary_string_get_vector3 (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_rect2 hgdn_dictionary_string_get_rect2 (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_plane hgdn_dictionary_string_get_plane (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_quat hgdn_dictionary_string_get_quat (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_aabb hgdn_dictionary_string_get_aabb (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_basis hgdn_dictionary_string_get_basis (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_transform2d hgdn_dictionary_string_get_transform2d (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_transform hgdn_dictionary_string_get_transform (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_color hgdn_dictionary_string_get_color (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_node_path hgdn_dictionary_string_get_node_path (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_rid hgdn_dictionary_string_get_rid (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_object * hgdn_dictionary_string_get_object (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_dictionary hgdn_dictionary_string_get_dictionary (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_array hgdn_dictionary_string_get_array (const godot_dictionary *dict, const char *key)
 
HGDN_DECL hgdn_string hgdn_dictionary_string_get_string (const godot_dictionary *dict, const char *key)
 
HGDN_DECL hgdn_wide_string hgdn_dictionary_string_get_wide_string (const godot_dictionary *dict, const char *key)
 
HGDN_DECL hgdn_byte_array hgdn_dictionary_string_get_byte_array (const godot_dictionary *dict, const char *key)
 
HGDN_DECL hgdn_int_array hgdn_dictionary_string_get_int_array (const godot_dictionary *dict, const char *key)
 
HGDN_DECL hgdn_real_array hgdn_dictionary_string_get_real_array (const godot_dictionary *dict, const char *key)
 
HGDN_DECL hgdn_vector2_array hgdn_dictionary_string_get_vector2_array (const godot_dictionary *dict, const char *key)
 
HGDN_DECL hgdn_vector3_array hgdn_dictionary_string_get_vector3_array (const godot_dictionary *dict, const char *key)
 
HGDN_DECL hgdn_color_array hgdn_dictionary_string_get_color_array (const godot_dictionary *dict, const char *key)
 
HGDN_DECL hgdn_string_array hgdn_dictionary_string_get_string_array (const godot_dictionary *dict, const char *key)
 
HGDN_DECL godot_variant hgdn_new_variant_copy (const godot_variant *value)
 
HGDN_DECL godot_variant hgdn_new_nil_variant ()
 
HGDN_DECL godot_variant hgdn_new_bool_variant (const godot_bool value)
 
HGDN_DECL godot_variant hgdn_new_uint_variant (const uint64_t value)
 
HGDN_DECL godot_variant hgdn_new_int_variant (const int64_t value)
 
HGDN_DECL godot_variant hgdn_new_real_variant (const double value)
 
HGDN_DECL godot_variant hgdn_new_string_variant (const godot_string *value)
 
HGDN_DECL godot_variant hgdn_new_cstring_variant (const char *value)
 
HGDN_DECL godot_variant hgdn_new_wide_string_variant (const wchar_t *value)
 
HGDN_DECL godot_variant hgdn_new_vector2_variant (const godot_vector2 value)
 
HGDN_DECL godot_variant hgdn_new_vector3_variant (const godot_vector3 value)
 
HGDN_DECL godot_variant hgdn_new_rect2_variant (const godot_rect2 value)
 
HGDN_DECL godot_variant hgdn_new_plane_variant (const godot_plane value)
 
HGDN_DECL godot_variant hgdn_new_quat_variant (const godot_quat value)
 
HGDN_DECL godot_variant hgdn_new_aabb_variant (const godot_aabb value)
 
HGDN_DECL godot_variant hgdn_new_basis_variant (const godot_basis value)
 
HGDN_DECL godot_variant hgdn_new_transform2d_variant (const godot_transform2d value)
 
HGDN_DECL godot_variant hgdn_new_transform_variant (const godot_transform value)
 
HGDN_DECL godot_variant hgdn_new_color_variant (const godot_color value)
 
HGDN_DECL godot_variant hgdn_new_node_path_variant (const godot_node_path *value)
 
HGDN_DECL godot_variant hgdn_new_rid_variant (const godot_rid *value)
 
HGDN_DECL godot_variant hgdn_new_object_variant (const godot_object *value)
 
HGDN_DECL godot_variant hgdn_new_dictionary_variant (const godot_dictionary *value)
 
HGDN_DECL godot_variant hgdn_new_array_variant (const godot_array *value)
 
HGDN_DECL godot_variant hgdn_new_pool_byte_array_variant (const godot_pool_byte_array *value)
 
HGDN_DECL godot_variant hgdn_new_pool_int_array_variant (const godot_pool_int_array *value)
 
HGDN_DECL godot_variant hgdn_new_pool_real_array_variant (const godot_pool_real_array *value)
 
HGDN_DECL godot_variant hgdn_new_pool_vector2_array_variant (const godot_pool_vector2_array *value)
 
HGDN_DECL godot_variant hgdn_new_pool_vector3_array_variant (const godot_pool_vector3_array *value)
 
HGDN_DECL godot_variant hgdn_new_pool_color_array_variant (const godot_pool_color_array *value)
 
HGDN_DECL godot_variant hgdn_new_pool_string_array_variant (const godot_pool_string_array *value)
 
HGDN_DECL godot_variant hgdn_new_string_variant_own (godot_string value)
 
HGDN_DECL godot_variant hgdn_new_node_path_variant_own (godot_node_path value)
 
HGDN_DECL godot_variant hgdn_new_dictionary_variant_own (godot_dictionary value)
 
HGDN_DECL godot_variant hgdn_new_array_variant_own (godot_array value)
 
HGDN_DECL godot_variant hgdn_new_pool_byte_array_variant_own (godot_pool_byte_array value)
 
HGDN_DECL godot_variant hgdn_new_pool_int_array_variant_own (godot_pool_int_array value)
 
HGDN_DECL godot_variant hgdn_new_pool_real_array_variant_own (godot_pool_real_array value)
 
HGDN_DECL godot_variant hgdn_new_pool_vector2_array_variant_own (godot_pool_vector2_array value)
 
HGDN_DECL godot_variant hgdn_new_pool_vector3_array_variant_own (godot_pool_vector3_array value)
 
HGDN_DECL godot_variant hgdn_new_pool_color_array_variant_own (godot_pool_color_array value)
 
HGDN_DECL godot_variant hgdn_new_pool_string_array_variant_own (godot_pool_string_array value)
 
HGDN_DECL godot_string hgdn_new_string (const char *cstr)
 
HGDN_DECL godot_string hgdn_new_string_with_len (const char *cstr, const godot_int len)
 
HGDN_DECL godot_string hgdn_new_formatted_string (const char *fmt,...)
 
HGDN_DECL godot_string hgdn_new_wide_string (const wchar_t *wstr)
 
HGDN_DECL godot_string hgdn_new_wide_string_with_len (const wchar_t *wstr, const godot_int len)
 
HGDN_DECL godot_pool_byte_array hgdn_new_byte_array (const uint8_t *buffer, const godot_int size)
 
HGDN_DECL godot_pool_int_array hgdn_new_int_array (const godot_int *buffer, const godot_int size)
 
HGDN_DECL godot_pool_real_array hgdn_new_real_array (const godot_real *buffer, const godot_int size)
 
HGDN_DECL godot_pool_vector2_array hgdn_new_vector2_array (const godot_vector2 *buffer, const godot_int size)
 
HGDN_DECL godot_pool_vector3_array hgdn_new_vector3_array (const godot_vector3 *buffer, const godot_int size)
 
HGDN_DECL godot_pool_color_array hgdn_new_color_array (const godot_color *buffer, const godot_int size)
 
HGDN_DECL godot_pool_string_array hgdn_new_string_array (const char *const *buffer, const godot_int size)
 
HGDN_DECL godot_array hgdn_new_array (const godot_variant *const *buffer, const godot_int size)
 
HGDN_DECL godot_array hgdn_new_array_own (godot_variant *buffer, const godot_int size)
 
HGDN_DECL godot_dictionary hgdn_new_dictionary (const hgdn_dictionary_entry *buffer, const godot_int size)
 
HGDN_DECL godot_dictionary hgdn_new_dictionary_string (const hgdn_dictionary_entry_string *buffer, const godot_int size)
 
HGDN_DECL godot_dictionary hgdn_new_dictionary_string_int (const hgdn_dictionary_entry_string_int *buffer, const godot_int size)
 
HGDN_DECL godot_dictionary hgdn_new_dictionary_string_string (const hgdn_dictionary_entry_string_string *buffer, const godot_int size)
 
HGDN_DECL godot_dictionary hgdn_new_dictionary_own (hgdn_dictionary_entry_own *buffer, const godot_int size)
 
HGDN_DECL godot_dictionary hgdn_new_dictionary_string_own (hgdn_dictionary_entry_string_own *buffer, const godot_int size)
 
HGDN_DECL godot_variant hgdn_object_callv (godot_object *instance, const char *method, const godot_array *args)
 
HGDN_DECL godot_variant hgdn_object_callv_own (godot_object *instance, const char *method, godot_array args)
 
HGDN_DECL void hgdn_register_class (void *gdnative_handle, const hgdn_class_info *class_info)
 
HGDN_DECL void * hgdn_instance_alloc (godot_object *instance, void *alloc_size)
 Function that allocates and returns zero-initialized alloc_size bytes, to be used as instance create function.
 
HGDN_DECL void hgdn_instance_free (godot_object *instance, void *method_data, void *data)
 Function that frees data with hgdn_free, to be used as instance destroy function.
 
HGDN_DECL godot_variant * hgdn_property_constant_alloc (godot_variant value)
 
HGDN_DECL void hgdn_property_constant_free (void *value)
 
HGDN_DECL godot_variant hgdn_property_constant_get (godot_object *instance, void *value, void *data)
 

Variables

const godot_gdnative_core_api_struct * hgdn_core_api
 
const godot_gdnative_core_1_1_api_struct * hgdn_core_1_1_api
 
const godot_gdnative_core_1_2_api_struct * hgdn_core_1_2_api
 
const godot_gdnative_core_1_3_api_struct * hgdn_core_1_3_api
 
const godot_gdnative_ext_nativescript_api_struct * hgdn_nativescript_api
 
const godot_gdnative_ext_nativescript_1_1_api_struct * hgdn_nativescript_1_1_api
 
const godot_gdnative_ext_pluginscript_api_struct * hgdn_pluginscript_api
 
const godot_gdnative_ext_android_api_struct * hgdn_android_api
 
const godot_gdnative_ext_arvr_api_struct * hgdn_arvr_api
 
const godot_gdnative_ext_arvr_1_2_api_struct * hgdn_arvr_1_2_api
 
const godot_gdnative_ext_videodecoder_api_struct * hgdn_videodecoder_api
 
const godot_gdnative_ext_net_api_struct * hgdn_net_api
 
const godot_gdnative_ext_net_3_2_api_struct * hgdn_net_3_2_api
 
godot_object * hgdn_library
 GDNativeLibrary object being initialized.
 
godot_method_bind * hgdn_method_Object_callv
 

Detailed Description

Project URL: https://github.com/gilzoide/high-level-gdnative

Do this:

#define HGDN_IMPLEMENTATION

before you include this file in one C or C++ file to create the implementation.

i.e.:

#include ...
#include ...
#define HGDN_IMPLEMENTATION
#include "hgdn.h"
hgdn.h – High level GDNative C/C++ API

Optionally provide the following defines with your own implementations: