diff --git a/gdextension/extension_api.json b/gdextension/extension_api.json index 04bb8b809..c9c97d163 100644 --- a/gdextension/extension_api.json +++ b/gdextension/extension_api.json @@ -82157,6 +82157,210 @@ } ] }, + { + "name": "DisplayServerEmbedded", + "is_refcounted": false, + "is_instantiable": false, + "inherits": "DisplayServer", + "api_type": "core", + "methods": [ + { + "name": "set_native_surface", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 2894024005, + "arguments": [ + { + "name": "native_surface", + "type": "RenderingNativeSurface" + } + ] + }, + { + "name": "resize_window", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3200960707, + "arguments": [ + { + "name": "size", + "type": "Vector2i" + }, + { + "name": "id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_content_scale", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "content_scale", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "touch_press", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2276808320, + "arguments": [ + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "x", + "type": "int", + "meta": "int32" + }, + { + "name": "y", + "type": "int", + "meta": "int32" + }, + { + "name": "pressed", + "type": "bool" + }, + { + "name": "double_click", + "type": "bool" + }, + { + "name": "window", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "touch_drag", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 413772270, + "arguments": [ + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "prev_x", + "type": "int", + "meta": "int32" + }, + { + "name": "prev_y", + "type": "int", + "meta": "int32" + }, + { + "name": "x", + "type": "int", + "meta": "int32" + }, + { + "name": "y", + "type": "int", + "meta": "int32" + }, + { + "name": "pressure", + "type": "float", + "meta": "float" + }, + { + "name": "tilt", + "type": "Vector2" + }, + { + "name": "window", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "touches_canceled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3937882851, + "arguments": [ + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "window", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "key", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 293311468, + "arguments": [ + { + "name": "key", + "type": "enum::Key" + }, + { + "name": "char", + "type": "int" + }, + { + "name": "unshifted", + "type": "enum::Key" + }, + { + "name": "physical", + "type": "enum::Key" + }, + { + "name": "modifiers", + "type": "bitfield::KeyModifierMask" + }, + { + "name": "pressed", + "type": "bool" + }, + { + "name": "window", + "type": "int", + "meta": "int32", + "default_value": "0" + } + ] + } + ] + }, { "name": "ENetConnection", "is_refcounted": true, @@ -102845,6 +103049,27 @@ } ] }, + { + "name": "load_function_extension", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 770128156, + "return_value": { + "type": "enum::GDExtensionManager.LoadStatus" + }, + "arguments": [ + { + "name": "path", + "type": "String" + }, + { + "name": "init_func", + "type": "const GDExtensionInitializationFunction*" + } + ] + }, { "name": "reload_extension", "is_const": false, @@ -113114,6 +113339,48 @@ } ] }, + { + "name": "GodotInstance", + "is_refcounted": false, + "is_instantiable": false, + "inherits": "Object", + "api_type": "core", + "methods": [ + { + "name": "start", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2240911060, + "return_value": { + "type": "bool" + } + }, + { + "name": "is_started", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2240911060, + "return_value": { + "type": "bool" + } + }, + { + "name": "iteration", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2240911060, + "return_value": { + "type": "bool" + } + } + ] + }, { "name": "Gradient", "is_refcounted": true, @@ -160753,6 +161020,17 @@ } ], "methods": [ + { + "name": "get_system_ca_certificates", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2841200299, + "return_value": { + "type": "String" + } + }, { "name": "get_connected_midi_inputs", "is_const": false, @@ -209292,6 +209570,66 @@ } ] }, + { + "name": "RenderingNativeSurface", + "is_refcounted": true, + "is_instantiable": false, + "inherits": "RefCounted", + "api_type": "core" + }, + { + "name": "RenderingNativeSurfaceApple", + "is_refcounted": true, + "is_instantiable": false, + "inherits": "RenderingNativeSurface", + "api_type": "core", + "methods": [ + { + "name": "create", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 4233771684, + "return_value": { + "type": "RenderingNativeSurfaceApple" + }, + "arguments": [ + { + "name": "layer", + "type": "int", + "meta": "uint64" + } + ] + } + ] + }, + { + "name": "RenderingNativeSurfaceVulkan", + "is_refcounted": true, + "is_instantiable": false, + "inherits": "RenderingNativeSurface", + "api_type": "core", + "methods": [ + { + "name": "create", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 1648101617, + "return_value": { + "type": "RenderingNativeSurfaceVulkan" + }, + "arguments": [ + { + "name": "vulkan_surface", + "type": "const void*" + } + ] + } + ] + }, { "name": "RenderingServer", "is_refcounted": false, @@ -246520,6 +246858,72 @@ "type": "X509Certificate" } ] + }, + { + "name": "is_server", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "is_unsafe_client", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "get_common_name_override", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, + { + "name": "get_trusted_ca_chain", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1120709175, + "return_value": { + "type": "X509Certificate" + } + }, + { + "name": "get_private_key", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2119971811, + "return_value": { + "type": "CryptoKey" + } + }, + { + "name": "get_own_certificate", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1120709175, + "return_value": { + "type": "X509Certificate" + } } ] }, @@ -296157,6 +296561,20 @@ "type": "bool" } }, + { + "name": "set_native_surface", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2894024005, + "arguments": [ + { + "name": "native_surface", + "type": "RenderingNativeSurface" + } + ] + }, { "name": "hide", "is_const": false, diff --git a/gdextension/libgodot.h b/gdextension/libgodot.h new file mode 100644 index 000000000..acb30c08c --- /dev/null +++ b/gdextension/libgodot.h @@ -0,0 +1,69 @@ +/**************************************************************************/ +/* libgodot.h */ +/**************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/**************************************************************************/ +/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ +/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* */ +/* 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 LIBGODOT_H +#define LIBGODOT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "gdextension_interface.h" + +/** + * @name libgodot_create_godot_instance + * @since 4.4 + * + * Creates a new Godot instance. + * + * @param p_argc The number of command line arguments. + * @param p_argv The C-style array of command line arguments. + * @param p_init_func GDExtension initialization function of the host application. + * + * @return A pointer to created \ref GodotInstance GDExtension object or nullptr if there was an error. + */ +GDExtensionObjectPtr libgodot_create_godot_instance(int p_argc, char *p_argv[], GDExtensionInitializationFunction p_init_func); + +/** + * @name libgodot_destroy_godot_instance + * @since 4.4 + * + * Destroys an existing Godot instance. + * + * @param p_godot_instance The reference to the GodotInstance object to destroy. + * + */ +void libgodot_destroy_godot_instance(GDExtensionObjectPtr p_godot_instance); + +#ifdef __cplusplus +} +#endif + +#endif // LIBGODOT_H