Commit Graph

7 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
Lauro Moura 87e5fc4c6a csharp: Remove test dependency on internal funcs
Summary: This will help cleaninup the EFL# API.

Test Plan: run test suite

Reviewers: YOhoho, felipealmeida, segfaultxavi, woohyun, brunobelo

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10365
2019-10-14 17:19:12 -03: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 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 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
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
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