Commit Graph

77 Commits

Author SHA1 Message Date
Marcel Hollerbach ee092073a3 eo: make the parent a optional constructor
this is needed in order to sanely bind parent calls to some objejcts,
but not all.

However, from the canvas structure up we *need* a parent, so we can
fetch the evas from it. So declare it there a none optional

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11734
2020-06-09 10:29:23 +02:00
Daniel Kolesa 7791d9fac6 remove unused imports in eo/eot files 2020-04-19 01:44:50 +02:00
Daniel Kolesa 71c83d2005 efl: add code to enforce presence of @since tags
This is not yet enabled because there's too many instances where
this is broken.

Ref T7704
2019-09-30 20:12:35 +02:00
Xavi Artigas 3b53749149 docs: Typos in Efl.Object 2019-09-23 10:41:46 +02:00
Xavi Artigas 8c09c1cae8 docs: Move property docs to property level instead of set/get
Eolian @properties should be documented at the property level, and
documentation at the setter or getter level should be left to setter-
or getter-specific comments. There is usually no need at all to have
setter- or getter- specific comments.
Also, a property is not a method so descriptions should match that.

This patch removes lots of duplicated text, and will allow enabling
by default the eolian check that ensures that properties have proper
property-level docs.

No functional changes.
2019-09-13 12:30:03 +02:00
Marcel Hollerbach 84487d8257 efl_object: insert @ to link docs proberly
Summary: Depends on D9919

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9920
2019-09-12 13:26:24 +02:00
Xavi Artigas 96d8b9bc3e docs: nicer formatting of the NULL keyword, everywhere 2019-09-10 16:05:44 +02:00
Daniel Kolesa 31658e6e14 efl: replace usage of ptr() in all stable APIs 2019-09-10 14:29:06 +02:00
Daniel Kolesa 4f4b58bf4c efl: change all occurences of @owned to @move 2019-09-06 17:01:05 +02:00
Xavi Artigas dc05cbbee8 docs: Fix typos and wrap EO files to 120 chars
As per our style guide:
https://www.enlightenment.org/contrib/docs/eo-guide.md
2019-09-02 16:24:26 +02:00
Daniel Kolesa 9c018613ee eolian: drop @cref
In the end this was just a failed experiment that didn't turn
out to be practical. For now, revert back to ptr(const(T)) until
a proper replacement for pointer syntax is added.
2019-08-29 13:58:16 +02:00
WooHyun Jung cfc1d3d38b efl_object: set @beta to name_find
This property should not be used by application developers
with current status.
There is no way to trace child objects from parents, because
many codes are internally calling efl_parent_set.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9768
2019-08-28 18:08:32 +02:00
Daniel Kolesa 8a8a833837 eolian: rename @class on methods to @static
Ref https://phab.enlightenment.org/T8118
Ref https://phab.enlightenment.org/T7675
2019-08-16 16:27:00 +02:00
Daniel Kolesa d964a04da1 eo: remove Efl_Event definition (replace with builtin) 2019-07-26 13:21:14 +02:00
Cedric BAIL 9e6d3b44e6 eo: add ability to register provider on the Eo object directly.
This should reduce the need for custom implementation of efl_object_provider_bind.
It also enable the ability to register provider from user code on any Efl_Object.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9292
2019-07-17 21:57:53 +02:00
Daniel Kolesa fbdbf6b132 eolian: add builtin binbuf and event types
Binbuf is like strbuf and allows not using the Eina opaque wrapper
now, which will remove some ptr(). And event translates to
Efl.Event because otherwise there would be no way to get rid
of void_ptr.
2019-07-17 15:52:39 +02:00
Vitor Sousa a86a0931f1 eo: add events to track the ownership status of an Eo object
Some user code may want to track an object ownership in regard to whether it is
kept by just one owner or shared between many owners.

This is specially true for code provided by bindings to other programming
languages, where different kinds of resource management may take place.

The event `ownership,unique` is triggered whenever the object refcount goes
from two to one, as a signal that it has just one owner from now on.

The event `ownership,shared` is triggered whenever the object refcount goes
from one to two, as a signal that it has multiple owners from now on.
It will not trigger when further increasing the refcount to any value beyond
two.

We also add benchmarks for sharing (i.e. increasing the refcount) and them
unsharing objects, in order to evaluate the performance impact of this patch.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8678
2019-05-29 15:53:23 -07:00
Daniel Kolesa 13ddc5dbc1 eolian: rename @warn_unused and its associated API
@warn_unused in syntax is now called @no_unused - this is because
"warning about unused" is a C thing (or rather, an extension to C)
and various languages might want to use stricter behavior for this.

