Commit Graph

710 Commits

Author SHA1 Message Date
Felipe Magno de Almeida a8e23cc400 efl-mono: Add efl_mono.dll.config file to run tests from within tree
Required by some distros like Arch.

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7527
2019-01-04 12:07:03 +01:00
Marcel Hollerbach e36e8d9321 meson-cxx: ecore must be build after efl 2019-01-02 12:43:36 +01:00
Lauro Moura 3b7efdc80f efl-csharp: Add implicit conversions for Eina.Value
Summary:
For basic types, this will make it easier to pass Eina.Values into
functions, without requiring to setup and later Set() or Get() calls.

As discussed on irc, this seems to be a better way to improve the Value
C# API than using method chaining.

Fixes T7388

Test Plan: run tests

Reviewers: segfaultxavi, felipealmeida

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7388

Differential Revision: https://phab.enlightenment.org/D7526
2018-12-30 17:08:25 +01:00
Lauro Moura c6509aee0f efl-mono: Remove Flush from C# Value API.
Summary: Fixes T7387

Test Plan: run tests

Reviewers: segfaultxavi, felipealmeida

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7387

Differential Revision: https://phab.enlightenment.org/D7521
2018-12-28 18:22:43 +01:00
Carsten Haitzler 91990b7cf8 meson - fix pc file versions that were missing mirco version 2018-12-27 11:54:30 +00:00
Marcel Hollerbach 20ddd4c679 efl_app: introduce app_main for getting the app object
This brings in the possibility to receive the app object from bindings.
With the app object you can listen to pause / args / terminate / resume
events.

fix T7509

Differential Revision: https://phab.enlightenment.org/D7480
2018-12-20 12:56:54 +01:00
Marcel Hollerbach 4a4d32b60d build: make bindings cross compileable
Differential Revision: https://phab.enlightenment.org/D7470
2018-12-17 17:43:08 +01:00
Lauro Moura 9603cc07eb efl-mono: Fix call of virtual methods after new API
Summary:
After the new API, the virtual wrapper classes (*NativeInherit) just
declared the wrappers for the current class. But as they didn't have any
inheritance information, reimplementing methods from a parent Eo class
wouldn't work. (e.g. Efl.Ui.Button reimplementing Efl.Object
FinalizeAdd).

This commit changes these NativeInherit classes to mimic the inheritance
chain of their regular/abstract counterparts, reusing the virtual
wrapper implementations.

In order to access the correct Eo class created, the methods on it were
changed from static to instance methods. The instance will be held as a
class member of the regular/abstract API class to keep the delegates
alive and allow getting C Function pointers from them.

The class_initializer method was also split in two. The method
collecting the wrapper delegates was extracted in order to call the
parent ones.

Also avoid exception in cached strings queries as TryGetValue requires
non-null keys.

Test Plan: Run test suite.

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7460
2018-12-14 20:47:46 -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
Daniel Kolesa 14ce54c303 eolian: implement new inherit behavior
Eolian now separates 'parent' and 'extensions'. For regular
classes, parent is the first item in the inherits list and
extesions is the rest. For interfaces and mixins, parent is
NULL and extends is the inherits list.

