Merge pull request #13 from khairul169/headers-update

Update headers to godot latest master branch..
This commit is contained in:
Thomas Herzog
2017-12-02 09:54:20 +01:00
committed by GitHub
15 changed files with 6260 additions and 5497 deletions

View File

@@ -1,5 +1,5 @@
/*************************************************************************/
/* godot_nativearvr.h */
/* godot_arvr.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -47,7 +47,7 @@ typedef struct {
godot_bool (*is_initialized)(const void *);
godot_bool (*initialize)(void *);
void (*uninitialize)(void *);
godot_vector2 (*get_recommended_render_targetsize)(const void *);
godot_vector2 (*get_render_targetsize)(const void *);
godot_transform (*get_transform_for_eye)(void *, godot_int, godot_transform *);
void (*fill_projection_for_eye)(void *, godot_real *, godot_int, godot_real, godot_real, godot_real);
void (*commit_for_eye)(void *, godot_int, godot_rid *, godot_rect2 *);
@@ -70,6 +70,7 @@ void GDAPI godot_arvr_remove_controller(godot_int p_controller_id);
void GDAPI godot_arvr_set_controller_transform(godot_int p_controller_id, godot_transform *p_transform, godot_bool p_tracks_orientation, godot_bool p_tracks_position);
void GDAPI godot_arvr_set_controller_button(godot_int p_controller_id, godot_int p_button, godot_bool p_is_pressed);
void GDAPI godot_arvr_set_controller_axis(godot_int p_controller_id, godot_int p_axis, godot_real p_value, godot_bool p_can_be_negative);
godot_real GDAPI godot_arvr_get_controller_rumble(godot_int p_controller_id);
#ifdef __cplusplus
}

117
gdnative/aabb.h Normal file
View File

@@ -0,0 +1,117 @@
/*************************************************************************/
/* aabb.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef GODOT_AABB_H
#define GODOT_AABB_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#define GODOT_AABB_SIZE 24
#ifndef GODOT_CORE_API_GODOT_AABB_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_AABB_TYPE_DEFINED
typedef struct {
uint8_t _dont_touch_that[GODOT_AABB_SIZE];
} godot_aabb;
#endif
// reduce extern "C" nesting for VS2013
#ifdef __cplusplus
}
#endif
#include <gdnative/gdnative.h>
#include <gdnative/plane.h>
#include <gdnative/vector3.h>
#ifdef __cplusplus
extern "C" {
#endif
void GDAPI godot_aabb_new(godot_aabb *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size);
godot_vector3 GDAPI godot_aabb_get_position(const godot_aabb *p_self);
void GDAPI godot_aabb_set_position(const godot_aabb *p_self, const godot_vector3 *p_v);
godot_vector3 GDAPI godot_aabb_get_size(const godot_aabb *p_self);
void GDAPI godot_aabb_set_size(const godot_aabb *p_self, const godot_vector3 *p_v);
godot_string GDAPI godot_aabb_as_string(const godot_aabb *p_self);
godot_real GDAPI godot_aabb_get_area(const godot_aabb *p_self);
godot_bool GDAPI godot_aabb_has_no_area(const godot_aabb *p_self);
godot_bool GDAPI godot_aabb_has_no_surface(const godot_aabb *p_self);
godot_bool GDAPI godot_aabb_intersects(const godot_aabb *p_self, const godot_aabb *p_with);
godot_bool GDAPI godot_aabb_encloses(const godot_aabb *p_self, const godot_aabb *p_with);
godot_aabb GDAPI godot_aabb_merge(const godot_aabb *p_self, const godot_aabb *p_with);
godot_aabb GDAPI godot_aabb_intersection(const godot_aabb *p_self, const godot_aabb *p_with);
godot_bool GDAPI godot_aabb_intersects_plane(const godot_aabb *p_self, const godot_plane *p_plane);
godot_bool GDAPI godot_aabb_intersects_segment(const godot_aabb *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to);
godot_bool GDAPI godot_aabb_has_point(const godot_aabb *p_self, const godot_vector3 *p_point);
godot_vector3 GDAPI godot_aabb_get_support(const godot_aabb *p_self, const godot_vector3 *p_dir);
godot_vector3 GDAPI godot_aabb_get_longest_axis(const godot_aabb *p_self);
godot_int GDAPI godot_aabb_get_longest_axis_index(const godot_aabb *p_self);
godot_real GDAPI godot_aabb_get_longest_axis_size(const godot_aabb *p_self);
godot_vector3 GDAPI godot_aabb_get_shortest_axis(const godot_aabb *p_self);
godot_int GDAPI godot_aabb_get_shortest_axis_index(const godot_aabb *p_self);
godot_real GDAPI godot_aabb_get_shortest_axis_size(const godot_aabb *p_self);
godot_aabb GDAPI godot_aabb_expand(const godot_aabb *p_self, const godot_vector3 *p_to_point);
godot_aabb GDAPI godot_aabb_grow(const godot_aabb *p_self, const godot_real p_by);
godot_vector3 GDAPI godot_aabb_get_endpoint(const godot_aabb *p_self, const godot_int p_idx);
godot_bool GDAPI godot_aabb_operator_equal(const godot_aabb *p_self, const godot_aabb *p_b);
#ifdef __cplusplus
}
#endif
#endif // GODOT_AABB_H

View File

@@ -76,6 +76,8 @@ godot_variant GDAPI godot_array_get(const godot_array *p_self, const godot_int p
godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, const godot_int p_idx);
const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, const godot_int p_idx);
void GDAPI godot_array_append(godot_array *p_self, const godot_variant *p_value);
void GDAPI godot_array_clear(godot_array *p_self);
@@ -122,6 +124,10 @@ void GDAPI godot_array_sort(godot_array *p_self);
void GDAPI godot_array_sort_custom(godot_array *p_self, godot_object *p_obj, const godot_string *p_func);
godot_int GDAPI godot_array_bsearch(godot_array *p_self, const godot_variant *p_value, const godot_bool p_before);
godot_int GDAPI godot_array_bsearch_custom(godot_array *p_self, const godot_variant *p_value, godot_object *p_obj, const godot_string *p_func, const godot_bool p_before);
void GDAPI godot_array_destroy(godot_array *p_self);
#ifdef __cplusplus

View File

@@ -97,7 +97,7 @@ void GDAPI godot_basis_new(godot_basis *r_dest);
void GDAPI godot_basis_new_with_euler_quat(godot_basis *r_dest, const godot_quat *p_euler);
// p_elements is a pointer to an array of 3 (!!) vector3
void GDAPI godot_basis_get_elements(godot_basis *p_self, godot_vector3 *p_elements);
void GDAPI godot_basis_get_elements(const godot_basis *p_self, godot_vector3 *p_elements);
godot_vector3 GDAPI godot_basis_get_axis(const godot_basis *p_self, const godot_int p_axis);

View File

@@ -85,6 +85,8 @@ void GDAPI godot_dictionary_set(godot_dictionary *p_self, const godot_variant *p
godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_self, const godot_variant *p_key);
const godot_variant GDAPI *godot_dictionary_operator_index_const(const godot_dictionary *p_self, const godot_variant *p_key);
godot_variant GDAPI *godot_dictionary_next(const godot_dictionary *p_self, const godot_variant *p_key);
godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self, const godot_dictionary *p_b);

View File

@@ -169,9 +169,9 @@ typedef void godot_object;
#include <gdnative/quat.h>
/////// Rect3
/////// AABB
#include <gdnative/rect3.h>
#include <gdnative/aabb.h>
/////// Basis
@@ -229,15 +229,30 @@ void GDAPI godot_method_bind_ptrcall(godot_method_bind *p_method_bind, godot_obj
godot_variant GDAPI godot_method_bind_call(godot_method_bind *p_method_bind, godot_object *p_instance, const godot_variant **p_args, const int p_arg_count, godot_variant_call_error *p_call_error);
////// Script API
struct godot_gdnative_api_struct; // Forward declaration
typedef struct godot_gdnative_api_version {
unsigned int major;
unsigned int minor;
} godot_gdnative_api_version;
typedef struct godot_gdnative_api_struct godot_gdnative_api_struct;
struct godot_gdnative_api_struct {
unsigned int type;
godot_gdnative_api_version version;
const godot_gdnative_api_struct *next;
};
#define GDNATIVE_VERSION_COMPATIBLE(want, have) (want.major == have.major && want.minor <= have.minor)
typedef struct {
godot_bool in_editor;
uint64_t core_api_hash;
uint64_t editor_api_hash;
uint64_t no_api_hash;
void (*report_version_mismatch)(const godot_object *p_library, const char *p_what, godot_gdnative_api_version p_want, godot_gdnative_api_version p_have);
void (*report_loading_error)(const godot_object *p_library, const char *p_what);
godot_object *gd_native_library; // pointer to GDNativeLibrary that is being initialized
const struct godot_gdnative_api_struct *api_struct;
const struct godot_gdnative_core_api_struct *api_struct;
const godot_string *active_library_path;
} godot_gdnative_init_options;
@@ -259,6 +274,9 @@ typedef godot_variant (*godot_gdnative_procedure_fn)(godot_array *);
////// System Functions
typedef godot_variant (*native_call_cb)(void *, godot_array *);
void GDAPI godot_register_native_call_type(const char *p_call_type, native_call_cb p_callback);
//using these will help Godot track how much memory is in use in debug mode
void GDAPI *godot_alloc(int p_bytes);
void GDAPI *godot_realloc(void *p_ptr, int p_bytes);

View File

@@ -73,7 +73,7 @@ godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_self)
godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, const godot_int p_idx);
godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_self);
godot_string GDAPI godot_node_path_get_concatenated_subnames(const godot_node_path *p_self);
godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_self);

View File

@@ -36,6 +36,38 @@ extern "C" {
#include <stdint.h>
/////// Read Access
#define GODOT_POOL_ARRAY_READ_ACCESS_SIZE 1
typedef struct {
uint8_t _dont_touch_that[GODOT_POOL_ARRAY_READ_ACCESS_SIZE];
} godot_pool_array_read_access;
typedef godot_pool_array_read_access godot_pool_byte_array_read_access;
typedef godot_pool_array_read_access godot_pool_int_array_read_access;
typedef godot_pool_array_read_access godot_pool_real_array_read_access;
typedef godot_pool_array_read_access godot_pool_string_array_read_access;
typedef godot_pool_array_read_access godot_pool_vector2_array_read_access;
typedef godot_pool_array_read_access godot_pool_vector3_array_read_access;
typedef godot_pool_array_read_access godot_pool_color_array_read_access;
/////// Write Access
#define GODOT_POOL_ARRAY_WRITE_ACCESS_SIZE 1
typedef struct {
uint8_t _dont_touch_that[GODOT_POOL_ARRAY_WRITE_ACCESS_SIZE];
} godot_pool_array_write_access;
typedef godot_pool_array_write_access godot_pool_byte_array_write_access;
typedef godot_pool_array_write_access godot_pool_int_array_write_access;
typedef godot_pool_array_write_access godot_pool_real_array_write_access;
typedef godot_pool_array_write_access godot_pool_string_array_write_access;
typedef godot_pool_array_write_access godot_pool_vector2_array_write_access;
typedef godot_pool_array_write_access godot_pool_vector3_array_write_access;
typedef godot_pool_array_write_access godot_pool_color_array_write_access;
/////// PoolByteArray
#define GODOT_POOL_BYTE_ARRAY_SIZE sizeof(void *)
@@ -149,6 +181,10 @@ void GDAPI godot_pool_byte_array_remove(godot_pool_byte_array *p_self, const god
void GDAPI godot_pool_byte_array_resize(godot_pool_byte_array *p_self, const godot_int p_size);
godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read(const godot_pool_byte_array *p_self);
godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write(godot_pool_byte_array *p_self);
void GDAPI godot_pool_byte_array_set(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data);
uint8_t GDAPI godot_pool_byte_array_get(const godot_pool_byte_array *p_self, const godot_int p_idx);
@@ -176,6 +212,10 @@ void GDAPI godot_pool_int_array_remove(godot_pool_int_array *p_self, const godot
void GDAPI godot_pool_int_array_resize(godot_pool_int_array *p_self, const godot_int p_size);
godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read(const godot_pool_int_array *p_self);
godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write(godot_pool_int_array *p_self);
void GDAPI godot_pool_int_array_set(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data);
godot_int GDAPI godot_pool_int_array_get(const godot_pool_int_array *p_self, const godot_int p_idx);
@@ -203,6 +243,10 @@ void GDAPI godot_pool_real_array_remove(godot_pool_real_array *p_self, const god
void GDAPI godot_pool_real_array_resize(godot_pool_real_array *p_self, const godot_int p_size);
godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read(const godot_pool_real_array *p_self);
godot_pool_real_array_write_access GDAPI *godot_pool_real_array_write(godot_pool_real_array *p_self);
void GDAPI godot_pool_real_array_set(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data);
godot_real GDAPI godot_pool_real_array_get(const godot_pool_real_array *p_self, const godot_int p_idx);
@@ -230,6 +274,10 @@ void GDAPI godot_pool_string_array_remove(godot_pool_string_array *p_self, const
void GDAPI godot_pool_string_array_resize(godot_pool_string_array *p_self, const godot_int p_size);
godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read(const godot_pool_string_array *p_self);
godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write(godot_pool_string_array *p_self);
void GDAPI godot_pool_string_array_set(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data);
godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_self, const godot_int p_idx);
@@ -257,6 +305,10 @@ void GDAPI godot_pool_vector2_array_remove(godot_pool_vector2_array *p_self, con
void GDAPI godot_pool_vector2_array_resize(godot_pool_vector2_array *p_self, const godot_int p_size);
godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read(const godot_pool_vector2_array *p_self);
godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write(godot_pool_vector2_array *p_self);
void GDAPI godot_pool_vector2_array_set(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data);
godot_vector2 GDAPI godot_pool_vector2_array_get(const godot_pool_vector2_array *p_self, const godot_int p_idx);
@@ -284,6 +336,10 @@ void GDAPI godot_pool_vector3_array_remove(godot_pool_vector3_array *p_self, con
void GDAPI godot_pool_vector3_array_resize(godot_pool_vector3_array *p_self, const godot_int p_size);
godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read(const godot_pool_vector3_array *p_self);
godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write(godot_pool_vector3_array *p_self);
void GDAPI godot_pool_vector3_array_set(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data);
godot_vector3 GDAPI godot_pool_vector3_array_get(const godot_pool_vector3_array *p_self, const godot_int p_idx);
@@ -311,6 +367,10 @@ void GDAPI godot_pool_color_array_remove(godot_pool_color_array *p_self, const g
void GDAPI godot_pool_color_array_resize(godot_pool_color_array *p_self, const godot_int p_size);
godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read(const godot_pool_color_array *p_self);
godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write(godot_pool_color_array *p_self);
void GDAPI godot_pool_color_array_set(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data);
godot_color GDAPI godot_pool_color_array_get(const godot_pool_color_array *p_self, const godot_int p_idx);
@@ -318,6 +378,70 @@ godot_int GDAPI godot_pool_color_array_size(const godot_pool_color_array *p_self
void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_self);
//
// read accessor functions
//
const uint8_t GDAPI *godot_pool_byte_array_read_access_ptr(const godot_pool_byte_array_read_access *p_read);
void GDAPI godot_pool_byte_array_read_access_operator_assign(godot_pool_byte_array_read_access *p_read, godot_pool_byte_array_read_access *p_other);
void GDAPI godot_pool_byte_array_read_access_destroy(godot_pool_byte_array_read_access *p_read);
const godot_int GDAPI *godot_pool_int_array_read_access_ptr(const godot_pool_int_array_read_access *p_read);
void GDAPI godot_pool_int_array_read_access_operator_assign(godot_pool_int_array_read_access *p_read, godot_pool_int_array_read_access *p_other);
void GDAPI godot_pool_int_array_read_access_destroy(godot_pool_int_array_read_access *p_read);
const godot_real GDAPI *godot_pool_real_array_read_access_ptr(const godot_pool_real_array_read_access *p_read);
void GDAPI godot_pool_real_array_read_access_operator_assign(godot_pool_real_array_read_access *p_read, godot_pool_real_array_read_access *p_other);
void GDAPI godot_pool_real_array_read_access_destroy(godot_pool_real_array_read_access *p_read);
const godot_string GDAPI *godot_pool_string_array_read_access_ptr(const godot_pool_string_array_read_access *p_read);
void GDAPI godot_pool_string_array_read_access_operator_assign(godot_pool_string_array_read_access *p_read, godot_pool_string_array_read_access *p_other);
void GDAPI godot_pool_string_array_read_access_destroy(godot_pool_string_array_read_access *p_read);
const godot_vector2 GDAPI *godot_pool_vector2_array_read_access_ptr(const godot_pool_vector2_array_read_access *p_read);
void GDAPI godot_pool_vector2_array_read_access_operator_assign(godot_pool_vector2_array_read_access *p_read, godot_pool_vector2_array_read_access *p_other);
void GDAPI godot_pool_vector2_array_read_access_destroy(godot_pool_vector2_array_read_access *p_read);
const godot_vector3 GDAPI *godot_pool_vector3_array_read_access_ptr(const godot_pool_vector3_array_read_access *p_read);
void GDAPI godot_pool_vector3_array_read_access_operator_assign(godot_pool_vector3_array_read_access *p_read, godot_pool_vector3_array_read_access *p_other);
void GDAPI godot_pool_vector3_array_read_access_destroy(godot_pool_vector3_array_read_access *p_read);
const godot_color GDAPI *godot_pool_color_array_read_access_ptr(const godot_pool_color_array_read_access *p_read);
void GDAPI godot_pool_color_array_read_access_operator_assign(godot_pool_color_array_read_access *p_read, godot_pool_color_array_read_access *p_other);
void GDAPI godot_pool_color_array_read_access_destroy(godot_pool_color_array_read_access *p_read);
//
// write accessor functions
//
uint8_t GDAPI *godot_pool_byte_array_write_access_ptr(const godot_pool_byte_array_write_access *p_write);
void GDAPI godot_pool_byte_array_write_access_operator_assign(godot_pool_byte_array_write_access *p_write, godot_pool_byte_array_write_access *p_other);
void GDAPI godot_pool_byte_array_write_access_destroy(godot_pool_byte_array_write_access *p_write);
godot_int GDAPI *godot_pool_int_array_write_access_ptr(const godot_pool_int_array_write_access *p_write);
void GDAPI godot_pool_int_array_write_access_operator_assign(godot_pool_int_array_write_access *p_write, godot_pool_int_array_write_access *p_other);
void GDAPI godot_pool_int_array_write_access_destroy(godot_pool_int_array_write_access *p_write);
godot_real GDAPI *godot_pool_real_array_write_access_ptr(const godot_pool_real_array_write_access *p_write);
void GDAPI godot_pool_real_array_write_access_operator_assign(godot_pool_real_array_write_access *p_write, godot_pool_real_array_write_access *p_other);
void GDAPI godot_pool_real_array_write_access_destroy(godot_pool_real_array_write_access *p_write);
godot_string GDAPI *godot_pool_string_array_write_access_ptr(const godot_pool_string_array_write_access *p_write);
void GDAPI godot_pool_string_array_write_access_operator_assign(godot_pool_string_array_write_access *p_write, godot_pool_string_array_write_access *p_other);
void GDAPI godot_pool_string_array_write_access_destroy(godot_pool_string_array_write_access *p_write);
godot_vector2 GDAPI *godot_pool_vector2_array_write_access_ptr(const godot_pool_vector2_array_write_access *p_write);
void GDAPI godot_pool_vector2_array_write_access_operator_assign(godot_pool_vector2_array_write_access *p_write, godot_pool_vector2_array_write_access *p_other);
void GDAPI godot_pool_vector2_array_write_access_destroy(godot_pool_vector2_array_write_access *p_write);
godot_vector3 GDAPI *godot_pool_vector3_array_write_access_ptr(const godot_pool_vector3_array_write_access *p_write);
void GDAPI godot_pool_vector3_array_write_access_operator_assign(godot_pool_vector3_array_write_access *p_write, godot_pool_vector3_array_write_access *p_other);
void GDAPI godot_pool_vector3_array_write_access_destroy(godot_pool_vector3_array_write_access *p_write);
godot_color GDAPI *godot_pool_color_array_write_access_ptr(const godot_pool_color_array_write_access *p_write);
void GDAPI godot_pool_color_array_write_access_operator_assign(godot_pool_color_array_write_access *p_write, godot_pool_color_array_write_access *p_other);
void GDAPI godot_pool_color_array_write_access_destroy(godot_pool_color_array_write_access *p_write);
#ifdef __cplusplus
}
#endif

View File

@@ -1,117 +0,0 @@
/*************************************************************************/
/* rect3.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef GODOT_RECT3_H
#define GODOT_RECT3_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#define GODOT_RECT3_SIZE 24
#ifndef GODOT_CORE_API_GODOT_RECT3_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_RECT3_TYPE_DEFINED
typedef struct {
uint8_t _dont_touch_that[GODOT_RECT3_SIZE];
} godot_rect3;
#endif
// reduce extern "C" nesting for VS2013
#ifdef __cplusplus
}
#endif
#include <gdnative/gdnative.h>
#include <gdnative/plane.h>
#include <gdnative/vector3.h>
#ifdef __cplusplus
extern "C" {
#endif
void GDAPI godot_rect3_new(godot_rect3 *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size);
godot_vector3 GDAPI godot_rect3_get_position(const godot_rect3 *p_self);
void GDAPI godot_rect3_set_position(const godot_rect3 *p_self, const godot_vector3 *p_v);
godot_vector3 GDAPI godot_rect3_get_size(const godot_rect3 *p_self);
void GDAPI godot_rect3_set_size(const godot_rect3 *p_self, const godot_vector3 *p_v);
godot_string GDAPI godot_rect3_as_string(const godot_rect3 *p_self);
godot_real GDAPI godot_rect3_get_area(const godot_rect3 *p_self);
godot_bool GDAPI godot_rect3_has_no_area(const godot_rect3 *p_self);
godot_bool GDAPI godot_rect3_has_no_surface(const godot_rect3 *p_self);
godot_bool GDAPI godot_rect3_intersects(const godot_rect3 *p_self, const godot_rect3 *p_with);
godot_bool GDAPI godot_rect3_encloses(const godot_rect3 *p_self, const godot_rect3 *p_with);
godot_rect3 GDAPI godot_rect3_merge(const godot_rect3 *p_self, const godot_rect3 *p_with);
godot_rect3 GDAPI godot_rect3_intersection(const godot_rect3 *p_self, const godot_rect3 *p_with);
godot_bool GDAPI godot_rect3_intersects_plane(const godot_rect3 *p_self, const godot_plane *p_plane);
godot_bool GDAPI godot_rect3_intersects_segment(const godot_rect3 *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to);
godot_bool GDAPI godot_rect3_has_point(const godot_rect3 *p_self, const godot_vector3 *p_point);
godot_vector3 GDAPI godot_rect3_get_support(const godot_rect3 *p_self, const godot_vector3 *p_dir);
godot_vector3 GDAPI godot_rect3_get_longest_axis(const godot_rect3 *p_self);
godot_int GDAPI godot_rect3_get_longest_axis_index(const godot_rect3 *p_self);
godot_real GDAPI godot_rect3_get_longest_axis_size(const godot_rect3 *p_self);
godot_vector3 GDAPI godot_rect3_get_shortest_axis(const godot_rect3 *p_self);
godot_int GDAPI godot_rect3_get_shortest_axis_index(const godot_rect3 *p_self);
godot_real GDAPI godot_rect3_get_shortest_axis_size(const godot_rect3 *p_self);
godot_rect3 GDAPI godot_rect3_expand(const godot_rect3 *p_self, const godot_vector3 *p_to_point);
godot_rect3 GDAPI godot_rect3_grow(const godot_rect3 *p_self, const godot_real p_by);
godot_vector3 GDAPI godot_rect3_get_endpoint(const godot_rect3 *p_self, const godot_int p_idx);
godot_bool GDAPI godot_rect3_operator_equal(const godot_rect3 *p_self, const godot_rect3 *p_b);
#ifdef __cplusplus
}
#endif
#endif // GODOT_RECT3_H

View File

@@ -51,6 +51,7 @@ typedef struct {
}
#endif
#include <gdnative/array.h>
#include <gdnative/gdnative.h>
#include <gdnative/variant.h>
@@ -66,7 +67,7 @@ void GDAPI godot_string_new_unicode_data(godot_string *r_dest, const wchar_t *p_
void GDAPI godot_string_get_data(const godot_string *p_self, char *p_dest, int *p_size);
wchar_t GDAPI *godot_string_operator_index(godot_string *p_self, const godot_int p_idx);
const char GDAPI *godot_string_c_str(const godot_string *p_self);
wchar_t GDAPI godot_string_operator_index_const(const godot_string *p_self, const godot_int p_idx);
const wchar_t GDAPI *godot_string_unicode_str(const godot_string *p_self);
godot_bool GDAPI godot_string_operator_equal(const godot_string *p_self, const godot_string *p_b);

View File

@@ -98,9 +98,9 @@ godot_vector3 GDAPI godot_transform_xform_vector3(const godot_transform *p_self,
godot_vector3 GDAPI godot_transform_xform_inv_vector3(const godot_transform *p_self, const godot_vector3 *p_v);
godot_rect3 GDAPI godot_transform_xform_rect3(const godot_transform *p_self, const godot_rect3 *p_v);
godot_aabb GDAPI godot_transform_xform_aabb(const godot_transform *p_self, const godot_aabb *p_v);
godot_rect3 GDAPI godot_transform_xform_inv_rect3(const godot_transform *p_self, const godot_rect3 *p_v);
godot_aabb GDAPI godot_transform_xform_inv_aabb(const godot_transform *p_self, const godot_aabb *p_v);
#ifdef __cplusplus
}

View File

@@ -62,7 +62,7 @@ typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_TRANSFORM2D,
GODOT_VARIANT_TYPE_PLANE,
GODOT_VARIANT_TYPE_QUAT, // 10
GODOT_VARIANT_TYPE_RECT3,
GODOT_VARIANT_TYPE_AABB,
GODOT_VARIANT_TYPE_BASIS,
GODOT_VARIANT_TYPE_TRANSFORM,
@@ -104,6 +104,7 @@ typedef struct godot_variant_call_error {
}
#endif
#include <gdnative/aabb.h>
#include <gdnative/array.h>
#include <gdnative/basis.h>
#include <gdnative/color.h>
@@ -113,7 +114,6 @@ typedef struct godot_variant_call_error {
#include <gdnative/pool_arrays.h>
#include <gdnative/quat.h>
#include <gdnative/rect2.h>
#include <gdnative/rect3.h>
#include <gdnative/rid.h>
#include <gdnative/string.h>
#include <gdnative/transform.h>
@@ -145,7 +145,7 @@ void GDAPI godot_variant_new_vector3(godot_variant *r_dest, const godot_vector3
void GDAPI godot_variant_new_transform2d(godot_variant *r_dest, const godot_transform2d *p_t2d);
void GDAPI godot_variant_new_plane(godot_variant *r_dest, const godot_plane *p_plane);
void GDAPI godot_variant_new_quat(godot_variant *r_dest, const godot_quat *p_quat);
void GDAPI godot_variant_new_rect3(godot_variant *r_dest, const godot_rect3 *p_rect3);
void GDAPI godot_variant_new_aabb(godot_variant *r_dest, const godot_aabb *p_aabb);
void GDAPI godot_variant_new_basis(godot_variant *r_dest, const godot_basis *p_basis);
void GDAPI godot_variant_new_transform(godot_variant *r_dest, const godot_transform *p_trans);
void GDAPI godot_variant_new_color(godot_variant *r_dest, const godot_color *p_color);
@@ -173,7 +173,7 @@ godot_vector3 GDAPI godot_variant_as_vector3(const godot_variant *p_self);
godot_transform2d GDAPI godot_variant_as_transform2d(const godot_variant *p_self);
godot_plane GDAPI godot_variant_as_plane(const godot_variant *p_self);
godot_quat GDAPI godot_variant_as_quat(const godot_variant *p_self);
godot_rect3 GDAPI godot_variant_as_rect3(const godot_variant *p_self);
godot_aabb GDAPI godot_variant_as_aabb(const godot_variant *p_self);
godot_basis GDAPI godot_variant_as_basis(const godot_variant *p_self);
godot_transform GDAPI godot_variant_as_transform(const godot_variant *p_self);
godot_color GDAPI godot_variant_as_color(const godot_variant *p_self);

File diff suppressed because it is too large Load Diff

View File

@@ -3,19 +3,84 @@
#define GODOT_GDNATIVE_API_STRUCT_H
#include <gdnative/gdnative.h>
#include <nativearvr/godot_nativearvr.h>
#include <arvr/godot_arvr.h>
#include <nativescript/godot_nativescript.h>
#include <pluginscript/godot_pluginscript.h>
#define GDNATIVE_API_INIT(options) do { extern const godot_gdnative_api_struct *_gdnative_wrapper_api_struct; _gdnative_wrapper_api_struct = options->api_struct; } while (0)
#define GDNATIVE_API_INIT(options) do { \
extern const godot_gdnative_core_api_struct *_gdnative_wrapper_api_struct; \
extern const godot_gdnative_ext_nativescript_api_struct *_gdnative_wrapper_nativescript_api_struct; \
extern const godot_gdnative_ext_pluginscript_api_struct *_gdnative_wrapper_pluginscript_api_struct; \
extern const godot_gdnative_ext_arvr_api_struct *_gdnative_wrapper_arvr_api_struct; \
_gdnative_wrapper_api_struct = options->api_struct; \
for (int i = 0; i < _gdnative_wrapper_api_struct->num_extensions; i++) { \
switch (_gdnative_wrapper_api_struct->extensions[i]->type) { \
case GDNATIVE_EXT_NATIVESCRIPT: \
_gdnative_wrapper_nativescript_api_struct = (godot_gdnative_ext_nativescript_api_struct *) _gdnative_wrapper_api_struct->extensions[i]; \
break; \
case GDNATIVE_EXT_PLUGINSCRIPT: \
_gdnative_wrapper_pluginscript_api_struct = (godot_gdnative_ext_pluginscript_api_struct *) _gdnative_wrapper_api_struct->extensions[i]; \
break; \
case GDNATIVE_EXT_ARVR: \
_gdnative_wrapper_arvr_api_struct = (godot_gdnative_ext_arvr_api_struct *) _gdnative_wrapper_api_struct->extensions[i]; \
break; \
} \
} \
} while (0)
#ifdef __cplusplus
extern "C" {
#endif
typedef struct godot_gdnative_api_struct {
void *next;
const char *version;
enum GDNATIVE_API_TYPES {
GDNATIVE_CORE,
GDNATIVE_EXT_NATIVESCRIPT,
GDNATIVE_EXT_PLUGINSCRIPT,
GDNATIVE_EXT_ARVR,
};
typedef struct godot_gdnative_ext_nativescript_api_struct {
unsigned int type;
godot_gdnative_api_version version;
const godot_gdnative_api_struct *next;
void (*godot_nativescript_register_class)(void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func);
void (*godot_nativescript_register_tool_class)(void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func);
void (*godot_nativescript_register_method)(void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_method_attributes p_attr, godot_instance_method p_method);
void (*godot_nativescript_register_property)(void *p_gdnative_handle, const char *p_name, const char *p_path, godot_property_attributes *p_attr, godot_property_set_func p_set_func, godot_property_get_func p_get_func);
void (*godot_nativescript_register_signal)(void *p_gdnative_handle, const char *p_name, const godot_signal *p_signal);
void *(*godot_nativescript_get_userdata)(godot_object *p_instance);
} godot_gdnative_ext_nativescript_api_struct;
typedef struct godot_gdnative_ext_pluginscript_api_struct {
unsigned int type;
godot_gdnative_api_version version;
const godot_gdnative_api_struct *next;
void (*godot_pluginscript_register_language)(const godot_pluginscript_language_desc *language_desc);
} godot_gdnative_ext_pluginscript_api_struct;
typedef struct godot_gdnative_ext_arvr_api_struct {
unsigned int type;
godot_gdnative_api_version version;
const godot_gdnative_api_struct *next;
void (*godot_arvr_register_interface)(const godot_arvr_interface_gdnative *p_interface);
godot_real (*godot_arvr_get_worldscale)();
godot_transform (*godot_arvr_get_reference_frame)();
void (*godot_arvr_blit)(int p_eye, godot_rid *p_render_target, godot_rect2 *p_screen_rect);
godot_int (*godot_arvr_get_texid)(godot_rid *p_render_target);
godot_int (*godot_arvr_add_controller)(char *p_device_name, godot_int p_hand, godot_bool p_tracks_orientation, godot_bool p_tracks_position);
void (*godot_arvr_remove_controller)(godot_int p_controller_id);
void (*godot_arvr_set_controller_transform)(godot_int p_controller_id, godot_transform *p_transform, godot_bool p_tracks_orientation, godot_bool p_tracks_position);
void (*godot_arvr_set_controller_button)(godot_int p_controller_id, godot_int p_button, godot_bool p_is_pressed);
void (*godot_arvr_set_controller_axis)(godot_int p_controller_id, godot_int p_exis, godot_real p_value, godot_bool p_can_be_negative);
godot_real (*godot_arvr_get_controller_rumble)(godot_int p_controller_id);
} godot_gdnative_ext_arvr_api_struct;
typedef struct godot_gdnative_core_api_struct {
unsigned int type;
godot_gdnative_api_version version;
const godot_gdnative_api_struct *next;
unsigned int num_extensions;
const godot_gdnative_api_struct **extensions;
void (*godot_color_new_rgba)(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a);
void (*godot_color_new_rgb)(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b);
godot_real (*godot_color_get_r)(const godot_color *p_self);
@@ -124,7 +189,7 @@ typedef struct godot_gdnative_api_struct {
godot_int (*godot_basis_get_orthogonal_index)(const godot_basis *p_self);
void (*godot_basis_new)(godot_basis *r_dest);
void (*godot_basis_new_with_euler_quat)(godot_basis *r_dest, const godot_quat *p_euler);
void (*godot_basis_get_elements)(godot_basis *p_self, godot_vector3 *p_elements);
void (*godot_basis_get_elements)(const godot_basis *p_self, godot_vector3 *p_elements);
godot_vector3 (*godot_basis_get_axis)(const godot_basis *p_self, const godot_int p_axis);
void (*godot_basis_set_axis)(godot_basis *p_self, const godot_int p_axis, const godot_vector3 *p_value);
godot_vector3 (*godot_basis_get_row)(const godot_basis *p_self, const godot_int p_row);
@@ -181,6 +246,8 @@ typedef struct godot_gdnative_api_struct {
void (*godot_pool_byte_array_push_back)(godot_pool_byte_array *p_self, const uint8_t p_data);
void (*godot_pool_byte_array_remove)(godot_pool_byte_array *p_self, const godot_int p_idx);
void (*godot_pool_byte_array_resize)(godot_pool_byte_array *p_self, const godot_int p_size);
godot_pool_byte_array_read_access *(*godot_pool_byte_array_read)(const godot_pool_byte_array *p_self);
godot_pool_byte_array_write_access *(*godot_pool_byte_array_write)(godot_pool_byte_array *p_self);
void (*godot_pool_byte_array_set)(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data);
uint8_t (*godot_pool_byte_array_get)(const godot_pool_byte_array *p_self, const godot_int p_idx);
godot_int (*godot_pool_byte_array_size)(const godot_pool_byte_array *p_self);
@@ -195,6 +262,8 @@ typedef struct godot_gdnative_api_struct {
void (*godot_pool_int_array_push_back)(godot_pool_int_array *p_self, const godot_int p_data);
void (*godot_pool_int_array_remove)(godot_pool_int_array *p_self, const godot_int p_idx);
void (*godot_pool_int_array_resize)(godot_pool_int_array *p_self, const godot_int p_size);
godot_pool_int_array_read_access *(*godot_pool_int_array_read)(const godot_pool_int_array *p_self);
godot_pool_int_array_write_access *(*godot_pool_int_array_write)(godot_pool_int_array *p_self);
void (*godot_pool_int_array_set)(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data);
godot_int (*godot_pool_int_array_get)(const godot_pool_int_array *p_self, const godot_int p_idx);
godot_int (*godot_pool_int_array_size)(const godot_pool_int_array *p_self);
@@ -209,6 +278,8 @@ typedef struct godot_gdnative_api_struct {
void (*godot_pool_real_array_push_back)(godot_pool_real_array *p_self, const godot_real p_data);
void (*godot_pool_real_array_remove)(godot_pool_real_array *p_self, const godot_int p_idx);
void (*godot_pool_real_array_resize)(godot_pool_real_array *p_self, const godot_int p_size);
godot_pool_real_array_read_access *(*godot_pool_real_array_read)(const godot_pool_real_array *p_self);
godot_pool_real_array_write_access *(*godot_pool_real_array_write)(godot_pool_real_array *p_self);
void (*godot_pool_real_array_set)(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data);
godot_real (*godot_pool_real_array_get)(const godot_pool_real_array *p_self, const godot_int p_idx);
godot_int (*godot_pool_real_array_size)(const godot_pool_real_array *p_self);
@@ -223,6 +294,8 @@ typedef struct godot_gdnative_api_struct {
void (*godot_pool_string_array_push_back)(godot_pool_string_array *p_self, const godot_string *p_data);
void (*godot_pool_string_array_remove)(godot_pool_string_array *p_self, const godot_int p_idx);
void (*godot_pool_string_array_resize)(godot_pool_string_array *p_self, const godot_int p_size);
godot_pool_string_array_read_access *(*godot_pool_string_array_read)(const godot_pool_string_array *p_self);
godot_pool_string_array_write_access *(*godot_pool_string_array_write)(godot_pool_string_array *p_self);
void (*godot_pool_string_array_set)(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data);
godot_string (*godot_pool_string_array_get)(const godot_pool_string_array *p_self, const godot_int p_idx);
godot_int (*godot_pool_string_array_size)(const godot_pool_string_array *p_self);
@@ -237,6 +310,8 @@ typedef struct godot_gdnative_api_struct {
void (*godot_pool_vector2_array_push_back)(godot_pool_vector2_array *p_self, const godot_vector2 *p_data);
void (*godot_pool_vector2_array_remove)(godot_pool_vector2_array *p_self, const godot_int p_idx);
void (*godot_pool_vector2_array_resize)(godot_pool_vector2_array *p_self, const godot_int p_size);
godot_pool_vector2_array_read_access *(*godot_pool_vector2_array_read)(const godot_pool_vector2_array *p_self);
godot_pool_vector2_array_write_access *(*godot_pool_vector2_array_write)(godot_pool_vector2_array *p_self);
void (*godot_pool_vector2_array_set)(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data);
godot_vector2 (*godot_pool_vector2_array_get)(const godot_pool_vector2_array *p_self, const godot_int p_idx);
godot_int (*godot_pool_vector2_array_size)(const godot_pool_vector2_array *p_self);
@@ -251,6 +326,8 @@ typedef struct godot_gdnative_api_struct {
void (*godot_pool_vector3_array_push_back)(godot_pool_vector3_array *p_self, const godot_vector3 *p_data);
void (*godot_pool_vector3_array_remove)(godot_pool_vector3_array *p_self, const godot_int p_idx);
void (*godot_pool_vector3_array_resize)(godot_pool_vector3_array *p_self, const godot_int p_size);
godot_pool_vector3_array_read_access *(*godot_pool_vector3_array_read)(const godot_pool_vector3_array *p_self);
godot_pool_vector3_array_write_access *(*godot_pool_vector3_array_write)(godot_pool_vector3_array *p_self);
void (*godot_pool_vector3_array_set)(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data);
godot_vector3 (*godot_pool_vector3_array_get)(const godot_pool_vector3_array *p_self, const godot_int p_idx);
godot_int (*godot_pool_vector3_array_size)(const godot_pool_vector3_array *p_self);
@@ -265,10 +342,54 @@ typedef struct godot_gdnative_api_struct {
void (*godot_pool_color_array_push_back)(godot_pool_color_array *p_self, const godot_color *p_data);
void (*godot_pool_color_array_remove)(godot_pool_color_array *p_self, const godot_int p_idx);
void (*godot_pool_color_array_resize)(godot_pool_color_array *p_self, const godot_int p_size);
godot_pool_color_array_read_access *(*godot_pool_color_array_read)(const godot_pool_color_array *p_self);
godot_pool_color_array_write_access *(*godot_pool_color_array_write)(godot_pool_color_array *p_self);
void (*godot_pool_color_array_set)(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data);
godot_color (*godot_pool_color_array_get)(const godot_pool_color_array *p_self, const godot_int p_idx);
godot_int (*godot_pool_color_array_size)(const godot_pool_color_array *p_self);
void (*godot_pool_color_array_destroy)(godot_pool_color_array *p_self);
const uint8_t *(*godot_pool_byte_array_read_access_ptr)(const godot_pool_byte_array_read_access *p_read);
void (*godot_pool_byte_array_read_access_operator_assign)(godot_pool_byte_array_read_access *p_read, godot_pool_byte_array_read_access *p_other);
void (*godot_pool_byte_array_read_access_destroy)(godot_pool_byte_array_read_access *p_read);
const godot_int *(*godot_pool_int_array_read_access_ptr)(const godot_pool_int_array_read_access *p_read);
void (*godot_pool_int_array_read_access_operator_assign)(godot_pool_int_array_read_access *p_read, godot_pool_int_array_read_access *p_other);
void (*godot_pool_int_array_read_access_destroy)(godot_pool_int_array_read_access *p_read);
const godot_real *(*godot_pool_real_array_read_access_ptr)(const godot_pool_real_array_read_access *p_read);
void (*godot_pool_real_array_read_access_operator_assign)(godot_pool_real_array_read_access *p_read, godot_pool_real_array_read_access *p_other);
void (*godot_pool_real_array_read_access_destroy)(godot_pool_real_array_read_access *p_read);
const godot_string *(*godot_pool_string_array_read_access_ptr)(const godot_pool_string_array_read_access *p_read);
void (*godot_pool_string_array_read_access_operator_assign)(godot_pool_string_array_read_access *p_read, godot_pool_string_array_read_access *p_other);
void (*godot_pool_string_array_read_access_destroy)(godot_pool_string_array_read_access *p_read);
const godot_vector2 *(*godot_pool_vector2_array_read_access_ptr)(const godot_pool_vector2_array_read_access *p_read);
void (*godot_pool_vector2_array_read_access_operator_assign)(godot_pool_vector2_array_read_access *p_read, godot_pool_vector2_array_read_access *p_other);
void (*godot_pool_vector2_array_read_access_destroy)(godot_pool_vector2_array_read_access *p_read);
const godot_vector3 *(*godot_pool_vector3_array_read_access_ptr)(const godot_pool_vector3_array_read_access *p_read);
void (*godot_pool_vector3_array_read_access_operator_assign)(godot_pool_vector3_array_read_access *p_read, godot_pool_vector3_array_read_access *p_other);
void (*godot_pool_vector3_array_read_access_destroy)(godot_pool_vector3_array_read_access *p_read);
const godot_color *(*godot_pool_color_array_read_access_ptr)(const godot_pool_color_array_read_access *p_read);
void (*godot_pool_color_array_read_access_operator_assign)(godot_pool_color_array_read_access *p_read, godot_pool_color_array_read_access *p_other);
void (*godot_pool_color_array_read_access_destroy)(godot_pool_color_array_read_access *p_read);
uint8_t *(*godot_pool_byte_array_write_access_ptr)(const godot_pool_byte_array_write_access *p_write);
void (*godot_pool_byte_array_write_access_operator_assign)(godot_pool_byte_array_write_access *p_write, godot_pool_byte_array_write_access *p_other);
void (*godot_pool_byte_array_write_access_destroy)(godot_pool_byte_array_write_access *p_write);
godot_int *(*godot_pool_int_array_write_access_ptr)(const godot_pool_int_array_write_access *p_write);
void (*godot_pool_int_array_write_access_operator_assign)(godot_pool_int_array_write_access *p_write, godot_pool_int_array_write_access *p_other);
void (*godot_pool_int_array_write_access_destroy)(godot_pool_int_array_write_access *p_write);
godot_real *(*godot_pool_real_array_write_access_ptr)(const godot_pool_real_array_write_access *p_write);
void (*godot_pool_real_array_write_access_operator_assign)(godot_pool_real_array_write_access *p_write, godot_pool_real_array_write_access *p_other);
void (*godot_pool_real_array_write_access_destroy)(godot_pool_real_array_write_access *p_write);
godot_string *(*godot_pool_string_array_write_access_ptr)(const godot_pool_string_array_write_access *p_write);
void (*godot_pool_string_array_write_access_operator_assign)(godot_pool_string_array_write_access *p_write, godot_pool_string_array_write_access *p_other);
void (*godot_pool_string_array_write_access_destroy)(godot_pool_string_array_write_access *p_write);
godot_vector2 *(*godot_pool_vector2_array_write_access_ptr)(const godot_pool_vector2_array_write_access *p_write);
void (*godot_pool_vector2_array_write_access_operator_assign)(godot_pool_vector2_array_write_access *p_write, godot_pool_vector2_array_write_access *p_other);
void (*godot_pool_vector2_array_write_access_destroy)(godot_pool_vector2_array_write_access *p_write);
godot_vector3 *(*godot_pool_vector3_array_write_access_ptr)(const godot_pool_vector3_array_write_access *p_write);
void (*godot_pool_vector3_array_write_access_operator_assign)(godot_pool_vector3_array_write_access *p_write, godot_pool_vector3_array_write_access *p_other);
void (*godot_pool_vector3_array_write_access_destroy)(godot_pool_vector3_array_write_access *p_write);
godot_color *(*godot_pool_color_array_write_access_ptr)(const godot_pool_color_array_write_access *p_write);
void (*godot_pool_color_array_write_access_operator_assign)(godot_pool_color_array_write_access *p_write, godot_pool_color_array_write_access *p_other);
void (*godot_pool_color_array_write_access_destroy)(godot_pool_color_array_write_access *p_write);
void (*godot_array_new)(godot_array *r_dest);
void (*godot_array_new_copy)(godot_array *r_dest, const godot_array *p_src);
void (*godot_array_new_pool_color_array)(godot_array *r_dest, const godot_pool_color_array *p_pca);
@@ -281,6 +402,7 @@ typedef struct godot_gdnative_api_struct {
void (*godot_array_set)(godot_array *p_self, const godot_int p_idx, const godot_variant *p_value);
godot_variant (*godot_array_get)(const godot_array *p_self, const godot_int p_idx);
godot_variant *(*godot_array_operator_index)(godot_array *p_self, const godot_int p_idx);
const godot_variant *(*godot_array_operator_index_const)(const godot_array *p_self, const godot_int p_idx);
void (*godot_array_append)(godot_array *p_self, const godot_variant *p_value);
void (*godot_array_clear)(godot_array *p_self);
godot_int (*godot_array_count)(const godot_array *p_self, const godot_variant *p_value);
@@ -304,6 +426,8 @@ typedef struct godot_gdnative_api_struct {
godot_int (*godot_array_size)(const godot_array *p_self);
void (*godot_array_sort)(godot_array *p_self);
void (*godot_array_sort_custom)(godot_array *p_self, godot_object *p_obj, const godot_string *p_func);
godot_int (*godot_array_bsearch)(godot_array *p_self, const godot_variant *p_value, const godot_bool p_before);
godot_int (*godot_array_bsearch_custom)(godot_array *p_self, const godot_variant *p_value, godot_object *p_obj, const godot_string *p_func, const godot_bool p_before);
void (*godot_array_destroy)(godot_array *p_self);
void (*godot_dictionary_new)(godot_dictionary *r_dest);
void (*godot_dictionary_new_copy)(godot_dictionary *r_dest, const godot_dictionary *p_src);
@@ -320,6 +444,7 @@ typedef struct godot_gdnative_api_struct {
godot_variant (*godot_dictionary_get)(const godot_dictionary *p_self, const godot_variant *p_key);
void (*godot_dictionary_set)(godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_value);
godot_variant *(*godot_dictionary_operator_index)(godot_dictionary *p_self, const godot_variant *p_key);
const godot_variant *(*godot_dictionary_operator_index_const)(const godot_dictionary *p_self, const godot_variant *p_key);
godot_variant *(*godot_dictionary_next)(const godot_dictionary *p_self, const godot_variant *p_key);
godot_bool (*godot_dictionary_operator_equal)(const godot_dictionary *p_self, const godot_dictionary *p_b);
godot_string (*godot_dictionary_to_json)(const godot_dictionary *p_self);
@@ -332,7 +457,7 @@ typedef struct godot_gdnative_api_struct {
godot_string (*godot_node_path_get_name)(const godot_node_path *p_self, const godot_int p_idx);
godot_int (*godot_node_path_get_subname_count)(const godot_node_path *p_self);
godot_string (*godot_node_path_get_subname)(const godot_node_path *p_self, const godot_int p_idx);
godot_string (*godot_node_path_get_property)(const godot_node_path *p_self);
godot_string (*godot_node_path_get_concatenated_subnames)(const godot_node_path *p_self);
godot_bool (*godot_node_path_is_empty)(const godot_node_path *p_self);
godot_bool (*godot_node_path_operator_equal)(const godot_node_path *p_self, const godot_node_path *p_b);
void (*godot_plane_new_with_reals)(godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d);
@@ -372,33 +497,33 @@ typedef struct godot_gdnative_api_struct {
godot_vector2 (*godot_rect2_get_size)(const godot_rect2 *p_self);
void (*godot_rect2_set_position)(godot_rect2 *p_self, const godot_vector2 *p_pos);
void (*godot_rect2_set_size)(godot_rect2 *p_self, const godot_vector2 *p_size);
void (*godot_rect3_new)(godot_rect3 *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size);
godot_vector3 (*godot_rect3_get_position)(const godot_rect3 *p_self);
void (*godot_rect3_set_position)(const godot_rect3 *p_self, const godot_vector3 *p_v);
godot_vector3 (*godot_rect3_get_size)(const godot_rect3 *p_self);
void (*godot_rect3_set_size)(const godot_rect3 *p_self, const godot_vector3 *p_v);
godot_string (*godot_rect3_as_string)(const godot_rect3 *p_self);
godot_real (*godot_rect3_get_area)(const godot_rect3 *p_self);
godot_bool (*godot_rect3_has_no_area)(const godot_rect3 *p_self);
godot_bool (*godot_rect3_has_no_surface)(const godot_rect3 *p_self);
godot_bool (*godot_rect3_intersects)(const godot_rect3 *p_self, const godot_rect3 *p_with);
godot_bool (*godot_rect3_encloses)(const godot_rect3 *p_self, const godot_rect3 *p_with);
godot_rect3 (*godot_rect3_merge)(const godot_rect3 *p_self, const godot_rect3 *p_with);
godot_rect3 (*godot_rect3_intersection)(const godot_rect3 *p_self, const godot_rect3 *p_with);
godot_bool (*godot_rect3_intersects_plane)(const godot_rect3 *p_self, const godot_plane *p_plane);
godot_bool (*godot_rect3_intersects_segment)(const godot_rect3 *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to);
godot_bool (*godot_rect3_has_point)(const godot_rect3 *p_self, const godot_vector3 *p_point);
godot_vector3 (*godot_rect3_get_support)(const godot_rect3 *p_self, const godot_vector3 *p_dir);
godot_vector3 (*godot_rect3_get_longest_axis)(const godot_rect3 *p_self);
godot_int (*godot_rect3_get_longest_axis_index)(const godot_rect3 *p_self);
godot_real (*godot_rect3_get_longest_axis_size)(const godot_rect3 *p_self);
godot_vector3 (*godot_rect3_get_shortest_axis)(const godot_rect3 *p_self);
godot_int (*godot_rect3_get_shortest_axis_index)(const godot_rect3 *p_self);
godot_real (*godot_rect3_get_shortest_axis_size)(const godot_rect3 *p_self);
godot_rect3 (*godot_rect3_expand)(const godot_rect3 *p_self, const godot_vector3 *p_to_point);
godot_rect3 (*godot_rect3_grow)(const godot_rect3 *p_self, const godot_real p_by);
godot_vector3 (*godot_rect3_get_endpoint)(const godot_rect3 *p_self, const godot_int p_idx);
godot_bool (*godot_rect3_operator_equal)(const godot_rect3 *p_self, const godot_rect3 *p_b);
void (*godot_aabb_new)(godot_aabb *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size);
godot_vector3 (*godot_aabb_get_position)(const godot_aabb *p_self);
void (*godot_aabb_set_position)(const godot_aabb *p_self, const godot_vector3 *p_v);
godot_vector3 (*godot_aabb_get_size)(const godot_aabb *p_self);
void (*godot_aabb_set_size)(const godot_aabb *p_self, const godot_vector3 *p_v);
godot_string (*godot_aabb_as_string)(const godot_aabb *p_self);
godot_real (*godot_aabb_get_area)(const godot_aabb *p_self);
godot_bool (*godot_aabb_has_no_area)(const godot_aabb *p_self);
godot_bool (*godot_aabb_has_no_surface)(const godot_aabb *p_self);
godot_bool (*godot_aabb_intersects)(const godot_aabb *p_self, const godot_aabb *p_with);
godot_bool (*godot_aabb_encloses)(const godot_aabb *p_self, const godot_aabb *p_with);
godot_aabb (*godot_aabb_merge)(const godot_aabb *p_self, const godot_aabb *p_with);
godot_aabb (*godot_aabb_intersection)(const godot_aabb *p_self, const godot_aabb *p_with);
godot_bool (*godot_aabb_intersects_plane)(const godot_aabb *p_self, const godot_plane *p_plane);
godot_bool (*godot_aabb_intersects_segment)(const godot_aabb *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to);
godot_bool (*godot_aabb_has_point)(const godot_aabb *p_self, const godot_vector3 *p_point);
godot_vector3 (*godot_aabb_get_support)(const godot_aabb *p_self, const godot_vector3 *p_dir);
godot_vector3 (*godot_aabb_get_longest_axis)(const godot_aabb *p_self);
godot_int (*godot_aabb_get_longest_axis_index)(const godot_aabb *p_self);
godot_real (*godot_aabb_get_longest_axis_size)(const godot_aabb *p_self);
godot_vector3 (*godot_aabb_get_shortest_axis)(const godot_aabb *p_self);
godot_int (*godot_aabb_get_shortest_axis_index)(const godot_aabb *p_self);
godot_real (*godot_aabb_get_shortest_axis_size)(const godot_aabb *p_self);
godot_aabb (*godot_aabb_expand)(const godot_aabb *p_self, const godot_vector3 *p_to_point);
godot_aabb (*godot_aabb_grow)(const godot_aabb *p_self, const godot_real p_by);
godot_vector3 (*godot_aabb_get_endpoint)(const godot_aabb *p_self, const godot_int p_idx);
godot_bool (*godot_aabb_operator_equal)(const godot_aabb *p_self, const godot_aabb *p_b);
void (*godot_rid_new)(godot_rid *r_dest);
godot_int (*godot_rid_get_id)(const godot_rid *p_self);
void (*godot_rid_new_with_resource)(godot_rid *r_dest, const godot_object *p_from);
@@ -425,8 +550,8 @@ typedef struct godot_gdnative_api_struct {
godot_transform (*godot_transform_operator_multiply)(const godot_transform *p_self, const godot_transform *p_b);
godot_vector3 (*godot_transform_xform_vector3)(const godot_transform *p_self, const godot_vector3 *p_v);
godot_vector3 (*godot_transform_xform_inv_vector3)(const godot_transform *p_self, const godot_vector3 *p_v);
godot_rect3 (*godot_transform_xform_rect3)(const godot_transform *p_self, const godot_rect3 *p_v);
godot_rect3 (*godot_transform_xform_inv_rect3)(const godot_transform *p_self, const godot_rect3 *p_v);
godot_aabb (*godot_transform_xform_aabb)(const godot_transform *p_self, const godot_aabb *p_v);
godot_aabb (*godot_transform_xform_inv_aabb)(const godot_transform *p_self, const godot_aabb *p_v);
void (*godot_transform2d_new)(godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos);
void (*godot_transform2d_new_axis_origin)(godot_transform2d *r_dest, const godot_vector2 *p_x_axis, const godot_vector2 *p_y_axis, const godot_vector2 *p_origin);
godot_string (*godot_transform2d_as_string)(const godot_transform2d *p_self);
@@ -463,7 +588,7 @@ typedef struct godot_gdnative_api_struct {
void (*godot_variant_new_transform2d)(godot_variant *r_dest, const godot_transform2d *p_t2d);
void (*godot_variant_new_plane)(godot_variant *r_dest, const godot_plane *p_plane);
void (*godot_variant_new_quat)(godot_variant *r_dest, const godot_quat *p_quat);
void (*godot_variant_new_rect3)(godot_variant *r_dest, const godot_rect3 *p_rect3);
void (*godot_variant_new_aabb)(godot_variant *r_dest, const godot_aabb *p_aabb);
void (*godot_variant_new_basis)(godot_variant *r_dest, const godot_basis *p_basis);
void (*godot_variant_new_transform)(godot_variant *r_dest, const godot_transform *p_trans);
void (*godot_variant_new_color)(godot_variant *r_dest, const godot_color *p_color);
@@ -490,7 +615,7 @@ typedef struct godot_gdnative_api_struct {
godot_transform2d (*godot_variant_as_transform2d)(const godot_variant *p_self);
godot_plane (*godot_variant_as_plane)(const godot_variant *p_self);
godot_quat (*godot_variant_as_quat)(const godot_variant *p_self);
godot_rect3 (*godot_variant_as_rect3)(const godot_variant *p_self);
godot_aabb (*godot_variant_as_aabb)(const godot_variant *p_self);
godot_basis (*godot_variant_as_basis)(const godot_variant *p_self);
godot_transform (*godot_variant_as_transform)(const godot_variant *p_self);
godot_color (*godot_variant_as_color)(const godot_variant *p_self);
@@ -519,7 +644,7 @@ typedef struct godot_gdnative_api_struct {
void (*godot_string_new_unicode_data)(godot_string *r_dest, const wchar_t *p_contents, const int p_size);
void (*godot_string_get_data)(const godot_string *p_self, char *p_dest, int *p_size);
wchar_t *(*godot_string_operator_index)(godot_string *p_self, const godot_int p_idx);
const char *(*godot_string_c_str)(const godot_string *p_self);
wchar_t (*godot_string_operator_index_const)(const godot_string *p_self, const godot_int p_idx);
const wchar_t *(*godot_string_unicode_str)(const godot_string *p_self);
godot_bool (*godot_string_operator_equal)(const godot_string *p_self, const godot_string *p_b);
godot_bool (*godot_string_operator_less)(const godot_string *p_self, const godot_string *p_b);
@@ -674,29 +799,14 @@ typedef struct godot_gdnative_api_struct {
void (*godot_method_bind_ptrcall)(godot_method_bind *p_method_bind, godot_object *p_instance, const void **p_args, void *p_ret);
godot_variant (*godot_method_bind_call)(godot_method_bind *p_method_bind, godot_object *p_instance, const godot_variant **p_args, const int p_arg_count, godot_variant_call_error *p_call_error);
godot_class_constructor (*godot_get_class_constructor)(const char *p_classname);
void (*godot_register_native_call_type)(const char *call_type, native_call_cb p_callback);
void *(*godot_alloc)(int p_bytes);
void *(*godot_realloc)(void *p_ptr, int p_bytes);
void (*godot_free)(void *p_ptr);
void (*godot_print_error)(const char *p_description, const char *p_function, const char *p_file, int p_line);
void (*godot_print_warning)(const char *p_description, const char *p_function, const char *p_file, int p_line);
void (*godot_print)(const godot_string *p_message);
void (*godot_nativescript_register_class)(void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func);
void (*godot_nativescript_register_tool_class)(void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func);
void (*godot_nativescript_register_method)(void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_method_attributes p_attr, godot_instance_method p_method);
void (*godot_nativescript_register_property)(void *p_gdnative_handle, const char *p_name, const char *p_path, godot_property_attributes *p_attr, godot_property_set_func p_set_func, godot_property_get_func p_get_func);
void (*godot_nativescript_register_signal)(void *p_gdnative_handle, const char *p_name, const godot_signal *p_signal);
void *(*godot_nativescript_get_userdata)(godot_object *p_instance);
void (*godot_arvr_register_interface)(const godot_arvr_interface_gdnative *p_interface);
godot_real (*godot_arvr_get_worldscale)();
godot_transform (*godot_arvr_get_reference_frame)();
void (*godot_arvr_blit)(int p_eye, godot_rid *p_render_target, godot_rect2 *p_screen_rect);
godot_int (*godot_arvr_get_texid)(godot_rid *p_render_target);
godot_int (*godot_arvr_add_controller)(char *p_device_name, godot_int p_hand, godot_bool p_tracks_orientation, godot_bool p_tracks_position);
void (*godot_arvr_remove_controller)(godot_int p_controller_id);
void (*godot_arvr_set_controller_transform)(godot_int p_controller_id, godot_transform *p_transform, godot_bool p_tracks_orientation, godot_bool p_tracks_position);
void (*godot_arvr_set_controller_button)(godot_int p_controller_id, godot_int p_button, godot_bool p_is_pressed);
void (*godot_arvr_set_controller_axis)(godot_int p_controller_id, godot_int p_exis, godot_real p_value, godot_bool p_can_be_negative);
} godot_gdnative_api_struct;
} godot_gdnative_core_api_struct;
#ifdef __cplusplus
}

View File

@@ -129,6 +129,7 @@ typedef struct {
const char **comment_delimiters; // NULL terminated array
const char **string_delimiters; // NULL terminated array
godot_bool has_named_classes;
godot_bool supports_builtin_mode;
godot_string (*get_template_source_code)(godot_pluginscript_language_data *p_data, const godot_string *p_class_name, const godot_string *p_base_class_name);
godot_bool (*validate)(godot_pluginscript_language_data *p_data, const godot_string *p_script, int *r_line_error, int *r_col_error, godot_string *r_test_error, const godot_string *p_path, godot_pool_string_array *r_functions);