Commit Graph

113 Commits

Author SHA1 Message Date
Vitor Sousa 288f645e3c csharp: update and disable tests that use deprecated eolian type notations
Summary:
Avoid the usage of deprecated Eolian type notations like `ptr()` in C# unit
tests.

In places where an alternative type could be used, tests were changed to use
a valid type, e.g. containers that stored `ptr(int)` were changed to store
`string`.

Tests for types that require a pointer notation were commented out and
disabled. They can be re-enabled when a new notation to the type is defined.

Depends on D9238

Test Plan: `meson test`

Reviewers: lauromoura, felipealmeida, q66, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, bu5hm4n, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9247
2019-07-09 10:05:23 +02:00
Vitor Sousa 7769779a4d eolian_mono: fix non-beta build and support for slice/rw_slice keywords
Summary:
Add support for `slice` and `rw_slice` keywords in eolian_mono.
Now it generates the proper manual binding type for these native types.
Make unit tests use these keywords instead of native names.

Remove some unnecessary `@beta` tags from eolian types in unit tests so now
tests correctly compile without the `mono-beta` compilation flag.

Also make tests that use `Eina.Binbuf` "beta only".
In a future update, the external type `Eina.Binbuf` will be marked as beta, so
we shield the binding in anticipation.

Test Plan: `meson -Dbindings=mono -Dmono-beta=true` and `meson -Dbindings=mono -Dmono-beta=false`

Reviewers: lauromoura, felipealmeida, q66, segfaultxavi, bu5hm4n

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9238
2019-07-09 10:00:06 +02:00
Vitor Sousa 1193e1a757 csharp: fix build warning related with an unused field in an unit test
Test Plan: `meson test`

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9240
2019-07-09 09:59:24 +02:00
Vitor Sousa 73df0d47ff csharp: encapsulate some internal code of EoWrapper
Summary:
Encapsulate some parts of EoWrapper making them less accessible to lib users.
This can avoid unnecessary and risky usage of code that is only intended for
internal usage.

`inherited` field was made private and renamed to `generated`. Now its value
can only be obtained through the `IsGeneratedBindingClass` property.

`handle` field was made private.

`eventLock` was renamed to `eflBindingEventLock`

`ConstructingHandle` property set was made private.

Constructors that are used to create new EFL# managed objects by wrapping a
preexisting eo handle now receive a specific struct wrapping the handle pointer.
This can avoid faulty interactions with the Reflection engine used only for
generated classes that implement this constructor.

Test Plan: meson test

Reviewers: lauromoura, felipealmeida, YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9212
2019-07-05 09:57:23 +09:00
Vitor Sousa 229b363f01 csharp: fix some compilation warnings
Fix unused variable warnings in eina_mono and unit test files.
2019-06-28 10:58:24 -03: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
Vitor Sousa b7fa7d48ac csharp: make inherited C# classes constructible from native C
Summary:
With this commit it is now possible for a class that inherits from a C# binding
class to be instantiated from native C code. It only has to provide a
constructor that receives an `Efl.Eo.EoWrapper.ConstructingHandle` struct,
and which calls the base binding constructor passing it.
For example:

`private Type(ConstructingHandle ch) : base(ch) {}`.

Add some test files to validate the proper behavior of this feature.

Add some small fixes in generation contexts in order to properly
generate base constructors.

Depends on D9070

Test Plan: `meson test` and `make check`

Reviewers: lauromoura, felipealmeida, segfaultxavi, woohyun, YOhoho

Reviewed By: YOhoho

Subscribers: YOhoho, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9071
2019-06-28 10:38:57 -03:00
Lauro Moura ef185e5e28 efl-mono: Fix value forwarding in promises/async
Summary:
Values returned from C# Then callbacks must release ownership of the
underlying native value, so Eina code can clean it up nicely and avoid
the Wrapper flushing it early.

The same issue applied to the Async wrappers. In this case the value
passed as the Task parameter could be released by an `using` block
awaiting the value.

Also Future creation was then-ing the wrong handle.

Also add better exception messages.

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9197
2019-06-27 19:31:55 -03:00
Lauro Moura 0f514b484b csharp: Rename test util parameters
Summary:
Instead of 'expected' and 'actual', use 'lhs' and 'rhs', as it allows
the actually expected value to be in any position.

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl, #expertise_solutions

Differential Revision: https://phab.enlightenment.org/D9196
2019-06-27 19:28:53 -03:00
Lauro Moura 967e32d27a csharp: Update after iterator changes
Summary:
Iterator and Accessors are views only, not owning the data they point
to.