The reason for this is the separation of them in syntax in near
future. It also slightly changes the behavior; since for interfaces
and mixins, parent is always NULL now, you can freely inherit from
all types of classes without needing to manually put an interface
type as the first item of the inherits list.
2018-11-23 13:57:07 +01:00
Lauro Moura 021513923d eo: Avoid namespace clashes.
Summary:
This commit removes some clashes (i.e. names as classes and namespaces
at the same time). It'll avoid nested items that are either forbidden
(C#) or problematic (Python) in some languages.

Reviewers: segfaultxavi, bu5hm4n, felipealmeida

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7260
2018-11-13 09:48:14 +01:00
Daniel Kolesa 82688c5ece eolian: expose API to retrieve the class of an event
This information has been stored and used in Eolian until now
but not exposed to the API user. While there are roundabout ways
to retrieve the class for an event, this one is direct and costs
us nothing.
2018-11-04 18:32:05 +01:00
Daniel Kolesa d0c96539f2 eolian: add eolian_implement_implementing_class_get
This will make it easier for generators and utilities to retrieve
the class that implemented a method/property/etc rather than the
class the implement was originally defined for. Thanks to this
it will no longer be necessary to carry the class pointer around
the place.
2018-11-04 16:12:53 +01:00
Marcel Hollerbach 852dd60cdb meson: do not add cs as required compiler
Summary: its only required when having mono

Reviewers: q66, netstar, jeyzu

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7213
2018-10-25 23:40:31 +02:00
Marcel Hollerbach 6f9761ff54 meson: time for the c-sharp build
The tests are added and build. For running C# code please see the wiki.

you can enable -Dmono=true

Differential Revision: https://phab.enlightenment.org/D7203
2018-10-24 12:05:58 +02:00
Marcel Hollerbach e85311c992 meson: here comes cxx bindings
this commits is bringing cxx bindings.
You can enable / disable them with the cxx option.

Differential Revision: https://phab.enlightenment.org/D7181
2018-10-24 12:05:58 +02:00
Marcel Hollerbach 52e0b8440b Revert "meson: add cxx bindings"
This reverts commit 5aaf2cbb5d.

The cxx bindings were accidently merged. Things are missing (like .eot.h
files)
2018-10-18 16:12:13 +02:00
Marcel Hollerbach 5aaf2cbb5d meson: add cxx bindings
this commit adds cxx bindings to meson.

Differential Revision: https://phab.enlightenment.org/D7169
2018-10-18 16:01:07 +02:00
Lauro Moura 946b47430d eina_cxx: Fix eina::value copy constructor.
Summary:
The previous declaration was causing the implicit copy constructor to be
invoked when copying a new eina::value from an existing eina::value,
thus leading to two wrappers pointing to the same underlying C pointer.

This showed some error messages when running the tests but under autotools
it didn't fail, while building with meson caused it to segfault.

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7166
2018-10-16 18:47:20 -03:00
Daniel Kolesa e7b6e55f42 elua: add missing eolian bindings method needed for object casting
This enables updated docgen to work.
2018-10-10 13:57:59 +02:00
Lauro Moura 103ba3668e csharp: Fix missing override keyword
Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7136
2018-10-04 14:24:03 -03:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Lauro Moura 8a4bac15e7 efl-csharp: Fix event struct marshalling.
Summary:
The efl.Event struct has a class field that gets generated normally but
can be problematic when marshalling the struct back from C to C#. The
compilation works fine but when C# runtime tries to marshall the C data
(e.g. accessing the Event.Info field), it becomes erratic, either
complaining about missing references to object or even segfault.

This commit changes the event handling code to use the
"Event_StructInternal" struct as is already done when receiving structs
from C code.

In order to work with other assemblies, the _StructInternal fields were
made publit too.

Fixes the events tests and the text editor app.

Test Plan: make check and run the text editor app in examples repo.

Reviewers: segfaultxavi, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7106
2018-09-26 12:16:09 -03:00
Lauro Moura 89a537b4d1 efl-csharp: Add copy constructor for eina.Value.
Summary: This will allow deep copying the given value from C#.

Reviewers: felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: vitor.sousa, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7017
2018-09-11 11:41:38 -03:00
Xavi Artigas 40d03dbef8 efl-mono: Make eina_list return the list
Summary:
eina_list_reverse() returns the list, the C# version should do the same.
This fixes the reference/csharp/eina/src/eina_list.cs example.

Fixes T7112

Test Plan: The eina_list.cs example works after this change.

Reviewers: lauromoura, vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7112

Differential Revision: https://phab.enlightenment.org/D6995
2018-09-06 12:20:29 -03:00
Lauro Moura 4c53151096 efl-csharp: Fix event callback removal.
Summary:
Use the native event loaded from dlsym directly instead of wrapping it
in a Event_Description structure.

Fixes: T7355

Reviewers: felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D6981
2018-09-05 14:47:19 -03:00
Daniel Kolesa 107bb9d2ed elua: fix outdated code in doc token ref resolution
This function was using outdated enum fields. This was fixed
on my local side but somehow never made it in, so make this code
make sense.
2018-09-05 13:09:57 +02:00
Lauro Moura 840613235d efl-csharp: Use value_new/free for wrapped values
Summary:
Using malloc/free as it was used before would cause double frees and
other issues when mixing with eina_values created from the value
mempool inside Eina.

Fixes T7359

Reviewers: felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7359

Differential Revision: https://phab.enlightenment.org/D6958
2018-09-03 17:39:38 -03:00
Xavi Artigas b91a18524f efl-mono: properly close XML comment
Summary:
XML document generation was skipping the rest of this file because of a missing
XMl closing tag. Fortunately, it was almost at the end of the file.

Reviewers: lauromoura, vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6905
2018-08-24 14:10:41 -03:00
Lauro Moura f1fddf5c74 cxx: Remove libeolian_cxx dependency on eo_cxx
Summary: Fixes T7324

Reviewers: felipealmeida, bu5hm4n, zmike

Reviewed By: felipealmeida, bu5hm4n, zmike

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

Tags: #efl

Maniphest Tasks: T7324

Differential Revision: https://phab.enlightenment.org/D6881
2018-08-21 14:21:43 -04:00
Lauro Moura ba771f8b69 efl_mono: Fix call to System.Threading.Thread.
Summary: It was resolving to efl.Thread instead.

Reviewers: devilhorns, felipealmeida, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6261
2018-06-19 13:28:58 -04:00
Lauro Moura a8b7833a48 efl_mono: Fix efl_add_internal_end call.
Summary:
It was missing setting the 'is_ref' parameter to 1 to mirror the
internal_start call.

Test Plan: make check

Reviewers: cedric

Subscribers: #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6193

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-25 10:01:09 -07:00
Lauro Moura 7d4c5f5d7c eo_cxx: Fix do_eo_add after lifecycle branch.
Summary:
Also changed the previously failing tests to use ck_assert_int_eqinstead
of fail_if for better reporting.

Test Plan: make check

Reviewers: cedric, felipealmeida

Reviewed By: cedric

Subscribers: #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6194

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-25 10:00:42 -07:00
Lauro Moura 54f1e56b34 efl_mono: Generate support for accessors in .eos
Summary: Depends on D6190

Reviewers: felipealmeida, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6191
2018-05-23 18:59:26 -03:00
Lauro Moura cfafd01bbe efl_mono: Initial support for Accessors.
Summary:
Plain conversion to IEnumerable, which is the base of LINQ
Depends on D6189

Reviewers: felipealmeida, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6190
2018-05-23 18:59:26 -03:00
Lauro Moura 2bbaada66e efl_mono: Reject the promise when it's disposed.
Summary:
As futures are tied to a given promises and are usually handled in
a 'attach and forget' scheme, we can't cancel them as it would cancel
the whole chain.

Reviewers: felipealmeida, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6189
2018-05-23 18:59:26 -03:00
Lauro Moura c4572d3f79 efl_mono: Fix events after Event_Description rename. 2018-05-23 17:33:47 +02:00
Xavi Artigas 35bbedc96f efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).

In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).

Test Plan: make with c# bindings works, make check and make examples work too.

Reviewers: cedric, q66, lauromoura

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6169
2018-05-19 01:42:26 +02:00
Lauro Moura c8fbc31ee2 efl_mono: Start generating eina future in eolian_mono.
Summary:
Besides the normal methods returning Futures, we now generate
a wrapper with the "Async" suffix. This wrapper returns a
Systems.Threading.Tasks.Task which can be awaited on and reflect the
status of the Future.

When an eina.Future fails with ECANCELED, TaskCanceledException is
raised in the Task. Otherwise, an efl.FutureException(eina.Error) is
raised.
Depends on D6174

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6175
2018-05-17 16:56:31 -03:00
Lauro Moura fff0c86d99 efl_mono: Initial support for Futures/Promises
Summary:
Promise/Future cleanup:

In the promises, we use a wrapper Eina_Promise_Cancel_Cb to
invalidate the wrapper if it ever gets cancelled from outside. When
invalidating from C#, we can do it directly.

For the futures, likewise, in order to be able to invalidate the
wrapper when the chain it belongs to gets resolved we then() an
internal future with a callback to invalidate the wrapper we return to
C#. The return of this intermediate then() is the future we actually
return to the user.

Also added ECANCELED to the list of default eina.Errors
Depends on D6173

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6174
2018-05-17 16:56:25 -03:00
Lauro Moura 95c8a7d28c efl_mono: Fix eldbus warnings and typo.
Summary: Depends on D6172

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6173
2018-05-17 16:56:18 -03:00
Lauro Moura f8a033fd70 efl_mono: Add support for Eina.Error/Empty in eina.Value
Summary:
eina.Value.Empty now means that we have an zeroed (empty) eina value.
For optional values that are empty use eina.Value.OptionalEmpty.

This was required to support the empty values passed with
EINA_VALUE_EMPTY in some Ecore futures.

Also, returning an eina_value by value is not supported in eolian
for safety reasons, so we removed some tests that tried to use this
behavior.
Depends on D6171

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6172
2018-05-17 16:56:11 -03:00
Daniel Kolesa b8b94cbfb8 elua: add check API to eolian bindings 2018-05-13 17:06:12 +02:00
Lauro Moura da6f5932f1 efl_mono: Support type aliases.
Summary:
Due to the absence of typedef from C#, we generate thin structs with
implicit operators to allow reference the data from their typedef'd name
from C#.

