Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c21389bcf | ||
|
|
88e71f3c02 |
13
.gitattributes
vendored
@@ -1,13 +0,0 @@
|
||||
# Properly detect languages on Github
|
||||
*.h linguist-language=c
|
||||
*.inc linguist-language=c
|
||||
drivers/* linguist-vendored
|
||||
|
||||
*.c eol=lf
|
||||
*.cpp eol=lf
|
||||
*.mm eol=lf
|
||||
*.h eol=lf
|
||||
*.py eol=lf
|
||||
*.hpp eol=lf
|
||||
*.xml eol=lf
|
||||
*.json eol=lf
|
||||
@@ -1,6 +1,6 @@
|
||||
# MIT License
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-2022 Godot Engine contributors.
|
||||
Copyright (c) 2017 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
|
||||
189
README.md
@@ -1,59 +1,26 @@
|
||||
# godot-headers
|
||||
# godot_headers
|
||||
#### `GDNative / NativeScript`
|
||||
|
||||
This repository contains C headers for
|
||||
[**Godot Engine**](https://github.com/godotengine/godot)'s *GDNative* API,
|
||||
which can be used to write *NativeScripts*.
|
||||
|
||||
> `GDNative` enables the use of dynamically linked libraries inside of
|
||||
> [**Godot**](https://github.com/godotengine/godot).
|
||||
> `GDNative` enables the use of dynamically linked libraries inside of [**Godot**](https://github.com/godotengine/godot).
|
||||
|
||||
> `NativeScript` uses GDNative to implement scripts backed by native code.
|
||||
|
||||
- [**Versioning**](#versioning)
|
||||
- [**Getting Started**](#getting-started)
|
||||
- [**FAQ**](#faq)
|
||||
- [**Updating Headers**](#updating-headers)
|
||||
|
||||
## Versioning
|
||||
|
||||
This repositories follows the same branch versioning as the main [Godot Engine
|
||||
repository](https://github.com/godotengine/godot):
|
||||
|
||||
- `master` tracks the current development branch. As this is a moving target,
|
||||
the headers in this repository may not always be fully in sync with upstream.
|
||||
See [**Updating Headers**](#updating-headers) if you need to bring
|
||||
them up to date.
|
||||
- `3.x` tracks the development of the next 3.x minor release. Like `master`, it
|
||||
might not always be fully up-to-date with upstream.
|
||||
- Other versioned branches (e.g. `3.3`, `3.2`) track the latest stable release
|
||||
in the corresponding branch.
|
||||
|
||||
Stable releases are also tagged on this repository:
|
||||
[**Tags**](https://github.com/godotengine/godot-headers/tags).
|
||||
|
||||
**For any project built against a stable release of Godot, we recommend using
|
||||
this repository as a Git submodule, checking out the specific tag matching your
|
||||
Godot version.**
|
||||
- [**Getting Started**](#getting-started)
|
||||
- [**FAQ**](#faq)
|
||||
|
||||
## Getting Started
|
||||
|
||||
| **Build latest version of Godot** | [**GitHub**](https://github.com/godotengine/godot) | [**Docs**](https://docs.godotengine.org/en/latest/development/compiling/index.html) |
|
||||
| **Build latest version of Godot** | [**GitHub**](https://github.com/godotengine/godot) | [**Docs**](https://godot.readthedocs.io/en/latest/development/compiling/index.html) |
|
||||
| --- | --- | --- |
|
||||
|
||||
### Clone `godot-headers` into Library
|
||||
### Clone godot_headers into Library
|
||||
|
||||
Clone `godot-headers` under `SimpleLibrary/`
|
||||
Clone `godot_headers` under `SimpleLibrary/`
|
||||
|
||||
```bash
|
||||
cd SimpleLibrary
|
||||
git clone https://github.com/godotengine/godot-headers
|
||||
git clone https://github.com/GodotNativeTools/godot_headers
|
||||
```
|
||||
|
||||
Note that the master branch of this repository contains the headers for the
|
||||
latest Godot `master` branch. See [**Versioning**](#versioning) for details.
|
||||
You can use `-b <version>` to the above Git clone command to retrieve a specific
|
||||
branch or tag (e.g. `-b 3.x` or `-b godot-3.3.3-stable`).
|
||||
|
||||
```bash
|
||||
[SimpleLibrary]
|
||||
├── lib/
|
||||
@@ -62,7 +29,7 @@ branch or tag (e.g. `-b 3.x` or `-b godot-3.3.3-stable`).
|
||||
|
||||
### Create Script
|
||||
|
||||
Create `test.c` under `SimpleLibrary/src/`.
|
||||
Create `test.c` under `SimpleLibrary/src/`
|
||||
|
||||
<details>
|
||||
|
||||
@@ -73,22 +40,22 @@ Create `test.c` under `SimpleLibrary/src/`.
|
||||
#include <stdio.h>
|
||||
|
||||
void *test_constructor(godot_object *obj, void *method_data) {
|
||||
printf("test.constructor()\n");
|
||||
return 0;
|
||||
printf("test.constructor()\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void test_destructor(godot_object *obj, void *method_data, void *user_data) {
|
||||
printf("test.destructor()\n");
|
||||
printf("test.destructor()\n");
|
||||
}
|
||||
|
||||
/** func _ready() **/
|
||||
godot_variant test_ready(godot_object *obj, void *method_data, void *user_data, int num_args, godot_variant **args) {
|
||||
godot_variant ret;
|
||||
godot_variant_new_nil(&ret);
|
||||
godot_variant ret;
|
||||
godot_variant_new_nil(&ret);
|
||||
|
||||
printf("_ready()\n");
|
||||
printf("_ready()\n");
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** Library entry point **/
|
||||
@@ -105,64 +72,64 @@ void GDN_EXPORT godot_nativescript_init(void *desc) {
|
||||
|
||||
godot_instance_create_func create_func = {
|
||||
.create_func = &test_constructor,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
|
||||
godot_instance_destroy_func destroy_func = {
|
||||
.destroy_func = &test_destructor,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
godot_instance_destroy_func destroy_func = {
|
||||
.destroy_func = &test_destructor,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
|
||||
godot_nativescript_register_class(desc, "SimpleClass", "Node", create_func, destroy_func);
|
||||
godot_nativescript_register_class(desc, "SimpleClass", "Node", create_func, destroy_func);
|
||||
|
||||
{
|
||||
godot_instance_method method = {
|
||||
.method = &test_ready,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
{
|
||||
godot_instance_method method = {
|
||||
.method = &test_ready,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
|
||||
godot_method_attributes attr = {
|
||||
.rpc_type = GODOT_METHOD_RPC_MODE_DISABLED
|
||||
};
|
||||
godot_method_attributes attr = {
|
||||
.rpc_type = GODOT_METHOD_RPC_MODE_DISABLED
|
||||
};
|
||||
|
||||
godot_nativescript_register_method(desc, "SimpleClass", "_ready", attr, method);
|
||||
}
|
||||
godot_nativescript_register_method(desc, "SimpleClass", "_ready", attr, method);
|
||||
}
|
||||
}
|
||||
|
||||
godot_variant GDN_EXPORT some_test_procedure(void *data, godot_array *args) {
|
||||
godot_variant ret;
|
||||
godot_variant_new_int(&ret, 42);
|
||||
godot_variant ret;
|
||||
godot_variant_new_int(&ret, 42);
|
||||
|
||||
godot_string s;
|
||||
godot_string_new_with_wide_string(&s, L"Hello World", 11);
|
||||
godot_print(&s);
|
||||
godot_string s;
|
||||
godot_string_new_unicode_data(&s, L"Hello World", 11);
|
||||
godot_print(&s);
|
||||
|
||||
godot_string_destroy(&s);
|
||||
godot_string_destroy(&s);
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Expand *Details* for example code.
|
||||
`Expand details for example code.`
|
||||
|
||||
### Compile Library
|
||||
|
||||
On Linux:
|
||||
|
||||
```bash
|
||||
clang -g -fPIC -c src/test.c -I/path/to/godot/headers/ -o src/test.os
|
||||
clang -g -fPIC -std=c99 -c src/test.c -I/path/to/godot/headers/ -o src/test.os
|
||||
clang -g -shared src/test.os -o lib/test.so
|
||||
```
|
||||
|
||||
On MacOS:
|
||||
|
||||
```bash
|
||||
clang -g -fPIC -c src/test.c -I/path/to/godot/headers/ -o src/test.os
|
||||
clang -g -fPIC -std=c99 -c src/test.c -I/path/to/godot/headers/ -o src/test.os
|
||||
clang -g -shared -framework Cocoa -Wl,-undefined,dynamic_lookup src/test.os -o lib/test.dylib
|
||||
```
|
||||
|
||||
@@ -173,9 +140,9 @@ clang -g -shared -framework Cocoa -Wl,-undefined,dynamic_lookup src/test.os -o l
|
||||
The GDNativeLibrary resource contains links to the libraries for each platform.
|
||||
|
||||
1. Create a new resource in memory and edit it.
|
||||
2. Select `Resource > GDNativeLibrary`.
|
||||
3. Set the library file for your platform inside the inspector.
|
||||
4. Save the edited resource as a `.tres`
|
||||
1. Select `Resource > GDNativeLibrary`.
|
||||
1. Set the library file for your platform inside the inspector.
|
||||
1. Save the edited resource as a `.tres`
|
||||
|
||||
<details>
|
||||
|
||||
@@ -189,7 +156,7 @@ The GDNativeLibrary resource contains links to the libraries for each platform.
|
||||
|
||||
</details>
|
||||
|
||||
Expand *Details* for screenshots.
|
||||
`Expand details for screenshots.`
|
||||
|
||||
### Using GDNativeLibrary in GDScript
|
||||
|
||||
@@ -197,25 +164,25 @@ Expand *Details* for screenshots.
|
||||
extends Node
|
||||
|
||||
func _ready():
|
||||
var gdn = GDNative.new()
|
||||
gdn.library = load("res://lib/libtest.tres")
|
||||
var gdn = GDNative.new()
|
||||
gdn.library = load("res://lib/libtest.tres")
|
||||
|
||||
gdn.initialize()
|
||||
gdn.initialize()
|
||||
|
||||
var res = gdn.call_native("standard_varcall", "some_test_procedure", [])
|
||||
var res = gdn.call_native("standard_varcall", "some_test_procedure", [])
|
||||
|
||||
print("result: ", res)
|
||||
print("result: ", res)
|
||||
|
||||
gdn.terminate()
|
||||
gdn.terminate()
|
||||
```
|
||||
|
||||
### Attaching GDNativeLibrary to a Node
|
||||
|
||||
1. Attach a new script to a node.
|
||||
2. In the pop-up dialog, choose NativeScript in the `Language` menu.
|
||||
3. Enable built-in script, or create a `.gdn` file, which only contains a name.
|
||||
4. Specify the `Class Name`.
|
||||
5. Press `Create`.
|
||||
1. In the pop-up dialog, choose NativeScript in the `Language` menu.
|
||||
1. Enable built-in script, or create a `.gdn` file, which only contains a name.
|
||||
1. Specify the `Class Name`.
|
||||
1. Press `Create`.
|
||||
|
||||
The GDNativeLibrary field in a NativeScript is empty by default.
|
||||
|
||||
@@ -228,7 +195,7 @@ The GDNativeLibrary field in a NativeScript is empty by default.
|
||||
|
||||
</details>
|
||||
|
||||
Expand *Details* for screenshots.
|
||||
`Expand details for screenshots.`
|
||||
|
||||
## FAQ
|
||||
|
||||
@@ -242,8 +209,8 @@ use of GDNative to implement scripts backed by native code.
|
||||
|
||||
**Which languages are binding as a NativeScript?**
|
||||
|
||||
[**C++**](https://github.com/godotengine/godot-cpp),
|
||||
[**D**](https://github.com/godot-d/godot-d),
|
||||
[**C++**](https://github.com/GodotNativeTools/cpp_bindings),
|
||||
[**D**](https://github.com/GodotNativeTools/d_bindings),
|
||||
[**Nim**](https://github.com/pragmagic/godot-nim)
|
||||
|
||||
**Can you debug NativeScripts?**
|
||||
@@ -251,6 +218,10 @@ 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! ✨
|
||||
@@ -258,25 +229,5 @@ You can! ✨
|
||||
**What is the reason behind the name "GDNative"?**
|
||||
|
||||
GDNative was originally named "cscript" because it exposes a C API, but people
|
||||
mistook a relation to C#, which is sometimes abbreviated as "cs". Then named
|
||||
"DLScript", but that brought up some confusion, so we settled with GDNative. 📖
|
||||
|
||||
## Updating Headers
|
||||
|
||||
See [**Versioning**](#versioning) for details on the Godot versions tracked by
|
||||
each branch of this repository.
|
||||
|
||||
If the relevant branch is not up-to-date for your needs, or if you want to sync
|
||||
the headers with your own modified version of Godot, here is the update
|
||||
procedure used to sync this repository with upstream releases:
|
||||
|
||||
- Compile [Godot Engine](https://github.com/godotengine/godot) at the specific
|
||||
version/commit which you are using.
|
||||
- Use the compiled executable to generate the `api.json` file with:
|
||||
`godot --gdnative-generate-json-api api.json`
|
||||
- Copy the file `modules/gdnative/gdnative_api.json` to this repository.
|
||||
- Copy the files and folders from `modules/gdnative/include` to this repository,
|
||||
overwriting existing content. (To be sure to be in sync, you can delete the
|
||||
folders of this repository first, then copy the upstream folders in place.)
|
||||
Make sure that you compiled the correct Godot version so that the generated
|
||||
`gdnative_api_struct.gen.h` is up-to-date.
|
||||
mistook a relation to C#, which is sometimes abbreviated as "cs". Then named "DLScript", but that brought up some confusion, so we settled with
|
||||
GDNative. 📖
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
/*************************************************************************/
|
||||
/* godot_android.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 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_ANDROID_H
|
||||
#define GODOT_ANDROID_H
|
||||
|
||||
#include <gdnative/gdnative.h>
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <jni.h>
|
||||
#else
|
||||
#define JNIEnv void
|
||||
#define jobject void *
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
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
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GODOT_ANDROID_H
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GODOT_ARVR_H
|
||||
#define GODOT_ARVR_H
|
||||
#ifndef GODOT_NATIVEARVR_H
|
||||
#define GODOT_NATIVEARVR_H
|
||||
|
||||
#include <gdnative/gdnative.h>
|
||||
|
||||
@@ -37,15 +37,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// For future versions of the API we should only add new functions at the end of the structure and use the
|
||||
// version info to detect whether a call is available
|
||||
|
||||
// Use these to populate version in your plugin
|
||||
#define GODOTVR_API_MAJOR 1
|
||||
#define GODOTVR_API_MINOR 2
|
||||
|
||||
typedef struct {
|
||||
godot_gdnative_api_version version; /* version of our API */
|
||||
void *(*constructor)(godot_object *);
|
||||
void (*destructor)(void *);
|
||||
godot_string (*get_name)(const void *);
|
||||
@@ -61,12 +53,6 @@ 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 *);
|
||||
// only in 1.2 onwards
|
||||
godot_int (*get_external_depth_for_eye)(void *, godot_int);
|
||||
} godot_arvr_interface_gdnative;
|
||||
|
||||
void GDAPI godot_arvr_register_interface(const godot_arvr_interface_gdnative *p_interface);
|
||||
@@ -87,12 +73,8 @@ void GDAPI godot_arvr_set_controller_button(godot_int p_controller_id, godot_int
|
||||
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);
|
||||
|
||||
// ARVR 1.2 functions
|
||||
void GDAPI godot_arvr_set_interface(godot_object *p_arvr_interface, const godot_arvr_interface_gdnative *p_gdn_interface);
|
||||
godot_int GDAPI godot_arvr_get_depthid(godot_rid *p_render_target);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GODOT_ARVR_H
|
||||
#endif /* !GODOT_NATIVEARVR_H */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_AABB_H
|
||||
#define GDNATIVE_AABB_H
|
||||
#ifndef GODOT_AABB_H
|
||||
#define GODOT_AABB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -115,4 +115,4 @@ godot_bool GDAPI godot_aabb_operator_equal(const godot_aabb *p_self, const godot
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_AABB_H
|
||||
#endif // GODOT_AABB_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_ARRAY_H
|
||||
#define GDNATIVE_ARRAY_H
|
||||
#ifndef GODOT_ARRAY_H
|
||||
#define GODOT_ARRAY_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -130,18 +130,8 @@ godot_int GDAPI godot_array_bsearch_custom(godot_array *p_self, const godot_vari
|
||||
|
||||
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);
|
||||
|
||||
void GDAPI godot_array_shuffle(godot_array *p_self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_ARRAY_H
|
||||
#endif // GODOT_ARRAY_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_BASIS_H
|
||||
#define GDNATIVE_BASIS_H
|
||||
#ifndef GODOT_BASIS_H
|
||||
#define GODOT_BASIS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -62,7 +62,6 @@ extern "C" {
|
||||
void GDAPI godot_basis_new_with_rows(godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis);
|
||||
void GDAPI godot_basis_new_with_axis_and_angle(godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi);
|
||||
void GDAPI godot_basis_new_with_euler(godot_basis *r_dest, const godot_vector3 *p_euler);
|
||||
void GDAPI godot_basis_new_with_euler_quat(godot_basis *r_dest, const godot_quat *p_euler);
|
||||
|
||||
godot_string GDAPI godot_basis_as_string(const godot_basis *p_self);
|
||||
|
||||
@@ -82,16 +81,6 @@ godot_vector3 GDAPI godot_basis_get_scale(const godot_basis *p_self);
|
||||
|
||||
godot_vector3 GDAPI godot_basis_get_euler(const godot_basis *p_self);
|
||||
|
||||
godot_quat GDAPI godot_basis_get_quat(const godot_basis *p_self);
|
||||
|
||||
void GDAPI godot_basis_set_quat(godot_basis *p_self, const godot_quat *p_quat);
|
||||
|
||||
void GDAPI godot_basis_set_axis_angle_scale(godot_basis *p_self, const godot_vector3 *p_axis, godot_real p_phi, const godot_vector3 *p_scale);
|
||||
|
||||
void GDAPI godot_basis_set_euler_scale(godot_basis *p_self, const godot_vector3 *p_euler, const godot_vector3 *p_scale);
|
||||
|
||||
void GDAPI godot_basis_set_quat_scale(godot_basis *p_self, const godot_quat *p_quat, const godot_vector3 *p_scale);
|
||||
|
||||
godot_real GDAPI godot_basis_tdotx(const godot_basis *p_self, const godot_vector3 *p_with);
|
||||
|
||||
godot_real GDAPI godot_basis_tdoty(const godot_basis *p_self, const godot_vector3 *p_with);
|
||||
@@ -106,6 +95,8 @@ godot_int GDAPI godot_basis_get_orthogonal_index(const godot_basis *p_self);
|
||||
|
||||
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(const godot_basis *p_self, godot_vector3 *p_elements);
|
||||
|
||||
@@ -127,10 +118,8 @@ godot_basis GDAPI godot_basis_operator_multiply_vector(const godot_basis *p_self
|
||||
|
||||
godot_basis GDAPI godot_basis_operator_multiply_scalar(const godot_basis *p_self, const godot_real p_b);
|
||||
|
||||
godot_basis GDAPI godot_basis_slerp(const godot_basis *p_self, const godot_basis *p_b, const godot_real p_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_BASIS_H
|
||||
#endif // GODOT_BASIS_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_COLOR_H
|
||||
#define GDNATIVE_COLOR_H
|
||||
#ifndef GODOT_COLOR_H
|
||||
#define GODOT_COLOR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -81,14 +81,6 @@ godot_string GDAPI godot_color_as_string(const godot_color *p_self);
|
||||
|
||||
godot_int GDAPI godot_color_to_rgba32(const godot_color *p_self);
|
||||
|
||||
godot_int GDAPI godot_color_to_abgr32(const godot_color *p_self);
|
||||
|
||||
godot_int GDAPI godot_color_to_abgr64(const godot_color *p_self);
|
||||
|
||||
godot_int GDAPI godot_color_to_argb64(const godot_color *p_self);
|
||||
|
||||
godot_int GDAPI godot_color_to_rgba64(const godot_color *p_self);
|
||||
|
||||
godot_int GDAPI godot_color_to_argb32(const godot_color *p_self);
|
||||
|
||||
godot_real GDAPI godot_color_gray(const godot_color *p_self);
|
||||
@@ -101,12 +93,6 @@ godot_color GDAPI godot_color_linear_interpolate(const godot_color *p_self, cons
|
||||
|
||||
godot_color GDAPI godot_color_blend(const godot_color *p_self, const godot_color *p_over);
|
||||
|
||||
godot_color GDAPI godot_color_darkened(const godot_color *p_self, const godot_real p_amount);
|
||||
|
||||
godot_color GDAPI godot_color_from_hsv(const godot_color *p_self, const godot_real p_h, const godot_real p_s, const godot_real p_v, const godot_real p_a);
|
||||
|
||||
godot_color GDAPI godot_color_lightened(const godot_color *p_self, const godot_real p_amount);
|
||||
|
||||
godot_string GDAPI godot_color_to_html(const godot_color *p_self, const godot_bool p_with_alpha);
|
||||
|
||||
godot_bool GDAPI godot_color_operator_equal(const godot_color *p_self, const godot_color *p_b);
|
||||
@@ -117,4 +103,4 @@ godot_bool GDAPI godot_color_operator_less(const godot_color *p_self, const godo
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_COLOR_H
|
||||
#endif // GODOT_COLOR_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_DICTIONARY_H
|
||||
#define GDNATIVE_DICTIONARY_H
|
||||
#ifndef GODOT_DICTIONARY_H
|
||||
#define GODOT_DICTIONARY_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -63,8 +63,6 @@ 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);
|
||||
@@ -96,18 +94,8 @@ godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self,
|
||||
|
||||
godot_string GDAPI godot_dictionary_to_json(const godot_dictionary *p_self);
|
||||
|
||||
// GDNative core 1.1
|
||||
|
||||
godot_bool GDAPI godot_dictionary_erase_with_return(godot_dictionary *p_self, const godot_variant *p_key);
|
||||
|
||||
godot_variant GDAPI godot_dictionary_get_with_default(const godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_default);
|
||||
|
||||
// GDNative core 1.3
|
||||
|
||||
void GDAPI godot_dictionary_merge(godot_dictionary *p_self, const godot_dictionary *p_dictionary, const godot_bool p_overwrite);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_DICTIONARY_H
|
||||
#endif // GODOT_DICTIONARY_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,14 +28,14 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_GDNATIVE_H
|
||||
#define GDNATIVE_GDNATIVE_H
|
||||
#ifndef GODOT_GDNATIVE_H
|
||||
#define GODOT_GDNATIVE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__ANDROID__)
|
||||
#ifdef _WIN32
|
||||
#define GDCALLINGCONV
|
||||
#define GDAPI GDCALLINGCONV
|
||||
#elif defined(__APPLE__)
|
||||
@@ -47,21 +47,17 @@ extern "C" {
|
||||
#define GDCALLINGCONV __attribute__((sysv_abi))
|
||||
#define GDAPI GDCALLINGCONV
|
||||
#endif
|
||||
#else // !_WIN32 && !__APPLE__
|
||||
#else
|
||||
#define GDCALLINGCONV __attribute__((sysv_abi))
|
||||
#define GDAPI GDCALLINGCONV
|
||||
#endif
|
||||
|
||||
// This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!!
|
||||
#if !defined(GDN_EXPORT)
|
||||
#if defined(_WIN32)
|
||||
#ifdef _WIN32
|
||||
#define GDN_EXPORT __declspec(dllexport)
|
||||
#elif defined(__GNUC__)
|
||||
#define GDN_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define GDN_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@@ -71,7 +67,7 @@ extern "C" {
|
||||
////// Error
|
||||
|
||||
typedef enum {
|
||||
GODOT_OK, // (0)
|
||||
GODOT_OK,
|
||||
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
|
||||
@@ -101,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,19 +282,8 @@ void GDAPI godot_print_error(const char *p_description, const char *p_function,
|
||||
void GDAPI godot_print_warning(const char *p_description, const char *p_function, const char *p_file, int p_line);
|
||||
void GDAPI godot_print(const godot_string *p_message);
|
||||
|
||||
// GDNATIVE CORE 1.0.1
|
||||
|
||||
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
|
||||
|
||||
#endif // GDNATIVE_GDNATIVE_H
|
||||
#endif // GODOT_C_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_NODE_PATH_H
|
||||
#define GDNATIVE_NODE_PATH_H
|
||||
#ifndef GODOT_NODE_PATH_H
|
||||
#define GODOT_NODE_PATH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -80,10 +80,8 @@ godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_self);
|
||||
|
||||
godot_bool GDAPI godot_node_path_operator_equal(const godot_node_path *p_self, const godot_node_path *p_b);
|
||||
|
||||
godot_node_path godot_node_path_get_as_property_path(const godot_node_path *p_self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_NODE_PATH_H
|
||||
#endif // GODOT_NODE_PATH_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_PLANE_H
|
||||
#define GDNATIVE_PLANE_H
|
||||
#ifndef GODOT_PLANE_H
|
||||
#define GODOT_PLANE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -100,4 +100,4 @@ void GDAPI godot_plane_set_d(godot_plane *p_self, const godot_real p_d);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_PLANE_H
|
||||
#endif // GODOT_PLANE_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_POOL_ARRAYS_H
|
||||
#define GDNATIVE_POOL_ARRAYS_H
|
||||
#ifndef GODOT_POOL_ARRAYS_H
|
||||
#define GODOT_POOL_ARRAYS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -182,8 +182,6 @@ 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);
|
||||
|
||||
void GDAPI godot_pool_byte_array_sort(godot_pool_byte_array *p_self);
|
||||
|
||||
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);
|
||||
@@ -193,10 +191,6 @@ 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);
|
||||
|
||||
godot_bool GDAPI godot_pool_byte_array_has(const godot_pool_byte_array *p_self, const uint8_t p_data);
|
||||
|
||||
void GDAPI godot_pool_byte_array_destroy(godot_pool_byte_array *p_self);
|
||||
|
||||
// int
|
||||
@@ -219,8 +213,6 @@ 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);
|
||||
|
||||
void GDAPI godot_pool_int_array_sort(godot_pool_int_array *p_self);
|
||||
|
||||
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);
|
||||
@@ -230,10 +222,6 @@ 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);
|
||||
|
||||
godot_bool GDAPI godot_pool_int_array_has(const godot_pool_int_array *p_self, const godot_int p_data);
|
||||
|
||||
void GDAPI godot_pool_int_array_destroy(godot_pool_int_array *p_self);
|
||||
|
||||
// real
|
||||
@@ -256,8 +244,6 @@ 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);
|
||||
|
||||
void GDAPI godot_pool_real_array_sort(godot_pool_real_array *p_self);
|
||||
|
||||
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);
|
||||
@@ -267,10 +253,6 @@ 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);
|
||||
|
||||
godot_bool GDAPI godot_pool_real_array_has(const godot_pool_real_array *p_self, const godot_real p_data);
|
||||
|
||||
void GDAPI godot_pool_real_array_destroy(godot_pool_real_array *p_self);
|
||||
|
||||
// string
|
||||
@@ -287,16 +269,12 @@ godot_error GDAPI godot_pool_string_array_insert(godot_pool_string_array *p_self
|
||||
|
||||
void GDAPI godot_pool_string_array_invert(godot_pool_string_array *p_self);
|
||||
|
||||
godot_string GDAPI godot_pool_string_array_join(const godot_pool_string_array *p_self, const godot_string *p_delimiter);
|
||||
|
||||
void GDAPI godot_pool_string_array_push_back(godot_pool_string_array *p_self, const godot_string *p_data);
|
||||
|
||||
void GDAPI godot_pool_string_array_remove(godot_pool_string_array *p_self, const godot_int p_idx);
|
||||
|
||||
void GDAPI godot_pool_string_array_resize(godot_pool_string_array *p_self, const godot_int p_size);
|
||||
|
||||
void GDAPI godot_pool_string_array_sort(godot_pool_string_array *p_self);
|
||||
|
||||
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);
|
||||
@@ -306,10 +284,6 @@ 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);
|
||||
|
||||
godot_bool GDAPI godot_pool_string_array_has(const godot_pool_string_array *p_self, const godot_string *p_data);
|
||||
|
||||
void GDAPI godot_pool_string_array_destroy(godot_pool_string_array *p_self);
|
||||
|
||||
// vector2
|
||||
@@ -332,8 +306,6 @@ 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);
|
||||
|
||||
void GDAPI godot_pool_vector2_array_sort(godot_pool_vector2_array *p_self);
|
||||
|
||||
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);
|
||||
@@ -343,10 +315,6 @@ 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);
|
||||
|
||||
godot_bool GDAPI godot_pool_vector2_array_has(const godot_pool_vector2_array *p_self, const godot_vector2 *p_data);
|
||||
|
||||
void GDAPI godot_pool_vector2_array_destroy(godot_pool_vector2_array *p_self);
|
||||
|
||||
// vector3
|
||||
@@ -369,8 +337,6 @@ 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);
|
||||
|
||||
void GDAPI godot_pool_vector3_array_sort(godot_pool_vector3_array *p_self);
|
||||
|
||||
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);
|
||||
@@ -380,10 +346,6 @@ 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);
|
||||
|
||||
godot_bool GDAPI godot_pool_vector3_array_has(const godot_pool_vector3_array *p_self, const godot_vector3 *p_data);
|
||||
|
||||
void GDAPI godot_pool_vector3_array_destroy(godot_pool_vector3_array *p_self);
|
||||
|
||||
// color
|
||||
@@ -406,8 +368,6 @@ 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);
|
||||
|
||||
void GDAPI godot_pool_color_array_sort(godot_pool_color_array *p_self);
|
||||
|
||||
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);
|
||||
@@ -417,10 +377,6 @@ 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);
|
||||
|
||||
godot_bool GDAPI godot_pool_color_array_has(const godot_pool_color_array *p_self, const godot_color *p_data);
|
||||
|
||||
void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_self);
|
||||
|
||||
//
|
||||
@@ -505,4 +461,4 @@ void GDAPI godot_pool_color_array_write_access_destroy(godot_pool_color_array_wr
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_POOL_ARRAYS_H
|
||||
#endif // GODOT_POOL_ARRAYS_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_QUAT_H
|
||||
#define GDNATIVE_QUAT_H
|
||||
#ifndef GODOT_QUAT_H
|
||||
#define GODOT_QUAT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -60,8 +60,6 @@ extern "C" {
|
||||
|
||||
void GDAPI godot_quat_new(godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w);
|
||||
void GDAPI godot_quat_new_with_axis_angle(godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle);
|
||||
void GDAPI godot_quat_new_with_basis(godot_quat *r_dest, const godot_basis *p_basis);
|
||||
void GDAPI godot_quat_new_with_euler(godot_quat *r_dest, const godot_vector3 *p_euler);
|
||||
|
||||
godot_real GDAPI godot_quat_get_x(const godot_quat *p_self);
|
||||
void GDAPI godot_quat_set_x(godot_quat *p_self, const godot_real val);
|
||||
@@ -109,10 +107,8 @@ godot_bool GDAPI godot_quat_operator_equal(const godot_quat *p_self, const godot
|
||||
|
||||
godot_quat GDAPI godot_quat_operator_neg(const godot_quat *p_self);
|
||||
|
||||
void GDAPI godot_quat_set_axis_angle(godot_quat *p_self, const godot_vector3 *p_axis, const godot_real p_angle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_QUAT_H
|
||||
#endif // GODOT_QUAT_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_RECT2_H
|
||||
#define GDNATIVE_RECT2_H
|
||||
#ifndef GODOT_RECT2_H
|
||||
#define GODOT_RECT2_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -77,12 +77,6 @@ godot_bool GDAPI godot_rect2_has_point(const godot_rect2 *p_self, const godot_ve
|
||||
|
||||
godot_rect2 GDAPI godot_rect2_grow(const godot_rect2 *p_self, const godot_real p_by);
|
||||
|
||||
godot_rect2 GDAPI godot_rect2_grow_individual(const godot_rect2 *p_self, const godot_real p_left, const godot_real p_top, const godot_real p_right, const godot_real p_bottom);
|
||||
|
||||
godot_rect2 GDAPI godot_rect2_grow_margin(const godot_rect2 *p_self, const godot_int p_margin, const godot_real p_by);
|
||||
|
||||
godot_rect2 GDAPI godot_rect2_abs(const godot_rect2 *p_self);
|
||||
|
||||
godot_rect2 GDAPI godot_rect2_expand(const godot_rect2 *p_self, const godot_vector2 *p_to);
|
||||
|
||||
godot_bool GDAPI godot_rect2_operator_equal(const godot_rect2 *p_self, const godot_rect2 *p_b);
|
||||
@@ -99,4 +93,4 @@ void GDAPI godot_rect2_set_size(godot_rect2 *p_self, const godot_vector2 *p_size
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_RECT2_H
|
||||
#endif // GODOT_RECT2_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_RID_H
|
||||
#define GDNATIVE_RID_H
|
||||
#ifndef GODOT_RID_H
|
||||
#define GODOT_RID_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -71,4 +71,4 @@ godot_bool GDAPI godot_rid_operator_less(const godot_rid *p_self, const godot_ri
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_RID_H
|
||||
#endif // GODOT_RID_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_STRING_H
|
||||
#define GDNATIVE_STRING_H
|
||||
#ifndef GODOT_STRING_H
|
||||
#define GODOT_STRING_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -79,7 +79,7 @@ void GDAPI godot_string_new(godot_string *r_dest);
|
||||
void GDAPI godot_string_new_copy(godot_string *r_dest, const godot_string *p_src);
|
||||
void GDAPI godot_string_new_with_wide_string(godot_string *r_dest, const wchar_t *p_contents, const int p_size);
|
||||
|
||||
const wchar_t GDAPI *godot_string_operator_index(godot_string *p_self, const godot_int p_idx);
|
||||
wchar_t GDAPI *godot_string_operator_index(godot_string *p_self, const godot_int p_idx);
|
||||
wchar_t GDAPI godot_string_operator_index_const(const godot_string *p_self, const godot_int p_idx);
|
||||
const wchar_t GDAPI *godot_string_wide_str(const godot_string *p_self);
|
||||
|
||||
@@ -102,8 +102,6 @@ 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);
|
||||
@@ -129,8 +127,6 @@ godot_string GDAPI godot_string_md5(const uint8_t *p_md5);
|
||||
godot_string GDAPI godot_string_num(double p_num);
|
||||
godot_string GDAPI godot_string_num_int64(int64_t p_num, godot_int p_base);
|
||||
godot_string GDAPI godot_string_num_int64_capitalized(int64_t p_num, godot_int p_base, godot_bool p_capitalize_hex);
|
||||
godot_string GDAPI godot_string_num_uint64(uint64_t p_num, godot_int p_base);
|
||||
godot_string GDAPI godot_string_num_uint64_capitalized(uint64_t p_num, godot_int p_base, godot_bool p_capitalize_hex);
|
||||
godot_string GDAPI godot_string_num_real(double p_num);
|
||||
godot_string GDAPI godot_string_num_scientific(double p_num);
|
||||
godot_string GDAPI godot_string_num_with_decimals(double p_num, godot_int p_decimals);
|
||||
@@ -181,8 +177,6 @@ godot_array GDAPI godot_string_split_ints_mk(const godot_string *p_self, const g
|
||||
godot_array GDAPI godot_string_split_ints_mk_allows_empty(const godot_string *p_self, const godot_array *p_splitters);
|
||||
godot_array GDAPI godot_string_split_spaces(const godot_string *p_self);
|
||||
|
||||
godot_string GDAPI godot_string_join(const godot_string *p_self, const godot_array *p_parts);
|
||||
|
||||
wchar_t GDAPI godot_string_char_lowercase(wchar_t p_char);
|
||||
wchar_t GDAPI godot_string_char_uppercase(wchar_t p_char);
|
||||
godot_string GDAPI godot_string_to_lower(const godot_string *p_self);
|
||||
@@ -223,7 +217,7 @@ godot_bool godot_string_empty(const godot_string *p_self);
|
||||
// path functions
|
||||
godot_string GDAPI godot_string_get_base_dir(const godot_string *p_self);
|
||||
godot_string GDAPI godot_string_get_file(const godot_string *p_self);
|
||||
godot_string GDAPI godot_string_humanize_size(uint64_t p_size);
|
||||
godot_string GDAPI godot_string_humanize_size(size_t p_size);
|
||||
godot_bool GDAPI godot_string_is_abs_path(const godot_string *p_self);
|
||||
godot_bool GDAPI godot_string_is_rel_path(const godot_string *p_self);
|
||||
godot_bool GDAPI godot_string_is_resource_file(const godot_string *p_self);
|
||||
@@ -252,16 +246,10 @@ godot_bool GDAPI godot_string_is_valid_identifier(const godot_string *p_self);
|
||||
godot_bool GDAPI godot_string_is_valid_integer(const godot_string *p_self);
|
||||
godot_bool GDAPI godot_string_is_valid_ip_address(const godot_string *p_self);
|
||||
|
||||
godot_string GDAPI godot_string_dedent(const godot_string *p_self);
|
||||
godot_string GDAPI godot_string_trim_prefix(const godot_string *p_self, const godot_string *p_prefix);
|
||||
godot_string GDAPI godot_string_trim_suffix(const godot_string *p_self, const godot_string *p_suffix);
|
||||
godot_string GDAPI godot_string_rstrip(const godot_string *p_self, const godot_string *p_chars);
|
||||
godot_pool_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_divisor, const godot_bool p_allow_empty, const godot_int p_maxsplit);
|
||||
|
||||
void GDAPI godot_string_destroy(godot_string *p_self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_STRING_H
|
||||
#endif // GODOT_STRING_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_STRING_NAME_H
|
||||
#define GDNATIVE_STRING_NAME_H
|
||||
#ifndef GODOT_STRING_NAME_H
|
||||
#define GODOT_STRING_NAME_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -75,4 +75,4 @@ void GDAPI godot_string_name_destroy(godot_string_name *p_self);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_STRING_NAME_H
|
||||
#endif // GODOT_STRING_NAME_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_TRANSFORM_H
|
||||
#define GDNATIVE_TRANSFORM_H
|
||||
#ifndef GODOT_TRANSFORM_H
|
||||
#define GODOT_TRANSFORM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -62,7 +62,6 @@ extern "C" {
|
||||
|
||||
void GDAPI godot_transform_new_with_axis_origin(godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin);
|
||||
void GDAPI godot_transform_new(godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin);
|
||||
void GDAPI godot_transform_new_with_quat(godot_transform *r_dest, const godot_quat *p_quat);
|
||||
|
||||
godot_basis GDAPI godot_transform_get_basis(const godot_transform *p_self);
|
||||
void GDAPI godot_transform_set_basis(godot_transform *p_self, const godot_basis *p_v);
|
||||
@@ -108,4 +107,4 @@ godot_aabb GDAPI godot_transform_xform_inv_aabb(const godot_transform *p_self, c
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_TRANSFORM_H
|
||||
#endif // GODOT_TRANSFORM_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_TRANSFORM2D_H
|
||||
#define GDNATIVE_TRANSFORM2D_H
|
||||
#ifndef GODOT_TRANSFORM2D_H
|
||||
#define GODOT_TRANSFORM2D_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -106,4 +106,4 @@ godot_rect2 GDAPI godot_transform2d_xform_inv_rect2(const godot_transform2d *p_s
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_TRANSFORM2D_H
|
||||
#endif // GODOT_TRANSFORM2D_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_VARIANT_H
|
||||
#define GDNATIVE_VARIANT_H
|
||||
#ifndef GODOT_VARIANT_H
|
||||
#define GODOT_VARIANT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -37,7 +37,7 @@ extern "C" {
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define GODOT_VARIANT_SIZE (16 + sizeof(int64_t))
|
||||
#define GODOT_VARIANT_SIZE (16 + sizeof(void *))
|
||||
|
||||
#ifndef GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
|
||||
#define GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
|
||||
@@ -100,45 +100,6 @@ typedef struct godot_variant_call_error {
|
||||
godot_variant_type expected;
|
||||
} godot_variant_call_error;
|
||||
|
||||
typedef enum godot_variant_operator {
|
||||
// comparison
|
||||
GODOT_VARIANT_OP_EQUAL,
|
||||
GODOT_VARIANT_OP_NOT_EQUAL,
|
||||
GODOT_VARIANT_OP_LESS,
|
||||
GODOT_VARIANT_OP_LESS_EQUAL,
|
||||
GODOT_VARIANT_OP_GREATER,
|
||||
GODOT_VARIANT_OP_GREATER_EQUAL,
|
||||
|
||||
// mathematic
|
||||
GODOT_VARIANT_OP_ADD,
|
||||
GODOT_VARIANT_OP_SUBTRACT,
|
||||
GODOT_VARIANT_OP_MULTIPLY,
|
||||
GODOT_VARIANT_OP_DIVIDE,
|
||||
GODOT_VARIANT_OP_NEGATE,
|
||||
GODOT_VARIANT_OP_POSITIVE,
|
||||
GODOT_VARIANT_OP_MODULE,
|
||||
GODOT_VARIANT_OP_STRING_CONCAT,
|
||||
|
||||
// bitwise
|
||||
GODOT_VARIANT_OP_SHIFT_LEFT,
|
||||
GODOT_VARIANT_OP_SHIFT_RIGHT,
|
||||
GODOT_VARIANT_OP_BIT_AND,
|
||||
GODOT_VARIANT_OP_BIT_OR,
|
||||
GODOT_VARIANT_OP_BIT_XOR,
|
||||
GODOT_VARIANT_OP_BIT_NEGATE,
|
||||
|
||||
// logic
|
||||
GODOT_VARIANT_OP_AND,
|
||||
GODOT_VARIANT_OP_OR,
|
||||
GODOT_VARIANT_OP_XOR,
|
||||
GODOT_VARIANT_OP_NOT,
|
||||
|
||||
// containment
|
||||
GODOT_VARIANT_OP_IN,
|
||||
|
||||
GODOT_VARIANT_OP_MAX,
|
||||
} godot_variant_operator;
|
||||
|
||||
// reduce extern "C" nesting for VS2013
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -174,7 +135,7 @@ void GDAPI godot_variant_new_copy(godot_variant *r_dest, const godot_variant *p_
|
||||
|
||||
void GDAPI godot_variant_new_nil(godot_variant *r_dest);
|
||||
|
||||
void GDAPI godot_variant_new_bool(godot_variant *r_dest, const godot_bool p_b);
|
||||
void GDAPI godot_variant_new_bool(godot_variant *p_v, const godot_bool p_b);
|
||||
void GDAPI godot_variant_new_uint(godot_variant *r_dest, const uint64_t p_i);
|
||||
void GDAPI godot_variant_new_int(godot_variant *r_dest, const int64_t p_i);
|
||||
void GDAPI godot_variant_new_real(godot_variant *r_dest, const double p_r);
|
||||
@@ -243,13 +204,8 @@ godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_self);
|
||||
|
||||
void GDAPI godot_variant_destroy(godot_variant *p_self);
|
||||
|
||||
// GDNative core 1.1
|
||||
|
||||
godot_string GDAPI godot_variant_get_operator_name(godot_variant_operator p_op);
|
||||
void GDAPI godot_variant_evaluate(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_ret, godot_bool *r_valid);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_VARIANT_H
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_VECTOR2_H
|
||||
#define GDNATIVE_VECTOR2_H
|
||||
#ifndef GODOT_VECTOR2_H
|
||||
#define GODOT_VECTOR2_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -71,8 +71,6 @@ 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);
|
||||
@@ -85,8 +83,6 @@ 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);
|
||||
@@ -139,4 +135,4 @@ godot_real GDAPI godot_vector2_get_y(const godot_vector2 *p_self);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_VECTOR2_H
|
||||
#endif // GODOT_VECTOR2_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -28,8 +28,8 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GDNATIVE_VECTOR3_H
|
||||
#define GDNATIVE_VECTOR3_H
|
||||
#ifndef GODOT_VECTOR3_H
|
||||
#define GODOT_VECTOR3_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -90,8 +90,6 @@ 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);
|
||||
@@ -106,8 +104,6 @@ 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);
|
||||
@@ -146,4 +142,4 @@ godot_real GDAPI godot_vector3_get_axis(const godot_vector3 *p_self, const godot
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GDNATIVE_VECTOR3_H
|
||||
#endif // GODOT_VECTOR3_H
|
||||
|
||||
@@ -3,23 +3,17 @@
|
||||
#define GODOT_GDNATIVE_API_STRUCT_H
|
||||
|
||||
#include <gdnative/gdnative.h>
|
||||
#include <android/godot_android.h>
|
||||
#include <arvr/godot_arvr.h>
|
||||
#include <nativescript/godot_nativescript.h>
|
||||
#include <net/godot_net.h>
|
||||
#include <pluginscript/godot_pluginscript.h>
|
||||
#include <videodecoder/godot_videodecoder.h>
|
||||
|
||||
#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_android_api_struct *_gdnative_wrapper_android_api_struct; \
|
||||
extern const godot_gdnative_ext_arvr_api_struct *_gdnative_wrapper_arvr_api_struct; \
|
||||
extern const godot_gdnative_ext_videodecoder_api_struct *_gdnative_wrapper_videodecoder_api_struct; \
|
||||
extern const godot_gdnative_ext_net_api_struct *_gdnative_wrapper_net_api_struct; \
|
||||
_gdnative_wrapper_api_struct = options->api_struct; \
|
||||
for (unsigned int i = 0; i < _gdnative_wrapper_api_struct->num_extensions; i++) { \
|
||||
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]; \
|
||||
@@ -27,18 +21,9 @@
|
||||
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_ANDROID: \
|
||||
_gdnative_wrapper_android_api_struct = (godot_gdnative_ext_android_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; \
|
||||
case GDNATIVE_EXT_VIDEODECODER: \
|
||||
_gdnative_wrapper_videodecoder_api_struct = (godot_gdnative_ext_videodecoder_api_struct *) _gdnative_wrapper_api_struct->extensions[i]; \
|
||||
break; \
|
||||
case GDNATIVE_EXT_NET: \
|
||||
_gdnative_wrapper_net_api_struct = (godot_gdnative_ext_net_api_struct *) _gdnative_wrapper_api_struct->extensions[i]; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -51,31 +36,9 @@ enum GDNATIVE_API_TYPES {
|
||||
GDNATIVE_CORE,
|
||||
GDNATIVE_EXT_NATIVESCRIPT,
|
||||
GDNATIVE_EXT_PLUGINSCRIPT,
|
||||
GDNATIVE_EXT_ANDROID,
|
||||
GDNATIVE_EXT_ARVR,
|
||||
GDNATIVE_EXT_VIDEODECODER,
|
||||
GDNATIVE_EXT_NET,
|
||||
};
|
||||
|
||||
typedef struct godot_gdnative_ext_nativescript_1_1_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
const godot_gdnative_api_struct *next;
|
||||
void (*godot_nativescript_set_method_argument_information)(void *p_gdnative_handle, const char *p_name, const char *p_function_name, int p_num_args, const godot_method_arg *p_args);
|
||||
void (*godot_nativescript_set_class_documentation)(void *p_gdnative_handle, const char *p_name, godot_string p_documentation);
|
||||
void (*godot_nativescript_set_method_documentation)(void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_string p_documentation);
|
||||
void (*godot_nativescript_set_property_documentation)(void *p_gdnative_handle, const char *p_name, const char *p_path, godot_string p_documentation);
|
||||
void (*godot_nativescript_set_signal_documentation)(void *p_gdnative_handle, const char *p_name, const char *p_signal_name, godot_string p_documentation);
|
||||
void (*godot_nativescript_set_global_type_tag)(int p_idx, const char *p_name, const void *p_type_tag);
|
||||
const void *(*godot_nativescript_get_global_type_tag)(int p_idx, const char *p_name);
|
||||
void (*godot_nativescript_set_type_tag)(void *p_gdnative_handle, const char *p_name, const void *p_type_tag);
|
||||
const void *(*godot_nativescript_get_type_tag)(const godot_object *p_object);
|
||||
int (*godot_nativescript_register_instance_binding_data_functions)(godot_instance_binding_functions p_binding_functions);
|
||||
void (*godot_nativescript_unregister_instance_binding_data_functions)(int p_idx);
|
||||
void *(*godot_nativescript_get_instance_binding_data)(int p_idx, godot_object *p_object);
|
||||
void (*godot_nativescript_profiling_add_data)(const char *p_signature, uint64_t p_line);
|
||||
} godot_gdnative_ext_nativescript_1_1_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_ext_nativescript_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
@@ -95,24 +58,6 @@ typedef struct godot_gdnative_ext_pluginscript_api_struct {
|
||||
void (*godot_pluginscript_register_language)(const godot_pluginscript_language_desc *language_desc);
|
||||
} godot_gdnative_ext_pluginscript_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_ext_android_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
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_1_2_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
const godot_gdnative_api_struct *next;
|
||||
void (*godot_arvr_set_interface)(godot_object *p_arvr_interface, const godot_arvr_interface_gdnative *p_gdn_interface);
|
||||
godot_int (*godot_arvr_get_depthid)(godot_rid *p_render_target);
|
||||
} godot_gdnative_ext_arvr_1_2_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_ext_arvr_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
@@ -130,123 +75,6 @@ typedef struct godot_gdnative_ext_arvr_api_struct {
|
||||
godot_real (*godot_arvr_get_controller_rumble)(godot_int p_controller_id);
|
||||
} godot_gdnative_ext_arvr_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_ext_videodecoder_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
const godot_gdnative_api_struct *next;
|
||||
godot_int (*godot_videodecoder_file_read)(void *file_ptr, uint8_t *buf, int buf_size);
|
||||
int64_t (*godot_videodecoder_file_seek)(void *file_ptr, int64_t pos, int whence);
|
||||
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;
|
||||
const godot_gdnative_api_struct *next;
|
||||
void (*godot_net_bind_stream_peer)(godot_object *p_obj, const godot_net_stream_peer *p_interface);
|
||||
void (*godot_net_bind_packet_peer)(godot_object *p_obj, const godot_net_packet_peer *p_interface);
|
||||
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_3_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
const godot_gdnative_api_struct *next;
|
||||
void (*godot_dictionary_merge)(godot_dictionary *p_self, const godot_dictionary *p_dictionary, const godot_bool p_overwrite);
|
||||
godot_bool (*godot_pool_byte_array_has)(const godot_pool_byte_array *p_self, const uint8_t p_data);
|
||||
void (*godot_pool_byte_array_sort)(godot_pool_byte_array *p_self);
|
||||
godot_bool (*godot_pool_int_array_has)(const godot_pool_int_array *p_self, const godot_int p_data);
|
||||
void (*godot_pool_int_array_sort)(godot_pool_int_array *p_self);
|
||||
godot_bool (*godot_pool_real_array_has)(const godot_pool_real_array *p_self, const godot_real p_data);
|
||||
void (*godot_pool_real_array_sort)(godot_pool_real_array *p_self);
|
||||
godot_bool (*godot_pool_string_array_has)(const godot_pool_string_array *p_self, const godot_string *p_data);
|
||||
godot_string (*godot_pool_string_array_join)(const godot_pool_string_array *p_self, const godot_string *p_delimiter);
|
||||
void (*godot_pool_string_array_sort)(godot_pool_string_array *p_self);
|
||||
godot_bool (*godot_pool_vector2_array_has)(const godot_pool_vector2_array *p_self, const godot_vector2 *p_data);
|
||||
void (*godot_pool_vector2_array_sort)(godot_pool_vector2_array *p_self);
|
||||
godot_bool (*godot_pool_vector3_array_has)(const godot_pool_vector3_array *p_self, const godot_vector3 *p_data);
|
||||
void (*godot_pool_vector3_array_sort)(godot_pool_vector3_array *p_self);
|
||||
godot_bool (*godot_pool_color_array_has)(const godot_pool_color_array *p_self, const godot_color *p_data);
|
||||
void (*godot_pool_color_array_sort)(godot_pool_color_array *p_self);
|
||||
godot_string (*godot_string_join)(const godot_string *p_self, const godot_array *p_parts);
|
||||
godot_string (*godot_string_num_uint64)(uint64_t p_num, godot_int p_base);
|
||||
godot_string (*godot_string_num_uint64_capitalized)(uint64_t p_num, godot_int p_base, godot_bool p_capitalize_hex);
|
||||
} godot_gdnative_core_1_3_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;
|
||||
const godot_gdnative_api_struct *next;
|
||||
godot_int (*godot_color_to_abgr32)(const godot_color *p_self);
|
||||
godot_int (*godot_color_to_abgr64)(const godot_color *p_self);
|
||||
godot_int (*godot_color_to_argb64)(const godot_color *p_self);
|
||||
godot_int (*godot_color_to_rgba64)(const godot_color *p_self);
|
||||
godot_color (*godot_color_darkened)(const godot_color *p_self, const godot_real p_amount);
|
||||
godot_color (*godot_color_from_hsv)(const godot_color *p_self, const godot_real p_h, const godot_real p_s, const godot_real p_v, const godot_real p_a);
|
||||
godot_color (*godot_color_lightened)(const godot_color *p_self, const godot_real p_amount);
|
||||
godot_array (*godot_array_duplicate)(const godot_array *p_self, const godot_bool p_deep);
|
||||
godot_variant (*godot_array_max)(const godot_array *p_self);
|
||||
godot_variant (*godot_array_min)(const godot_array *p_self);
|
||||
void (*godot_array_shuffle)(godot_array *p_self);
|
||||
godot_basis (*godot_basis_slerp)(const godot_basis *p_self, const godot_basis *p_b, const godot_real p_t);
|
||||
godot_variant (*godot_dictionary_get_with_default)(const godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_default);
|
||||
bool (*godot_dictionary_erase_with_return)(godot_dictionary *p_self, const godot_variant *p_key);
|
||||
godot_node_path (*godot_node_path_get_as_property_path)(const godot_node_path *p_self);
|
||||
void (*godot_quat_set_axis_angle)(godot_quat *p_self, const godot_vector3 *p_axis, const godot_real p_angle);
|
||||
godot_rect2 (*godot_rect2_grow_individual)(const godot_rect2 *p_self, const godot_real p_left, const godot_real p_top, const godot_real p_right, const godot_real p_bottom);
|
||||
godot_rect2 (*godot_rect2_grow_margin)(const godot_rect2 *p_self, const godot_int p_margin, const godot_real p_by);
|
||||
godot_rect2 (*godot_rect2_abs)(const godot_rect2 *p_self);
|
||||
godot_string (*godot_string_dedent)(const godot_string *p_self);
|
||||
godot_string (*godot_string_trim_prefix)(const godot_string *p_self, const godot_string *p_prefix);
|
||||
godot_string (*godot_string_trim_suffix)(const godot_string *p_self, const godot_string *p_suffix);
|
||||
godot_string (*godot_string_rstrip)(const godot_string *p_self, const godot_string *p_chars);
|
||||
godot_pool_string_array (*godot_string_rsplit)(const godot_string *p_self, const godot_string *p_divisor, const godot_bool p_allow_empty, const godot_int p_maxsplit);
|
||||
godot_quat (*godot_basis_get_quat)(const godot_basis *p_self);
|
||||
void (*godot_basis_set_quat)(godot_basis *p_self, const godot_quat *p_quat);
|
||||
void (*godot_basis_set_axis_angle_scale)(godot_basis *p_self, const godot_vector3 *p_axis, godot_real p_phi, const godot_vector3 *p_scale);
|
||||
void (*godot_basis_set_euler_scale)(godot_basis *p_self, const godot_vector3 *p_euler, const godot_vector3 *p_scale);
|
||||
void (*godot_basis_set_quat_scale)(godot_basis *p_self, const godot_quat *p_quat, const godot_vector3 *p_scale);
|
||||
bool (*godot_is_instance_valid)(const godot_object *p_object);
|
||||
void (*godot_quat_new_with_basis)(godot_quat *r_dest, const godot_basis *p_basis);
|
||||
void (*godot_quat_new_with_euler)(godot_quat *r_dest, const godot_vector3 *p_euler);
|
||||
void (*godot_transform_new_with_quat)(godot_transform *r_dest, const godot_quat *p_quat);
|
||||
godot_string (*godot_variant_get_operator_name)(godot_variant_operator p_op);
|
||||
void (*godot_variant_evaluate)(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_ret, godot_bool *r_valid);
|
||||
} godot_gdnative_core_1_1_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_core_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
@@ -763,7 +591,7 @@ typedef struct godot_gdnative_core_api_struct {
|
||||
godot_variant_type (*godot_variant_get_type)(const godot_variant *p_v);
|
||||
void (*godot_variant_new_copy)(godot_variant *r_dest, const godot_variant *p_src);
|
||||
void (*godot_variant_new_nil)(godot_variant *r_dest);
|
||||
void (*godot_variant_new_bool)(godot_variant *r_dest, const godot_bool p_b);
|
||||
void (*godot_variant_new_bool)(godot_variant *p_v, const godot_bool p_b);
|
||||
void (*godot_variant_new_uint)(godot_variant *r_dest, const uint64_t p_i);
|
||||
void (*godot_variant_new_int)(godot_variant *r_dest, const int64_t p_i);
|
||||
void (*godot_variant_new_real)(godot_variant *r_dest, const double p_r);
|
||||
@@ -830,7 +658,7 @@ typedef struct godot_gdnative_core_api_struct {
|
||||
void (*godot_string_new)(godot_string *r_dest);
|
||||
void (*godot_string_new_copy)(godot_string *r_dest, const godot_string *p_src);
|
||||
void (*godot_string_new_with_wide_string)(godot_string *r_dest, const wchar_t *p_contents, const int p_size);
|
||||
const wchar_t *(*godot_string_operator_index)(godot_string *p_self, const godot_int p_idx);
|
||||
wchar_t *(*godot_string_operator_index)(godot_string *p_self, const godot_int p_idx);
|
||||
wchar_t (*godot_string_operator_index_const)(const godot_string *p_self, const godot_int p_idx);
|
||||
const wchar_t *(*godot_string_wide_str)(const godot_string *p_self);
|
||||
godot_bool (*godot_string_operator_equal)(const godot_string *p_self, const godot_string *p_b);
|
||||
@@ -949,7 +777,7 @@ typedef struct godot_gdnative_core_api_struct {
|
||||
godot_bool (*godot_string_empty)(const godot_string *p_self);
|
||||
godot_string (*godot_string_get_base_dir)(const godot_string *p_self);
|
||||
godot_string (*godot_string_get_file)(const godot_string *p_self);
|
||||
godot_string (*godot_string_humanize_size)(uint64_t p_size);
|
||||
godot_string (*godot_string_humanize_size)(size_t p_size);
|
||||
godot_bool (*godot_string_is_abs_path)(const godot_string *p_self);
|
||||
godot_bool (*godot_string_is_rel_path)(const godot_string *p_self);
|
||||
godot_bool (*godot_string_is_resource_file)(const godot_string *p_self);
|
||||
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 58 KiB |
BIN
images/faq/set_project_dllibrary.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 16 KiB |
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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 */
|
||||
@@ -40,13 +40,9 @@ extern "C" {
|
||||
typedef enum {
|
||||
GODOT_METHOD_RPC_MODE_DISABLED,
|
||||
GODOT_METHOD_RPC_MODE_REMOTE,
|
||||
GODOT_METHOD_RPC_MODE_SYNC,
|
||||
GODOT_METHOD_RPC_MODE_MASTER,
|
||||
GODOT_METHOD_RPC_MODE_PUPPET,
|
||||
GODOT_METHOD_RPC_MODE_SLAVE = GODOT_METHOD_RPC_MODE_PUPPET,
|
||||
GODOT_METHOD_RPC_MODE_REMOTESYNC,
|
||||
GODOT_METHOD_RPC_MODE_SYNC = GODOT_METHOD_RPC_MODE_REMOTESYNC,
|
||||
GODOT_METHOD_RPC_MODE_MASTERSYNC,
|
||||
GODOT_METHOD_RPC_MODE_PUPPETSYNC,
|
||||
GODOT_METHOD_RPC_MODE_SLAVE,
|
||||
} godot_method_rpc_mode;
|
||||
|
||||
typedef enum {
|
||||
@@ -56,22 +52,19 @@ 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, // FIXME: Obsolete: drop whenever we can break compat
|
||||
GODOT_PROPERTY_HINT_SPRITE_FRAME,
|
||||
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,
|
||||
GODOT_PROPERTY_HINT_LAYERS_2D_PHYSICS,
|
||||
GODOT_PROPERTY_HINT_LAYERS_2D_NAVIGATION,
|
||||
GODOT_PROPERTY_HINT_LAYERS_3D_RENDER,
|
||||
GODOT_PROPERTY_HINT_LAYERS_3D_PHYSICS,
|
||||
GODOT_PROPERTY_HINT_LAYERS_3D_NAVIGATION,
|
||||
GODOT_PROPERTY_HINT_FILE, ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,"
|
||||
GODOT_PROPERTY_HINT_DIR, ///< a directory path must be passed
|
||||
GODOT_PROPERTY_HINT_DIR, ///< a directort 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 directory path must be passed
|
||||
GODOT_PROPERTY_HINT_GLOBAL_DIR, ///< a directort 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
|
||||
GODOT_PROPERTY_HINT_COLOR_NO_ALPHA, ///< used for ignoring alpha component when editing a color
|
||||
GODOT_PROPERTY_HINT_IMAGE_COMPRESS_LOSSY,
|
||||
GODOT_PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS,
|
||||
@@ -100,8 +93,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, // 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_STORE_IF_NONZERO = 512, //only store if nonzero
|
||||
GODOT_PROPERTY_USAGE_STORE_IF_NONONE = 1024, //only store if false
|
||||
GODOT_PROPERTY_USAGE_NO_INSTANCE_STATE = 2048,
|
||||
GODOT_PROPERTY_USAGE_RESTART_IF_CHANGED = 4096,
|
||||
GODOT_PROPERTY_USAGE_SCRIPT_VARIABLE = 8192,
|
||||
@@ -147,7 +140,7 @@ typedef struct {
|
||||
} godot_method_attributes;
|
||||
|
||||
typedef struct {
|
||||
// instance pointer, method data, user data, num args, args - return result as variant
|
||||
// instance pointer, method data, user data, num args, args - return result as varaint
|
||||
GDCALLINGCONV godot_variant (*method)(godot_object *, void *, void *, int, godot_variant **);
|
||||
void *method_data;
|
||||
GDCALLINGCONV void (*free_func)(void *);
|
||||
@@ -192,61 +185,8 @@ void GDAPI godot_nativescript_register_signal(void *p_gdnative_handle, const cha
|
||||
|
||||
void GDAPI *godot_nativescript_get_userdata(godot_object *p_instance);
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* NativeScript 1.1
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
// method registering with argument names
|
||||
|
||||
typedef struct {
|
||||
godot_string name;
|
||||
|
||||
godot_variant_type type;
|
||||
godot_property_hint hint;
|
||||
godot_string hint_string;
|
||||
} godot_method_arg;
|
||||
|
||||
void GDAPI godot_nativescript_set_method_argument_information(void *p_gdnative_handle, const char *p_name, const char *p_function_name, int p_num_args, const godot_method_arg *p_args);
|
||||
|
||||
// documentation
|
||||
|
||||
void GDAPI godot_nativescript_set_class_documentation(void *p_gdnative_handle, const char *p_name, godot_string p_documentation);
|
||||
void GDAPI godot_nativescript_set_method_documentation(void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_string p_documentation);
|
||||
void GDAPI godot_nativescript_set_property_documentation(void *p_gdnative_handle, const char *p_name, const char *p_path, godot_string p_documentation);
|
||||
void GDAPI godot_nativescript_set_signal_documentation(void *p_gdnative_handle, const char *p_name, const char *p_signal_name, godot_string p_documentation);
|
||||
|
||||
// type tag API
|
||||
|
||||
void GDAPI godot_nativescript_set_global_type_tag(int p_idx, const char *p_name, const void *p_type_tag);
|
||||
const void GDAPI *godot_nativescript_get_global_type_tag(int p_idx, const char *p_name);
|
||||
|
||||
void GDAPI godot_nativescript_set_type_tag(void *p_gdnative_handle, const char *p_name, const void *p_type_tag);
|
||||
const void GDAPI *godot_nativescript_get_type_tag(const godot_object *p_object);
|
||||
|
||||
// instance binding API
|
||||
|
||||
typedef struct {
|
||||
GDCALLINGCONV void *(*alloc_instance_binding_data)(void *, const void *, godot_object *);
|
||||
GDCALLINGCONV void (*free_instance_binding_data)(void *, void *);
|
||||
GDCALLINGCONV void (*refcount_incremented_instance_binding)(void *, godot_object *);
|
||||
GDCALLINGCONV bool (*refcount_decremented_instance_binding)(void *, godot_object *);
|
||||
void *data;
|
||||
GDCALLINGCONV void (*free_func)(void *);
|
||||
} godot_instance_binding_functions;
|
||||
|
||||
int GDAPI godot_nativescript_register_instance_binding_data_functions(godot_instance_binding_functions p_binding_functions);
|
||||
void GDAPI godot_nativescript_unregister_instance_binding_data_functions(int p_idx);
|
||||
|
||||
void GDAPI *godot_nativescript_get_instance_binding_data(int p_idx, godot_object *p_object);
|
||||
|
||||
void GDAPI godot_nativescript_profiling_add_data(const char *p_signature, uint64_t p_time);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GODOT_NATIVESCRIPT_H
|
||||
#endif
|
||||
|
||||
120
net/godot_net.h
@@ -1,120 +0,0 @@
|
||||
/*************************************************************************/
|
||||
/* godot_net.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 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_NET_H
|
||||
#define GODOT_NET_H
|
||||
|
||||
#include <gdnative/gdnative.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// For future versions of the API we should only add new functions at the end of the structure and use the
|
||||
// version info to detect whether a call is available
|
||||
|
||||
// Use these to populate version in your plugin
|
||||
#define GODOT_NET_API_MAJOR 3
|
||||
#define GODOT_NET_API_MINOR 1
|
||||
|
||||
typedef struct {
|
||||
godot_gdnative_api_version version; /* version of our API */
|
||||
godot_object *data; /* User reference */
|
||||
|
||||
/* This is StreamPeer */
|
||||
godot_error (*get_data)(void *user, uint8_t *p_buffer, int p_bytes);
|
||||
godot_error (*get_partial_data)(void *user, uint8_t *p_buffer, int p_bytes, int *r_received);
|
||||
godot_error (*put_data)(void *user, const uint8_t *p_data, int p_bytes);
|
||||
godot_error (*put_partial_data)(void *user, const uint8_t *p_data, int p_bytes, int *r_sent);
|
||||
|
||||
int (*get_available_bytes)(const void *user);
|
||||
|
||||
void *next; /* For extension? */
|
||||
} godot_net_stream_peer;
|
||||
|
||||
/* Binds a StreamPeerGDNative to the provided interface */
|
||||
void godot_net_bind_stream_peer(godot_object *p_obj, const godot_net_stream_peer *p_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 *);
|
||||
|
||||
void *next; /* For extension? */
|
||||
} godot_net_packet_peer;
|
||||
|
||||
/* Binds a PacketPeerGDNative to the provided interface */
|
||||
void GDAPI godot_net_bind_packet_peer(godot_object *p_obj, const godot_net_packet_peer *);
|
||||
|
||||
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 NetworkedMultiplayerPeer */
|
||||
void (*set_transfer_mode)(void *, godot_int);
|
||||
godot_int (*get_transfer_mode)(const void *);
|
||||
// 0 = broadcast, 1 = server, <0 = all but abs(value)
|
||||
void (*set_target_peer)(void *, godot_int);
|
||||
godot_int (*get_packet_peer)(const void *);
|
||||
godot_bool (*is_server)(const void *);
|
||||
void (*poll)(void *);
|
||||
// Must be > 0, 1 is for server
|
||||
int32_t (*get_unique_id)(const void *);
|
||||
void (*set_refuse_new_connections)(void *, godot_bool);
|
||||
godot_bool (*is_refusing_new_connections)(const void *);
|
||||
godot_int (*get_connection_status)(const void *);
|
||||
|
||||
void *next; /* For extension? Or maybe not... */
|
||||
} godot_net_multiplayer_peer;
|
||||
|
||||
/* Binds a MultiplayerPeerGDNative to the provided interface */
|
||||
void GDAPI godot_net_bind_multiplayer_peer(godot_object *p_obj, const godot_net_multiplayer_peer *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// WebRTC Bindings
|
||||
#include "net/godot_webrtc.h"
|
||||
|
||||
#endif // GODOT_NET_H
|
||||
@@ -1,129 +0,0 @@
|
||||
/*************************************************************************/
|
||||
/* godot_webrtc.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 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_WEBRTC_H
|
||||
#define GODOT_WEBRTC_H
|
||||
|
||||
#include <gdnative/gdnative.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GODOT_NET_WEBRTC_API_MAJOR 3
|
||||
#define GODOT_NET_WEBRTC_API_MINOR 4
|
||||
|
||||
/* 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;
|
||||
|
||||
/* Extensions to WebRTCDataChannel */
|
||||
typedef struct {
|
||||
int (*get_buffered_amount)(const void *);
|
||||
|
||||
void *next; /* For extension? */
|
||||
} godot_net_webrtc_data_channel_ext;
|
||||
|
||||
/* 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 // GODOT_WEBRTC_H
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2018 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_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_base_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);
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
/*************************************************************************/
|
||||
/* godot_videodecoder.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 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_VIDEODECODER_H
|
||||
#define GODOT_VIDEODECODER_H
|
||||
|
||||
#include <gdnative/gdnative.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GODOTAV_API_MAJOR 0
|
||||
#define GODOTAV_API_MINOR 1
|
||||
|
||||
typedef struct
|
||||
{
|
||||
godot_gdnative_api_version version;
|
||||
void *next;
|
||||
void *(*constructor)(godot_object *);
|
||||
void (*destructor)(void *);
|
||||
const char *(*get_plugin_name)();
|
||||
const char **(*get_supported_extensions)(int *count);
|
||||
godot_bool (*open_file)(void *, void *); // data struct, and a FileAccess pointer
|
||||
godot_real (*get_length)(const void *);
|
||||
godot_real (*get_playback_position)(const void *);
|
||||
void (*seek)(void *, godot_real);
|
||||
void (*set_audio_track)(void *, godot_int);
|
||||
void (*update)(void *, godot_real);
|
||||
godot_pool_byte_array *(*get_videoframe)(void *);
|
||||
godot_int (*get_audioframe)(void *, float *, int);
|
||||
godot_int (*get_channels)(const void *);
|
||||
godot_int (*get_mix_rate)(const void *);
|
||||
godot_vector2 (*get_texture_size)(const void *);
|
||||
} godot_videodecoder_interface_gdnative;
|
||||
|
||||
typedef int (*GDNativeAudioMixCallback)(void *, const float *, int);
|
||||
|
||||
// FileAccess wrappers for custom FFmpeg IO
|
||||
godot_int GDAPI godot_videodecoder_file_read(void *file_ptr, uint8_t *buf, int buf_size);
|
||||
int64_t GDAPI godot_videodecoder_file_seek(void *file_ptr, int64_t pos, int whence);
|
||||
void GDAPI godot_videodecoder_register_decoder(const godot_videodecoder_interface_gdnative *p_interface);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GODOT_VIDEODECODER_H
|
||||