22 Commits

Author SHA1 Message Date
Jan Haller
fce753c05d Extension header: amend const correctness of p_args parameters 2022-12-14 15:47:42 +01:00
Rémi Verschelde
bab247dcb6
Rename godot-headers to gdextension, move header to top folder
Changes the `<godot/gdextension_interface.h>` include to simply
`<gdextension_interface.h>`.

Refactor and better document the SCons and CMake logic around setting
the paths to the header and API JSON file.
2022-12-14 12:36:59 +01:00
Gilles Roudière
c02e644679 Rename GDNative to GDExtension
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
2022-12-12 11:06:38 +01:00
Emmanuel Leblond
fe86a94dcf
Fix const qualifier for parameters in GDExtension api functions 2022-12-03 00:27:07 +01:00
Andy Maloney
c7e34c2f9d Basic static analysis fixes
- remove extraneous semicolons
- use "nullptr" instead of "0"
- remove "break" after "return"
- use <cstdio> instead of <stdio.h>
2022-11-18 17:46:13 -05:00
Emmanuel Leblond
b6ba0dca13
StringName is working fine with demo \o/ 2022-11-08 21:44:33 +01:00
Emmanuel Leblond
a706a9ceb9
Remove now useless _alloc_and_copy_cstr 2022-11-08 21:44:31 +01:00
Emmanuel Leblond
e24b6b0e51
Use StringName in the whole GDExtension API instead of const char * 2022-11-08 21:44:31 +01:00
Emmanuel Leblond
b21931c4a3
Type GDNativePropertyInfo.type field as GDNativeVariantType 2022-10-13 14:04:54 +02:00
Aaron Franke
592bd15c7a
Run scripts to format and make headers consistent 2022-10-09 01:47:07 -05:00
bruvzg
36273baa7e
Change PropertyInfo members to String. 2022-09-14 08:41:09 +03:00
bruvzg
270ad28931
Add support for _notification, _set, _get, _get_property_list, _property_can_revert, _property_get_revert, and _to_string methods. 2022-08-22 12:59:38 +03:00
Alessandro Famà
d894f48f25 Fix crash when using static methods without return value 2022-07-03 17:00:43 +02:00
Teodor Potancok
5c32dc3948 Cast Variant::Type to GDNativeVariantType 2022-05-17 07:01:43 +02:00
bruvzg
031a83b0ea
[Method Bind] Add support for default argument values and static method binding. Sync headers. 2022-05-06 10:17:51 +03:00
bruvzg
057a771fda
Add support for variadic method binds with the typed return. Sync headers. 2022-03-30 15:11:28 +03:00
Rémi Verschelde
1632322ce0 Update copyright year 2022-03-15 10:17:53 +01:00
Melissa Geels
d97dc518d3 Fixed crash on release builds due to missing argument type information 2022-03-02 14:44:23 +01:00
Bastiaan Olij
94efe3d410 Fixing compiler warnings around implicit type casting loosing precision 2021-11-22 21:48:20 +11:00
George Marques
38ee8bfcf7 Change constructor/destructor management of extension classes
This makes sure custom constructors are always called on extension
classes. However, note that constructors should not take any parameters,
since Godot doesn't support that. Parameters are ignore in memnew macro.

Use memnew(MyClass()) instead of memnew(MyClass) since it now needs a
value instead of a class name. This macro calls MyClass::_new() (define
in GDCLASS macro) which ultimately calls Godot to create the object,
ensuring that both the Godot and the extension instances are created.

Non Godot classes (that don't derive godot::Object) are constructed as
usual an can have parameters.

memdelete is also changed for the same reason, as it needs to destroy
the Godot object as well, and that automatically frees the bound
extension instance.
2021-09-27 23:08:11 +10:00
George Marques
a0634cca3f Auto-bind virtual method overrides 2021-09-27 23:08:08 +10:00
George Marques
e4ed48976a Replace bindgins to work with extensions 2021-09-27 23:08:08 +10:00