The other alternatives would be always converting to the lowest base on
the alias stack (losing the meaningfulness of the typedef name) or using
the 'using' directive. The latter has the restriction that it makes an
alias visible only in the file they are declared.

Reviewers: felipealmeida, cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6157
2018-05-11 11:01:59 -03: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 c9dd86579f efl_mono: More uniformization of the handling of names
Summary:
Uses a common helper to open and close namespaces, to get the managed
and unmanaged name of things, the interface, concrete and inherit class
names, etc.

eolian_cxx: Add namespace information to func_def, as it'll avoid
eolian-cxx clients dealing with the eolian C api directly when trying
to access a function pointer namespace.
Depends on D6048

Reviewers: felipealmeida, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6049
2018-05-03 18:04:41 -03:00
Lauro Moura 473d5b79c5 efl_cxx: remove eolized promises from the CXX bindings
Summary:
Also added a blacklist header to temporarily disable generation of eo
methods with futures as arguments or return type.

Once the models branch lands, we should enable future support again with
eina_futures.

Reviewers: cedric

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D6018
2018-05-01 10:39:01 -07:00
Lauro Moura edf05278ed efl_mono: Names fixes after the big rename
Summary: Depends on D5997

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5998
2018-04-26 10:55:18 -03:00
Daniel Kolesa 543902f2ba eolian: make doc ref resolution global
Doc refs no longer introduce new dependencies into files. Instead,
they're parsed globally, and any doc ref lookup is also made
globally. This allows unit based dependencies to correspond more
to what files actually really need at compile time/runtime, with
docs being irrelevant to that; it also simplifies the API.

The doc resolution API now takes Eolian_State instead of
Eolian_Unit, too.
2018-04-18 16:38:14 +02:00
Lauro Moura 3fd1566a08 csharp: Provisionally fix conversion of eina.Value
When we have an eina.Value_Native (representing an Eina_Value passed by
value) and assign it to an eina.Value (a class with an IntPtr to an
underlying Eina_Value) we copy it so the eina.Value can take ownership
and free the data normally.

A possibly better alternative would be adding an extra flag to
eina.Value (something like OwnsPointer) to check whether we should free
the struct we point to or not.
2018-04-03 17:29:41 -03:00
Lauro Moura e2fafe5b0c efl_mono: Initial version of Strbuf support.
Also moved the ValueOwnership enum from eina value to eina.Ownership. It
can be shared among the eina structures if needed.
2018-04-03 17:29:41 -03:00
Felipe Magno de Almeida 92f5383e3c efl-cxx: Fix using efl_add_ref instead of efl_add 2018-04-03 17:28:07 -03:00
Felipe Magno de Almeida be06c27762 efl-mono: Fix compile flags, .config files and class_name in description 2018-04-03 14:01:29 -03:00
Lauro Moura 7c543d3c86 csharp: Change policy on ptr(struct) owned calls
When transferring the ownership of a ptr(struct) from Unamanaged to
managed, we should marshal the reference-typed fields or they can point
to Managed memory that would make no sense to access from C (for
example, strings would return garbage).

The downside is that it can cause potential leaks if the receiver of the
memory do not free it. In the current state of the EFL api this can
happen in two places:

- Efl.Ui.List.SegArray::remove
return -> ptr(Efl.Ui.List.LayoutItem) @owned
- Efl.Ui.Focus.Manager::fetch
return -> ptr(Efl.Ui.Focus.Relations) @owned

The resources copied by both structs may leak when those functions are
overriden in C# and the values returned to the C code.

Also hide some internal stuff instead of exporting it and generate
implicit conversion operators for struct external/internal.
2018-03-16 11:12:49 -03:00
Daniel Kolesa bf1e3a702f eolian: event/function_get_by_name -> by_name_get 2018-03-16 14:26:15 +01:00
Daniel Kolesa 0ee6410add elua: inherit state from unit in eolian bindings 2018-03-14 17:03:33 +01:00
Daniel Kolesa 2d0a25c995 eolian: refactor doc ref resolution API 2018-03-14 16:51:11 +01:00
Daniel Kolesa 7d6e2561a4 elua: update eolian name APIs 2018-03-12 14:27:20 +01:00
Daniel Kolesa 342974977f eolian: resolve to Eolian_Objects instead of voids 2018-03-09 15:25:36 +01:00
Daniel Kolesa c7fd43ad4e eolian: return Eolian_Object_Type from ref resolver
This needs only one enum and allows for better interop.
2018-03-09 15:25:36 +01:00
Daniel Kolesa b58c901d2d elua: remove declaration api from eolian bindings 2018-03-08 22:58:22 +01:00
Daniel Kolesa 59aabb0945 elua: update eolian bindings for latest APIs
Added support for Eolian_Object, made other luaified types
"inherited" from Eolian_Object, removed type-specific file_get
as it was replaced by Object's file_get, declarations API still
in place
2018-03-08 22:35:27 +01:00
Daniel Kolesa 482c5d1ba2 eolian: get rid of old APIs for typedecl retrieval 2018-03-07 13:53:08 +01:00
Daniel Kolesa f596a97da6 eolian: remove old variable retrieval APIs 2018-03-07 13:25:28 +01:00
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Daniel Kolesa 9e8d96671e elua: add missing APIs to eolian bindings 2018-03-02 14:39:57 +01:00
Daniel Kolesa 93dad9d6bb elua: objectify unit and redo class retrieval 2018-03-02 14:04:41 +01:00
Daniel Kolesa 9144045925 elua: update path retrieval APIs 2018-03-02 13:52:13 +01:00
Daniel Kolesa 5701ce22a3 elua: remove old dir scan/parse APIs 2018-03-02 13:43:16 +01:00
Daniel Kolesa e27336cee1 elua: add new API prototypes in eolian bindings 2018-03-02 13:37:00 +01:00
Daniel Kolesa 6a284e48c9 eolian: eolian_* -> eolian_state_*, Eolian -> Eolian_State 2018-02-27 16:12:35 +01:00
Lauro Moura 135154303b cxx: Fix manual code after efl_app change.
Test Plan: Run make check

Reviewers: felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5827
2018-02-26 21:14:09 -03:00
Lauro Moura 9a4b8f3800 efl_mono: Distcheck fixes
- Export required sources
- Avoid generated sources being passed as static ones
2018-02-08 10:50:04 -03:00
Lauro Moura 17b9f00f7e eina_mono: Avoid calling eina_init directly from the modules.
They must be initialized from the eina.Config.Init() method.
2018-02-08 10:49:47 -03:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Daniel Kolesa d47610a732 eolian: do not require unit when stringifying types
As it is no longer necessary to pass unit when evaluating exprs,
it is not necessary to pass it here either. Convert all the APIs
to the new style and update all instances in our tree.
2018-01-16 16:39:05 +01:00
Daniel Kolesa dd2e579fec eolian: do not require unit for expr eval APIs
The necessary information is now stored directly in the expr
during database validation.

