Commit Graph

14 Commits

Author SHA1 Message Date
Elyes HAOUAS 2c8baa76f1 Fix typos - (Part #3)
Fix some typos

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12017
2020-07-06 10:52:51 +02:00
Yeongjong Lee 5679a5d2a2 eina_mono: make internal classes internal
This hide internal classes..

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D10912
2019-12-23 15:02:31 -03:00
Bruno da Silva Belo 6772a78d02 csharp: Specifying StringComparison.
Summary: ref T8405

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8405

Differential Revision: https://phab.enlightenment.org/D10650
2019-11-20 17:47:44 -03:00
Lauro Moura 600163320b csharp: Some missing conversions
Summary:
Ref T8430

Depends on D10616

Reviewers: brunobelo, segfaultxavi, felipealmeida, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8430

Differential Revision: https://phab.enlightenment.org/D10652
2019-11-13 10:05:27 -03:00
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
Yeongjong Lee c25ba58007 mono: encapsulate invoke method
Summary: This patch will fix compiler warning CA1401.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10338
2019-10-17 20:29:58 -03:00
Lauro Moura 7daa2cffea csharp: Fix docs and hide stuff from stringshare.
Summary: ref T8293

Reviewers: segfaultxavi, brunobelo, felipealmeida, woohyun

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8293

Differential Revision: https://phab.enlightenment.org/D10325
2019-10-10 10:25:56 +02:00
Lauro Moura b19953fe3a csharp: Add missing since docs to a bunch of classes.
Summary:
Proper documentation will come in later commits.

ref T8293

Reviewers: woohyun, felipealmeida, segfaultxavi, brunobelo

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8293

Differential Revision: https://phab.enlightenment.org/D10260
2019-10-01 00:10:15 -03:00
Vitor Sousa ec501a6623 csharp: fix some build warnings related with incorrect and missing documentation
Summary:
Some parameter names, tag names and cref identifiers in the documentation were
incorrect and causing warnings during compilation.
There were also warnings related with missing documentation in publicly
visible elements in the manual binding.

This commit fixes these incorrections and adds documentation to the manual
binding in order to solve these compilation warnings.

Warnings related with missing documentation in `.eo` files are still present.

Test Plan: Just compile with mono binding.

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9243
2019-07-08 17:20:08 +02:00
Vitor Sousa 4496022a3c csharp: fix Eina_Stringshare support in containers for manual and generated API
Summary:
Both C strings and eina stringshares are bound as regular strings in EFL#, as
working directly with these types would demand unnecessary hassle from the user
viewpoint.
But for eina containers this distinction is important, and since C# generics
do not provide a convenient way of dealing with the same type requiring a
different management based on some other condition (at least not without
compromising the usability for other types), we added a simple `System.String`
wrapper named `Eina.Stringshare` that works as a placeholder for signaling
this distinction.

Working with this class should be transparent in most use cases because it
converts to and from `System.String` implicitly.
It also implements equality/inequality methods for easier comparison with
strings and other stringshare objects.

Add new methods and a new container element trait for dealing specifically
with `Eina_Stringshare` elements.

Adapt eolian_mono to identify and generate the proper placeholder in methods
that require stringshare containers.

Remove some direct uses of DllImport-ed functions in favor of more flexible
manual binding methods.

Move `Eina.Stringshare` DllImport directives to a static class named
`NativeMethods`, in accordance with the code design warning CA1060.
Also add a TODO comment to move all other DllImport directives to this class.

Change parameter of the method `Efl.Csharp.Application.OnInitialize` from
`Eina.Array<System.String>` to `string[]`.
This will make this API more similar with the default C# way of receiving
command line arguments.

Add tests for containers storing stringshare elements.

Reviewers: felipealmeida, lauromoura, segfaultxavi, bu5hm4n

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9178
2019-06-28 10:44:52 -03:00
Jaehyun Cho 0d37e8ff49 mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules  : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules  : SA1500, SA1501, SA1502, SA1503, SA1513

Indentation is also applied.

Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 16:57:52 +02:00
Lauro Moura 3623753c1d csharp: Change to new class API.
Summary:
As discussed in T7204:

- Eo Interfaces/mixins -> C# Interfaces with concrete class
  implementations
- Eo Regular/Abstracts -> Proper C# classes
- Added some new generators and helper methods.
- Refactored the class generator, splitting into helper methods

Eo handles now are stored only in the "root" class in any given
inheritance tree (generally, Efl.Object), and accessible to each child.
Methods also are defined in a single place instead of repeatedly
generated in everyfile, reducing the size of the generated .dll from
30MB to around 4.5MB.

Mixins are generated as C# interfaces but any regular class it inherits
from is lost, as we can't have interfaces inheriting from regular
classes. This will be dealt with in a later commit.

Summary of API Changes:

- Merged Inherit/Concrete classes. (These suffixes disappear from
  regular classes).
- Interface still have implementations with 'Concrete' suffix for when
  they are returned from methods.
- Removed 'I' from interface names.
- Removed interfaces for regular/abstract Eo classes.
- Concrete classes for interfaces/mixins hold the event argument struct.
- Removed '_' from classes, enums, structs, etc, as indicated in C#
  naming conventions.
- Namespaces are now Camel.Cased.
- Renamed IWrapper's raw_handle/raw_klass to NativeHandle/NativeClass

Also renamed the test classes as after the namespace change, the
test namespace Test can conflict with the helper Test namespace.
(And use more meaningful names than Test.Testing...)

Also Fixes T7336 by removing a deprecated example and adding
efl_loop_timer_example to build system.

Fixes T7451 by hiding the class_get DllImports and renaming the IWrapper
fields. The native handlers are used in the manual binding.

Still need to work:

- As there are still some events names clashing (e.g. Efl.Ui.Bg with "resize"
  from Efl.Gfx.Entity and Efl.Gfx.Image), Events are currently declared on
  the interface and implemented "namespaced" in the classes,
  requiring the cast to the interface to access the event.
- The Mixin Conundrum. Mixin inheritance will be dealt in a future
  commit.

Depends on D7260

Reviewers: segfaultxavi, vitor.sousa, felipealmeida, Jaehyun_Cho

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7451, T7336

Differential Revision: https://phab.enlightenment.org/D7262
2018-11-29 21:29:48 -02: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 9391407319 efl_mono: Adding support code for the C# binding
This is the C# manual code for the binding. Buildsystem integration will
come in a future commit.
2017-12-04 15:47:49 -03:00