mirror of
https://github.com/godotengine/godot-headers.git
synced 2026-01-01 09:48:20 +03:00
Compare commits
20 Commits
godot-3.1.
...
3.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
815f34e1e9 | ||
|
|
1a05cbf9b8 | ||
|
|
fb56ea9719 | ||
|
|
f2122198d5 | ||
|
|
2b53352f5c | ||
|
|
ddf67cc7b8 | ||
|
|
4b73c5445e | ||
|
|
57138143b5 | ||
|
|
83c651ada4 | ||
|
|
4fa11f8c2a | ||
|
|
3cde668e84 | ||
|
|
efea911ad5 | ||
|
|
6d4b930ba3 | ||
|
|
fb3010491b | ||
|
|
f1229c6077 | ||
|
|
1d9327bed5 | ||
|
|
f1e459d0f7 | ||
|
|
7f65d4d9f2 | ||
|
|
66f7af84ce | ||
|
|
ad61229a5a |
@@ -1,6 +1,6 @@
|
||||
# MIT License
|
||||
|
||||
Copyright (c) 2017-2019 GodotNativeTools
|
||||
Copyright (c) 2017-2020 GodotNativeTools
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
17
README.md
17
README.md
@@ -5,9 +5,22 @@
|
||||
|
||||
> `NativeScript` uses GDNative to implement scripts backed by native code.
|
||||
|
||||
- [**Branches**](#branches)
|
||||
- [**Getting Started**](#getting-started)
|
||||
- [**FAQ**](#faq)
|
||||
|
||||
## Branches
|
||||
|
||||
We maintain branches on this repo that relate directly to the main builds of Godot.
|
||||
Make sure you use the correct branch for the version of Godot you are using!
|
||||
|
||||
| Branch | Version of Godot |
|
||||
| --- | --- |
|
||||
| [master](https://github.com/GodotNativeTools/godot_headers) | Godot master |
|
||||
| [3.2](https://github.com/GodotNativeTools/godot_headers/tree/3.2) | Godot 3.2.x |
|
||||
| [3.1](https://github.com/GodotNativeTools/godot_headers/tree/3.1) | Godot 3.1.x |
|
||||
| [3.0](https://github.com/GodotNativeTools/godot_headers/tree/3.0) | Godot 3.0.x |
|
||||
|
||||
## Getting Started
|
||||
|
||||
| **Build latest version of Godot** | [**GitHub**](https://github.com/godotengine/godot) | [**Docs**](https://godot.readthedocs.io/en/latest/development/compiling/index.html) |
|
||||
@@ -223,10 +236,6 @@ use of GDNative to implement scripts backed by native code.
|
||||
You must compile the library with debug
|
||||
symbols, and then you can use your debugger as usual.
|
||||
|
||||
**Are NativeScripts in Godot 3.0?**
|
||||
|
||||
They are! 🎉
|
||||
|
||||
**Can you use one GDNativeLibrary for all NativeScripts?**
|
||||
|
||||
You can! ✨
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -46,6 +46,8 @@ extern "C" {
|
||||
|
||||
JNIEnv *GDAPI godot_android_get_env();
|
||||
jobject GDAPI godot_android_get_activity();
|
||||
jobject GDAPI godot_android_get_surface();
|
||||
bool GDAPI godot_android_is_activity_resumed();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -42,7 +42,7 @@ extern "C" {
|
||||
|
||||
// Use these to populate version in your plugin
|
||||
#define GODOTVR_API_MAJOR 1
|
||||
#define GODOTVR_API_MINOR 0
|
||||
#define GODOTVR_API_MINOR 1
|
||||
|
||||
typedef struct {
|
||||
godot_gdnative_api_version version; /* version of our API */
|
||||
@@ -61,6 +61,10 @@ typedef struct {
|
||||
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 *);
|
||||
void (*process)(void *);
|
||||
// only in 1.1 onwards
|
||||
godot_int (*get_external_texture_for_eye)(void *, godot_int);
|
||||
void (*notification)(void *, godot_int);
|
||||
godot_int (*get_camera_feed_id)(void *);
|
||||
} godot_arvr_interface_gdnative;
|
||||
|
||||
void GDAPI godot_arvr_register_interface(const godot_arvr_interface_gdnative *p_interface);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -132,6 +132,8 @@ void GDAPI godot_array_destroy(godot_array *p_self);
|
||||
|
||||
godot_array GDAPI godot_array_duplicate(const godot_array *p_self, const godot_bool p_deep);
|
||||
|
||||
godot_array GDAPI godot_array_slice(const godot_array *p_self, const godot_int p_begin, const godot_int p_end, const godot_int p_step, const godot_bool p_deep);
|
||||
|
||||
godot_variant GDAPI godot_array_max(const godot_array *p_self);
|
||||
|
||||
godot_variant GDAPI godot_array_min(const godot_array *p_self);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -63,6 +63,8 @@ void GDAPI godot_dictionary_new(godot_dictionary *r_dest);
|
||||
void GDAPI godot_dictionary_new_copy(godot_dictionary *r_dest, const godot_dictionary *p_src);
|
||||
void GDAPI godot_dictionary_destroy(godot_dictionary *p_self);
|
||||
|
||||
godot_dictionary GDAPI godot_dictionary_duplicate(const godot_dictionary *p_self, const godot_bool p_deep);
|
||||
|
||||
godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_self);
|
||||
|
||||
godot_bool GDAPI godot_dictionary_empty(const godot_dictionary *p_self);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -67,7 +67,7 @@ extern "C" {
|
||||
////// Error
|
||||
|
||||
typedef enum {
|
||||
GODOT_OK,
|
||||
GODOT_OK, // (0)
|
||||
GODOT_FAILED, ///< Generic fail error
|
||||
GODOT_ERR_UNAVAILABLE, ///< What is requested is unsupported/unavailable
|
||||
GODOT_ERR_UNCONFIGURED, ///< The object being used hasn't been properly set up yet
|
||||
@@ -97,12 +97,12 @@ typedef enum {
|
||||
GODOT_ERR_CONNECTION_ERROR,
|
||||
GODOT_ERR_CANT_ACQUIRE_RESOURCE,
|
||||
GODOT_ERR_CANT_FORK,
|
||||
GODOT_ERR_INVALID_DATA, ///< Data passed is invalid (30)
|
||||
GODOT_ERR_INVALID_DATA, ///< Data passed is invalid (30)
|
||||
GODOT_ERR_INVALID_PARAMETER, ///< Parameter passed is invalid
|
||||
GODOT_ERR_ALREADY_EXISTS, ///< When adding, item already exists
|
||||
GODOT_ERR_DOES_NOT_EXIST, ///< When retrieving/erasing, it item does not exist
|
||||
GODOT_ERR_DATABASE_CANT_READ, ///< database is full
|
||||
GODOT_ERR_DATABASE_CANT_WRITE, ///< database is full (35)
|
||||
GODOT_ERR_DATABASE_CANT_WRITE, ///< database is full (35)
|
||||
GODOT_ERR_COMPILATION_FAILED,
|
||||
GODOT_ERR_METHOD_NOT_FOUND,
|
||||
GODOT_ERR_LINK_FAILED,
|
||||
@@ -286,6 +286,13 @@ void GDAPI godot_print(const godot_string *p_message);
|
||||
|
||||
bool GDAPI godot_is_instance_valid(const godot_object *p_object);
|
||||
|
||||
//tags used for safe dynamic casting
|
||||
void GDAPI *godot_get_class_tag(const godot_string_name *p_class);
|
||||
godot_object GDAPI *godot_object_cast_to(const godot_object *p_object, void *p_class_tag);
|
||||
|
||||
// equivalent of GDScript's instance_from_id
|
||||
godot_object GDAPI *godot_instance_from_id(godot_int p_instance_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -191,6 +191,8 @@ uint8_t GDAPI godot_pool_byte_array_get(const godot_pool_byte_array *p_self, con
|
||||
|
||||
godot_int GDAPI godot_pool_byte_array_size(const godot_pool_byte_array *p_self);
|
||||
|
||||
godot_bool GDAPI godot_pool_byte_array_empty(const godot_pool_byte_array *p_self);
|
||||
|
||||
void GDAPI godot_pool_byte_array_destroy(godot_pool_byte_array *p_self);
|
||||
|
||||
// int
|
||||
@@ -222,6 +224,8 @@ godot_int GDAPI godot_pool_int_array_get(const godot_pool_int_array *p_self, con
|
||||
|
||||
godot_int GDAPI godot_pool_int_array_size(const godot_pool_int_array *p_self);
|
||||
|
||||
godot_bool GDAPI godot_pool_int_array_empty(const godot_pool_int_array *p_self);
|
||||
|
||||
void GDAPI godot_pool_int_array_destroy(godot_pool_int_array *p_self);
|
||||
|
||||
// real
|
||||
@@ -253,6 +257,8 @@ godot_real GDAPI godot_pool_real_array_get(const godot_pool_real_array *p_self,
|
||||
|
||||
godot_int GDAPI godot_pool_real_array_size(const godot_pool_real_array *p_self);
|
||||
|
||||
godot_bool GDAPI godot_pool_real_array_empty(const godot_pool_real_array *p_self);
|
||||
|
||||
void GDAPI godot_pool_real_array_destroy(godot_pool_real_array *p_self);
|
||||
|
||||
// string
|
||||
@@ -284,6 +290,8 @@ godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_
|
||||
|
||||
godot_int GDAPI godot_pool_string_array_size(const godot_pool_string_array *p_self);
|
||||
|
||||
godot_bool GDAPI godot_pool_string_array_empty(const godot_pool_string_array *p_self);
|
||||
|
||||
void GDAPI godot_pool_string_array_destroy(godot_pool_string_array *p_self);
|
||||
|
||||
// vector2
|
||||
@@ -315,6 +323,8 @@ godot_vector2 GDAPI godot_pool_vector2_array_get(const godot_pool_vector2_array
|
||||
|
||||
godot_int GDAPI godot_pool_vector2_array_size(const godot_pool_vector2_array *p_self);
|
||||
|
||||
godot_bool GDAPI godot_pool_vector2_array_empty(const godot_pool_vector2_array *p_self);
|
||||
|
||||
void GDAPI godot_pool_vector2_array_destroy(godot_pool_vector2_array *p_self);
|
||||
|
||||
// vector3
|
||||
@@ -346,6 +356,8 @@ godot_vector3 GDAPI godot_pool_vector3_array_get(const godot_pool_vector3_array
|
||||
|
||||
godot_int GDAPI godot_pool_vector3_array_size(const godot_pool_vector3_array *p_self);
|
||||
|
||||
godot_bool GDAPI godot_pool_vector3_array_empty(const godot_pool_vector3_array *p_self);
|
||||
|
||||
void GDAPI godot_pool_vector3_array_destroy(godot_pool_vector3_array *p_self);
|
||||
|
||||
// color
|
||||
@@ -377,6 +389,8 @@ godot_color GDAPI godot_pool_color_array_get(const godot_pool_color_array *p_sel
|
||||
|
||||
godot_int GDAPI godot_pool_color_array_size(const godot_pool_color_array *p_self);
|
||||
|
||||
godot_bool GDAPI godot_pool_color_array_empty(const godot_pool_color_array *p_self);
|
||||
|
||||
void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_self);
|
||||
|
||||
//
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -102,6 +102,8 @@ godot_bool GDAPI godot_string_begins_with_char_array(const godot_string *p_self,
|
||||
godot_array GDAPI godot_string_bigrams(const godot_string *p_self);
|
||||
godot_string GDAPI godot_string_chr(wchar_t p_character);
|
||||
godot_bool GDAPI godot_string_ends_with(const godot_string *p_self, const godot_string *p_string);
|
||||
godot_int GDAPI godot_string_count(const godot_string *p_self, godot_string p_what, godot_int p_from, godot_int p_to);
|
||||
godot_int GDAPI godot_string_countn(const godot_string *p_self, godot_string p_what, godot_int p_from, godot_int p_to);
|
||||
godot_int GDAPI godot_string_find(const godot_string *p_self, godot_string p_what);
|
||||
godot_int GDAPI godot_string_find_from(const godot_string *p_self, godot_string p_what, godot_int p_from);
|
||||
godot_int GDAPI godot_string_findmk(const godot_string *p_self, const godot_array *p_keys);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -37,7 +37,7 @@ extern "C" {
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define GODOT_VARIANT_SIZE (16 + sizeof(void *))
|
||||
#define GODOT_VARIANT_SIZE (16 + sizeof(int64_t))
|
||||
|
||||
#ifndef GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
|
||||
#define GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -71,6 +71,8 @@ godot_real GDAPI godot_vector2_length_squared(const godot_vector2 *p_self);
|
||||
|
||||
godot_bool GDAPI godot_vector2_is_normalized(const godot_vector2 *p_self);
|
||||
|
||||
godot_vector2 GDAPI godot_vector2_direction_to(const godot_vector2 *p_self, const godot_vector2 *p_b);
|
||||
|
||||
godot_real GDAPI godot_vector2_distance_to(const godot_vector2 *p_self, const godot_vector2 *p_to);
|
||||
|
||||
godot_real GDAPI godot_vector2_distance_squared_to(const godot_vector2 *p_self, const godot_vector2 *p_to);
|
||||
@@ -83,6 +85,8 @@ godot_vector2 GDAPI godot_vector2_linear_interpolate(const godot_vector2 *p_self
|
||||
|
||||
godot_vector2 GDAPI godot_vector2_cubic_interpolate(const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_vector2 *p_pre_a, const godot_vector2 *p_post_b, const godot_real p_t);
|
||||
|
||||
godot_vector2 GDAPI godot_vector2_move_toward(const godot_vector2 *p_self, const godot_vector2 *p_to, const godot_real p_delta);
|
||||
|
||||
godot_vector2 GDAPI godot_vector2_rotated(const godot_vector2 *p_self, const godot_real p_phi);
|
||||
|
||||
godot_vector2 GDAPI godot_vector2_tangent(const godot_vector2 *p_self);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -90,6 +90,8 @@ godot_vector3 GDAPI godot_vector3_linear_interpolate(const godot_vector3 *p_self
|
||||
|
||||
godot_vector3 GDAPI godot_vector3_cubic_interpolate(const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_vector3 *p_pre_a, const godot_vector3 *p_post_b, const godot_real p_t);
|
||||
|
||||
godot_vector3 GDAPI godot_vector3_move_toward(const godot_vector3 *p_self, const godot_vector3 *p_to, const godot_real p_delta);
|
||||
|
||||
godot_real GDAPI godot_vector3_dot(const godot_vector3 *p_self, const godot_vector3 *p_b);
|
||||
|
||||
godot_vector3 GDAPI godot_vector3_cross(const godot_vector3 *p_self, const godot_vector3 *p_b);
|
||||
@@ -104,6 +106,8 @@ godot_vector3 GDAPI godot_vector3_floor(const godot_vector3 *p_self);
|
||||
|
||||
godot_vector3 GDAPI godot_vector3_ceil(const godot_vector3 *p_self);
|
||||
|
||||
godot_vector3 GDAPI godot_vector3_direction_to(const godot_vector3 *p_self, const godot_vector3 *p_b);
|
||||
|
||||
godot_real GDAPI godot_vector3_distance_to(const godot_vector3 *p_self, const godot_vector3 *p_b);
|
||||
|
||||
godot_real GDAPI godot_vector3_distance_squared_to(const godot_vector3 *p_self, const godot_vector3 *p_b);
|
||||
|
||||
@@ -11,7 +11,160 @@
|
||||
"major": 1,
|
||||
"minor": 1
|
||||
},
|
||||
"next": null,
|
||||
"next": {
|
||||
"type": "CORE",
|
||||
"version": {
|
||||
"major": 1,
|
||||
"minor": 2
|
||||
},
|
||||
"next": null,
|
||||
"api": [
|
||||
{
|
||||
"name": "godot_dictionary_duplicate",
|
||||
"return_type": "godot_dictionary",
|
||||
"arguments": [
|
||||
["const godot_dictionary *", "p_self"],
|
||||
["const godot_bool", "p_deep"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_vector3_move_toward",
|
||||
"return_type": "godot_vector3",
|
||||
"arguments": [
|
||||
["const godot_vector3 *", "p_self"],
|
||||
["const godot_vector3 *", "p_to"],
|
||||
["const godot_real", "p_delta"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_vector2_move_toward",
|
||||
"return_type": "godot_vector2",
|
||||
"arguments": [
|
||||
["const godot_vector2 *", "p_self"],
|
||||
["const godot_vector2 *", "p_to"],
|
||||
["const godot_real", "p_delta"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_string_count",
|
||||
"return_type": "godot_int",
|
||||
"arguments": [
|
||||
["const godot_string *", "p_self"],
|
||||
["godot_string", "p_what"],
|
||||
["godot_int", "p_from"],
|
||||
["godot_int", "p_to"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_string_countn",
|
||||
"return_type": "godot_int",
|
||||
"arguments": [
|
||||
["const godot_string *", "p_self"],
|
||||
["godot_string", "p_what"],
|
||||
["godot_int", "p_from"],
|
||||
["godot_int", "p_to"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_vector3_direction_to",
|
||||
"return_type": "godot_vector3",
|
||||
"arguments": [
|
||||
["const godot_vector3 *", "p_self"],
|
||||
["const godot_vector3 *", "p_to"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_vector2_direction_to",
|
||||
"return_type": "godot_vector2",
|
||||
"arguments": [
|
||||
["const godot_vector2 *", "p_self"],
|
||||
["const godot_vector2 *", "p_to"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_array_slice",
|
||||
"return_type": "godot_array",
|
||||
"arguments": [
|
||||
["const godot_array *", "p_self"],
|
||||
["const godot_int", "p_begin"],
|
||||
["const godot_int", "p_end"],
|
||||
["const godot_int", "p_step"],
|
||||
["const godot_bool", "p_deep"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_pool_byte_array_empty",
|
||||
"return_type": "godot_bool",
|
||||
"arguments": [
|
||||
["const godot_pool_byte_array *", "p_self"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_pool_int_array_empty",
|
||||
"return_type": "godot_bool",
|
||||
"arguments": [
|
||||
["const godot_pool_int_array *", "p_self"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_pool_real_array_empty",
|
||||
"return_type": "godot_bool",
|
||||
"arguments": [
|
||||
["const godot_pool_real_array *", "p_self"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_pool_string_array_empty",
|
||||
"return_type": "godot_bool",
|
||||
"arguments": [
|
||||
["const godot_pool_string_array *", "p_self"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_pool_vector2_array_empty",
|
||||
"return_type": "godot_bool",
|
||||
"arguments": [
|
||||
["const godot_pool_vector2_array *", "p_self"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_pool_vector3_array_empty",
|
||||
"return_type": "godot_bool",
|
||||
"arguments": [
|
||||
["const godot_pool_vector3_array *", "p_self"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_pool_color_array_empty",
|
||||
"return_type": "godot_bool",
|
||||
"arguments": [
|
||||
["const godot_pool_color_array *", "p_self"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_get_class_tag",
|
||||
"return_type": "void *",
|
||||
"arguments": [
|
||||
["const godot_string_name *", "p_class"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_object_cast_to",
|
||||
"return_type": "godot_object *",
|
||||
"arguments": [
|
||||
["const godot_object *", "p_object"],
|
||||
["void *", "p_class_tag"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_instance_from_id",
|
||||
"return_type": "godot_object *",
|
||||
"arguments": [
|
||||
["godot_int", "p_instance_id"]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"api": [
|
||||
{
|
||||
"name": "godot_color_to_abgr32",
|
||||
@@ -6269,7 +6422,7 @@
|
||||
"type": "ANDROID",
|
||||
"version": {
|
||||
"major": 1,
|
||||
"minor": 0
|
||||
"minor": 1
|
||||
},
|
||||
"next": null,
|
||||
"api": [
|
||||
@@ -6284,6 +6437,18 @@
|
||||
"return_type": "jobject",
|
||||
"arguments": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_android_get_surface",
|
||||
"return_type": "jobject",
|
||||
"arguments": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_android_is_activity_resumed",
|
||||
"return_type": "bool",
|
||||
"arguments": [
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -6427,30 +6592,62 @@
|
||||
"major": 3,
|
||||
"minor": 1
|
||||
},
|
||||
"next": null,
|
||||
"next": {
|
||||
"type": "NET",
|
||||
"version": {
|
||||
"major": 3,
|
||||
"minor": 2
|
||||
},
|
||||
"next": null,
|
||||
"api": [
|
||||
{
|
||||
"name": "godot_net_set_webrtc_library",
|
||||
"return_type": "godot_error",
|
||||
"arguments": [
|
||||
["const godot_net_webrtc_library *", "p_library"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_net_bind_webrtc_peer_connection",
|
||||
"return_type": "void",
|
||||
"arguments": [
|
||||
["godot_object *", "p_obj"],
|
||||
["const godot_net_webrtc_peer_connection *", "p_interface"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_net_bind_webrtc_data_channel",
|
||||
"return_type": "void",
|
||||
"arguments": [
|
||||
["godot_object *", "p_obj"],
|
||||
["const godot_net_webrtc_data_channel *", "p_interface"]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"api": [
|
||||
{
|
||||
"name": "godot_net_bind_stream_peer",
|
||||
"return_type": "void",
|
||||
"arguments": [
|
||||
["godot_object *", "p_obj"],
|
||||
["const godot_net_stream_peer *", "p_interface"]
|
||||
["godot_object *", "p_obj"],
|
||||
["const godot_net_stream_peer *", "p_interface"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_net_bind_packet_peer",
|
||||
"return_type": "void",
|
||||
"arguments": [
|
||||
["godot_object *", "p_obj"],
|
||||
["const godot_net_packet_peer *", "p_interface"]
|
||||
["godot_object *", "p_obj"],
|
||||
["const godot_net_packet_peer *", "p_interface"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_net_bind_multiplayer_peer",
|
||||
"return_type": "void",
|
||||
"arguments": [
|
||||
["godot_object *", "p_obj"],
|
||||
["const godot_net_multiplayer_peer *", "p_interface"]
|
||||
["godot_object *", "p_obj"],
|
||||
["const godot_net_multiplayer_peer *", "p_interface"]
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -101,6 +101,8 @@ typedef struct godot_gdnative_ext_android_api_struct {
|
||||
const godot_gdnative_api_struct *next;
|
||||
JNIEnv*(*godot_android_get_env)();
|
||||
jobject (*godot_android_get_activity)();
|
||||
jobject (*godot_android_get_surface)();
|
||||
bool (*godot_android_is_activity_resumed)();
|
||||
} godot_gdnative_ext_android_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_ext_arvr_api_struct {
|
||||
@@ -129,6 +131,15 @@ typedef struct godot_gdnative_ext_videodecoder_api_struct {
|
||||
void (*godot_videodecoder_register_decoder)(const godot_videodecoder_interface_gdnative *p_interface);
|
||||
} godot_gdnative_ext_videodecoder_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_ext_net_3_2_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
const godot_gdnative_api_struct *next;
|
||||
godot_error (*godot_net_set_webrtc_library)(const godot_net_webrtc_library *p_library);
|
||||
void (*godot_net_bind_webrtc_peer_connection)(godot_object *p_obj, const godot_net_webrtc_peer_connection *p_interface);
|
||||
void (*godot_net_bind_webrtc_data_channel)(godot_object *p_obj, const godot_net_webrtc_data_channel *p_interface);
|
||||
} godot_gdnative_ext_net_3_2_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_ext_net_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
@@ -138,6 +149,30 @@ typedef struct godot_gdnative_ext_net_api_struct {
|
||||
void (*godot_net_bind_multiplayer_peer)(godot_object *p_obj, const godot_net_multiplayer_peer *p_interface);
|
||||
} godot_gdnative_ext_net_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_core_1_2_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
const godot_gdnative_api_struct *next;
|
||||
godot_dictionary (*godot_dictionary_duplicate)(const godot_dictionary *p_self, const godot_bool p_deep);
|
||||
godot_vector3 (*godot_vector3_move_toward)(const godot_vector3 *p_self, const godot_vector3 *p_to, const godot_real p_delta);
|
||||
godot_vector2 (*godot_vector2_move_toward)(const godot_vector2 *p_self, const godot_vector2 *p_to, const godot_real p_delta);
|
||||
godot_int (*godot_string_count)(const godot_string *p_self, godot_string p_what, godot_int p_from, godot_int p_to);
|
||||
godot_int (*godot_string_countn)(const godot_string *p_self, godot_string p_what, godot_int p_from, godot_int p_to);
|
||||
godot_vector3 (*godot_vector3_direction_to)(const godot_vector3 *p_self, const godot_vector3 *p_to);
|
||||
godot_vector2 (*godot_vector2_direction_to)(const godot_vector2 *p_self, const godot_vector2 *p_to);
|
||||
godot_array (*godot_array_slice)(const godot_array *p_self, const godot_int p_begin, const godot_int p_end, const godot_int p_step, const godot_bool p_deep);
|
||||
godot_bool (*godot_pool_byte_array_empty)(const godot_pool_byte_array *p_self);
|
||||
godot_bool (*godot_pool_int_array_empty)(const godot_pool_int_array *p_self);
|
||||
godot_bool (*godot_pool_real_array_empty)(const godot_pool_real_array *p_self);
|
||||
godot_bool (*godot_pool_string_array_empty)(const godot_pool_string_array *p_self);
|
||||
godot_bool (*godot_pool_vector2_array_empty)(const godot_pool_vector2_array *p_self);
|
||||
godot_bool (*godot_pool_vector3_array_empty)(const godot_pool_vector3_array *p_self);
|
||||
godot_bool (*godot_pool_color_array_empty)(const godot_pool_color_array *p_self);
|
||||
void *(*godot_get_class_tag)(const godot_string_name *p_class);
|
||||
godot_object *(*godot_object_cast_to)(const godot_object *p_object, void *p_class_tag);
|
||||
godot_object *(*godot_instance_from_id)(godot_int p_instance_id);
|
||||
} godot_gdnative_core_1_2_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_core_1_1_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -56,7 +56,7 @@ typedef enum {
|
||||
GODOT_PROPERTY_HINT_ENUM, ///< hint_text= "val1,val2,val3,etc"
|
||||
GODOT_PROPERTY_HINT_EXP_EASING, /// exponential easing function (Math::ease)
|
||||
GODOT_PROPERTY_HINT_LENGTH, ///< hint_text= "length" (as integer)
|
||||
GODOT_PROPERTY_HINT_SPRITE_FRAME,
|
||||
GODOT_PROPERTY_HINT_SPRITE_FRAME, // FIXME: Obsolete: drop whenever we can break compat
|
||||
GODOT_PROPERTY_HINT_KEY_ACCEL, ///< hint_text= "length" (as integer)
|
||||
GODOT_PROPERTY_HINT_FLAGS, ///< hint_text= "flag1,flag2,etc" (as bit flags)
|
||||
GODOT_PROPERTY_HINT_LAYERS_2D_RENDER,
|
||||
@@ -64,9 +64,9 @@ typedef enum {
|
||||
GODOT_PROPERTY_HINT_LAYERS_3D_RENDER,
|
||||
GODOT_PROPERTY_HINT_LAYERS_3D_PHYSICS,
|
||||
GODOT_PROPERTY_HINT_FILE, ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,"
|
||||
GODOT_PROPERTY_HINT_DIR, ///< a directort path must be passed
|
||||
GODOT_PROPERTY_HINT_DIR, ///< a directory path must be passed
|
||||
GODOT_PROPERTY_HINT_GLOBAL_FILE, ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,"
|
||||
GODOT_PROPERTY_HINT_GLOBAL_DIR, ///< a directort path must be passed
|
||||
GODOT_PROPERTY_HINT_GLOBAL_DIR, ///< a directory path must be passed
|
||||
GODOT_PROPERTY_HINT_RESOURCE_TYPE, ///< a resource object type
|
||||
GODOT_PROPERTY_HINT_MULTILINE_TEXT, ///< used for string properties that can contain multiple lines
|
||||
GODOT_PROPERTY_HINT_PLACEHOLDER_TEXT, ///< used to set a placeholder text for string properties
|
||||
@@ -98,8 +98,8 @@ typedef enum {
|
||||
GODOT_PROPERTY_USAGE_INTERNATIONALIZED = 64, //hint for internationalized strings
|
||||
GODOT_PROPERTY_USAGE_GROUP = 128, //used for grouping props in the editor
|
||||
GODOT_PROPERTY_USAGE_CATEGORY = 256,
|
||||
GODOT_PROPERTY_USAGE_STORE_IF_NONZERO = 512, //only store if nonzero
|
||||
GODOT_PROPERTY_USAGE_STORE_IF_NONONE = 1024, //only store if false
|
||||
GODOT_PROPERTY_USAGE_STORE_IF_NONZERO = 512, // FIXME: Obsolete: drop whenever we can break compat
|
||||
GODOT_PROPERTY_USAGE_STORE_IF_NONONE = 1024, // FIXME: Obsolete: drop whenever we can break compat
|
||||
GODOT_PROPERTY_USAGE_NO_INSTANCE_STATE = 2048,
|
||||
GODOT_PROPERTY_USAGE_RESTART_IF_CHANGED = 4096,
|
||||
GODOT_PROPERTY_USAGE_SCRIPT_VARIABLE = 8192,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -115,4 +115,7 @@ void GDAPI godot_net_bind_multiplayer_peer(godot_object *p_obj, const godot_net_
|
||||
}
|
||||
#endif
|
||||
|
||||
// WebRTC Bindings
|
||||
#include "net/godot_webrtc.h"
|
||||
|
||||
#endif /* GODOT_NATIVENET_H */
|
||||
|
||||
122
net/godot_webrtc.h
Normal file
122
net/godot_webrtc.h
Normal file
@@ -0,0 +1,122 @@
|
||||
/*************************************************************************/
|
||||
/* godot_webrtc.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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_NATIVEWEBRTC_H
|
||||
#define GODOT_NATIVEWEBRTC_H
|
||||
|
||||
#include <gdnative/gdnative.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GODOT_NET_WEBRTC_API_MAJOR 3
|
||||
#define GODOT_NET_WEBRTC_API_MINOR 2
|
||||
|
||||
/* Library Interface (used to set default GDNative WebRTC implementation */
|
||||
typedef struct {
|
||||
godot_gdnative_api_version version; /* version of our API */
|
||||
|
||||
/* Called when the library is unset as default interface via godot_net_set_webrtc_library */
|
||||
void (*unregistered)();
|
||||
|
||||
/* Used by WebRTCPeerConnection create when GDNative is the default implementation. */
|
||||
/* Takes a pointer to WebRTCPeerConnectionGDNative, should bind and return OK, failure if binding was unsuccessful. */
|
||||
godot_error (*create_peer_connection)(godot_object *);
|
||||
|
||||
void *next; /* For extension */
|
||||
} godot_net_webrtc_library;
|
||||
|
||||
/* WebRTCPeerConnection interface */
|
||||
typedef struct {
|
||||
godot_gdnative_api_version version; /* version of our API */
|
||||
|
||||
godot_object *data; /* User reference */
|
||||
|
||||
/* This is WebRTCPeerConnection */
|
||||
godot_int (*get_connection_state)(const void *);
|
||||
|
||||
godot_error (*initialize)(void *, const godot_dictionary *);
|
||||
godot_object *(*create_data_channel)(void *, const char *p_channel_name, const godot_dictionary *);
|
||||
godot_error (*create_offer)(void *);
|
||||
godot_error (*create_answer)(void *); /* unused for now, should be done automatically on set_local_description */
|
||||
godot_error (*set_remote_description)(void *, const char *, const char *);
|
||||
godot_error (*set_local_description)(void *, const char *, const char *);
|
||||
godot_error (*add_ice_candidate)(void *, const char *, int, const char *);
|
||||
godot_error (*poll)(void *);
|
||||
void (*close)(void *);
|
||||
|
||||
void *next; /* For extension? */
|
||||
} godot_net_webrtc_peer_connection;
|
||||
|
||||
/* WebRTCDataChannel interface */
|
||||
typedef struct {
|
||||
godot_gdnative_api_version version; /* version of our API */
|
||||
|
||||
godot_object *data; /* User reference */
|
||||
|
||||
/* This is PacketPeer */
|
||||
godot_error (*get_packet)(void *, const uint8_t **, int *);
|
||||
godot_error (*put_packet)(void *, const uint8_t *, int);
|
||||
godot_int (*get_available_packet_count)(const void *);
|
||||
godot_int (*get_max_packet_size)(const void *);
|
||||
|
||||
/* This is WebRTCDataChannel */
|
||||
void (*set_write_mode)(void *, godot_int);
|
||||
godot_int (*get_write_mode)(const void *);
|
||||
bool (*was_string_packet)(const void *);
|
||||
|
||||
godot_int (*get_ready_state)(const void *);
|
||||
const char *(*get_label)(const void *);
|
||||
bool (*is_ordered)(const void *);
|
||||
int (*get_id)(const void *);
|
||||
int (*get_max_packet_life_time)(const void *);
|
||||
int (*get_max_retransmits)(const void *);
|
||||
const char *(*get_protocol)(const void *);
|
||||
bool (*is_negotiated)(const void *);
|
||||
|
||||
godot_error (*poll)(void *);
|
||||
void (*close)(void *);
|
||||
|
||||
void *next; /* For extension? */
|
||||
} godot_net_webrtc_data_channel;
|
||||
|
||||
/* Set the default GDNative library */
|
||||
godot_error GDAPI godot_net_set_webrtc_library(const godot_net_webrtc_library *);
|
||||
/* Binds a WebRTCPeerConnectionGDNative to the provided interface */
|
||||
void GDAPI godot_net_bind_webrtc_peer_connection(godot_object *p_obj, const godot_net_webrtc_peer_connection *);
|
||||
/* Binds a WebRTCDataChannelGDNative to the provided interface */
|
||||
void GDAPI godot_net_bind_webrtc_data_channel(godot_object *p_obj, const godot_net_webrtc_data_channel *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
@@ -136,7 +136,7 @@ typedef struct {
|
||||
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);
|
||||
int (*find_function)(godot_pluginscript_language_data *p_data, const godot_string *p_function, const godot_string *p_code); // Can be NULL
|
||||
godot_string (*make_function)(godot_pluginscript_language_data *p_data, const godot_string *p_class, const godot_string *p_name, const godot_pool_string_array *p_args);
|
||||
godot_error (*complete_code)(godot_pluginscript_language_data *p_data, const godot_string *p_code, const godot_string *p_base_path, godot_object *p_owner, godot_array *r_options, godot_bool *r_force, godot_string *r_call_hint);
|
||||
godot_error (*complete_code)(godot_pluginscript_language_data *p_data, const godot_string *p_code, const godot_string *p_path, godot_object *p_owner, godot_array *r_options, godot_bool *r_force, godot_string *r_call_hint);
|
||||
void (*auto_indent_code)(godot_pluginscript_language_data *p_data, godot_string *p_code, int p_from_line, int p_to_line);
|
||||
|
||||
void (*add_global_constant)(godot_pluginscript_language_data *p_data, const godot_string *p_variable, const godot_variant *p_value);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 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 */
|
||||
|
||||
Reference in New Issue
Block a user