Also enable expr validation for params.
2018-01-16 16:37:52 +01:00
Daniel Kolesa c6436337a4 eolian: aliased_base_get funcs don't need unit 2018-01-12 18:05:13 +01:00
Daniel Kolesa 19c16b671e eolian: type_typedecl_get doesn't need a unit 2018-01-12 18:05:13 +01:00
Daniel Kolesa 707ed05d58 eolian: do not require unit for type_class_get 2018-01-12 18:05:13 +01:00
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Felipe Magno de Almeida 481853e1ed efl-mono: Fix using right description pointer in event registration 2017-12-20 19:57:17 -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
Vitor Sousa 00fb5b228a eolian_mono: fix handling of regular ptr() types 2017-12-15 22:26:30 -02:00
Vitor Sousa acd99be98b efl_mono: tests and better support for structs, plus some other fixes
Fix several integer binding type deduction based in its size on C.

Generation for function pointers no longer use modified argument name
which is different from the parameter name.

New generation context for structs.

bool from UnmanagedType.I1 to UnmanagedType.U1 (correct use
inside structs according to mono documentation).

byte (signed char) and int8 now is correctly represented by
sbyte in C#.

Check parameter direction in some out generators in parameter.hh.

Add efl_libs.csv to gitignore.

Make eina.Value pointer constructor public.

Add missing fields to efl.kw_event.Description struct.

Remove eina.File workaround (let struct gen handle it).

Remove is_function_ptr bool from regular_type_def and
add a typedecl_type enum to it. Also add some helper
methods for easier comparison.

Left some test cases commented for when pointer parameters
are properly working.
2017-12-15 22:26:29 -02:00
Daniel Kolesa 18e18ca74c eolian: remove remaining global state (+ modify APIs accordingly) 2017-12-15 17:11:11 +01:00
Daniel Kolesa c8aa30e698 eolian: make declaration APIs use units 2017-12-15 17:11:11 +01:00
Daniel Kolesa 8a1f93f698 eolian: pass state where necessary
This modifies the API so that global state removal is made
possible. It's still used internally for now but externally
the state is contained.
2017-12-05 16:41:42 +01:00
Jean-Philippe Andre 207a0cf3e3 eo: Move hacky API auto_unref to C only
This API is meant to be used by parts only, and by bindings dealing with
part objects. This patch fixes make check which got broken in the after
the previous one (cxx).
2017-12-05 15:06:34 +09:00
Jean-Philippe Andre 725026a4ba cxx: Fix one conversion to Eina_Value 2017-12-05 15:01:45 +09:00
Jean-Philippe Andre c9322dd561 cxx: Add global _delete() method to all objects
This is really just calling efl_del() and detaching the internal pointer
from the C++ object. This will not affect other references, which means
after del the object may still be alive, probably without a parent.
2017-12-05 15:01:45 +09:00
Jean-Philippe Andre 09cf282741 cxx: Use per-function guards in efl object
This prevents generation of del().
I also removed constructor, finalize and destructor as I believe this
requires special work with eo_inherit (where did this work go??).
2017-12-05 15:01:45 +09:00
Jean-Philippe Andre 9d14b4cfe8 cxx: Give ref to returned objects
This should give a ref to obj in the following scenario:

  auto obj = other.function();

Where obj is an eo object.
2017-12-05 10:17:02 +09:00
Jean-Philippe Andre 753304c69d cxx: Add define EFL_CXXPERIMENTAL for testing
I'll hide some controversial features behind this, until we come to an
agreement with @felipealmeida and people who actually know C++ (iow: not
just me^^).

Features protected:
 - easy wref (using -> without locking)
 - xxx_event_cb_add() functions in object classes
 - instantiate(obj) to create a new object
 - add as a synonym for instantiate (both in efl::eo)
2017-12-05 10:14:03 +09:00
Jean-Philippe Andre 5425baa906 cxx: Add support for function pointers
This was tested on the function pointer Efl.Ui.Format_Func_Cb
2017-12-05 10:14:03 +09:00
Jean-Philippe Andre 488c29febd cxx: Add FIXME note in eina_value.hh
I think some concepts are not handled properly in this set of classes.
I'll do some more experiments to see if I can find a working solution,
but I think we need 3 variants of eina_value, instead of just the two
provided.
2017-12-05 10:09:58 +09:00
Jean-Philippe Andre cfb3365060 cxx: Add strbuf support
Comes in two fashions:
 - strbuf_view (read-only)
 - strbuf (read/write)
2017-12-05 10:09:58 +09:00
Jean-Philippe Andre db8227a34a cxx: Add alternative form to instantiate object
This still uses the instantiate object but provides a more convenient
syntax for objects declared before their creation (eg. a global win).

Note: I wonder if we shouldn't rename instantiate to add. It would be
closer to EFL API's while being much much easier to type.
2017-12-05 10:09:58 +09:00
Lauro Moura 3c5efa1e8d efl_mono: Fix eina_value_set.
Instead of messing around with varargs, create individual wrappers for
each type supported.

The va_list approach was getting problems with float/double on Windows.
2017-12-04 15:47:52 -03: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
Jean-Philippe Andre 289a4e3aaa cxx: Only give a single ref to unparented objects
On instantiation objects get either one or two refs:
 - with a parent, they will have 2 refs, one for C++, one for the
   parent.
 - without a parent, they get a single ref, the one for C++

This will break the existing C++ examples, which I will fix in later
patches.

Note that the window is a strange object which can be created with no
parent but internally reparents itself to an object it creates (oh so
ugly).
2017-11-14 12:18:39 +09:00
Andy Williams d5dbcdabd1 eo: Rename efl_ref_get to efl_ref_count 2017-11-08 09:30:42 +00:00
Jean-Philippe Andre 58527a3dbb cxx: Fix log color in eina_log.hh
Changed from invalid "black" to arbitrary choice of green.
2017-11-07 09:57:24 +09:00
Jean-Philippe Andre 64698daeb5 cxx: Add support for operator == with objects 2017-11-07 09:57:24 +09:00
Jean-Philippe Andre e7009b77a2 cxx: Add experimental "easy" way to use wref
I hid it behind ifdef for now as I'm very much unsure of what I'm doing.
This whole modern C++ thing is still weird to me :)

Prerequisite:
 #define EFL_CXX_WREF_EASY

This allows constructs such as:

  auto wobj = obj._get_wref();
  std::cout << wobj->text_get() << std::endl;
