2018-05-22 08:24:06 -07:00
|
|
|
struct Efl.Event_Description {
|
2019-03-22 08:25:22 -07:00
|
|
|
[[This struct holds the description of a specific event.
|
|
|
|
|
|
|
|
@since 1.22
|
|
|
|
]]
|
2016-05-31 08:02:26 -07:00
|
|
|
name: string; [[name of the event.]]
|
2016-10-24 07:52:48 -07:00
|
|
|
unfreezable: bool; [[$true if the event cannot be frozen.]]
|
|
|
|
legacy_is: bool; [[Internal use: $true if a legacy event.]]
|
2017-12-20 01:52:31 -08:00
|
|
|
restart: bool; [[$true if when the event is triggered again from a callback it'll start from where it was]]
|
2015-05-29 02:32:48 -07:00
|
|
|
}
|
|
|
|
|
2019-01-04 06:29:56 -08:00
|
|
|
|
|
|
|
type Efl.Callback_Priority : short;
|
|
|
|
[[
|
|
|
|
Callback priority. Range is -32k - 32k. The lower the number, the higher the priority.
|
|
|
|
|
2019-01-02 15:26:53 -08:00
|
|
|
This is used to insert an event handler relative to the existing stack of sorted event
|
|
|
|
handlers according to that priority. All event handlers always have a priority. If not
|
|
|
|
specified @Efl.Callback_Priority_Default is to be assumed.
|
|
|
|
|
2019-01-04 06:29:56 -08:00
|
|
|
See @Efl.Callback_Priority_Before @Efl.Callback_Priority_Default @Efl.Callback_Priority_After
|
2019-03-22 08:25:22 -07:00
|
|
|
|
|
|
|
@since 1.22
|
|
|
|
]]
|
2019-01-04 06:29:56 -08:00
|
|
|
|
|
|
|
const Efl.Callback_Priority_Before : Efl.Callback_Priority = -100;
|
2019-09-30 10:45:45 -07:00
|
|
|
[[Slightly more prioritized than default.
|
|
|
|
|
|
|
|
@since 1.22
|
|
|
|
]]
|
2019-01-04 06:29:56 -08:00
|
|
|
const Efl.Callback_Priority_Default : Efl.Callback_Priority = 0;
|
2019-09-30 10:45:45 -07:00
|
|
|
[[Default priority.
|
|
|
|
|
|
|
|
@since 1.22
|
|
|
|
]]
|
2019-01-04 06:29:56 -08:00
|
|
|
const Efl.Callback_Priority_After : Efl.Callback_Priority = 100;
|
2019-09-30 10:45:45 -07:00
|
|
|
[[Slightly less prioritized than default.
|
|
|
|
|
|
|
|
@since 1.22
|
|
|
|
]]
|
2019-01-04 06:29:56 -08:00
|
|
|
|
2019-02-22 05:08:53 -08:00
|
|
|
abstract Efl.Object
|
2014-03-09 00:31:28 -08:00
|
|
|
{
|
2019-02-11 05:00:04 -08:00
|
|
|
[[Abstract EFL object class.
|
2019-02-22 05:08:53 -08:00
|
|
|
|
2019-02-11 05:00:04 -08:00
|
|
|
All EFL objects inherit from this class, which provides basic functionality
|
|
|
|
like naming, debugging, hierarchy traversal, event emission and life cycle
|
|
|
|
management.
|
2019-02-22 05:08:53 -08:00
|
|
|
|
2019-02-11 05:00:04 -08:00
|
|
|
Life Cycle
|
|
|
|
Objects are created with efl_add() and mostly disposed of with efl_del().
|
|
|
|
As an optimization, efl_add() accepts a list of initialization functions
|
|
|
|
which the programmer can use to further customize the object before it is
|
|
|
|
fully constructed.
|
|
|
|
Also, objects can have a parent which will keep them alive as long as the
|
|
|
|
parent is alive, so the programmer does not need to keep track of references.
|
|
|
|
(See the @.parent property for details).
|
|
|
|
Due to the above characteristics, EFL objects undergo the following phases
|
|
|
|
during their Life Cycle:
|
|
|
|
- Construction: The @.constructor method is called. Afterwards, any
|
|
|
|
user-supplied initialization methods are called.
|
|
|
|
- Finalization: The @.finalize method is called and @.finalized is set to
|
|
|
|
$true when it returns. Object is usable at this point.
|
|
|
|
- Invalidation: The object has lost its parent. The @.invalidate method is
|
|
|
|
called so all the object's relationships can be terminated. @.invalidated
|
|
|
|
is set to $true.
|
|
|
|
- Destruction: The object has no parent and it can be destroyed. The
|
|
|
|
@.destructor method is called, use it to return any resources the object
|
|
|
|
might have gathered during its life.
|
2019-03-22 08:25:22 -07:00
|
|
|
|
|
|
|
@since 1.22
|
|
|
|
]]
|
2019-05-09 07:16:42 -07:00
|
|
|
c_prefix: efl;
|
2014-04-02 03:41:25 -07:00
|
|
|
|
2015-05-07 08:36:45 -07:00
|
|
|
methods {
|
|
|
|
@property parent {
|
2016-04-14 10:32:45 -07:00
|
|
|
[[The parent of an object.
|
|
|
|
|
2019-02-11 05:00:04 -08:00
|
|
|
Parents keep references to their children and will release these
|
|
|
|
references when destroyed. In this way, objects can be assigned to
|
|
|
|
a parent upon creation, tying their life cycle so the programmer
|
|
|
|
does not need to worry about destroying the child object.
|
|
|
|
In order to destroy an object before its parent, set the parent to
|
|
|
|
$NULL and use efl_unref(), or use efl_del() directly.
|
2016-04-14 10:32:45 -07:00
|
|
|
|
|
|
|
The Eo parent is conceptually user set. That means that a parent
|
2017-12-20 01:52:31 -08:00
|
|
|
should not be changed behind the scenes in an unexpected way.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2016-04-14 10:32:45 -07:00
|
|
|
For example:
|
2019-02-11 05:00:04 -08:00
|
|
|
If you have a widget which can swallow objects into an internal
|
|
|
|
box, the parent of the swallowed objects should be the widget, not
|
|
|
|
the internal box. The user is not even aware of the existence of
|
|
|
|
the internal box.
|
2016-04-14 10:32:45 -07:00
|
|
|
]]
|
|
|
|
|
|
|
|
set {
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-05-21 07:01:07 -07:00
|
|
|
parent: Efl.Object; [[The new parent.]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
|
|
|
}
|
2016-05-17 08:00:13 -07:00
|
|
|
@property name {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[The name of the object.
|
|
|
|
|
|
|
|
Every EFL object can have a name. Names may not contain the
|
|
|
|
following characters: / ? * [ ] ! \ :
|
|
|
|
Using any of these in a name will result in undefined behavior
|
|
|
|
later on. An empty string is considered the same as a $NULL string
|
|
|
|
or no string for the name.
|
2016-04-19 00:34:53 -07:00
|
|
|
]]
|
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-05-21 07:01:07 -07:00
|
|
|
name: string; [[The name.]]
|
2016-04-19 00:34:53 -07:00
|
|
|
}
|
|
|
|
}
|
2016-04-19 01:21:21 -07:00
|
|
|
@property comment {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[A human readable comment for the object.
|
2016-04-19 01:21:21 -07:00
|
|
|
|
2019-02-11 05:00:04 -08:00
|
|
|
Every EFL object can have a comment. This is intended for developers
|
|
|
|
and debugging. An empty string is considered the same as a $NULL
|
2017-12-20 01:52:31 -08:00
|
|
|
string or no string for the comment.
|
2016-04-19 01:21:21 -07:00
|
|
|
]]
|
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-05-21 07:01:07 -07:00
|
|
|
comment: string; [[The comment.]]
|
2016-04-19 01:21:21 -07:00
|
|
|
}
|
|
|
|
}
|
2017-07-20 23:24:08 -07:00
|
|
|
debug_name_override {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[Build a read-only name for this object used for debugging.
|
2017-07-20 23:24:08 -07:00
|
|
|
|
|
|
|
Multiple calls using efl_super() can be chained in order to build
|
|
|
|
the entire debug name, from parent to child classes. In C the usual
|
|
|
|
way to build the string is as follows:
|
|
|
|
|
2017-10-12 18:54:54 -07:00
|
|
|
efl_debug_name_override(efl_super(obj, MY_CLASS), sb);
|
2017-07-20 23:24:08 -07:00
|
|
|
eina_strbuf_append_printf(sb, "new_information");
|
|
|
|
|
2017-12-20 01:52:31 -08:00
|
|
|
Usually more debug information should be added to $sb after
|
2017-10-12 18:54:54 -07:00
|
|
|
calling the super function.
|
2017-07-13 23:57:36 -07:00
|
|
|
]]
|
2017-07-20 23:24:08 -07:00
|
|
|
params {
|
2019-01-27 23:10:43 -08:00
|
|
|
@in sb: strbuf; [[A string buffer, must not be $null.]]
|
2017-07-13 23:57:36 -07:00
|
|
|
}
|
|
|
|
}
|
2019-08-16 07:27:00 -07:00
|
|
|
@property event_global_freeze_count @static {
|
2019-09-13 03:25:49 -07:00
|
|
|
[[Return the global count of freeze events.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2019-09-13 03:25:49 -07:00
|
|
|
This is the amount of calls to @.event_global_freeze minus
|
|
|
|
the amount of calls to @.event_global_thaw.
|
|
|
|
EFL will not emit any event while this count is > 0 (Except
|
|
|
|
events marked $hot).
|
|
|
|
]]
|
|
|
|
get {
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
|
|
|
values {
|
2019-02-11 05:00:04 -08:00
|
|
|
fcount: int; [[The global event freeze count.]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 08:36:45 -07:00
|
|
|
@property event_freeze_count {
|
2019-09-13 03:25:49 -07:00
|
|
|
[[Return the count of freeze events for this object.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2019-09-13 03:25:49 -07:00
|
|
|
This is the amount of calls to @.event_freeze minus
|
|
|
|
the amount of calls to @.event_thaw.
|
|
|
|
This object will not emit any event while this count is > 0
|
|
|
|
(Except events marked $hot).
|
|
|
|
]]
|
|
|
|
get {
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
|
|
|
values {
|
2019-02-11 05:00:04 -08:00
|
|
|
fcount: int; [[The event freeze count of this object.]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 08:36:45 -07:00
|
|
|
@property finalized {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[$true if the object has been finalized, i.e. construction has finished.
|
|
|
|
See the Life Cycle section in this class' description.]]
|
2014-08-29 01:55:02 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-02-11 05:00:04 -08:00
|
|
|
finalized: bool; [[$true if the object is finalized, $false otherwise.]]
|
2014-08-29 01:55:02 -07:00
|
|
|
}
|
|
|
|
}
|
2018-03-07 10:56:53 -08:00
|
|
|
@property invalidated {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[$true if the object has been invalidated, i.e. it has no parent.
|
|
|
|
See the Life Cycle section in this class' description.]]
|
2018-03-07 10:56:53 -08:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-02-11 05:00:04 -08:00
|
|
|
finalized: bool; [[$true if the object is invalidated, $false otherwise.]]
|
2018-03-07 10:56:53 -08:00
|
|
|
}
|
|
|
|
}
|
2018-08-20 10:15:56 -07:00
|
|
|
@property invalidating {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[$true if the object has started the invalidation phase, but has not
|
|
|
|
finished it yet.
|
|
|
|
Note: This might become $true before @.invalidate is called.
|
|
|
|
See the Life Cycle section in this class' description.]]
|
2018-08-20 10:15:56 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-02-11 05:00:04 -08:00
|
|
|
invalidating: bool; [[$true if the object is invalidating, $false otherwise.]]
|
2018-08-20 10:15:56 -07:00
|
|
|
}
|
|
|
|
}
|
2018-01-04 11:41:49 -08:00
|
|
|
provider_find @const {
|
2017-12-20 01:52:31 -08:00
|
|
|
[[Searches upwards in the object tree for a provider which knows the given class/interface.
|
2016-05-04 01:08:00 -07:00
|
|
|
|
|
|
|
The object from the provider will then be returned.
|
|
|
|
The base implementation calls the provider_find function on the object parent,
|
2019-09-10 07:05:44 -07:00
|
|
|
and returns its result. If no parent is present $NULL is returned.
|
2016-05-04 01:08:00 -07:00
|
|
|
Each implementation has to support this function by overriding
|
|
|
|
it and returning itself if the interface matches the parameter.
|
|
|
|
If this is not done the class cannot be found up in the object tree.
|
|
|
|
]]
|
|
|
|
params {
|
2019-02-11 05:00:04 -08:00
|
|
|
klass : const(Efl.Class); [[The class identifier to search for.]]
|
2016-05-04 01:08:00 -07:00
|
|
|
}
|
2019-02-11 05:00:04 -08:00
|
|
|
return : Efl.Object; [[Object from the provider list.]]
|
2016-04-20 23:15:13 -07:00
|
|
|
}
|
2014-09-01 07:53:35 -07:00
|
|
|
constructor {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[Implement this method to provide optional initialization code for your object.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2019-02-11 05:00:04 -08:00
|
|
|
See the Life Cycle section in this class' description.]]
|
|
|
|
return: Efl.Object; [[The new object, can be $NULL if aborted.]]
|
2014-08-27 07:01:09 -07:00
|
|
|
}
|
2015-05-01 07:59:57 -07:00
|
|
|
destructor {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[Implement this method to provide deinitialization code for your object if you need it.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2019-02-11 05:00:04 -08:00
|
|
|
Will be called once @.invalidate has returned.
|
|
|
|
See the Life Cycle section in this class' description.]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
2015-05-01 07:59:57 -07:00
|
|
|
finalize {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[Implement this method to finish the initialization of your object
|
|
|
|
after all (if any) user-provided configuration methods have been
|
|
|
|
executed.
|
|
|
|
|
|
|
|
Use this method to delay expensive operations until user configuration
|
|
|
|
has finished, to avoid building the object in a "default" state in the
|
|
|
|
constructor, just to have to throw it all away because a user
|
2019-04-02 02:32:05 -07:00
|
|
|
configuration (a property being set, for example) requires a different
|
2019-02-11 05:00:04 -08:00
|
|
|
state.
|
|
|
|
This is the last call inside efl_add() and will set @.finalized to $true
|
|
|
|
once it returns.
|
|
|
|
This is an optimization and implementing this method is optional if you
|
|
|
|
already perform all your initialization in the @.constructor method.
|
|
|
|
See the Life Cycle section in this class' description.]]
|
|
|
|
return: Efl.Object; [[The new object. Return $NULL to abort object creation.]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
2018-03-07 10:56:53 -08:00
|
|
|
invalidate {
|
2019-02-11 05:00:04 -08:00
|
|
|
[[Implement this method to perform special actions when your object loses
|
|
|
|
its parent, if you need to.
|
|
|
|
|
|
|
|
It is called when the parent reference is lost or set to $NULL. After this
|
|
|
|
call returns, @.invalidated is set to $true.
|
|
|
|
This allows a simpler tear down of complex hierarchies, by performing
|
|
|
|
object destruction in two steps, first all object relationships are
|
|
|
|
broken and then the isolated objects are destroyed. Performing everything
|
|
|
|
in the @.destructor can sometimes lead to deadlocks, but implementing
|
|
|
|
this method is optional if this is not your case.
|
|
|
|
When an object with a parent is destroyed, it first receives a call to
|
|
|
|
@.invalidate and then to @.destructor.
|
|
|
|
See the Life Cycle section in this class' description.]]
|
2018-03-07 10:56:53 -08:00
|
|
|
}
|
2019-08-28 05:23:00 -07:00
|
|
|
name_find @const @beta {
|
2016-05-17 08:00:13 -07:00
|
|
|
[[Find a child object with the given name and return it.
|
2017-08-08 02:14:07 -07:00
|
|
|
|
|
|
|
The search string can be a glob (shell style, using *). It can also
|
2016-04-20 02:26:35 -07:00
|
|
|
specify class name in the format of "class:name" where ":"
|
|
|
|
separates class and name. Both class and name can be globs.
|
2017-12-20 01:52:31 -08:00
|
|
|
If the class is specified but the name is empty like "class:" then
|
2016-04-20 02:26:35 -07:00
|
|
|
the search will match any object of that class.
|
|
|
|
]]
|
|
|
|
params {
|
2019-02-11 05:00:04 -08:00
|
|
|
@in search: string; [[The name search string.]]
|
2016-04-20 02:26:35 -07:00
|
|
|
}
|
2019-02-11 05:00:04 -08:00
|
|
|
return: Efl.Object; [[The first object found.]]
|
2016-04-20 02:26:35 -07:00
|
|
|
}
|
2015-05-01 07:59:57 -07:00
|
|
|
event_thaw {
|
2016-11-10 05:38:06 -08:00
|
|
|
[[Thaw events of object.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2019-01-21 02:54:41 -08:00
|
|
|
Allows event callbacks to be called again for this object after a call
|
|
|
|
to @.event_freeze. The amount of thaws must match the amount of freezes
|
|
|
|
for events to be re-enabled.
|
2015-06-05 09:03:36 -07:00
|
|
|
]]
|
2015-05-01 07:59:57 -07:00
|
|
|
}
|
|
|
|
event_freeze {
|
2019-01-21 02:54:41 -08:00
|
|
|
[[Freeze events of this object.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2019-01-21 02:54:41 -08:00
|
|
|
Prevents event callbacks from being called for this object. Enable
|
|
|
|
events again using @.event_thaw. Events marked $hot cannot be stopped.
|
2015-06-05 09:03:36 -07:00
|
|
|
]]
|
2015-05-01 07:59:57 -07:00
|
|
|
}
|
2019-08-16 07:27:00 -07:00
|
|
|
event_global_thaw @static {
|
2019-09-23 01:41:46 -07:00
|
|
|
[[Globally thaw events for ALL EFL OBJECTS.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2019-01-21 02:54:41 -08:00
|
|
|
Allows event callbacks to be called for all EFL objects after they have
|
|
|
|
been disabled by @.event_global_freeze. The amount of thaws must match
|
|
|
|
the amount of freezes for events to be re-enabled.
|
2015-06-05 09:03:36 -07:00
|
|
|
]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
2019-08-16 07:27:00 -07:00
|
|
|
event_global_freeze @static {
|
2019-01-21 02:54:41 -08:00
|
|
|
[[Globally freeze events for ALL EFL OBJECTS.
|
|
|
|
|
|
|
|
Prevents event callbacks from being called for all EFL objects.
|
|
|
|
Enable events again using @.event_global_thaw. Events marked $hot
|
|
|
|
cannot be stopped.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2019-01-21 02:54:41 -08:00
|
|
|
Note: USE WITH CAUTION.
|
2015-06-05 09:03:36 -07:00
|
|
|
]]
|
2015-05-01 07:59:57 -07:00
|
|
|
}
|
2016-06-20 02:37:02 -07:00
|
|
|
event_callback_stop {
|
|
|
|
[[Stop the current callback call.
|
|
|
|
|
|
|
|
This stops the current callback call. Any other callbacks for the
|
|
|
|
current event will not be called. This is useful when you want to
|
2017-12-20 01:52:31 -08:00
|
|
|
filter out events. Just add higher priority events and call this
|
|
|
|
under certain conditions to block a certain event.
|
2016-06-20 02:37:02 -07:00
|
|
|
]]
|
|
|
|
}
|
2018-12-12 14:07:52 -08:00
|
|
|
event_callback_forwarder_priority_add {
|
2019-01-02 15:26:53 -08:00
|
|
|
[[Add an event callback forwarder that will make this object emit an event whenever another
|
|
|
|
object ($source) emits it. The event is said to be forwarded from $source to this object.
|
|
|
|
|
|
|
|
The event is unaffected on $source and behave like any other event being propagated on
|
|
|
|
any object and will trigger all the handler registered on $source like nothing special
|
|
|
|
happened.
|
|
|
|
|
|
|
|
This allow object that hide internally another object to easily be able to propagate an event
|
|
|
|
without the need to add custom handler.
|
|
|
|
|
|
|
|
Note: The priority is used to make sure that you are intercepting the event when you expect
|
|
|
|
by inserting a handler at the right position in the stack of event handler on the object that
|
|
|
|
emit the event.]]
|
2014-03-09 00:31:28 -08:00
|
|
|
params {
|
2019-09-10 05:29:06 -07:00
|
|
|
@in desc: const(Efl.Event_Description) @by_ref; [[The description of the event to listen to]]
|
2019-01-02 15:26:53 -08:00
|
|
|
@in priority: Efl.Callback_Priority; [[The priority at which to insert the event forwarder handler
|
|
|
|
in the existing list of handler on the source of event object. The lower the number, the higher
|
|
|
|
the priority. As a shortcut @Efl.Callback_Priority_Before,
|
|
|
|
@Efl.Callback_Priority_Default and @Efl.Callback_Priority_After can be used. See
|
|
|
|
@Efl.Callback_Priority for more details.]]
|
2019-05-26 08:25:15 -07:00
|
|
|
@in source: Efl.Object; [[The object which emits the initial event]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
|
|
|
}
|
2015-05-01 07:59:57 -07:00
|
|
|
event_callback_forwarder_del {
|
2019-01-02 15:26:53 -08:00
|
|
|
[[Remove an event callback forwarder for a specified event and object.]]
|
2014-03-09 00:31:28 -08:00
|
|
|
params {
|
2019-09-10 05:29:06 -07:00
|
|
|
@in desc: const(Efl.Event_Description) @by_ref; [[The description of the event to listen to]]
|
2019-05-26 08:25:15 -07:00
|
|
|
@in new_obj: Efl.Object; [[The object to emit events from]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
children_iterator_new {
|
2019-09-23 01:41:46 -07:00
|
|
|
[[Get an iterator on all children.]]
|
2019-09-06 08:01:05 -07:00
|
|
|
return: iterator<Efl.Object> @move @no_unused; [[Children iterator]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
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 06:24:45 -08:00
|
|
|
composite_attach @beta {
|
2015-06-05 09:03:36 -07:00
|
|
|
[[Make an object a composite object of another.
|
|
|
|
|
|
|
|
The class of comp_obj must be part of the extensions of the class of the parent.
|
2017-12-20 01:52:31 -08:00
|
|
|
It isn't possible to attach more then 1 composite of the same class.
|
|
|
|
This function also sets the parent of comp_obj to parent.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2015-07-08 07:12:32 -07:00
|
|
|
See @.composite_detach, @.composite_part_is.
|
2015-06-05 09:03:36 -07:00
|
|
|
]]
|
2014-10-21 04:37:00 -07:00
|
|
|
params {
|
2016-08-09 06:10:05 -07:00
|
|
|
@in comp_obj: Efl.Object; [[the object that will be used to composite the parent.]]
|
2014-10-21 04:37:00 -07:00
|
|
|
}
|
2015-09-18 20:54:58 -07:00
|
|
|
return: bool; [[$true if successful. $false otherwise.]]
|
2014-10-21 04:37:00 -07:00
|
|
|
}
|
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 06:24:45 -08:00
|
|
|
composite_detach @beta {
|
2015-06-05 09:03:36 -07:00
|
|
|
[[Detach a composite object from another object.
|
|
|
|
|
2015-07-08 07:12:32 -07:00
|
|
|
This functions also sets the parent of comp_obj to $null.
|
2015-06-05 09:03:36 -07:00
|
|
|
|
2015-07-08 07:12:32 -07:00
|
|
|
See @.composite_attach, @.composite_part_is.
|
2015-06-05 09:03:36 -07:00
|
|
|
]]
|
2014-10-21 04:37:00 -07:00
|
|
|
params {
|
2016-11-10 05:38:06 -08:00
|
|
|
@in comp_obj: Efl.Object; [[The object that will be removed from the parent.]]
|
2014-10-21 04:37:00 -07:00
|
|
|
}
|
2015-09-18 20:54:58 -07:00
|
|
|
return: bool; [[$true if successful. $false otherwise.]]
|
2014-10-21 04:37:00 -07:00
|
|
|
}
|
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 06:24:45 -08:00
|
|
|
composite_part_is @beta {
|
2015-06-05 09:03:36 -07:00
|
|
|
[[Check if an object is part of a composite object.
|
|
|
|
|
2015-07-08 07:12:32 -07:00
|
|
|
See @.composite_attach, @.composite_part_is.
|
2015-06-05 09:03:36 -07:00
|
|
|
]]
|
2015-07-08 07:12:32 -07:00
|
|
|
return: bool; [[$true if it is. $false otherwise.]]
|
2014-10-21 04:37:00 -07:00
|
|
|
}
|
2019-02-22 05:08:53 -08:00
|
|
|
@property allow_parent_unref @beta {
|
2017-09-28 00:38:00 -07:00
|
|
|
[[Allow an object to be deleted by unref even if it has a parent.
|
|
|
|
|
2017-12-20 01:52:31 -08:00
|
|
|
This simply hides the error message warning that an object being
|
|
|
|
destroyed still has a parent. This property is false by default.
|
2017-09-28 00:38:00 -07:00
|
|
|
|
|
|
|
In a normal object use case, when ownership of an object is given
|
2017-12-20 01:52:31 -08:00
|
|
|
to a caller, said ownership should be released with efl_unref().
|
|
|
|
If the object has a parent, this will print error messages, as
|
2019-02-11 05:00:04 -08:00
|
|
|
efl_unref() is stealing the ref from the parent.
|
2017-09-28 00:38:00 -07:00
|
|
|
|
2017-12-20 01:52:31 -08:00
|
|
|
Warning: Use this function very carefully, unless you're absolutely
|
2017-09-28 00:38:00 -07:00
|
|
|
sure of what you are doing.
|
|
|
|
]]
|
|
|
|
values {
|
2019-02-11 05:00:04 -08:00
|
|
|
allow: bool(false); [[Whether to allow efl_unref() to zero
|
2017-09-28 00:38:00 -07:00
|
|
|
even if @.parent is not $null.]]
|
|
|
|
}
|
|
|
|
}
|
2019-07-11 14:53:19 -07:00
|
|
|
provider_register {
|
2019-09-12 04:26:24 -07:00
|
|
|
[[Will register a manager of a specific class to be answered by @.provider_find.]]
|
2019-07-11 14:53:19 -07:00
|
|
|
params {
|
|
|
|
@in klass: const(Efl.Class); [[The class provided by the registered provider.]]
|
2019-09-02 07:24:26 -07:00
|
|
|
@in provider: const(Efl.Object); [[The provider for the newly registered class that has to provide that
|
|
|
|
said Efl.Class.]]
|
2019-07-11 14:53:19 -07:00
|
|
|
}
|
|
|
|
return: bool; [[$true if successfully register, $false otherwise.]]
|
|
|
|
}
|
|
|
|
provider_unregister {
|
2019-09-02 07:24:26 -07:00
|
|
|
[[Will unregister a manager of a specific class that was previously registered and answered by
|
2019-09-12 04:26:24 -07:00
|
|
|
@.provider_find.]]
|
2019-07-11 14:53:19 -07:00
|
|
|
params {
|
|
|
|
@in klass: const(Efl.Class); [[The class provided by the provider to unregister for.]]
|
|
|
|
@in provider: const(Efl.Object); [[The provider for the registered class to unregister.]]
|
|
|
|
}
|
|
|
|
return: bool; [[$true if successfully unregistered, $false otherwise.]]
|
|
|
|
}
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
2014-06-03 03:23:53 -07:00
|
|
|
implements {
|
2014-06-20 02:45:55 -07:00
|
|
|
class.constructor;
|
|
|
|
class.destructor;
|
2014-06-03 03:23:53 -07:00
|
|
|
}
|
2014-03-09 00:31:28 -08:00
|
|
|
events {
|
2019-02-11 05:00:04 -08:00
|
|
|
del @hot: void; [[Object is being deleted. See @.destructor.]]
|
|
|
|
invalidate @hot: void; [[Object is being invalidated and losing its parent. See @.invalidate.]]
|
2019-09-02 07:24:26 -07:00
|
|
|
noref @hot: void; [[Object has lost its last reference, only parent relationship is keeping it alive.
|
|
|
|
Advanced usage.]]
|
2019-05-23 11:41:57 -07:00
|
|
|
ownership,unique @hot: void; [[Object has lost a reference and only one is left. It has just one owner now.
|
|
|
|
Triggered whenever the refcount goes from two to one.]]
|
|
|
|
ownership,shared @hot: void; [[Object has acquired a second reference. It has multiple owners now.
|
|
|
|
Triggered whenever increasing the refcount from one to two,
|
|
|
|
it will not trigger by further increasing the refcount beyond two.]]
|
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-11 08:20:40 -07:00
|
|
|
destruct @hot: void; [[Object has been fully destroyed. It can not be used
|
2018-01-09 22:23:29 -08:00
|
|
|
beyond this point. This event should only serve to clean up any
|
2019-02-11 05:00:04 -08:00
|
|
|
reference you keep to the object.]]
|
2014-03-09 00:31:28 -08:00
|
|
|
}
|
|
|
|
}
|