Its associated API does the reverse now - it lets you query whether
being unused is allowed at all. This is to match future behavior
of Eolian (once it supports versioning) that will likely reverse it.

@feature
2019-05-26 17:41:22 +02:00
Daniel Kolesa d0fed247bb eolian: remove param @nonull
This has been deprecated for a while and is not strictly necessary
- as a part of an effort to stabilize Eolian, remove this. Eolian
will eventually gain support for versioning and use a reversed
behavior (i.e. no NULL by default), but the API it wlll use for
that will be very different. Features can always be added, it's
much harder to drop them.

@feature
2019-05-26 17:25:15 +02:00
Daniel Kolesa 5ea0195661 eolian: remove @nullable keyword
This was an experiment that never properly took off and was never
used by any generator. Its use was highly variable, so it could
not be relied upon. We will still want to reverse the current
behavior eventually (no null by default), but that will be
done with eo file versioning in the future.

@feature
2019-05-21 16:04:35 +02:00
Daniel Kolesa 6312cafe20 eolian: move from eo_prefix to c_prefix 2019-05-09 16:17:44 +02:00
Xavi Artigas 57da0bee3d docs: Fix common misspellings in EO files
Fixed all appearances of words from this list in EO files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 11:32:05 +02:00
Xavi Artigas 9f1cd60aeb docs: Document event info calling convention
Both at the emitter (efl_event_callback_call) and the receiver
(info field in the Efl.Event structure).
The Events tutorial should repeat this.
Fixes T7760

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8486
2019-03-28 09:39:40 +01:00
Xavi Artigas 205193f1ab docs: Add @since 1.22 to all stable classes' EO docs
Summary: Previous @since tags have already been removed from eo files.

Test Plan: Everything builds, but stable classes now have Since tags in the docs.

Reviewers: zmike, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8446
2019-03-22 16:57:36 +01:00
Xavi Artigas bbd4b6e514 docs: Remove obsolete @since tags from EO files
Summary:
All legacy @since tags have already moved to the *.legacy.h files.
EO files are now devoid of @since tags (except some eldbus still
needed for legacy).
Upcoming patches will add @since 1.22 to those APIs which come out
of beta in this release.
APIs marked @beta do not need @since tags.

Test Plan: Everything builds, EO docs (like DocFX) have no Since tags.

Reviewers: zmike, bu5hm4n, lauromoura, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8430
2019-03-20 20:16:05 +01:00
Marcel Hollerbach 999ed5f200 eo: mark efl_object stable
fix T7557

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8000
2019-03-06 11:34:53 -08:00
Xavi Artigas 333330a6e5 Mark BETA classes individually
Summary:
Instead of surrounding all the #include "*.eo.h" lines in Efl.h
with #ifdef EFL_BETA_API_SUPPORT, include these files unconditionally, but mark
all classes as @beta in the eo files.
This will allow taking them out of beta one by one as we deem them stable enough.
Otherwise, the current procedure involves moving the #include line out of the
ifdef block, which is cumbersome and messes include order.

Depends on D7950
Fixes T7692

Test Plan: Nothing changes

Reviewers: zmike, bu5hm4n, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7692

Differential Revision: https://phab.enlightenment.org/D7951
2019-02-14 17:46:50 +01:00
Marcel Hollerbach 1fabc8fb99 eo: declare Eo stable
Summary:
This declares the main part of Eo.h as stable, except the domain api for
now. We don't have a user of that API for now, nor do we have bindings
supporting threads, lets wait with this bit until we have bindings for
this, so we can test it.

Further more, this does not stabilize the composition API of
efl_object.eo.h, reason for this is, that we might want to overthink the
solution we have with events, as we might want to forward events per
default.
Depends on D7931

Reviewers: stefan_schmidt, cedric, zmike, segfaultxavi

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7932
2019-02-14 15:24:45 +01:00
Xavi Artigas 8985222f47 docs: Update efl_object lifecycle docs
Summary:
Explained the different phases, added method refs and removed outdated links.
Ref T7557

Reviewers: zmike, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7557

Differential Revision: https://phab.enlightenment.org/D7903
2019-02-11 14:16:48 +01:00
Lauro Moura 5f1b448323 eo: Replace ptr(Eina.Strbuf) with plain strbuf.
Summary: Also fix CXX compilation after this change.

Reviewers: cedric, felipealmeida

Reviewed By: felipealmeida

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7792
2019-01-28 16:15:09 +09:00
Xavi Artigas 213a842d52 docs: Fix Efl.Object Freeze and Thaw docs
Summary: Fixes T7641

Test Plan: Only docs affected.