2017-11-07 09:57:24 +09:00
Jean-Philippe Andre 88e10da36b cxx: Mark wref::lock as const
This allows passing in wref to a lambda.
If we passed normal refs, we would end up with dangling references and
many ERR messages.
2017-11-07 09:57:24 +09:00
Jean-Philippe Andre 8c991b104c cxx: Add nullptr constructor for weak refs
This allows constructs such as:

  wref_obj = obj;
  ...
  wref_obj = nullptr;
2017-11-07 09:57:24 +09:00
Jean-Philippe Andre 03b22c4d7b cxx: Instantiate objects with 2 refs
This is the original meaning of efl_add_ref().
Somehow the "ref" bool was set to true in the first call, and false in
the second call.
2017-11-07 09:57:24 +09:00
Felipe Magno de Almeida de349e1b9e eo-cxx: Fix compilation error with any_value received by value 2017-10-30 21:05:39 -02:00
Daniel Kolesa 4f8a9b50f4 eolian: make inherits_get return a list of classes, not strings
Most of the time you need to retrieve the class from the string
anyway, so remove this relic of old Eolian and gain some small
performance benefits and extra convenience.

Subtly breaks API but everything should be updated.
2017-10-25 16:25:41 +02:00
Felipe Magno de Almeida 96d3af10bf eolian-cxx: Add optional parameter to lambda for unnamed proxy instantiation 2017-09-28 17:50:14 -03:00
Felipe Magno de Almeida bb887f9869 eolian-cxx: Fix compilation errors with new any_value_ptr and mstring types 2017-09-25 21:57:25 -03:00
Daniel Kolesa 5e788e3a5c elua: bind new eolian type builtin API 2017-09-22 21:03:23 +02:00
Daniel Kolesa 1577c576e6 eolian: remove static_array and terminated_array
These types are of questionable value and the API was not entirely
thought out - remove for now, and if a legitimate use is found
later, they may be readded (with a better API), but typically it
seems best to redesign the bad APIs around safe containers...
2017-09-22 18:01:15 +02:00
Daniel Kolesa 4bae2a7385 eolian: merge REGULAR and COMPLEX types 2017-09-22 17:46:02 +02:00
Felipe Magno de Almeida 89608b15ee eo-cxx: Fix test errors with new Eolian @own framework 2017-09-18 20:22:32 -03:00
Felipe Magno de Almeida 192c7e35f6 eo-cxx: Fix assignment operator for eo::concrete 2017-09-17 06:17:01 -03:00
Felipe Magno de Almeida b5c4aeab94 eo-cxx: Fix possible non-initialization in copy-constructor and move-constructor 2017-09-15 15:16:58 -03:00
Felipe Magno de Almeida 6ded80a9b5 eo-cxx: Fix conversion from char* to std::string 2017-09-15 14:56:23 -03:00
Daniel Kolesa 60d6aeeb2d elua: update for new eolian ownership system 2017-09-15 17:52:38 +02:00
Daniel Kolesa e55ab81835 eolian: always implicitly validate database and remove its API 2017-09-13 23:58:47 +02:00
Jean-Philippe Andre 0885d0c405 elm: Fix use of Efl.Access APIs
See also 7d397c9f19

Thanks @stefan for the first fix patch, I simply failed to push this one
early enough.
2017-09-13 09:57:20 +09:00
Felipe Magno de Almeida 48b3c127f7 eo-cxx: Require instantiate keyword for constructors calling efl_add to avoid ambiguity 2017-09-08 11:47:29 +09:00
Felipe Magno de Almeida 1cfc96dd5b eo-cxx: Fix ompilation error for uncomplete Eina_Future type 2017-09-06 17:03:36 +09:00
Daniel Kolesa 8b5d555cf5 elua: update eolian bindings and make docgen work again 2017-08-30 19:46:41 +02:00
Daniel Kolesa 10fd3c32e8 eolian: remove c_only
Unused and of questionable value.
2017-08-30 19:46:41 +02:00
Felipe Magno de Almeida a7649a7897 eolian-cxx: Add workaround for function pointer types 2017-08-22 22:40:13 -03:00
Felipe Magno de Almeida 348a7084af eolian-cxx: Add workaround for clang removing const from parameters 2017-08-10 15:52:25 -03:00
Daniel Kolesa e38418dd9d elua: update eolian bindings with c type serialization change 2017-08-10 12:19:59 +02:00
Felipe Magno de Almeida 634f7d0dbb eo-cxx: Add overload for Eina_Bool inout handling interoperability
Add convert_inout_impl overload to handle bool/Eina_Bool conversion in inout direction.
2017-07-27 13:20:20 -03:00
Lauro Moura c4558e2910 js: Update after many elm/efl.ui changes
- Win.Standard
- Photocam to Image.Zoomable rename
- Widget namespace changes (elm -> efl.ui)
- setText/setPartText changes (see 3eb649b18)
2017-06-19 17:36:41 -03:00
Felipe Magno de Almeida 0fcee227aa eolian-cxx: Fix C++ generation errors with handle opaque types 2017-06-18 11:31:43 -03:00
Daniel Kolesa d2280f91a1 eolian: use unit in typedecl c_type_get 2017-05-30 17:15:54 +02:00
Daniel Kolesa a5e66b3421 eolian: doc token ref resolver now takes unit 2017-05-30 17:15:54 +02:00
Daniel Kolesa 81a1d9659a eolian: type_class_get takes unit 2017-05-30 17:15:54 +02:00
Daniel Kolesa c234b5ee69 eolian: expr eval APIs now take units 2017-05-30 17:15:54 +02:00
Daniel Kolesa 0bf6fd6297 eolian: update lua bindings with new unit apis 2017-05-30 17:15:54 +02:00
Daniel Kolesa 67bc32d9ac eolian: pass unit to enum get by name 2017-05-30 17:15:54 +02:00
Daniel Kolesa 9c2dae3531 eolian: pass unit to struct get by name 2017-05-30 17:15:54 +02:00
Daniel Kolesa 52a0255e38 eolian: pass unit to alias get by name 2017-05-30 17:15:54 +02:00
Daniel Kolesa 6d0ee5d2df eolian: return real nil on parse failure 2017-05-30 17:15:54 +02:00
Daniel Kolesa 9699d074bc eolian: pass unit to all_classes_get 2017-05-30 17:15:53 +02:00
Daniel Kolesa 45a73a0878 eolian: pass unit to class get_by_name/file 2017-05-30 17:15:53 +02:00
Daniel Kolesa 83bf422159 eolian: make all variable lookups take unit 2017-05-30 17:15:53 +02:00
Daniel Kolesa cee3b604a3 eolian: make by-file variable lookups take unit 2017-05-30 17:15:53 +02:00
Daniel Kolesa 653cf6bac3 eolian: make by-name variable lookups take unit 2017-05-30 17:15:53 +02:00
Daniel Kolesa 7da0549970 eolian: make eolian_file_parse return unit 2017-05-30 17:15:53 +02:00
Lauro Moura 52d2681869 efl_js: Export efl.Loop 2017-02-22 18:56:30 -03:00
Lauro Moura 659edb609a efl_js: Use efl_add_ref for saner refcount.
efl_add was messing up the refcount in objects with parents on the JS
side.
2017-02-22 18:56:30 -03:00
Lauro Moura 26f6254225 js: Raise exception to js instead of crashing 2017-02-22 18:56:30 -03:00
Lauro Moura 4f327dc04e efl_js: Update register functions. 2017-02-22 18:56:30 -03:00
Ivan Furs 808fcf4dae eina_file: add eina_file_unlink
Test Plan: split  D4423 - unlink

