Commit Graph

10 Commits

Author SHA1 Message Date
Lauro Moura 40a980174b csharp: Add licensing information.
Summary:
C# bindings will be lincensed under Apache Sofware License 2.0.

This commit adds the license text to the licenses folder and a copyright
notice to the binding files.

Fixes T8039

Reviewers: woohyun, felipealmeida, vitor.sousa

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8039

Differential Revision: https://phab.enlightenment.org/D9414
2019-10-24 10:10:56 -03:00
Bruno da Silva Belo 15897cd9c3 efl-mono: Additional blank line between all methods.
Summary:
For better indentation, adding a blank line in the end of
methods.

Test Plan:
using efl_ui_layout.eo.cs, efl_access_object.eo.cs, efl_part.eo.cs and efl_ui_factory_bind.eo.cs as references,
apply changes to the code then check the diffs of after and before of the references files

Reviewers: lauromoura, felipealmeida

Reviewed By: lauromoura

Subscribers: cedric, felipealmeida, lauromoura

Tags: PHID-PROJ-uhnmnvlvunw6jgoqdnd4, #efl_language_bindings, #refactoring

Maniphest Tasks: T8167

Differential Revision: https://phab.enlightenment.org/D9712
2019-09-23 21:28:14 -03:00
Lauro Moura dfb856158c csharp: Skip non-public members from interfaces
Summary:
Eolian allows non-public members in interfaces and mixins (usually
@protected). As both kinds are converted to C# interfaces, this
causes problem as non-public members are forbidden in C# interfaces.

This commit changes eolian_mono by removing those members from the C#
interfaces. If a generated class implements the interface, the method is
generated as if it were a protected member of the class directly.

For mixed properties like `Efl.Io.Reader.CanRead { get; set @protected; }`,
the interface has only the public getter and the the implementing class has both
the public getter and the protected setter.

With this, C# devs won't be able to directly implement protected Eo
methods from interfaces. (But this really does not make sense from the
C# point of view).

ref T7494

Reviewers: segfaultxavi, felipealmeida, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, brunobelo, Jaehyun_Cho, #reviewers, woohyun, #committers

Tags: #efl

Maniphest Tasks: T7494

Differential Revision: https://phab.enlightenment.org/D9800
2019-09-10 19:30:47 -03:00
Lauro Moura 586bc5207e efl-mono: Enable selecting to build @beta items
Summary:
For autotools, use --enable-csharp-beta to enable the generation of beta
methods and properties, for meson use -Dmono-beta=true.

By default, no beta method or property is generated.

Reviewers: woohyun, segfaultxavi, bu5hm4n, lauromoura

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7637
2019-01-17 21:45:49 +09:00
Lauro Moura 4636d6e0eb efl_mono: Change generated classes naming scheme
Summary:
Now the generated classes use an approach more familiar to C#
developers:

Interfaces: efl.Object -> efl.IObject

Concrete (implementation) classes: efl.ObjectConcrete -> efl.Object.

During this change, some methods that could clash with the
implementation class name (CS0542) had the prefix "Do" added (like in
efl.Duplicate.Duplicate() and efl.Pack.Pack()).
Depends on D6049

Reviewers: felipealmeida, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6050
2018-05-03 18:04:41 -03:00
Lauro Moura a413914c18 efl_mono: Move event generators to its own header.
Summary:
Making it easier to share code between self and inherited events.

During this move, the namespace and keyword headers were merged into the
name_helpers header.

Also added the first seed of a generic namespace reducer function,
to be used by other functions in later commits.
Depends on D5994

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: segfaultxavi, cedric

Differential Revision: https://phab.enlightenment.org/D5995
2018-04-26 10:55:18 -03:00
Lauro Moura 429d7510b0 efl_mono: Reorganize utility functions.
Summary:
Blacklist functions are all in the header/namespace blacklist.

Helper functions returning strings (names) are in the name_helpers
header. They act somewhat like "mini-generators".

Helpers.hh was left with other kind of helper functions (checks, etc)
that do not return strings.
Depends on D5992

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5993
2018-04-26 10:55:18 -03:00
Lauro Moura 65f868786a efl_mono: Proper support for @class methods.
Previously, class methods were implemented as regular instance methods.
This commits generates C# static methods for @class methods on the
*Concrete classes (and their childs).
2018-04-12 21:23:42 -03:00
Lauro Moura 46b202b86c eolian-mono: Add documentation generation support
This commit adds the "documentation" generator, which gets the
documentation_def attribute of the given item and generates xml comments
to be exported by MCS.

For items requiring some customization of the generated comments (e.g.
functions and its parameters), the helpers to generate the preamble
(summary), body (paragraphs) and epilogue (currently just the @since
tag) were added.

Currently we do not support converting Eolian references into xmldoc
references.

As we explicitly generate Get/Set methods for properties, for now the
generator tries to get the get/set specific documentation first. If it
is not present, fallback to the common docs.

Later this could be changed to generate the common one as paragraphs of
the Get/Set.

Also some generated code like the wrappers for calling C# methods
from C can be private. This will cleanup the introspection results
and warnings when generating documentation.

Due to this visibility change, the binbuf tests had to be changed
to add redirect calls to the native methods instead of directly
calling the DllImport'd methods.
2017-12-20 19:57:17 -02:00
Lauro Moura d93e9ff286 eolian_mono: Added code for eolian_mono generator
Based on the eolian_cxx library generators. Buildsystem files will come
in a future commmit.
2017-12-04 15:47:50 -03:00