Commit graph

25 commits

Author SHA1 Message Date
Ignacio Etcheverry
3380565e4b C#: Generate the correct integer and floating point types 2019-04-27 01:30:46 +02:00
Ignacio Etcheverry
340252727b C#: Mark generated property accessor methods as Obsolete
- Methods that act as accessors for properties in the same class (like `GetPosition` and `SetPosition` are for `Position`) are now marked as obsolete. They will be made private in the future.
2019-04-25 20:34:35 +02:00
Ignacio Etcheverry
c20a3823a2 C# bindings generator cleanup
- Normal log messages are no longer warnings.
- BindingsGenerator is no longer a singleton.
- Added a log function.
2019-04-25 20:34:28 +02:00
Ignacio Etcheverry
f64aa02933 Use StringBuilder in C# bindings generator
- Also fixed generation of empty summary comments when no comment should have been generated.
2019-04-19 02:11:39 +02:00
Ignacio Etcheverry
c8aa85189a EditorHelp, makerst: Improve enum ref resolving and constant ref support
Enum reference resolving will now search in the @GlobalScope if no class is specified and the enum cannot be resolved in the current class.
Added support for constant references in EditorHelp, e.g.: [constant KEY_ENTER] or [constant Control.FOCUS_CLICK]. It supports enum constants (the enum name must not be included).
2019-03-29 23:40:31 +01:00
Ignacio Etcheverry
1ad16b3d4a C#: Bindings generator now translates BBCode docs to XML comments 2019-03-23 20:39:55 +01:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Ignacio Etcheverry
02d5ff4cd0 Improve the C# API projects generation
- Now there is only one solution that contains both GodotSharp and GodotSharpEditor project. Previously we had one solution for each project
- GodotSharpEditor reference GodotShatp with a 'ProjectReference'. Previously it was a 'Reference' to the assembly
- This also simplifies the command line option to generate this solution: 'godot --generate-cs-api <OutputDir>'
2018-11-08 01:05:22 +01:00
Ignacio Etcheverry
2adef1e52f Fix prefix erasing for the generated C# enum constants 2018-10-18 20:11:11 +02:00
Ignacio Etcheverry
23ae64b15e C#: Optimize struct marshalling
- We no longer box struct to return them from internal calls.
- Use reinterpret_cast if the managed struct layout is the same as the native struct.
2018-10-17 22:36:26 +02:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Ignacio Etcheverry
d21c64cc3b C#: Fix cs_files glue mismatch bug 2018-09-12 03:24:08 +02:00
Ignacio Etcheverry
b1356a3590 Cleanup of c# api files and bindings generator
- We no longer generate RID and NodePath C# classes. Both will be maintained manually.
- We no longer generate C# declarations and runtime registration of internal calls for the following classes: RID, NodePath, String, GD, SignalAwaiter and Godot.Object (partial base).
- We no longer auto-generate the base members of Godot.Object. They will be maintained manually as a partial class.

This makes it easier to maintain these C# classes and their internal calls, as well as the bindings generator which no longer generates C# classes that don't derive from Godot Object, and it no longer generates the Godot.Object base members (which where unreadable in the bindings generator code).

- Added missing 'RID(Object from)' constructor to the RID C# class.
- Replaced MONO_GLUE_DISABLED constant macro with MONO_GLUE_ENABLED.
- Add sources in module/mono/glue even if glue is disabled, but surround glue files with ifdef MONO_GLUE_ENABLED.
2018-09-12 03:23:45 +02:00
Ignacio Etcheverry
aa2bcf3dfc C# generated classes ignore warning CS1591 and cleanup 2018-08-27 20:39:51 +02:00
Ignacio Etcheverry
fbc808012f Mono: BindingsGenerator enum fixes
- Make enums have an unique signature name of int. This means that when generating internal methods, there is no difference between different enums types nor between enums and int. This way enums can re-use internal methods.
- Make type resolver fallback to int if a type is not found and it's an enum.
2018-04-28 22:25:25 +02:00
Ignacio Etcheverry
f37090ccf4 Mono: Better versioning and gracefully unloading of Godot API assemblies 2018-02-25 20:56:27 +01:00
Paolo Perkovic
08d4bfacaf Fix inconsistencies and typos in argument names 2018-02-01 16:47:20 +01:00
Ignacio Etcheverry
58448561c7 Mono: Fix NodePath and RID bindings 2018-01-25 23:46:54 +01:00
Ignacio Etcheverry
252702a304 Mono: Fix iteration order of object types when generating bindings 2018-01-09 19:06:59 +01:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Ignacio Etcheverry
fe391393d4 Mono: Change BindingsGenerator singleton to avoid StringName leaks 2018-01-01 03:05:19 +01:00
Ignacio Etcheverry
0a0a44da8d Mono: Make the bindings generator output enums
- Switch to PascalCase for constants names
2017-12-24 04:20:41 +01:00
Ignacio Etcheverry
452313ffb1 BindingsGenerator cleanup and improved error messages
If there is an error generating a property or a method, the error message will include the member and class names.
2017-10-29 02:37:13 +01:00
Ignacio Etcheverry
e36fb95c50 Added mono module 2017-10-03 00:01:26 +02:00