Reviewers: raster, vtorri, an.kroitor, jpeg, reutskiy.v.v, NikaWhite, cedric

Reviewed By: cedric

Subscribers: artem.popov, cedric, vtorri, jpeg

Tags: #windows, #efl

Differential Revision: https://phab.enlightenment.org/D4485

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 15:14:54 -08:00
Daniel Kolesa 95181f2d36 eolian: move base function doc API into implements
This allows us to unify retrieval of docs for both regular and
overridden funcs without having two separate APIs. It's currently
missing validation and docgen is still not adjusted properly for
it either, but at least there's this. Enables retrieval of docs
for overridden funcs by default as well.
2017-01-19 15:09:07 +01:00
Felipe Magno de Almeida a1f2db255b cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order
of includes and creating forward declarations.
2017-01-18 22:47:04 -02:00
Daniel Kolesa 35c5e89269 eolian: remove/add APIs and clean up implements system
As there is no need to have separate is_auto, is_empty and
is_pure_virtual for functions and implements (each function has
its own base implement by default) I removed the function ones.
Instead, I added a way to retrieve a function's base implement
so that you can instead do the checks on the implement even when
you only have the function.

I also moved base implement build directly into the parser instead
of the database filler. That allows for significant cleanup. I
also removed distinction of implement pointers in Eolian_Function
for get and set as implements now always contain an entire thing
so the pointer was always the same anyway.

Things should still behave more or less the same, but ordering
of generated functions has changed because ordering of implements
has changed.
2017-01-16 15:55:06 +01:00
Daniel Kolesa 692ae7adb6 eolian: use consistent pure_virtual naming in API
Previously one API used just virtual (incorrect) and one used
virtual_pure (which just sounds weird). So unify with a single
name, pure_virtual, similar as in other lanugages.

This does not change eo file syntax yet.
2017-01-13 15:40:29 +01:00
Daniel Kolesa a70645e154 eolian: consistent and cleaner error values from APIs
Now all error/unknown/etc values returned from APIs are zero,
previously it was a mix of zeroes and minus ones. Also, some
enums that had no error/invalid value before have one now, which
allows for better distinction between what is an error and what
is an intended result.
2017-01-13 15:26:05 +01:00
Daniel Kolesa baaa482ebf eolian: fine-grained is_auto/is_empty for implements 2017-01-11 19:26:21 +01:00
Felipe Magno de Almeida ae822a396c eina-cxx: Add visit_unsafe to eina::variant and make ~variant possibly noexcept
visit_unsafe member function visits the variant but assumes the
pre-condition that the variant is not empty. This avoids the
possibility of throwing an exception when the destructors
of the types used in variant are also guaranteed to be
noexcept.

CID 1367508
2016-12-20 15:33:57 -03:00
Felipe Magno de Almeida 3704173017 eina-cxx: Add move constructor and move assignment operator for eina::variant
CID 1362797
2016-12-20 15:26:35 -03:00
Daniel Kolesa c813e94606 eolian: unary expr eval for floats and add a signed number mask
This adds a new mask for all signed numbers (sint + float) and
fixes unary expr evaluation for floats, as well as fixes eval
error messages.
2016-12-14 18:23:16 +01:00
Daniel Kolesa 2f5db8c7d5 docgen: migrate to new Eolian-provided tokenizer 2016-12-09 17:19:03 +01:00
Daniel Kolesa e8d1ddd86c elua: add bindings to new Eolian APIs 2016-12-08 17:20:22 +01:00
Felipe Magno de Almeida b06d2510de eolian-js: Fix compilation of JavaScript binding 2016-11-29 16:43:09 -02:00
Daniel Kolesa 8002b3b24e eolian: remove parsing of pointers and the corresponding APIs
Everything should be done via the new ptr() system now.
2016-11-10 16:20:19 +01:00
Cedric BAIL 90c7a8a680 bindings: remove Eina_Promise reference from JS binding. 2016-11-07 13:43:11 -08:00
Cedric BAIL 6ee17d8f2d bindings: remove Eina_Promise from C++ bindings. 2016-11-07 12:03:55 -08:00
Felipe Magno de Almeida 137dd4864d eina-cxx: eolian-cxx: Fix correct usage of is_eolian_object traits 2016-11-03 17:59:20 -02:00
Daniel Kolesa f399e77a92 eolian: rename is_ref API to is_ptr to match syntax 2016-11-03 14:22:21 +01:00
Felipe Magno de Almeida a09ad5af7f js: Fix calling setAlignedInternalPointerField without a aligned value 2016-10-25 15:43:19 -02:00
Felipe Magno de Almeida 4cd2bd8a66 js: Fix Makefile location and linking of efl.node and tests 2016-10-25 15:43:19 -02:00
Daniel Kolesa 82ef73ca18 eolian: remove type silencing stuff entirely
this was useful during transition, but not anymore
2016-10-25 18:02:23 +02:00
Felipe Magno de Almeida 297415cc53 js: Fix compilation of new data types in JS binding 2016-10-25 12:23:34 -02:00
Lauro Moura 500ed1e40b efl_js: Export Canvas Object and Group 2016-10-25 12:23:34 -02:00
Lauro Moura 611498f035 ecore_js: Add missing HandleScope to addTimeline 2016-10-25 12:23:34 -02:00
Lauro Moura 620454e43d efl_js: Enable Ethumb support for Elm. 2016-10-25 12:23:34 -02:00
Lauro Moura 508edf78c6 efl_js: Update after eo/efl api changes 2016-10-25 12:23:34 -02:00
Lauro Moura 4f52588b3c efl_js: Update JS examples
Changing imports, functions, etc.

Also export "cast" function for all eolian_js generated classes.
2016-10-25 12:23:34 -02:00
Lauro Moura c08eedfd11 eo_js: Instead of abort, throw an Exception
* When the constructor fails
* On cast error.
2016-10-25 12:23:34 -02:00
Lauro Moura 7869eeed53 eina_js: Fix log color persistence.
The c_ptr() passed to eina_log_register was being lost when saving the string
into the map.
2016-10-25 12:23:34 -02:00
Lauro Moura ae3c74d879 efl_js: Update registration functions
After the Elm -> Efl.Ui and other changes.