Reviewers: zmike, cedric

Reviewed By: cedric

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7641

Differential Revision: https://phab.enlightenment.org/D7707
2019-01-25 13:36:44 +01:00
Cedric BAIL 4a25abccd6 eo: remove function efl_noref that duplicate EFL_EVENT_NOREF.
efl_noref is unused, but will still trigger the full eo call for nothing.
This was the most expensive NOOP. EFL_EVENT_NOREF does the same thing and
we can even filter generating that call as we know when someone is listening.
So removing the function.

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7742
2019-01-24 11:54:19 -08:00
Cedric BAIL b8e352cde7 eo: improve documentation for event forwarder.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7532
2019-01-10 11:13:49 -08:00
Cedric BAIL 35acfebee4 eo: provider find actually is just accepting Efl.Class, maybe an hystoric left over.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7440
2019-01-09 11:02:05 -08:00
Marcel Hollerbach efd0efb316 eo: move definitions of priority from Eo.h to the object
So it can be references from the later coming definition of
callback_forwarder

ref D7532

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7542
2019-01-04 11:03:38 -08:00
Cedric BAIL dfd09ec7e4 eo: enable priority with event forwarder.
Note: Their isn't any ability to do something like a static array of
events at the moment. It might lead to large memory being used when it
wouldn't be necessary. If that was the case, we could fix it, but it
would require a lot of dynamic hash operation I think.

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7482
2019-01-02 13:39:14 -08:00
Daniel Kolesa c8e0a1d2e2 eolian: implement new syntax for inheritance
This new syntax separates the parent class from extensions, in
a familiar way to similar to e.g. Java. Since changing everything
at once is a lot of effort, implement it alongside for the time
being.
2018-11-23 13:57:07 +01:00
Marcel Hollerbach 365c0334ff efl_object: add call for getting invalidating
Summary:
there is now invalidated & invalidating.

invalidated returns true when all children are invalidated, and the
object is / was requested to be invalidated.

invalidating return true when the object is called to be invalidated but
not all children are invalidated yet. However, the object is garanteed
to be invalidated in near future.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric

Tags: #efl, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D6722
2018-08-20 13:15:57 -04:00
Cedric BAIL 0239099d01 eo: efl_del should not be something anyone can override this can break so many things.
Allowing override of efl_del allow for messing with object life cycle which can create
problem for binding where an object was expected to be invalidated, but isn't really.
2018-05-24 16:02:19 -07:00
Xavi Artigas 029f0769a5 efl: rename Efl.Event.Description -> Efl.Event_Description 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
Xavi Artigas 5d1898dd9e eo: do not expose callback,add and del events in bindings
These events have been removed from efl_object.eo. Bindings can
still use the EFL_EVENT_CALLBACK_ADD and EFL_EVENT_CALLBACK_DEL
events from C, but they won't be available to the bound language.
The rationale is that bound languages probably will have their
own way to handle callbacks and C function pointers will mean
very little to them. For example, the binding code could route
the native callback through a dispatcher so the received
function ptr would always be that of the dispatcher method.

Closes D6179.
2018-05-18 16:45:11 +02:00
Cedric BAIL 9072c9a37a eo: add events when object get invalidated and loose all its reference matching other lifecycle events. 2018-03-30 09:53:59 -07:00
Cedric Bail 83251edae7 eo: introduce invalidate and noref state.
This is just a first step. All user of destructor should be updated to
move the code that rely on their efl_parent and on efl_provider_find to
invalidate. Then we will be able to change the way efl_add and efl_del
work to properly refcount things. efl_noref won't be triggered at the
moment until both efl_parent_set(obj, NULL) and the last user ref are
set to NULL. This is not what we want, but due to how user refcount is
accounting parent at the moment, until all the code is move to rely
on invalidate we can not fix this.
2018-03-07 10:56:53 -08:00
Jean-Philippe Andre f285fd5925 eo: Add "destruct" event
Triggered after (almost) complete destruction of the object.

Not called "deleted" because the other event is already "del".
I don't like "destruct" much but this follows the terminology of
"constructor" / "destructor".

@feature
2018-01-10 16:31:06 +09:00
Cedric BAIL 526415d903 eo: make efl_provider_find a @const function. 2018-01-04 11:45:10 -08:00
Andy Williams d280ab7410 docs: Fix eo_add -> efl_add 2018-01-03 14:44:39 +00:00
Andy Williams 5162d66c51 eo: Update grammar and readability 2017-12-20 09:52:31 +00: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
Daniel Kolesa 4f5b72a3ed eo files: convert various to use @cref 2017-11-02 16:41:01 +01:00