summaryrefslogtreecommitdiffstats
path: root/core/extension/extension_api_dump.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #93311 from dsnopek/gdextension-required-virtualsRémi Verschelde2024-09-271-0/+1
|\ | | | | | | GDExtension: Mark virtual function as `is_required` in `extension_api.json`
| * GDExtension: Mark virtual function as `is_required` in `extension_api.json`David Snopek2024-09-111-0/+1
| | | | | | | | Co-authored-by: Jovan Gerodetti <jovan.gerodetti@titannano.de>
* | Add metadata for `char16_t` and `char32_t`Raul Santos2024-09-121-1/+1
|/ | | | | | | | 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`.
* Implement typed dictionariesThaddeus Crews2024-09-041-0/+3
|
* Replace `find` with `contains/has` where applicableA Thousand Ships2024-05-081-1/+1
| | | | | | | * Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers
* Reduce and prevent unnecessary random-access to `List`A Thousand Ships2024-05-041-13/+22
| | | | | | | | | Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
* Add PackedVector4Array Variant typeK. S. Ernest (iFire) Lee2024-05-031-0/+2
| | | | | Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* [Core] Add iteration support to `Array`A Thousand Ships2024-04-101-14/+10
|
* Fix operator documentation in GDExtension API dump with docsRicardo Buring2023-12-121-3/+8
| | | | The type of the right operand is now taken into account.
* Add brief description in GDExtension API dump with docsRicardo Buring2023-10-141-20/+22
| | | | | Also rename the "documentation" key to "description" for internal consistency.
* Optionally include documentation in GDExtension API dumpRicardo Buring2023-09-261-4/+217
|
* Fix method hashes with default argumentsDavid Snopek2023-09-211-1/+9
|
* Exclude unexposed classes from the extension_api.jsonDavid Snopek2023-08-291-0/+3
|
* Update extension api validationRedworkDE2023-05-241-27/+104
| | | | | | | | | - Ensure that multiple changes to one method cannot hide each other in the CI. - Check virtual methods for changes. - Compare the detailed changes to a method. - Compare enums. - Fix comparing global enums. - Use `vformat` to build error messages.
* Add a backwards-compatibility system for GDExtension methodJuan Linietsky2023-05-151-0/+280
| | | | | | | | | | | | | | | | | | | | This adds a way to ensure that methods that were modified in the Godot API will continue working in older builds of GDExtension even if the new signature is different. ```C++ // New version (changed) ClassDB::bind_method(D_METHOD("add_sphere","radius","position"),&MyShapes::add_sphere); // Compatibility version (still available to extensions). ClassDB::bind_compatibility_method(D_METHOD("add_sphere","radius"),&MyShapes::_compat_add_sphere); ``` **Q**: If I add an extra argument and provide a default value (hence can still be called the same), do I still have to provide the compatibility version? **A**: Yes, you must still provide a compatibility method. Most language bindings use the raw method pointer to do the call and process the default parameters in the binding language, hence if the actual method signature changes it will no longer work. **Q**: If I removed a method, can I still bind a compatibility version even though the main method no longer exists? **A**: Yes, for methods that were removed or renamed, compatibility versions can still be provided. **Q**: Would it be possible to automate checking that methods were removed by mistake? **A**: Yes, as part of a future PR, the idea is to add a a command line option to Godot that can be run like : `$ godot --test-api-compatibility older_api_dump.json`, which will also be integrated to the CI runs.
* Fix crash when dumping extension API in a non-writable directoryHaoyu Qiu2023-03-081-0/+1
|
* Add `GodotTypeInfo::Metadata` to `MethodInfo`Raul Santos2023-01-261-2/+13
|
* Add missing is_bitfield field for global enum in extension_api_dumpEmmanuel Leblond2023-01-141-0/+3
|
* Use BitField<> in core type masksJuan Linietsky2023-01-081-0/+2
| | | | | | | | * All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Merge pull request #65990 from ↵Rémi Verschelde2022-12-191-62/+148
|\ | | | | | | | | | | touilleMan/gdextension-expose-builtins-members-real-types Expose in builtins' members internal type & size (on top of offset) in extension_api.json
| * Expose in builtins' members internal type & size (on top of offset) in ↵Emmanuel Leblond2022-12-151-62/+148
| | | | | | | | extension_api.json
* | Rename all gdnative occurences to gdextensionGilles Roudière2022-12-121-4/+4
|/ | | | | | | | | | | | | Non-exhaustive list of case-sensitive renames: GDExtension -> GDNative GDNATIVE -> GDEXTENSION gdextension -> gdnative ExtensionExtension ->Extension (for where there was GDNativeExtension) EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION) gdnlib -> gdextension gdn_interface -> gde_interface gdni -> gde_interface
* Merge pull request #64427 from ↵Rémi Verschelde2022-12-011-3/+12
|\ | | | | | | | | | | touilleMan/gdextension-skip-undefined-field-in-properties [GDExtension] Skip unset getter/setter/index fields in class property
| * Skip unset getter/setter/index fields in class property when generating ↵Emmanuel Leblond2022-11-121-3/+12
| | | | | | | | extension_api.json
* | Correct Rect2 members offsets declaration in extension_api.json generatorEmmanuel Leblond2022-11-121-1/+1
|/
* GDExtension: Ensure newline at EOFRémi Verschelde2022-11-071-4/+5
|
* Fix extension_api.json Variant types incorrectly displayed as `Nil`Emmanuel Leblond2022-10-101-17/+22
|
* Merge pull request #65817 from bruvzg/typed_arrayRémi Verschelde2022-09-231-0/+3
|\
| * [GDExtension] Implement support for typed arrays.bruvzg2022-09-221-0/+3
| |
* | Fix various -Wmaybe-uninitialized warnings from GCC 12.2.1Rémi Verschelde2022-09-221-2/+2
|/ | | | | | Not sure why I didn't get those before, it may be due to upstream changes (12.2.1 is a moving target, it's basically 12.3-dev), or simply rebuilding Godot from scratch with different options.
* Fix is_keyed param in extension_api.jsonEmmanuel Leblond2022-09-211-1/+1
|
* Merge pull request #64690 from ↵Rémi Verschelde2022-08-231-1/+6
|\ | | | | | | touilleMan/projection-members-offsets-in-gdentension-api
| * Add missing Projection's members offsets to gdextension_api.jsonEmmanuel Leblond2022-08-211-1/+6
| |
* | Ignore fake properties in classes when generating extension_api.jsonEmmanuel Leblond2022-08-221-1/+8
|/ | | | | | | | | In extension_api.json we want to expose properties that are meant to access a class attribute from script (i.e. `Node2D.position`). However property system is also used in Godot to declare attributes accessible from the node editor: - property with '/' in their name - property array with NIL type that represents an array
* Implement Vector4, Vector4i, Projectionreduz2022-07-231-0/+14
| | | | | | | | | | | | | Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
* Use BitField hint for the TextServer enums. Add missing parts for BitField ↵bruvzg2022-07-151-1/+4
| | | | support to the GDextension API.
* Implement a BitField hintreduz2022-07-051-1/+2
| | | | Allows to specify the binder that an enum must be treated as a bitfield.
* Add core types enums description to extension api jsonPierre-Thomas Meisels2022-06-231-0/+32
|
* Make enum/constant binds 64-bit.bruvzg2022-06-171-5/+5
|
* Replace most uses of Map by HashMapreduz2022-05-161-1/+1
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Fix extension_api.json builtin_class_member_offsets member names for ColorEmmanuel Leblond2022-05-081-4/+4
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-2/+1
|
* Add static method support to ClassDBreduz2022-03-221-0/+2
| | | | | | | | | * Based on the work done for Variant in the past. * Added `ClassDB::bind_static_method` * Cleaned up ClassDB::bind_method to use variadic templates. This adds support for having static methods in Object derived classes. Note that this does not make it work yet in GDScript or Mono and, while it works for GDExtension, GodotCPP needs to be updated.
* Create GDExtension clases for PhysicsServer3Dreduz2022-03-151-18/+7
| | | | | | | * Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support) * Some changes on native struct binding for PhysicsServer This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-2/+2
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Implement TextServer GDExtension interface, remove TextServer GDNative ↵bruvzg2021-10-011-0/+17
| | | | interface.
* Use range iterators for `Map`Lightning_A2021-09-301-3/+3
|
* Implement NativeExtension pointer argumentsreduz2021-08-231-0/+21
| | | | | | | | * Allows calling into native extensions directly with a pointer * Makes it easier to implement some APIs more efficiently * Appears with a "*" in the documentation for the argument. * Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint. * AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.