David Snopek
d5eb66947b
Fix minor inconsistencies and errors in gdextension_interface.h
2025-06-22 07:56:00 -05:00
David Snopek
3b7e34556c
GDExtension: Always run shutdown callback before deinitializing any levels
2025-06-18 07:51:12 -05:00
Rémi Verschelde
e9775a0c57
Merge pull request #106030 from raulsntos/gdextension/main-loop-callbacks
...
[GDExtension] Add function to register main loop callbacks
2025-06-10 12:29:52 +02:00
Raul Santos
73488f5afd
[GDExtension] Add function to register main loop callbacks
2025-06-10 04:55:20 +02:00
Thaddeus Crews
5b935881fc
Typed array equality operator logic updated
...
• Instead of calling to `_ref`, the same effect is achieved by calling to the base class assignment operator
• No longer need to be expose `_ref`; set back to private & remove reference from gdextension_interface
2025-05-13 14:41:16 -05:00
Thaddeus Crews
01fc9aee6c
Core: Modernize C headers with C++ equivalents
2025-05-02 08:23:01 -05:00
David Snopek
2dff9fef37
GDExtension: Add mechanism to get which classes an extension is using
2025-03-17 15:27:14 -05:00
Thaddeus Crews
69529ff0aa
Merge pull request #102373 from dsnopek/gdextension-set-script-instance
...
GDExtension: Add interface functions for `Object::set_script_instance()`
2025-03-11 16:53:57 -05:00
Thaddeus Crews
324512e11c
Style: Replace header guards with #pragma once
2025-03-07 17:33:47 -06:00
Raul Santos
05ffa218f3
GDExtension: Add all Engine.get_version_info fields to get_godot_version
...
Added in a new `get_godot_version2` function with a new
`GDExtensionGodotVersion2` to avoid breaking compatibility.
2025-02-24 17:37:27 +01:00
David Snopek
7095431aa7
GDExtension: Add interface functions for Object::set_script_instance()
2025-02-04 14:47:06 -06:00
David Snopek
39f16e70f8
GDExtension: Add compatibility system for virtual methods
2025-01-10 16:00:05 -06:00
Raul Santos
69f1cc10b6
GDExtension: Add icon path to class creation info
...
Allows GDExtensions to set the icon of a class programmatically, which is useful for extensions that don't use a `.gdextension` file.
2024-12-17 08:43:12 +01:00
Rémi Verschelde
88e81ee730
Fix various typos and code style issues
2024-11-28 17:40:42 +01:00
Lukas Tenbrink
ffd4de67d0
Add variant_get_ptr_internal_getter to gdextension_interface.h. The function returns functions to retrieve a pointer to a Variant's internal value. This enables GDExtensions to implement functionality similar to VariantGetInternalPtr, to access Variant internal values directly.
2024-11-26 02:19:03 +01:00
David Snopek
971e154588
GDExtension: Allow directly getting ObjectID from Variant
2024-09-17 11:58:55 -05:00
Rémi Verschelde
f8fbb860f5
Merge pull request #95840 from raulsntos/char_metadata
...
Add metadata for `char16_t` and `char32_t`
2024-09-12 09:25:19 +02:00
Raul Santos
aaffab8afb
Add metadata for char16_t and char32_t
...
We don't seem to expose any API that uses `char16_t` yet, but I added it anyway since we make the type info for it.
I didn't add anything for `wchar_t` because we are not making a type info so maybe we don't have a need for it yet, it could be added in the future.
To prevent breaking compatibility with the C# bindings, we ignore the `char32_t` metadata and still use `System.Int64`.
2024-09-12 02:15:55 +02:00
Raul Santos
9e57674550
Remove get_rid_func from GDExtensionClassCreationInfo4
2024-09-10 12:35:24 +02:00
Thaddeus Crews
9853a69144
Implement typed dictionaries
2024-09-04 10:27:26 -05:00
Jan Haller
82b2a58f4c
Fix bool type appearing in GDExtension header
2024-08-31 22:40:48 +02:00
Daylily-Zeleen
3d575801ce
Allow ClassDB to create a Object without postinitialization for GDExtension.
2024-08-20 20:19:02 +08:00
Jan Haller
b2a9ea6d22
GDExtension docs: advise bindings to use uint64_t for bitfields
2024-07-15 22:37:33 +02:00
bruvzg
e651421905
[TextServer, GDExtension] Fix building text servers as GDExtension, expose new/changed low-level methods to GDExtension API.
2024-06-12 19:30:19 +03:00
Rémi Verschelde
4b070e8031
Fix various typos with codespell
...
Using 2.2.7.dev217+g10c2abcf.
Had to add `colour` to the ignore list as we used it as an alias/keyword for the
documentation of color-related APIs.
Also ignore recommendations to change `thirdparty` to either `third-party` or
`third party`, which are correct but we use the former fairly consistently.
2024-05-07 10:08:42 +02:00
K. S. Ernest (iFire) Lee
f9b488508c
Add PackedVector4Array Variant type
...
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com >
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com >
2024-05-03 00:58:27 +02:00
Jan Haller
27a637d287
GDExtension: provide free_property_list_func with length of array
2024-04-27 14:13:17 +02:00
A Thousand Ships
0c19d0f5a0
Add extension support for argument count to ScriptInstance
2024-03-13 22:40:09 +01:00
A Thousand Ships
59bcc2888c
Add methods to get argument count of methods
...
Added to:
* `Callable`s
* `Object`s
* `ClassDB`
* `Script(Instance)`s
2024-03-10 11:02:43 +01:00
David Snopek
0badf07657
GDExtension: Pass count when freeing method and property lists for script instances
2024-03-02 10:13:37 -06:00
David Snopek
ea75307a11
Allow registering "runtime classes"
2024-02-20 09:20:58 -06:00
David Snopek
be11002e41
Allow GDExtensions to register virtual methods and call them on scripts
2024-02-12 13:29:18 -06:00
Riteo
f468e59efd
GDExtension: add an interface for loading extra documentation
...
Adds two new GDExtension interface methods:
- `editor_help_load_xml_from_utf8_chars`
- `editor_help_load_xml_from_utf8_chars_and_len`
Both of these methods parse the XML passed into an extra documentation
container which, when needed, is merged into the main doc container.
Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com >
2024-01-26 13:53:33 +01:00
David Snopek
b0a33cac7c
GDExtension: Use ObjectID when creating custom callable
2023-10-23 09:05:17 -05:00
Emmanuel Leblond
5aa9f1ce64
Fix comment in gdextension_interface.h
2023-10-16 21:40:45 +02:00
Ced Naru
0a246e9b54
expose Object::free_instance_binding to GDExtension
2023-10-04 19:24:37 +02:00
David Snopek
cbf939e121
GDExtension: Don't deprecate old method of getting script category
2023-10-02 09:23:27 -05:00
David Cambré
531f56e830
add GDExtensionScriptInstanceGetClassCategory
...
Change GetClassCategory so it is handled in native directly
2023-09-27 17:45:48 +02:00
David Snopek
2733a6f762
Implement reloading of GDExtensions
2023-09-25 22:10:17 -05:00
Jan Haller
c770937db5
More precise documentation for GDExtension String constructors (bytes vs. character count)
2023-09-24 20:57:58 +02:00
Jan Haller
ed3015e979
GDExtension: construct StringName directly from char*
...
So far, an indirection via String was necessary, causing at least 2 allocations and copies (String; String inside StringName).
Since StringNames often refer to string literals, this allows them to be directly constructed from C strings.
There are two formats: Latin-1 and UTF-8.
The Latin-1 constructor also provides the `p_is_static` flag: when the source has static storage duration, no copy/allocation will be needed.
However, the extension developer needs to uphold this lifetime guarantee.
2023-09-24 18:18:05 +02:00
Jeff Ward
60851af4da
Add functions for non-ptr style virtual calls in GDExtension
...
This adds two functions to `GDExtensionClassCreationInfo` that allow for developers to supply a generic virtual call function along with user data to be sent to that call.
If `get_virutal_call_data_func` is not null, extensions call this function to get user data to pass to a supplied `call_virtual_with_data_func`. Both must be provided is one is provided.
If `get_virtual_call_data_func` is null, Godot falls back to the old `get_virtual_func` logic.
Fixes #63275
Co-authored-by: David Snopek <dsnopek@gmail.com >
2023-09-19 22:33:32 -04:00
Rémi Verschelde
8dfc3f1864
Merge pull request #79005 from maiself/gde-custom-callable
...
Allow CallableCustom objects to be created from GDExtensions (extended)
2023-09-19 09:02:49 +02:00
Rémi Verschelde
43c7e8d3b5
Merge pull request #81515 from dsnopek/gdextension-validate-property-object
...
Allow implementing `Object::_validate_property()` from GDExtension
2023-09-11 15:40:05 +02:00
Rémi Verschelde
786dab42fd
Merge pull request #70329 from Daylily-Zeleen/daylily-zeleen/register_internal_class
...
Allow GDExtension to register unexposed classes.
2023-09-11 15:35:31 +02:00
David Snopek
abef8e3874
Allow implementing Object::_validate_property() from GDExtension
2023-09-10 11:17:59 -05:00
David Snopek
3e7a6e058a
Allow implementing ScriptInstance::validate_property() from GDExtension
2023-09-04 13:55:48 -05:00
Daylily-Zeleen
41ffe5461f
Allow GDExtension to register unexposed class.
2023-09-04 10:18:20 +08:00
Jan Haller
4e202bcec7
GDExtension: fix bool unknown in C
2023-09-02 21:04:49 +02:00
Mai Lavelle
e0ee985f64
Allow CallableCustom objects to be created from GDExtensions
...
Co-authored-by: David Snopek <dsnopek@gmail.com >
2023-08-31 12:36:25 -04:00