Also updated the tests by handling some test data that were leaking.

Fixes T8036

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers, segfaultxavi, q66

Tags: #efl

Maniphest Tasks: T8036

Differential Revision: https://phab.enlightenment.org/D9189
2019-06-27 14:07:33 -03:00
Jaehyun Cho 2506b9e661 dummy_test_object: remove @owned on iterator
@owned on iterator (view-only container) is removed based on
5b00dc344f
2019-06-27 10:39:44 +09:00
Felipe Magno de Almeida 907bdad065 efl-mono: Add object type support for Eina.Value
Summary:
C# `Eina.Value` now has builtin support for `EINA_VALUE_TYPE_OBJECT`.

To avoid ambiguity with the `Set` method overloads, explicit casting
operators were used for wrapping/unwrapping `Efl.Object` instead of
implicit ones like for other value types.

Thus, to initialize an `Eina.Value` from an object, you can use the
following:

`var v = (Eina.Value)myObj;`

Reviewers: felipealmeida, vitor.sousa, segfaultxavi, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9164
2019-06-25 19:11:23 +09:00
Vitor Sousa fcf5f1d2e2 csharp: Refactor wrapper lifetime.
Summary:
This commit makes use of the `ownership,shared` and `ownership,unique`
events from Efl.Object in order to avoid the C# wrapper from being
collected while C code holds a reference to the object.

For example, creating a list of items in a for loop and attaching events to
them would fails without this commit, as the C# GC may collect the wrapper.

The basic idea is that we use a `WrapperSupervisor`, which is stored in
the Eo data storage, with a GCHandle allocated for the lifetime of the
underlying Eo object. This supervisor takes care of holding either a
weak C# reference (when in unique mode, allowing the wrapper to be GC'd)
or a hard C# reference (when in shared mode, making the wrapper
non-collectable while the Eo has extra references).

One limitation is that object graphs can leak if a shared object in the
graph - an Eo child for example - stores a hard reference to another
object in the graph as a C# field. In this example, this causes the
parent to always have a hard C# reference (from the child) as the child
is non-collectable due to the parent holding an Eo reference to it.

Depends on D8678

Test Plan: `ninja test` and `make test`

Reviewers: lauromoura, felipealmeida, woohyun, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9014
2019-05-31 17:44:12 -03:00
Lauro Moura 937da0b12c csharp: Add some tests
Summary:
- Wrappers losing C# ref while alive in Eo
- Inherited instances being collected

Also cleanup GC and loop queue before each test

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9063
2019-05-31 17:41:14 -03:00
Lauro Moura 37941b757d csharp: Fix testing under dotnet
Summary: Fix LD_LIBRARY_PATH so it can still find the custom exports lib

Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9020
2019-05-31 17:28:00 -03:00
Lauro Moura 708f67c488 csharp: Split test files
Summary: Make it easier to add new tests

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8937
2019-05-22 17:32:46 -03:00
Lauro Moura f93eb3fc04 csharp: Fix event marshalling for value types
Summary:
It was wrongly assuming value types were passed by value.

As stated in the documentation, all arguments are passed with a single
level of indirection.

Fixes T7957

Reviewers: woohyun, felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7957

Differential Revision: https://phab.enlightenment.org/D8889
2019-05-14 08:49:17 +02:00
Lauro Moura 3a570c38c9 csharp: Add Part suffix for the part wrappers
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8835
2019-05-07 13:53:39 +02:00
Marcel Hollerbach e9c49d0f70 meson: do not use the variable name env in mono
env is used for the program env, and should not be used in any other
form here.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8690
2019-04-24 15:52:47 +02:00
Lauro Moura e23914fce7 csharp: Fix test code memory handling
Summary:
It was causing the test to crash when running in debug build.

Also some minor fixes cleaning up stuff when exiting.

Fixes T7792.

Reviewers: segfaultxavi, vitor.sousa

Reviewed By: segfaultxavi, vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7792

Differential Revision: https://phab.enlightenment.org/D8679
2019-04-23 13:02:29 -03:00
Vitor Sousa 7c28762f15 efl-csharp: fix crash when events trigger after C# object `Dispose`
Summary:
Rework general event handling to check individually each event call, if the
object is not alive then the event will not be propagated.
WeakReferences (and lambdas capturing those WeakRefs) are used to ensure this.

Dispose methods in object now take care of checking if efl libraries are still
initialized and thread-safely unregister each event before performing an
efl_unref on the Eo object.

Event handling in C# is now centered around a single dictionary inside the
object: `EoEvents`.