Also add extern C guards around private header (elm_widget).
2016-10-25 12:23:34 -02:00
Lauro Moura 4ce9a42456 eo_js: Update event callback after return removal. 2016-10-25 12:23:34 -02:00
Felipe Magno de Almeida 17da4b5b9d eo-cxx: Fix compilation and warnings in clang 2016-10-20 04:52:18 -02:00
Jean-Philippe Andre 7c2259adc8 elm: Remove elm app client/server implementation & APIs
This removes EO APIs related to an unmaintained client/server
model for applications. The reasons for this removal are the
following:
- unused
- no support in E
- relies on dbus as the sole transport layer
- unmaintained since the original patches
- only EO API (iow: beta, never released API)

I've also never seen the test cases (in elementary_test) actually
work.

According to Gustavo (k-s), the original author of this feature
is not involved in EFL at the moment, and unlikely to be in the
near future.

Note that terminology has in the past used those APIs when it
was still using some beta EO APIs. This code is now long gone,
removed in terminology commit 3ffcbadd6f9881472db6 (2014/12/13,
for version 0.8.0)

If someone wants to step in and maintain the implementation,
protocol and (EO) API, then feel free to revert this patch
and revive the feature. But it will need to be more solid than
this implementation.
2016-10-20 14:55:48 +09:00
Felipe Magno de Almeida 88419e5e87 eina-cxx: Implement aligned_union for GCC 4.9 2016-09-22 19:27:56 -03:00
Felipe Magno de Almeida 10293e6520 eo-cxx: Add progress to future and promise 2016-09-20 23:30:29 -03:00
Felipe Magno de Almeida 5df0b6765b eo-cxx: Replace for ENOMEM to avoid warnings 2016-09-14 00:55:51 -03:00
Felipe Magno de Almeida 5e735fe762 eo-cxx: Fix race promises 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida 3339f03964 eo-cxx: Add promise type 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida e0b444f95f eo-cxx: Add race promises through eina::variant 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida 2bdad3f1d6 eo-cxx: race for promises 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida dbed78ad3b eina-cxx: Moved variant to eina C++ 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida a63cfcafc7 eolian-cxx: Implement future template class for C++ 2016-09-11 23:44:05 -03:00
Stefan Schmidt 6bc1dc6d83 cxx: follow EINA_ERROR_OUT_OF_MEMORY deprecation
Follow the rest of efl and use ENOMEM from now on. This avoids ugly deprecation
warnings.
2016-09-05 10:39:24 +02:00
Jean-Philippe Andre b4e20fd632 js: Switch to Efl_Event
I haven't tested the compilation... but I guess this can't hurt.
2016-09-01 11:57:43 +09:00
Jean-Philippe Andre ff0952abda cxx: Fix compilation (Efl_Event) 2016-09-01 11:57:43 +09:00
Felipe Magno de Almeida f8a6568d5c eolian-cxx: Fix compilation break with Eo rename to EFL 2016-08-15 15:14:53 -03:00
Felipe Magno de Almeida f4a90dcde2 eolian-cxx: Fix compilation break from changes in Eo nomenclature
Rename of classes and function calls in generated code and C++ headers
2016-08-11 16:24:15 -03:00
Felipe Magno de Almeida d2dd1e744a eo-cxx: Fix C++ use of new _eo_add_end signature 2016-07-12 17:28:38 -03:00
Daniel Kolesa 41abda37f6 elua: event method fixes in eolian bindings 2016-07-12 11:09:05 +01:00
Daniel Kolesa 96b960c953 elua: support is_restart for events in eolian api 2016-07-07 15:15:03 +01:00
Felipe Magno de Almeida 1c402f62a9 eolian-cxx: Fix generation for ref generic_values and Eolian classes 2016-07-05 16:32:11 -03:00
Daniel Kolesa ab2e608239 eolian: add support for static and terminated arrays
Adds two new type types, STATIC_ARRAY and TERMINATED_ARRAY. Static arrays are
only allowed as struct members right now - they translate to regular C static
arrays (allowing them elsewhere wouldn't be good, as C isn't very good at
working with the size information). Terminated arrays are basically sequences
of data terminated at the end. The base type of static arrays can be any type
that is not marked ref (explicit ref may get allowed later). The base type of
terminated arrays has the same restriction plus that it has to be either
implicitly reference type (i.e. translating to pointer in C), integer type
or a character. In case of ref types, the terminator is NULL. In case of
integer types, the terminator is a zero. In case of character types, the
terminator is also a zero (null terminator like C strings).

@feature
2016-06-30 16:59:21 +01:00
Felipe Magno de Almeida b09c1f8093 eolian-cxx: Added stringshare 2016-06-21 16:35:09 -03:00
Felipe Magno de Almeida 9be8f029af eolian-cxx: Remove Eina_Bool from event function wrapper 2016-06-20 19:35:50 -03:00
Felipe Magno de Almeida b97a156ac4 eolian-cxx: Work with @inout parameter of void type 2016-06-16 21:48:07 -03:00
Felipe Magno de Almeida 7e0692b5f3 eolian-cxx: Remove warning about unused parameter 2016-06-15 17:49:56 -03:00
Felipe Magno de Almeida 512fb7f39b eina-cxx: Add overload for std::nullptr_t to stringview 2016-06-15 15:50:04 -03:00
Felipe Magno de Almeida 8906998ef2 eolian-cxx: Add support for ref parameters and correct ownership handling 2016-06-14 22:44:02 -03:00
Felipe Magno de Almeida e5884c95fa eolian-cxx: Fix C++ compilation for lacking .eo files being generated 2016-06-13 01:17:18 -03:00
Daniel Kolesa 33c147f6d4 eolian: remove the unnecessary subtypes API
Inner type can now be retrieved as a base type of the type.
If the type has two inner types or more, there is a new API that allows you to
get the second inner type by calling it on the first one (same would apply to
getting third via second etc.).

This API is simpler to use and doesn't require an iterator.
2016-06-10 14:28:19 +01:00
Daniel Kolesa 375179b47f eolian: support @protected for accessors (get/set)
Previously it was only possible to set it for the whole property.

@feature
2016-06-09 16:55:24 +01:00
Felipe Magno de Almeida 343b88a735 eolian-cxx: Fix some C++ quirks that makes clang warn about 2016-06-08 12:55:19 -03:00
Daniel Kolesa b87c4f6de8 eolian: refine the ref system to suit more cases
Now references are first class (but still restricted to one level). Unlike
pointers they only mark the type instead of introducing a whole new type.
2016-06-08 15:49:09 +01:00
Daniel Kolesa 7cf7cba88e eolian: remove the c_type_named_get APIs
These have inconsistent behavior and are generally unnecessary, so I'm
removing them. Use the c_type_get funcs instead.
2016-06-06 15:50:15 +01:00
Daniel Kolesa 9752c44a48 eolian: add a new references system to help replace pointers
It's now possible to mark struct fields and function params as "references",
which causes them to become pointers in C (in bindings, they become whatever
is necessary). They're not a part of the type and are much more restricted
than pointers, allowing bindings to be easier. This system will be gradually
utilized and expanded as required.

@feature
2016-06-06 15:28:10 +01:00
Felipe Magno de Almeida b2a07ca150 eo-cxx: Remove commented headers 2016-06-06 04:09:23 -03:00
Felipe Magno de Almeida 2a3d7860db eolian-cxx: Rewrite to accomodate new features of the C++ binding 2016-06-06 02:54:36 -03:00
Felipe Magno de Almeida 4d1b3191d9 eina-cxx: Add placeholder for futures in C++ binding 2016-06-06 02:50:36 -03:00
Felipe Magno de Almeida 710f97580a eina-cxx: Fix wrongful operator++ for iterator and docs 2016-06-06 02:50:13 -03:00
Felipe Magno de Almeida 7e1ce2d33d eina-cxx: Add c_str() to string_view 2016-06-06 02:49:47 -03:00
Felipe Magno de Almeida fec589cbdc eina-cxx: Restrict templated constructor 2016-06-06 02:49:28 -03:00
Felipe Magno de Almeida a1f2d03ecb eina-cxx: Add optional specialization for pointer types 2016-06-06 02:49:00 -03:00
Felipe Magno de Almeida 396fd5e3e1 eina-cxx: Added crange_array template typedef 2016-05-26 16:46:23 -03:00
Felipe Magno de Almeida 6e23780bb1 eolian-cxx: Fix generation of complex types in C++ binding
Fixed generation of complex types in C++ binding, with tests. This
problem came after the removal of the pointer types for top-level
complex types.
2016-05-23 17:34:50 -03:00
Felipe Magno de Almeida e3c8b280c6 c++: Reorganized C++ binding generation
Moved all generation to a single Makefile_Cxx.am file instead of
throughout the whole project. And fixed C++ generation on Elementary
after elm merge.
2016-05-23 15:05:50 -03:00
Felipe Magno de Almeida 5d5c04fd66 js fixes 2016-05-18 17:52:47 +02:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Tom Hacohen 1f4af666e8 Eo cxx: remove leftover usage of eo_del(). 2016-05-18 09:55:30 +01:00
Carsten Haitzler 43661180f7 efl - key/data/value/obj attach to eo objects - make these properties
the key data now is a property so they come out in bindings really
nicely like:

  obj.key_data["blah"] = x;

  x = obj.key_data["blah"];

etc.
2016-05-18 02:02:45 +09:00
Felipe Magno de Almeida 535a069a23 eolian-cxx: Remove .Base requirement
Remove requirement that class can't have the same name as another
class's namespace.
2016-04-21 18:31:53 -03:00
Carsten Haitzler 5e09d1307b eo base - remove the duplicated key dels and just do eo_key_del() now
this rationalizes all the duplicated key dels (key_data, key_obj and
key_value).
2016-04-21 18:02:31 +09:00
Daniel Kolesa 525dcaa6ab eolian: fix invalid type_type mapping in lua bindings 2016-04-18 16:09:21 +01:00
Daniel Kolesa d8285ce651 eolian: fix object scope def in lua bindings 2016-04-18 13:50:28 +01:00
Tom Hacohen f14305024e Eo event: rename Eo_Event->event_info to Eo_Event->info.
The previous naming was redundant and too long.
2016-04-12 15:23:55 +01:00
Felipe Magno de Almeida 62841aee3c eolian: Make promise eolian generation use macros for hooks
Modify the way hooks are defined and used by promise generation in
Eolian in the Eo API.

Instead of passing macro names as parameters to EO_FUNC_BODY macros,
just re-define the actual hooks when it is needed.
2016-04-11 01:28:50 -03:00
Felipe Magno de Almeida 944e11559c eo: add before and after macro hooks for API generation functions
Add two parameters for macros that generate API functions in Eo so
that the generation can be customized with macros used by Eolian.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-06 14:32:04 -07:00
Felipe Magno de Almeida 8c70b9cfd1 eo-cxx: Fix warning on weak symbols with inline functions
Removed the EOAPI which is not necessary as the function is already inlined
2016-04-05 15:42:21 -03:00
Daniel Kolesa 9b845e7135 eolian: add APIs to get all things of each type 2016-03-29 15:01:17 +01:00
Daniel Kolesa b1070f9478 eolian: fix typos in symbol names in lua bindings 2016-03-29 11:13:48 +01:00
Vitor Sousa 3e7f4c1dae eina_cxx: fix Coverity warning regarding uninitialized iterator member 2016-03-21 17:30:49 -03:00
Vitor Sousa afb6646393 efl js: Add clean up callbacks to deallocate memory used in v8::External
Add several garbage collector callbacks for cleaning allocated C and C++
data used inside v8:External objects.

Fix eo_unref of already freed object in eo_js_construct_from_eo.hh.

Ensure all structs are allocated with malloc.

Add test for garbage collection.
Had to created .sh script because shebang clause do not support multiple
arguments.
2016-03-18 17:47:09 -03:00
Vitor Sousa a6025b5d27 efl js: Finish Eina_Iterator binding 2016-03-18 17:47:09 -03:00
Lauro Moura 1422e62f30 efl js: Fix naming of manual binding functions.
Also removed references to the discarded manual binding "ecore_js_file".
2016-03-18 17:47:09 -03:00
Vitor Sousa c7550b2964 eina_cxx: Add missing methods to Eina C++ wrappers
Also fix release_native_handle type error on mutable ranges.
2016-03-18 17:47:09 -03:00
Vitor Sousa fd0cf8b764 eina_cxx: Add specialized eina::iterator for Eo* wrappers
Add specialization of eina::iterator for Eo* C++ wrappers.

Specialize ibegin/iend methods in eina::list and eina::array of
Eo* wrappers to use the new eina::iterator.

Add unit test.
2016-03-18 17:47:09 -03:00
Vitor Sousa a85348b70b efl js: Update Javascript binding to compile with new Eolian API
Reword test method names to check naming convention.
2016-03-18 17:46:38 -03:00
Stefan Schmidt e981bfc4e8 cxx: follow eoid to eo_self rename in cxx generator and bindings
Bringing efl back to a building state with cxx enabled.
2016-03-16 21:11:17 +01:00
Tom Hacohen 72c6236038 Revert "cxx: Migrate C++ binding to the new eo_add syntax"
This reverts commit 48f62ad686.
2016-03-11 12:29:03 +00:00
Vitor Sousa 7973126165 eo_cxx: correct constness of basic Eo C++ wrapper functions 2016-03-09 18:52:10 -03:00