C# event triggers now properly trigger events on C too.

Standardize C# event-triggering methods names (remove underscores).

Some diminished use of static memory due events no longer requiring static key
objects to be registered/unregistered.

Some fixing of white space generation for generated events.

Depends on D8431

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8564
2019-04-05 19:59:47 -03:00
Vitor Sousa 1c22a3d819 efl-csharp: fix resource deallocation causing errors everywhere
Summary:
This commit mainly fixes errors caused by deallocating resources in the garbage
collector thread. Using `ecore_main_loop_thread_safe_call_async` to queue
resource deallocation in the main thread seems to solve it.

Also, some `efl_ref` calls are added in places they were missing, mainly
objects that unref in the destructor thus taking ownership if efl_ref is not
called.

Also fix improper resource deallocation in tests that were causing it to crash,
enabling it to call Efl.All.Shutdown again. This allocation and the deallocation
process was moved from the Eo class constructor to static class methods that are
called in the test 'set up' and 'tear down' methods.

Queuing resource deallocation in the main thread make it mandatory that tests
call `Efl.App.AppMain.Iterate()` if they want to check proper resource
deallocation (like TestFunctionPointers.set_callback_inherited_called_from_c).

Extras:
Remove duplicated declaration of 'eflcustomexportsmono' in meson in order to fix
some linking problems.

Remove some unused code around deallocation functions that had to be reworked.

Object allocation is now supplied with the call site information it expects
(file name and line for _efl_add_start).

Depends on D8550

Test Plan: meson test

Reviewers: felipealmeida, lauromoura, cedric, segfaultxavi

Reviewed By: lauromoura

Subscribers: segfaultxavi

Tags: #efl_language_bindings, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D8431
2019-04-05 19:58:19 -03:00
Lauro Moura 1e22db1150 csharp: Make classes abstract and rework casting
Summary:
Abstract Eo classes are now proper C# abstract classes.

As a side effect, returning Eo instances from native code was reworked
to return instances of their actual Eo classes instead of previous
behavior of returning a generic Efl.Object and using static_cast.

Instead of `var window = Efl.Ui.Win.static_cast(widget.GetParent());`
Use `var window = widget.GetParent() as Efl.Ui.Win;`

Another side effect was that `efl_constructor` was removed from the list
of supported `Efl.Object` overrides. It is invoked inside
`efl_add_internal_start`, before the bindings makes the association of
the newly created EoId with the C# instance that created it, making the
managed delegate meaningless. C# users then can use regular C#
constructors to initialize fields.

Also changed to set the private data of C#-inherited classes before the
call to constructing methods (aka constructor parameters) so C# classes
can override them correctly.

Fixes T7778
Fixes T7757

Reviewers: vitor.sousa, felipealmeida, segfaultxavi

Reviewed By: vitor.sousa, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7778, T7757, T7702

Differential Revision: https://phab.enlightenment.org/D8550
2019-04-05 19:56:42 -03:00
Lauro Moura 731db8b644 csharp: Raise exception when Array is null.
Reviewers: felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8499
2019-04-02 16:48:39 +02:00
Lauro Moura 0881d1524b efl-csharp: Add back I prefix for interfaces.
Summary:
Conforming to C# coding conventions.

For properties, now we only generate a wrapper if its name does not
clash with the name of the class that would be implementing it.

Fixes T7751

Reviewers: vitor.sousa, felipealmeida, segfaultxavi

Reviewed By: vitor.sousa, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7751

Differential Revision: https://phab.enlightenment.org/D8397
2019-03-21 14:48:33 -03:00
Xavi Artigas cbbc5e5eb6 mono-tests: Fix after latest changes to eolian
Summary: Event payload checking is more strict now.

Test Plan: Check that master can be built

Reviewers: lauromoura, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8437
2019-03-21 17:20:13 +01:00
Lauro Moura 43a1d79ba8 csharp: Remove test about conflicting events.
Conflictings events won't be allowed anymore on eolian-based classes.

For manually subclassed C# classes that eventually have conflicts, this
should be dealt with in T7744.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8426
2019-03-20 18:44:02 +01:00
Lauro Moura 4acc7e0667 csharp: Support Efl.Class for interfaces
Summary:
The `GetEflClassStatic` method for interface is in their Concrete
sidekick.

Previously, passing a valid Eo interface as a type caused the binding to
complain that `Type is not an Efl.Object`.

Test Plan: run test case

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8360
2019-03-15 11:38:08 -03:00
Lauro Moura 305749f049 csharp: Fix event names with underscore.
Summary:
names like `focus_geometry,changed` shoud be converted to
FocusGeometryChanged instead of Focus_geometryChanged.

Fixes T7735

Test Plan: run tests

Reviewers: vitor.sousa, felipealmeida, segfaultxavi

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7735

Differential Revision: https://phab.enlightenment.org/D8301
2019-03-11 19:28:02 -03:00
Lauro Moura f29ceef500 efl-csharp: Respect beta for classes and other stuff.
Summary:
In order to work around an issue with Efl.App, which is stable but
inherits from Efl.Core.Command_Line, @beta interfaces/mixins in the
inheritance chain are simply skipped.

Also changed the class used int test for inheritance from C#

Efl.Loop is stable but internally it uses a @beta class as argument to
its Register() method in the constructor. When instantiating a
user-defined C# subclass, the binding calls the C# override in the
NativeInherit class and the marshalling fails as no code is generated
for the beta class.

Also moved Efl.Part test to a beta class. Efl.Part is still beta.

Regarding parts, they are skipped if its class is @beta too.

Also rejected all elm_* files in elm public eo files. They should get
back in as they are converted to Efl.Ui.* api. An exception is
elm_interface_scrollable.eo, as efl_ui_panel depends on it.

Fixes T7730

Test Plan: Run tests

Reviewers: vitor.sousa, segfaultxavi, felipealmeida, cedric, bu5hm4n, zmike

Reviewed By: vitor.sousa

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7730

Differential Revision: https://phab.enlightenment.org/D8268
2019-03-11 16:08:04 -03:00
Lauro Moura c67f199b2f efl-csharp: Respect beta in constructor parameters.
Summary:
Fixes compilation after Efl.Ui.Win parameter changes.

Also removed an unused var and now we pass the beta option to the eolian
mono invocation for the tests.

Fixes T7723

Reviewers: segfaultxavi, felipealmeida, vitor.sousa

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7723

Differential Revision: https://phab.enlightenment.org/D8150
2019-03-07 13:03:33 +01:00
Lauro Moura 595c863fed efl_csharp: Use cs_args instead of runtime_Assemblies
This will erase the need of the `runtime_assemblies` kw_arg, allowing ot
use a single invocation without warnings about unsupported parameters.

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D8092
2019-03-06 19:05:50 +01:00
Felipe Magno de Almeida f392c5a436 efl-mono: Add support for dotnet core
Summary:
This commits adds dotnet as a supported C# platform for EFL# bindings.

Due to differences between Mono and Dotnet regarding DllImport, the
bindings now are using an imperative approach to load the function
pointers through the NativeModule and FunctionWrapper classes. These
classes handle the dlopen/LoadLibrary and dlsym/GetProcAddress calls.

Also, the previous caching of non-owned strings returned to native code
was removed until further memory checks.

We also had to create workaround for bool and chars in Structs for C#
marshaling. Going through System.Byte instead and Marshaling manually
to their respective types.

In order to actually build efl_mono.dll with dotnet right now,
issue #4782 from Meson should be fixed to make it properly detect and
used the Dotnet compiler. Also use "-Ddotnet=true" when running meson.

Fixes T7394

Reviewers: felipealmeida, vitor.sousa, bu5hm4n

Reviewed By: vitor.sousa

Subscribers: cedric

Tags: #efl

Maniphest Tasks: T7394

Differential Revision: https://phab.enlightenment.org/D8069
2019-03-01 23:58:56 -03:00
Lauro Moura dd89eb2fd1 efl-mono: Add support for Efl.Class
Efl.Class (in practice, the return from the *_class_get() functions) can
be used as argument to functions, like in Efl.Object.provider_find and
Efl.Ui.Widget_Factory.item_class(get/set).

This commits adds support by representing Efl.Class instances
as System.Type in the C# API, allowing someone to do things like:

`factory.ItemClass == typeof(MyFramework.MyButton)`

It also supports user-defined classes that inherit from efl classes.
2019-03-01 23:04:08 -03:00
Lauro Moura 850b7309b0 efl-csharp: Fix Eina.Value containing arrays and lists
Summary:
It was marshalling erroneously data into and out of arrays and lists.

Instead of passing data by value (or by address of correct size), it was
stuffing data into IntPtr and trying to parse out afterwards.

This commit changes the binding to use the same approach of plain
Get/Set, with proper overloads.

Reviewers: vitor.sousa, segfaultxavi, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8057
2019-03-01 19:24:12 -03:00
Lauro Moura c3ed0791a6 efl-csharp: Fix variable generation for Roslyn
Summary:
Mono's old compiler (mcs) accepts LL as suffix for longs while Roslyn
(csc) is strict, allowing only a single L.

Test Plan: Run tests

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8061
2019-02-28 17:20:53 -03:00
Lauro Moura bf4280e915 efl-csharp: Remove generated inlist/inarray support
Summary: To be added again in a later release after rework in Eolian

Reviewers: q66, vitor.sousa, felipealmeida

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8056
2019-02-28 12:21:56 -03:00
Vitor Sousa f78be36dfe efl_csharp: add constant variable generation to C# binding (constants)
Reviewers: lauromoura, q66, bu5hm4n, zmike, cedric, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D8048
2019-02-28 12:05:36 -03:00
Lauro Moura 401f695644 efl-csharp: Remove legacy Evas bindings.
Summary: Pave the way to correct beta classes handling.

Reviewers: vitor.sousa, segfaultxavi, bu5hm4n

Reviewed By: vitor.sousa, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8004
2019-02-25 19:21:04 -03:00
Lauro Moura 7943a69b0d efl-csharp: Add support for containers in events.
Summary: Using a simple wrapper as event parameters are not ownable.

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7981
2019-02-22 14:07:24 -03:00
Marcel Hollerbach 078ccd1ca9 efl_loop / efl_app: make efl_app / efl_loop abstract
this is done inorder to ensure that noone ever thinks of creating theire
own app/loop object.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7982
2019-02-21 19:13:39 +01:00
Marcel Hollerbach 37d2d378ec eolian: drop class function overriding
Until this commit eo did class functions as part of the vtable, which
enabled those functions to be overwritten in classes inheriting another
class. However in task T7675 we decided that this is not really good for
bindings, as most OOP languages do not support this sort of feature.

After this commit eolian realizes class function completly outside of
the vtable, the c-symbol that is the class funciton is now just directly
redirecting to a implementation, without the involvement of the vtable.

This also means a change to the syntax created by eo:

Calling before:
  class_function(CLASS_A);
Calling after:
   class_function();

Implementation before:
   class_function(const Eo *obj, void *pd) { ... }
Implementation after:
   class_function(void) { ... }

This fixes T7675.

Co-authored-by: lauromauro <lauromoura@expertisesolutions.com.br>

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D7901
2019-02-13 16:59:58 +01:00
Lauro Moura 9277586fd8 efl-csharp: Fix self in iface concrete functions
Summary:
It was mistakenly being called as static functions.

Fixes T7619

Test Plan: See attached testcase.

Reviewers: segfaultxavi, bu5hm4n, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7619

Differential Revision: https://phab.enlightenment.org/D7904
2019-02-11 16:59:10 -02:00
Felipe Magno de Almeida 0223bb29df eolian-mono: Provide constructor parameters based on the constructors
section of the Eo files.

Reviewers: woohyun, segfaultxavi, bu5hm4n, felipealmeida

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7789
2019-02-01 14:03:02 -05:00
Marcel Hollerbach 286ad91075 efl_mono: add a free function to every owned type
this is another step towards enforcing free functions on every owned
type. To equip every owned type with a free function the following is
applied. Every owned ptr is assumed to be a heap pointer, with the free
function "free". Every string that is owed is converted to a mstring. a
pointer to a eo object is also assumed to be a heap pointer, and equiped
with the free function "free".

Differential Revision: https://phab.enlightenment.org/D7710
2019-01-23 14:13:31 +01:00
Marcel Hollerbach 95160ab136 efl: convert all interfaces to the new eolian syntax
ref T7459

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7687
2019-01-18 16:31:31 +01:00
Felipe Magno de Almeida fc48e19b56 efl-mono: Fix lots of warnings in tests
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7675
2019-01-17 14:45:14 +01:00
Felipe Magno de Almeida adc2e674af eolian-mono: Add interface registration to inherited classes
Summary: Depends on D7635, D7634

Reviewers: woohyun, bu5hm4n, segfaultxavi, lauromoura

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7636
2019-01-17 21:36:27 +09:00
Vitor Sousa 7b342e8fdd eolian_mono: fix inheriting from efl types not considering additional interfaces
Reviewers: segfaultxavi, bu5hm4n, Jaehyun_Cho, lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7635
2019-01-17 21:36:27 +09:00
Felipe Magno de Almeida 92aab7830c efl-mono: Add proper test for interface inheritance
Reviewers: segfaultxavi, bu5hm4n, woohyun, Jaehyun_Cho, lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7634
2019-01-17 21:36:27 +09:00