From 1b568327c4feca6ac79863551abf1507bb090c55 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 11 Feb 2019 12:11:39 +0100 Subject: [PATCH 01/87] efl_gfx_color_class: make this a mixin and move color_class_code here Summary: color_class_code seems to only have been added to efl_gfx_color in order to share the hex conversion code, but this is trivial to do when it's in another class and makes the api more sensible ref T7559 Reviewers: segfaultxavi, bu5hm4n, cedric Reviewed By: segfaultxavi Subscribers: #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7559 Differential Revision: https://phab.enlightenment.org/D7898 --- src/lib/edje/edje_main.c | 6 +-- src/lib/edje/edje_private.h | 2 +- src/lib/efl/interfaces/efl_gfx_color.c | 14 ++--- src/lib/efl/interfaces/efl_gfx_color.eo | 19 ------- src/lib/efl/interfaces/efl_gfx_color_class.eo | 53 ++++++++++++++++--- src/lib/efl/interfaces/efl_interfaces_main.c | 1 - 6 files changed, 59 insertions(+), 36 deletions(-) diff --git a/src/lib/edje/edje_main.c b/src/lib/edje/edje_main.c index 1417309250..dc2c35cba5 100644 --- a/src/lib/edje/edje_main.c +++ b/src/lib/edje/edje_main.c @@ -84,7 +84,7 @@ edje_init(void) _edje_scale = FROM_DOUBLE(1.0); _edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, efl_main_loop_get()); EINA_SAFETY_ON_TRUE_GOTO(!_edje_global_obj, shutdown_efreet); - EINA_SAFETY_ON_TRUE_GOTO(!efl_loop_register(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj), shutdown_efreet); + EINA_SAFETY_ON_TRUE_GOTO(!efl_loop_register(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN, _edje_global_obj), shutdown_efreet); EINA_SAFETY_ON_TRUE_GOTO(!efl_loop_register(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj), shutdown_efreet); EINA_SAFETY_ON_TRUE_GOTO(!efl_loop_register(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj), shutdown_efreet); @@ -154,7 +154,7 @@ shutdown_all: _edje_edd_shutdown(); if (_edje_global_obj) { - efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); + efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN, _edje_global_obj); efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); efl_del(_edje_global_obj); @@ -213,7 +213,7 @@ _edje_shutdown_core(void) _edje_text_class_hash_free(); _edje_size_class_hash_free(); _edje_edd_shutdown(); - efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); + efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN, _edje_global_obj); efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); efl_del(_edje_global_obj); diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index 6b7cf50ffc..3721d28bdf 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -2486,7 +2486,7 @@ static inline Edje_Global * _edje_global(void) { #ifndef NDEBUG - return efl_provider_find(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE); + return efl_provider_find(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN); #else extern Edje_Global *_edje_global_obj; return _edje_global_obj; diff --git a/src/lib/efl/interfaces/efl_gfx_color.c b/src/lib/efl/interfaces/efl_gfx_color.c index 54c4df868f..92c1f07483 100644 --- a/src/lib/efl/interfaces/efl_gfx_color.c +++ b/src/lib/efl/interfaces/efl_gfx_color.c @@ -117,8 +117,8 @@ _efl_gfx_color_color_code_get(const Eo *obj, void *_pd EINA_UNUSED) return eina_slstr_printf("#%02X%02X%02X%02X", r, g, b, a); } -EOLIAN static void -_efl_gfx_color_color_class_code_set(Eo *obj, void *_pd EINA_UNUSED, const char *color_class, +EOLIAN static Eina_Bool +_efl_gfx_color_class_color_class_code_set(Eo *obj, void *_pd EINA_UNUSED, const char *color_class, Efl_Gfx_Color_Class_Layer layer, const char *colorcode) { int len; @@ -127,17 +127,19 @@ _efl_gfx_color_color_class_code_set(Eo *obj, void *_pd EINA_UNUSED, const char * len = _format_clean_param(colorcode); _format_color_parse(colorcode, len, &r, &g, &b, &a); - efl_gfx_color_class_set(obj, color_class, layer, r, g, b, a); + return efl_gfx_color_class_set(obj, color_class, layer, r, g, b, a); } EOLIAN static const char * -_efl_gfx_color_color_class_code_get(const Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, +_efl_gfx_color_class_color_class_code_get(const Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *color_class, Efl_Gfx_Color_Class_Layer layer) { int r, g, b, a; - efl_gfx_color_class_get(obj, color_class, layer, &r, &g, &b, &a); - return eina_slstr_printf("#%02X%02X%02X%02X", r, g, b, a); + if (efl_gfx_color_class_get(obj, color_class, layer, &r, &g, &b, &a)) + return eina_slstr_printf("#%02X%02X%02X%02X", r, g, b, a); + return NULL; } #include "interfaces/efl_gfx_color.eo.c" +#include "interfaces/efl_gfx_color_class.eo.c" diff --git a/src/lib/efl/interfaces/efl_gfx_color.eo b/src/lib/efl/interfaces/efl_gfx_color.eo index 6e1aa2b260..d3c41e1e31 100644 --- a/src/lib/efl/interfaces/efl_gfx_color.eo +++ b/src/lib/efl/interfaces/efl_gfx_color.eo @@ -58,24 +58,5 @@ mixin Efl.Gfx.Color colorcode: string; [[the hex color code.]] } } - @property color_class_code { - set { - [[Set the color class color of given Evas Object to the given hex color code(#RRGGBBAA). - e.g. efl_gfx_color_class_code_set(obj, "color_class_name", layer, "#FFCCAACC"); - ]] - } - get { - [[Get hex color class code of given Evas Object. - This returns a short lived hex color class code string. - ]] - } - keys { - color_class: string; [[The name of color class]] - layer: Efl.Gfx.Color_Class_Layer @optional; [[The layer to set the color]] - } - values { - colorcode: string; [[the hex color code.]] - } - } } } diff --git a/src/lib/efl/interfaces/efl_gfx_color_class.eo b/src/lib/efl/interfaces/efl_gfx_color_class.eo index f0d4dcb866..990835dfce 100644 --- a/src/lib/efl/interfaces/efl_gfx_color_class.eo +++ b/src/lib/efl/interfaces/efl_gfx_color_class.eo @@ -1,10 +1,11 @@ import efl_gfx_types; -interface Efl.Gfx.Color_Class +mixin Efl.Gfx.Color_Class { - [[Efl Gfx Color Class interface]] + [[Efl Gfx Color Class mixin class]] + data: null; methods { - @property color_class { + @property color_class @pure_virtual { set { [[Set the color of color class. @@ -46,7 +47,47 @@ interface Efl.Gfx.Color_Class a: int; [[The alpha value]] } } - @property color_class_description { + @property color_class_code { + set { + [[Set the hex color string of color class. + + This function sets the color values for a color class. This will + cause all edje parts in the specified object that have the specified + color class to have their colors multiplied by these values. + + The first color is the object, the second is the text outline, and + the third is the text shadow. (Note that the second two only apply + to text parts). + + Setting color emits a signal "color_class,set" with source being + the given color. + + Note: These color values are expected to be premultiplied by the alpha.]] + return: bool; [[$true if setting the color succeeded, $false otherwise]] + } + get { + [[Get the hex color string of color class. + + This function gets the color values for a color class. If no explicit + object color is set, then global values will be used. + + The first color is the object, the second is the text outline, and + the third is the text shadow. (Note that the second two only apply + to text parts). + + Returns NULL if the color class cannot be fetched. + + Note: These color values are expected to be premultiplied by $a.]] + } + keys { + color_class: string; [[The name of color class]] + layer: Efl.Gfx.Color_Class_Layer @optional; [[The layer to set the color]] + } + values { + colorcode: string; [[the hex color code.]] + } + } + @property color_class_description @pure_virtual { get { [[Get the description of a color class. @@ -59,7 +100,7 @@ interface Efl.Gfx.Color_Class description: string; [[The description of the target color class or $null if not found]] } } - color_class_del { + color_class_del @pure_virtual { [[Delete the color class. This function deletes any values for the specified color class. @@ -73,7 +114,7 @@ interface Efl.Gfx.Color_Class @in color_class: string; [[The name of color_class]] } } - color_class_clear { + color_class_clear @pure_virtual { [[Delete all color classes defined in object level. This function deletes any color classes defined in object level. diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 4e2490a6c7..0ede9908f8 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -35,7 +35,6 @@ #include "interfaces/efl_gfx_fill.eo.c" #include "interfaces/efl_gfx_view.eo.c" -#include "interfaces/efl_gfx_color_class.eo.c" #include "interfaces/efl_gfx_text_class.eo.c" #include "interfaces/efl_gfx_size_class.eo.c" From 8985222f4798c320e1252e8c59d29169aeb9771f Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 11 Feb 2019 14:00:04 +0100 Subject: [PATCH 02/87] 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 --- src/lib/eo/efl_object.eo | 161 ++++++++++++++++++++++++++------------- 1 file changed, 107 insertions(+), 54 deletions(-) diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo index 5aa1c846d8..a9ac302eee 100644 --- a/src/lib/eo/efl_object.eo +++ b/src/lib/eo/efl_object.eo @@ -29,25 +29,54 @@ const Efl.Callback_Priority_After : Efl.Callback_Priority = 100; abstract Efl.Object { - [[Abstract Efl object class]] + [[Abstract EFL object class. + + All EFL objects inherit from this class, which provides basic functionality + like naming, debugging, hierarchy traversal, event emission and life cycle + management. + + 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. + ]] eo_prefix: efl; methods { @property parent { [[The parent of an object. - Parents keep references to their children. In order to - delete objects which have parents you need to set parent to - NULL or use efl_del(). This will both delete & unref - the object). + 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. The Eo parent is conceptually user set. That means that a parent should not be changed behind the scenes in an unexpected way. For example: - If you have a widget that has a box internally and - when you 'swallow' a widget and the swallowed object ends up in - the box, the parent should be the widget, not the box. + 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. ]] set { @@ -55,32 +84,31 @@ abstract Efl.Object get { } values { - parent: Efl.Object @nullable; [[The new parent]] + parent: Efl.Object @nullable; [[The new parent.]] } } @property name { - [[ The name of the object. + [[The name of the object. - Every object can have a string 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. + 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. ]] set { } get { } values { - name: string @nullable; [[The name]] + name: string @nullable; [[The name.]] } } @property comment { - [[ A human readable comment for the object + [[A human readable comment for the object. - Every object can have a string comment. This is intended for developers - and debugging. An empty string is considered the same as a NULL + Every EFL object can have a comment. This is intended for developers + and debugging. An empty string is considered the same as a $NULL string or no string for the comment. ]] set { @@ -88,11 +116,11 @@ abstract Efl.Object get { } values { - comment: string @nullable; [[The comment]] + comment: string @nullable; [[The comment.]] } } debug_name_override { - [[ Build a read-only name for this object used for debugging. + [[Build a read-only name for this object used for debugging. 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 @@ -121,7 +149,7 @@ abstract Efl.Object ]] } values { - fcount: int; [[The global event freeze count]] + fcount: int; [[The global event freeze count.]] } } @property event_freeze_count { @@ -135,34 +163,36 @@ abstract Efl.Object ]] } values { - fcount: int; [[The event freeze count of this object]] + fcount: int; [[The event freeze count of this object.]] } } @property finalized { - [[True if the object is already finalized, otherwise false.]] + [[$true if the object has been finalized, i.e. construction has finished. + See the Life Cycle section in this class' description.]] get { } values { - finalized: bool; [[$true if the object is finalized, $false otherwise]] + finalized: bool; [[$true if the object is finalized, $false otherwise.]] } } @property invalidated { - [[True if the object is already invalidated, otherwise false.]] + [[$true if the object has been invalidated, i.e. it has no parent. + See the Life Cycle section in this class' description.]] get { } values { - finalized: bool; [[$true if the object is invalidated, $false otherwise]] + finalized: bool; [[$true if the object is invalidated, $false otherwise.]] } } @property invalidating { - [[True if the object is about to be invalidated, and the invalidation of the children is already happening. - - Note this is true before the invalidate call on the object. - ]] + [[$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.]] get { } values { - invalidating: bool; [[$true if the object is invalidating, $false otherwise]] + invalidating: bool; [[$true if the object is invalidating, $false otherwise.]] } } provider_find @const { @@ -176,30 +206,53 @@ abstract Efl.Object If this is not done the class cannot be found up in the object tree. ]] params { - klass : const(Efl.Class); [[The class identifier to search for]] + klass : const(Efl.Class); [[The class identifier to search for.]] } - return : Efl.Object; [[Object from the provider list]] + return : Efl.Object; [[Object from the provider list.]] } constructor { - [[Call the object's constructor. + [[Implement this method to provide optional initialization code for your object. - Should not be used with #eo_do. Only use it with #eo_do_super. - ]] - return: Efl.Object; [[The new object created, can be NULL if aborting]] + See the Life Cycle section in this class' description.]] + return: Efl.Object; [[The new object, can be $NULL if aborted.]] } destructor { - [[Call the object's destructor. + [[Implement this method to provide deinitialization code for your object if you need it. - Should not be used with #efl_do. Only use it with #efl_do_super. - Will be triggered once #invalidate and #noref have been triggered. - ]] + Will be called once @.invalidate has returned. + See the Life Cycle section in this class' description.]] } finalize { - [[Called at the end of efl_add. Should not be called, just overridden.]] - return: Efl.Object; [[The new object created, can be NULL if aborting]] + [[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 + configuration (a property being set, for example) requires a diferent + 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.]] } invalidate { - [[Called when parent reference is lost/set to $NULL and switch the state of the object to invalidate.]] + [[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.]] } name_find @const { [[Find a child object with the given name and return it. @@ -211,9 +264,9 @@ abstract Efl.Object the search will match any object of that class. ]] params { - @in search: string; [[The name search string]] + @in search: string; [[The name search string.]] } - return: Efl.Object; [[The first object found]] + return: Efl.Object; [[The first object found.]] } event_thaw { [[Thaw events of object. @@ -334,13 +387,13 @@ abstract Efl.Object In a normal object use case, when ownership of an object is given to a caller, said ownership should be released with efl_unref(). If the object has a parent, this will print error messages, as - $efl_unref() is stealing the ref from the parent. + efl_unref() is stealing the ref from the parent. Warning: Use this function very carefully, unless you're absolutely sure of what you are doing. ]] values { - allow: bool(false); [[Whether to allow $efl_unref() to zero + allow: bool(false); [[Whether to allow efl_unref() to zero even if @.parent is not $null.]] } } @@ -350,12 +403,12 @@ abstract Efl.Object class.destructor; } events { - del @hot: void; [[Object is being deleted.]] - invalidate @hot: void; [[Object is being invalidated and loosing its parent.]] - noref @hot: void; [[Object has lost its last reference, only parent relationship is keeping it alive.]] + del @hot: void; [[Object is being deleted. See @.destructor.]] + invalidate @hot: void; [[Object is being invalidated and losing its parent. See @.invalidate.]] + noref @hot: void; [[Object has lost its last reference, only parent relationship is keeping it alive. Advanced usage.]] destruct @hot: void; [[Object has been fully destroyed. It can not be used beyond this point. This event should only serve to clean up any - dangling pointer.]] + reference you keep to the object.]] } } From 133b659b7301c2bf577491575a5e7f455b345347 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Wed, 30 Jan 2019 19:20:43 +0100 Subject: [PATCH 03/87] docs: Add custom DocFX templates Summary: These templates add the following features: - Collapsible sections for simpler reading - Full class names in ancestors list (Could not make it work for descendants) - Removed duplicated Implements section - Removed huge Inherited Members section - Extended maximum number of hierarchy levels from 5 to 10 (because our hierarchy is really that big) Test Plan: Follow the doc/docfx README to generate the HTML pages and enjoy the improved and slightly-more-usable docs. Reviewers: lauromoura, bu5hm4n, zmike, cedric Reviewed By: lauromoura Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7832 --- .../partials/class.header.tmpl.partial | 98 ++ .../default_efl/partials/class.tmpl.partial | 242 +++++ doc/docfx/default_efl/styles/docfx.css | 997 ++++++++++++++++++ doc/docfx/docfx.json | 3 +- 4 files changed, 1339 insertions(+), 1 deletion(-) create mode 100644 doc/docfx/default_efl/partials/class.header.tmpl.partial create mode 100644 doc/docfx/default_efl/partials/class.tmpl.partial create mode 100644 doc/docfx/default_efl/styles/docfx.css diff --git a/doc/docfx/default_efl/partials/class.header.tmpl.partial b/doc/docfx/default_efl/partials/class.header.tmpl.partial new file mode 100644 index 0000000000..1a445ab3ca --- /dev/null +++ b/doc/docfx/default_efl/partials/class.header.tmpl.partial @@ -0,0 +1,98 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +

{{>partials/title}}

+
{{{summary}}}
+
{{{conceptual}}}
+{{#inClass}} +
+
+
+ {{#inheritance}} +
+ {{/inheritance}} +
{{fullName.0.value}}
+ {{#derivedClasses}} +
{{{specName.0.value}}}
+ {{/derivedClasses}} +
+
+{{/inClass}} + +{{#inheritedMembers.0}} +
{{__global.namespace}}: {{{namespace.specName.0.value}}}
+
{{__global.assembly}}: {{assemblies.0}}.dll
+
{{__global.syntax}}
+
+
{{syntax.content.0.value}}
+
+{{#syntax.parameters.0}} +
{{__global.parameters}}
+ + + + + + + + + +{{/syntax.parameters.0}} +{{#syntax.parameters}} + + + + + +{{/syntax.parameters}} +{{#syntax.parameters.0}} + +
{{__global.type}}{{__global.name}}{{__global.description}}
{{{type.specName.0.value}}}{{{id}}}{{{description}}}
+{{/syntax.parameters.0}} +{{#syntax.return}} +
{{__global.returns}}
+ + + + + + + + + + + + + +
{{__global.type}}{{__global.description}}
{{{type.specName.0.value}}}{{{description}}}
+{{/syntax.return}} +{{#syntax.typeParameters.0}} +
{{__global.typeParameters}}
+ + + + + + + + +{{/syntax.typeParameters.0}} +{{#syntax.typeParameters}} + + + + +{{/syntax.typeParameters}} +{{#syntax.typeParameters.0}} + +
{{__global.name}}{{__global.description}}
{{{id}}}{{{description}}}
+{{/syntax.typeParameters.0}} +{{#remarks}} +
{{__global.remarks}}
+
{{{remarks}}}
+{{/remarks}} +{{#example.0}} +
{{__global.examples}}
+{{/example.0}} +{{#example}} +{{{.}}} +{{/example}} diff --git a/doc/docfx/default_efl/partials/class.tmpl.partial b/doc/docfx/default_efl/partials/class.tmpl.partial new file mode 100644 index 0000000000..42174d079e --- /dev/null +++ b/doc/docfx/default_efl/partials/class.tmpl.partial @@ -0,0 +1,242 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +{{>partials/class.header}} +{{#children}} +

+ +

+
+{{#children}} +{{^_disableContribution}} +{{#docurl}} + + | + {{__global.improveThisDoc}} +{{/docurl}} +{{#sourceurl}} + + {{__global.viewSource}} +{{/sourceurl}} +{{/_disableContribution}} +{{#overload}} + +{{/overload}} +

{{name.0.value}}

+
{{{summary}}}
+
{{{conceptual}}}
+
{{__global.declaration}}
+{{#syntax}} +
+
{{syntax.content.0.value}}
+
+{{#parameters.0}} +
{{__global.parameters}}
+ + + + + + + + + +{{/parameters.0}} +{{#parameters}} + + + + + +{{/parameters}} +{{#parameters.0}} + +
{{__global.type}}{{__global.name}}{{__global.description}}
{{{id}}}{{{description}}}
+{{/parameters.0}} +{{#return}} +
{{__global.returns}}
+ + + + + + + + + + + + + +
{{__global.type}}{{__global.description}}
{{{description}}}
+{{/return}} +{{#typeParameters.0}} +
{{__global.typeParameters}}
+ + + + + + + + +{{/typeParameters.0}} +{{#typeParameters}} + + + + +{{/typeParameters}} +{{#typeParameters.0}} + +
{{__global.name}}{{__global.description}}
{{{id}}}{{{description}}}
+{{/typeParameters.0}} +{{#fieldValue}} +
{{__global.fieldValue}}
+ + + + + + + + + + + + + +
{{__global.type}}{{__global.description}}
{{{description}}}
+{{/fieldValue}} +{{#propertyValue}} +
{{__global.propertyValue}}
+ + + + + + + + + + + + + +
{{__global.type}}{{__global.description}}
{{{description}}}
+{{/propertyValue}} +{{#eventType}} +
{{__global.eventType}}
+ + + + + + + + + + + + + +
{{__global.type}}{{__global.description}}
{{{description}}}
+{{/eventType}} +{{/syntax}} +{{#overridden}} +
{{__global.overrides}}
+
+{{/overridden}} +{{#remarks}} +
{{__global.remarks}}
+
{{{remarks}}}
+{{/remarks}} +{{#example.0}} +
{{__global.examples}}
+{{/example.0}} +{{#example}} +{{{.}}} +{{/example}} +{{#exceptions.0}} +
{{__global.exceptions}}
+ + + + + + + + +{{/exceptions.0}} +{{#exceptions}} + + + + +{{/exceptions}} +{{#exceptions.0}} + +
{{__global.type}}{{__global.condition}}
{{{description}}}
+{{/exceptions.0}} +{{#seealso.0}} +
{{__global.seealso}}
+
+{{/seealso.0}} +{{#seealso}} + {{#isCref}} +
+ {{/isCref}} + {{^isCref}} +
{{{url}}}
+ {{/isCref}} +{{/seealso}} +{{#seealso.0}} +
+{{/seealso.0}} +{{/children}} +
+{{/children}} +{{#implements.0}} +

+
+{{/implements.0}} +{{#implements}} +
+ {{#definition}} + + {{/definition}} + {{^definition}} + + {{/definition}} +
+{{/implements}} +
+{{#extensionMethods.0}} +

{{__global.extensionMethods}}

+{{/extensionMethods.0}} +{{#extensionMethods}} +
+ {{#definition}} + + {{/definition}} + {{^definition}} + + {{/definition}} +
+{{/extensionMethods}} +{{#seealso.0}} +

{{__global.seealso}}

+
+{{/seealso.0}} +{{#seealso}} + {{#isCref}} +
+ {{/isCref}} + {{^isCref}} +
{{{url}}}
+ {{/isCref}} +{{/seealso}} +{{#seealso.0}} +
+{{/seealso.0}} diff --git a/doc/docfx/default_efl/styles/docfx.css b/doc/docfx/default_efl/styles/docfx.css new file mode 100644 index 0000000000..f94c4b0377 --- /dev/null +++ b/doc/docfx/default_efl/styles/docfx.css @@ -0,0 +1,997 @@ +/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */ +html, +body { + font-family: 'Segoe UI', Tahoma, Helvetica, sans-serif; + height: 100%; +} +button, +a { + color: #337ab7; + cursor: pointer; +} +button:hover, +button:focus, +a:hover, +a:focus { + color: #23527c; + text-decoration: none; +} +a.disable, +a.disable:hover { + text-decoration: none; + cursor: default; + color: #000000; +} + +h1, h2, h3, h4, h5, h6, .text-break { + word-wrap: break-word; + word-break: break-word; +} + +h1 mark, +h2 mark, +h3 mark, +h4 mark, +h5 mark, +h6 mark { + padding: 0; +} + +.inheritance .level0:before, +.inheritance .level1:before, +.inheritance .level2:before, +.inheritance .level3:before, +.inheritance .level4:before, +.inheritance .level5:before, +.inheritance .level6:before, +.inheritance .level7:before, +.inheritance .level8:before, +.inheritance .level9:before, +.inheritance .level10:before { + content: '↳'; + margin-right: 5px; +} + +.inheritance .level0 { + margin-left: 0em; +} + +.inheritance .level1 { + margin-left: 1em; +} + +.inheritance .level2 { + margin-left: 2em; +} + +.inheritance .level3 { + margin-left: 3em; +} + +.inheritance .level4 { + margin-left: 4em; +} + +.inheritance .level5 { + margin-left: 5em; +} + +.inheritance .level6 { + margin-left: 6em; +} + +.inheritance .level7 { + margin-left: 7em; +} + +.inheritance .level8 { + margin-left: 8em; +} + +.inheritance .level9 { + margin-left: 9em; +} + +.inheritance .level10 { + margin-left: 10em; +} + +span.parametername, +span.paramref, +span.typeparamref { + font-style: italic; +} +span.languagekeyword{ + font-weight: bold; +} + +svg:hover path { + fill: #ffffff; +} + +.hljs { + display: inline; + background-color: inherit; + padding: 0; +} +/* additional spacing fixes */ +.btn + .btn { + margin-left: 10px; +} +.btn.pull-right { + margin-left: 10px; + margin-top: 5px; +} +.table { + margin-bottom: 10px; +} +table p { + margin-bottom: 0; +} +table a { + display: inline-block; +} + +/* Make hidden attribute compatible with old browser.*/ +[hidden] { + display: none !important; +} + +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: 15px; + margin-bottom: 10px; + font-weight: 400; +} +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: 10px; + margin-bottom: 5px; +} +.navbar { + margin-bottom: 0; +} +#wrapper { + min-height: 100%; + position: relative; +} +/* blends header footer and content together with gradient effect */ +.grad-top { + /* For Safari 5.1 to 6.0 */ + /* For Opera 11.1 to 12.0 */ + /* For Firefox 3.6 to 15 */ + background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0)); + /* Standard syntax */ + height: 5px; +} +.grad-bottom { + /* For Safari 5.1 to 6.0 */ + /* For Opera 11.1 to 12.0 */ + /* For Firefox 3.6 to 15 */ + background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05)); + /* Standard syntax */ + height: 5px; +} +.divider { + margin: 0 5px; + color: #cccccc; +} +hr { + border-color: #cccccc; +} +header { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 1000; +} +header .navbar { + border-width: 0 0 1px; + border-radius: 0; +} +.navbar-brand { + font-size: inherit; + padding: 0; +} +.navbar-collapse { + margin: 0 -15px; +} +.subnav { + min-height: 40px; +} + +.inheritance h5, .inheritedMembers h5{ + padding-bottom: 5px; + border-bottom: 1px solid #ccc; +} + +.implements h5{ + padding-bottom: 5px; + border-bottom: 1px solid #ccc; +} + +.expander:after { + content: "\002193"; + margin-left: 5px; + color: grey; +} + +.expander.collapsed:after { + content: "\002191"; +} + +article h1, article h2, article h3, article h4{ + margin-top: 25px; +} + +article h4{ + border-bottom: 1px solid #ccc; +} + +article span.small.pull-right{ + margin-top: 20px; +} + +article section { + margin-left: 1em; +} + +/*.expand-all { + padding: 10px 0; +}*/ +.breadcrumb { + margin: 0; + padding: 10px 0; + background-color: inherit; + white-space: nowrap; +} +.breadcrumb > li + li:before { + content: "\00a0/"; +} +#autocollapse.collapsed .navbar-header { + float: none; +} +#autocollapse.collapsed .navbar-toggle { + display: block; +} +#autocollapse.collapsed .navbar-collapse { + border-top: 1px solid transparent; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); +} +#autocollapse.collapsed .navbar-collapse.collapse { + display: none !important; +} +#autocollapse.collapsed .navbar-nav { + float: none !important; + margin: 7.5px -15px; +} +#autocollapse.collapsed .navbar-nav > li { + float: none; +} +#autocollapse.collapsed .navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; +} +#autocollapse.collapsed .collapse.in, +#autocollapse.collapsed .collapsing { + display: block !important; +} +#autocollapse.collapsed .collapse.in .navbar-right, +#autocollapse.collapsed .collapsing .navbar-right { + float: none !important; +} +#autocollapse .form-group { + width: 100%; +} +#autocollapse .form-control { + width: 100%; +} +#autocollapse .navbar-header { + margin-left: 0; + margin-right: 0; +} +#autocollapse .navbar-brand { + margin-left: 0; +} +.collapse.in, +.collapsing { + text-align: unset; +} +.collapsing .navbar-form { + margin: 0 auto; + max-width: 400px; + padding: 10px 15px; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); +} +.collapsed .collapse.in .navbar-form { + margin: 0 auto; + max-width: 400px; + padding: 10px 15px; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); +} +.navbar .navbar-nav { + display: inline-block; +} +.docs-search { + background: white; + vertical-align: middle; +} +.docs-search > .search-query { + font-size: 14px; + border: 0; + width: 120%; + color: #555; +} +.docs-search > .search-query:focus { + outline: 0; +} +.search-results-frame { + clear: both; + display: table; + width: 100%; +} +.search-results.ng-hide { + display: none; +} +.search-results-container { + padding-bottom: 1em; + border-top: 1px solid #111; + background: rgba(25, 25, 25, 0.5); +} +.search-results-container .search-results-group { + padding-top: 50px !important; + padding: 10px; +} +.search-results-group-heading { + font-family: "Open Sans"; + padding-left: 10px; + color: white; +} +.search-close { + position: absolute; + left: 50%; + margin-left: -100px; + color: white; + text-align: center; + padding: 5px; + background: #333; + border-top-right-radius: 5px; + border-top-left-radius: 5px; + width: 200px; + box-shadow: 0 0 10px #111; +} +#search { + display: none; +} + +/* Search results display*/ +#search-results { + max-width: 960px !important; + margin-top: 120px; + margin-bottom: 115px; + margin-left: auto; + margin-right: auto; + line-height: 1.8; + display: none; +} + +#search-results>.search-list { + text-align: center; + font-size: 2.5rem; + margin-bottom: 50px; +} + +#search-results p { + text-align: center; +} + +#search-results p .index-loading { + animation: index-loading 1.5s infinite linear; + -webkit-animation: index-loading 1.5s infinite linear; + -o-animation: index-loading 1.5s infinite linear; + font-size: 2.5rem; +} + +@keyframes index-loading { + from { transform: scale(1) rotate(0deg);} + to { transform: scale(1) rotate(360deg);} +} + +@-webkit-keyframes index-loading { + from { -webkit-transform: rotate(0deg);} + to { -webkit-transform: rotate(360deg);} +} + +@-o-keyframes index-loading { + from { -o-transform: rotate(0deg);} + to { -o-transform: rotate(360deg);} +} + +#search-results .sr-items { + font-size: 24px; +} + +.sr-item { + margin-bottom: 25px; +} + +.sr-item>.item-href { + font-size: 14px; + color: #093; +} + +.sr-item>.item-brief { + font-size: 13px; +} + +.pagination>li>a { + color: #47A7A0 +} + +.pagination>.active>a { + background-color: #47A7A0; + border-color: #47A7A0; +} + +.fixed_header { + position: fixed; + width: 100%; + padding-bottom: 10px; + padding-top: 10px; + margin: 0px; + top: 0; + z-index: 9999; + left: 0; +} + +.fixed_header+.toc{ + margin-top: 50px; + margin-left: 0; +} + +.sidenav, .fixed_header, .toc { + background-color: #f1f1f1; +} + +.sidetoc { + position: fixed; + width: 260px; + top: 150px; + bottom: 0; + overflow-x: hidden; + overflow-y: auto; + background-color: #f1f1f1; + border-left: 1px solid #e7e7e7; + border-right: 1px solid #e7e7e7; + z-index: 1; +} + +.sidetoc.shiftup { + bottom: 70px; +} + +body .toc{ + background-color: #f1f1f1; + overflow-x: hidden; +} + +.sidetoggle.ng-hide { + display: block !important; +} +.sidetoc-expand > .caret { + margin-left: 0px; + margin-top: -2px; +} +.sidetoc-expand > .caret-side { + border-left: 4px solid; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + margin-left: 4px; + margin-top: -4px; +} +.sidetoc-heading { + font-weight: 500; +} + +.toc { + margin: 0px 0 0 10px; + padding: 0 10px; +} +.expand-stub { + position: absolute; + left: -10px; +} +.toc .nav > li > a.sidetoc-expand { + position: absolute; + top: 0; + left: 0; +} +.toc .nav > li > a { + color: #666666; + margin-left: 5px; + display: block; + padding: 0; +} +.toc .nav > li > a:hover, +.toc .nav > li > a:focus { + color: #000000; + background: none; + text-decoration: inherit; +} +.toc .nav > li.active > a { + color: #337ab7; +} +.toc .nav > li.active > a:hover, +.toc .nav > li.active > a:focus { + color: #23527c; +} + +.toc .nav > li> .expand-stub { + cursor: pointer; +} + +.toc .nav > li.active > .expand-stub::before, +.toc .nav > li.in > .expand-stub::before, +.toc .nav > li.in.active > .expand-stub::before, +.toc .nav > li.filtered > .expand-stub::before { + content: "-"; +} + +.toc .nav > li > .expand-stub::before, +.toc .nav > li.active > .expand-stub::before { + content: "+"; +} + +.toc .nav > li.filtered > ul, +.toc .nav > li.in > ul { + display: block; +} + +.toc .nav > li > ul { + display: none; +} + +.toc ul{ + font-size: 12px; + margin: 0 0 0 3px; +} + +.toc .level1 > li { + font-weight: bold; + margin-top: 10px; + position: relative; + font-size: 16px; +} +.toc .level2 { + font-weight: normal; + margin: 5px 0 0 15px; + font-size: 14px; +} +.toc-toggle { + display: none; + margin: 0 15px 0px 15px; +} +.sidefilter { + position: fixed; + top: 90px; + width: 260px; + background-color: #f1f1f1; + padding: 15px; + border-left: 1px solid #e7e7e7; + border-right: 1px solid #e7e7e7; + z-index: 1; +} +.toc-filter { + border-radius: 5px; + background: #fff; + color: #666666; + padding: 5px; + position: relative; + margin: 0 5px 0 5px; +} +.toc-filter > input { + border: 0; + color: #666666; + padding-left: 20px; + width: 100%; +} +.toc-filter > input:focus { + outline: 0; +} +.toc-filter > .filter-icon { + position: absolute; + top: 10px; + left: 5px; +} +.article { + margin-top: 120px; + margin-bottom: 115px; +} + +#_content>a{ + margin-top: 105px; +} + +.article.grid-right { + margin-left: 280px; +} + +.inheritance hr { + margin-top: 5px; + margin-bottom: 5px; +} +.article img { + max-width: 100%; +} +.sideaffix { + margin-top: 50px; + font-size: 12px; + max-height: 100%; + overflow: hidden; + top: 100px; + bottom: 10px; + position: fixed; +} +.sideaffix.shiftup { + bottom: 70px; +} +.affix { + position: relative; + height: 100%; +} +.sideaffix > div.contribution { + margin-bottom: 20px; +} +.sideaffix > div.contribution > ul > li > a.contribution-link { + padding: 6px 10px; + font-weight: bold; + font-size: 14px; +} +.sideaffix > div.contribution > ul > li > a.contribution-link:hover { + background-color: #ffffff; +} +.sideaffix ul.nav > li > a:focus { + background: none; +} +.affix h5 { + font-weight: bold; + text-transform: uppercase; + padding-left: 10px; + font-size: 12px; +} +.affix > ul.level1 { + overflow: hidden; + padding-bottom: 10px; + height: calc(100% - 100px); + margin-right: -20px; +} +.affix ul > li > a:before { + color: #cccccc; + position: absolute; +} +.affix ul > li > a:hover { + background: none; + color: #666666; +} +.affix ul > li.active > a, +.affix ul > li.active > a:before { + color: #337ab7; +} +.affix ul > li > a { + padding: 5px 12px; + color: #666666; +} +.affix > ul > li.active:last-child { + margin-bottom: 50px; +} +.affix > ul > li > a:before { + content: "|"; + font-size: 16px; + top: 1px; + left: 0; +} +.affix > ul > li.active > a, +.affix > ul > li.active > a:before { + color: #337ab7; + font-weight: bold; +} +.affix ul ul > li > a { + padding: 2px 15px; +} +.affix ul ul > li > a:before { + content: ">"; + font-size: 14px; + top: -1px; + left: 5px; +} +.affix ul > li > a:before, +.affix ul ul { + display: none; +} +.affix ul > li.active > ul, +.affix ul > li.active > a:before, +.affix ul > li > a:hover:before { + display: block; + white-space: nowrap; +} +.codewrapper { + position: relative; +} +.trydiv { + height: 0px; +} +.tryspan { + position: absolute; + top: 0px; + right: 0px; + border-style: solid; + border-radius: 0px 4px; + box-sizing: border-box; + border-width: 1px; + border-color: #cccccc; + text-align: center; + padding: 2px 8px; + background-color: white; + font-size: 12px; + cursor: pointer; + z-index: 100; + display: none; + color: #767676; +} +.tryspan:hover { + background-color: #3b8bd0; + color: white; + border-color: #3b8bd0; +} +.codewrapper:hover .tryspan { + display: block; +} +.sample-response .response-content{ + max-height: 200px; +} +footer { + position: absolute; + left: 0; + right: 0; + bottom: 0; + z-index: 1000; +} +.footer { + border-top: 1px solid #e7e7e7; + background-color: #f8f8f8; + padding: 15px 0; +} +@media (min-width: 768px) { + #sidetoggle.collapse { + display: block; + } + .topnav .navbar-nav { + float: none; + white-space: nowrap; + } + .topnav .navbar-nav > li { + float: none; + display: inline-block; + } +} +@media only screen and (max-width: 768px) { + #mobile-indicator { + display: block; + } + /* TOC display for responsive */ + .article { + margin-top: 30px !important; + } + header { + position: static; + } + .topnav { + text-align: center; + } + .sidenav { + padding: 15px 0; + margin-left: -15px; + margin-right: -15px; + } + .sidefilter { + position: static; + width: auto; + float: none; + border: none; + } + .sidetoc { + position: static; + width: auto; + float: none; + padding-bottom: 0px; + border: none; + } + .toc .nav > li, .toc .nav > li >a { + display: inline-block; + } + .toc li:after { + margin-left: -3px; + margin-right: 5px; + content: ", "; + color: #666666; + } + .toc .level1 > li { + display: block; + } + + .toc .level1 > li:after { + display: none; + } + .article.grid-right { + margin-left: 0; + } + .grad-top, + .grad-bottom { + display: none; + } + .toc-toggle { + display: block; + } + .sidetoggle.ng-hide { + display: none !important; + } + /*.expand-all { + display: none; + }*/ + .sideaffix { + display: none; + } + .mobile-hide { + display: none; + } + .breadcrumb { + white-space: inherit; + } + + /* workaround for #hashtag url is no longer needed*/ + h1:before, + h2:before, + h3:before, + h4:before { + content: ''; + display: none; + } +} + +/* For toc iframe */ +@media (max-width: 260px) { + .toc .level2 > li { + display: block; + } + + .toc .level2 > li:after { + display: none; + } +} + +/* For code snippet line highlight */ +pre > code .line-highlight { + background-color: #ffffcc; +} + +/* Alerts */ +.alert h5 { + text-transform: uppercase; + font-weight: bold; + margin-top: 0; +} + +.alert h5:before { + position:relative; + top:1px; + display:inline-block; + font-family:'Glyphicons Halflings'; + line-height:1; + -webkit-font-smoothing:antialiased; + -moz-osx-font-smoothing:grayscale; + margin-right: 5px; + font-weight: normal; +} + +.alert-info h5:before { + content:"\e086" +} + +.alert-warning h5:before { + content:"\e127" +} + +.alert-danger h5:before { + content:"\e107" +} + +/* For Embedded Video */ +div.embeddedvideo { + padding-top: 56.25%; + position: relative; + width: 100%; +} + +div.embeddedvideo iframe { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + width: 100%; + height: 100%; +} + +/* For printer */ +@media print{ + .article.grid-right { + margin-top: 0px; + margin-left: 0px; + } + .sideaffix { + display: none; + } + .mobile-hide { + display: none; + } + .footer { + display: none; + } +} + +/* For tabbed content */ + +.tabGroup { + margin-top: 1rem; } + .tabGroup ul[role="tablist"] { + margin: 0; + padding: 0; + list-style: none; } + .tabGroup ul[role="tablist"] > li { + list-style: none; + display: inline-block; } + .tabGroup a[role="tab"] { + color: #6e6e6e; + box-sizing: border-box; + display: inline-block; + padding: 5px 7.5px; + text-decoration: none; + border-bottom: 2px solid #fff; } + .tabGroup a[role="tab"]:hover, .tabGroup a[role="tab"]:focus, .tabGroup a[role="tab"][aria-selected="true"] { + border-bottom: 2px solid #0050C5; } + .tabGroup a[role="tab"][aria-selected="true"] { + color: #222; } + .tabGroup a[role="tab"]:hover, .tabGroup a[role="tab"]:focus { + color: #0050C5; } + .tabGroup a[role="tab"]:focus { + outline: 1px solid #0050C5; + outline-offset: -1px; } + @media (min-width: 768px) { + .tabGroup a[role="tab"] { + padding: 5px 15px; } } + .tabGroup section[role="tabpanel"] { + border: 1px solid #e0e0e0; + padding: 15px; + margin: 0; + overflow: hidden; } + .tabGroup section[role="tabpanel"] > .codeHeader, + .tabGroup section[role="tabpanel"] > pre { + margin-left: -16px; + margin-right: -16px; } + .tabGroup section[role="tabpanel"] > :first-child { + margin-top: 0; } + .tabGroup section[role="tabpanel"] > pre:last-child { + display: block; + margin-bottom: -16px; } + +.mainContainer[dir='rtl'] main ul[role="tablist"] { + margin: 0; } diff --git a/doc/docfx/docfx.json b/doc/docfx/docfx.json index 1c5009de69..b5354679eb 100644 --- a/doc/docfx/docfx.json +++ b/doc/docfx/docfx.json @@ -61,7 +61,8 @@ "globalMetadataFiles": [], "fileMetadataFiles": [], "template": [ - "default" + "default", + "default_efl" ], "postProcessors": [], "markdownEngineName": "markdig", From 9277586fd8244826bdfbbc7625c3a08be71f5e06 Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Mon, 11 Feb 2019 16:53:29 -0200 Subject: [PATCH 04/87] efl-csharp: Fix self in iface concrete functions Summary: It was mistakenly being called as static functions. Fixes T7619 Test Plan: See attached testcase. Reviewers: segfaultxavi, bu5hm4n, vitor.sousa Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7619 Differential Revision: https://phab.enlightenment.org/D7904 --- .../eolian_mono/eolian/mono/function_definition.hh | 2 +- src/tests/efl_mono/Eo.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh index 5a78bc735f..f89ac954cb 100644 --- a/src/bin/eolian_mono/eolian/mono/function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh @@ -169,7 +169,7 @@ struct function_definition_generator // inherited is set in the constructor, true if this instance is from a pure C# class (not generated). if (do_super && !f.is_static) self = "(inherited ? Efl.Eo.Globals.efl_super(" + self + ", this.NativeClass) : " + self + ")"; - else + else if (f.is_static) self = name_helpers::klass_get_full_name(f.klass) + "()"; if(!as_generator diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs index 37d4735b90..ed1d65a779 100644 --- a/src/tests/efl_mono/Eo.cs +++ b/src/tests/efl_mono/Eo.cs @@ -369,4 +369,17 @@ class TestConstructors } } +class TestInterfaceConcrete +{ + // For T7619 + public static void test_iface_concrete_methods() + { + var obj = new Dummy.TestObject(); + Dummy.TestIface iface = Dummy.TestIfaceConcrete.static_cast(obj); + + iface.IfaceProp = 1970; + Test.AssertEquals(iface.IfaceProp, 1970); + } +} + } From 053146598c346aa7c200aee55093a5e463d255de Mon Sep 17 00:00:00 2001 From: SangHyeon Jade Lee Date: Thu, 31 Jan 2019 11:59:19 +0000 Subject: [PATCH 05/87] efl_ui : rename model connect and factory connect to bind property and factory. As we discussed in T7469 with V40, efl_ui_model_connect efl_ui_factory_model_connect need to be renamed to efl_ui_bind_property efl_ui_bind_factory for this work, Efl.Ui.Model.Connect interface is changed as Efl.Ui.Bind, and bind_property and bind_factory both method is supported by this interface. bind_factory need Efl.Ui.Factory, and Efl.Ui.Factory inheritted Efl.Ui.Bind, so I little bit concerned about circular referencing, but so far, it works well. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7529 --- src/Makefile_Efl.am | 3 +- src/examples/elementary.mk | 4 +- src/examples/elementary/.gitignore | 2 +- .../elementary/efl_ui_list_view_example_1.c | 6 +- .../elementary/efl_ui_list_view_example_2.c | 6 +- .../elementary/efl_ui_list_view_example_3.c | 12 ++-- ...model_connect.c => layout_property_bind.c} | 0 src/lib/efl/Efl.h | 3 +- src/lib/efl/interfaces/efl_interfaces_main.c | 3 +- src/lib/efl/interfaces/efl_ui_factory.eo | 9 +-- src/lib/efl/interfaces/efl_ui_factory_bind.eo | 19 ++++++ .../efl/interfaces/efl_ui_model_connect.eo | 13 ---- .../efl/interfaces/efl_ui_property_bind.eo | 18 +++++ src/lib/efl/interfaces/meson.build | 3 +- src/lib/elementary/efl_ui_caching_factory.c | 8 +-- src/lib/elementary/efl_ui_caching_factory.eo | 2 +- src/lib/elementary/efl_ui_image.c | 8 +-- src/lib/elementary/efl_ui_image.eo | 4 +- src/lib/elementary/efl_ui_image_factory.c | 8 +-- src/lib/elementary/efl_ui_image_factory.eo | 2 +- src/lib/elementary/efl_ui_layout.c | 66 +++++++++---------- src/lib/elementary/efl_ui_layout.eo | 6 +- src/lib/elementary/efl_ui_layout_factory.c | 64 +++++++++--------- src/lib/elementary/efl_ui_layout_factory.eo | 4 +- src/lib/elementary/efl_ui_widget_factory.c | 8 +-- src/lib/elementary/efl_ui_widget_factory.eo | 4 +- src/lib/elementary/elc_fileselector_entry.c | 4 +- src/lib/elementary/elm_view_form.c | 4 +- src/tests/elementary/efl_ui_test_layout.c | 8 +-- 29 files changed, 162 insertions(+), 139 deletions(-) rename src/examples/elementary/{layout_model_connect.c => layout_property_bind.c} (100%) create mode 100644 src/lib/efl/interfaces/efl_ui_factory_bind.eo delete mode 100644 src/lib/efl/interfaces/efl_ui_model_connect.eo create mode 100644 src/lib/efl/interfaces/efl_ui_property_bind.eo diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index 304fb43a42..b364beeab4 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -64,8 +64,9 @@ efl_eolian_files = \ lib/efl/interfaces/efl_ui_range_display.eo \ lib/efl/interfaces/efl_ui_range_interactive.eo \ lib/efl/interfaces/efl_ui_view.eo \ - lib/efl/interfaces/efl_ui_model_connect.eo \ + lib/efl/interfaces/efl_ui_property_bind.eo \ lib/efl/interfaces/efl_ui_factory.eo \ + lib/efl/interfaces/efl_ui_factory_bind.eo \ lib/efl/interfaces/efl_screen.eo \ lib/efl/interfaces/efl_io_closer.eo \ lib/efl/interfaces/efl_io_positioner.eo \ diff --git a/src/examples/elementary.mk b/src/examples/elementary.mk index 0d817258dc..ac8fe37c41 100644 --- a/src/examples/elementary.mk +++ b/src/examples/elementary.mk @@ -64,7 +64,7 @@ elementary/label_example_03.c \ elementary/layout_example_01.c \ elementary/layout_example_02.c \ elementary/layout_example_03.c \ -elementary/layout_model_connect.c \ +elementary/layout_property_bind.c \ elementary/list_example_01.c \ elementary/list_example_02.c \ elementary/list_example_03.c \ @@ -283,7 +283,7 @@ elementary/label_example_03 \ elementary/layout_example_01 \ elementary/layout_example_02 \ elementary/layout_example_03 \ -elementary/layout_model_connect \ +elementary/layout_property_bind \ elementary/list_example_01 \ elementary/list_example_02 \ elementary/list_example_03 \ diff --git a/src/examples/elementary/.gitignore b/src/examples/elementary/.gitignore index 54d71c14a0..11544b23ee 100644 --- a/src/examples/elementary/.gitignore +++ b/src/examples/elementary/.gitignore @@ -58,7 +58,7 @@ /layout_example_01 /layout_example_02 /layout_example_03 -/layout_model_connect +/layout_property_bind /list_example_01 /list_example_02 /list_example_03 diff --git a/src/examples/elementary/efl_ui_list_view_example_1.c b/src/examples/elementary/efl_ui_list_view_example_1.c index 635a603a35..597d6c3ed1 100644 --- a/src/examples/elementary/efl_ui_list_view_example_1.c +++ b/src/examples/elementary/efl_ui_list_view_example_1.c @@ -87,9 +87,9 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) ); factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); - efl_ui_model_connect(factory, "signal/efl,state,%v", "odd_style"); - efl_ui_model_connect(factory, "signal/efl,state,%{selected;unselected}", "selected"); - efl_ui_model_connect(factory, "efl.text", "name"); + efl_ui_property_bind(factory, "signal/efl,state,%v", "odd_style"); + efl_ui_property_bind(factory, "signal/efl,state,%{selected;unselected}", "selected"); + efl_ui_property_bind(factory, "efl.text", "name"); efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default"); li = efl_add(EFL_UI_LIST_VIEW_CLASS, win diff --git a/src/examples/elementary/efl_ui_list_view_example_2.c b/src/examples/elementary/efl_ui_list_view_example_2.c index 50f0706a0d..8721342fd6 100644 --- a/src/examples/elementary/efl_ui_list_view_example_2.c +++ b/src/examples/elementary/efl_ui_list_view_example_2.c @@ -33,7 +33,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) model = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname)); factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); - efl_ui_model_connect(factory, "efl.text", "filename"); + efl_ui_property_bind(factory, "efl.text", "filename"); efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default"); li = efl_add(EFL_UI_LIST_VIEW_CLASS, win); @@ -45,8 +45,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) imgf = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win); - efl_ui_model_connect(imgf, "", "path"); //connect to "path" property - efl_ui_factory_model_connect(factory, "efl.icon", imgf); + efl_ui_property_bind(imgf, "", "path"); //connect to "path" property + efl_ui_factory_bind(factory, "efl.icon", imgf); elm_win_resize_object_add(win, li); diff --git a/src/examples/elementary/efl_ui_list_view_example_3.c b/src/examples/elementary/efl_ui_list_view_example_3.c index 633c6e1c0d..47718a83d4 100644 --- a/src/examples/elementary/efl_ui_list_view_example_3.c +++ b/src/examples/elementary/efl_ui_list_view_example_3.c @@ -150,8 +150,8 @@ _realized_1_cb(void *data EINA_UNUSED, const Efl_Event *event) evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0); evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - efl_ui_model_connect(ie->layout, "efl.text", "name"); - efl_ui_model_connect(ie->layout, "signal/efl,state,%v", "odd_style"); + efl_ui_property_bind(ie->layout, "efl.text", "name"); + efl_ui_property_bind(ie->layout, "signal/efl,state,%v", "odd_style"); } static void @@ -163,7 +163,7 @@ _realized_2_cb(void *data EINA_UNUSED, const Efl_Event *event) elm_object_focus_allow_set(ie->layout, EINA_TRUE); evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0); evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - efl_ui_model_connect(ie->layout, "efl.text", "occupation"); + efl_ui_property_bind(ie->layout, "efl.text", "occupation"); } static Efl_Model* @@ -222,7 +222,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) priv->model = _make_model(); factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); - efl_ui_model_connect(factory, "efl.text", "filename"); + efl_ui_property_bind(factory, "efl.text", "filename"); efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default"); priv->list1 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model)); @@ -233,8 +233,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) efl_ui_list_view_layout_factory_set(priv->list1, factory); factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); - efl_ui_model_connect(factory, "efl.text", "filename"); - efl_ui_model_connect(factory, "signal/efl,state,%v", "selected"); + efl_ui_property_bind(factory, "efl.text", "filename"); + efl_ui_property_bind(factory, "signal/efl,state,%v", "selected"); efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default"); priv->list2 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model)); efl_event_callback_add(priv->list2, EFL_UI_LIST_VIEW_EVENT_ITEM_REALIZED, _realized_2_cb, priv->list2); diff --git a/src/examples/elementary/layout_model_connect.c b/src/examples/elementary/layout_property_bind.c similarity index 100% rename from src/examples/elementary/layout_model_connect.c rename to src/examples/elementary/layout_property_bind.c diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 097111134e..4b37800ced 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -149,8 +149,9 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #include "interfaces/efl_canvas_scene.eo.h" #include "interfaces/efl_canvas_pointer.eo.h" #include "interfaces/efl_ui_view.eo.h" -#include "interfaces/efl_ui_model_connect.eo.h" +#include "interfaces/efl_ui_property_bind.eo.h" #include "interfaces/efl_ui_factory.eo.h" +#include "interfaces/efl_ui_factory_bind.eo.h" #include "interfaces/efl_ui_format.eo.h" #include "interfaces/efl_cached_item.eo.h" diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 0ede9908f8..75ffcd984c 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -70,8 +70,9 @@ #include "interfaces/efl_ui_range_interactive.eo.c" #include "interfaces/efl_ui_autorepeat.eo.c" #include "interfaces/efl_ui_view.eo.c" -#include "interfaces/efl_ui_model_connect.eo.c" +#include "interfaces/efl_ui_property_bind.eo.c" #include "interfaces/efl_ui_factory.eo.c" +#include "interfaces/efl_ui_factory_bind.eo.c" #include "interfaces/efl_ui_draggable.eo.c" #include "interfaces/efl_ui_clickable.eo.c" diff --git a/src/lib/efl/interfaces/efl_ui_factory.eo b/src/lib/efl/interfaces/efl_ui_factory.eo index 45be8aab80..7b4356a04b 100644 --- a/src/lib/efl/interfaces/efl_ui_factory.eo +++ b/src/lib/efl/interfaces/efl_ui_factory.eo @@ -4,7 +4,7 @@ struct Efl.Ui.Factory_Item_Created_Event { item: Efl.Gfx.Entity; [[The item that was just created.]] } -interface Efl.Ui.Factory extends Efl.Ui.Model.Connect +interface Efl.Ui.Factory extends Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind { [[Efl UI factory interface]] methods { @@ -22,13 +22,6 @@ interface Efl.Ui.Factory extends Efl.Ui.Model.Connect ui_view: Efl.Gfx.Entity; [[Efl canvas]] } } - model_connect { - [[Connect factory to a model]] - params { - name: string; [[Model name]] - factory: Efl.Ui.Factory; [[Efl factory]] - } - } } events { created: Efl.Ui.Factory_Item_Created_Event; [[Event triggered when an item has been successfully created.]] diff --git a/src/lib/efl/interfaces/efl_ui_factory_bind.eo b/src/lib/efl/interfaces/efl_ui_factory_bind.eo new file mode 100644 index 0000000000..0e36b44f05 --- /dev/null +++ b/src/lib/efl/interfaces/efl_ui_factory_bind.eo @@ -0,0 +1,19 @@ +interface Efl.Ui.Factory_Bind +{ + [[Efl UI Property interface. + view object can have @Efl.Model and need to set cotent with those model stored data. + the interface can help binding the factory to create object with model property data. + see @Efl.Model + see @Efl.Ui.Factory]] + methods { + factory_bind { + [[bind the factory with the given key string. when the data is ready or changed, + factory create the object and bind the data to the key action and process promised work. + Note: the input @Efl.Ui.Factory need to be @Efl.Ui.Property_Bind.property_bind at least once.]] + params { + key: string; [[Key string for bind model property data]] + factory: Efl.Ui.Factory; [[@Efl.Ui.Factory for create and bind model property data]] + } + } + } +} diff --git a/src/lib/efl/interfaces/efl_ui_model_connect.eo b/src/lib/efl/interfaces/efl_ui_model_connect.eo deleted file mode 100644 index 4a5e2c1310..0000000000 --- a/src/lib/efl/interfaces/efl_ui_model_connect.eo +++ /dev/null @@ -1,13 +0,0 @@ -interface Efl.Ui.Model.Connect -{ - [[Efl UI model connect interface]] - methods { - connect { - [[Connect property]] - params { - name: string; [[Model name]] - property: string; [[Property name]] - } - } - } -} diff --git a/src/lib/efl/interfaces/efl_ui_property_bind.eo b/src/lib/efl/interfaces/efl_ui_property_bind.eo new file mode 100644 index 0000000000..e709bd87c7 --- /dev/null +++ b/src/lib/efl/interfaces/efl_ui_property_bind.eo @@ -0,0 +1,18 @@ +interface Efl.Ui.Property_Bind +{ + [[Efl UI Property_Bind interface. + view object can have @Efl.Model to manage the data, + the interface can help loading and tracking child data from the model property. + see @Efl.Model + see @Efl.Ui.Factory]] + methods { + property_bind { + [[bind property data with the given key string. when the data is ready or changed, + bind the data to the key action and process promised work.]] + params { + key: string; [[key string for bind model property data]] + property: string; [[Model property name]] + } + } + } +} diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index a1ef0ee2ae..4c862196d2 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -90,8 +90,9 @@ pub_eo_files = [ 'efl_ui_range_display.eo', 'efl_ui_range_interactive.eo', 'efl_ui_view.eo', - 'efl_ui_model_connect.eo', + 'efl_ui_property_bind.eo', 'efl_ui_factory.eo', + 'efl_ui_factory_bind.eo', 'efl_ui_multi_selectable.eo', 'efl_screen.eo', 'efl_io_closer.eo', diff --git a/src/lib/elementary/efl_ui_caching_factory.c b/src/lib/elementary/efl_ui_caching_factory.c index 49a316e01e..cfd8182617 100644 --- a/src/lib/elementary/efl_ui_caching_factory.c +++ b/src/lib/elementary/efl_ui_caching_factory.c @@ -325,12 +325,12 @@ _efl_ui_caching_factory_efl_object_parent_set(Eo *obj, Efl_Ui_Caching_Factory_Da } static void -_efl_ui_caching_factory_efl_ui_model_connect_connect(Eo *obj, Efl_Ui_Caching_Factory_Data *pd, - const char *name, const char *property) +_efl_ui_caching_factory_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Caching_Factory_Data *pd, + const char *key, const char *property) { - if (!strcmp(name, "style")) + if (!strcmp(key, "style")) eina_stringshare_replace(&pd->style, property); - efl_ui_model_connect(efl_super(obj, EFL_UI_CACHING_FACTORY_CLASS), name, property); + efl_ui_property_bind(efl_super(obj, EFL_UI_CACHING_FACTORY_CLASS), key, property); } #include "efl_ui_caching_factory.eo.c" diff --git a/src/lib/elementary/efl_ui_caching_factory.eo b/src/lib/elementary/efl_ui_caching_factory.eo index ad97a12c88..ee53983a54 100644 --- a/src/lib/elementary/efl_ui_caching_factory.eo +++ b/src/lib/elementary/efl_ui_caching_factory.eo @@ -36,7 +36,7 @@ class Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory implements { Efl.Ui.Factory.create; Efl.Ui.Factory.release; - Efl.Ui.Model.Connect.connect; + Efl.Ui.Property_Bind.property_bind; Efl.Ui.Widget_Factory.item_class { get; set; } Efl.Object.invalidate; Efl.Object.parent { set; } diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index ff2a7cb6ef..0b6ecf5b89 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -1952,20 +1952,20 @@ _efl_ui_image_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data } EOLIAN static void -_efl_ui_image_efl_ui_model_connect_connect(Eo *obj, Efl_Ui_Image_Data *pd, const char *name, const char *property) +_efl_ui_image_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Image_Data *pd, const char *key, const char *property) { - if (strcmp(name, "filename") == 0) + if (strcmp(key, "filename") == 0) { pd->property.icon = EINA_FALSE; eina_stringshare_replace(&pd->property.file, property); } - else if (strcmp(name, "icon") == 0) + else if (strcmp(key, "icon") == 0) { pd->property.icon = EINA_TRUE; eina_stringshare_replace(&pd->property.file, property); eina_stringshare_replace(&pd->property.key, NULL); } - else if (strcmp(name, "key") == 0) + else if (strcmp(key, "key") == 0) { eina_stringshare_replace(&pd->property.key, property); } diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index 47e37a77c1..8cdc14ff5b 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -22,7 +22,7 @@ class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.Ui.Dra Efl.File, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller, Efl.Player, Efl.Gfx.View, Efl.Access.Component, Efl.Access.Widget.Action, Efl.Gfx.Color, Efl.Orientation, - Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Layout.Calc, + Efl.Ui.View, Efl.Ui.Property_Bind, Efl.Layout.Calc, Efl.Layout.Group, Efl.Layout.Signal { [[ Efl UI image class]] @@ -118,7 +118,7 @@ class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.Ui.Dra Efl.Canvas.Object.clip { set; } Efl.Canvas.Group.group_member_add; Efl.Ui.Draggable.drag_target { get; set; } - Efl.Ui.Model.Connect.connect; + Efl.Ui.Property_Bind.property_bind; Efl.Ui.View.model { get; set; } Efl.Ui.Widget.theme_apply; Efl.Ui.Widget.widget_event; diff --git a/src/lib/elementary/efl_ui_image_factory.c b/src/lib/elementary/efl_ui_image_factory.c index 4cd08cd5f5..1b34c110b2 100644 --- a/src/lib/elementary/efl_ui_image_factory.c +++ b/src/lib/elementary/efl_ui_image_factory.c @@ -34,14 +34,14 @@ _efl_ui_image_factory_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Ui_Image_Fa } static Eina_Value -_efl_ui_image_factory_connect(Eo *obj EINA_UNUSED, void *data, const Eina_Value value) +_efl_ui_image_factory_bind(Eo *obj EINA_UNUSED, void *data, const Eina_Value value) { Efl_Gfx_Entity *entity = NULL; Efl_Ui_Image_Factory_Data *pd = data; eina_value_pget(&value, &entity); - efl_ui_model_connect(entity, "filename", pd->property); + efl_ui_property_bind(entity, "filename", pd->property); return value; } @@ -58,12 +58,12 @@ _efl_ui_image_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Image_Factory_Data * return efl_future_then(obj, f, .success_type = EINA_VALUE_TYPE_OBJECT, - .success = _efl_ui_image_factory_connect, + .success = _efl_ui_image_factory_bind, .data = pd); } EOLIAN static void -_efl_ui_image_factory_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Image_Factory_Data *pd, const char *name EINA_UNUSED, const char *property) +_efl_ui_image_factory_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, Efl_Ui_Image_Factory_Data *pd, const char *key EINA_UNUSED, const char *property) { eina_stringshare_replace(&pd->property, property); } diff --git a/src/lib/elementary/efl_ui_image_factory.eo b/src/lib/elementary/efl_ui_image_factory.eo index 2b5c97e4b4..884fb9099c 100644 --- a/src/lib/elementary/efl_ui_image_factory.eo +++ b/src/lib/elementary/efl_ui_image_factory.eo @@ -5,6 +5,6 @@ class Efl.Ui.Image_Factory extends Efl.Ui.Caching_Factory Efl.Object.constructor; Efl.Object.destructor; Efl.Ui.Factory.create; - Efl.Ui.Model.Connect.connect; + Efl.Ui.Property_Bind.property_bind; } } diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index 034cd04870..ae7b5183ba 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -76,7 +76,7 @@ struct _Efl_Ui_Layout_Factory_Tracking { Efl_Ui_Factory *factory; Eina_Future *in_flight; - Eina_Stringshare *name; + Eina_Stringshare *key; }; @@ -2085,7 +2085,7 @@ struct _Efl_Ui_Layout_Factory_Request Efl_Ui_Layout_Factory_Tracking *tracking; Efl_Ui_Layout_Data *pd; Efl_Ui_Factory *factory; - const char *name; + const char *key; }; static Eina_Value @@ -2098,11 +2098,11 @@ _content_created(Eo *obj, void *data, const Eina_Value value) eina_value_get(&value, &content); // Recycle old content - old_content = elm_layout_content_get(obj, request->name); + old_content = elm_layout_content_get(obj, request->key); if (old_content) efl_ui_factory_release(request->factory, old_content); // Set new content - elm_layout_content_set(obj, request->name, content); + elm_layout_content_set(obj, request->key, content); return value; } @@ -2113,13 +2113,13 @@ _clean_request(Eo *obj EINA_UNUSED, void *data, const Eina_Future *dead_future E Efl_Ui_Layout_Factory_Request *request = data; request->tracking->in_flight = NULL; - eina_stringshare_del(request->name); + eina_stringshare_del(request->key); efl_unref(request->factory); free(request); } static void -_efl_ui_layout_view_model_content_update(Efl_Ui_Layout_Data *pd, Efl_Ui_Layout_Factory_Tracking *tracking, const char *name) +_efl_ui_layout_view_model_content_update(Efl_Ui_Layout_Data *pd, Efl_Ui_Layout_Factory_Tracking *tracking, const char *key) { Efl_Ui_Layout_Factory_Request *request = calloc(1, sizeof (Efl_Ui_Layout_Factory_Request)); Eina_Future *f; @@ -2128,7 +2128,7 @@ _efl_ui_layout_view_model_content_update(Efl_Ui_Layout_Data *pd, Efl_Ui_Layout_F if (tracking->in_flight) eina_future_cancel(tracking->in_flight); - request->name = eina_stringshare_ref(name); + request->key = eina_stringshare_ref(key); request->pd = pd; request->factory = efl_ref(tracking->factory); request->tracking = tracking; @@ -2205,7 +2205,7 @@ _efl_ui_layout_factory_free(Efl_Ui_Layout_Factory_Tracking *tracking) { if (tracking->in_flight) eina_future_cancel(tracking->in_flight); efl_unref(tracking->factory); - eina_stringshare_del(tracking->name); + eina_stringshare_del(tracking->key); free(tracking); } @@ -2222,7 +2222,7 @@ _efl_ui_layout_connect_hash(Efl_Ui_Layout_Data *pd) EOLIAN static void _efl_ui_layout_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_Model *model) { - Eina_Stringshare *name; + Eina_Stringshare *key; Eina_Hash_Tuple *tuple; Eina_Iterator *it; @@ -2241,9 +2241,9 @@ _efl_ui_layout_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_Model // Reset to empty state it = eina_hash_iterator_key_new(pd->connect.properties); - EINA_ITERATOR_FOREACH(it, name) + EINA_ITERATOR_FOREACH(it, key) { - efl_text_set(efl_part(obj, name), NULL); + efl_text_set(efl_part(obj, key), NULL); } eina_iterator_free(it); @@ -2253,15 +2253,15 @@ _efl_ui_layout_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_Model Efl_Ui_Layout_Factory_Tracking *factory; Efl_Gfx_Entity *content; - name = tuple->key; + key = tuple->key; factory = tuple->data; // Cancel in flight creation request if (factory->in_flight) eina_future_cancel(factory->in_flight); // Cleanup content - content = elm_layout_content_get(obj, name); - elm_layout_content_set(obj, name, NULL); + content = elm_layout_content_get(obj, key); + elm_layout_content_set(obj, key, NULL); // And recycle it efl_ui_factory_release(factory->factory, content); @@ -2279,30 +2279,30 @@ _efl_ui_layout_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Da } EOLIAN static void -_efl_ui_layout_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd, const char *name, const char *property) +_efl_ui_layout_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd, const char *key, const char *property) { - EINA_SAFETY_ON_NULL_RETURN(name); + EINA_SAFETY_ON_NULL_RETURN(key); Eina_Stringshare *sprop; Eina_Hash *hash = NULL; char *data = NULL; - if (!_elm_layout_part_aliasing_eval(obj, &name, EINA_TRUE)) + if (!_elm_layout_part_aliasing_eval(obj, &key, EINA_TRUE)) return; _efl_ui_layout_connect_hash(pd); sprop = eina_stringshare_add(property); - // FIXME: prevent double connect of name to multiple property ? - if (strncmp(SIGNAL_PREFIX, name, sizeof(SIGNAL_PREFIX) - 1) == 0) + // FIXME: prevent double connect of key to multiple property ? + if (strncmp(SIGNAL_PREFIX, key, sizeof(SIGNAL_PREFIX) - 1) == 0) { hash = pd->connect.signals; - data = strdup(name + sizeof(SIGNAL_PREFIX) - 1); + data = strdup(key + sizeof(SIGNAL_PREFIX) - 1); } else { hash = pd->connect.properties; - data = strdup(name); + data = strdup(key); } if (!sprop) @@ -2328,30 +2328,30 @@ _efl_ui_layout_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_D } EOLIAN static void -_efl_ui_layout_efl_ui_factory_model_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd, - const char *name, Efl_Ui_Factory *factory) +_efl_ui_layout_efl_ui_factory_bind_factory_bind(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd, + const char *key, Efl_Ui_Factory *factory) { - EINA_SAFETY_ON_NULL_RETURN(name); + EINA_SAFETY_ON_NULL_RETURN(key); Efl_Ui_Layout_Factory_Tracking *tracking; - Eina_Stringshare *ss_name; + Eina_Stringshare *ss_key; - if (!_elm_layout_part_aliasing_eval(obj, &name, EINA_TRUE)) + if (!_elm_layout_part_aliasing_eval(obj, &key, EINA_TRUE)) return; if (!pd->connect.factories) pd->connect.factories = eina_hash_stringshared_new(EINA_FREE_CB(_efl_ui_layout_factory_free)); - ss_name = eina_stringshare_add(name); + ss_key = eina_stringshare_add(key); // First undo the old one if there is one - tracking = eina_hash_find(pd->connect.factories, ss_name); + tracking = eina_hash_find(pd->connect.factories, ss_key); if (tracking) { Efl_Gfx_Entity *old; // Unset and recycle - old = elm_layout_content_get(obj, ss_name); - elm_layout_content_set(obj, ss_name, NULL); + old = elm_layout_content_get(obj, ss_key); + elm_layout_content_set(obj, ss_key, NULL); if (old) efl_ui_factory_release(tracking->factory, old); // Stop in flight request @@ -2365,15 +2365,15 @@ _efl_ui_layout_efl_ui_factory_model_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_D tracking = calloc(1, sizeof (Efl_Ui_Layout_Factory_Tracking)); if (!tracking) return ; - tracking->name = ss_name; + tracking->key = ss_key; - eina_hash_add(pd->connect.factories, ss_name, tracking); + eina_hash_add(pd->connect.factories, ss_key, tracking); } // And update content with the new factory tracking->factory = efl_ref(factory); - _efl_ui_layout_view_model_content_update(pd, tracking, ss_name); + _efl_ui_layout_view_model_content_update(pd, tracking, ss_key); } EOLIAN static Eo * diff --git a/src/lib/elementary/efl_ui_layout.eo b/src/lib/elementary/efl_ui_layout.eo index 72a294855f..b1855cfcd0 100644 --- a/src/lib/elementary/efl_ui_layout.eo +++ b/src/lib/elementary/efl_ui_layout.eo @@ -1,7 +1,7 @@ import efl_ui; class Efl.Ui.Layout extends Efl.Ui.Widget implements Efl.Container, Efl.File, - Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Ui.Factory, + Efl.Ui.View, Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind, Efl.Layout.Calc, Efl.Layout.Signal, Efl.Layout.Group { @@ -76,8 +76,8 @@ class Efl.Ui.Layout extends Efl.Ui.Widget implements Efl.Container, Efl.File, Efl.Container.content_iterate; Efl.Part.part_get; Efl.Ui.View.model { get; set; } - Efl.Ui.Model.Connect.connect; - Efl.Ui.Factory.model_connect; + Efl.Ui.Property_Bind.property_bind; + Efl.Ui.Factory_Bind.factory_bind; } events { theme,changed: void; [[Called when theme changed]] diff --git a/src/lib/elementary/efl_ui_layout_factory.c b/src/lib/elementary/efl_ui_layout_factory.c index 0d81136114..d2f3488dc7 100644 --- a/src/lib/elementary/efl_ui_layout_factory.c +++ b/src/lib/elementary/efl_ui_layout_factory.c @@ -10,33 +10,35 @@ typedef struct _Efl_Ui_Layout_Factory_Data { - Eina_Hash *connects; - Eina_Hash *factory_connects; + struct { + Eina_Hash *properties; + Eina_Hash *factories; + } bind; Eina_Stringshare *klass; Eina_Stringshare *group; Eina_Stringshare *style; } Efl_Ui_Layout_Factory_Data; Eina_Bool -_model_connect(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) +_property_bind(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) { Eo *layout = fdata; - Eina_Stringshare *name = key; + Eina_Stringshare *ss_key = key; Eina_Stringshare *property = data; - efl_ui_model_connect(layout, name, property); + efl_ui_property_bind(layout, ss_key, property); return EINA_TRUE; } Eina_Bool -_factory_model_connect(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) +_factory_bind(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) { Eo *layout = fdata; - Eina_Stringshare *name = key; + Eina_Stringshare *ss_key = key; Efl_Ui_Factory *factory = data; - efl_ui_factory_model_connect(layout, name, factory); + efl_ui_factory_bind(layout, ss_key, factory); return EINA_TRUE; } @@ -47,8 +49,8 @@ _efl_ui_layout_factory_efl_object_constructor(Eo *obj, Efl_Ui_Layout_Factory_Dat efl_ui_widget_factory_item_class_set(obj, EFL_UI_LAYOUT_CLASS); - pd->connects = eina_hash_stringshared_new(EINA_FREE_CB(eina_stringshare_del)); - pd->factory_connects = eina_hash_stringshared_new(EINA_FREE_CB(efl_unref)); + pd->bind.properties = eina_hash_stringshared_new(EINA_FREE_CB(eina_stringshare_del)); + pd->bind.factories = eina_hash_stringshared_new(EINA_FREE_CB(efl_unref)); return obj; } @@ -60,14 +62,14 @@ _efl_ui_layout_factory_efl_object_destructor(Eo *obj, Efl_Ui_Layout_Factory_Data eina_stringshare_del(pd->group); eina_stringshare_del(pd->style); - eina_hash_free(pd->connects); - eina_hash_free(pd->factory_connects); + eina_hash_free(pd->bind.properties); + eina_hash_free( pd->bind.factories); efl_destructor(efl_super(obj, MY_CLASS)); } static Eina_Value -_efl_ui_layout_factory_connect(Eo *obj EINA_UNUSED, void *data, const Eina_Value value) +_efl_ui_layout_factory_bind(Eo *obj EINA_UNUSED, void *data, const Eina_Value value) { Efl_Ui_Layout_Factory_Data *pd = data; Efl_Gfx_Entity *layout; @@ -76,8 +78,8 @@ _efl_ui_layout_factory_connect(Eo *obj EINA_UNUSED, void *data, const Eina_Value efl_ui_layout_theme_set(layout, pd->klass, pd->group, pd->style); - eina_hash_foreach(pd->connects, _model_connect, layout); - eina_hash_foreach(pd->factory_connects, _factory_model_connect, layout); + eina_hash_foreach(pd->bind.properties, _property_bind, layout); + eina_hash_foreach(pd->bind.factories, _factory_bind, layout); evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0); evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL); @@ -95,52 +97,52 @@ _efl_ui_layout_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Layout_Factory_Data return efl_future_then(obj, f, .success_type = EINA_VALUE_TYPE_OBJECT, - .success = _efl_ui_layout_factory_connect, + .success = _efl_ui_layout_factory_bind, .data = pd); } EOLIAN static void -_efl_ui_layout_factory_efl_ui_factory_model_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd - , const char *name, Efl_Ui_Factory *factory) +_efl_ui_layout_factory_efl_ui_factory_bind_factory_bind(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd, + const char *key, Efl_Ui_Factory *factory) { - Eina_Stringshare *ss_name; + Eina_Stringshare *ss_key; Efl_Ui_Factory *f_old; - ss_name = eina_stringshare_add(name); + ss_key = eina_stringshare_add(key); if (factory == NULL) { - eina_hash_del(pd->factory_connects, ss_name, NULL); + eina_hash_del(pd->bind.factories, ss_key, NULL); return; } - f_old = eina_hash_set(pd->factory_connects, ss_name, efl_ref(factory)); + f_old = eina_hash_set(pd->bind.factories, ss_key, efl_ref(factory)); if (f_old) { efl_unref(f_old); - eina_stringshare_del(ss_name); + eina_stringshare_del(ss_key); } } EOLIAN static void -_efl_ui_layout_factory_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd - , const char *name, const char *property) +_efl_ui_layout_factory_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd, + const char *key, const char *property) { - Eina_Stringshare *ss_name, *ss_prop, *ss_old; - ss_name = eina_stringshare_add(name); + Eina_Stringshare *ss_key, *ss_prop, *ss_old; + ss_key = eina_stringshare_add(key); if (property == NULL) { - eina_hash_del(pd->connects, ss_name, NULL); - eina_stringshare_del(ss_name); + eina_hash_del(pd->bind.properties, ss_key, NULL); + eina_stringshare_del(ss_key); return; } ss_prop = eina_stringshare_add(property); - ss_old = eina_hash_set(pd->connects, ss_name, ss_prop); + ss_old = eina_hash_set(pd->bind.properties, ss_key, ss_prop); if (ss_old) { eina_stringshare_del(ss_old); - eina_stringshare_del(ss_name); + eina_stringshare_del(ss_key); } } diff --git a/src/lib/elementary/efl_ui_layout_factory.eo b/src/lib/elementary/efl_ui_layout_factory.eo index ea71e89a32..75ced32ed7 100644 --- a/src/lib/elementary/efl_ui_layout_factory.eo +++ b/src/lib/elementary/efl_ui_layout_factory.eo @@ -16,7 +16,7 @@ class Efl.Ui.Layout_Factory extends Efl.Ui.Caching_Factory Efl.Object.constructor; Efl.Object.destructor; Efl.Ui.Factory.create; - Efl.Ui.Factory.model_connect; - Efl.Ui.Model.Connect.connect; + Efl.Ui.Property_Bind.property_bind; + Efl.Ui.Factory_Bind.factory_bind; } } diff --git a/src/lib/elementary/efl_ui_widget_factory.c b/src/lib/elementary/efl_ui_widget_factory.c index b83a0a79aa..a8602a4174 100644 --- a/src/lib/elementary/efl_ui_widget_factory.c +++ b/src/lib/elementary/efl_ui_widget_factory.c @@ -116,16 +116,16 @@ _efl_ui_widget_factory_efl_ui_factory_release(Eo *obj EINA_UNUSED, } static void -_efl_ui_widget_factory_efl_ui_model_connect_connect(Eo *obj, Efl_Ui_Widget_Factory_Data *pd, - const char *name, const char *property) +_efl_ui_widget_factory_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Widget_Factory_Data *pd, + const char *target, const char *property) { - if (!strcmp(name, "style")) + if (!strcmp(target, "style")) { eina_stringshare_replace(&pd->style, property); return ; } - efl_ui_model_connect(efl_super(obj, EFL_UI_WIDGET_FACTORY_CLASS), name, property); + efl_ui_property_bind(efl_super(obj, EFL_UI_WIDGET_FACTORY_CLASS), target, property); } #include "efl_ui_widget_factory.eo.c" diff --git a/src/lib/elementary/efl_ui_widget_factory.eo b/src/lib/elementary/efl_ui_widget_factory.eo index 63eb3c28db..4542a4879c 100644 --- a/src/lib/elementary/efl_ui_widget_factory.eo +++ b/src/lib/elementary/efl_ui_widget_factory.eo @@ -3,7 +3,7 @@ class Efl.Ui.Widget_Factory extends Efl.Loop_Consumer implements Efl.Ui.Factory [[Efl Ui Factory that provides @Efl.Ui.Widget. This factory is designed to build @Efl.Ui.Widget and optionally set their - @Efl.Ui.Widget.style if it was connected with @Efl.Ui.Model.Connect.connect "$style". + @Efl.Ui.Widget.style if it was connected with @Efl.Ui.Property_Bind.property_bind "$style". ]] methods { @@ -20,7 +20,7 @@ class Efl.Ui.Widget_Factory extends Efl.Loop_Consumer implements Efl.Ui.Factory implements { Efl.Ui.Factory.create; Efl.Ui.Factory.release; - Efl.Ui.Model.Connect.connect; + Efl.Ui.Property_Bind.property_bind; } constructors { .item_class @optional; diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c index 5251644c5a..1a963bd6d8 100644 --- a/src/lib/elementary/elc_fileselector_entry.c +++ b/src/lib/elementary/elc_fileselector_entry.c @@ -78,7 +78,7 @@ _FILE_CHOSEN_fwd(void *data, const Efl_Event *event) ELM_FILESELECTOR_ENTRY_DATA_GET(fs, sd); efl_ui_view_model_set(sd->entry, model); - efl_ui_model_connect(sd->entry, "default", "path"); + efl_ui_property_bind(sd->entry, "default", "path"); path = efl_model_property_get(model, "path"); file = eina_value_to_string(path); @@ -422,7 +422,7 @@ _elm_fileselector_entry_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Elm_Fileselec { efl_ui_view_model_set(sd->button, model); efl_ui_view_model_set(sd->entry, model); - efl_ui_model_connect(sd->entry, "default", "path"); + efl_ui_property_bind(sd->entry, "default", "path"); } EINA_DEPRECATED EAPI const char * diff --git a/src/lib/elementary/elm_view_form.c b/src/lib/elementary/elm_view_form.c index 4969310f9b..d8f9a88b0f 100644 --- a/src/lib/elementary/elm_view_form.c +++ b/src/lib/elementary/elm_view_form.c @@ -47,11 +47,11 @@ _link_dying(void* data, Efl_Event const* event) static Eina_Bool _elm_view_widget_add(Elm_View_Form_Data *priv, const char *property, Evas_Object *link) { - if (!efl_isa(link, EFL_UI_MODEL_CONNECT_INTERFACE)) return EINA_FALSE; + if (!efl_isa(link, EFL_UI_PROPERTY_BIND_INTERFACE)) return EINA_FALSE; if (!property) property = "default"; efl_ui_view_model_set(link, priv->model); - efl_ui_model_connect(link, "default", property); + efl_ui_property_bind(link, "default", property); efl_event_callback_add(link, EFL_EVENT_DEL, _link_dying, priv); priv->links = eina_list_append(priv->links, link); diff --git a/src/tests/elementary/efl_ui_test_layout.c b/src/tests/elementary/efl_ui_test_layout.c index e699cf448a..660010bd54 100644 --- a/src/tests/elementary/efl_ui_test_layout.c +++ b/src/tests/elementary/efl_ui_test_layout.c @@ -18,7 +18,7 @@ _propagated_cb(void *data EINA_UNUSED, return v; } -EFL_START_TEST(efl_ui_layout_test_model_connect) +EFL_START_TEST(efl_ui_layout_test_property_bind) { char buf[PATH_MAX]; Evas_Object *win, *ly; @@ -26,7 +26,7 @@ EFL_START_TEST(efl_ui_layout_test_model_connect) Eina_Value v; Eina_Future *f; const char *part_text; - const char text_value[] = "A random string for elm_layout_model_connect test"; + const char text_value[] = "A random string for elm_layout_property_bind test"; win = win_add(NULL, "layout", EFL_UI_WIN_BASIC); @@ -41,7 +41,7 @@ EFL_START_TEST(efl_ui_layout_test_model_connect) f = efl_model_property_set(model, "text_property", &v); eina_future_then(f, _propagated_cb, NULL, NULL); - efl_ui_model_connect(ly, "text", "text_property"); + efl_ui_property_bind(ly, "text", "text_property"); efl_ui_view_model_set(ly, model); ecore_main_loop_begin(); @@ -92,7 +92,7 @@ EFL_END_TEST void efl_ui_test_layout(TCase *tc) { - tcase_add_test(tc, efl_ui_layout_test_model_connect); + tcase_add_test(tc, efl_ui_layout_test_property_bind); tcase_add_test(tc, efl_ui_layout_test_layout_api_size_min); tcase_add_test(tc, efl_ui_layout_test_layout_api_update_hints); tcase_add_test(tc, efl_ui_layout_test_layout_force); From 4ff180ac6a9d2b5912cf64cb02270f88c81b738f Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 11 Feb 2019 14:13:33 -0500 Subject: [PATCH 06/87] evas_object_smart: Speed up some cache invalidation calls Summary: A large number of cache invalidation calls are doing pointer indirection that is completely avoidable. Depends on D7852 Reviewers: devilhorns, cedric Reviewed By: devilhorns, cedric Subscribers: devilhorns, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7853 --- src/lib/evas/canvas/evas_object_smart.c | 35 +++++++++++++++++++------ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index d945f53a85..a5ff430772 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -206,6 +206,26 @@ evas_object_smart_member_add(Evas_Object *eo_obj, Evas_Object *smart_obj) efl_canvas_group_member_add(smart_obj, eo_obj); } +static void +_evas_object_smart_member_cache_invalidate(Evas_Object_Protected_Data *obj, Evas_Smart_Data *sd) +{ + Evas_Object_Protected_Data *member; + Evas_Smart_Data *msd; + + obj->parent_cache.pass_events_valid = EINA_FALSE; + obj->parent_cache.freeze_events_valid = EINA_FALSE; + obj->parent_cache.src_invisible_valid = EINA_FALSE; + if (!sd) return; + + EINA_INLIST_FOREACH(sd->contained, member) + { + if (member->is_smart) + msd = efl_data_scope_get(member->object, MY_CLASS); + else msd = NULL; + _evas_object_smart_member_cache_invalidate(member, msd); + } +} + EOLIAN static void _efl_canvas_group_group_member_add(Eo *smart_obj, Evas_Smart_Data *o, Evas_Object *eo_obj) { @@ -267,14 +287,13 @@ _efl_canvas_group_group_member_add(Eo *smart_obj, Evas_Smart_Data *o, Evas_Objec obj->smart.parent_data = o; obj->smart.parent_object_data = smart; o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj)); - evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE, - EINA_TRUE); + + if (obj->is_smart) member_o = efl_data_scope_get(eo_obj, MY_CLASS); + _evas_object_smart_member_cache_invalidate(obj, member_o); obj->restack = 1; if (obj->is_smart) { - member_o = efl_data_scope_get(eo_obj, MY_CLASS); - if ((member_o->inherit_paragraph_direction) && (member_o->paragraph_direction != o->paragraph_direction)) { @@ -331,7 +350,7 @@ _efl_canvas_group_group_member_del(Eo *smart_obj, Evas_Smart_Data *_pd EINA_UNUS { Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); Evas_Object_Protected_Data *smart; - Evas_Smart_Data *member_o, *o; + Evas_Smart_Data *member_o = NULL, *o; if (!obj || !obj->smart.parent) return; @@ -356,7 +375,9 @@ _efl_canvas_group_group_member_del(Eo *smart_obj, Evas_Smart_Data *_pd EINA_UNUS o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj)); o->member_count--; obj->smart.parent = NULL; - evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE, EINA_TRUE); + + if (obj->is_smart) member_o = efl_data_scope_get(eo_obj, MY_CLASS); + _evas_object_smart_member_cache_invalidate(obj, member_o); if (obj->layer->layer != obj->cur->layer) { @@ -367,8 +388,6 @@ _efl_canvas_group_group_member_del(Eo *smart_obj, Evas_Smart_Data *_pd EINA_UNUS if (obj->is_smart) { - member_o = efl_data_scope_get(eo_obj, MY_CLASS); - if ((member_o->inherit_paragraph_direction) && (member_o->paragraph_direction != EVAS_BIDI_DIRECTION_NEUTRAL)) { From 56dbd2bf86286dead989b4983886e923ca944d9c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 16 Jan 2019 15:02:43 -0500 Subject: [PATCH 07/87] edje: apply maps to textblock cursors and backgrounds when a map is applied to an edje part, it is expected that all components of the part respect the map attributes. this requires that, in the case of textblock parts, all the sub-parts which are internal to the textblock (entry) object also go through the map populate and apply codepaths fix T4977 @fix Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7648 --- src/lib/edje/edje_calc.c | 27 ++++++++++++++++++++++++--- src/lib/edje/edje_entry.c | 18 ++++++++++++++++++ src/lib/edje/edje_private.h | 3 +++ 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index a050edcdca..cdfcc81732 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -3541,7 +3541,7 @@ _map_colors_interp(Edje_Calc_Params *p1, Edje_Calc_Params *p2, static void _edje_map_prop_set(Evas_Map *map, const Edje_Calc_Params *pf, Edje_Part_Description_Common *chosen_desc, - Edje_Real_Part *ep, Evas_Object *mo) + Edje_Real_Part *ep, Evas_Object *mo, Evas_Object *populate_obj) { Edje_Map_Color *color, **colors; int colors_cnt, i; @@ -3551,7 +3551,7 @@ _edje_map_prop_set(Evas_Map *map, const Edje_Calc_Params *pf, colors = pf->ext->map->colors; colors_cnt = pf->ext->map->colors_count; - evas_map_util_points_populate_from_object(map, ep->object); + evas_map_util_points_populate_from_object(map, populate_obj ?: ep->object); if (ep->part->type == EDJE_PART_TYPE_IMAGE || ((ep->part->type == EDJE_PART_TYPE_SWALLOW) && @@ -5047,10 +5047,14 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta if (ep->part->type != EDJE_PART_TYPE_SPACER) { Evas_Object *map_obj; + Evas_Object *cursor_objs[EDJE_ENTRY_NUM_CURSOR_OBJS]; + int c = 0, num_cursors = 0; /* Apply map to smart obj holding nested parts */ if (ep->nested_smart) map_obj = ep->nested_smart; else map_obj = mo; + if (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) + num_cursors = _edje_entry_real_part_cursor_objs_get(ep, cursor_objs); if (chosen_desc->map.on) { @@ -5060,12 +5064,21 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta // create map and populate with part geometry if (!map) map = evas_map_new(4); - _edje_map_prop_set(map, pf, chosen_desc, ep, mo); + _edje_map_prop_set(map, pf, chosen_desc, ep, mo, NULL); if (map_obj) { evas_object_map_set(map_obj, map); evas_object_map_enable_set(map_obj, EINA_TRUE); + if (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) + { + for (c = 0; c < num_cursors; c++) + { + _edje_map_prop_set(map, pf, chosen_desc, ep, mo, cursor_objs[c]); + evas_object_map_set(cursor_objs[c], map); + evas_object_map_enable_set(cursor_objs[c], EINA_TRUE); + } + } } } else @@ -5079,6 +5092,14 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta #endif evas_object_map_enable_set(mo, EINA_FALSE); evas_object_map_set(mo, NULL); + if (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) + { + for (c = 0; c < num_cursors; c++) + { + evas_object_map_enable_set(cursor_objs[c], EINA_FALSE); + evas_object_map_set(cursor_objs[c], NULL); + } + } #ifdef HAVE_EPHYSICS } #endif diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index da0bc81674..5783fabbc7 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -27,6 +27,7 @@ struct _Entry Evas_Coord ox, oy; Evas_Object *cursor_bg; Evas_Object *cursor_fg, *cursor_fg2; +/* CHANGE EDJE_ENTRY_NUM_CURSOR_OBJS IF YOU ADD MORE OBJECTS HERE */ Evas_Textblock_Cursor *cursor; Evas_Textblock_Cursor *sel_start, *sel_end; Evas_Textblock_Cursor *cursor_user, *cursor_user_extra; @@ -2915,6 +2916,23 @@ _edje_entry_shutdown(Edje *ed) _evas_focus_out_cb, ed); } +int +_edje_entry_real_part_cursor_objs_get(Edje_Real_Part *rp, Evas_Object **cursor_objs) +{ + Entry *en; + int ret = 0; + + if ((rp->type != EDJE_RP_TYPE_TEXT) || + (!rp->typedata.text) || (!rp->typedata.text->entry_data)) return -1; + + en = rp->typedata.text->entry_data; + + if (en->cursor_bg) cursor_objs[ret++] = en->cursor_bg; + if (en->cursor_fg) cursor_objs[ret++] = en->cursor_fg; + if (en->cursor_fg2) cursor_objs[ret++] = en->cursor_fg2; + return ret; +} + void _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp) { diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index 3721d28bdf..98311b8525 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -189,6 +189,8 @@ EAPI extern int _edje_default_log_dom ; #endif +#define EDJE_ENTRY_NUM_CURSOR_OBJS 3 + /* Inheritable Edje Smart API. For now private so only Edje Edit makes * use of this, but who knows what will be possible in the future */ #define EDJE_SMART_API_VERSION 1 @@ -2886,6 +2888,7 @@ void _edje_lua_script_only_message(Edje *ed, Edje_Message *em); void _edje_entry_init(Edje *ed); void _edje_entry_shutdown(Edje *ed); +int _edje_entry_real_part_cursor_objs_get(Edje_Real_Part *rp, Evas_Object **objs); void _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp); void _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp); void _edje_entry_real_part_configure(Edje *ed, Edje_Real_Part *rp); From 7b195738957282f20927d94425f0cf51399bfcad Mon Sep 17 00:00:00 2001 From: Stephen 'Okra' Houston Date: Thu, 24 Jan 2019 04:02:54 +0000 Subject: [PATCH 08/87] elm_progressbar test: Add test for custom format strings to show when %% is not escaped correctly. This adds a test that sets a custom progressbar format string that includes a custom percent (%%) that should be escaped to just one percent (%). This case has been broken and fixed many times and is broken again so it makes sense to now add a check for it to try and prevent the continual breakage. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7745 --- src/tests/elementary/elm_test_progressbar.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/tests/elementary/elm_test_progressbar.c b/src/tests/elementary/elm_test_progressbar.c index 81eeee9738..2ad2808de6 100644 --- a/src/tests/elementary/elm_test_progressbar.c +++ b/src/tests/elementary/elm_test_progressbar.c @@ -26,6 +26,22 @@ EFL_START_TEST(elm_progressbar_legacy_type_check) } EFL_END_TEST +EFL_START_TEST(elm_progressbar_custom_unit_check) +{ + Evas_Object *win, *progressbar; + char format[50]; + + snprintf(format, sizeof(format), "%d percent (%d%%)", 50, 50); + + win = win_add(NULL, "progressbar", ELM_WIN_BASIC); + + progressbar = elm_progressbar_add(win); + elm_progressbar_unit_format_set(progressbar, format); + elm_progressbar_value_set(progressbar, .50); + ck_assert(!strcmp(elm_object_part_text_get(progressbar, "elm.text.status"), "50 percent (50%)")); +} +EFL_END_TEST + EFL_START_TEST(elm_atspi_role_get) { Evas_Object *win, *progressbar; @@ -44,5 +60,6 @@ EFL_END_TEST void elm_test_progressbar(TCase *tc) { tcase_add_test(tc, elm_progressbar_legacy_type_check); + tcase_add_test(tc, elm_progressbar_custom_unit_check); tcase_add_test(tc, elm_atspi_role_get); } From a7eb0695b803713f8f8e69d33be0db1effb18da1 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Fri, 1 Feb 2019 08:13:39 +0000 Subject: [PATCH 09/87] efl_ui_format: fix to display %% and unknown format element This fixes 2 things as follows. 1. Displays format string "%%" as "%". Like printf does, "%%" is displayed as "%". 2. Displays unknown format element as it is. In format string "(50%)", ")" is an unknown format element. Although format string has unknown format element, the format string is displayed like printf does. The cause of the issue displaying "0%" which was mentioned on a96933f964b1757b9d9f8a4cce14d883f35a6665 is as follows. The default format string of progressbar is set as "%.0f%%". Therefore, if progressbar's format string is not set, then "%" postfix is always displayed. This commit reverts commit a96933f964b1757b9d9f8a4cce14d883f35a6665. This commit restores commit b4112b9735ce75bce95974a257aa1880fa52a6bf. This commit restores commit be770d37fb05b8486907796dd16f4635bceb4ce1. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7856 --- src/lib/efl/interfaces/efl_ui_format.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/efl/interfaces/efl_ui_format.c b/src/lib/efl/interfaces/efl_ui_format.c index e722d22654..f6f1b811e2 100644 --- a/src/lib/efl/interfaces/efl_ui_format.c +++ b/src/lib/efl/interfaces/efl_ui_format.c @@ -38,6 +38,8 @@ _format_string_check(const char *fmt) if (itr[1] == '%') { itr++; + if (ret_type == FORMAT_TYPE_STATIC) + ret_type = FORMAT_TYPE_STRING; continue; } @@ -69,7 +71,8 @@ _format_string_check(const char *fmt) } else { - ret_type = FORMAT_TYPE_INVALID; + ERR("Format string '%s' has unknown format element '%c' in format. It must have one format element of type 's', 'f', 'F', 'd', 'u', 'i', 'o', 'x' or 'X'", fmt, *itr); + found = EINA_FALSE; break; } } @@ -121,7 +124,7 @@ _default_format_cb(void *data, Eina_Strbuf *str, const Eina_Value value) } else if (sd->format_type == FORMAT_TYPE_STATIC) { - eina_strbuf_append_printf(str, "%s", sd->template); + eina_strbuf_append(str, sd->template); } else { From 2373d5db5b4cd5dfe139aa2a10017ef61b28b5ce Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Tue, 25 Dec 2018 16:57:21 +0100 Subject: [PATCH 10/87] ecore: here comes a env object the env object can be used to alter and edit the content of environment variables. Additionally, the class efl.core.env can be used to to setup a not applied set of environment variables, which then can be applied later (in the future) to set it directly to a spawned process for example, or as a general key/data storage. A efl.core.env object can also be forked off, which makes it easy to customize predefined objects. ref T7514 Differential Revision: https://phab.enlightenment.org/D7510 --- header_checks/meson.build | 3 +- meson.build | 1 + src/Makefile_Ecore.am | 7 +- src/lib/ecore/Ecore_Eo.h | 3 + src/lib/ecore/efl_core_env.c | 107 +++++++++++++++++++++ src/lib/ecore/efl_core_env.eo | 57 ++++++++++++ src/lib/ecore/efl_core_proc_env.c | 145 +++++++++++++++++++++++++++++ src/lib/ecore/efl_core_proc_env.eo | 21 +++++ src/lib/ecore/meson.build | 6 +- src/tests/ecore/efl_app_suite.c | 2 +- src/tests/ecore/efl_app_suite.h | 1 + src/tests/ecore/efl_app_test_env.c | 135 +++++++++++++++++++++++++++ src/tests/ecore/meson.build | 3 +- 13 files changed, 486 insertions(+), 5 deletions(-) create mode 100644 src/lib/ecore/efl_core_env.c create mode 100644 src/lib/ecore/efl_core_env.eo create mode 100644 src/lib/ecore/efl_core_proc_env.c create mode 100644 src/lib/ecore/efl_core_proc_env.eo create mode 100644 src/tests/ecore/efl_app_test_env.c diff --git a/header_checks/meson.build b/header_checks/meson.build index b23e774ec1..066d228a83 100644 --- a/header_checks/meson.build +++ b/header_checks/meson.build @@ -53,7 +53,8 @@ header_checks = [ 'langinfo.h', 'locale.h', 'uv.h', - 'ws2tcpip.h' + 'ws2tcpip.h', + 'crt_externs.h' ] function_checks = [ diff --git a/meson.build b/meson.build index 0e2a50c2c9..d6b9b6074d 100644 --- a/meson.build +++ b/meson.build @@ -210,6 +210,7 @@ elif sys_osx == true sys_lib_extension = 'dylib' sys_exe_extension = '' sys_mod_extension = 'dylib' + config_h.set('environ', '(*_NSGetEnviron())') else error('System '+host_machine.system()+' not known') endif diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 7bc8e43b74..5f10ea7f2e 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -49,7 +49,9 @@ ecore_eolian_files_public = \ lib/ecore/efl_boolean_model.eo \ lib/ecore/efl_select_model.eo \ lib/ecore/efl_composite_model.eo \ - lib/ecore/efl_view_model.eo + lib/ecore/efl_view_model.eo \ + lib/ecore/efl_core_env.eo \ + lib/ecore/efl_core_proc_env.eo \ ecore_eolian_files = \ $(ecore_eolian_files_legacy) \ @@ -98,6 +100,8 @@ lib/ecore/ecore_job.c \ lib/ecore/ecore_main.c \ lib/ecore/ecore_event_message.c \ lib/ecore/ecore_event_message_handler.c \ +lib/ecore/efl_core_env.c \ +lib/ecore/efl_core_proc_env.c \ lib/ecore/efl_app.c \ lib/ecore/efl_loop.c \ lib/ecore/efl_loop_consumer.c \ @@ -335,6 +339,7 @@ tests/ecore/efl_app_test_loop.c \ tests/ecore/efl_app_test_loop_fd.c \ tests/ecore/efl_app_test_loop_timer.c \ tests/ecore/efl_app_test_promise.c \ +tests/ecore/efl_app_test_env.c \ tests/ecore/efl_app_suite.c \ tests/ecore/efl_app_suite.h diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h index 6a21ff5ea7..348b0f5b6d 100644 --- a/src/lib/ecore/Ecore_Eo.h +++ b/src/lib/ecore/Ecore_Eo.h @@ -26,6 +26,9 @@ * @{ */ +#include "efl_core_env.eo.h" +#include "efl_core_proc_env.eo.h" + #include "efl_loop_message.eo.h" #include "efl_loop_message_handler.eo.h" diff --git a/src/lib/ecore/efl_core_env.c b/src/lib/ecore/efl_core_env.c new file mode 100644 index 0000000000..38fc9ba1a9 --- /dev/null +++ b/src/lib/ecore/efl_core_env.c @@ -0,0 +1,107 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include "ecore_private.h" + +#define MY_CLASS EFL_CORE_ENV_CLASS + +extern char **environ; + +typedef struct { + Eina_Hash *env; +} Efl_Core_Env_Data; + +static inline Eina_Bool +str_valid(const char *var) +{ + return var && var[0] != '\0'; +} + +static inline Eina_Bool +key_valid(const char *key) +{ + if (!key || key[0] == '\0') return EINA_FALSE; + + if isdigit(key[0]) return EINA_FALSE; + + for (int i = 0; key[i] != '\0'; ++i) { + if (!isalnum(key[i]) && key[i] != '_') return EINA_FALSE; + } + + return EINA_TRUE; +} + +EOLIAN static void +_efl_core_env_env_set(Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd, const char *var, const char *value) +{ + EINA_SAFETY_ON_FALSE_RETURN(key_valid(var)); + if (str_valid(value)) + { + Eina_Stringshare *share; + share = eina_hash_set(pd->env, var, eina_stringshare_add(value)); + if (share) eina_stringshare_del(share); + } + else + eina_hash_del(pd->env, var, NULL); +} + +EOLIAN static const char* +_efl_core_env_env_get(const Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd, const char *var) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(key_valid(var), NULL); + + return eina_hash_find(pd->env, var); +} + +EOLIAN static void +_efl_core_env_unset(Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd, const char *var) +{ + EINA_SAFETY_ON_FALSE_RETURN(key_valid(var)); + eina_hash_del_by_key(pd->env, var); +} + +EOLIAN static void +_efl_core_env_clear(Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd) +{ + eina_hash_free_buckets(pd->env); +} + +EOLIAN static Efl_Core_Env* +_efl_core_env_efl_duplicate_duplicate(const Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd) +{ + Efl_Core_Env *fork = efl_add_ref(MY_CLASS, NULL); + Eina_Iterator *iter; + Eina_Hash_Tuple *tuple; + + iter = eina_hash_iterator_tuple_new(pd->env); + + EINA_ITERATOR_FOREACH(iter, tuple) + { + efl_core_env_set(fork, tuple->key, tuple->data); + } + + eina_iterator_free(iter); + return fork; +} + +EOLIAN static Efl_Object* +_efl_core_env_efl_object_constructor(Eo *obj, Efl_Core_Env_Data *pd) +{ + pd->env = eina_hash_string_superfast_new((Eina_Free_Cb)eina_stringshare_del); + + return efl_constructor(efl_super(obj, MY_CLASS)); +} + +EOLIAN static Eina_Iterator* +_efl_core_env_content_get(const Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd) +{ + Eina_Iterator *iter = eina_hash_iterator_key_new(pd->env); + return iter; +} + + +#include "efl_core_env.eo.c" diff --git a/src/lib/ecore/efl_core_env.eo b/src/lib/ecore/efl_core_env.eo new file mode 100644 index 0000000000..86da8c14ff --- /dev/null +++ b/src/lib/ecore/efl_core_env.eo @@ -0,0 +1,57 @@ +class Efl.Core.Env extends Efl.Object implements Efl.Duplicate { + [[This object can maintain a set of key value pairs + + A object of this type alone does not apply the object to the system. + For getting the value into the system, see @Efl.Core.Proc_Env. + + A object can be forked, which will only copy its values, changes to the returned object will not change the object where it is forked off. + ]] + methods { + @property env { + [[ Stored var value pairs of this object. + + Var must contain only: underscores ('_'), letters ('a-z', 'A-Z'), + numbers ('0-9'), but the first character may not be a number. + ]] + set { + [[ Add a new pair to this object ]] + } + get { + [[ Get the value of the $var, or $null if no such $var exists in the object]] + } + keys { + var: string; [[ The name of the variable ]] + } + values { + value: string; [[ Set var to this value if not $NULL, + otherwise clear this env value if value + is $NULL or if it is an empty string ]] + } + } + unset { + [[ Remove the pair with the matching $var from this object]] + params { + var : string; [[ The name of the variable ]] + } + } + clear { + [[ Remove all pairs from this object]] + } + @property content { + [[ Get the content of this object. + + This will return a iterator that contains all keys that are part of this object. + ]] + get { + + } + values { + iter : iterator; + } + } + } + implements { + Efl.Object.constructor; + Efl.Duplicate.duplicate; + } +} diff --git a/src/lib/ecore/efl_core_proc_env.c b/src/lib/ecore/efl_core_proc_env.c new file mode 100644 index 0000000000..846b69a350 --- /dev/null +++ b/src/lib/ecore/efl_core_proc_env.c @@ -0,0 +1,145 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#ifdef HAVE_CRT_EXTERNS_H +# include +#endif +#include "ecore_private.h" + +#define MY_CLASS EFL_CORE_PROC_ENV_CLASS + +static Efl_Core_Env *env = NULL; + +typedef struct { + Eina_Bool in_sync; +} Efl_Core_Proc_Env_Data; + +static void +_sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd) +{ + Eina_List *existing_keys = NULL, *n; + Eina_Iterator *content; + const char *key; + + pd->in_sync = EINA_TRUE; + content = efl_core_env_content_get(obj); + + EINA_ITERATOR_FOREACH(content, key) + { + existing_keys = eina_list_append(existing_keys, key); + } + + if (environ) + { + char **p; + + for (p = environ; *p; p++) + { + char **values; + + values = eina_str_split(*p, "=", 2); + efl_core_env_set(obj, values[0], values[1]); + + EINA_LIST_FOREACH(existing_keys, n, key) + { + if (!strcmp(key, values[0])) + { + existing_keys = eina_list_remove_list(existing_keys, n); + break; + } + } + } + } + EINA_LIST_FOREACH(existing_keys, n, key) + { + efl_core_env_unset(obj, key); + } + pd->in_sync = EINA_FALSE; +} + +EOLIAN static const char* +_efl_core_proc_env_efl_core_env_env_get(const Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *var) +{ + if (!pd->in_sync) + _sync((Eo*)obj, pd); + return efl_core_env_get(efl_super(obj, MY_CLASS), var); +} + +EOLIAN static void +_efl_core_proc_env_efl_core_env_env_set(Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *var, const char *value) +{ + efl_core_env_set(efl_super(obj, MY_CLASS), var, value); + if (!pd->in_sync) + { + if (value) + setenv(var, value, 1); + else + unsetenv(var); + } +} + +EOLIAN static void +_efl_core_proc_env_efl_core_env_unset(Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *key) +{ + efl_core_env_unset(efl_super(obj, MY_CLASS), key); + if (!pd->in_sync) + { + unsetenv(key); + } +} + +EOLIAN static void +_efl_core_proc_env_efl_core_env_clear(Eo *obj, Efl_Core_Proc_Env_Data *pd) +{ + efl_core_env_clear(efl_super(obj, MY_CLASS)); + if (!pd->in_sync) + { +#ifdef HAVE_CLEARENV + clearenv(); +#else + environ = NULL; +#endif + } +} + + +EOLIAN static Efl_Duplicate* +_efl_core_proc_env_efl_duplicate_duplicate(const Eo *obj, Efl_Core_Proc_Env_Data *pd) +{ + if (!pd->in_sync) + _sync((Eo*) obj, pd); + return efl_duplicate(efl_super(obj, MY_CLASS)); +} + +EOLIAN static Eina_Iterator* +_efl_core_proc_env_efl_core_env_content_get(const Eo *obj, Efl_Core_Proc_Env_Data *pd) +{ + if (!pd->in_sync) + _sync((Eo*) obj, pd); + return efl_core_env_content_get(efl_super(obj, MY_CLASS)); +} + +EOLIAN static Efl_Object* +_efl_core_proc_env_efl_object_constructor(Eo *obj, Efl_Core_Proc_Env_Data *pd EINA_UNUSED) +{ + EINA_SAFETY_ON_TRUE_RETURN_VAL(!!env, NULL); + + obj = efl_constructor(efl_super(obj, MY_CLASS)); + return obj; +} + +EOLIAN static Efl_Core_Env* +_efl_core_proc_env_self(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED) +{ + if (!env) + { + env = efl_add_ref(EFL_CORE_PROC_ENV_CLASS, NULL); + efl_wref_add(env, &env); + } + + return env; +} + +#include "efl_core_proc_env.eo.c" diff --git a/src/lib/ecore/efl_core_proc_env.eo b/src/lib/ecore/efl_core_proc_env.eo new file mode 100644 index 0000000000..23c2c67d75 --- /dev/null +++ b/src/lib/ecore/efl_core_proc_env.eo @@ -0,0 +1,21 @@ +class Efl.Core.Proc_Env extends Efl.Core.Env +{ + eo_prefix : efl_env; + methods { + self @class { + [[Get a instance of this object + + The object will apply the environment operations onto this process. + ]] + return : Efl.Core.Env; + } + } + implements { + Efl.Core.Env.env { set; get; } + Efl.Core.Env.content { get; } + Efl.Core.Env.unset; + Efl.Core.Env.clear; + Efl.Duplicate.duplicate; + Efl.Object.constructor; + } +} diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build index baa5263698..98909cb618 100644 --- a/src/lib/ecore/meson.build +++ b/src/lib/ecore/meson.build @@ -74,7 +74,9 @@ pub_eo_files = [ 'efl_boolean_model.eo', 'efl_select_model.eo', 'efl_composite_model.eo', - 'efl_view_model.eo' + 'efl_view_model.eo', + 'efl_core_env.eo', + 'efl_core_proc_env.eo' ] foreach eo_file : pub_eo_files @@ -180,6 +182,8 @@ ecore_src = [ 'efl_thread.c', 'efl_threadio.c', 'efl_appthread.c', + 'efl_core_env.c', + 'efl_core_proc_env.c', ] if sys_windows == true diff --git a/src/tests/ecore/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c index b3be09915a..cd26e2d95e 100644 --- a/src/tests/ecore/efl_app_suite.c +++ b/src/tests/ecore/efl_app_suite.c @@ -9,7 +9,6 @@ #include "efl_app_suite.h" #include "../efl_check.h" - EFL_START_TEST(efl_app_test_efl_build_version) { const Efl_Version *ver; @@ -53,6 +52,7 @@ static const Efl_Test_Case etc[] = { { "Promise", efl_app_test_promise_2 }, { "Promise", efl_app_test_promise_3 }, { "Promise", efl_app_test_promise_safety }, + { "Env", efl_test_efl_env }, { NULL, NULL } }; diff --git a/src/tests/ecore/efl_app_suite.h b/src/tests/ecore/efl_app_suite.h index 29ed8f031f..3a66dcdfcf 100644 --- a/src/tests/ecore/efl_app_suite.h +++ b/src/tests/ecore/efl_app_suite.h @@ -11,5 +11,6 @@ void efl_app_test_promise(TCase *tc); void efl_app_test_promise_2(TCase *tc); void efl_app_test_promise_3(TCase *tc); void efl_app_test_promise_safety(TCase *tc); +void efl_test_efl_env(TCase *tc); #endif /* _EFL_APP_SUITE_H */ diff --git a/src/tests/ecore/efl_app_test_env.c b/src/tests/ecore/efl_app_test_env.c new file mode 100644 index 0000000000..63bad166a2 --- /dev/null +++ b/src/tests/ecore/efl_app_test_env.c @@ -0,0 +1,135 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#define EFL_NOLEGACY_API_SUPPORT +#include +#include "efl_app_suite.h" +#include "../efl_check.h" + +EFL_START_TEST(efl_core_env_test_set_get) +{ + Efl_Core_Env *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); + + efl_core_env_set(env, "FOO", "bar"); + efl_core_env_set(env, "going", "home"); + efl_core_env_set(env, "Merry", "christmas"); + + ck_assert_str_eq(efl_core_env_get(env, "FOO"), "bar"); + ck_assert_str_eq(efl_core_env_get(env, "going"), "home"); + ck_assert_str_eq(efl_core_env_get(env, "Merry"), "christmas"); + + efl_core_env_unset(env, "Merry"); + + ck_assert_str_eq(efl_core_env_get(env, "FOO"), "bar"); + ck_assert_str_eq(efl_core_env_get(env, "going"), "home"); + ck_assert_ptr_eq(efl_core_env_get(env, "Merry"), NULL); + + efl_unref(env); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_invalid_keys) +{ + Efl_Core_Env *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); + +#define CHECK(val) \ + efl_core_env_set(env, val, "TEST"); \ + ck_assert_ptr_eq(efl_core_env_get(env, val), NULL); + + CHECK("0foo"); + CHECK("foo bar"); + CHECK("foo!bar"); + +#undef CHECK + + +#define CHECK(val) \ + efl_core_env_set(env, val, "TEST"); \ + ck_assert_str_eq(efl_core_env_get(env, val), "TEST"); + + CHECK("foo0"); + CHECK("foo_bar"); + +#undef CHECK + +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_clear) +{ + Efl_Core_Env *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); + + efl_core_env_set(env, "FOO", "bar"); + efl_core_env_set(env, "going", "home"); + efl_core_env_set(env, "Merry", "christmas"); + + efl_core_env_clear(env); + + ck_assert_ptr_eq(efl_core_env_get(env, "FOO"), NULL); + ck_assert_ptr_eq(efl_core_env_get(env, "going"), NULL); + ck_assert_ptr_eq(efl_core_env_get(env, "Merry"), NULL); + + efl_unref(env); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_fork) +{ + Efl_Core_Env *env_fork, *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); + + efl_core_env_set(env, "FOO", "bar"); + efl_core_env_set(env, "going", "home"); + efl_core_env_set(env, "Merry", "christmas"); + + env_fork = efl_duplicate(env); + + ck_assert_str_eq(efl_core_env_get(env_fork, "FOO"), "bar"); + ck_assert_str_eq(efl_core_env_get(env_fork, "going"), "home"); + ck_assert_str_eq(efl_core_env_get(env_fork, "Merry"), "christmas"); + + efl_unref(env); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_process) +{ + Efl_Core_Env *env_fork, *env = efl_env_self(EFL_CORE_PROC_ENV_CLASS); + + ck_assert(env); + + ck_assert_str_eq(efl_core_env_get(env, "PATH"), getenv("PATH")); + env_fork = efl_duplicate(env); + ck_assert_str_eq(efl_core_env_get(env_fork, "PATH"), getenv("PATH")); + + efl_unref(env); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_undepend_fork) +{ + Efl_Core_Env *env_fork, *env = efl_env_self(EFL_CORE_PROC_ENV_CLASS); + + ck_assert(env); + + ck_assert_str_eq(efl_core_env_get(env, "PATH"), getenv("PATH")); + env_fork = efl_duplicate(env); + efl_core_env_set(env_fork, "PATH", "abc"); + ck_assert_str_eq(efl_core_env_get(env, "PATH"), getenv("PATH")); + + efl_unref(env); + efl_unref(env_fork); +} +EFL_END_TEST + +void efl_test_efl_env(TCase *tc) +{ + tcase_add_test(tc, efl_core_env_test_set_get); + tcase_add_test(tc, efl_core_env_test_invalid_keys); + tcase_add_test(tc, efl_core_env_test_clear); + tcase_add_test(tc, efl_core_env_test_fork); + tcase_add_test(tc, efl_core_env_test_process); + tcase_add_test(tc, efl_core_env_test_undepend_fork); +} diff --git a/src/tests/ecore/meson.build b/src/tests/ecore/meson.build index 4b46814bbe..e3b4f6c851 100644 --- a/src/tests/ecore/meson.build +++ b/src/tests/ecore/meson.build @@ -75,7 +75,8 @@ efl_app_suite_src = [ 'efl_app_test_loop.c', 'efl_app_test_loop_fd.c', 'efl_app_test_loop_timer.c', - 'efl_app_test_promise.c' + 'efl_app_test_promise.c', + 'efl_app_test_env.c' ] efl_app_suite_deps = [m] From c3d69f66a69c0def357a5c373a13343e1c01ff5d Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 26 Dec 2018 11:38:04 +0100 Subject: [PATCH 11/87] efl_task: remove env from this object the env operations are moved to the efl.core.env objects, which can be used there. Differential Revision: https://phab.enlightenment.org/D7514 --- src/lib/ecore/ecore_private.h | 1 - src/lib/ecore/efl_core_env.c | 2 +- src/lib/ecore/efl_exe.c | 67 +++++++----- src/lib/ecore/efl_exe.eo | 17 +++ src/lib/ecore/efl_loop.c | 189 ---------------------------------- src/lib/ecore/efl_loop.eo | 2 - src/lib/ecore/efl_task.c | 62 +---------- src/lib/ecore/efl_task.eo | 20 ---- 8 files changed, 60 insertions(+), 300 deletions(-) diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index c29f73d189..4e980d9123 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -188,7 +188,6 @@ struct _Efl_Task_Data { Eina_Stringshare *command; Eina_Array *args; - Eina_Hash *env; Efl_Task_Priority priority; int exit_code; Efl_Task_Flags flags; diff --git a/src/lib/ecore/efl_core_env.c b/src/lib/ecore/efl_core_env.c index 38fc9ba1a9..e0ee5a25e3 100644 --- a/src/lib/ecore/efl_core_env.c +++ b/src/lib/ecore/efl_core_env.c @@ -26,7 +26,7 @@ key_valid(const char *key) { if (!key || key[0] == '\0') return EINA_FALSE; - if isdigit(key[0]) return EINA_FALSE; + if (isdigit(key[0])) return EINA_FALSE; for (int i = 0; key[i] != '\0'; ++i) { if (!isalnum(key[i]) && key[i] != '_') return EINA_FALSE; diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c index a6f9f5f506..4b3bc658d6 100644 --- a/src/lib/ecore/efl_exe.c +++ b/src/lib/ecore/efl_exe.c @@ -40,6 +40,7 @@ typedef struct _Efl_Exe_Data Efl_Exe_Data; struct _Efl_Exe_Data { + Efl_Core_Env *env; int exit_signal; Efl_Exe_Flags flags; #ifdef _WIN32 @@ -165,22 +166,6 @@ _exec(const char *cmd, Efl_Exe_Flags flags) } } -static Eina_Bool -_foreach_env(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata EINA_UNUSED) -{ - int keylen; - char *buf, *s; - - if (!data) return EINA_TRUE; - keylen = strlen(key); - buf = alloca(keylen + 1 + strlen(data) + 1); - strcpy(buf, key); - buf[keylen] = '='; - strcpy(buf + keylen + 1, data); - if ((s = strdup(buf))) putenv(s); - return EINA_TRUE; -} - static void _exe_exit_eval(Eo *obj, Efl_Exe_Data *pd) { @@ -206,7 +191,7 @@ _exe_exit_eval(Eo *obj, Efl_Exe_Data *pd) // 128+n Fatal error signal "n" kill -9 $PPID $? returns 137 (128 + 9) // 130 Script terminated by Control-C Ctl-C Control-C is fatal error signal 2, (130 = 128 + 2, see above) // 255* Exit status out of range exit -1 exit takes only integer args in the range 0 - 255 - // + // // According to the above table, exit codes 1 - 2, // 126 - 165, and 255 [1] have special meanings, and // should therefore be avoided for user-specified exit @@ -300,6 +285,25 @@ _run_clean_cb(Efl_Loop_Consumer *consumer EINA_UNUSED, ////////////////////////////////////////////////////////////////////////// + +EOLIAN static void +_efl_exe_env_set(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd, Efl_Core_Env *env) +{ + if (pd->env == env) return; + + if (!pd->env) + efl_unref(pd->env); + pd->env = env; + if (pd->env) + efl_ref(pd->env); +} + +EOLIAN static Efl_Core_Env* +_efl_exe_env_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) +{ + return pd->env; +} + EOLIAN static void _efl_exe_signal(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd, Efl_Exe_Signal sig) { @@ -564,17 +568,28 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) // clear systemd notify socket... only relevant for systemd world, // otherwise shouldn't be trouble putenv("NOTIFY_SOCKET="); - // force the env hash to update from env vars - efl_task_env_get(loop, "HOME"); - // actually setenv the env hash (clear what was there before so it is + // actually setenv the env object (clear what was there before so it is // the only env there) -#ifdef HAVE_CLEARENV - clearenv(); -#else - environ = NULL; -#endif - eina_hash_foreach(td->env, _foreach_env, NULL); + if (pd->env) + { + Eina_Iterator *itr; + const char *key; + + #ifdef HAVE_CLEARENV + clearenv(); + #else + environ = NULL; + #endif + itr = efl_core_env_content_get(pd->env); + + EINA_ITERATOR_FOREACH(itr, key) + { + setenv(key, efl_core_env_get(pd->env, key) , 1); + } + efl_unref(pd->env); + pd->env = NULL; + } // actually execute! _exec(cmd, pd->flags); diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index d0d0cb585e..111814af21 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -42,6 +42,23 @@ class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.C sig: int; [[ The exit signal, or -1 if no exit signal happened ]] } } + @property env { + [[ If $env is $null then the process created by this object is + going to inherit the enviroment of this process. + + In case $env is not $null then the environment variables declared + in this object will represent the environment passed to the new process. + ]] + get { + [[ Get the object assosiated with this object ]] + } + set { + [[ Set the object assosiated with this object ]] + } + values { + env : Efl.Core.Env; [[$env will be referenced until this object does not need it anymore.]] + } + } } implements { Efl.Object.constructor; diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index 44e9c872c9..68f9573b76 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -15,8 +15,6 @@ #include "ecore_main_common.h" -extern char **environ; - typedef struct _Efl_Loop_Promise_Simple_Data Efl_Loop_Promise_Simple_Data; typedef struct _Efl_Internal_Promise Efl_Internal_Promise; @@ -53,11 +51,6 @@ _efl_loop_message_handler_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Loo Eo *_mainloop_singleton = NULL; Efl_Loop_Data *_mainloop_singleton_data = NULL; -extern Eina_Lock _environ_lock; -static Eina_List *_environ_strings_set = NULL; - -static void _clean_old_environ(void); - EAPI Eo * efl_main_loop_get(void) { @@ -354,16 +347,6 @@ _efl_loop_efl_object_destructor(Eo *obj, Efl_Loop_Data *pd) { pd->future_message_handler = NULL; - eina_lock_take(&_environ_lock); - _clean_old_environ(); - _environ_strings_set = eina_list_free(_environ_strings_set); - pd->env.environ_ptr = NULL; - free(pd->env.environ_copy); - pd->env.environ_copy = NULL; - eina_lock_release(&_environ_lock); - - eina_value_flush(&pd->exit_code); - efl_destructor(efl_super(obj, EFL_LOOP_CLASS)); } @@ -674,178 +657,6 @@ efl_build_version_set(int vmaj, int vmin, int vmic, int revision, _app_efl_version.build_id = build_id ? strdup(build_id) : NULL; } -static void -_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td) -{ - Eina_Bool update = EINA_FALSE; - unsigned int count = 0, i; - char **p; - - // count environs - if (environ) - { - for (p = environ; *p; p++) count++; - } - // cached env ptr is the same... so look deeper if things changes - if (pd->env.environ_ptr == environ) - { - // if we have no cached copy then update - if (!pd->env.environ_copy) update = EINA_TRUE; - else - { - // if any ptr in the cached copy doesnt match environ ptr - // then update - for (i = 0; i <= count; i++) - { - if (pd->env.environ_copy[i] != environ[i]) - { - update = EINA_TRUE; - break; - } - } - } - } - // cached env ptr changed so we need to update anyway - else update = EINA_TRUE; - if (!update) return; - // things changed - do the update - pd->env.environ_ptr = environ; - free(pd->env.environ_copy); - pd->env.environ_copy = NULL; - if (count > 0) - { - pd->env.environ_copy = malloc((count + 1) * sizeof(char *)); - if (pd->env.environ_copy) - { - for (i = 0; i <= count; i++) - pd->env.environ_copy[i] = environ[i]; - } - } - // clear previous env hash and rebuild it from environ so it matches - if (td->env) eina_hash_free(td->env); - td->env = eina_hash_string_superfast_new - ((Eina_Free_Cb)eina_stringshare_del); - for (i = 0; i < count; i++) - { - char *var; - const char *value; - - if (!environ[i]) continue; - if ((value = strchr(environ[i], '='))) - { - if (*value) - { - if ((var = malloc(value - environ[i] + 1))) - { - strncpy(var, environ[i], value - environ[i]); - var[value - environ[i]] = 0; - value++; - eina_hash_add(td->env, var, - eina_stringshare_add(value)); - free(var); - } - } - } - } -} - -static void -_clean_old_environ(void) -{ - char **p; - const char *str; - Eina_List *l, *ll; - Eina_Bool ok; - - // clean up old strings no longer in environ - EINA_LIST_FOREACH_SAFE(_environ_strings_set, l, ll, str) - { - ok = EINA_FALSE; - for (p = environ; *p; p++) - { - if (*p == str) - { - ok = EINA_TRUE; - break; - } - } - if (!ok) - { - _environ_strings_set = - eina_list_remove_list(_environ_strings_set, l); - eina_stringshare_del(str); - } - } -} - -EOLIAN static void -_efl_loop_efl_task_env_set(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED, const char *var, const char *value) -{ - char *str, *str2; - size_t varlen, vallen = 0; - - if (!var) return; - - Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); - if (!td) return; - - varlen = strlen(var); - if (value) vallen = strlen(value); - - str = malloc(varlen + 1 + vallen + 1); - if (!str) return; - strcpy(str, var); - str[varlen] = '='; - if (value) strcpy(str + varlen + 1, value); - else str[varlen + 1] = 0; - - str2 = (char *)eina_stringshare_add(str); - free(str); - if (!str2) return; - - eina_lock_take(&_environ_lock); - if (putenv(str2) != 0) - { - eina_stringshare_del(str2); - eina_lock_release(&_environ_lock); - return; - } - _environ_strings_set = eina_list_append(_environ_strings_set, str2); - eina_lock_release(&_environ_lock); - - efl_task_env_set(efl_super(obj, EFL_LOOP_CLASS), var, value); - - eina_lock_take(&_environ_lock); - _clean_old_environ(); - eina_lock_release(&_environ_lock); -} - -EOLIAN static const char * -_efl_loop_efl_task_env_get(const Eo *obj, Efl_Loop_Data *pd, const char *var) -{ - Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); - if (!td) return NULL; - eina_lock_take(&_environ_lock); - _env_sync(pd, td); - eina_lock_release(&_environ_lock); - return efl_task_env_get(efl_super(obj, EFL_LOOP_CLASS), var); -} - -EOLIAN static void -_efl_loop_efl_task_env_reset(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd) -{ - Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); - if (!td) return; - eina_lock_take(&_environ_lock); -#ifdef HAVE_CLEARENV - clearenv(); -#else - environ = NULL; -#endif - _env_sync(pd, td); - eina_lock_release(&_environ_lock); -} - EOLIAN static Eina_Future * _efl_loop_efl_task_run(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED) { diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index fe9cbd9a5d..7480eee867 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -125,8 +125,6 @@ class Efl.Loop extends Efl.Task Efl.Object.invalidate; Efl.Object.destructor; Efl.Object.provider_find; - Efl.Task.env { set; get; } - Efl.Task.env_reset; Efl.Task.run; Efl.Task.end; } diff --git a/src/lib/ecore/efl_task.c b/src/lib/ecore/efl_task.c index 6442669efd..311de0506a 100644 --- a/src/lib/ecore/efl_task.c +++ b/src/lib/ecore/efl_task.c @@ -227,19 +227,6 @@ _rebuild_command(Efl_Task_Data *pd) eina_strbuf_free(sb); } - -static Eina_Bool -_foreach_env_copy(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) -{ - if (data) - { - // only copy env vars not already set - if (!eina_hash_find(fdata, key)) - eina_hash_add(fdata, key, eina_stringshare_add(data)); - } - return EINA_TRUE; -} - ////////////////////////////////////////////////////////////////////////// EOLIAN static void @@ -322,34 +309,6 @@ _efl_task_arg_reset(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) pd->command_dirty = EINA_TRUE; } -EOLIAN static void -_efl_task_env_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *var, const char *value) -{ - if (!var) return; - if (!pd->env) - pd->env = eina_hash_string_superfast_new - ((Eina_Free_Cb)eina_stringshare_del); - if (!pd->env) return; - if ((value) && (*value)) - eina_hash_add(pd->env, var, eina_stringshare_add(value)); - else eina_hash_del(pd->env, var, NULL); -} - - -EOLIAN static const char * -_efl_task_env_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *var) -{ - if ((!var) || (!pd->env)) return NULL; - return eina_hash_find(pd->env, var); -} - -EOLIAN static void -_efl_task_env_reset(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) -{ - if (pd->env) eina_hash_free(pd->env); - pd->env = NULL; -} - EOLIAN static void _efl_task_priority_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, Efl_Task_Priority priority) { @@ -386,32 +345,13 @@ _efl_task_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) eina_stringshare_del(pd->command); pd->command = NULL; _clear_args(pd); - if (pd->env) eina_hash_free(pd->env); - pd->env = NULL; efl_destructor(efl_super(obj, MY_CLASS)); } EOLIAN static void -_efl_task_efl_object_parent_set(Eo *obj, Efl_Task_Data *pd, Efl_Object *parent) +_efl_task_efl_object_parent_set(Eo *obj, Efl_Task_Data *pd EINA_UNUSED, Efl_Object *parent) { - Eo *loop; - efl_parent_set(efl_super(obj, MY_CLASS), parent); - // copy loop env into exe task env, if not already set in env (overridden) - loop = efl_provider_find(parent, EFL_LOOP_CLASS); - if (loop) - { - Efl_Task_Data *tdl = efl_data_scope_get(loop, EFL_TASK_CLASS); - - if (tdl) - { - if (!pd->env) - pd->env = eina_hash_string_superfast_new - ((Eina_Free_Cb)eina_stringshare_del); - if (tdl->env) - eina_hash_foreach(tdl->env, _foreach_env_copy, pd->env); - } - } } ////////////////////////////////////////////////////////////////////////// diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index 92f0094fef..526746ff60 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -96,26 +96,6 @@ abstract Efl.Task extends Efl.Object [[ Clear all arguments in arg_value/count set. Will result in the command property also being cleared. ]] } - @property env { - [[ The environment to be passed in or that was passed to the - task. This is a string key, value list which map to environment - variables where appropriate. The var string must contain - only an underscore ('_'), letters ('a-z', 'A-Z'), - numbers ('0-9'), but the first character may not be a number.]] - set { } - get { } - keys { - var: string; [[ The variable name as a string ]] - } - values { - value: string; [[ Set var to this value if not $NULL, - otherwise clear this env value if value - is $NULL or if it is an empty string ]] - } - } - env_reset { - [[ Clear all environment variables. ]] - } @property priority { [[ The priority of this task. ]] get { } From 48e5684b3c37b337edd7004e68fc0690b58a84e6 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 26 Dec 2018 15:31:57 +0100 Subject: [PATCH 12/87] ecore: here comes a command line object the mixin for now can carry a command, which can be setted as an string. The string is then parsed again, this is done in order to make sure that everything that needs escaping really is escaped or parsed correctly. Differential Revision: https://phab.enlightenment.org/D7516 --- src/Makefile_Ecore.am | 12 +- src/lib/ecore/Ecore_Eo.h | 1 + src/lib/ecore/efl_core_command_line.c | 267 +++++++++++++++++++++++++ src/lib/ecore/efl_core_command_line.eo | 80 ++++++++ src/lib/ecore/meson.build | 4 +- src/tests/ecore/efl_app_suite.c | 1 + src/tests/ecore/efl_app_suite.h | 1 + src/tests/ecore/efl_app_test_cml.c | 85 ++++++++ src/tests/ecore/efl_app_test_cml.eo | 4 + src/tests/ecore/meson.build | 22 +- 10 files changed, 473 insertions(+), 4 deletions(-) create mode 100644 src/lib/ecore/efl_core_command_line.c create mode 100644 src/lib/ecore/efl_core_command_line.eo create mode 100644 src/tests/ecore/efl_app_test_cml.c create mode 100644 src/tests/ecore/efl_app_test_cml.eo diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 5f10ea7f2e..fd6074dec3 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -52,6 +52,10 @@ ecore_eolian_files_public = \ lib/ecore/efl_view_model.eo \ lib/ecore/efl_core_env.eo \ lib/ecore/efl_core_proc_env.eo \ + lib/ecore/efl_core_command_line.eo + +ecore_test_eolian_files = \ + tests/ecore/efl_app_test_cml.eo ecore_eolian_files = \ $(ecore_eolian_files_legacy) \ @@ -60,10 +64,14 @@ ecore_eolian_files = \ ecore_eolian_c = $(ecore_eolian_files:%.eo=%.eo.c) ecore_eolian_h = $(ecore_eolian_files:%.eo=%.eo.h) \ $(ecore_eolian_files_legacy:%.eo=%.eo.legacy.h) +ecore_test_c = $(ecore_test_eolian_files:%.eo=%.eo.c) +ecore_test_h = $(ecore_test_eolian_files:%.eo=%.eo.h) BUILT_SOURCES += \ $(ecore_eolian_c) \ - $(ecore_eolian_h) + $(ecore_eolian_h) \ + $(ecore_test_c) \ + $(ecore_test_h) ecoreeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@ ecoreeolianfiles_DATA = $(ecore_eolian_files_public) lib/ecore/efl_loop_timer.eo @@ -100,6 +108,7 @@ lib/ecore/ecore_job.c \ lib/ecore/ecore_main.c \ lib/ecore/ecore_event_message.c \ lib/ecore/ecore_event_message_handler.c \ +lib/ecore/efl_core_command_line.c \ lib/ecore/efl_core_env.c \ lib/ecore/efl_core_proc_env.c \ lib/ecore/efl_app.c \ @@ -339,6 +348,7 @@ tests/ecore/efl_app_test_loop.c \ tests/ecore/efl_app_test_loop_fd.c \ tests/ecore/efl_app_test_loop_timer.c \ tests/ecore/efl_app_test_promise.c \ +tests/ecore/efl_app_test_cml.c \ tests/ecore/efl_app_test_env.c \ tests/ecore/efl_app_suite.c \ tests/ecore/efl_app_suite.h diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h index 348b0f5b6d..3615219c38 100644 --- a/src/lib/ecore/Ecore_Eo.h +++ b/src/lib/ecore/Ecore_Eo.h @@ -28,6 +28,7 @@ #include "efl_core_env.eo.h" #include "efl_core_proc_env.eo.h" +#include "efl_core_command_line.eo.h" #include "efl_loop_message.eo.h" #include "efl_loop_message_handler.eo.h" diff --git a/src/lib/ecore/efl_core_command_line.c b/src/lib/ecore/efl_core_command_line.c new file mode 100644 index 0000000000..74ae690c26 --- /dev/null +++ b/src/lib/ecore/efl_core_command_line.c @@ -0,0 +1,267 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#define EFL_CORE_COMMAND_LINE_PROTECTED + +#include + +#define MY_CLASS EFL_CORE_COMMAND_LINE_MIXIN + +typedef struct { + Eina_Bool filled; + char *string_command; + Eina_Array *command; +} Efl_Core_Command_Line_Data; + +static Eina_Array * +_unescape(const char *s) +{ + Eina_Array *args; + const char *p; + char *tmp = NULL, *d = NULL; + if (!s) return NULL; + + Eina_Bool in_quote_dbl = EINA_FALSE; + Eina_Bool in_quote = EINA_FALSE; + + args = eina_array_new(16); + if (!args) return NULL; + for (p = s; *p; p++) + { + if (!tmp) tmp = d = strdup(p); + if (tmp) + { + if (in_quote_dbl) + { + switch (*p) + { + case '\"': + in_quote_dbl = EINA_FALSE; + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + tmp = d = NULL; + break; + case '\\': + p++; + EINA_FALLTHROUGH + default: + *d = *p; + d++; + break; + } + } + else if (in_quote) + { + switch (*p) + { + case '\'': + in_quote = EINA_FALSE; + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + tmp = d = NULL; + break; + case '\\': + p++; + EINA_FALLTHROUGH + default: + *d = *p; + d++; + break; + } + } + else + { + switch (*p) + { + case ' ': + case '\t': + case '\r': + case '\n': + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + tmp = d = NULL; + break; + case '\"': + in_quote_dbl = EINA_TRUE; + break; + case '\'': + in_quote = EINA_TRUE; + break; + case '\\': + p++; + EINA_FALLTHROUGH + default: + *d = *p; + d++; + break; + } + } + } + } + if (tmp) + { + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + } + return args; +} + +static char * +_escape(const char *s) +{ + Eina_Bool need_quote = EINA_FALSE; + const char *p; + char *s2 = malloc((strlen(s) * 2) + 1 + 2), *d; + + if (!s2) return NULL; + + for (p = s; *p; p++) + { + switch (*p) + { + case '\'': + case '\"': + case '$': + case '#': + case ';': + case '&': + case '`': + case '|': + case '(': + case ')': + case '[': + case ']': + case '{': + case '}': + case '>': + case '<': + case '\n': + case '\r': + case '\t': + case ' ': + need_quote = EINA_TRUE; + default: + break; + } + } + + d = s2; + if (need_quote) + { + *d = '\"'; + d++; + } + for (p = s; *p; p++, d++) + { + switch (*p) + { + case '\\': + case '\'': + case '\"': + *d = '\\'; + d++; + EINA_FALLTHROUGH + default: + *d = *p; + break; + } + } + if (need_quote) + { + *d = '\"'; + d++; + } + *d = 0; + return s2; +} + +EOLIAN static const char* +_efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) +{ + return eina_strdup(pd->string_command); +} + +EOLIAN static Eina_Accessor* +_efl_core_command_line_command_access(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) +{ + return pd->command ? eina_array_accessor_new(pd->command) : NULL; +} + +static void +_remove_invalid_chars(char *command) +{ + for (unsigned int i = 0; i < strlen(command); ++i) + { + char c = command[i]; + if (c < 0x20 || c == 0x7f) + command[i] = '\x12'; + } +} + +EOLIAN static Eina_Bool +_efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd, Eina_Array *array) +{ + EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE); + Eina_Strbuf *command = eina_strbuf_new(); + unsigned int i = 0; + + pd->command = eina_array_new(eina_array_count(array)); + for (i = 0; i < (array ? eina_array_count(array) : 0); ++i) + { + char *content = eina_array_data_get(array, i); + char *param = calloc(1, strlen(content)); + + if (!param) + { + free(param); + while (eina_array_count(pd->command) > 0) + eina_stringshare_del(eina_array_pop(pd->command)); + eina_array_free(pd->command); + pd->command = NULL; + eina_array_free(array); + return EINA_FALSE; + } + + //build the command + if (i != 0) + eina_strbuf_append(command, " "); + eina_strbuf_append(command, _escape(content)); + //convert string to stringshare + strcpy(param, content); + _remove_invalid_chars(param); + eina_array_push(pd->command, eina_stringshare_add(param)); + free(param); + } + pd->string_command = eina_strbuf_release(command); + pd->filled = EINA_TRUE; + eina_array_free(array); + + return EINA_TRUE; +} + +EOLIAN static Eina_Bool +_efl_core_command_line_command_string_set(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd, const char *str) +{ + EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE); + + pd->string_command = eina_strdup(str); + _remove_invalid_chars(pd->string_command); + pd->command = _unescape(str); + if (!pd->command) + { + if (pd->string_command) + free(pd->string_command); + pd->string_command = NULL; + return EINA_FALSE; + } + pd->filled = EINA_TRUE; + + return EINA_TRUE; +} + +#include "efl_core_command_line.eo.c" diff --git a/src/lib/ecore/efl_core_command_line.eo b/src/lib/ecore/efl_core_command_line.eo new file mode 100644 index 0000000000..1cbb020856 --- /dev/null +++ b/src/lib/ecore/efl_core_command_line.eo @@ -0,0 +1,80 @@ +mixin Efl.Core.Command_Line { + [[A mixin that implements standard functions for command lines. + + This object parses the command line that gets passed, later the object can be accessed via accessor or the string directly. + ]] + methods { + @property command { + [[ A commandline that encodes arguments in a command string. + This command is unix shell-style, thus whitespace separates + arguments unless escaped. Also a semi-colon ';', ampersand + '&', pipe/bar '|', hash '#', bracket, square brace, brace + character ('(', ')', '[', ']', '{', '}'), exclamation + mark '!', backquote '`', greator or less than ('>' '<') + character unless escaped or in quotes would cause + args_count/value to not be generated properly, because + it would force complex shell interpretation which + will not be supported in evaluating the arg_count/value + information, but the final shell may interpret this if this + is executed via a command-line shell. To not be a complex + shell command, it should be simple with paths, options + and variable expansions, but nothing more complex involving + the above unescaped characters. + + "cat -option /path/file" + "cat 'quoted argument'" + "cat ~/path/escaped\ argument" + "/bin/cat escaped\ argument $VARIABLE" + etc. + + It should not try and use "complex shell features" if you + want the arg_count and arg_value set to be correct after + setting the command string. For example none of: + + "VAR=x /bin/command && /bin/othercommand >& /dev/null" + "VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &" + etc. + + If you set the command the arg_count/value property contents + can change and be completely re-evaluated by parsing the + command string into an argument array set along with + interpreting escapes back into individual argument strings. + ]] + get { + + } + values { + commandline : string; + } + } + command_access { + [[ Get the accessor which enables access to each argument that got passed to this object. ]] + return : accessor; + } + @property command_array { + [[ Use an array to fill this object + + Every element of a string is a argument. + ]] + set { + return : bool; [[On success $true, $false otherwise]] + } + values { + array : array @owned; [[An array where every array field is an argument]] + } + } + @property command_string { + [[ Use a string to fill this object + + The string will be split at every unescaped ' ', every resulting substring will be a new argument to the command line. + ]] + set { + return : bool; [[On success $true, $false otherwise]] + } + values { + str : string; [[A command in form of a string]] + } + + } + } +} diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build index 98909cb618..375f745abd 100644 --- a/src/lib/ecore/meson.build +++ b/src/lib/ecore/meson.build @@ -76,7 +76,8 @@ pub_eo_files = [ 'efl_composite_model.eo', 'efl_view_model.eo', 'efl_core_env.eo', - 'efl_core_proc_env.eo' + 'efl_core_proc_env.eo', + 'efl_core_command_line.eo', ] foreach eo_file : pub_eo_files @@ -184,6 +185,7 @@ ecore_src = [ 'efl_appthread.c', 'efl_core_env.c', 'efl_core_proc_env.c', + 'efl_core_command_line.c', ] if sys_windows == true diff --git a/src/tests/ecore/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c index cd26e2d95e..2cab632622 100644 --- a/src/tests/ecore/efl_app_suite.c +++ b/src/tests/ecore/efl_app_suite.c @@ -53,6 +53,7 @@ static const Efl_Test_Case etc[] = { { "Promise", efl_app_test_promise_3 }, { "Promise", efl_app_test_promise_safety }, { "Env", efl_test_efl_env }, + { "CML", efl_test_efl_cml }, { NULL, NULL } }; diff --git a/src/tests/ecore/efl_app_suite.h b/src/tests/ecore/efl_app_suite.h index 3a66dcdfcf..874d2bb503 100644 --- a/src/tests/ecore/efl_app_suite.h +++ b/src/tests/ecore/efl_app_suite.h @@ -12,5 +12,6 @@ void efl_app_test_promise_2(TCase *tc); void efl_app_test_promise_3(TCase *tc); void efl_app_test_promise_safety(TCase *tc); void efl_test_efl_env(TCase *tc); +void efl_test_efl_cml(TCase *tc); #endif /* _EFL_APP_SUITE_H */ diff --git a/src/tests/ecore/efl_app_test_cml.c b/src/tests/ecore/efl_app_test_cml.c new file mode 100644 index 0000000000..1b7cebf552 --- /dev/null +++ b/src/tests/ecore/efl_app_test_cml.c @@ -0,0 +1,85 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#define EFL_CORE_COMMAND_LINE_PROTECTED + +#include +#include +#define EFL_NOLEGACY_API_SUPPORT +#include +#include "efl_app_suite.h" +#include "../efl_check.h" + +typedef struct { + +} Efl_App_Test_CML_Data; + +#include "efl_app_test_cml.eo.h" +#include "efl_app_test_cml.eo.c" + +static Eina_Array* +_construct_array(void) +{ + Eina_Array *array = eina_array_new(16); + + eina_array_push(array, "/bin/sh"); + eina_array_push(array, "-C"); + eina_array_push(array, "foo"); + eina_array_push(array, "--test"); + eina_array_push(array, "--option=done"); + eina_array_push(array, "--"); + eina_array_push(array, "asdf --test"); + return array; +} + +static const char* +_construct_string(void) +{ + return "/bin/sh -C foo --test --option=done -- \"asdf --test\""; +} + +EFL_START_TEST(efl_core_cml_string) +{ + Efl_App_Test_CML *cml = efl_add_ref(EFL_APP_TEST_CML_CLASS, NULL); + Eina_Array *content = _construct_array(); + Eina_Stringshare *str; + Eina_Bool b; + int i = 0; + + b = efl_core_command_line_command_string_set(cml, _construct_string()); + ck_assert_int_ne(b, 0); + + EINA_ACCESSOR_FOREACH(efl_core_command_line_command_access(cml), i, str) + { + ck_assert_str_eq(eina_array_data_get(content, i), str); + } + ck_assert_str_eq(efl_core_command_line_command_get(cml), _construct_string()); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_cml_array) +{ + Efl_App_Test_CML *cml = efl_add_ref(EFL_APP_TEST_CML_CLASS, NULL); + Eina_Array *content1 = _construct_array(); + Eina_Array *content2 = _construct_array(); + Eina_Stringshare *str; + Eina_Bool b; + int i = 0; + + b = efl_core_command_line_command_array_set(cml, content1); + ck_assert_int_ne(b, 0); + + EINA_ACCESSOR_FOREACH(efl_core_command_line_command_access(cml), i, str) + { + ck_assert_str_eq(eina_array_data_get(content2, i), str); + } + ck_assert_str_eq(efl_core_command_line_command_get(cml), _construct_string()); +} +EFL_END_TEST + +void efl_test_efl_cml(TCase *tc) +{ + tcase_add_test(tc, efl_core_cml_string); + tcase_add_test(tc, efl_core_cml_array); +} diff --git a/src/tests/ecore/efl_app_test_cml.eo b/src/tests/ecore/efl_app_test_cml.eo new file mode 100644 index 0000000000..b0877e0cf7 --- /dev/null +++ b/src/tests/ecore/efl_app_test_cml.eo @@ -0,0 +1,4 @@ +class Efl.App.Test.CML extends Efl.Object implements Efl.Core.Command_Line +{ + +} diff --git a/src/tests/ecore/meson.build b/src/tests/ecore/meson.build index e3b4f6c851..c49d941355 100644 --- a/src/tests/ecore/meson.build +++ b/src/tests/ecore/meson.build @@ -76,14 +76,32 @@ efl_app_suite_src = [ 'efl_app_test_loop_fd.c', 'efl_app_test_loop_timer.c', 'efl_app_test_promise.c', - 'efl_app_test_env.c' + 'efl_app_test_env.c', + 'efl_app_test_cml.c', ] +priv_eo_files = [ + 'efl_app_test_cml.eo', +] + +priv_eo_file_target = [] +foreach eo_file : priv_eo_files + priv_eo_file_target += custom_target('eolian_gen_' + eo_file, + input : eo_file, + output : [eo_file + '.h'], + depfile : eo_file + '.d', + command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories, + '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), + '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), + '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'), + '-gchd', '@INPUT@']) +endforeach + efl_app_suite_deps = [m] efl_app_suite_deps += ecore efl_app_suite = executable('efl_app_suite', - efl_app_suite_src, + efl_app_suite_src, priv_eo_file_target, dependencies: [efl_app_suite_deps, check], c_args : [ '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', From 616381e9cfed41b83fef039b0e38c09b41fd3d7f Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 26 Dec 2018 17:51:17 +0100 Subject: [PATCH 13/87] ecore: get rid of commands in efl_task. Note that the usage in efl_thread.c should and could be removed. the problem with its usage is that when the ARGUMENTS event is fired, noone ever had the chance to subscribe to the loop of the thread yet. So all in all this is unneccessary, since noone could ever touch that. Differential Revision: https://phab.enlightenment.org/D7517 --- .../mono/efl_mono/efl_csharp_application.cs | 5 +- src/lib/ecore/efl_app.eo | 2 +- src/lib/ecore/efl_appthread.eo | 2 +- src/lib/ecore/efl_exe.c | 4 +- src/lib/ecore/efl_exe.eo | 2 +- src/lib/ecore/efl_loop.c | 10 +- src/lib/ecore/efl_task.c | 298 ------------------ src/lib/ecore/efl_task.eo | 77 ----- src/lib/ecore/efl_thread.c | 71 ++--- src/lib/ecore/efl_thread.eo | 2 +- src/lib/ecore/meson.build | 1 + 11 files changed, 47 insertions(+), 427 deletions(-) diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs index 2b2c55c75e..84732d3993 100644 --- a/src/bindings/mono/efl_mono/efl_csharp_application.cs +++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs @@ -104,8 +104,9 @@ namespace Efl { public void Launch(Efl.Csharp.Components components=Components.Ui) { Init(components); Efl.App app = Efl.App.AppMain; - foreach (var arg in Environment.GetCommandLineArgs()) - app.AppendArg(arg); + Eina.Array command_line = new Eina.Array(); + command_line.Append(Environment.GetCommandLineArgs()); + app.SetCommandArray(command_line); app.ArgumentsEvt += (object sender, LoopArgumentsEvt_Args evt) => { if (evt.arg.Initialization) { OnInitialize(evt.arg.Argv); diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo index f90324b39d..e046428626 100644 --- a/src/lib/ecore/efl_app.eo +++ b/src/lib/ecore/efl_app.eo @@ -1,6 +1,6 @@ import efl_types; -class Efl.App extends Efl.Loop +class Efl.App extends Efl.Loop implements Efl.Core.Command_Line { [[ ]] data: null; diff --git a/src/lib/ecore/efl_appthread.eo b/src/lib/ecore/efl_appthread.eo index c60308f468..82a9d77ace 100644 --- a/src/lib/ecore/efl_appthread.eo +++ b/src/lib/ecore/efl_appthread.eo @@ -1,4 +1,4 @@ -class Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer +class Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line { [[ ]] methods { diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c index 4b3bc658d6..61ff4ba798 100644 --- a/src/lib/ecore/efl_exe.c +++ b/src/lib/ecore/efl_exe.c @@ -395,7 +395,7 @@ _efl_exe_efl_task_priority_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) } EOLIAN static Eina_Future * -_efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) +_efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd) { #ifdef _WIN32 return EINA_FALSE; @@ -414,7 +414,7 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) if (!td) return NULL; // get a cmdline to run - cmd = efl_task_command_get(obj); + cmd = efl_core_command_line_command_get(obj); if (!cmd) return NULL; ret = pipe(pipe_exited); diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index 111814af21..b7f97da7dc 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -19,7 +19,7 @@ enum Efl.Exe_Flags { hide_io = 4 } -class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer +class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer,Efl.Core.Command_Line { [[ ]] methods { diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index 68f9573b76..cf8600c998 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -383,17 +383,19 @@ _efl_loop_arguments_cleanup(Eo *o EINA_UNUSED, void *data, const Eina_Future *de EAPI void ecore_loop_arguments_send(int argc, const char **argv) { - Eina_Array *arga; + Eina_Array *arga, *cml; int i = 0; - efl_task_arg_reset(efl_main_loop_get()); arga = eina_array_new(argc); + cml = eina_array_new(argc); for (i = 0; i < argc; i++) { - eina_array_push(arga, eina_stringshare_add(argv[i])); - efl_task_arg_append(efl_main_loop_get(), argv[i]); + Eina_Stringshare *arg = eina_stringshare_add(argv[i]); + eina_array_push(arga, arg); + eina_array_push(cml, arg); } + efl_core_command_line_command_array_set(efl_app_main_get(EFL_APP_CLASS), cml); efl_future_then(efl_main_loop_get(), efl_loop_job(efl_main_loop_get()), .success = _efl_loop_arguments_send, .free = _efl_loop_arguments_cleanup, diff --git a/src/lib/ecore/efl_task.c b/src/lib/ecore/efl_task.c index 311de0506a..d610fcbf8b 100644 --- a/src/lib/ecore/efl_task.c +++ b/src/lib/ecore/efl_task.c @@ -12,303 +12,6 @@ ////////////////////////////////////////////////////////////////////////// -static void -_clear_args(Efl_Task_Data *pd) -{ - unsigned int count, i; - - if (!pd->args) return; - count = eina_array_count(pd->args); - for (i = 0; i < count; i++) - eina_stringshare_del(eina_array_data_get(pd->args, i)); - eina_array_free(pd->args); - pd->args = NULL; -} - -static Eina_Array * -_unescape(const char *s) -{ - Eina_Array *args; - const char *p; - char *tmp = NULL, *d = NULL; - if (!s) return NULL; - - Eina_Bool in_quote_dbl = EINA_FALSE; - Eina_Bool in_quote = EINA_FALSE; - - args = eina_array_new(16); - if (!args) return NULL; - for (p = s; *p; p++) - { - if (!tmp) tmp = d = strdup(p); - if (tmp) - { - if (in_quote_dbl) - { - switch (*p) - { - case '\"': - in_quote_dbl = EINA_FALSE; - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - tmp = d = NULL; - break; - case '\\': - p++; - EINA_FALLTHROUGH - default: - *d = *p; - d++; - break; - } - } - else if (in_quote) - { - switch (*p) - { - case '\'': - in_quote = EINA_FALSE; - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - tmp = d = NULL; - break; - case '\\': - p++; - EINA_FALLTHROUGH - default: - *d = *p; - d++; - break; - } - } - else - { - switch (*p) - { - case ' ': - case '\t': - case '\r': - case '\n': - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - tmp = d = NULL; - break; - case '\"': - in_quote_dbl = EINA_TRUE; - break; - case '\'': - in_quote = EINA_TRUE; - break; - case '\\': - p++; - EINA_FALLTHROUGH - default: - *d = *p; - d++; - break; - } - } - } - } - if (tmp) - { - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - } - return args; -} - -static char * -_escape(const char *s) -{ - Eina_Bool need_quote = EINA_FALSE; - const char *p; - char *s2 = malloc((strlen(s) * 2) + 1 + 2), *d; - - if (!s2) return NULL; - - for (p = s; *p; p++) - { - switch (*p) - { - case '\'': - case '\"': - case '$': - case '#': - case ';': - case '&': - case '`': - case '|': - case '(': - case ')': - case '[': - case ']': - case '{': - case '}': - case '>': - case '<': - case '\n': - case '\r': - case '\t': - need_quote = EINA_TRUE; - default: - break; - } - } - - d = s2; - if (need_quote) - { - *d = '\"'; - d++; - } - for (p = s; *p; p++, d++) - { - switch (*p) - { - case ' ': - case '\\': - case '\'': - case '\"': - *d = '\\'; - d++; - EINA_FALLTHROUGH - default: - *d = *p; - break; - } - } - if (need_quote) - { - *d = '\"'; - d++; - } - *d = 0; - return s2; -} - -static void -_rebuild_command(Efl_Task_Data *pd) -{ - unsigned int count, i; - Eina_Strbuf *sb; - const char *arg, *cmd; - Eina_Bool have_args = EINA_FALSE; - - if (!pd->command_dirty) return; - pd->command_dirty = EINA_FALSE; - eina_stringshare_del(pd->command); - pd->command = NULL; - if (!pd->args) return; - sb = eina_strbuf_new(); - if (!sb) return; - count = eina_array_count(pd->args); - for (i = 0; i < count; i++) - { - arg = eina_array_data_get(pd->args, i); - if (arg) - { - char *str = _escape(arg); - if (str) - { - if (have_args) eina_strbuf_append(sb, " "); - eina_strbuf_append(sb, str); - free(str); - have_args = EINA_TRUE; - } - } - } - cmd = eina_strbuf_string_get(sb); - if (cmd) pd->command = eina_stringshare_add(cmd); - eina_strbuf_free(sb); -} - -////////////////////////////////////////////////////////////////////////// - -EOLIAN static void -_efl_task_command_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *command) -{ - eina_stringshare_replace(&pd->command, command); - _clear_args(pd); - pd->args = _unescape(pd->command); -} - -EOLIAN static const char * -_efl_task_command_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd) -{ - _rebuild_command(pd); - return pd->command; -} - -EOLIAN static unsigned int -_efl_task_arg_count_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd) -{ - if (!pd->args) return 0; - return eina_array_count(pd->args); -} - -EOLIAN static void -_efl_task_arg_value_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, unsigned int num, const char *arg) -{ - const char *parg = NULL; - unsigned int count; - - if (!pd->args) pd->args = eina_array_new(16); - count = eina_array_count(pd->args); - if ((count > 0) && (count > num)) - parg = eina_array_data_get(pd->args, num); - else - { - unsigned int i; - - for (i = count; i <= num; i++) - { - eina_array_push(pd->args, ""); - eina_array_data_set(pd->args, i, NULL); - } - } - - if (arg) - eina_array_data_set(pd->args, num, eina_stringshare_add(arg)); - else - eina_array_data_set(pd->args, num, NULL); - if (parg) eina_stringshare_del(parg); - pd->command_dirty = EINA_TRUE; -} - -EOLIAN static const char * -_efl_task_arg_value_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd, unsigned int num) -{ - unsigned int count; - - if (!pd->args) return NULL; - count = eina_array_count(pd->args); - if (num >= count) return NULL; - return eina_array_data_get(pd->args, num); -} - -EOLIAN static void -_efl_task_arg_append(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *arg) -{ - if (!pd->args) pd->args = eina_array_new(16); - if (arg) - eina_array_push(pd->args, eina_stringshare_add(arg)); - else - eina_array_push(pd->args, NULL); - pd->command_dirty = EINA_TRUE; -} - -EOLIAN static void -_efl_task_arg_reset(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) -{ - _clear_args(pd); - pd->command_dirty = EINA_TRUE; -} - EOLIAN static void _efl_task_priority_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, Efl_Task_Priority priority) { @@ -344,7 +47,6 @@ _efl_task_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) { eina_stringshare_del(pd->command); pd->command = NULL; - _clear_args(pd); efl_destructor(efl_super(obj, MY_CLASS)); } diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index 526746ff60..ddab5e6826 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -19,83 +19,6 @@ abstract Efl.Task extends Efl.Object { [[ ]] methods { - @property command { - [[ A commandline that encodes arguments in a command string. - This command is unix shell-style, thus whitespace separates - arguments unless escaped. Also a semi-colon ';', ampersand - '&', pipe/bar '|', hash '#', bracket, square brace, brace - character ('(', ')', '[', ']', '{', '}'), exclamation - mark '!', backquote '`', greator or less than ('>' '<') - character unless escaped or in quotes would cause - args_count/value to not be generated properly, because - it would force complex shell interpretation which - will not be supported in evaluating the arg_count/value - information, but the final shell may interpret this if this - is executed via a command-line shell. To not be a complex - shell command, it should be simple with paths, options - and variable expansions, but nothing more complex involving - the above unescaped characters. - - "cat -option /path/file" - "cat 'quoted argument'" - "cat ~/path/escaped\ argument" - "/bin/cat escaped\ argument $VARIABLE" - etc. - - It should not try and use "complex shell features" if you - want the arg_count and arg_value set to be correct after - setting the command string. For example none of: - - "VAR=x /bin/command && /bin/othercommand >& /dev/null" - "VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &" - etc. - - If you set the command the arg_count/value property contents - can change and be completely re-evaluated by parsing the - command string into an argument array set along with - interpreting escapes back into individual argument strings. ]] - get { } - set { } - values { - command: string; [[ The command string as described ]] - } - } - @property arg_count { - [[ Number of arguments passed in or arguments that are to be - passed as sepcified by arg_value ]] - get { } - values { - args: uint; [[ ]] - } - } - @property arg_value { - [[ Argument number by index. If the index does not exist when - set, it is allocated and created. Getting an argument that - Has not been set yet will return $NULL. Empty arguments will - Be ignored. Setting an argument will result in the command - porperty being re-evaluated and escaped into a single - command string if needed. ]] - set { } - get { } - keys { - num: uint; [[ ]] - } - values { - arg: string; [[ ]] - } - } - arg_append { - [[ Append a new string argument at the end of the arg set. - This functions like setting an arg_value at the end of the - current set so the set increases by 1 in size. ]] - params { - arg: string; [[ ]] - } - } - arg_reset { - [[ Clear all arguments in arg_value/count set. Will result in the - command property also being cleared. ]] - } @property priority { [[ The priority of this task. ]] get { } diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c index 4d48296093..a324af4f58 100644 --- a/src/lib/ecore/efl_thread.c +++ b/src/lib/ecore/efl_thread.c @@ -25,10 +25,7 @@ typedef struct int in, out; Eo *in_handler, *out_handler; } fd, ctrl; - struct { - unsigned int argc; - const char **argv; - } args; + Eina_Array *argv; Efl_Callback_Array_Item_Full *event_cb; void *indata, *outdata; } Thread_Data; @@ -151,16 +148,16 @@ _efl_loop_arguments_send(Eo *obj, void *data EINA_UNUSED, const Eina_Value v) Efl_Loop_Arguments arge; Eina_Array *arga; Eina_Stringshare *s; - unsigned int argc = efl_task_arg_count_get(obj); - unsigned int i; + Eina_Accessor *accessor; + const char *argv; + int i = 0; - arga = eina_array_new(argc); + accessor = efl_core_command_line_command_access(obj); + arga = eina_array_new(10); - for (i = 0; i < argc; i++) + EINA_ACCESSOR_FOREACH(accessor, i, argv) { - const char *argv = efl_task_arg_value_get(obj, i); - if (argv) - eina_array_push(arga, eina_stringshare_add(argv)); + eina_array_push(arga, eina_stringshare_add(argv)); } arge.argv = arga; arge.initialization = EINA_TRUE; @@ -229,7 +226,6 @@ _efl_thread_main(void *data, Eina_Thread t) Eo *obj; Eina_Value *ret; Control_Data cmd; - unsigned int i; int real; Efl_Callback_Array_Item_Full *it; @@ -280,16 +276,13 @@ _efl_thread_main(void *data, Eina_Thread t) efl_event_callback_priority_add(obj, it->desc, it->priority, it->func, it->user_data); } - for (i = 0; i < thdat->args.argc; i++) - efl_task_arg_append(obj, thdat->args.argv[i]); + efl_core_command_line_command_array_set(obj, thdat->argv); efl_future_then(obj, efl_loop_job(obj), .success = _efl_loop_arguments_send); - for (i = 0; i < thdat->args.argc; i++) - eina_stringshare_del(thdat->args.argv[i]); - free(thdat->args.argv); + while (thdat->argv && eina_array_count(thdat->argv)) free(eina_array_pop(thdat->argv)); + eina_array_free(thdat->argv); free(thdat->event_cb); - thdat->args.argv = NULL; thdat->event_cb = NULL; ret = efl_loop_begin(obj); @@ -575,7 +568,7 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) const char *name; int pipe_to_thread[2]; int pipe_from_thread[2]; - unsigned int argc, i, num; + unsigned int num; Efl_Callback_Array_Item_Full *it; Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); @@ -729,24 +722,23 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) name = efl_name_get(obj); if (name) thdat->name = eina_stringshare_add(name); - argc = efl_task_arg_count_get(obj); - if (argc > 0) - { - thdat->args.argc = argc; - thdat->args.argv = malloc(argc * sizeof(char *)); - if (thdat->args.argv) - { - for (i = 0; i < argc; i++) - { - const char *argv = efl_task_arg_value_get(obj, i); - if (argv) - thdat->args.argv[i] = eina_stringshare_add(argv); - else - thdat->args.argv[i] = NULL; - } - } - // XXX: if malloc fails? - } + { + Eina_Accessor *acc; + int i = 0; + const char *argv; + + acc = efl_core_command_line_command_access(obj); + if (acc) + { + thdat->argv = eina_array_new(0); + EINA_ACCESSOR_FOREACH(acc, i, argv) + { + eina_array_push(thdat->argv, eina_stringshare_add(argv)); + } + } + + } + if (pd->event_cb) { num = 0; @@ -762,9 +754,8 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) if (!eina_thread_create(&(pd->thread), pri, -1, _efl_thread_main, thdat)) { - for (i = 0; i < thdat->args.argc; i++) - eina_stringshare_del(thdat->args.argv[i]); - free(thdat->args.argv); + while (eina_array_count(thdat->argv)) eina_stringshare_del(eina_array_pop(thdat->argv)); + eina_array_free(thdat->argv); efl_del(pd->fd.in_handler); efl_del(pd->fd.out_handler); efl_del(pd->ctrl.in_handler); diff --git a/src/lib/ecore/efl_thread.eo b/src/lib/ecore/efl_thread.eo index 7837c7bfdb..02bf2f15df 100644 --- a/src/lib/ecore/efl_thread.eo +++ b/src/lib/ecore/efl_thread.eo @@ -1,4 +1,4 @@ -class Efl.Thread extends Efl.Task implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer +class Efl.Thread extends Efl.Task implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line { methods { } diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build index 375f745abd..2e44804481 100644 --- a/src/lib/ecore/meson.build +++ b/src/lib/ecore/meson.build @@ -181,6 +181,7 @@ ecore_src = [ 'ecore_main_common.h', 'efl_exe.c', 'efl_thread.c', + 'efl_appthread.c', 'efl_threadio.c', 'efl_appthread.c', 'efl_core_env.c', From bbe0151670c9da6522679bb344c2dda8fd25a533 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 11 Feb 2019 18:07:15 +0100 Subject: [PATCH 14/87] eo: fix typo this while loop is actaully iterating obj->xref, therefore we should not take the pointer of data_xrefs. Differential Revision: https://phab.enlightenment.org/D7908 --- src/lib/eo/eo_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h index 7c7ae9e4a8..3b046bb302 100644 --- a/src/lib/eo/eo_private.h +++ b/src/lib/eo/eo_private.h @@ -390,7 +390,7 @@ _efl_unref_internal(_Eo_Object *obj, const char *func_name, const char *file, in while (obj->xrefs) { Eina_Inlist *nitr = obj->xrefs->next; - Eo_Xref_Node *xref = EINA_INLIST_CONTAINER_GET(obj->data_xrefs, Eo_Xref_Node); + Eo_Xref_Node *xref = EINA_INLIST_CONTAINER_GET(obj->xrefs, Eo_Xref_Node); ERR("in %s:%d: func '%s' Object %p is still referenced by object %p. Origin: %s:%d", file, line, func_name, obj_id, xref->ref_obj, xref->file, xref->line); eina_freeq_ptr_main_add(xref, free, sizeof(*xref)); From 0221ff480df4824fa3b2c59ecad047d6fa9c2ee8 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 11 Feb 2019 19:20:45 +0100 Subject: [PATCH 15/87] eo: the object size changes for the eo_debug profile Differential Revision: https://phab.enlightenment.org/D7909 --- src/tests/eo/suite/eo_test_general.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c index 1f8c18c3dc..b19bbc80bb 100644 --- a/src/tests/eo/suite/eo_test_general.c +++ b/src/tests/eo/suite/eo_test_general.c @@ -1794,7 +1794,12 @@ EFL_START_TEST(efl_object_size) { // This test is checking that we are not increasing the size of our object over time // Update this number only if you modified the class size on purpose + +#ifdef EO_DEBUG + ck_assert_int_le(efl_class_memory_size_get(SIMPLE_CLASS), 164); +#else ck_assert_int_le(efl_class_memory_size_get(SIMPLE_CLASS), 148); +#endif } EFL_END_TEST From 87373bf66ccb281b4e183bcb5aabc3e2f3d957bb Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 11 Feb 2019 19:21:02 +0100 Subject: [PATCH 16/87] eo: efl_isa with a EFL_OVERRIDE_CLASS should return true this is important, as basically every single class etc. can be a EFL_OVERRIDE_CLASS. This makes efl_override work with eo_debug. Differential Revision: https://phab.enlightenment.org/D7910 --- src/lib/eo/eo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index beed05914d..95823f7a08 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -1766,6 +1766,10 @@ efl_isa(const Eo *eo_id, const Efl_Class *klass_id) if (EINA_UNLIKELY(!eo_id)) return EINA_FALSE; + // Everything can add a override to an existing class, which pretty much means, everything is a efl override + // This is required in order to support our debug-profile for the users of efl_override + if (EINA_UNLIKELY(klass_id == EFL_OBJECT_OVERRIDE_CLASS)) return EINA_TRUE; + // Case where we are looking if eo_id is a class that contain klass_id if (EINA_UNLIKELY(_eo_is_a_class(eo_id))) { From fac3fa1c882d679eaf38f24d81703045f1cd13d3 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 13 Jan 2019 13:03:04 +0100 Subject: [PATCH 17/87] efl_ui_focus: delete elements on invalidate this lead to ERR's. A element is invalidated while the composition element is invalidated, which means, not yet deleted, but the Pointer will fail a call to efl_isa. Differential Revision: https://phab.enlightenment.org/D7623 --- src/lib/elementary/efl_ui_focus_composition.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c index 8a4b3dfe4c..2eda064b07 100644 --- a/src/lib/elementary/efl_ui_focus_composition.c +++ b/src/lib/elementary/efl_ui_focus_composition.c @@ -92,10 +92,11 @@ _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd) } } static void -_del(void *data, const Efl_Event *ev) +_invalidate(void *data, const Efl_Event *ev) { Efl_Ui_Focus_Composition_Data *pd = efl_data_scope_get(data, EFL_UI_FOCUS_COMPOSITION_MIXIN); pd->register_target = eina_list_remove(pd->register_target, ev->object); + pd->registered_targets = eina_list_remove(pd->registered_targets, ev->object); } EOLIAN static void @@ -107,7 +108,7 @@ _efl_ui_focus_composition_composition_elements_set(Eo *obj, Efl_Ui_Focus_Composi pd->targets_ordered = eina_list_free(pd->targets_ordered); EINA_LIST_FREE(pd->register_target, elem) { - efl_event_callback_del(elem, EFL_EVENT_DEL, _del, obj); + efl_event_callback_del(elem, EFL_EVENT_INVALIDATE, _invalidate, obj); } pd->order = eina_list_free(pd->order); @@ -125,7 +126,7 @@ _efl_ui_focus_composition_composition_elements_set(Eo *obj, Efl_Ui_Focus_Composi if (efl_isa(elem, EFL_UI_FOCUS_OBJECT_MIXIN)) { pd->register_target = eina_list_append(pd->register_target , o); - efl_event_callback_add(o, EFL_EVENT_DEL, _del, obj); + efl_event_callback_add(o, EFL_EVENT_INVALIDATE, _invalidate, obj); } else { From e908142da6e27a8e38f29895770d5d40f8587498 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 11 Feb 2019 17:34:16 +0100 Subject: [PATCH 18/87] build: also build eo-tests with debug profile this checks that eo-dbg is also working in the same manner as normal eo Reviewed-by: Stefan Schmidt Differential Revision: https://phab.enlightenment.org/D7911 --- src/lib/eo/meson.build | 9 ++++++++- src/tests/eo/access/meson.build | 12 ++++++++++++ src/tests/eo/children/meson.build | 12 ++++++++++++ src/tests/eo/composite_objects/meson.build | 12 ++++++++++++ src/tests/eo/constructors/meson.build | 12 ++++++++++++ src/tests/eo/function_overrides/meson.build | 12 ++++++++++++ src/tests/eo/interface/meson.build | 12 ++++++++++++ src/tests/eo/mixin/meson.build | 11 +++++++++++ src/tests/eo/signals/meson.build | 12 ++++++++++++ src/tests/eo/suite/meson.build | 13 +++++++++++++ 10 files changed, 116 insertions(+), 1 deletion(-) diff --git a/src/lib/eo/meson.build b/src/lib/eo/meson.build index e8b32c424c..1e344293ef 100644 --- a/src/lib/eo/meson.build +++ b/src/lib/eo/meson.build @@ -50,7 +50,7 @@ eo_lib = library('eo', version : meson.project_version() ) -library('eo_dbg', +eo_lib_dbg = library('eo_dbg', eo_src, pub_eo_file_target, dependencies: [eina, valgrind, dl, execinfo], install: true, @@ -65,6 +65,13 @@ eo = declare_dependency( dependencies: eo_deps + eo_pub_deps, ) +eo_dbg = declare_dependency( + include_directories: [include_directories('.')], + link_with: eo_lib_dbg, + sources : pub_eo_file_target + priv_eo_file_target, + dependencies: eo_deps + eo_pub_deps, +) + install_data(pub_eo_files + pub_eo_types_files, install_dir: join_paths(eolian_include_dir, package_version_name) ) diff --git a/src/tests/eo/access/meson.build b/src/tests/eo/access/meson.build index 79bc65f982..da7fce354f 100644 --- a/src/tests/eo/access/meson.build +++ b/src/tests/eo/access/meson.build @@ -18,3 +18,15 @@ eo_access = executable('eo_access', test('eo-access', eo_access, env : test_env ) + +eo_access = executable('eo_access_dbg', + eo_access_src, + dependencies: [eo_dbg], + c_args : [ + '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', + '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] +) + +test('eo-access-dbg', eo_access, + env : test_env +) diff --git a/src/tests/eo/children/meson.build b/src/tests/eo/children/meson.build index e740b5cc9b..ac55d805f4 100644 --- a/src/tests/eo/children/meson.build +++ b/src/tests/eo/children/meson.build @@ -15,3 +15,15 @@ eo_children = executable('eo_children', test('eo-children', eo_children, env : test_env ) + +eo_children = executable('eo_children_dbg', + eo_children_src, + dependencies: [eo_dbg], + c_args : [ + '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', + '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] +) + +test('eo-children-dbg', eo_children, + env : test_env +) diff --git a/src/tests/eo/composite_objects/meson.build b/src/tests/eo/composite_objects/meson.build index 578d4fabbc..0a47e14313 100644 --- a/src/tests/eo/composite_objects/meson.build +++ b/src/tests/eo/composite_objects/meson.build @@ -17,3 +17,15 @@ eo_composite_objects = executable('eo_composite_objects', test('eo-composite-objects', eo_composite_objects, env : test_env ) + +eo_composite_objects = executable('eo_composite_objects_dbg', + eo_composite_objects_src, + dependencies: [eo_dbg], + c_args : [ + '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', + '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] +) + +test('eo-composite-objects-dbg', eo_composite_objects, + env : test_env +) diff --git a/src/tests/eo/constructors/meson.build b/src/tests/eo/constructors/meson.build index 612c7be3ec..b90058ce5c 100644 --- a/src/tests/eo/constructors/meson.build +++ b/src/tests/eo/constructors/meson.build @@ -29,3 +29,15 @@ eo_constructors = executable('eo_constructors', test('eo-constructors', eo_constructors, env : test_env ) + +eo_constructors = executable('eo_constructors_dbg', + eo_constructors_src, + dependencies: [eo_dbg], + c_args : [ + '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', + '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] +) + +test('eo-constructors-dbg', eo_constructors, + env : test_env +) diff --git a/src/tests/eo/function_overrides/meson.build b/src/tests/eo/function_overrides/meson.build index fb2b8dcadb..b616e51cce 100644 --- a/src/tests/eo/function_overrides/meson.build +++ b/src/tests/eo/function_overrides/meson.build @@ -21,3 +21,15 @@ eo_function_overrides = executable('eo_function_overrides', test('eo-function-overrides', eo_interface, env : test_env ) + +eo_function_overrides = executable('eo_function_overrides_dbg', + eo_function_overrides_src, + dependencies: [eo_dbg], + c_args : [ + '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', + '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] +) + +test('eo-function-overrides-dbg', eo_interface, + env : test_env +) diff --git a/src/tests/eo/interface/meson.build b/src/tests/eo/interface/meson.build index 77f725734b..16b109ac1a 100644 --- a/src/tests/eo/interface/meson.build +++ b/src/tests/eo/interface/meson.build @@ -19,3 +19,15 @@ eo_interface = executable('eo_interface', test('eo-interface', eo_interface, env : test_env ) + +eo_interface = executable('eo_interface_dbg', + eo_interface_src, + dependencies: [eo_dbg], + c_args : [ + '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', + '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] +) + +test('eo-interface-dbg', eo_interface, + env : test_env +) diff --git a/src/tests/eo/mixin/meson.build b/src/tests/eo/mixin/meson.build index 5ae83a9672..3e2d73a4b9 100644 --- a/src/tests/eo/mixin/meson.build +++ b/src/tests/eo/mixin/meson.build @@ -25,3 +25,14 @@ eo_mixin = executable('eo_mixin', test('eo-mixins', eo_mixin, env : test_env ) +eo_mixin = executable('eo_mixin_dbg', + eo_mixin_src, + dependencies: [eo_dbg], + c_args : [ + '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', + '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] +) + +test('eo-mixins-dbg', eo_mixin, + env : test_env +) diff --git a/src/tests/eo/signals/meson.build b/src/tests/eo/signals/meson.build index 37006ac3fc..3786367657 100644 --- a/src/tests/eo/signals/meson.build +++ b/src/tests/eo/signals/meson.build @@ -15,3 +15,15 @@ eo_signals = executable('eo_signals', test('eo-signals', eo_signals, env : test_env ) + +eo_signals = executable('eo_signals_dbg', + eo_signals_src, + dependencies: [eo_dbg], + c_args : [ + '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', + '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] +) + +test('eo-signals-dbg', eo_signals, + env : test_env +) diff --git a/src/tests/eo/suite/meson.build b/src/tests/eo/suite/meson.build index 39f73787e7..d7f8ae3fd4 100644 --- a/src/tests/eo/suite/meson.build +++ b/src/tests/eo/suite/meson.build @@ -32,3 +32,16 @@ eo_suite = executable('eo_suite', test('eo-suite', eo_suite, env : test_env ) + +eo_suite = executable('eo_suite_dbg', + eo_suite_src, + dependencies: [eo_dbg, check, valgrind], + c_args : [ + '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', + '-DEO_DEBUG=1', + '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] +) + +test('eo-suite-dbg', eo_suite, + env : test_env +) From a57c7f751023fe1d1edeabbf8683574ac7497e5e Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 12 Feb 2019 19:54:22 +0000 Subject: [PATCH 19/87] Revert command line array object because it's broken by design Revert "ecore: get rid of commands in efl_task." This reverts commit 616381e9cfed41b83fef039b0e38c09b41fd3d7f. Revert "ecore: here comes a command line object" This reverts commit 48e5684b3c37b337edd7004e68fc0690b58a84e6. 1. this is broken: EOLIAN static const char* _efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) { return eina_strdup(pd->string_command); } it returns a const char * BUT it duplicates it on return. no. a big fat honking NO. return a char * or don't duplicate. pick. 2. _efl_core_command_line_command_array_set() is broken by design. it accepts an array of strings, but the strings are owned by the caller who creates the array (requiring they free them up themselves after this call) but the array becomes owned by the callee. the code here frees the incoming array but doesn't care about the string content of it. it's leak heaven waiting to happen (or bugs when someone wants to access the array they create to walk it to free the strings they put into it after it is set). i brought this up and it was dismissed. now exactly he issue i brought up is there with mixed ownership and the added complexity as well as transfer of some ownership but not others. go back and think about this so it isn't broken by design. --- src/Makefile_Ecore.am | 12 +- .../mono/efl_mono/efl_csharp_application.cs | 5 +- src/lib/ecore/Ecore_Eo.h | 1 - src/lib/ecore/efl_app.eo | 2 +- src/lib/ecore/efl_appthread.eo | 2 +- src/lib/ecore/efl_core_command_line.c | 267 ---------------- src/lib/ecore/efl_core_command_line.eo | 80 ----- src/lib/ecore/efl_exe.c | 4 +- src/lib/ecore/efl_exe.eo | 2 +- src/lib/ecore/efl_loop.c | 10 +- src/lib/ecore/efl_task.c | 298 ++++++++++++++++++ src/lib/ecore/efl_task.eo | 77 +++++ src/lib/ecore/efl_thread.c | 71 +++-- src/lib/ecore/efl_thread.eo | 2 +- src/lib/ecore/meson.build | 5 +- src/tests/ecore/efl_app_suite.c | 1 - src/tests/ecore/efl_app_suite.h | 1 - src/tests/ecore/efl_app_test_cml.c | 85 ----- src/tests/ecore/efl_app_test_cml.eo | 4 - src/tests/ecore/meson.build | 22 +- 20 files changed, 431 insertions(+), 520 deletions(-) delete mode 100644 src/lib/ecore/efl_core_command_line.c delete mode 100644 src/lib/ecore/efl_core_command_line.eo delete mode 100644 src/tests/ecore/efl_app_test_cml.c delete mode 100644 src/tests/ecore/efl_app_test_cml.eo diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index fd6074dec3..5f10ea7f2e 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -52,10 +52,6 @@ ecore_eolian_files_public = \ lib/ecore/efl_view_model.eo \ lib/ecore/efl_core_env.eo \ lib/ecore/efl_core_proc_env.eo \ - lib/ecore/efl_core_command_line.eo - -ecore_test_eolian_files = \ - tests/ecore/efl_app_test_cml.eo ecore_eolian_files = \ $(ecore_eolian_files_legacy) \ @@ -64,14 +60,10 @@ ecore_eolian_files = \ ecore_eolian_c = $(ecore_eolian_files:%.eo=%.eo.c) ecore_eolian_h = $(ecore_eolian_files:%.eo=%.eo.h) \ $(ecore_eolian_files_legacy:%.eo=%.eo.legacy.h) -ecore_test_c = $(ecore_test_eolian_files:%.eo=%.eo.c) -ecore_test_h = $(ecore_test_eolian_files:%.eo=%.eo.h) BUILT_SOURCES += \ $(ecore_eolian_c) \ - $(ecore_eolian_h) \ - $(ecore_test_c) \ - $(ecore_test_h) + $(ecore_eolian_h) ecoreeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@ ecoreeolianfiles_DATA = $(ecore_eolian_files_public) lib/ecore/efl_loop_timer.eo @@ -108,7 +100,6 @@ lib/ecore/ecore_job.c \ lib/ecore/ecore_main.c \ lib/ecore/ecore_event_message.c \ lib/ecore/ecore_event_message_handler.c \ -lib/ecore/efl_core_command_line.c \ lib/ecore/efl_core_env.c \ lib/ecore/efl_core_proc_env.c \ lib/ecore/efl_app.c \ @@ -348,7 +339,6 @@ tests/ecore/efl_app_test_loop.c \ tests/ecore/efl_app_test_loop_fd.c \ tests/ecore/efl_app_test_loop_timer.c \ tests/ecore/efl_app_test_promise.c \ -tests/ecore/efl_app_test_cml.c \ tests/ecore/efl_app_test_env.c \ tests/ecore/efl_app_suite.c \ tests/ecore/efl_app_suite.h diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs index 84732d3993..2b2c55c75e 100644 --- a/src/bindings/mono/efl_mono/efl_csharp_application.cs +++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs @@ -104,9 +104,8 @@ namespace Efl { public void Launch(Efl.Csharp.Components components=Components.Ui) { Init(components); Efl.App app = Efl.App.AppMain; - Eina.Array command_line = new Eina.Array(); - command_line.Append(Environment.GetCommandLineArgs()); - app.SetCommandArray(command_line); + foreach (var arg in Environment.GetCommandLineArgs()) + app.AppendArg(arg); app.ArgumentsEvt += (object sender, LoopArgumentsEvt_Args evt) => { if (evt.arg.Initialization) { OnInitialize(evt.arg.Argv); diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h index 3615219c38..348b0f5b6d 100644 --- a/src/lib/ecore/Ecore_Eo.h +++ b/src/lib/ecore/Ecore_Eo.h @@ -28,7 +28,6 @@ #include "efl_core_env.eo.h" #include "efl_core_proc_env.eo.h" -#include "efl_core_command_line.eo.h" #include "efl_loop_message.eo.h" #include "efl_loop_message_handler.eo.h" diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo index e046428626..f90324b39d 100644 --- a/src/lib/ecore/efl_app.eo +++ b/src/lib/ecore/efl_app.eo @@ -1,6 +1,6 @@ import efl_types; -class Efl.App extends Efl.Loop implements Efl.Core.Command_Line +class Efl.App extends Efl.Loop { [[ ]] data: null; diff --git a/src/lib/ecore/efl_appthread.eo b/src/lib/ecore/efl_appthread.eo index 82a9d77ace..c60308f468 100644 --- a/src/lib/ecore/efl_appthread.eo +++ b/src/lib/ecore/efl_appthread.eo @@ -1,4 +1,4 @@ -class Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line +class Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer { [[ ]] methods { diff --git a/src/lib/ecore/efl_core_command_line.c b/src/lib/ecore/efl_core_command_line.c deleted file mode 100644 index 74ae690c26..0000000000 --- a/src/lib/ecore/efl_core_command_line.c +++ /dev/null @@ -1,267 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#define EFL_CORE_COMMAND_LINE_PROTECTED - -#include - -#define MY_CLASS EFL_CORE_COMMAND_LINE_MIXIN - -typedef struct { - Eina_Bool filled; - char *string_command; - Eina_Array *command; -} Efl_Core_Command_Line_Data; - -static Eina_Array * -_unescape(const char *s) -{ - Eina_Array *args; - const char *p; - char *tmp = NULL, *d = NULL; - if (!s) return NULL; - - Eina_Bool in_quote_dbl = EINA_FALSE; - Eina_Bool in_quote = EINA_FALSE; - - args = eina_array_new(16); - if (!args) return NULL; - for (p = s; *p; p++) - { - if (!tmp) tmp = d = strdup(p); - if (tmp) - { - if (in_quote_dbl) - { - switch (*p) - { - case '\"': - in_quote_dbl = EINA_FALSE; - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - tmp = d = NULL; - break; - case '\\': - p++; - EINA_FALLTHROUGH - default: - *d = *p; - d++; - break; - } - } - else if (in_quote) - { - switch (*p) - { - case '\'': - in_quote = EINA_FALSE; - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - tmp = d = NULL; - break; - case '\\': - p++; - EINA_FALLTHROUGH - default: - *d = *p; - d++; - break; - } - } - else - { - switch (*p) - { - case ' ': - case '\t': - case '\r': - case '\n': - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - tmp = d = NULL; - break; - case '\"': - in_quote_dbl = EINA_TRUE; - break; - case '\'': - in_quote = EINA_TRUE; - break; - case '\\': - p++; - EINA_FALLTHROUGH - default: - *d = *p; - d++; - break; - } - } - } - } - if (tmp) - { - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - } - return args; -} - -static char * -_escape(const char *s) -{ - Eina_Bool need_quote = EINA_FALSE; - const char *p; - char *s2 = malloc((strlen(s) * 2) + 1 + 2), *d; - - if (!s2) return NULL; - - for (p = s; *p; p++) - { - switch (*p) - { - case '\'': - case '\"': - case '$': - case '#': - case ';': - case '&': - case '`': - case '|': - case '(': - case ')': - case '[': - case ']': - case '{': - case '}': - case '>': - case '<': - case '\n': - case '\r': - case '\t': - case ' ': - need_quote = EINA_TRUE; - default: - break; - } - } - - d = s2; - if (need_quote) - { - *d = '\"'; - d++; - } - for (p = s; *p; p++, d++) - { - switch (*p) - { - case '\\': - case '\'': - case '\"': - *d = '\\'; - d++; - EINA_FALLTHROUGH - default: - *d = *p; - break; - } - } - if (need_quote) - { - *d = '\"'; - d++; - } - *d = 0; - return s2; -} - -EOLIAN static const char* -_efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) -{ - return eina_strdup(pd->string_command); -} - -EOLIAN static Eina_Accessor* -_efl_core_command_line_command_access(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) -{ - return pd->command ? eina_array_accessor_new(pd->command) : NULL; -} - -static void -_remove_invalid_chars(char *command) -{ - for (unsigned int i = 0; i < strlen(command); ++i) - { - char c = command[i]; - if (c < 0x20 || c == 0x7f) - command[i] = '\x12'; - } -} - -EOLIAN static Eina_Bool -_efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd, Eina_Array *array) -{ - EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE); - Eina_Strbuf *command = eina_strbuf_new(); - unsigned int i = 0; - - pd->command = eina_array_new(eina_array_count(array)); - for (i = 0; i < (array ? eina_array_count(array) : 0); ++i) - { - char *content = eina_array_data_get(array, i); - char *param = calloc(1, strlen(content)); - - if (!param) - { - free(param); - while (eina_array_count(pd->command) > 0) - eina_stringshare_del(eina_array_pop(pd->command)); - eina_array_free(pd->command); - pd->command = NULL; - eina_array_free(array); - return EINA_FALSE; - } - - //build the command - if (i != 0) - eina_strbuf_append(command, " "); - eina_strbuf_append(command, _escape(content)); - //convert string to stringshare - strcpy(param, content); - _remove_invalid_chars(param); - eina_array_push(pd->command, eina_stringshare_add(param)); - free(param); - } - pd->string_command = eina_strbuf_release(command); - pd->filled = EINA_TRUE; - eina_array_free(array); - - return EINA_TRUE; -} - -EOLIAN static Eina_Bool -_efl_core_command_line_command_string_set(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd, const char *str) -{ - EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE); - - pd->string_command = eina_strdup(str); - _remove_invalid_chars(pd->string_command); - pd->command = _unescape(str); - if (!pd->command) - { - if (pd->string_command) - free(pd->string_command); - pd->string_command = NULL; - return EINA_FALSE; - } - pd->filled = EINA_TRUE; - - return EINA_TRUE; -} - -#include "efl_core_command_line.eo.c" diff --git a/src/lib/ecore/efl_core_command_line.eo b/src/lib/ecore/efl_core_command_line.eo deleted file mode 100644 index 1cbb020856..0000000000 --- a/src/lib/ecore/efl_core_command_line.eo +++ /dev/null @@ -1,80 +0,0 @@ -mixin Efl.Core.Command_Line { - [[A mixin that implements standard functions for command lines. - - This object parses the command line that gets passed, later the object can be accessed via accessor or the string directly. - ]] - methods { - @property command { - [[ A commandline that encodes arguments in a command string. - This command is unix shell-style, thus whitespace separates - arguments unless escaped. Also a semi-colon ';', ampersand - '&', pipe/bar '|', hash '#', bracket, square brace, brace - character ('(', ')', '[', ']', '{', '}'), exclamation - mark '!', backquote '`', greator or less than ('>' '<') - character unless escaped or in quotes would cause - args_count/value to not be generated properly, because - it would force complex shell interpretation which - will not be supported in evaluating the arg_count/value - information, but the final shell may interpret this if this - is executed via a command-line shell. To not be a complex - shell command, it should be simple with paths, options - and variable expansions, but nothing more complex involving - the above unescaped characters. - - "cat -option /path/file" - "cat 'quoted argument'" - "cat ~/path/escaped\ argument" - "/bin/cat escaped\ argument $VARIABLE" - etc. - - It should not try and use "complex shell features" if you - want the arg_count and arg_value set to be correct after - setting the command string. For example none of: - - "VAR=x /bin/command && /bin/othercommand >& /dev/null" - "VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &" - etc. - - If you set the command the arg_count/value property contents - can change and be completely re-evaluated by parsing the - command string into an argument array set along with - interpreting escapes back into individual argument strings. - ]] - get { - - } - values { - commandline : string; - } - } - command_access { - [[ Get the accessor which enables access to each argument that got passed to this object. ]] - return : accessor; - } - @property command_array { - [[ Use an array to fill this object - - Every element of a string is a argument. - ]] - set { - return : bool; [[On success $true, $false otherwise]] - } - values { - array : array @owned; [[An array where every array field is an argument]] - } - } - @property command_string { - [[ Use a string to fill this object - - The string will be split at every unescaped ' ', every resulting substring will be a new argument to the command line. - ]] - set { - return : bool; [[On success $true, $false otherwise]] - } - values { - str : string; [[A command in form of a string]] - } - - } - } -} diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c index 61ff4ba798..4b3bc658d6 100644 --- a/src/lib/ecore/efl_exe.c +++ b/src/lib/ecore/efl_exe.c @@ -395,7 +395,7 @@ _efl_exe_efl_task_priority_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) } EOLIAN static Eina_Future * -_efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd) +_efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) { #ifdef _WIN32 return EINA_FALSE; @@ -414,7 +414,7 @@ _efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd) if (!td) return NULL; // get a cmdline to run - cmd = efl_core_command_line_command_get(obj); + cmd = efl_task_command_get(obj); if (!cmd) return NULL; ret = pipe(pipe_exited); diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index b7f97da7dc..111814af21 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -19,7 +19,7 @@ enum Efl.Exe_Flags { hide_io = 4 } -class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer,Efl.Core.Command_Line +class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer { [[ ]] methods { diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index cf8600c998..68f9573b76 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -383,19 +383,17 @@ _efl_loop_arguments_cleanup(Eo *o EINA_UNUSED, void *data, const Eina_Future *de EAPI void ecore_loop_arguments_send(int argc, const char **argv) { - Eina_Array *arga, *cml; + Eina_Array *arga; int i = 0; + efl_task_arg_reset(efl_main_loop_get()); arga = eina_array_new(argc); - cml = eina_array_new(argc); for (i = 0; i < argc; i++) { - Eina_Stringshare *arg = eina_stringshare_add(argv[i]); - eina_array_push(arga, arg); - eina_array_push(cml, arg); + eina_array_push(arga, eina_stringshare_add(argv[i])); + efl_task_arg_append(efl_main_loop_get(), argv[i]); } - efl_core_command_line_command_array_set(efl_app_main_get(EFL_APP_CLASS), cml); efl_future_then(efl_main_loop_get(), efl_loop_job(efl_main_loop_get()), .success = _efl_loop_arguments_send, .free = _efl_loop_arguments_cleanup, diff --git a/src/lib/ecore/efl_task.c b/src/lib/ecore/efl_task.c index d610fcbf8b..311de0506a 100644 --- a/src/lib/ecore/efl_task.c +++ b/src/lib/ecore/efl_task.c @@ -12,6 +12,303 @@ ////////////////////////////////////////////////////////////////////////// +static void +_clear_args(Efl_Task_Data *pd) +{ + unsigned int count, i; + + if (!pd->args) return; + count = eina_array_count(pd->args); + for (i = 0; i < count; i++) + eina_stringshare_del(eina_array_data_get(pd->args, i)); + eina_array_free(pd->args); + pd->args = NULL; +} + +static Eina_Array * +_unescape(const char *s) +{ + Eina_Array *args; + const char *p; + char *tmp = NULL, *d = NULL; + if (!s) return NULL; + + Eina_Bool in_quote_dbl = EINA_FALSE; + Eina_Bool in_quote = EINA_FALSE; + + args = eina_array_new(16); + if (!args) return NULL; + for (p = s; *p; p++) + { + if (!tmp) tmp = d = strdup(p); + if (tmp) + { + if (in_quote_dbl) + { + switch (*p) + { + case '\"': + in_quote_dbl = EINA_FALSE; + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + tmp = d = NULL; + break; + case '\\': + p++; + EINA_FALLTHROUGH + default: + *d = *p; + d++; + break; + } + } + else if (in_quote) + { + switch (*p) + { + case '\'': + in_quote = EINA_FALSE; + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + tmp = d = NULL; + break; + case '\\': + p++; + EINA_FALLTHROUGH + default: + *d = *p; + d++; + break; + } + } + else + { + switch (*p) + { + case ' ': + case '\t': + case '\r': + case '\n': + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + tmp = d = NULL; + break; + case '\"': + in_quote_dbl = EINA_TRUE; + break; + case '\'': + in_quote = EINA_TRUE; + break; + case '\\': + p++; + EINA_FALLTHROUGH + default: + *d = *p; + d++; + break; + } + } + } + } + if (tmp) + { + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + } + return args; +} + +static char * +_escape(const char *s) +{ + Eina_Bool need_quote = EINA_FALSE; + const char *p; + char *s2 = malloc((strlen(s) * 2) + 1 + 2), *d; + + if (!s2) return NULL; + + for (p = s; *p; p++) + { + switch (*p) + { + case '\'': + case '\"': + case '$': + case '#': + case ';': + case '&': + case '`': + case '|': + case '(': + case ')': + case '[': + case ']': + case '{': + case '}': + case '>': + case '<': + case '\n': + case '\r': + case '\t': + need_quote = EINA_TRUE; + default: + break; + } + } + + d = s2; + if (need_quote) + { + *d = '\"'; + d++; + } + for (p = s; *p; p++, d++) + { + switch (*p) + { + case ' ': + case '\\': + case '\'': + case '\"': + *d = '\\'; + d++; + EINA_FALLTHROUGH + default: + *d = *p; + break; + } + } + if (need_quote) + { + *d = '\"'; + d++; + } + *d = 0; + return s2; +} + +static void +_rebuild_command(Efl_Task_Data *pd) +{ + unsigned int count, i; + Eina_Strbuf *sb; + const char *arg, *cmd; + Eina_Bool have_args = EINA_FALSE; + + if (!pd->command_dirty) return; + pd->command_dirty = EINA_FALSE; + eina_stringshare_del(pd->command); + pd->command = NULL; + if (!pd->args) return; + sb = eina_strbuf_new(); + if (!sb) return; + count = eina_array_count(pd->args); + for (i = 0; i < count; i++) + { + arg = eina_array_data_get(pd->args, i); + if (arg) + { + char *str = _escape(arg); + if (str) + { + if (have_args) eina_strbuf_append(sb, " "); + eina_strbuf_append(sb, str); + free(str); + have_args = EINA_TRUE; + } + } + } + cmd = eina_strbuf_string_get(sb); + if (cmd) pd->command = eina_stringshare_add(cmd); + eina_strbuf_free(sb); +} + +////////////////////////////////////////////////////////////////////////// + +EOLIAN static void +_efl_task_command_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *command) +{ + eina_stringshare_replace(&pd->command, command); + _clear_args(pd); + pd->args = _unescape(pd->command); +} + +EOLIAN static const char * +_efl_task_command_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd) +{ + _rebuild_command(pd); + return pd->command; +} + +EOLIAN static unsigned int +_efl_task_arg_count_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd) +{ + if (!pd->args) return 0; + return eina_array_count(pd->args); +} + +EOLIAN static void +_efl_task_arg_value_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, unsigned int num, const char *arg) +{ + const char *parg = NULL; + unsigned int count; + + if (!pd->args) pd->args = eina_array_new(16); + count = eina_array_count(pd->args); + if ((count > 0) && (count > num)) + parg = eina_array_data_get(pd->args, num); + else + { + unsigned int i; + + for (i = count; i <= num; i++) + { + eina_array_push(pd->args, ""); + eina_array_data_set(pd->args, i, NULL); + } + } + + if (arg) + eina_array_data_set(pd->args, num, eina_stringshare_add(arg)); + else + eina_array_data_set(pd->args, num, NULL); + if (parg) eina_stringshare_del(parg); + pd->command_dirty = EINA_TRUE; +} + +EOLIAN static const char * +_efl_task_arg_value_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd, unsigned int num) +{ + unsigned int count; + + if (!pd->args) return NULL; + count = eina_array_count(pd->args); + if (num >= count) return NULL; + return eina_array_data_get(pd->args, num); +} + +EOLIAN static void +_efl_task_arg_append(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *arg) +{ + if (!pd->args) pd->args = eina_array_new(16); + if (arg) + eina_array_push(pd->args, eina_stringshare_add(arg)); + else + eina_array_push(pd->args, NULL); + pd->command_dirty = EINA_TRUE; +} + +EOLIAN static void +_efl_task_arg_reset(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) +{ + _clear_args(pd); + pd->command_dirty = EINA_TRUE; +} + EOLIAN static void _efl_task_priority_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, Efl_Task_Priority priority) { @@ -47,6 +344,7 @@ _efl_task_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) { eina_stringshare_del(pd->command); pd->command = NULL; + _clear_args(pd); efl_destructor(efl_super(obj, MY_CLASS)); } diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index ddab5e6826..526746ff60 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -19,6 +19,83 @@ abstract Efl.Task extends Efl.Object { [[ ]] methods { + @property command { + [[ A commandline that encodes arguments in a command string. + This command is unix shell-style, thus whitespace separates + arguments unless escaped. Also a semi-colon ';', ampersand + '&', pipe/bar '|', hash '#', bracket, square brace, brace + character ('(', ')', '[', ']', '{', '}'), exclamation + mark '!', backquote '`', greator or less than ('>' '<') + character unless escaped or in quotes would cause + args_count/value to not be generated properly, because + it would force complex shell interpretation which + will not be supported in evaluating the arg_count/value + information, but the final shell may interpret this if this + is executed via a command-line shell. To not be a complex + shell command, it should be simple with paths, options + and variable expansions, but nothing more complex involving + the above unescaped characters. + + "cat -option /path/file" + "cat 'quoted argument'" + "cat ~/path/escaped\ argument" + "/bin/cat escaped\ argument $VARIABLE" + etc. + + It should not try and use "complex shell features" if you + want the arg_count and arg_value set to be correct after + setting the command string. For example none of: + + "VAR=x /bin/command && /bin/othercommand >& /dev/null" + "VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &" + etc. + + If you set the command the arg_count/value property contents + can change and be completely re-evaluated by parsing the + command string into an argument array set along with + interpreting escapes back into individual argument strings. ]] + get { } + set { } + values { + command: string; [[ The command string as described ]] + } + } + @property arg_count { + [[ Number of arguments passed in or arguments that are to be + passed as sepcified by arg_value ]] + get { } + values { + args: uint; [[ ]] + } + } + @property arg_value { + [[ Argument number by index. If the index does not exist when + set, it is allocated and created. Getting an argument that + Has not been set yet will return $NULL. Empty arguments will + Be ignored. Setting an argument will result in the command + porperty being re-evaluated and escaped into a single + command string if needed. ]] + set { } + get { } + keys { + num: uint; [[ ]] + } + values { + arg: string; [[ ]] + } + } + arg_append { + [[ Append a new string argument at the end of the arg set. + This functions like setting an arg_value at the end of the + current set so the set increases by 1 in size. ]] + params { + arg: string; [[ ]] + } + } + arg_reset { + [[ Clear all arguments in arg_value/count set. Will result in the + command property also being cleared. ]] + } @property priority { [[ The priority of this task. ]] get { } diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c index a324af4f58..4d48296093 100644 --- a/src/lib/ecore/efl_thread.c +++ b/src/lib/ecore/efl_thread.c @@ -25,7 +25,10 @@ typedef struct int in, out; Eo *in_handler, *out_handler; } fd, ctrl; - Eina_Array *argv; + struct { + unsigned int argc; + const char **argv; + } args; Efl_Callback_Array_Item_Full *event_cb; void *indata, *outdata; } Thread_Data; @@ -148,16 +151,16 @@ _efl_loop_arguments_send(Eo *obj, void *data EINA_UNUSED, const Eina_Value v) Efl_Loop_Arguments arge; Eina_Array *arga; Eina_Stringshare *s; - Eina_Accessor *accessor; - const char *argv; - int i = 0; + unsigned int argc = efl_task_arg_count_get(obj); + unsigned int i; - accessor = efl_core_command_line_command_access(obj); - arga = eina_array_new(10); + arga = eina_array_new(argc); - EINA_ACCESSOR_FOREACH(accessor, i, argv) + for (i = 0; i < argc; i++) { - eina_array_push(arga, eina_stringshare_add(argv)); + const char *argv = efl_task_arg_value_get(obj, i); + if (argv) + eina_array_push(arga, eina_stringshare_add(argv)); } arge.argv = arga; arge.initialization = EINA_TRUE; @@ -226,6 +229,7 @@ _efl_thread_main(void *data, Eina_Thread t) Eo *obj; Eina_Value *ret; Control_Data cmd; + unsigned int i; int real; Efl_Callback_Array_Item_Full *it; @@ -276,13 +280,16 @@ _efl_thread_main(void *data, Eina_Thread t) efl_event_callback_priority_add(obj, it->desc, it->priority, it->func, it->user_data); } - efl_core_command_line_command_array_set(obj, thdat->argv); + for (i = 0; i < thdat->args.argc; i++) + efl_task_arg_append(obj, thdat->args.argv[i]); efl_future_then(obj, efl_loop_job(obj), .success = _efl_loop_arguments_send); - while (thdat->argv && eina_array_count(thdat->argv)) free(eina_array_pop(thdat->argv)); - eina_array_free(thdat->argv); + for (i = 0; i < thdat->args.argc; i++) + eina_stringshare_del(thdat->args.argv[i]); + free(thdat->args.argv); free(thdat->event_cb); + thdat->args.argv = NULL; thdat->event_cb = NULL; ret = efl_loop_begin(obj); @@ -568,7 +575,7 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) const char *name; int pipe_to_thread[2]; int pipe_from_thread[2]; - unsigned int num; + unsigned int argc, i, num; Efl_Callback_Array_Item_Full *it; Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); @@ -722,23 +729,24 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) name = efl_name_get(obj); if (name) thdat->name = eina_stringshare_add(name); - { - Eina_Accessor *acc; - int i = 0; - const char *argv; - - acc = efl_core_command_line_command_access(obj); - if (acc) - { - thdat->argv = eina_array_new(0); - EINA_ACCESSOR_FOREACH(acc, i, argv) - { - eina_array_push(thdat->argv, eina_stringshare_add(argv)); - } - } - - } - + argc = efl_task_arg_count_get(obj); + if (argc > 0) + { + thdat->args.argc = argc; + thdat->args.argv = malloc(argc * sizeof(char *)); + if (thdat->args.argv) + { + for (i = 0; i < argc; i++) + { + const char *argv = efl_task_arg_value_get(obj, i); + if (argv) + thdat->args.argv[i] = eina_stringshare_add(argv); + else + thdat->args.argv[i] = NULL; + } + } + // XXX: if malloc fails? + } if (pd->event_cb) { num = 0; @@ -754,8 +762,9 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) if (!eina_thread_create(&(pd->thread), pri, -1, _efl_thread_main, thdat)) { - while (eina_array_count(thdat->argv)) eina_stringshare_del(eina_array_pop(thdat->argv)); - eina_array_free(thdat->argv); + for (i = 0; i < thdat->args.argc; i++) + eina_stringshare_del(thdat->args.argv[i]); + free(thdat->args.argv); efl_del(pd->fd.in_handler); efl_del(pd->fd.out_handler); efl_del(pd->ctrl.in_handler); diff --git a/src/lib/ecore/efl_thread.eo b/src/lib/ecore/efl_thread.eo index 02bf2f15df..7837c7bfdb 100644 --- a/src/lib/ecore/efl_thread.eo +++ b/src/lib/ecore/efl_thread.eo @@ -1,4 +1,4 @@ -class Efl.Thread extends Efl.Task implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line +class Efl.Thread extends Efl.Task implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer { methods { } diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build index 2e44804481..98909cb618 100644 --- a/src/lib/ecore/meson.build +++ b/src/lib/ecore/meson.build @@ -76,8 +76,7 @@ pub_eo_files = [ 'efl_composite_model.eo', 'efl_view_model.eo', 'efl_core_env.eo', - 'efl_core_proc_env.eo', - 'efl_core_command_line.eo', + 'efl_core_proc_env.eo' ] foreach eo_file : pub_eo_files @@ -181,12 +180,10 @@ ecore_src = [ 'ecore_main_common.h', 'efl_exe.c', 'efl_thread.c', - 'efl_appthread.c', 'efl_threadio.c', 'efl_appthread.c', 'efl_core_env.c', 'efl_core_proc_env.c', - 'efl_core_command_line.c', ] if sys_windows == true diff --git a/src/tests/ecore/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c index 2cab632622..cd26e2d95e 100644 --- a/src/tests/ecore/efl_app_suite.c +++ b/src/tests/ecore/efl_app_suite.c @@ -53,7 +53,6 @@ static const Efl_Test_Case etc[] = { { "Promise", efl_app_test_promise_3 }, { "Promise", efl_app_test_promise_safety }, { "Env", efl_test_efl_env }, - { "CML", efl_test_efl_cml }, { NULL, NULL } }; diff --git a/src/tests/ecore/efl_app_suite.h b/src/tests/ecore/efl_app_suite.h index 874d2bb503..3a66dcdfcf 100644 --- a/src/tests/ecore/efl_app_suite.h +++ b/src/tests/ecore/efl_app_suite.h @@ -12,6 +12,5 @@ void efl_app_test_promise_2(TCase *tc); void efl_app_test_promise_3(TCase *tc); void efl_app_test_promise_safety(TCase *tc); void efl_test_efl_env(TCase *tc); -void efl_test_efl_cml(TCase *tc); #endif /* _EFL_APP_SUITE_H */ diff --git a/src/tests/ecore/efl_app_test_cml.c b/src/tests/ecore/efl_app_test_cml.c deleted file mode 100644 index 1b7cebf552..0000000000 --- a/src/tests/ecore/efl_app_test_cml.c +++ /dev/null @@ -1,85 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#define EFL_CORE_COMMAND_LINE_PROTECTED - -#include -#include -#define EFL_NOLEGACY_API_SUPPORT -#include -#include "efl_app_suite.h" -#include "../efl_check.h" - -typedef struct { - -} Efl_App_Test_CML_Data; - -#include "efl_app_test_cml.eo.h" -#include "efl_app_test_cml.eo.c" - -static Eina_Array* -_construct_array(void) -{ - Eina_Array *array = eina_array_new(16); - - eina_array_push(array, "/bin/sh"); - eina_array_push(array, "-C"); - eina_array_push(array, "foo"); - eina_array_push(array, "--test"); - eina_array_push(array, "--option=done"); - eina_array_push(array, "--"); - eina_array_push(array, "asdf --test"); - return array; -} - -static const char* -_construct_string(void) -{ - return "/bin/sh -C foo --test --option=done -- \"asdf --test\""; -} - -EFL_START_TEST(efl_core_cml_string) -{ - Efl_App_Test_CML *cml = efl_add_ref(EFL_APP_TEST_CML_CLASS, NULL); - Eina_Array *content = _construct_array(); - Eina_Stringshare *str; - Eina_Bool b; - int i = 0; - - b = efl_core_command_line_command_string_set(cml, _construct_string()); - ck_assert_int_ne(b, 0); - - EINA_ACCESSOR_FOREACH(efl_core_command_line_command_access(cml), i, str) - { - ck_assert_str_eq(eina_array_data_get(content, i), str); - } - ck_assert_str_eq(efl_core_command_line_command_get(cml), _construct_string()); -} -EFL_END_TEST - -EFL_START_TEST(efl_core_cml_array) -{ - Efl_App_Test_CML *cml = efl_add_ref(EFL_APP_TEST_CML_CLASS, NULL); - Eina_Array *content1 = _construct_array(); - Eina_Array *content2 = _construct_array(); - Eina_Stringshare *str; - Eina_Bool b; - int i = 0; - - b = efl_core_command_line_command_array_set(cml, content1); - ck_assert_int_ne(b, 0); - - EINA_ACCESSOR_FOREACH(efl_core_command_line_command_access(cml), i, str) - { - ck_assert_str_eq(eina_array_data_get(content2, i), str); - } - ck_assert_str_eq(efl_core_command_line_command_get(cml), _construct_string()); -} -EFL_END_TEST - -void efl_test_efl_cml(TCase *tc) -{ - tcase_add_test(tc, efl_core_cml_string); - tcase_add_test(tc, efl_core_cml_array); -} diff --git a/src/tests/ecore/efl_app_test_cml.eo b/src/tests/ecore/efl_app_test_cml.eo deleted file mode 100644 index b0877e0cf7..0000000000 --- a/src/tests/ecore/efl_app_test_cml.eo +++ /dev/null @@ -1,4 +0,0 @@ -class Efl.App.Test.CML extends Efl.Object implements Efl.Core.Command_Line -{ - -} diff --git a/src/tests/ecore/meson.build b/src/tests/ecore/meson.build index c49d941355..e3b4f6c851 100644 --- a/src/tests/ecore/meson.build +++ b/src/tests/ecore/meson.build @@ -76,32 +76,14 @@ efl_app_suite_src = [ 'efl_app_test_loop_fd.c', 'efl_app_test_loop_timer.c', 'efl_app_test_promise.c', - 'efl_app_test_env.c', - 'efl_app_test_cml.c', + 'efl_app_test_env.c' ] -priv_eo_files = [ - 'efl_app_test_cml.eo', -] - -priv_eo_file_target = [] -foreach eo_file : priv_eo_files - priv_eo_file_target += custom_target('eolian_gen_' + eo_file, - input : eo_file, - output : [eo_file + '.h'], - depfile : eo_file + '.d', - command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories, - '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), - '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), - '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'), - '-gchd', '@INPUT@']) -endforeach - efl_app_suite_deps = [m] efl_app_suite_deps += ecore efl_app_suite = executable('efl_app_suite', - efl_app_suite_src, priv_eo_file_target, + efl_app_suite_src, dependencies: [efl_app_suite_deps, check], c_args : [ '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', From d6294fa22b88187e44391c1c8ca64b1ebdf14533 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 12 Feb 2019 20:11:44 +0000 Subject: [PATCH 20/87] Revert the env object because it's broken portability - please redo setenv and unsetenv are not portable. i explained to you at fosdem there are issues and it's why i used putenv in the original implementation and even though it's a pain (the string tou pass to putenv is a pointer used literallt from there on in and you get it from getenv, thus making ownership a pain -this is a libc issue we can't readily solve). use putenv like the original code. then put it back in. vtorri now has windows porting issues with the setenv use. i knew there was a reason that still existed... in addition your in_sync stuff is broken. psuedocode: // assuming BLAGH env is not set to anything here c = efl_core_env_get(global_env, "BLAH"); ... putenv("BLAH=10"); ... c = efl_core_env_Get(global_env, "BLAH"); i will get NULL in both cases for c ... but i should get "10" for the 2nd in reality. reality is lots of code across application code and libraries will at times mess with the environment. it has to work with this. the prior implementation did work with this. Revert "ecore: here comes a env object" This reverts commit 2373d5db5b4cd5dfe139aa2a10017ef61b28b5ce. Revert "efl_task: remove env from this object" This reverts commit c3d69f66a69c0def357a5c373a13343e1c01ff5d. --- header_checks/meson.build | 3 +- meson.build | 1 - src/Makefile_Ecore.am | 7 +- src/lib/ecore/Ecore_Eo.h | 3 - src/lib/ecore/ecore_private.h | 1 + src/lib/ecore/efl_core_env.c | 2 +- src/lib/ecore/efl_core_env.eo | 57 --------- src/lib/ecore/efl_core_proc_env.c | 145 ---------------------- src/lib/ecore/efl_core_proc_env.eo | 21 ---- src/lib/ecore/efl_exe.c | 67 ++++------ src/lib/ecore/efl_exe.eo | 17 --- src/lib/ecore/efl_loop.c | 189 +++++++++++++++++++++++++++++ src/lib/ecore/efl_loop.eo | 2 + src/lib/ecore/efl_task.c | 62 +++++++++- src/lib/ecore/efl_task.eo | 20 +++ src/lib/ecore/meson.build | 6 +- src/tests/ecore/efl_app_suite.c | 2 +- src/tests/ecore/efl_app_suite.h | 1 - src/tests/ecore/efl_app_test_env.c | 135 --------------------- src/tests/ecore/meson.build | 3 +- 20 files changed, 305 insertions(+), 439 deletions(-) delete mode 100644 src/lib/ecore/efl_core_env.eo delete mode 100644 src/lib/ecore/efl_core_proc_env.c delete mode 100644 src/lib/ecore/efl_core_proc_env.eo delete mode 100644 src/tests/ecore/efl_app_test_env.c diff --git a/header_checks/meson.build b/header_checks/meson.build index 066d228a83..b23e774ec1 100644 --- a/header_checks/meson.build +++ b/header_checks/meson.build @@ -53,8 +53,7 @@ header_checks = [ 'langinfo.h', 'locale.h', 'uv.h', - 'ws2tcpip.h', - 'crt_externs.h' + 'ws2tcpip.h' ] function_checks = [ diff --git a/meson.build b/meson.build index d6b9b6074d..0e2a50c2c9 100644 --- a/meson.build +++ b/meson.build @@ -210,7 +210,6 @@ elif sys_osx == true sys_lib_extension = 'dylib' sys_exe_extension = '' sys_mod_extension = 'dylib' - config_h.set('environ', '(*_NSGetEnviron())') else error('System '+host_machine.system()+' not known') endif diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 5f10ea7f2e..7bc8e43b74 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -49,9 +49,7 @@ ecore_eolian_files_public = \ lib/ecore/efl_boolean_model.eo \ lib/ecore/efl_select_model.eo \ lib/ecore/efl_composite_model.eo \ - lib/ecore/efl_view_model.eo \ - lib/ecore/efl_core_env.eo \ - lib/ecore/efl_core_proc_env.eo \ + lib/ecore/efl_view_model.eo ecore_eolian_files = \ $(ecore_eolian_files_legacy) \ @@ -100,8 +98,6 @@ lib/ecore/ecore_job.c \ lib/ecore/ecore_main.c \ lib/ecore/ecore_event_message.c \ lib/ecore/ecore_event_message_handler.c \ -lib/ecore/efl_core_env.c \ -lib/ecore/efl_core_proc_env.c \ lib/ecore/efl_app.c \ lib/ecore/efl_loop.c \ lib/ecore/efl_loop_consumer.c \ @@ -339,7 +335,6 @@ tests/ecore/efl_app_test_loop.c \ tests/ecore/efl_app_test_loop_fd.c \ tests/ecore/efl_app_test_loop_timer.c \ tests/ecore/efl_app_test_promise.c \ -tests/ecore/efl_app_test_env.c \ tests/ecore/efl_app_suite.c \ tests/ecore/efl_app_suite.h diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h index 348b0f5b6d..6a21ff5ea7 100644 --- a/src/lib/ecore/Ecore_Eo.h +++ b/src/lib/ecore/Ecore_Eo.h @@ -26,9 +26,6 @@ * @{ */ -#include "efl_core_env.eo.h" -#include "efl_core_proc_env.eo.h" - #include "efl_loop_message.eo.h" #include "efl_loop_message_handler.eo.h" diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index 4e980d9123..c29f73d189 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -188,6 +188,7 @@ struct _Efl_Task_Data { Eina_Stringshare *command; Eina_Array *args; + Eina_Hash *env; Efl_Task_Priority priority; int exit_code; Efl_Task_Flags flags; diff --git a/src/lib/ecore/efl_core_env.c b/src/lib/ecore/efl_core_env.c index e0ee5a25e3..38fc9ba1a9 100644 --- a/src/lib/ecore/efl_core_env.c +++ b/src/lib/ecore/efl_core_env.c @@ -26,7 +26,7 @@ key_valid(const char *key) { if (!key || key[0] == '\0') return EINA_FALSE; - if (isdigit(key[0])) return EINA_FALSE; + if isdigit(key[0]) return EINA_FALSE; for (int i = 0; key[i] != '\0'; ++i) { if (!isalnum(key[i]) && key[i] != '_') return EINA_FALSE; diff --git a/src/lib/ecore/efl_core_env.eo b/src/lib/ecore/efl_core_env.eo deleted file mode 100644 index 86da8c14ff..0000000000 --- a/src/lib/ecore/efl_core_env.eo +++ /dev/null @@ -1,57 +0,0 @@ -class Efl.Core.Env extends Efl.Object implements Efl.Duplicate { - [[This object can maintain a set of key value pairs - - A object of this type alone does not apply the object to the system. - For getting the value into the system, see @Efl.Core.Proc_Env. - - A object can be forked, which will only copy its values, changes to the returned object will not change the object where it is forked off. - ]] - methods { - @property env { - [[ Stored var value pairs of this object. - - Var must contain only: underscores ('_'), letters ('a-z', 'A-Z'), - numbers ('0-9'), but the first character may not be a number. - ]] - set { - [[ Add a new pair to this object ]] - } - get { - [[ Get the value of the $var, or $null if no such $var exists in the object]] - } - keys { - var: string; [[ The name of the variable ]] - } - values { - value: string; [[ Set var to this value if not $NULL, - otherwise clear this env value if value - is $NULL or if it is an empty string ]] - } - } - unset { - [[ Remove the pair with the matching $var from this object]] - params { - var : string; [[ The name of the variable ]] - } - } - clear { - [[ Remove all pairs from this object]] - } - @property content { - [[ Get the content of this object. - - This will return a iterator that contains all keys that are part of this object. - ]] - get { - - } - values { - iter : iterator; - } - } - } - implements { - Efl.Object.constructor; - Efl.Duplicate.duplicate; - } -} diff --git a/src/lib/ecore/efl_core_proc_env.c b/src/lib/ecore/efl_core_proc_env.c deleted file mode 100644 index 846b69a350..0000000000 --- a/src/lib/ecore/efl_core_proc_env.c +++ /dev/null @@ -1,145 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#ifdef HAVE_CRT_EXTERNS_H -# include -#endif -#include "ecore_private.h" - -#define MY_CLASS EFL_CORE_PROC_ENV_CLASS - -static Efl_Core_Env *env = NULL; - -typedef struct { - Eina_Bool in_sync; -} Efl_Core_Proc_Env_Data; - -static void -_sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd) -{ - Eina_List *existing_keys = NULL, *n; - Eina_Iterator *content; - const char *key; - - pd->in_sync = EINA_TRUE; - content = efl_core_env_content_get(obj); - - EINA_ITERATOR_FOREACH(content, key) - { - existing_keys = eina_list_append(existing_keys, key); - } - - if (environ) - { - char **p; - - for (p = environ; *p; p++) - { - char **values; - - values = eina_str_split(*p, "=", 2); - efl_core_env_set(obj, values[0], values[1]); - - EINA_LIST_FOREACH(existing_keys, n, key) - { - if (!strcmp(key, values[0])) - { - existing_keys = eina_list_remove_list(existing_keys, n); - break; - } - } - } - } - EINA_LIST_FOREACH(existing_keys, n, key) - { - efl_core_env_unset(obj, key); - } - pd->in_sync = EINA_FALSE; -} - -EOLIAN static const char* -_efl_core_proc_env_efl_core_env_env_get(const Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *var) -{ - if (!pd->in_sync) - _sync((Eo*)obj, pd); - return efl_core_env_get(efl_super(obj, MY_CLASS), var); -} - -EOLIAN static void -_efl_core_proc_env_efl_core_env_env_set(Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *var, const char *value) -{ - efl_core_env_set(efl_super(obj, MY_CLASS), var, value); - if (!pd->in_sync) - { - if (value) - setenv(var, value, 1); - else - unsetenv(var); - } -} - -EOLIAN static void -_efl_core_proc_env_efl_core_env_unset(Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *key) -{ - efl_core_env_unset(efl_super(obj, MY_CLASS), key); - if (!pd->in_sync) - { - unsetenv(key); - } -} - -EOLIAN static void -_efl_core_proc_env_efl_core_env_clear(Eo *obj, Efl_Core_Proc_Env_Data *pd) -{ - efl_core_env_clear(efl_super(obj, MY_CLASS)); - if (!pd->in_sync) - { -#ifdef HAVE_CLEARENV - clearenv(); -#else - environ = NULL; -#endif - } -} - - -EOLIAN static Efl_Duplicate* -_efl_core_proc_env_efl_duplicate_duplicate(const Eo *obj, Efl_Core_Proc_Env_Data *pd) -{ - if (!pd->in_sync) - _sync((Eo*) obj, pd); - return efl_duplicate(efl_super(obj, MY_CLASS)); -} - -EOLIAN static Eina_Iterator* -_efl_core_proc_env_efl_core_env_content_get(const Eo *obj, Efl_Core_Proc_Env_Data *pd) -{ - if (!pd->in_sync) - _sync((Eo*) obj, pd); - return efl_core_env_content_get(efl_super(obj, MY_CLASS)); -} - -EOLIAN static Efl_Object* -_efl_core_proc_env_efl_object_constructor(Eo *obj, Efl_Core_Proc_Env_Data *pd EINA_UNUSED) -{ - EINA_SAFETY_ON_TRUE_RETURN_VAL(!!env, NULL); - - obj = efl_constructor(efl_super(obj, MY_CLASS)); - return obj; -} - -EOLIAN static Efl_Core_Env* -_efl_core_proc_env_self(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED) -{ - if (!env) - { - env = efl_add_ref(EFL_CORE_PROC_ENV_CLASS, NULL); - efl_wref_add(env, &env); - } - - return env; -} - -#include "efl_core_proc_env.eo.c" diff --git a/src/lib/ecore/efl_core_proc_env.eo b/src/lib/ecore/efl_core_proc_env.eo deleted file mode 100644 index 23c2c67d75..0000000000 --- a/src/lib/ecore/efl_core_proc_env.eo +++ /dev/null @@ -1,21 +0,0 @@ -class Efl.Core.Proc_Env extends Efl.Core.Env -{ - eo_prefix : efl_env; - methods { - self @class { - [[Get a instance of this object - - The object will apply the environment operations onto this process. - ]] - return : Efl.Core.Env; - } - } - implements { - Efl.Core.Env.env { set; get; } - Efl.Core.Env.content { get; } - Efl.Core.Env.unset; - Efl.Core.Env.clear; - Efl.Duplicate.duplicate; - Efl.Object.constructor; - } -} diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c index 4b3bc658d6..a6f9f5f506 100644 --- a/src/lib/ecore/efl_exe.c +++ b/src/lib/ecore/efl_exe.c @@ -40,7 +40,6 @@ typedef struct _Efl_Exe_Data Efl_Exe_Data; struct _Efl_Exe_Data { - Efl_Core_Env *env; int exit_signal; Efl_Exe_Flags flags; #ifdef _WIN32 @@ -166,6 +165,22 @@ _exec(const char *cmd, Efl_Exe_Flags flags) } } +static Eina_Bool +_foreach_env(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata EINA_UNUSED) +{ + int keylen; + char *buf, *s; + + if (!data) return EINA_TRUE; + keylen = strlen(key); + buf = alloca(keylen + 1 + strlen(data) + 1); + strcpy(buf, key); + buf[keylen] = '='; + strcpy(buf + keylen + 1, data); + if ((s = strdup(buf))) putenv(s); + return EINA_TRUE; +} + static void _exe_exit_eval(Eo *obj, Efl_Exe_Data *pd) { @@ -191,7 +206,7 @@ _exe_exit_eval(Eo *obj, Efl_Exe_Data *pd) // 128+n Fatal error signal "n" kill -9 $PPID $? returns 137 (128 + 9) // 130 Script terminated by Control-C Ctl-C Control-C is fatal error signal 2, (130 = 128 + 2, see above) // 255* Exit status out of range exit -1 exit takes only integer args in the range 0 - 255 - // + // // According to the above table, exit codes 1 - 2, // 126 - 165, and 255 [1] have special meanings, and // should therefore be avoided for user-specified exit @@ -285,25 +300,6 @@ _run_clean_cb(Efl_Loop_Consumer *consumer EINA_UNUSED, ////////////////////////////////////////////////////////////////////////// - -EOLIAN static void -_efl_exe_env_set(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd, Efl_Core_Env *env) -{ - if (pd->env == env) return; - - if (!pd->env) - efl_unref(pd->env); - pd->env = env; - if (pd->env) - efl_ref(pd->env); -} - -EOLIAN static Efl_Core_Env* -_efl_exe_env_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) -{ - return pd->env; -} - EOLIAN static void _efl_exe_signal(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd, Efl_Exe_Signal sig) { @@ -568,28 +564,17 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) // clear systemd notify socket... only relevant for systemd world, // otherwise shouldn't be trouble putenv("NOTIFY_SOCKET="); + // force the env hash to update from env vars + efl_task_env_get(loop, "HOME"); - // actually setenv the env object (clear what was there before so it is + // actually setenv the env hash (clear what was there before so it is // the only env there) - if (pd->env) - { - Eina_Iterator *itr; - const char *key; - - #ifdef HAVE_CLEARENV - clearenv(); - #else - environ = NULL; - #endif - itr = efl_core_env_content_get(pd->env); - - EINA_ITERATOR_FOREACH(itr, key) - { - setenv(key, efl_core_env_get(pd->env, key) , 1); - } - efl_unref(pd->env); - pd->env = NULL; - } +#ifdef HAVE_CLEARENV + clearenv(); +#else + environ = NULL; +#endif + eina_hash_foreach(td->env, _foreach_env, NULL); // actually execute! _exec(cmd, pd->flags); diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index 111814af21..d0d0cb585e 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -42,23 +42,6 @@ class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.C sig: int; [[ The exit signal, or -1 if no exit signal happened ]] } } - @property env { - [[ If $env is $null then the process created by this object is - going to inherit the enviroment of this process. - - In case $env is not $null then the environment variables declared - in this object will represent the environment passed to the new process. - ]] - get { - [[ Get the object assosiated with this object ]] - } - set { - [[ Set the object assosiated with this object ]] - } - values { - env : Efl.Core.Env; [[$env will be referenced until this object does not need it anymore.]] - } - } } implements { Efl.Object.constructor; diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index 68f9573b76..44e9c872c9 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -15,6 +15,8 @@ #include "ecore_main_common.h" +extern char **environ; + typedef struct _Efl_Loop_Promise_Simple_Data Efl_Loop_Promise_Simple_Data; typedef struct _Efl_Internal_Promise Efl_Internal_Promise; @@ -51,6 +53,11 @@ _efl_loop_message_handler_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Loo Eo *_mainloop_singleton = NULL; Efl_Loop_Data *_mainloop_singleton_data = NULL; +extern Eina_Lock _environ_lock; +static Eina_List *_environ_strings_set = NULL; + +static void _clean_old_environ(void); + EAPI Eo * efl_main_loop_get(void) { @@ -347,6 +354,16 @@ _efl_loop_efl_object_destructor(Eo *obj, Efl_Loop_Data *pd) { pd->future_message_handler = NULL; + eina_lock_take(&_environ_lock); + _clean_old_environ(); + _environ_strings_set = eina_list_free(_environ_strings_set); + pd->env.environ_ptr = NULL; + free(pd->env.environ_copy); + pd->env.environ_copy = NULL; + eina_lock_release(&_environ_lock); + + eina_value_flush(&pd->exit_code); + efl_destructor(efl_super(obj, EFL_LOOP_CLASS)); } @@ -657,6 +674,178 @@ efl_build_version_set(int vmaj, int vmin, int vmic, int revision, _app_efl_version.build_id = build_id ? strdup(build_id) : NULL; } +static void +_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td) +{ + Eina_Bool update = EINA_FALSE; + unsigned int count = 0, i; + char **p; + + // count environs + if (environ) + { + for (p = environ; *p; p++) count++; + } + // cached env ptr is the same... so look deeper if things changes + if (pd->env.environ_ptr == environ) + { + // if we have no cached copy then update + if (!pd->env.environ_copy) update = EINA_TRUE; + else + { + // if any ptr in the cached copy doesnt match environ ptr + // then update + for (i = 0; i <= count; i++) + { + if (pd->env.environ_copy[i] != environ[i]) + { + update = EINA_TRUE; + break; + } + } + } + } + // cached env ptr changed so we need to update anyway + else update = EINA_TRUE; + if (!update) return; + // things changed - do the update + pd->env.environ_ptr = environ; + free(pd->env.environ_copy); + pd->env.environ_copy = NULL; + if (count > 0) + { + pd->env.environ_copy = malloc((count + 1) * sizeof(char *)); + if (pd->env.environ_copy) + { + for (i = 0; i <= count; i++) + pd->env.environ_copy[i] = environ[i]; + } + } + // clear previous env hash and rebuild it from environ so it matches + if (td->env) eina_hash_free(td->env); + td->env = eina_hash_string_superfast_new + ((Eina_Free_Cb)eina_stringshare_del); + for (i = 0; i < count; i++) + { + char *var; + const char *value; + + if (!environ[i]) continue; + if ((value = strchr(environ[i], '='))) + { + if (*value) + { + if ((var = malloc(value - environ[i] + 1))) + { + strncpy(var, environ[i], value - environ[i]); + var[value - environ[i]] = 0; + value++; + eina_hash_add(td->env, var, + eina_stringshare_add(value)); + free(var); + } + } + } + } +} + +static void +_clean_old_environ(void) +{ + char **p; + const char *str; + Eina_List *l, *ll; + Eina_Bool ok; + + // clean up old strings no longer in environ + EINA_LIST_FOREACH_SAFE(_environ_strings_set, l, ll, str) + { + ok = EINA_FALSE; + for (p = environ; *p; p++) + { + if (*p == str) + { + ok = EINA_TRUE; + break; + } + } + if (!ok) + { + _environ_strings_set = + eina_list_remove_list(_environ_strings_set, l); + eina_stringshare_del(str); + } + } +} + +EOLIAN static void +_efl_loop_efl_task_env_set(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED, const char *var, const char *value) +{ + char *str, *str2; + size_t varlen, vallen = 0; + + if (!var) return; + + Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); + if (!td) return; + + varlen = strlen(var); + if (value) vallen = strlen(value); + + str = malloc(varlen + 1 + vallen + 1); + if (!str) return; + strcpy(str, var); + str[varlen] = '='; + if (value) strcpy(str + varlen + 1, value); + else str[varlen + 1] = 0; + + str2 = (char *)eina_stringshare_add(str); + free(str); + if (!str2) return; + + eina_lock_take(&_environ_lock); + if (putenv(str2) != 0) + { + eina_stringshare_del(str2); + eina_lock_release(&_environ_lock); + return; + } + _environ_strings_set = eina_list_append(_environ_strings_set, str2); + eina_lock_release(&_environ_lock); + + efl_task_env_set(efl_super(obj, EFL_LOOP_CLASS), var, value); + + eina_lock_take(&_environ_lock); + _clean_old_environ(); + eina_lock_release(&_environ_lock); +} + +EOLIAN static const char * +_efl_loop_efl_task_env_get(const Eo *obj, Efl_Loop_Data *pd, const char *var) +{ + Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); + if (!td) return NULL; + eina_lock_take(&_environ_lock); + _env_sync(pd, td); + eina_lock_release(&_environ_lock); + return efl_task_env_get(efl_super(obj, EFL_LOOP_CLASS), var); +} + +EOLIAN static void +_efl_loop_efl_task_env_reset(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd) +{ + Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); + if (!td) return; + eina_lock_take(&_environ_lock); +#ifdef HAVE_CLEARENV + clearenv(); +#else + environ = NULL; +#endif + _env_sync(pd, td); + eina_lock_release(&_environ_lock); +} + EOLIAN static Eina_Future * _efl_loop_efl_task_run(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED) { diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index 7480eee867..fe9cbd9a5d 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -125,6 +125,8 @@ class Efl.Loop extends Efl.Task Efl.Object.invalidate; Efl.Object.destructor; Efl.Object.provider_find; + Efl.Task.env { set; get; } + Efl.Task.env_reset; Efl.Task.run; Efl.Task.end; } diff --git a/src/lib/ecore/efl_task.c b/src/lib/ecore/efl_task.c index 311de0506a..6442669efd 100644 --- a/src/lib/ecore/efl_task.c +++ b/src/lib/ecore/efl_task.c @@ -227,6 +227,19 @@ _rebuild_command(Efl_Task_Data *pd) eina_strbuf_free(sb); } + +static Eina_Bool +_foreach_env_copy(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) +{ + if (data) + { + // only copy env vars not already set + if (!eina_hash_find(fdata, key)) + eina_hash_add(fdata, key, eina_stringshare_add(data)); + } + return EINA_TRUE; +} + ////////////////////////////////////////////////////////////////////////// EOLIAN static void @@ -309,6 +322,34 @@ _efl_task_arg_reset(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) pd->command_dirty = EINA_TRUE; } +EOLIAN static void +_efl_task_env_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *var, const char *value) +{ + if (!var) return; + if (!pd->env) + pd->env = eina_hash_string_superfast_new + ((Eina_Free_Cb)eina_stringshare_del); + if (!pd->env) return; + if ((value) && (*value)) + eina_hash_add(pd->env, var, eina_stringshare_add(value)); + else eina_hash_del(pd->env, var, NULL); +} + + +EOLIAN static const char * +_efl_task_env_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *var) +{ + if ((!var) || (!pd->env)) return NULL; + return eina_hash_find(pd->env, var); +} + +EOLIAN static void +_efl_task_env_reset(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) +{ + if (pd->env) eina_hash_free(pd->env); + pd->env = NULL; +} + EOLIAN static void _efl_task_priority_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, Efl_Task_Priority priority) { @@ -345,13 +386,32 @@ _efl_task_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) eina_stringshare_del(pd->command); pd->command = NULL; _clear_args(pd); + if (pd->env) eina_hash_free(pd->env); + pd->env = NULL; efl_destructor(efl_super(obj, MY_CLASS)); } EOLIAN static void -_efl_task_efl_object_parent_set(Eo *obj, Efl_Task_Data *pd EINA_UNUSED, Efl_Object *parent) +_efl_task_efl_object_parent_set(Eo *obj, Efl_Task_Data *pd, Efl_Object *parent) { + Eo *loop; + efl_parent_set(efl_super(obj, MY_CLASS), parent); + // copy loop env into exe task env, if not already set in env (overridden) + loop = efl_provider_find(parent, EFL_LOOP_CLASS); + if (loop) + { + Efl_Task_Data *tdl = efl_data_scope_get(loop, EFL_TASK_CLASS); + + if (tdl) + { + if (!pd->env) + pd->env = eina_hash_string_superfast_new + ((Eina_Free_Cb)eina_stringshare_del); + if (tdl->env) + eina_hash_foreach(tdl->env, _foreach_env_copy, pd->env); + } + } } ////////////////////////////////////////////////////////////////////////// diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index 526746ff60..92f0094fef 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -96,6 +96,26 @@ abstract Efl.Task extends Efl.Object [[ Clear all arguments in arg_value/count set. Will result in the command property also being cleared. ]] } + @property env { + [[ The environment to be passed in or that was passed to the + task. This is a string key, value list which map to environment + variables where appropriate. The var string must contain + only an underscore ('_'), letters ('a-z', 'A-Z'), + numbers ('0-9'), but the first character may not be a number.]] + set { } + get { } + keys { + var: string; [[ The variable name as a string ]] + } + values { + value: string; [[ Set var to this value if not $NULL, + otherwise clear this env value if value + is $NULL or if it is an empty string ]] + } + } + env_reset { + [[ Clear all environment variables. ]] + } @property priority { [[ The priority of this task. ]] get { } diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build index 98909cb618..baa5263698 100644 --- a/src/lib/ecore/meson.build +++ b/src/lib/ecore/meson.build @@ -74,9 +74,7 @@ pub_eo_files = [ 'efl_boolean_model.eo', 'efl_select_model.eo', 'efl_composite_model.eo', - 'efl_view_model.eo', - 'efl_core_env.eo', - 'efl_core_proc_env.eo' + 'efl_view_model.eo' ] foreach eo_file : pub_eo_files @@ -182,8 +180,6 @@ ecore_src = [ 'efl_thread.c', 'efl_threadio.c', 'efl_appthread.c', - 'efl_core_env.c', - 'efl_core_proc_env.c', ] if sys_windows == true diff --git a/src/tests/ecore/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c index cd26e2d95e..b3be09915a 100644 --- a/src/tests/ecore/efl_app_suite.c +++ b/src/tests/ecore/efl_app_suite.c @@ -9,6 +9,7 @@ #include "efl_app_suite.h" #include "../efl_check.h" + EFL_START_TEST(efl_app_test_efl_build_version) { const Efl_Version *ver; @@ -52,7 +53,6 @@ static const Efl_Test_Case etc[] = { { "Promise", efl_app_test_promise_2 }, { "Promise", efl_app_test_promise_3 }, { "Promise", efl_app_test_promise_safety }, - { "Env", efl_test_efl_env }, { NULL, NULL } }; diff --git a/src/tests/ecore/efl_app_suite.h b/src/tests/ecore/efl_app_suite.h index 3a66dcdfcf..29ed8f031f 100644 --- a/src/tests/ecore/efl_app_suite.h +++ b/src/tests/ecore/efl_app_suite.h @@ -11,6 +11,5 @@ void efl_app_test_promise(TCase *tc); void efl_app_test_promise_2(TCase *tc); void efl_app_test_promise_3(TCase *tc); void efl_app_test_promise_safety(TCase *tc); -void efl_test_efl_env(TCase *tc); #endif /* _EFL_APP_SUITE_H */ diff --git a/src/tests/ecore/efl_app_test_env.c b/src/tests/ecore/efl_app_test_env.c deleted file mode 100644 index 63bad166a2..0000000000 --- a/src/tests/ecore/efl_app_test_env.c +++ /dev/null @@ -1,135 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#define EFL_NOLEGACY_API_SUPPORT -#include -#include "efl_app_suite.h" -#include "../efl_check.h" - -EFL_START_TEST(efl_core_env_test_set_get) -{ - Efl_Core_Env *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); - - efl_core_env_set(env, "FOO", "bar"); - efl_core_env_set(env, "going", "home"); - efl_core_env_set(env, "Merry", "christmas"); - - ck_assert_str_eq(efl_core_env_get(env, "FOO"), "bar"); - ck_assert_str_eq(efl_core_env_get(env, "going"), "home"); - ck_assert_str_eq(efl_core_env_get(env, "Merry"), "christmas"); - - efl_core_env_unset(env, "Merry"); - - ck_assert_str_eq(efl_core_env_get(env, "FOO"), "bar"); - ck_assert_str_eq(efl_core_env_get(env, "going"), "home"); - ck_assert_ptr_eq(efl_core_env_get(env, "Merry"), NULL); - - efl_unref(env); -} -EFL_END_TEST - -EFL_START_TEST(efl_core_env_test_invalid_keys) -{ - Efl_Core_Env *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); - -#define CHECK(val) \ - efl_core_env_set(env, val, "TEST"); \ - ck_assert_ptr_eq(efl_core_env_get(env, val), NULL); - - CHECK("0foo"); - CHECK("foo bar"); - CHECK("foo!bar"); - -#undef CHECK - - -#define CHECK(val) \ - efl_core_env_set(env, val, "TEST"); \ - ck_assert_str_eq(efl_core_env_get(env, val), "TEST"); - - CHECK("foo0"); - CHECK("foo_bar"); - -#undef CHECK - -} -EFL_END_TEST - -EFL_START_TEST(efl_core_env_test_clear) -{ - Efl_Core_Env *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); - - efl_core_env_set(env, "FOO", "bar"); - efl_core_env_set(env, "going", "home"); - efl_core_env_set(env, "Merry", "christmas"); - - efl_core_env_clear(env); - - ck_assert_ptr_eq(efl_core_env_get(env, "FOO"), NULL); - ck_assert_ptr_eq(efl_core_env_get(env, "going"), NULL); - ck_assert_ptr_eq(efl_core_env_get(env, "Merry"), NULL); - - efl_unref(env); -} -EFL_END_TEST - -EFL_START_TEST(efl_core_env_test_fork) -{ - Efl_Core_Env *env_fork, *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); - - efl_core_env_set(env, "FOO", "bar"); - efl_core_env_set(env, "going", "home"); - efl_core_env_set(env, "Merry", "christmas"); - - env_fork = efl_duplicate(env); - - ck_assert_str_eq(efl_core_env_get(env_fork, "FOO"), "bar"); - ck_assert_str_eq(efl_core_env_get(env_fork, "going"), "home"); - ck_assert_str_eq(efl_core_env_get(env_fork, "Merry"), "christmas"); - - efl_unref(env); -} -EFL_END_TEST - -EFL_START_TEST(efl_core_env_test_process) -{ - Efl_Core_Env *env_fork, *env = efl_env_self(EFL_CORE_PROC_ENV_CLASS); - - ck_assert(env); - - ck_assert_str_eq(efl_core_env_get(env, "PATH"), getenv("PATH")); - env_fork = efl_duplicate(env); - ck_assert_str_eq(efl_core_env_get(env_fork, "PATH"), getenv("PATH")); - - efl_unref(env); -} -EFL_END_TEST - -EFL_START_TEST(efl_core_env_test_undepend_fork) -{ - Efl_Core_Env *env_fork, *env = efl_env_self(EFL_CORE_PROC_ENV_CLASS); - - ck_assert(env); - - ck_assert_str_eq(efl_core_env_get(env, "PATH"), getenv("PATH")); - env_fork = efl_duplicate(env); - efl_core_env_set(env_fork, "PATH", "abc"); - ck_assert_str_eq(efl_core_env_get(env, "PATH"), getenv("PATH")); - - efl_unref(env); - efl_unref(env_fork); -} -EFL_END_TEST - -void efl_test_efl_env(TCase *tc) -{ - tcase_add_test(tc, efl_core_env_test_set_get); - tcase_add_test(tc, efl_core_env_test_invalid_keys); - tcase_add_test(tc, efl_core_env_test_clear); - tcase_add_test(tc, efl_core_env_test_fork); - tcase_add_test(tc, efl_core_env_test_process); - tcase_add_test(tc, efl_core_env_test_undepend_fork); -} diff --git a/src/tests/ecore/meson.build b/src/tests/ecore/meson.build index e3b4f6c851..4b46814bbe 100644 --- a/src/tests/ecore/meson.build +++ b/src/tests/ecore/meson.build @@ -75,8 +75,7 @@ efl_app_suite_src = [ 'efl_app_test_loop.c', 'efl_app_test_loop_fd.c', 'efl_app_test_loop_timer.c', - 'efl_app_test_promise.c', - 'efl_app_test_env.c' + 'efl_app_test_promise.c' ] efl_app_suite_deps = [m] From 06160466e8c54fd31926f7102268a8a6afde537e Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Tue, 12 Feb 2019 21:34:27 +0100 Subject: [PATCH 21/87] Revert "Revert the env object because it's broken portability - please redo" This reverts commit d6294fa22b88187e44391c1c8ca64b1ebdf14533. --- header_checks/meson.build | 3 +- meson.build | 1 + src/Makefile_Ecore.am | 7 +- src/lib/ecore/Ecore_Eo.h | 3 + src/lib/ecore/ecore_private.h | 1 - src/lib/ecore/efl_core_env.c | 2 +- src/lib/ecore/efl_core_env.eo | 57 +++++++++ src/lib/ecore/efl_core_proc_env.c | 145 ++++++++++++++++++++++ src/lib/ecore/efl_core_proc_env.eo | 21 ++++ src/lib/ecore/efl_exe.c | 67 ++++++---- src/lib/ecore/efl_exe.eo | 17 +++ src/lib/ecore/efl_loop.c | 189 ----------------------------- src/lib/ecore/efl_loop.eo | 2 - src/lib/ecore/efl_task.c | 62 +--------- src/lib/ecore/efl_task.eo | 20 --- src/lib/ecore/meson.build | 6 +- src/tests/ecore/efl_app_suite.c | 2 +- src/tests/ecore/efl_app_suite.h | 1 + src/tests/ecore/efl_app_test_env.c | 135 +++++++++++++++++++++ src/tests/ecore/meson.build | 3 +- 20 files changed, 439 insertions(+), 305 deletions(-) create mode 100644 src/lib/ecore/efl_core_env.eo create mode 100644 src/lib/ecore/efl_core_proc_env.c create mode 100644 src/lib/ecore/efl_core_proc_env.eo create mode 100644 src/tests/ecore/efl_app_test_env.c diff --git a/header_checks/meson.build b/header_checks/meson.build index b23e774ec1..066d228a83 100644 --- a/header_checks/meson.build +++ b/header_checks/meson.build @@ -53,7 +53,8 @@ header_checks = [ 'langinfo.h', 'locale.h', 'uv.h', - 'ws2tcpip.h' + 'ws2tcpip.h', + 'crt_externs.h' ] function_checks = [ diff --git a/meson.build b/meson.build index 0e2a50c2c9..d6b9b6074d 100644 --- a/meson.build +++ b/meson.build @@ -210,6 +210,7 @@ elif sys_osx == true sys_lib_extension = 'dylib' sys_exe_extension = '' sys_mod_extension = 'dylib' + config_h.set('environ', '(*_NSGetEnviron())') else error('System '+host_machine.system()+' not known') endif diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 7bc8e43b74..5f10ea7f2e 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -49,7 +49,9 @@ ecore_eolian_files_public = \ lib/ecore/efl_boolean_model.eo \ lib/ecore/efl_select_model.eo \ lib/ecore/efl_composite_model.eo \ - lib/ecore/efl_view_model.eo + lib/ecore/efl_view_model.eo \ + lib/ecore/efl_core_env.eo \ + lib/ecore/efl_core_proc_env.eo \ ecore_eolian_files = \ $(ecore_eolian_files_legacy) \ @@ -98,6 +100,8 @@ lib/ecore/ecore_job.c \ lib/ecore/ecore_main.c \ lib/ecore/ecore_event_message.c \ lib/ecore/ecore_event_message_handler.c \ +lib/ecore/efl_core_env.c \ +lib/ecore/efl_core_proc_env.c \ lib/ecore/efl_app.c \ lib/ecore/efl_loop.c \ lib/ecore/efl_loop_consumer.c \ @@ -335,6 +339,7 @@ tests/ecore/efl_app_test_loop.c \ tests/ecore/efl_app_test_loop_fd.c \ tests/ecore/efl_app_test_loop_timer.c \ tests/ecore/efl_app_test_promise.c \ +tests/ecore/efl_app_test_env.c \ tests/ecore/efl_app_suite.c \ tests/ecore/efl_app_suite.h diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h index 6a21ff5ea7..348b0f5b6d 100644 --- a/src/lib/ecore/Ecore_Eo.h +++ b/src/lib/ecore/Ecore_Eo.h @@ -26,6 +26,9 @@ * @{ */ +#include "efl_core_env.eo.h" +#include "efl_core_proc_env.eo.h" + #include "efl_loop_message.eo.h" #include "efl_loop_message_handler.eo.h" diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index c29f73d189..4e980d9123 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -188,7 +188,6 @@ struct _Efl_Task_Data { Eina_Stringshare *command; Eina_Array *args; - Eina_Hash *env; Efl_Task_Priority priority; int exit_code; Efl_Task_Flags flags; diff --git a/src/lib/ecore/efl_core_env.c b/src/lib/ecore/efl_core_env.c index 38fc9ba1a9..e0ee5a25e3 100644 --- a/src/lib/ecore/efl_core_env.c +++ b/src/lib/ecore/efl_core_env.c @@ -26,7 +26,7 @@ key_valid(const char *key) { if (!key || key[0] == '\0') return EINA_FALSE; - if isdigit(key[0]) return EINA_FALSE; + if (isdigit(key[0])) return EINA_FALSE; for (int i = 0; key[i] != '\0'; ++i) { if (!isalnum(key[i]) && key[i] != '_') return EINA_FALSE; diff --git a/src/lib/ecore/efl_core_env.eo b/src/lib/ecore/efl_core_env.eo new file mode 100644 index 0000000000..86da8c14ff --- /dev/null +++ b/src/lib/ecore/efl_core_env.eo @@ -0,0 +1,57 @@ +class Efl.Core.Env extends Efl.Object implements Efl.Duplicate { + [[This object can maintain a set of key value pairs + + A object of this type alone does not apply the object to the system. + For getting the value into the system, see @Efl.Core.Proc_Env. + + A object can be forked, which will only copy its values, changes to the returned object will not change the object where it is forked off. + ]] + methods { + @property env { + [[ Stored var value pairs of this object. + + Var must contain only: underscores ('_'), letters ('a-z', 'A-Z'), + numbers ('0-9'), but the first character may not be a number. + ]] + set { + [[ Add a new pair to this object ]] + } + get { + [[ Get the value of the $var, or $null if no such $var exists in the object]] + } + keys { + var: string; [[ The name of the variable ]] + } + values { + value: string; [[ Set var to this value if not $NULL, + otherwise clear this env value if value + is $NULL or if it is an empty string ]] + } + } + unset { + [[ Remove the pair with the matching $var from this object]] + params { + var : string; [[ The name of the variable ]] + } + } + clear { + [[ Remove all pairs from this object]] + } + @property content { + [[ Get the content of this object. + + This will return a iterator that contains all keys that are part of this object. + ]] + get { + + } + values { + iter : iterator; + } + } + } + implements { + Efl.Object.constructor; + Efl.Duplicate.duplicate; + } +} diff --git a/src/lib/ecore/efl_core_proc_env.c b/src/lib/ecore/efl_core_proc_env.c new file mode 100644 index 0000000000..846b69a350 --- /dev/null +++ b/src/lib/ecore/efl_core_proc_env.c @@ -0,0 +1,145 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#ifdef HAVE_CRT_EXTERNS_H +# include +#endif +#include "ecore_private.h" + +#define MY_CLASS EFL_CORE_PROC_ENV_CLASS + +static Efl_Core_Env *env = NULL; + +typedef struct { + Eina_Bool in_sync; +} Efl_Core_Proc_Env_Data; + +static void +_sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd) +{ + Eina_List *existing_keys = NULL, *n; + Eina_Iterator *content; + const char *key; + + pd->in_sync = EINA_TRUE; + content = efl_core_env_content_get(obj); + + EINA_ITERATOR_FOREACH(content, key) + { + existing_keys = eina_list_append(existing_keys, key); + } + + if (environ) + { + char **p; + + for (p = environ; *p; p++) + { + char **values; + + values = eina_str_split(*p, "=", 2); + efl_core_env_set(obj, values[0], values[1]); + + EINA_LIST_FOREACH(existing_keys, n, key) + { + if (!strcmp(key, values[0])) + { + existing_keys = eina_list_remove_list(existing_keys, n); + break; + } + } + } + } + EINA_LIST_FOREACH(existing_keys, n, key) + { + efl_core_env_unset(obj, key); + } + pd->in_sync = EINA_FALSE; +} + +EOLIAN static const char* +_efl_core_proc_env_efl_core_env_env_get(const Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *var) +{ + if (!pd->in_sync) + _sync((Eo*)obj, pd); + return efl_core_env_get(efl_super(obj, MY_CLASS), var); +} + +EOLIAN static void +_efl_core_proc_env_efl_core_env_env_set(Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *var, const char *value) +{ + efl_core_env_set(efl_super(obj, MY_CLASS), var, value); + if (!pd->in_sync) + { + if (value) + setenv(var, value, 1); + else + unsetenv(var); + } +} + +EOLIAN static void +_efl_core_proc_env_efl_core_env_unset(Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *key) +{ + efl_core_env_unset(efl_super(obj, MY_CLASS), key); + if (!pd->in_sync) + { + unsetenv(key); + } +} + +EOLIAN static void +_efl_core_proc_env_efl_core_env_clear(Eo *obj, Efl_Core_Proc_Env_Data *pd) +{ + efl_core_env_clear(efl_super(obj, MY_CLASS)); + if (!pd->in_sync) + { +#ifdef HAVE_CLEARENV + clearenv(); +#else + environ = NULL; +#endif + } +} + + +EOLIAN static Efl_Duplicate* +_efl_core_proc_env_efl_duplicate_duplicate(const Eo *obj, Efl_Core_Proc_Env_Data *pd) +{ + if (!pd->in_sync) + _sync((Eo*) obj, pd); + return efl_duplicate(efl_super(obj, MY_CLASS)); +} + +EOLIAN static Eina_Iterator* +_efl_core_proc_env_efl_core_env_content_get(const Eo *obj, Efl_Core_Proc_Env_Data *pd) +{ + if (!pd->in_sync) + _sync((Eo*) obj, pd); + return efl_core_env_content_get(efl_super(obj, MY_CLASS)); +} + +EOLIAN static Efl_Object* +_efl_core_proc_env_efl_object_constructor(Eo *obj, Efl_Core_Proc_Env_Data *pd EINA_UNUSED) +{ + EINA_SAFETY_ON_TRUE_RETURN_VAL(!!env, NULL); + + obj = efl_constructor(efl_super(obj, MY_CLASS)); + return obj; +} + +EOLIAN static Efl_Core_Env* +_efl_core_proc_env_self(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED) +{ + if (!env) + { + env = efl_add_ref(EFL_CORE_PROC_ENV_CLASS, NULL); + efl_wref_add(env, &env); + } + + return env; +} + +#include "efl_core_proc_env.eo.c" diff --git a/src/lib/ecore/efl_core_proc_env.eo b/src/lib/ecore/efl_core_proc_env.eo new file mode 100644 index 0000000000..23c2c67d75 --- /dev/null +++ b/src/lib/ecore/efl_core_proc_env.eo @@ -0,0 +1,21 @@ +class Efl.Core.Proc_Env extends Efl.Core.Env +{ + eo_prefix : efl_env; + methods { + self @class { + [[Get a instance of this object + + The object will apply the environment operations onto this process. + ]] + return : Efl.Core.Env; + } + } + implements { + Efl.Core.Env.env { set; get; } + Efl.Core.Env.content { get; } + Efl.Core.Env.unset; + Efl.Core.Env.clear; + Efl.Duplicate.duplicate; + Efl.Object.constructor; + } +} diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c index a6f9f5f506..4b3bc658d6 100644 --- a/src/lib/ecore/efl_exe.c +++ b/src/lib/ecore/efl_exe.c @@ -40,6 +40,7 @@ typedef struct _Efl_Exe_Data Efl_Exe_Data; struct _Efl_Exe_Data { + Efl_Core_Env *env; int exit_signal; Efl_Exe_Flags flags; #ifdef _WIN32 @@ -165,22 +166,6 @@ _exec(const char *cmd, Efl_Exe_Flags flags) } } -static Eina_Bool -_foreach_env(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata EINA_UNUSED) -{ - int keylen; - char *buf, *s; - - if (!data) return EINA_TRUE; - keylen = strlen(key); - buf = alloca(keylen + 1 + strlen(data) + 1); - strcpy(buf, key); - buf[keylen] = '='; - strcpy(buf + keylen + 1, data); - if ((s = strdup(buf))) putenv(s); - return EINA_TRUE; -} - static void _exe_exit_eval(Eo *obj, Efl_Exe_Data *pd) { @@ -206,7 +191,7 @@ _exe_exit_eval(Eo *obj, Efl_Exe_Data *pd) // 128+n Fatal error signal "n" kill -9 $PPID $? returns 137 (128 + 9) // 130 Script terminated by Control-C Ctl-C Control-C is fatal error signal 2, (130 = 128 + 2, see above) // 255* Exit status out of range exit -1 exit takes only integer args in the range 0 - 255 - // + // // According to the above table, exit codes 1 - 2, // 126 - 165, and 255 [1] have special meanings, and // should therefore be avoided for user-specified exit @@ -300,6 +285,25 @@ _run_clean_cb(Efl_Loop_Consumer *consumer EINA_UNUSED, ////////////////////////////////////////////////////////////////////////// + +EOLIAN static void +_efl_exe_env_set(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd, Efl_Core_Env *env) +{ + if (pd->env == env) return; + + if (!pd->env) + efl_unref(pd->env); + pd->env = env; + if (pd->env) + efl_ref(pd->env); +} + +EOLIAN static Efl_Core_Env* +_efl_exe_env_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) +{ + return pd->env; +} + EOLIAN static void _efl_exe_signal(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd, Efl_Exe_Signal sig) { @@ -564,17 +568,28 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) // clear systemd notify socket... only relevant for systemd world, // otherwise shouldn't be trouble putenv("NOTIFY_SOCKET="); - // force the env hash to update from env vars - efl_task_env_get(loop, "HOME"); - // actually setenv the env hash (clear what was there before so it is + // actually setenv the env object (clear what was there before so it is // the only env there) -#ifdef HAVE_CLEARENV - clearenv(); -#else - environ = NULL; -#endif - eina_hash_foreach(td->env, _foreach_env, NULL); + if (pd->env) + { + Eina_Iterator *itr; + const char *key; + + #ifdef HAVE_CLEARENV + clearenv(); + #else + environ = NULL; + #endif + itr = efl_core_env_content_get(pd->env); + + EINA_ITERATOR_FOREACH(itr, key) + { + setenv(key, efl_core_env_get(pd->env, key) , 1); + } + efl_unref(pd->env); + pd->env = NULL; + } // actually execute! _exec(cmd, pd->flags); diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index d0d0cb585e..111814af21 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -42,6 +42,23 @@ class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.C sig: int; [[ The exit signal, or -1 if no exit signal happened ]] } } + @property env { + [[ If $env is $null then the process created by this object is + going to inherit the enviroment of this process. + + In case $env is not $null then the environment variables declared + in this object will represent the environment passed to the new process. + ]] + get { + [[ Get the object assosiated with this object ]] + } + set { + [[ Set the object assosiated with this object ]] + } + values { + env : Efl.Core.Env; [[$env will be referenced until this object does not need it anymore.]] + } + } } implements { Efl.Object.constructor; diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index 44e9c872c9..68f9573b76 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -15,8 +15,6 @@ #include "ecore_main_common.h" -extern char **environ; - typedef struct _Efl_Loop_Promise_Simple_Data Efl_Loop_Promise_Simple_Data; typedef struct _Efl_Internal_Promise Efl_Internal_Promise; @@ -53,11 +51,6 @@ _efl_loop_message_handler_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Loo Eo *_mainloop_singleton = NULL; Efl_Loop_Data *_mainloop_singleton_data = NULL; -extern Eina_Lock _environ_lock; -static Eina_List *_environ_strings_set = NULL; - -static void _clean_old_environ(void); - EAPI Eo * efl_main_loop_get(void) { @@ -354,16 +347,6 @@ _efl_loop_efl_object_destructor(Eo *obj, Efl_Loop_Data *pd) { pd->future_message_handler = NULL; - eina_lock_take(&_environ_lock); - _clean_old_environ(); - _environ_strings_set = eina_list_free(_environ_strings_set); - pd->env.environ_ptr = NULL; - free(pd->env.environ_copy); - pd->env.environ_copy = NULL; - eina_lock_release(&_environ_lock); - - eina_value_flush(&pd->exit_code); - efl_destructor(efl_super(obj, EFL_LOOP_CLASS)); } @@ -674,178 +657,6 @@ efl_build_version_set(int vmaj, int vmin, int vmic, int revision, _app_efl_version.build_id = build_id ? strdup(build_id) : NULL; } -static void -_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td) -{ - Eina_Bool update = EINA_FALSE; - unsigned int count = 0, i; - char **p; - - // count environs - if (environ) - { - for (p = environ; *p; p++) count++; - } - // cached env ptr is the same... so look deeper if things changes - if (pd->env.environ_ptr == environ) - { - // if we have no cached copy then update - if (!pd->env.environ_copy) update = EINA_TRUE; - else - { - // if any ptr in the cached copy doesnt match environ ptr - // then update - for (i = 0; i <= count; i++) - { - if (pd->env.environ_copy[i] != environ[i]) - { - update = EINA_TRUE; - break; - } - } - } - } - // cached env ptr changed so we need to update anyway - else update = EINA_TRUE; - if (!update) return; - // things changed - do the update - pd->env.environ_ptr = environ; - free(pd->env.environ_copy); - pd->env.environ_copy = NULL; - if (count > 0) - { - pd->env.environ_copy = malloc((count + 1) * sizeof(char *)); - if (pd->env.environ_copy) - { - for (i = 0; i <= count; i++) - pd->env.environ_copy[i] = environ[i]; - } - } - // clear previous env hash and rebuild it from environ so it matches - if (td->env) eina_hash_free(td->env); - td->env = eina_hash_string_superfast_new - ((Eina_Free_Cb)eina_stringshare_del); - for (i = 0; i < count; i++) - { - char *var; - const char *value; - - if (!environ[i]) continue; - if ((value = strchr(environ[i], '='))) - { - if (*value) - { - if ((var = malloc(value - environ[i] + 1))) - { - strncpy(var, environ[i], value - environ[i]); - var[value - environ[i]] = 0; - value++; - eina_hash_add(td->env, var, - eina_stringshare_add(value)); - free(var); - } - } - } - } -} - -static void -_clean_old_environ(void) -{ - char **p; - const char *str; - Eina_List *l, *ll; - Eina_Bool ok; - - // clean up old strings no longer in environ - EINA_LIST_FOREACH_SAFE(_environ_strings_set, l, ll, str) - { - ok = EINA_FALSE; - for (p = environ; *p; p++) - { - if (*p == str) - { - ok = EINA_TRUE; - break; - } - } - if (!ok) - { - _environ_strings_set = - eina_list_remove_list(_environ_strings_set, l); - eina_stringshare_del(str); - } - } -} - -EOLIAN static void -_efl_loop_efl_task_env_set(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED, const char *var, const char *value) -{ - char *str, *str2; - size_t varlen, vallen = 0; - - if (!var) return; - - Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); - if (!td) return; - - varlen = strlen(var); - if (value) vallen = strlen(value); - - str = malloc(varlen + 1 + vallen + 1); - if (!str) return; - strcpy(str, var); - str[varlen] = '='; - if (value) strcpy(str + varlen + 1, value); - else str[varlen + 1] = 0; - - str2 = (char *)eina_stringshare_add(str); - free(str); - if (!str2) return; - - eina_lock_take(&_environ_lock); - if (putenv(str2) != 0) - { - eina_stringshare_del(str2); - eina_lock_release(&_environ_lock); - return; - } - _environ_strings_set = eina_list_append(_environ_strings_set, str2); - eina_lock_release(&_environ_lock); - - efl_task_env_set(efl_super(obj, EFL_LOOP_CLASS), var, value); - - eina_lock_take(&_environ_lock); - _clean_old_environ(); - eina_lock_release(&_environ_lock); -} - -EOLIAN static const char * -_efl_loop_efl_task_env_get(const Eo *obj, Efl_Loop_Data *pd, const char *var) -{ - Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); - if (!td) return NULL; - eina_lock_take(&_environ_lock); - _env_sync(pd, td); - eina_lock_release(&_environ_lock); - return efl_task_env_get(efl_super(obj, EFL_LOOP_CLASS), var); -} - -EOLIAN static void -_efl_loop_efl_task_env_reset(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd) -{ - Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); - if (!td) return; - eina_lock_take(&_environ_lock); -#ifdef HAVE_CLEARENV - clearenv(); -#else - environ = NULL; -#endif - _env_sync(pd, td); - eina_lock_release(&_environ_lock); -} - EOLIAN static Eina_Future * _efl_loop_efl_task_run(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED) { diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index fe9cbd9a5d..7480eee867 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -125,8 +125,6 @@ class Efl.Loop extends Efl.Task Efl.Object.invalidate; Efl.Object.destructor; Efl.Object.provider_find; - Efl.Task.env { set; get; } - Efl.Task.env_reset; Efl.Task.run; Efl.Task.end; } diff --git a/src/lib/ecore/efl_task.c b/src/lib/ecore/efl_task.c index 6442669efd..311de0506a 100644 --- a/src/lib/ecore/efl_task.c +++ b/src/lib/ecore/efl_task.c @@ -227,19 +227,6 @@ _rebuild_command(Efl_Task_Data *pd) eina_strbuf_free(sb); } - -static Eina_Bool -_foreach_env_copy(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) -{ - if (data) - { - // only copy env vars not already set - if (!eina_hash_find(fdata, key)) - eina_hash_add(fdata, key, eina_stringshare_add(data)); - } - return EINA_TRUE; -} - ////////////////////////////////////////////////////////////////////////// EOLIAN static void @@ -322,34 +309,6 @@ _efl_task_arg_reset(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) pd->command_dirty = EINA_TRUE; } -EOLIAN static void -_efl_task_env_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *var, const char *value) -{ - if (!var) return; - if (!pd->env) - pd->env = eina_hash_string_superfast_new - ((Eina_Free_Cb)eina_stringshare_del); - if (!pd->env) return; - if ((value) && (*value)) - eina_hash_add(pd->env, var, eina_stringshare_add(value)); - else eina_hash_del(pd->env, var, NULL); -} - - -EOLIAN static const char * -_efl_task_env_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *var) -{ - if ((!var) || (!pd->env)) return NULL; - return eina_hash_find(pd->env, var); -} - -EOLIAN static void -_efl_task_env_reset(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) -{ - if (pd->env) eina_hash_free(pd->env); - pd->env = NULL; -} - EOLIAN static void _efl_task_priority_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, Efl_Task_Priority priority) { @@ -386,32 +345,13 @@ _efl_task_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) eina_stringshare_del(pd->command); pd->command = NULL; _clear_args(pd); - if (pd->env) eina_hash_free(pd->env); - pd->env = NULL; efl_destructor(efl_super(obj, MY_CLASS)); } EOLIAN static void -_efl_task_efl_object_parent_set(Eo *obj, Efl_Task_Data *pd, Efl_Object *parent) +_efl_task_efl_object_parent_set(Eo *obj, Efl_Task_Data *pd EINA_UNUSED, Efl_Object *parent) { - Eo *loop; - efl_parent_set(efl_super(obj, MY_CLASS), parent); - // copy loop env into exe task env, if not already set in env (overridden) - loop = efl_provider_find(parent, EFL_LOOP_CLASS); - if (loop) - { - Efl_Task_Data *tdl = efl_data_scope_get(loop, EFL_TASK_CLASS); - - if (tdl) - { - if (!pd->env) - pd->env = eina_hash_string_superfast_new - ((Eina_Free_Cb)eina_stringshare_del); - if (tdl->env) - eina_hash_foreach(tdl->env, _foreach_env_copy, pd->env); - } - } } ////////////////////////////////////////////////////////////////////////// diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index 92f0094fef..526746ff60 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -96,26 +96,6 @@ abstract Efl.Task extends Efl.Object [[ Clear all arguments in arg_value/count set. Will result in the command property also being cleared. ]] } - @property env { - [[ The environment to be passed in or that was passed to the - task. This is a string key, value list which map to environment - variables where appropriate. The var string must contain - only an underscore ('_'), letters ('a-z', 'A-Z'), - numbers ('0-9'), but the first character may not be a number.]] - set { } - get { } - keys { - var: string; [[ The variable name as a string ]] - } - values { - value: string; [[ Set var to this value if not $NULL, - otherwise clear this env value if value - is $NULL or if it is an empty string ]] - } - } - env_reset { - [[ Clear all environment variables. ]] - } @property priority { [[ The priority of this task. ]] get { } diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build index baa5263698..98909cb618 100644 --- a/src/lib/ecore/meson.build +++ b/src/lib/ecore/meson.build @@ -74,7 +74,9 @@ pub_eo_files = [ 'efl_boolean_model.eo', 'efl_select_model.eo', 'efl_composite_model.eo', - 'efl_view_model.eo' + 'efl_view_model.eo', + 'efl_core_env.eo', + 'efl_core_proc_env.eo' ] foreach eo_file : pub_eo_files @@ -180,6 +182,8 @@ ecore_src = [ 'efl_thread.c', 'efl_threadio.c', 'efl_appthread.c', + 'efl_core_env.c', + 'efl_core_proc_env.c', ] if sys_windows == true diff --git a/src/tests/ecore/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c index b3be09915a..cd26e2d95e 100644 --- a/src/tests/ecore/efl_app_suite.c +++ b/src/tests/ecore/efl_app_suite.c @@ -9,7 +9,6 @@ #include "efl_app_suite.h" #include "../efl_check.h" - EFL_START_TEST(efl_app_test_efl_build_version) { const Efl_Version *ver; @@ -53,6 +52,7 @@ static const Efl_Test_Case etc[] = { { "Promise", efl_app_test_promise_2 }, { "Promise", efl_app_test_promise_3 }, { "Promise", efl_app_test_promise_safety }, + { "Env", efl_test_efl_env }, { NULL, NULL } }; diff --git a/src/tests/ecore/efl_app_suite.h b/src/tests/ecore/efl_app_suite.h index 29ed8f031f..3a66dcdfcf 100644 --- a/src/tests/ecore/efl_app_suite.h +++ b/src/tests/ecore/efl_app_suite.h @@ -11,5 +11,6 @@ void efl_app_test_promise(TCase *tc); void efl_app_test_promise_2(TCase *tc); void efl_app_test_promise_3(TCase *tc); void efl_app_test_promise_safety(TCase *tc); +void efl_test_efl_env(TCase *tc); #endif /* _EFL_APP_SUITE_H */ diff --git a/src/tests/ecore/efl_app_test_env.c b/src/tests/ecore/efl_app_test_env.c new file mode 100644 index 0000000000..63bad166a2 --- /dev/null +++ b/src/tests/ecore/efl_app_test_env.c @@ -0,0 +1,135 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#define EFL_NOLEGACY_API_SUPPORT +#include +#include "efl_app_suite.h" +#include "../efl_check.h" + +EFL_START_TEST(efl_core_env_test_set_get) +{ + Efl_Core_Env *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); + + efl_core_env_set(env, "FOO", "bar"); + efl_core_env_set(env, "going", "home"); + efl_core_env_set(env, "Merry", "christmas"); + + ck_assert_str_eq(efl_core_env_get(env, "FOO"), "bar"); + ck_assert_str_eq(efl_core_env_get(env, "going"), "home"); + ck_assert_str_eq(efl_core_env_get(env, "Merry"), "christmas"); + + efl_core_env_unset(env, "Merry"); + + ck_assert_str_eq(efl_core_env_get(env, "FOO"), "bar"); + ck_assert_str_eq(efl_core_env_get(env, "going"), "home"); + ck_assert_ptr_eq(efl_core_env_get(env, "Merry"), NULL); + + efl_unref(env); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_invalid_keys) +{ + Efl_Core_Env *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); + +#define CHECK(val) \ + efl_core_env_set(env, val, "TEST"); \ + ck_assert_ptr_eq(efl_core_env_get(env, val), NULL); + + CHECK("0foo"); + CHECK("foo bar"); + CHECK("foo!bar"); + +#undef CHECK + + +#define CHECK(val) \ + efl_core_env_set(env, val, "TEST"); \ + ck_assert_str_eq(efl_core_env_get(env, val), "TEST"); + + CHECK("foo0"); + CHECK("foo_bar"); + +#undef CHECK + +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_clear) +{ + Efl_Core_Env *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); + + efl_core_env_set(env, "FOO", "bar"); + efl_core_env_set(env, "going", "home"); + efl_core_env_set(env, "Merry", "christmas"); + + efl_core_env_clear(env); + + ck_assert_ptr_eq(efl_core_env_get(env, "FOO"), NULL); + ck_assert_ptr_eq(efl_core_env_get(env, "going"), NULL); + ck_assert_ptr_eq(efl_core_env_get(env, "Merry"), NULL); + + efl_unref(env); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_fork) +{ + Efl_Core_Env *env_fork, *env = efl_add_ref(EFL_CORE_ENV_CLASS, NULL); + + efl_core_env_set(env, "FOO", "bar"); + efl_core_env_set(env, "going", "home"); + efl_core_env_set(env, "Merry", "christmas"); + + env_fork = efl_duplicate(env); + + ck_assert_str_eq(efl_core_env_get(env_fork, "FOO"), "bar"); + ck_assert_str_eq(efl_core_env_get(env_fork, "going"), "home"); + ck_assert_str_eq(efl_core_env_get(env_fork, "Merry"), "christmas"); + + efl_unref(env); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_process) +{ + Efl_Core_Env *env_fork, *env = efl_env_self(EFL_CORE_PROC_ENV_CLASS); + + ck_assert(env); + + ck_assert_str_eq(efl_core_env_get(env, "PATH"), getenv("PATH")); + env_fork = efl_duplicate(env); + ck_assert_str_eq(efl_core_env_get(env_fork, "PATH"), getenv("PATH")); + + efl_unref(env); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_env_test_undepend_fork) +{ + Efl_Core_Env *env_fork, *env = efl_env_self(EFL_CORE_PROC_ENV_CLASS); + + ck_assert(env); + + ck_assert_str_eq(efl_core_env_get(env, "PATH"), getenv("PATH")); + env_fork = efl_duplicate(env); + efl_core_env_set(env_fork, "PATH", "abc"); + ck_assert_str_eq(efl_core_env_get(env, "PATH"), getenv("PATH")); + + efl_unref(env); + efl_unref(env_fork); +} +EFL_END_TEST + +void efl_test_efl_env(TCase *tc) +{ + tcase_add_test(tc, efl_core_env_test_set_get); + tcase_add_test(tc, efl_core_env_test_invalid_keys); + tcase_add_test(tc, efl_core_env_test_clear); + tcase_add_test(tc, efl_core_env_test_fork); + tcase_add_test(tc, efl_core_env_test_process); + tcase_add_test(tc, efl_core_env_test_undepend_fork); +} diff --git a/src/tests/ecore/meson.build b/src/tests/ecore/meson.build index 4b46814bbe..e3b4f6c851 100644 --- a/src/tests/ecore/meson.build +++ b/src/tests/ecore/meson.build @@ -75,7 +75,8 @@ efl_app_suite_src = [ 'efl_app_test_loop.c', 'efl_app_test_loop_fd.c', 'efl_app_test_loop_timer.c', - 'efl_app_test_promise.c' + 'efl_app_test_promise.c', + 'efl_app_test_env.c' ] efl_app_suite_deps = [m] From 3b262340babc57058f3e97b10ca56c0adb1c3efe Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Tue, 12 Feb 2019 21:34:30 +0100 Subject: [PATCH 22/87] Revert "Revert command line array object because it's broken by design" This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e. I pretty much hate to just revert your revert, but you failed to read my replies, and failed to understand what i was talking about. And YES we talked at fosdem about the platform issue, and do you remember my answer, that back in time this might be the case, today is different freebsd suppoerts setenv, and for windows we have a setenv implementation in evil. And yes, vtorri also created a issue how bad and evil this commit is, however, i still fail to see the issue since setenv unsetenv and clearenv usages are taken as needed. (T7693) The ownership question is answered in https://phab.enlightenment.org/D7516#137367. Can we please get into a state of technical discussions, and not *oh shit, i am going to revert this* this has been in review for a long time, a lots of people have tested it, we discussed things on it, and there was 3 weeks of no reply from you. The issues that exist will be dealed with. Feel free to create tasks if you want :) --- src/Makefile_Ecore.am | 12 +- .../mono/efl_mono/efl_csharp_application.cs | 5 +- src/lib/ecore/Ecore_Eo.h | 1 + src/lib/ecore/efl_app.eo | 2 +- src/lib/ecore/efl_appthread.eo | 2 +- src/lib/ecore/efl_core_command_line.c | 267 ++++++++++++++++ src/lib/ecore/efl_core_command_line.eo | 80 +++++ src/lib/ecore/efl_exe.c | 4 +- src/lib/ecore/efl_exe.eo | 2 +- src/lib/ecore/efl_loop.c | 10 +- src/lib/ecore/efl_task.c | 298 ------------------ src/lib/ecore/efl_task.eo | 77 ----- src/lib/ecore/efl_thread.c | 71 ++--- src/lib/ecore/efl_thread.eo | 2 +- src/lib/ecore/meson.build | 5 +- src/tests/ecore/efl_app_suite.c | 1 + src/tests/ecore/efl_app_suite.h | 1 + src/tests/ecore/efl_app_test_cml.c | 85 +++++ src/tests/ecore/efl_app_test_cml.eo | 4 + src/tests/ecore/meson.build | 22 +- 20 files changed, 520 insertions(+), 431 deletions(-) create mode 100644 src/lib/ecore/efl_core_command_line.c create mode 100644 src/lib/ecore/efl_core_command_line.eo create mode 100644 src/tests/ecore/efl_app_test_cml.c create mode 100644 src/tests/ecore/efl_app_test_cml.eo diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 5f10ea7f2e..fd6074dec3 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -52,6 +52,10 @@ ecore_eolian_files_public = \ lib/ecore/efl_view_model.eo \ lib/ecore/efl_core_env.eo \ lib/ecore/efl_core_proc_env.eo \ + lib/ecore/efl_core_command_line.eo + +ecore_test_eolian_files = \ + tests/ecore/efl_app_test_cml.eo ecore_eolian_files = \ $(ecore_eolian_files_legacy) \ @@ -60,10 +64,14 @@ ecore_eolian_files = \ ecore_eolian_c = $(ecore_eolian_files:%.eo=%.eo.c) ecore_eolian_h = $(ecore_eolian_files:%.eo=%.eo.h) \ $(ecore_eolian_files_legacy:%.eo=%.eo.legacy.h) +ecore_test_c = $(ecore_test_eolian_files:%.eo=%.eo.c) +ecore_test_h = $(ecore_test_eolian_files:%.eo=%.eo.h) BUILT_SOURCES += \ $(ecore_eolian_c) \ - $(ecore_eolian_h) + $(ecore_eolian_h) \ + $(ecore_test_c) \ + $(ecore_test_h) ecoreeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@ ecoreeolianfiles_DATA = $(ecore_eolian_files_public) lib/ecore/efl_loop_timer.eo @@ -100,6 +108,7 @@ lib/ecore/ecore_job.c \ lib/ecore/ecore_main.c \ lib/ecore/ecore_event_message.c \ lib/ecore/ecore_event_message_handler.c \ +lib/ecore/efl_core_command_line.c \ lib/ecore/efl_core_env.c \ lib/ecore/efl_core_proc_env.c \ lib/ecore/efl_app.c \ @@ -339,6 +348,7 @@ tests/ecore/efl_app_test_loop.c \ tests/ecore/efl_app_test_loop_fd.c \ tests/ecore/efl_app_test_loop_timer.c \ tests/ecore/efl_app_test_promise.c \ +tests/ecore/efl_app_test_cml.c \ tests/ecore/efl_app_test_env.c \ tests/ecore/efl_app_suite.c \ tests/ecore/efl_app_suite.h diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs index 2b2c55c75e..84732d3993 100644 --- a/src/bindings/mono/efl_mono/efl_csharp_application.cs +++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs @@ -104,8 +104,9 @@ namespace Efl { public void Launch(Efl.Csharp.Components components=Components.Ui) { Init(components); Efl.App app = Efl.App.AppMain; - foreach (var arg in Environment.GetCommandLineArgs()) - app.AppendArg(arg); + Eina.Array command_line = new Eina.Array(); + command_line.Append(Environment.GetCommandLineArgs()); + app.SetCommandArray(command_line); app.ArgumentsEvt += (object sender, LoopArgumentsEvt_Args evt) => { if (evt.arg.Initialization) { OnInitialize(evt.arg.Argv); diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h index 348b0f5b6d..3615219c38 100644 --- a/src/lib/ecore/Ecore_Eo.h +++ b/src/lib/ecore/Ecore_Eo.h @@ -28,6 +28,7 @@ #include "efl_core_env.eo.h" #include "efl_core_proc_env.eo.h" +#include "efl_core_command_line.eo.h" #include "efl_loop_message.eo.h" #include "efl_loop_message_handler.eo.h" diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo index f90324b39d..e046428626 100644 --- a/src/lib/ecore/efl_app.eo +++ b/src/lib/ecore/efl_app.eo @@ -1,6 +1,6 @@ import efl_types; -class Efl.App extends Efl.Loop +class Efl.App extends Efl.Loop implements Efl.Core.Command_Line { [[ ]] data: null; diff --git a/src/lib/ecore/efl_appthread.eo b/src/lib/ecore/efl_appthread.eo index c60308f468..82a9d77ace 100644 --- a/src/lib/ecore/efl_appthread.eo +++ b/src/lib/ecore/efl_appthread.eo @@ -1,4 +1,4 @@ -class Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer +class Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line { [[ ]] methods { diff --git a/src/lib/ecore/efl_core_command_line.c b/src/lib/ecore/efl_core_command_line.c new file mode 100644 index 0000000000..74ae690c26 --- /dev/null +++ b/src/lib/ecore/efl_core_command_line.c @@ -0,0 +1,267 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#define EFL_CORE_COMMAND_LINE_PROTECTED + +#include + +#define MY_CLASS EFL_CORE_COMMAND_LINE_MIXIN + +typedef struct { + Eina_Bool filled; + char *string_command; + Eina_Array *command; +} Efl_Core_Command_Line_Data; + +static Eina_Array * +_unescape(const char *s) +{ + Eina_Array *args; + const char *p; + char *tmp = NULL, *d = NULL; + if (!s) return NULL; + + Eina_Bool in_quote_dbl = EINA_FALSE; + Eina_Bool in_quote = EINA_FALSE; + + args = eina_array_new(16); + if (!args) return NULL; + for (p = s; *p; p++) + { + if (!tmp) tmp = d = strdup(p); + if (tmp) + { + if (in_quote_dbl) + { + switch (*p) + { + case '\"': + in_quote_dbl = EINA_FALSE; + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + tmp = d = NULL; + break; + case '\\': + p++; + EINA_FALLTHROUGH + default: + *d = *p; + d++; + break; + } + } + else if (in_quote) + { + switch (*p) + { + case '\'': + in_quote = EINA_FALSE; + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + tmp = d = NULL; + break; + case '\\': + p++; + EINA_FALLTHROUGH + default: + *d = *p; + d++; + break; + } + } + else + { + switch (*p) + { + case ' ': + case '\t': + case '\r': + case '\n': + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + tmp = d = NULL; + break; + case '\"': + in_quote_dbl = EINA_TRUE; + break; + case '\'': + in_quote = EINA_TRUE; + break; + case '\\': + p++; + EINA_FALLTHROUGH + default: + *d = *p; + d++; + break; + } + } + } + } + if (tmp) + { + *d = 0; + eina_array_push(args, eina_stringshare_add(tmp)); + free(tmp); + } + return args; +} + +static char * +_escape(const char *s) +{ + Eina_Bool need_quote = EINA_FALSE; + const char *p; + char *s2 = malloc((strlen(s) * 2) + 1 + 2), *d; + + if (!s2) return NULL; + + for (p = s; *p; p++) + { + switch (*p) + { + case '\'': + case '\"': + case '$': + case '#': + case ';': + case '&': + case '`': + case '|': + case '(': + case ')': + case '[': + case ']': + case '{': + case '}': + case '>': + case '<': + case '\n': + case '\r': + case '\t': + case ' ': + need_quote = EINA_TRUE; + default: + break; + } + } + + d = s2; + if (need_quote) + { + *d = '\"'; + d++; + } + for (p = s; *p; p++, d++) + { + switch (*p) + { + case '\\': + case '\'': + case '\"': + *d = '\\'; + d++; + EINA_FALLTHROUGH + default: + *d = *p; + break; + } + } + if (need_quote) + { + *d = '\"'; + d++; + } + *d = 0; + return s2; +} + +EOLIAN static const char* +_efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) +{ + return eina_strdup(pd->string_command); +} + +EOLIAN static Eina_Accessor* +_efl_core_command_line_command_access(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) +{ + return pd->command ? eina_array_accessor_new(pd->command) : NULL; +} + +static void +_remove_invalid_chars(char *command) +{ + for (unsigned int i = 0; i < strlen(command); ++i) + { + char c = command[i]; + if (c < 0x20 || c == 0x7f) + command[i] = '\x12'; + } +} + +EOLIAN static Eina_Bool +_efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd, Eina_Array *array) +{ + EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE); + Eina_Strbuf *command = eina_strbuf_new(); + unsigned int i = 0; + + pd->command = eina_array_new(eina_array_count(array)); + for (i = 0; i < (array ? eina_array_count(array) : 0); ++i) + { + char *content = eina_array_data_get(array, i); + char *param = calloc(1, strlen(content)); + + if (!param) + { + free(param); + while (eina_array_count(pd->command) > 0) + eina_stringshare_del(eina_array_pop(pd->command)); + eina_array_free(pd->command); + pd->command = NULL; + eina_array_free(array); + return EINA_FALSE; + } + + //build the command + if (i != 0) + eina_strbuf_append(command, " "); + eina_strbuf_append(command, _escape(content)); + //convert string to stringshare + strcpy(param, content); + _remove_invalid_chars(param); + eina_array_push(pd->command, eina_stringshare_add(param)); + free(param); + } + pd->string_command = eina_strbuf_release(command); + pd->filled = EINA_TRUE; + eina_array_free(array); + + return EINA_TRUE; +} + +EOLIAN static Eina_Bool +_efl_core_command_line_command_string_set(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd, const char *str) +{ + EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE); + + pd->string_command = eina_strdup(str); + _remove_invalid_chars(pd->string_command); + pd->command = _unescape(str); + if (!pd->command) + { + if (pd->string_command) + free(pd->string_command); + pd->string_command = NULL; + return EINA_FALSE; + } + pd->filled = EINA_TRUE; + + return EINA_TRUE; +} + +#include "efl_core_command_line.eo.c" diff --git a/src/lib/ecore/efl_core_command_line.eo b/src/lib/ecore/efl_core_command_line.eo new file mode 100644 index 0000000000..1cbb020856 --- /dev/null +++ b/src/lib/ecore/efl_core_command_line.eo @@ -0,0 +1,80 @@ +mixin Efl.Core.Command_Line { + [[A mixin that implements standard functions for command lines. + + This object parses the command line that gets passed, later the object can be accessed via accessor or the string directly. + ]] + methods { + @property command { + [[ A commandline that encodes arguments in a command string. + This command is unix shell-style, thus whitespace separates + arguments unless escaped. Also a semi-colon ';', ampersand + '&', pipe/bar '|', hash '#', bracket, square brace, brace + character ('(', ')', '[', ']', '{', '}'), exclamation + mark '!', backquote '`', greator or less than ('>' '<') + character unless escaped or in quotes would cause + args_count/value to not be generated properly, because + it would force complex shell interpretation which + will not be supported in evaluating the arg_count/value + information, but the final shell may interpret this if this + is executed via a command-line shell. To not be a complex + shell command, it should be simple with paths, options + and variable expansions, but nothing more complex involving + the above unescaped characters. + + "cat -option /path/file" + "cat 'quoted argument'" + "cat ~/path/escaped\ argument" + "/bin/cat escaped\ argument $VARIABLE" + etc. + + It should not try and use "complex shell features" if you + want the arg_count and arg_value set to be correct after + setting the command string. For example none of: + + "VAR=x /bin/command && /bin/othercommand >& /dev/null" + "VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &" + etc. + + If you set the command the arg_count/value property contents + can change and be completely re-evaluated by parsing the + command string into an argument array set along with + interpreting escapes back into individual argument strings. + ]] + get { + + } + values { + commandline : string; + } + } + command_access { + [[ Get the accessor which enables access to each argument that got passed to this object. ]] + return : accessor; + } + @property command_array { + [[ Use an array to fill this object + + Every element of a string is a argument. + ]] + set { + return : bool; [[On success $true, $false otherwise]] + } + values { + array : array @owned; [[An array where every array field is an argument]] + } + } + @property command_string { + [[ Use a string to fill this object + + The string will be split at every unescaped ' ', every resulting substring will be a new argument to the command line. + ]] + set { + return : bool; [[On success $true, $false otherwise]] + } + values { + str : string; [[A command in form of a string]] + } + + } + } +} diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c index 4b3bc658d6..61ff4ba798 100644 --- a/src/lib/ecore/efl_exe.c +++ b/src/lib/ecore/efl_exe.c @@ -395,7 +395,7 @@ _efl_exe_efl_task_priority_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) } EOLIAN static Eina_Future * -_efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) +_efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd) { #ifdef _WIN32 return EINA_FALSE; @@ -414,7 +414,7 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) if (!td) return NULL; // get a cmdline to run - cmd = efl_task_command_get(obj); + cmd = efl_core_command_line_command_get(obj); if (!cmd) return NULL; ret = pipe(pipe_exited); diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index 111814af21..b7f97da7dc 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -19,7 +19,7 @@ enum Efl.Exe_Flags { hide_io = 4 } -class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer +class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer,Efl.Core.Command_Line { [[ ]] methods { diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index 68f9573b76..cf8600c998 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -383,17 +383,19 @@ _efl_loop_arguments_cleanup(Eo *o EINA_UNUSED, void *data, const Eina_Future *de EAPI void ecore_loop_arguments_send(int argc, const char **argv) { - Eina_Array *arga; + Eina_Array *arga, *cml; int i = 0; - efl_task_arg_reset(efl_main_loop_get()); arga = eina_array_new(argc); + cml = eina_array_new(argc); for (i = 0; i < argc; i++) { - eina_array_push(arga, eina_stringshare_add(argv[i])); - efl_task_arg_append(efl_main_loop_get(), argv[i]); + Eina_Stringshare *arg = eina_stringshare_add(argv[i]); + eina_array_push(arga, arg); + eina_array_push(cml, arg); } + efl_core_command_line_command_array_set(efl_app_main_get(EFL_APP_CLASS), cml); efl_future_then(efl_main_loop_get(), efl_loop_job(efl_main_loop_get()), .success = _efl_loop_arguments_send, .free = _efl_loop_arguments_cleanup, diff --git a/src/lib/ecore/efl_task.c b/src/lib/ecore/efl_task.c index 311de0506a..d610fcbf8b 100644 --- a/src/lib/ecore/efl_task.c +++ b/src/lib/ecore/efl_task.c @@ -12,303 +12,6 @@ ////////////////////////////////////////////////////////////////////////// -static void -_clear_args(Efl_Task_Data *pd) -{ - unsigned int count, i; - - if (!pd->args) return; - count = eina_array_count(pd->args); - for (i = 0; i < count; i++) - eina_stringshare_del(eina_array_data_get(pd->args, i)); - eina_array_free(pd->args); - pd->args = NULL; -} - -static Eina_Array * -_unescape(const char *s) -{ - Eina_Array *args; - const char *p; - char *tmp = NULL, *d = NULL; - if (!s) return NULL; - - Eina_Bool in_quote_dbl = EINA_FALSE; - Eina_Bool in_quote = EINA_FALSE; - - args = eina_array_new(16); - if (!args) return NULL; - for (p = s; *p; p++) - { - if (!tmp) tmp = d = strdup(p); - if (tmp) - { - if (in_quote_dbl) - { - switch (*p) - { - case '\"': - in_quote_dbl = EINA_FALSE; - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - tmp = d = NULL; - break; - case '\\': - p++; - EINA_FALLTHROUGH - default: - *d = *p; - d++; - break; - } - } - else if (in_quote) - { - switch (*p) - { - case '\'': - in_quote = EINA_FALSE; - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - tmp = d = NULL; - break; - case '\\': - p++; - EINA_FALLTHROUGH - default: - *d = *p; - d++; - break; - } - } - else - { - switch (*p) - { - case ' ': - case '\t': - case '\r': - case '\n': - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - tmp = d = NULL; - break; - case '\"': - in_quote_dbl = EINA_TRUE; - break; - case '\'': - in_quote = EINA_TRUE; - break; - case '\\': - p++; - EINA_FALLTHROUGH - default: - *d = *p; - d++; - break; - } - } - } - } - if (tmp) - { - *d = 0; - eina_array_push(args, eina_stringshare_add(tmp)); - free(tmp); - } - return args; -} - -static char * -_escape(const char *s) -{ - Eina_Bool need_quote = EINA_FALSE; - const char *p; - char *s2 = malloc((strlen(s) * 2) + 1 + 2), *d; - - if (!s2) return NULL; - - for (p = s; *p; p++) - { - switch (*p) - { - case '\'': - case '\"': - case '$': - case '#': - case ';': - case '&': - case '`': - case '|': - case '(': - case ')': - case '[': - case ']': - case '{': - case '}': - case '>': - case '<': - case '\n': - case '\r': - case '\t': - need_quote = EINA_TRUE; - default: - break; - } - } - - d = s2; - if (need_quote) - { - *d = '\"'; - d++; - } - for (p = s; *p; p++, d++) - { - switch (*p) - { - case ' ': - case '\\': - case '\'': - case '\"': - *d = '\\'; - d++; - EINA_FALLTHROUGH - default: - *d = *p; - break; - } - } - if (need_quote) - { - *d = '\"'; - d++; - } - *d = 0; - return s2; -} - -static void -_rebuild_command(Efl_Task_Data *pd) -{ - unsigned int count, i; - Eina_Strbuf *sb; - const char *arg, *cmd; - Eina_Bool have_args = EINA_FALSE; - - if (!pd->command_dirty) return; - pd->command_dirty = EINA_FALSE; - eina_stringshare_del(pd->command); - pd->command = NULL; - if (!pd->args) return; - sb = eina_strbuf_new(); - if (!sb) return; - count = eina_array_count(pd->args); - for (i = 0; i < count; i++) - { - arg = eina_array_data_get(pd->args, i); - if (arg) - { - char *str = _escape(arg); - if (str) - { - if (have_args) eina_strbuf_append(sb, " "); - eina_strbuf_append(sb, str); - free(str); - have_args = EINA_TRUE; - } - } - } - cmd = eina_strbuf_string_get(sb); - if (cmd) pd->command = eina_stringshare_add(cmd); - eina_strbuf_free(sb); -} - -////////////////////////////////////////////////////////////////////////// - -EOLIAN static void -_efl_task_command_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *command) -{ - eina_stringshare_replace(&pd->command, command); - _clear_args(pd); - pd->args = _unescape(pd->command); -} - -EOLIAN static const char * -_efl_task_command_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd) -{ - _rebuild_command(pd); - return pd->command; -} - -EOLIAN static unsigned int -_efl_task_arg_count_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd) -{ - if (!pd->args) return 0; - return eina_array_count(pd->args); -} - -EOLIAN static void -_efl_task_arg_value_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, unsigned int num, const char *arg) -{ - const char *parg = NULL; - unsigned int count; - - if (!pd->args) pd->args = eina_array_new(16); - count = eina_array_count(pd->args); - if ((count > 0) && (count > num)) - parg = eina_array_data_get(pd->args, num); - else - { - unsigned int i; - - for (i = count; i <= num; i++) - { - eina_array_push(pd->args, ""); - eina_array_data_set(pd->args, i, NULL); - } - } - - if (arg) - eina_array_data_set(pd->args, num, eina_stringshare_add(arg)); - else - eina_array_data_set(pd->args, num, NULL); - if (parg) eina_stringshare_del(parg); - pd->command_dirty = EINA_TRUE; -} - -EOLIAN static const char * -_efl_task_arg_value_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd, unsigned int num) -{ - unsigned int count; - - if (!pd->args) return NULL; - count = eina_array_count(pd->args); - if (num >= count) return NULL; - return eina_array_data_get(pd->args, num); -} - -EOLIAN static void -_efl_task_arg_append(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, const char *arg) -{ - if (!pd->args) pd->args = eina_array_new(16); - if (arg) - eina_array_push(pd->args, eina_stringshare_add(arg)); - else - eina_array_push(pd->args, NULL); - pd->command_dirty = EINA_TRUE; -} - -EOLIAN static void -_efl_task_arg_reset(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) -{ - _clear_args(pd); - pd->command_dirty = EINA_TRUE; -} - EOLIAN static void _efl_task_priority_set(Eo *obj EINA_UNUSED, Efl_Task_Data *pd, Efl_Task_Priority priority) { @@ -344,7 +47,6 @@ _efl_task_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Task_Data *pd) { eina_stringshare_del(pd->command); pd->command = NULL; - _clear_args(pd); efl_destructor(efl_super(obj, MY_CLASS)); } diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index 526746ff60..ddab5e6826 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -19,83 +19,6 @@ abstract Efl.Task extends Efl.Object { [[ ]] methods { - @property command { - [[ A commandline that encodes arguments in a command string. - This command is unix shell-style, thus whitespace separates - arguments unless escaped. Also a semi-colon ';', ampersand - '&', pipe/bar '|', hash '#', bracket, square brace, brace - character ('(', ')', '[', ']', '{', '}'), exclamation - mark '!', backquote '`', greator or less than ('>' '<') - character unless escaped or in quotes would cause - args_count/value to not be generated properly, because - it would force complex shell interpretation which - will not be supported in evaluating the arg_count/value - information, but the final shell may interpret this if this - is executed via a command-line shell. To not be a complex - shell command, it should be simple with paths, options - and variable expansions, but nothing more complex involving - the above unescaped characters. - - "cat -option /path/file" - "cat 'quoted argument'" - "cat ~/path/escaped\ argument" - "/bin/cat escaped\ argument $VARIABLE" - etc. - - It should not try and use "complex shell features" if you - want the arg_count and arg_value set to be correct after - setting the command string. For example none of: - - "VAR=x /bin/command && /bin/othercommand >& /dev/null" - "VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &" - etc. - - If you set the command the arg_count/value property contents - can change and be completely re-evaluated by parsing the - command string into an argument array set along with - interpreting escapes back into individual argument strings. ]] - get { } - set { } - values { - command: string; [[ The command string as described ]] - } - } - @property arg_count { - [[ Number of arguments passed in or arguments that are to be - passed as sepcified by arg_value ]] - get { } - values { - args: uint; [[ ]] - } - } - @property arg_value { - [[ Argument number by index. If the index does not exist when - set, it is allocated and created. Getting an argument that - Has not been set yet will return $NULL. Empty arguments will - Be ignored. Setting an argument will result in the command - porperty being re-evaluated and escaped into a single - command string if needed. ]] - set { } - get { } - keys { - num: uint; [[ ]] - } - values { - arg: string; [[ ]] - } - } - arg_append { - [[ Append a new string argument at the end of the arg set. - This functions like setting an arg_value at the end of the - current set so the set increases by 1 in size. ]] - params { - arg: string; [[ ]] - } - } - arg_reset { - [[ Clear all arguments in arg_value/count set. Will result in the - command property also being cleared. ]] - } @property priority { [[ The priority of this task. ]] get { } diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c index 4d48296093..a324af4f58 100644 --- a/src/lib/ecore/efl_thread.c +++ b/src/lib/ecore/efl_thread.c @@ -25,10 +25,7 @@ typedef struct int in, out; Eo *in_handler, *out_handler; } fd, ctrl; - struct { - unsigned int argc; - const char **argv; - } args; + Eina_Array *argv; Efl_Callback_Array_Item_Full *event_cb; void *indata, *outdata; } Thread_Data; @@ -151,16 +148,16 @@ _efl_loop_arguments_send(Eo *obj, void *data EINA_UNUSED, const Eina_Value v) Efl_Loop_Arguments arge; Eina_Array *arga; Eina_Stringshare *s; - unsigned int argc = efl_task_arg_count_get(obj); - unsigned int i; + Eina_Accessor *accessor; + const char *argv; + int i = 0; - arga = eina_array_new(argc); + accessor = efl_core_command_line_command_access(obj); + arga = eina_array_new(10); - for (i = 0; i < argc; i++) + EINA_ACCESSOR_FOREACH(accessor, i, argv) { - const char *argv = efl_task_arg_value_get(obj, i); - if (argv) - eina_array_push(arga, eina_stringshare_add(argv)); + eina_array_push(arga, eina_stringshare_add(argv)); } arge.argv = arga; arge.initialization = EINA_TRUE; @@ -229,7 +226,6 @@ _efl_thread_main(void *data, Eina_Thread t) Eo *obj; Eina_Value *ret; Control_Data cmd; - unsigned int i; int real; Efl_Callback_Array_Item_Full *it; @@ -280,16 +276,13 @@ _efl_thread_main(void *data, Eina_Thread t) efl_event_callback_priority_add(obj, it->desc, it->priority, it->func, it->user_data); } - for (i = 0; i < thdat->args.argc; i++) - efl_task_arg_append(obj, thdat->args.argv[i]); + efl_core_command_line_command_array_set(obj, thdat->argv); efl_future_then(obj, efl_loop_job(obj), .success = _efl_loop_arguments_send); - for (i = 0; i < thdat->args.argc; i++) - eina_stringshare_del(thdat->args.argv[i]); - free(thdat->args.argv); + while (thdat->argv && eina_array_count(thdat->argv)) free(eina_array_pop(thdat->argv)); + eina_array_free(thdat->argv); free(thdat->event_cb); - thdat->args.argv = NULL; thdat->event_cb = NULL; ret = efl_loop_begin(obj); @@ -575,7 +568,7 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) const char *name; int pipe_to_thread[2]; int pipe_from_thread[2]; - unsigned int argc, i, num; + unsigned int num; Efl_Callback_Array_Item_Full *it; Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS); @@ -729,24 +722,23 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) name = efl_name_get(obj); if (name) thdat->name = eina_stringshare_add(name); - argc = efl_task_arg_count_get(obj); - if (argc > 0) - { - thdat->args.argc = argc; - thdat->args.argv = malloc(argc * sizeof(char *)); - if (thdat->args.argv) - { - for (i = 0; i < argc; i++) - { - const char *argv = efl_task_arg_value_get(obj, i); - if (argv) - thdat->args.argv[i] = eina_stringshare_add(argv); - else - thdat->args.argv[i] = NULL; - } - } - // XXX: if malloc fails? - } + { + Eina_Accessor *acc; + int i = 0; + const char *argv; + + acc = efl_core_command_line_command_access(obj); + if (acc) + { + thdat->argv = eina_array_new(0); + EINA_ACCESSOR_FOREACH(acc, i, argv) + { + eina_array_push(thdat->argv, eina_stringshare_add(argv)); + } + } + + } + if (pd->event_cb) { num = 0; @@ -762,9 +754,8 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) if (!eina_thread_create(&(pd->thread), pri, -1, _efl_thread_main, thdat)) { - for (i = 0; i < thdat->args.argc; i++) - eina_stringshare_del(thdat->args.argv[i]); - free(thdat->args.argv); + while (eina_array_count(thdat->argv)) eina_stringshare_del(eina_array_pop(thdat->argv)); + eina_array_free(thdat->argv); efl_del(pd->fd.in_handler); efl_del(pd->fd.out_handler); efl_del(pd->ctrl.in_handler); diff --git a/src/lib/ecore/efl_thread.eo b/src/lib/ecore/efl_thread.eo index 7837c7bfdb..02bf2f15df 100644 --- a/src/lib/ecore/efl_thread.eo +++ b/src/lib/ecore/efl_thread.eo @@ -1,4 +1,4 @@ -class Efl.Thread extends Efl.Task implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer +class Efl.Thread extends Efl.Task implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line { methods { } diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build index 98909cb618..2e44804481 100644 --- a/src/lib/ecore/meson.build +++ b/src/lib/ecore/meson.build @@ -76,7 +76,8 @@ pub_eo_files = [ 'efl_composite_model.eo', 'efl_view_model.eo', 'efl_core_env.eo', - 'efl_core_proc_env.eo' + 'efl_core_proc_env.eo', + 'efl_core_command_line.eo', ] foreach eo_file : pub_eo_files @@ -180,10 +181,12 @@ ecore_src = [ 'ecore_main_common.h', 'efl_exe.c', 'efl_thread.c', + 'efl_appthread.c', 'efl_threadio.c', 'efl_appthread.c', 'efl_core_env.c', 'efl_core_proc_env.c', + 'efl_core_command_line.c', ] if sys_windows == true diff --git a/src/tests/ecore/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c index cd26e2d95e..2cab632622 100644 --- a/src/tests/ecore/efl_app_suite.c +++ b/src/tests/ecore/efl_app_suite.c @@ -53,6 +53,7 @@ static const Efl_Test_Case etc[] = { { "Promise", efl_app_test_promise_3 }, { "Promise", efl_app_test_promise_safety }, { "Env", efl_test_efl_env }, + { "CML", efl_test_efl_cml }, { NULL, NULL } }; diff --git a/src/tests/ecore/efl_app_suite.h b/src/tests/ecore/efl_app_suite.h index 3a66dcdfcf..874d2bb503 100644 --- a/src/tests/ecore/efl_app_suite.h +++ b/src/tests/ecore/efl_app_suite.h @@ -12,5 +12,6 @@ void efl_app_test_promise_2(TCase *tc); void efl_app_test_promise_3(TCase *tc); void efl_app_test_promise_safety(TCase *tc); void efl_test_efl_env(TCase *tc); +void efl_test_efl_cml(TCase *tc); #endif /* _EFL_APP_SUITE_H */ diff --git a/src/tests/ecore/efl_app_test_cml.c b/src/tests/ecore/efl_app_test_cml.c new file mode 100644 index 0000000000..1b7cebf552 --- /dev/null +++ b/src/tests/ecore/efl_app_test_cml.c @@ -0,0 +1,85 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#define EFL_CORE_COMMAND_LINE_PROTECTED + +#include +#include +#define EFL_NOLEGACY_API_SUPPORT +#include +#include "efl_app_suite.h" +#include "../efl_check.h" + +typedef struct { + +} Efl_App_Test_CML_Data; + +#include "efl_app_test_cml.eo.h" +#include "efl_app_test_cml.eo.c" + +static Eina_Array* +_construct_array(void) +{ + Eina_Array *array = eina_array_new(16); + + eina_array_push(array, "/bin/sh"); + eina_array_push(array, "-C"); + eina_array_push(array, "foo"); + eina_array_push(array, "--test"); + eina_array_push(array, "--option=done"); + eina_array_push(array, "--"); + eina_array_push(array, "asdf --test"); + return array; +} + +static const char* +_construct_string(void) +{ + return "/bin/sh -C foo --test --option=done -- \"asdf --test\""; +} + +EFL_START_TEST(efl_core_cml_string) +{ + Efl_App_Test_CML *cml = efl_add_ref(EFL_APP_TEST_CML_CLASS, NULL); + Eina_Array *content = _construct_array(); + Eina_Stringshare *str; + Eina_Bool b; + int i = 0; + + b = efl_core_command_line_command_string_set(cml, _construct_string()); + ck_assert_int_ne(b, 0); + + EINA_ACCESSOR_FOREACH(efl_core_command_line_command_access(cml), i, str) + { + ck_assert_str_eq(eina_array_data_get(content, i), str); + } + ck_assert_str_eq(efl_core_command_line_command_get(cml), _construct_string()); +} +EFL_END_TEST + +EFL_START_TEST(efl_core_cml_array) +{ + Efl_App_Test_CML *cml = efl_add_ref(EFL_APP_TEST_CML_CLASS, NULL); + Eina_Array *content1 = _construct_array(); + Eina_Array *content2 = _construct_array(); + Eina_Stringshare *str; + Eina_Bool b; + int i = 0; + + b = efl_core_command_line_command_array_set(cml, content1); + ck_assert_int_ne(b, 0); + + EINA_ACCESSOR_FOREACH(efl_core_command_line_command_access(cml), i, str) + { + ck_assert_str_eq(eina_array_data_get(content2, i), str); + } + ck_assert_str_eq(efl_core_command_line_command_get(cml), _construct_string()); +} +EFL_END_TEST + +void efl_test_efl_cml(TCase *tc) +{ + tcase_add_test(tc, efl_core_cml_string); + tcase_add_test(tc, efl_core_cml_array); +} diff --git a/src/tests/ecore/efl_app_test_cml.eo b/src/tests/ecore/efl_app_test_cml.eo new file mode 100644 index 0000000000..b0877e0cf7 --- /dev/null +++ b/src/tests/ecore/efl_app_test_cml.eo @@ -0,0 +1,4 @@ +class Efl.App.Test.CML extends Efl.Object implements Efl.Core.Command_Line +{ + +} diff --git a/src/tests/ecore/meson.build b/src/tests/ecore/meson.build index e3b4f6c851..c49d941355 100644 --- a/src/tests/ecore/meson.build +++ b/src/tests/ecore/meson.build @@ -76,14 +76,32 @@ efl_app_suite_src = [ 'efl_app_test_loop_fd.c', 'efl_app_test_loop_timer.c', 'efl_app_test_promise.c', - 'efl_app_test_env.c' + 'efl_app_test_env.c', + 'efl_app_test_cml.c', ] +priv_eo_files = [ + 'efl_app_test_cml.eo', +] + +priv_eo_file_target = [] +foreach eo_file : priv_eo_files + priv_eo_file_target += custom_target('eolian_gen_' + eo_file, + input : eo_file, + output : [eo_file + '.h'], + depfile : eo_file + '.d', + command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories, + '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), + '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), + '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'), + '-gchd', '@INPUT@']) +endforeach + efl_app_suite_deps = [m] efl_app_suite_deps += ecore efl_app_suite = executable('efl_app_suite', - efl_app_suite_src, + efl_app_suite_src, priv_eo_file_target, dependencies: [efl_app_suite_deps, check], c_args : [ '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', From e8fe0c9c92386595da0143793e1554c47c17c660 Mon Sep 17 00:00:00 2001 From: Jiyoun Park Date: Wed, 13 Feb 2019 11:16:16 +0900 Subject: [PATCH 23/87] evas_image: fix pixels_dirty_set(False) makes wrong object-change-list. Summary: evas_object_image_pixels_dirty_set(img B, False) means 1. app want to mark image object's data is not dirty anymore 2. app don't want to be called get_pixels callback. that does not mean image need to be redraw. evas_object_image_pixels_dirty_set(img B, True) means 1. image object's data is dirty, so image object need to be redraw. 2. app want to be called get_pixels callback. but pixels_dirty_set(img B, FALSE) function also set o->changed to true, it cause problem related with rendering Below case is the example of problem. 1. Smart object A 2. Child image object B 3. app call pixels_dirty_set(FALSE) inside pixels_get_callback pixels_get_callback is called inside the image object B's rendering. enlightenment's e_comp_object_render do upper job. After adding preload fetch, evas_object_image_render_post can call evas_object_change. https://phab.enlightenment.org/D7157 evas_render_updates_internal 0. enlightenment call evas_object_image_pixels_dirty_set(img B, TRUE) o->changed = 1; evas_object_change(img B) 1. smart obj A is in render_objects 2. evas_object_image_render_pre B, o->change=0 3. evas_render_mapped (Smart A) 3-1. evas_render_mapped (img B) : enlightenment call evas_object_image_pixels_dirty_set(img B, False) : o->changed=1 3-2. evas_object_change_reset(img B) 4. pending_change(img B) 4-1. evas_object_image_render_post(img B) o->changed=1 (3-1 step) evas_object_change(img B)->evas_object_change(Smart A) 5. render_post_reset smart A is chaged(4-1 step), so, called evas_object_change_reset(Smart A) ###smart A is reset(5 step), img B is changed(4-1 step). after this case, img B never get change to be redraw. Reviewers: Hermet, cedric, zmike, ManMower Reviewed By: Hermet Subscribers: zmike, ManMower, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7821 --- src/lib/evas/canvas/evas_image_legacy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c index 6fa92672d3..9891a68b15 100644 --- a/src/lib/evas/canvas/evas_image_legacy.c +++ b/src/lib/evas/canvas/evas_image_legacy.c @@ -549,9 +549,13 @@ evas_object_image_pixels_dirty_set(Eo *eo_obj, Eina_Bool dirty) Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS); evas_object_async_block(obj); - if (dirty) o->dirty_pixels = EINA_TRUE; + if (dirty) + { + o->dirty_pixels = EINA_TRUE; + o->changed = EINA_TRUE; + } else o->dirty_pixels = EINA_FALSE; - o->changed = EINA_TRUE; + evas_object_change(eo_obj, obj); } From ce7914c67ec380dc26e1799ec814f32790f398ea Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Wed, 13 Feb 2019 16:15:57 +0900 Subject: [PATCH 24/87] edje: add missing NULL check --- src/lib/edje/edje_part_text.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/edje/edje_part_text.c b/src/lib/edje/edje_part_text.c index 9143ef17aa..8f7d936cb6 100644 --- a/src/lib/edje/edje_part_text.c +++ b/src/lib/edje/edje_part_text.c @@ -477,6 +477,8 @@ _canvas_layout_user_text_collect(Edje *ed, Edje_User_Defined *eud) Eina_List **props = &eud->u.text_style.props; rp = _edje_real_part_recursive_get(&ed, eud->part); + if (!rp) return; + if (eud->u.text_style.types == EDJE_PART_TEXT_PROP_NONE) return; if (eud->u.text_style.types & EDJE_PART_TEXT_PROP_BACKING_TYPE) From f4e5d32107aa8dd3c42574819cd47032251d8bf8 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Wed, 13 Feb 2019 11:31:31 +0100 Subject: [PATCH 25/87] mono examples: Fix after removing init method This was preventing "make examples" from working. --- src/examples/ecore/efl_mono_loop_timer_example.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/examples/ecore/efl_mono_loop_timer_example.cs b/src/examples/ecore/efl_mono_loop_timer_example.cs index 8c692753a4..4d38a46d5a 100644 --- a/src/examples/ecore/efl_mono_loop_timer_example.cs +++ b/src/examples/ecore/efl_mono_loop_timer_example.cs @@ -18,9 +18,7 @@ class TestMain Efl.All.Init(); var loop = new Efl.Loop(); - var timer = new Efl.LoopTimer(loop, (Efl.LoopTimer t) => { - t.SetInterval(1.0); - }); + var timer = new Efl.LoopTimer(loop, interval:1.0); TestMain listener = new TestMain(loop); From bad145f313451c47a3b67d1b6ca1b6e36469e654 Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Wed, 13 Feb 2019 19:38:48 +0900 Subject: [PATCH 26/87] edje: add missing NULL checks --- src/lib/edje/edje_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 4f27839066..f5e80ce151 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -2039,6 +2039,7 @@ _edje_user_text_style_definition_fetch(Edje *ed, const char *part) if (!eud) { eud = _edje_user_definition_new(EDJE_USER_TEXT_STYLE, part, ed); + if (!eud) return NULL; eud->u.text_style.types = EDJE_PART_TEXT_PROP_NONE; eud->u.text_style.props = NULL; } @@ -2063,6 +2064,7 @@ _edje_user_text_expand_definition_fetch(Edje *ed, const char *part) if (!eud) { eud = _edje_user_definition_new(EDJE_USER_TEXT_EXPAND, part, ed); + if (!eud) return NULL; eud->u.text_expand.expand = EFL_CANVAS_LAYOUT_PART_TEXT_EXPAND_NONE; } From 9ad84605b66b0f96025bc93f6fe8933ae56e3961 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 13 Feb 2019 12:30:00 +0100 Subject: [PATCH 27/87] Revert "elm_config: fix elm_config_save not to wake idle processes up" This reverts commit 8b0b9ed2819588fbf81299b784a600c6ac7ccd13. There have been issues with this commit, for further informations, please see https://phab.enlightenment.org/D7354 for more details. --- src/lib/elementary/efl_ui_win.c | 1 - src/lib/elementary/elm_config.c | 268 +++++++++++--------------------- src/lib/elementary/elm_priv.h | 2 +- 3 files changed, 92 insertions(+), 179 deletions(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 152eb1ce20..72188bf5f9 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -1488,7 +1488,6 @@ _elm_win_profile_update(Efl_Ui_Win_Data *sd) _config_profile_lock = EINA_TRUE; _elm_config_profile_set(sd->profile.name); - _config_profile_lock = EINA_FALSE; /* update sub ee */ Ecore_Evas *ee2; diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index 7d7e85d438..12208dd2b9 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c @@ -5,8 +5,6 @@ #include #include "elm_priv.h" #include -#include - #include "efl_config_global.eo.h" @@ -36,7 +34,8 @@ static void _elm_config_key_binding_hash(void); Eina_Bool _config_profile_lock = EINA_FALSE; static Ecore_Timer *_config_change_delay_timer = NULL; static Ecore_Timer *_config_profile_change_delay_timer = NULL; -static Ecore_Event_Handler *_monitor_file_modified_handler = NULL; +static Ecore_Event_Handler *_monitor_file_created_handler = NULL; +static Ecore_Event_Handler *_monitor_directory_created_handler = NULL; static Eio_Monitor *_eio_config_monitor = NULL; static Eio_Monitor *_eio_profile_monitor = NULL; @@ -190,7 +189,6 @@ static void _config_sub_apply(void); static void _config_update(void); static void _env_get(void); static void _color_overlays_cancel(void); -static Eina_Bool _file_touch(const char *file); #define ELM_CONFIG_VAL(edd, type, member, dtype) \ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, type, #member, member, dtype) @@ -1626,19 +1624,20 @@ _elm_recache(void) } static Elm_Config * -_config_user_load(Eina_Bool on_flush) +_config_user_load(void) { Elm_Config *cfg = NULL; Eet_File *ef; char buf[PATH_MAX]; - if (on_flush) - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/.base.flush.cfg", - _elm_profile); + _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s", + _elm_profile); + ecore_file_mkpath(buf); + if (_eio_config_monitor) eio_monitor_del(_eio_config_monitor); + _eio_config_monitor = eio_monitor_add(buf); - if ((on_flush && !ecore_file_exists(buf)) || !on_flush) - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg", - _elm_profile); + _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg", + _elm_profile); ef = eet_open(buf, EET_FILE_MODE_READ); if (ef) @@ -1691,7 +1690,7 @@ _efl_config_obj_del(Eo *obj EINA_UNUSED) } static void -_config_load(Eina_Bool on_flush) +_config_load(void) { if (_efl_config_obj) { @@ -1710,7 +1709,7 @@ _config_load(Eina_Bool on_flush) efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del); if (!_use_build_config) { - _elm_config = _config_user_load(on_flush); + _elm_config = _config_user_load(); if (_elm_config) { if ((_elm_config->config_version >> ELM_CONFIG_VERSION_EPOCH_OFFSET) < ELM_CONFIG_EPOCH) @@ -1880,13 +1879,13 @@ _config_load(Eina_Bool on_flush) } static void -_elm_config_reload_do(Eina_Bool on_flush) +_elm_config_reload_do(void) { Elm_Config *prev_config; prev_config = _elm_config; _elm_config = NULL; - _config_load(on_flush); + _config_load(); if ((prev_config) && (_elm_config)) { #define KEEP_VAL(xxx) \ @@ -2107,7 +2106,7 @@ _config_flush_get(void) _elm_config_font_overlays_cancel(); _color_overlays_cancel(); - _elm_config_reload_do(EINA_TRUE); + _elm_config_reload_do(); /* restore prev value which is not part of the EET file */ _elm_config->is_mirrored = is_mirrored; @@ -2191,36 +2190,6 @@ _elm_config_eet_close_error_get(Eet_File *ef, return NULL; } -static char * -_elm_config_profile_name_get() -{ - char buf[PATH_MAX], *p; - Eet_File *ef = NULL; - int len = 0; - char *rst = NULL; - - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg"); - - ef = eet_open(buf, EET_FILE_MODE_READ); - if (ef) - { - p = eet_read(ef, "config", &len); - if (p) - { - rst = calloc(1, len+1); - memcpy(rst, p, len); - rst[len] = '\0'; - free(p); - } - eet_close(ef); - } - - if (rst) - return rst; - else - return strdup("default"); -} - static Eina_Bool _elm_config_profile_save(const char *profile) { @@ -2230,50 +2199,43 @@ _elm_config_profile_save(const char *profile) const char *err, *s; Eet_File *ef; size_t len; - char *_file_profile = NULL; if ((s = getenv("ELM_PROFILE_NOSAVE")) && atoi(s)) return EINA_TRUE; - _file_profile = _elm_config_profile_name_get(); + len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg"); + if (len + 1 >= sizeof(buf)) + return EINA_FALSE; - if (!_file_profile || strcmp(_elm_profile, _file_profile)) + len = _elm_config_user_dir_snprintf(buf2, sizeof(buf2), + "config/profile.cfg.tmp"); + if (len + 1 >= sizeof(buf2)) + return EINA_FALSE; + + ef = eet_open(buf2, EET_FILE_MODE_WRITE); + if (!ef) + return EINA_FALSE; + + ok = eet_write(ef, "config", _elm_profile, strlen(_elm_profile), 0); + if (!ok) + goto err; + + err = _elm_config_eet_close_error_get(ef, buf2); + if (err) { - len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg"); - if (len + 1 >= sizeof(buf)) - return EINA_FALSE; - - len = _elm_config_user_dir_snprintf(buf2, sizeof(buf2), - "config/profile.cfg.tmp"); - if (len + 1 >= sizeof(buf2)) - return EINA_FALSE; - - ef = eet_open(buf2, EET_FILE_MODE_WRITE); - if (!ef) - return EINA_FALSE; - - ok = eet_write(ef, "config", _elm_profile, strlen(_elm_profile), 0); - if (!ok) - goto err; - - err = _elm_config_eet_close_error_get(ef, buf2); - if (err) - { - ERR("%s", err); - free((void *)err); - goto err; - } - - ret = ecore_file_cp(buf2, buf); - if (!ret) - { - ERR("Error saving Elementary's configuration profile file"); - goto err; - } - - ecore_file_unlink(buf2); + ERR("%s", err); + free((void *)err); + goto err; } - free(_file_profile); + + ret = ecore_file_cp(buf2, buf); + if (!ret) + { + ERR("Error saving Elementary's configuration profile file"); + goto err; + } + + ecore_file_unlink(buf2); derived = _elm_config_derived_load(profile ? profile : _elm_profile); if (derived) @@ -2595,10 +2557,10 @@ _env_get(void) eina_stringshare_replace(&_elm_config->engine, s); else if ((!strcasecmp(s, "ews"))) eina_stringshare_replace(&_elm_config->engine, ELM_EWS); - else if ((!strcasecmp(s, "wayland_shm")) || + else if ((!strcasecmp(s, "wayland_shm")) || (!strcasecmp(s, "wayland-shm"))) eina_stringshare_replace(&_elm_config->engine, ELM_WAYLAND_SHM); - else if ((!strcasecmp(s, "wayland_egl")) || + else if ((!strcasecmp(s, "wayland_egl")) || (!strcasecmp(s, "wayland-egl"))) eina_stringshare_replace(&_elm_config->engine, ELM_WAYLAND_EGL); else if ((!strcasecmp(s, "drm"))) @@ -3106,7 +3068,7 @@ elm_config_save(void) EAPI void elm_config_reload(void) { - _elm_config_reload(EINA_FALSE); + _elm_config_reload(); } EAPI const char * @@ -4245,10 +4207,9 @@ elm_config_popup_scrollable_set(Eina_Bool scrollable) EAPI void elm_config_all_flush(void) { - char buf[PATH_MAX], buf2[PATH_MAX]; + char buf[PATH_MAX]; int ok = 0; size_t len; - Eet_File *ef = NULL; len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/"); if (len + 1 >= sizeof(buf)) @@ -4280,27 +4241,6 @@ elm_config_all_flush(void) return; } - _elm_config_user_dir_snprintf(buf, sizeof(buf), - "config/%s/.base.flush.cfg.tmp", _elm_profile); - - _elm_config_user_dir_snprintf(buf2, sizeof(buf2), - "config/%s/.base.flush.cfg", _elm_profile); - - ef = eet_open(buf, EET_FILE_MODE_WRITE); - if (ef) - { - ok = eet_data_write(ef, _config_edd, "config", _elm_config, 1); - if (!ok) - { - eet_close(ef); - ERR("Failed to save config"); - return; - } - eet_close(ef); - ecore_file_cp(buf, buf2); - } - ecore_file_unlink(buf); - elm_config_save(); return; } @@ -4346,7 +4286,7 @@ _elm_config_init(void) _desc_init(); _elm_config_profile_derived_init(); _profile_fetch_from_conf(); - _config_load(EINA_FALSE); + _config_load(); if (_elm_config) _env_get(); ELM_SAFE_FREE(_elm_accel_preference, eina_stringshare_del); ELM_SAFE_FREE(_elm_gl_preference, eina_stringshare_del); @@ -4374,27 +4314,17 @@ _elm_config_sub_shutdown(void) ELM_SAFE_FREE(_eio_profile_monitor, eio_monitor_del); ELM_SAFE_FREE(_config_change_delay_timer, ecore_timer_del); ELM_SAFE_FREE(_config_profile_change_delay_timer, ecore_timer_del); - ELM_SAFE_FREE(_monitor_file_modified_handler, ecore_event_handler_del); + ELM_SAFE_FREE(_monitor_file_created_handler, ecore_event_handler_del); + ELM_SAFE_FREE(_monitor_directory_created_handler, ecore_event_handler_del); } static Eina_Bool _config_profile_change_delay_cb(void *data EINA_UNUSED) { char *pprof = NULL; - char buf[PATH_MAX]; if (_elm_profile) pprof = strdup(_elm_profile); _profile_fetch_from_conf(); - - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg", _elm_profile); - if(!ecore_file_exists(buf)) _file_touch(buf); - - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/.base.flush.cfg", _elm_profile); - if(!ecore_file_exists(buf)) _file_touch(buf); - - ELM_SAFE_FREE(_eio_config_monitor, eio_monitor_del); - _eio_config_monitor = eio_monitor_add(buf); - if ((!pprof) || (!(!strcmp(pprof, _elm_profile)))) { _config_flush_get(); @@ -4407,7 +4337,7 @@ _config_profile_change_delay_cb(void *data EINA_UNUSED) static Eina_Bool _config_change_delay_cb(void *data EINA_UNUSED) { - _elm_config_reload(EINA_TRUE); + _elm_config_reload(); _config_change_delay_timer = NULL; return ECORE_CALLBACK_CANCEL; @@ -4423,21 +4353,42 @@ _elm_config_file_monitor_cb(void *data EINA_UNUSED, if (ev->monitor == _eio_config_monitor) { - if (!strcmp(file, ".base.flush.cfg")) + if (type == EIO_MONITOR_FILE_CREATED) { - if (_config_change_delay_timer) - ecore_timer_del(_config_change_delay_timer); - _config_change_delay_timer = ecore_timer_add(0.1, _config_change_delay_cb, NULL); + if (!strcmp(file, "base.cfg")) + { + if (_config_change_delay_timer) + ecore_timer_del(_config_change_delay_timer); + _config_change_delay_timer = ecore_timer_add(0.1, _config_change_delay_cb, NULL); + } } } - if (ev->monitor == _eio_profile_monitor) { - if (!strcmp(file, "profile.cfg")) + if (type == EIO_MONITOR_FILE_CREATED) { - if (_config_profile_change_delay_timer) - ecore_timer_del(_config_profile_change_delay_timer); - _config_profile_change_delay_timer = ecore_timer_add(0.1, _config_profile_change_delay_cb, NULL); + if ((!_config_profile_lock) && (!strcmp(file, "profile.cfg"))) + { + if (_config_profile_change_delay_timer) + ecore_timer_del(_config_profile_change_delay_timer); + _config_profile_change_delay_timer = ecore_timer_add(0.1, _config_profile_change_delay_cb, NULL); + } + } + else if (type == EIO_MONITOR_DIRECTORY_CREATED) + { + if (!_eio_config_monitor) + { + char buf[PATH_MAX]; + + _eio_config_monitor = eio_monitor_add(ev->filename); + snprintf(buf, sizeof(buf), "%s/base.cfg", ev->filename); + if (ecore_file_exists(buf)) + { + if (_config_change_delay_timer) + ecore_timer_del(_config_change_delay_timer); + _config_change_delay_timer = ecore_timer_add(0.1, _config_change_delay_cb, NULL); + } + } } } @@ -4464,29 +4415,18 @@ _elm_config_sub_init(void) buf); goto end; } - - _elm_config_profile_save(NULL); - - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg"); - if(!ecore_file_exists(buf)) _file_touch(buf); _eio_profile_monitor = eio_monitor_add(buf); - - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg", _elm_profile); - if(!ecore_file_exists(buf)) _file_touch(buf); - - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/.base.flush.cfg", _elm_profile); - if(!ecore_file_exists(buf)) _file_touch(buf); - _eio_config_monitor = eio_monitor_add(buf); - - _monitor_file_modified_handler = ecore_event_handler_add - (EIO_MONITOR_FILE_MODIFIED, _elm_config_file_monitor_cb, NULL); + _monitor_file_created_handler = ecore_event_handler_add + (EIO_MONITOR_FILE_CREATED, _elm_config_file_monitor_cb, NULL); + _monitor_directory_created_handler = ecore_event_handler_add + (EIO_MONITOR_DIRECTORY_CREATED, _elm_config_file_monitor_cb, NULL); end: _config_sub_apply(); } void -_elm_config_reload(Eina_Bool on_flush) +_elm_config_reload(void) { Eina_Bool is_mirrored; Eina_Bool translate; @@ -4520,8 +4460,8 @@ _elm_config_reload(Eina_Bool on_flush) is_mirrored = _elm_config->is_mirrored; translate = _elm_config->translate; - _elm_config_reload_do(on_flush); - + _elm_config_reload_do(); + /* restore prev value which is not part of the EET file */ _elm_config->is_mirrored = is_mirrored; _elm_config->translate = translate; @@ -4806,7 +4746,6 @@ _elm_config_profile_set(const char *profile) Eina_Bool translate; is_mirrored = _elm_config->is_mirrored; translate = _elm_config->translate; - char buf[PATH_MAX]; if (!profile) return; @@ -4820,15 +4759,9 @@ _elm_config_profile_set(const char *profile) _elm_profile = strdup(profile); - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg", _elm_profile); - if(!ecore_file_exists(buf)) _file_touch(buf); - - _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/.base.flush.cfg", _elm_profile); - if(!ecore_file_exists(buf)) _file_touch(buf); - _color_overlays_cancel(); - _elm_config_reload_do(EINA_FALSE); + _elm_config_reload_do(); /* restore prev value which is not part of the EET file */ _elm_config->is_mirrored = is_mirrored; @@ -5392,25 +5325,6 @@ EOLIAN static void _efl_config_global_profile_derived_del(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, const char *profile) { elm_config_profile_derived_del(profile); - -} -static Eina_Bool -_file_touch(const char *file) -{ - if (!file) return EINA_FALSE; - - const char *dir = ecore_file_dir_get(file); - if(!dir) return EINA_FALSE; - if(!ecore_file_mkpath(dir)) return EINA_FALSE; - - Eo *f = efl_add_ref(EFL_IO_FILE_CLASS, NULL, - efl_file_set(efl_added, file, NULL), - efl_io_file_flags_set(efl_added, O_CREAT|O_RDWR), - efl_io_file_mode_set(efl_added, 0644)); - if (!f) return EINA_FALSE; - efl_unref(f); - - return EINA_TRUE; } #include "efl_config_global.eo.c" diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index 1e268dd68a..cd0a987615 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -644,7 +644,7 @@ void _elm_config_sub_init(void); void _elm_config_shutdown(void); void _elm_config_sub_shutdown(void); Eina_Bool _elm_config_save(Elm_Config *cfg, const char *profile); -void _elm_config_reload(Eina_Bool on_flush); +void _elm_config_reload(void); size_t _elm_config_user_dir_snprintf(char *dst, size_t size, const char *fmt, ...) EINA_PRINTF(3, 4); From 0ab6c36404ffe7bb4b343967097f2fc9e8ed6ca6 Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Wed, 13 Feb 2019 20:36:55 +0900 Subject: [PATCH 28/87] efl_ui_pager: change data type --- src/lib/elementary/efl_page_transition.c | 2 +- src/lib/elementary/efl_page_transition_scroll.c | 10 +++++----- src/lib/elementary/efl_ui_pager.c | 8 ++++---- src/lib/elementary/elm_priv.h | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lib/elementary/efl_page_transition.c b/src/lib/elementary/efl_page_transition.c index 11beb39a35..6c5c834d6e 100644 --- a/src/lib/elementary/efl_page_transition.c +++ b/src/lib/elementary/efl_page_transition.c @@ -85,7 +85,7 @@ _efl_page_transition_loop_set(Eo *obj EINA_UNUSED, EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_update, EFL_FUNC_CALL(move), double move) EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_curr_page_change, - EFL_FUNC_CALL(move), double move) + EFL_FUNC_CALL(diff), int diff) EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_page_size_set, EFL_FUNC_CALL(sz), Eina_Size2D sz) EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_padding_size_set, diff --git a/src/lib/elementary/efl_page_transition_scroll.c b/src/lib/elementary/efl_page_transition_scroll.c index 169bce6c12..432ada89ea 100644 --- a/src/lib/elementary/efl_page_transition_scroll.c +++ b/src/lib/elementary/efl_page_transition_scroll.c @@ -401,7 +401,7 @@ _efl_page_transition_scroll_update(Eo *obj, EOLIAN static void _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED, Efl_Page_Transition_Scroll_Data *pd, - double pos) + int diff) { Eina_List *list; Page_Info *pi, *target = NULL; @@ -410,12 +410,12 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED, // with a new id based on the new geometry of the boxes. EINA_LIST_FOREACH(pd->page_infos, list, pi) { - if (EINA_DBL_EQ(pos, 1.0)) + if (diff == 1) { pi->id = (pi->id - 1 + pd->page_info_num) % pd->page_info_num; target = pi->prev; } - else if (EINA_DBL_EQ(pos, -1.0)) + else if (diff == -1) { pi->id = (pi->id + 1) % pd->page_info_num; target = pi->next; @@ -438,12 +438,12 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED, pi->temp.h); } - if (EINA_DBL_EQ(pos, 1.0)) + if (diff == 1) { pd->head = pd->head->next; pd->tail = pd->tail->next; } - else if (EINA_DBL_EQ(pos, -1.0)) + else if (diff == -1) { pd->head = pd->head->prev; pd->tail = pd->tail->prev; diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c index cc48b9b43f..c912125033 100644 --- a/src/lib/elementary/efl_ui_pager.c +++ b/src/lib/elementary/efl_ui_pager.c @@ -95,9 +95,9 @@ _page_set_animation(void *data, const Efl_Event *event) if (pd->curr.page != temp_page) { if (pd->change.delta < 0) - efl_page_transition_curr_page_change(pd->transition, -1.0); + efl_page_transition_curr_page_change(pd->transition, -1); else - efl_page_transition_curr_page_change(pd->transition, 1.0); + efl_page_transition_curr_page_change(pd->transition, 1); temp_pos = 0.0; } @@ -139,13 +139,13 @@ _mouse_up_animation(void *data, const Efl_Event *event) if (EINA_DBL_EQ(pd->curr.pos, 1.0)) { - efl_page_transition_curr_page_change(pd->transition, 1.0); + efl_page_transition_curr_page_change(pd->transition, 1); pd->curr.page = (pd->curr.page + 1 + pd->cnt) % pd->cnt; pd->curr.pos = 0.0; } else if (EINA_DBL_EQ(pd->curr.pos, -1.0)) { - efl_page_transition_curr_page_change(pd->transition, -1.0); + efl_page_transition_curr_page_change(pd->transition, -1); pd->curr.page = (pd->curr.page - 1 + pd->cnt) % pd->cnt; pd->curr.pos = 0.0; } diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index cd0a987615..1ac0bfed07 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -784,7 +784,7 @@ void _elm_widget_full_eval_children(Eo *obj, Elm_Widget_Smart_Da EOAPI void efl_page_transition_page_size_set(Eo *obj, Eina_Size2D sz); EOAPI void efl_page_transition_padding_size_set(Eo *obj, int padding); EOAPI void efl_page_transition_update(Eo *obj, double pos); -EOAPI void efl_page_transition_curr_page_change(Eo *obj, double move); +EOAPI void efl_page_transition_curr_page_change(Eo *obj, int diff); EOAPI void efl_page_transition_pack_end(Eo *obj, Efl_Gfx_Entity *subobj); EOAPI Eina_Bool efl_page_transition_loop_set(Eo *obj, Efl_Ui_Pager_Loop loop); From 846492ebd7b86d2f4f5d2ab7b002a1ac19ce5b82 Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Wed, 13 Feb 2019 08:38:58 -0500 Subject: [PATCH 29/87] ui.box: refactor layout_update Summary: Current layout_update doesn't consider max hint priority. for example, if it has hint_max, the size is hint_max value regardless of weight or fill. moreover, if it has hint_aspect with hint_max, hint_min can be ignored. (test that aspect(1,3) max(50,150), min(70, 70) then, size has (50, 150)) It seems that hint_max is considered as high priority. however, if hint_min greater than hint_max, hint_max is ignored. In order to resolve the hint priority conflict, this refactoring supports following hint priority. 1) HintMin 2) HintMin + HintAspect 3) HintMargin 4) HintMax 5) HintAspect 6) HintWeight, HintFill 7) HintAlign ref T5487 Specific unit test is D7463 Test Plan: make check elementary_test -to 'efl.ui.box' Reviewers: jpeg, Jaehyun_Cho, zmike Reviewed By: zmike Subscribers: segfaultxavi, zmike, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T5487 Differential Revision: https://phab.enlightenment.org/D7750 --- src/lib/elementary/efl_ui_box_layout.c | 479 +++++++++++-------------- 1 file changed, 204 insertions(+), 275 deletions(-) diff --git a/src/lib/elementary/efl_ui_box_layout.c b/src/lib/elementary/efl_ui_box_layout.c index c42dd740a1..8f8cc4d661 100644 --- a/src/lib/elementary/efl_ui_box_layout.c +++ b/src/lib/elementary/efl_ui_box_layout.c @@ -2,23 +2,76 @@ #include "efl_ui_box_private.h" -// FIXME: Aspect support is not implemented // FIXME: handle RTL? just invert the horizontal order? typedef struct _Item_Calc Item_Calc; struct _Item_Calc { + EINA_INLIST; + Evas_Object *obj; double weight[2]; double align[2]; + double space[2]; + double comp_factor; Eina_Bool fill[2]; - Eina_Size2D max, want, aspect; + Eina_Size2D max, min, aspect; int pad[4]; Efl_Gfx_Size_Hint_Aspect aspect_type; int id; }; +static int +weight_sort_cb(const void *l1, const void *l2) +{ + Item_Calc *it1, *it2; + + it1 = EINA_INLIST_CONTAINER_GET(l1, Item_Calc); + it2 = EINA_INLIST_CONTAINER_GET(l2, Item_Calc); + + return it2->comp_factor <= it1->comp_factor ? -1 : 1; +} + +static inline void +_min_max_calc(Item_Calc *item, int *cw, int *ch, Eina_Bool aspect_check) +{ + int w = *cw, h = *ch; + + if (aspect_check) + { + w = h * item->aspect.w / item->aspect.h; + if (w > *cw) + { + w = *cw; + h = w * item->aspect.h / item->aspect.w; + } + } + + if (w > item->max.w) + { + w = item->max.w; + if (aspect_check) h = w * item->aspect.h / item->aspect.w; + } + if (h > item->max.h) + { + h = item->max.h; + if (aspect_check) w = h * item->aspect.w / item->aspect.h; + } + if (w < item->min.w) + { + w = item->min.w; + if (aspect_check) h = w * item->aspect.h / item->aspect.w; + } + if (h < item->min.h) + { + h = item->min.h; + if (aspect_check) w = h * item->aspect.w / item->aspect.h; + } + *cw = w; + *ch = h; +} + void _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) { @@ -26,20 +79,20 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) Evas_Object_Box_Option *opt; Evas_Object *o; Eina_List *li; + Eina_Inlist *inlist = NULL; int wantw = 0, wanth = 0; // requested size - int boxx, boxy, boxw, boxh; + Eina_Rect boxs; Item_Calc *items, *item; Eina_Bool horiz = efl_ui_dir_is_horizontal(pd->dir, EINA_FALSE); - Eina_Bool zeroweight = EINA_FALSE; int id = 0, count, boxl = 0, boxr = 0, boxt = 0, boxb = 0; - int length, want, pad, extra = 0, rounding = 0; - double cur_pos = 0, weight[2] = { 0, 0 }, scale; + int length, want, pad; + double cur_pos, weight[2] = { 0, 0 }, scale; double box_align[2]; Eina_Bool box_fill[2] = { EINA_FALSE, EINA_FALSE }; - evas_object_geometry_get(ui_box, &boxx, &boxy, &boxw, &boxh); + boxs = efl_gfx_entity_geometry_get(ui_box); efl_gfx_size_hint_margin_get(ui_box, &boxl, &boxr, &boxt, &boxb); - scale = evas_object_scale_get(ui_box); + scale = efl_gfx_entity_scale_get(ui_box); // Box align: used if "item has max size and fill" or "no item has a weight" // Note: cells always expand on the orthogonal direction @@ -59,7 +112,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) count = eina_list_count(bd->children); if (!count) { - evas_object_size_hint_min_set(ui_box, 0, 0); + efl_gfx_size_hint_min_set(ui_box, EINA_SIZE2D(0, 0)); return; } @@ -68,6 +121,12 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) memset(items, 0, count * sizeof(*items)); #endif + // box outer margin + boxs.w -= boxl + boxr; + boxs.h -= boxt + boxb; + boxs.x += boxl; + boxs.y += boxt; + // scan all items, get their properties, calculate total weight & min size EINA_LIST_FOREACH(bd->children, li, opt) { @@ -79,321 +138,191 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) efl_gfx_size_hint_margin_get(o, &item->pad[0], &item->pad[1], &item->pad[2], &item->pad[3]); efl_gfx_size_hint_fill_get(o, &item->fill[0], &item->fill[1]); item->max = efl_gfx_size_hint_max_get(o); - item->want = efl_gfx_size_hint_combined_min_get(o); + item->min = efl_gfx_size_hint_combined_min_get(o); efl_gfx_size_hint_aspect_get(o, &item->aspect_type, &item->aspect); - if (item->weight[0] < 0) item->weight[0] = 0; - if (item->weight[1] < 0) item->weight[1] = 0; + if (horiz && box_fill[0]) item->weight[0] = 1; + else if (item->weight[0] < 0) item->weight[0] = 0; + if (!horiz && box_fill[1]) item->weight[1] = 1; + else if (item->weight[1] < 0) item->weight[1] = 0; if (EINA_DBL_EQ(item->align[0], -1)) { item->align[0] = 0.5; item->fill[0] = EINA_TRUE; } - else if (item->align[0] < 0) - { - item->align[0] = 0; - } + else if (item->align[0] < 0) item->align[0] = 0; + else if (item->align[0] > 1) item->align[0] = 1; if (EINA_DBL_EQ(item->align[1], -1)) { item->align[1] = 0.5; item->fill[1] = EINA_TRUE; } - else if (item->align[1] < 0) - { - item->align[1] = 0; - } - if (item->align[0] > 1) item->align[0] = 1; - if (item->align[1] > 1) item->align[1] = 1; + else if (item->align[1] < 0) item->align[1] = 0; + else if (item->align[1] > 1) item->align[1] = 1; - if (item->want.w < 0) item->want.w = 0; - if (item->want.h < 0) item->want.h = 0; + if (item->min.w < 0) item->min.w = 0; + if (item->min.h < 0) item->min.h = 0; if (item->max.w < 0) item->max.w = INT_MAX; if (item->max.h < 0) item->max.h = INT_MAX; - if (item->aspect.w <= 0 || item->aspect.h <= 0) - { - if (item->aspect_type >= EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL) - ERR("Invalid aspect parameter for obj: %p", item->obj); - item->aspect.w = item->aspect.h = 0; - item->aspect_type = EFL_GFX_SIZE_HINT_ASPECT_NONE; - } - - if (item->aspect_type >= EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL) - { - double w, h; - - w = item->want.w; - h = w * item->aspect.h / item->aspect.w; - if (h < item->want.h) - { - h = item->want.h; - w = h * item->aspect.w / item->aspect.h; - } - - if (horiz) - { - if (item->fill[1] && (h < boxh)) - { - double w1, h1; - h1 = item->max.h > 0 ? MIN(boxh, item->max.h) : boxh; - h1 = MAX(h, h1); - w1 = h1 * item->aspect.w / item->aspect.h; - w = item->max.w > 0 ? MIN(w1, item->max.w) : w1; - } - } - else - { - if (item->fill[0] && (w < boxw)) - { - double w1, h1; - w1 = item->max.w > 0 ? MIN(boxw, item->max.w) : boxw; - w1 = MAX(w, w1); - h1 = w1 * item->aspect.h / item->aspect.w; - h = item->max.h > 0 ? MIN(h1, item->max.h) : h1; - } - } - item->want.w = w; - item->want.h = h; - } - if (item->max.w < item->want.w) item->max.w = item->want.w; - if (item->max.h < item->want.h) item->max.h = item->want.h; - - item->want.w += item->pad[0] + item->pad[1]; - item->want.h += item->pad[2] + item->pad[3]; - weight[0] += item->weight[0]; weight[1] += item->weight[1]; - if (horiz) + + if ((item->aspect.w <= 0) || (item->aspect.h <= 0)) { - wantw += item->want.w; - if (item->want.h > wanth) - wanth = item->want.h; + if ((item->aspect.w <= 0) ^ (item->aspect.h <= 0)) + { + ERR("Invalid aspect parameter for obj: %p", item->obj); + item->aspect.w = item->aspect.h = 0; + item->aspect_type = EFL_GFX_SIZE_HINT_ASPECT_NONE; + } } else { - wanth += item->want.h; - if (item->want.w > wantw) - wantw = item->want.w; + _min_max_calc(item, &item->min.w, &item->min.h, EINA_TRUE); + } + + item->space[0] = item->min.w + item->pad[0] + item->pad[1]; + item->space[1] = item->min.h + item->pad[2] + item->pad[3]; + + if (horiz) + { + if (item->space[1] > wanth) + wanth = item->space[1]; + wantw += item->space[0]; + } + else + { + if (item->space[0] > wantw) + wantw = item->space[0]; + wanth += item->space[1]; } item->id = id++; } - // box outer margin - boxw -= boxl + boxr; - boxh -= boxt + boxb; - boxx += boxl; - boxy += boxt; - // total space & available space if (horiz) { - length = boxw; want = wantw; + length = boxs.w; pad = pd->pad.scalable ? (pd->pad.h * scale) : pd->pad.h; + if (boxs.h < wanth) + boxs.h = wanth; } else { - length = boxh; want = wanth; + length = boxs.h; pad = pd->pad.scalable ? (pd->pad.v * scale) : pd->pad.v; + if (boxs.w < wantw) + boxs.w = wantw; } // padding can not be squeezed (note: could make it an option) length -= pad * (count - 1); + cur_pos = horiz ? boxs.x : boxs.y; - // available space. if <0 we overflow - extra = length - want; + // calculate weight length + if ((length > want) && (weight[!horiz] > 0)) + { + int orig_length = length; + double orig_weight = weight[!horiz]; + + for (id = 0; id < count; id++) + { + double denom; + item = &items[id]; + + denom = (item->weight[!horiz] * orig_length) - + (orig_weight * item->space[!horiz]); + if (denom > 0) + { + item->comp_factor = (item->weight[!horiz] * orig_length) / denom; + inlist = eina_inlist_sorted_insert(inlist, EINA_INLIST_GET(item), + weight_sort_cb); + } + else + { + length -= item->space[!horiz]; + weight[!horiz] -= item->weight[!horiz]; + } + } + + EINA_INLIST_FOREACH(inlist, item) + { + double weight_len; + + weight_len = (length * item->weight[!horiz]) / weight[!horiz]; + if (item->space[!horiz] < weight_len) + { + item->space[!horiz] = weight_len; + } + else + { + weight[!horiz] -= item->weight[!horiz]; + length -= item->space[!horiz]; + } + } + } + + // calculate item geometry + { + int x, y, w, h, sw, sh; + + if ((length > want) && EINA_DBL_EQ(weight[!horiz], 0)) + cur_pos += (length - want) * box_align[!horiz]; + + for (id = 0; id < count; id++) + { + item = &items[id]; + item->space[horiz] = horiz ? boxs.h : boxs.w; + sw = item->space[0] - item->pad[0] - item->pad[1]; + sh = item->space[1] - item->pad[2] - item->pad[3]; + + if ((item->weight[0] > 0) && item->fill[0]) + w = sw; + else + w = 0; + + if ((item->weight[1] > 0) && item->fill[1]) + h = sh; + else + h = 0; + + _min_max_calc(item, &w, &h, (item->aspect.w > 0) && + (item->aspect.h > 0)); + if (horiz) + { + x = cur_pos + 0.5; + y = boxs.y; + } + else + { + x = boxs.x; + y = cur_pos + 0.5; + } + x += item->pad[0] + ((sw - w) * item->align[0]); + y += item->pad[2] + ((sh - h) * item->align[1]); + + cur_pos += item->space[!horiz] + pad; + + efl_gfx_entity_geometry_set(item->obj, EINA_RECT(x, y, w, h)); + } + } if (horiz) { - evas_object_size_hint_min_set(ui_box, - wantw + boxl + boxr + pad * (count - 1), - wanth + boxt + boxb); + efl_gfx_size_hint_min_set(ui_box, EINA_SIZE2D( + wantw + boxl + boxr + pad * (count - 1), + wanth + boxt + boxb)); } else { - evas_object_size_hint_min_set(ui_box, - wantw + boxl + boxr, - wanth + pad * (count - 1) + boxt + boxb); - } - - if (extra < 0) extra = 0; - - if (EINA_DBL_EQ(weight[!horiz], 0)) - { - if (box_fill[!horiz]) - { - // box is filled, set all weights to be equal - zeroweight = EINA_TRUE; - } - else - { - // move bounding box according to box align - cur_pos = extra * box_align[!horiz]; - } - weight[!horiz] = count; - } - - for (id = 0; id < count; id++) - { - double cx, cy, cw, ch, x, y, w, h; - item = &items[id]; - - // extra rounding up (compensate cumulative error) - if ((item->id == (count - 1)) && (cur_pos - floor(cur_pos) >= 0.5)) - rounding = 1; - - if (horiz) - { - cx = boxx + cur_pos; - cy = boxy; - cw = item->want.w + rounding + (zeroweight ? 1.0 : item->weight[0]) * extra / weight[0]; - ch = boxh; - cur_pos += cw + pad; - } - else - { - cx = boxx; - cy = boxy + cur_pos; - cw = boxw; - ch = item->want.h + rounding + (zeroweight ? 1.0 : item->weight[1]) * extra / weight[1]; - cur_pos += ch + pad; - } - - if (item->aspect_type >= EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL) - { - if (horiz) - { - w = item->want.w; - h = item->want.h; - if (weight[0] > 0) - w = item->want.w + extra * item->weight[0] / weight[0]; - h = w * item->aspect.h / item->aspect.w; - - if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH || - item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_VERTICAL) - { - if (h > boxh) - { - h = boxh; - w = h * item->aspect.w / item->aspect.h; - } - } - } - else - { - w = item->want.w; - h = item->want.h; - if (weight[1] > 0) - h = item->want.h + extra * item->weight[1] / weight[1]; - w = h * item->aspect.w / item->aspect.h; - - if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH || - item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL) - { - if (w > boxw) - { - w = boxw; - h = w * item->aspect.h / item->aspect.w; - } - } - } - - if ((item->max.w != INT_MAX) && (item->max.h != INT_MAX)) - { - double mar, ar; - mar = item->max.w / (double)item->max.h; - ar = item->aspect.w / (double)item->aspect.h; - if (ar < mar) - { - if (h > item->max.h) - { - h = item->max.h; - w = h * item->aspect.w / item->aspect.h; - } - } - else - { - if (w > item->max.w) - { - w = item->max.w; - h = w * item->aspect.h / item->aspect.w; - } - } - } - else if (item->max.w != INT_MAX) - { - w = MIN(w, MAX(item->want.w, item->max.w)); - h = w * item->aspect.h / item->aspect.w; - } - else - { - h = MIN(h, MAX(item->want.h, item->max.h)); - w = h * item->aspect.w / item->aspect.h; - } - w = w - item->pad[0] - item->pad[1]; - h = h - item->pad[2] - item->pad[3]; - - if (item->fill[0]) - x = cx + (cw - w) * 0.5 + item->pad[0]; - else - x = cx + (cw - w) * item->align[0] + item->pad[0]; - - if (item->fill[1]) - y = cy + (ch - h) * 0.5 + item->pad[2]; - else - y = cy + (ch - h) * item->align[1] + item->pad[2]; - } - else - { - // horizontally - if (item->max.w < INT_MAX) - { - w = MIN(MAX(item->want.w - item->pad[0] - item->pad[1], item->max.w), cw); - x = cx + ((cw - w) * item->align[0]) + item->pad[0]; - } - else if (item->fill[0]) - { - // fill x - w = cw - item->pad[0] - item->pad[1]; - x = cx + item->pad[0]; - } - else - { - if (horiz && item->weight[0] > 0) - w = cw - item->pad[0] - item->pad[1]; - else - w = item->want.w - item->pad[0] - item->pad[1]; - x = cx + ((cw - w) * item->align[0]) + item->pad[0]; - } - - // vertically - if (item->max.h < INT_MAX) - { - h = MIN(MAX(item->want.h - item->pad[2] - item->pad[3], item->max.h), ch); - y = cy + ((ch - h) * item->align[1]) + item->pad[2]; - } - else if (item->fill[1]) - { - // fill y - h = ch - item->pad[2] - item->pad[3]; - y = cy + item->pad[2]; - } - else - { - if (!horiz && item->weight[1] > 0) - h = ch - item->pad[2] - item->pad[3]; - else - h = item->want.h - item->pad[2] - item->pad[3]; - y = cy + ((ch - h) * item->align[1]) + item->pad[2]; - } - } - - //DBG("[%2d/%2d] cell: %.0f,%.0f %.0fx%.0f item: %.0f,%.0f %.0fx%.0f", - // id, count, cx, cy, cw, ch, x, y, w, h); - evas_object_geometry_set(item->obj, x, y, w, h); + efl_gfx_size_hint_min_set(ui_box, EINA_SIZE2D( + wantw + boxl + boxr, + wanth + pad * (count - 1) + boxt + boxb)); } } From b1f280f0c2c307c32a5edde5b5f2f304d463dac8 Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Wed, 13 Feb 2019 08:39:07 -0500 Subject: [PATCH 30/87] test/ui_box: add unittest for Efl.Ui.Box Summary: Testcase {F3613173} {F3613174} ref T5487 Depends on D7750 Test Plan: make check Reviewers: jpeg, barbieri, Jaehyun_Cho, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T5487 Differential Revision: https://phab.enlightenment.org/D7463 --- src/Makefile_Elementary.am | 1 + src/tests/elementary/efl_ui_suite.c | 1 + src/tests/elementary/efl_ui_suite.h | 1 + src/tests/elementary/efl_ui_test_box.c | 352 +++++++++++++++++++++++++ src/tests/elementary/meson.build | 1 + 5 files changed, 356 insertions(+) create mode 100644 src/tests/elementary/efl_ui_test_box.c diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 2ed29dd393..8dbff475a1 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -1620,6 +1620,7 @@ tests_elementary_efl_ui_suite_SOURCES = \ tests/elementary/efl_ui_test_focus_common.h \ tests/elementary/efl_ui_test_focus.c \ tests/elementary/efl_ui_test_focus_sub.c \ + tests/elementary/efl_ui_test_box.c \ tests/elementary/efl_ui_test_grid.c \ tests/elementary/efl_ui_test_image.c \ tests/elementary/efl_ui_test_image_zoomable.c \ diff --git a/src/tests/elementary/efl_ui_suite.c b/src/tests/elementary/efl_ui_suite.c index 91a579a763..5cc88df007 100644 --- a/src/tests/elementary/efl_ui_suite.c +++ b/src/tests/elementary/efl_ui_suite.c @@ -12,6 +12,7 @@ static const Efl_Test_Case etc[] = { { "efl_ui_atspi", efl_ui_test_atspi}, { "efl_ui_focus", efl_ui_test_focus}, { "efl_ui_focus_sub", efl_ui_test_focus_sub}, + { "efl_ui_box", efl_ui_test_box}, { "efl_ui_grid", efl_ui_test_grid}, { "efl_ui_image", efl_ui_test_image}, { "efl_ui_image_zoomable", efl_ui_test_image_zoomable}, diff --git a/src/tests/elementary/efl_ui_suite.h b/src/tests/elementary/efl_ui_suite.h index 5c91331fc5..b65cbe5bfb 100644 --- a/src/tests/elementary/efl_ui_suite.h +++ b/src/tests/elementary/efl_ui_suite.h @@ -19,6 +19,7 @@ ck_assert_str_eq(expected, actual); \ } +void efl_ui_test_box(TCase *tc); void efl_ui_test_grid(TCase *tc); void efl_ui_test_atspi(TCase *tc); void efl_ui_test_image_zoomable(TCase *tc); diff --git a/src/tests/elementary/efl_ui_test_box.c b/src/tests/elementary/efl_ui_test_box.c new file mode 100644 index 0000000000..314a2d5007 --- /dev/null +++ b/src/tests/elementary/efl_ui_test_box.c @@ -0,0 +1,352 @@ +#ifdef HAVE_CONFIG_H +# include "elementary_config.h" +#endif + +#include +#include "elm_suite.h" + +#define COORD_EQ(a, b) (!!(abs(a - b) < 2)) +#define GEOMETRY_EQ(a, b) (COORD_EQ(a.x, b.x) && COORD_EQ(a.y, b.y) && \ + COORD_EQ(a.w, b.w) && COORD_EQ(a.h, b.h)) + +typedef struct { + Eina_Size2D max; + Eina_Size2D min; + double weightx; + double weighty; + double alignx; + double aligny; + int marginl; + int marginr; + int margint; + int marginb; + Efl_Gfx_Size_Hint_Aspect mode; + Eina_Size2D aspect; + Eina_Bool fillx; + Eina_Bool filly; + Eina_Size2D layout_size; + Eina_Size2D layout_expected; + Eina_Rect expected; + char testname[1024]; +} Hint; + +static Hint hints[] = { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(0, 0), 1, 1, 0.5, 0.5, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT(0, 0, 200, 200), "[0]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.3, 0.5, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT(0, 0, 200, 200), "[1]" }, + { EINA_SIZE2D(50, 150), EINA_SIZE2D(70, 70), 1, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT((200 - 70) * 0.3, (200 - 150) * 0.7, 70, 150), "[2]" }, + { EINA_SIZE2D(150, -1), EINA_SIZE2D(70, 70), 0, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT((200 - 70) * 0.3, (200 - 70) * 0.2, 70, 70), "[3]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT((200 - 70) * 0.3, (200 - 70) * 0.2, 70, 70), "[4]" }, + { EINA_SIZE2D(150, 150), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT((200 - 70) * 0.3, (200 - 70) * 0.2, 70, 70), "[5]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 0, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 210), + EINA_RECT((200 - 70) * 0.3, 0, 70, 70 * 3), "[6]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 0, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(300, 300), EINA_SIZE2D(300, 300), + EINA_RECT((300 - 70) * 0.3, (300 - 70 * 3) * 0.7, 70, 70 * 3), "[7]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 210), + EINA_RECT((200 - 70) * 0.3, 0, 70, 70 * 3), "[8]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(300, 300), EINA_SIZE2D(300, 300), + EINA_RECT((300 - 70) * 0.3, (300 - 70 * 3) * 0.2, 70, 70 * 3), "[9]" }, + { EINA_SIZE2D(-1, 150), EINA_SIZE2D(70, 70), 0, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 210), + EINA_RECT((200 - 70) * 0.3, 0, 70, 70 * 3), "[10]" }, + { EINA_SIZE2D(-1, 150), EINA_SIZE2D(70, 70), 0, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(300, 300), EINA_SIZE2D(300, 300), + EINA_RECT((300 - 70) * 0.3, (300 - 70 * 3) * 0.7, 70, 70 * 3), "[11]" }, + { EINA_SIZE2D(-1, 150), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 210), + EINA_RECT((200 - 70) * 0.3, 0, 70, 70 * 3), "[12]" }, + { EINA_SIZE2D(-1, 150), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(300, 300), EINA_SIZE2D(300, 300), + EINA_RECT((300 - 70) * 0.3, (300 - 70 * 3) * 0.2, 70, 70 * 3), "[13]" }, +}; + +static Hint hints2[][2] = { + { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.3, (150 - 70) * 0.7, 70, 70), "[1/1 weight btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.8, (150 - 70) * 0.2 + 150, 70, 70), "[1/1 weight btn2]" } + }, + { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.3, 0, 70, 70), "[0/1 weight btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_VERTICAL, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - ((300 - 70) / 3)) * 0.8, 70, (300 - 70) / 3, (300 - 70)), "[0/1 weight btn2]" } + }, + { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.3, (300 - 280) * 0.2, 70, 70), "[0/0 weight btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.8, (300 - 280) * 0.2 + 70, 70, 70 * 3), "[0/0 weight btn2]" } + }, +}; + +static Hint hints3[][3] = { + { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT(0, 0, 150, 100), "[1/1/1 weight_l btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 100), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT(0, 100, 150, 100), "[1/1/1 weight_l btn2]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT(0, 100 + 100, 150, 100), "[1/1/1 weight_l btn3]" } + }, + { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 270), EINA_SIZE2D(150, 270), + EINA_RECT(0, 0, 150, 85), "[1/1/1 weight_m btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 100), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 270), EINA_SIZE2D(150, 270), + EINA_RECT(0, 85, 150, 100), "[1/1/1 weight_m btn2]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 270), EINA_SIZE2D(150, 270), + EINA_RECT(0, 100 + 85, 150, 85), "[1/1/1 weight_m btn3]" } + }, + { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 200), EINA_SIZE2D(150, 240), + EINA_RECT(0, 0, 150, 70), "[1/1/1 weight_s btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 100), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 200), EINA_SIZE2D(150, 240), + EINA_RECT(0, 70, 150, 100), "[1/1/1 weight_s btn2]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 200), EINA_SIZE2D(150, 240), + EINA_RECT(0, 170, 150, 70), "[1/1/1 weight_s btn3]" } + }, + { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(0, 0), 1, 1, 0.5, 0.5, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(300, 900), EINA_SIZE2D(300, 900), + EINA_RECT(100, 0, 100, 300), "[aspect resize btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(0, 0), 1, 1, 0.5, 0.5, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(300, 900), EINA_SIZE2D(300, 900), + EINA_RECT(100, 300, 100, 300), "[aspect resize btn2]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(0, 0), 1, 1, 0.5, 0.5, 0, 0, 0, 0, + EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(300, 900), EINA_SIZE2D(300, 900), + EINA_RECT(100, 300 + 300, 100, 300), "[aspect resize btn3]" } + }, +}; + +static Eo *win, *layout; + +static void +btn_hint_set(Eo *btn, Hint *hint) +{ + efl_gfx_entity_size_set(layout, hint->layout_size); + efl_gfx_size_hint_max_set(btn, hint->max); + efl_gfx_size_hint_min_set(btn, hint->min); + efl_gfx_size_hint_weight_set(btn, hint->weightx, hint->weighty); + efl_gfx_size_hint_align_set(btn, hint->alignx, hint->aligny); + efl_gfx_size_hint_fill_set(btn, hint->fillx, hint->filly); + efl_gfx_size_hint_aspect_set(btn, hint->mode, hint->aspect); + efl_canvas_group_calculate(layout); +} + +static void +btn_geom_assert(Hint *hint, Eina_Rect btn_geom) +{ + Eina_Size2D layout_size, layout_min; + + layout_size = efl_gfx_entity_size_get(layout); + layout_min = efl_gfx_size_hint_min_get(layout); + layout_size.w = layout_size.w > layout_min.w ? layout_size.w : layout_min.w; + layout_size.h = layout_size.h > layout_min.h ? layout_size.h : layout_min.h; + + ck_assert_msg(GEOMETRY_EQ(btn_geom, hint->expected), + "Case %s failed... button geometry: (%d, %d, %d, %d) expected geometry: (%d, %d, %d, %d)", + hint->testname, btn_geom.x, btn_geom.y, btn_geom.w, btn_geom.h, + hint->expected.x, hint->expected.y, hint->expected.w, hint->expected.h); + ck_assert_msg(COORD_EQ(layout_size.w, hint->layout_expected.w) && + COORD_EQ(layout_size.h, hint->layout_expected.h), + "Case %s failed... layout size: (%d, %d) expected size: (%d, %d)", + hint->testname, layout_size.w, layout_size.h, + hint->layout_expected.w, hint->layout_expected.h); +} + +static void +layout_setup() +{ + win = win_add(); + + layout = efl_add(EFL_UI_BOX_CLASS, win, + efl_pack_align_set(efl_added, 0.8, 0.2), + efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL)); +} + +static void +layout_teardown() +{ + if (win) + { + efl_del(win); + win = NULL; + } +} + +EFL_START_TEST (efl_ui_box_class_check) +{ + const char *class; + + class = efl_class_name_get(layout); + + ck_assert(class != NULL); + ck_assert(!strcmp(class, "Efl.Ui.Box")); +} +EFL_END_TEST + +EFL_START_TEST (efl_ui_box_layout_update) +{ + int i, max_index = (sizeof(hints) / sizeof(Hint)); + + Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_pack_end(layout, efl_added)); + + for (i = 0; i < max_index; i++) + { + btn_hint_set(btn, &hints[i]); + btn_geom_assert(&hints[i], efl_gfx_entity_geometry_get(btn)); + } +} +EFL_END_TEST + +EFL_START_TEST (efl_ui_box_layout_update_pack) +{ + int i, max_index2, max_index3; + Eo *btn, *btn2, *btn3; + + max_index2 = ((sizeof(hints2) / sizeof(Hint)) / 2); + max_index3 = ((sizeof(hints3) / sizeof(Hint)) / 3); + + btn = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_pack_end(layout, efl_added)); + btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_pack_end(layout, efl_added)); + + for (i = 0; i < max_index2; i++) + { + btn_hint_set(btn, &hints2[i][0]); + btn_hint_set(btn2, &hints2[i][1]); + btn_geom_assert(&hints2[i][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints2[i][1], efl_gfx_entity_geometry_get(btn2)); + } + + btn3 = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_pack_end(layout, efl_added)); + + for (i = 0; i < max_index3; i++) + { + btn_hint_set(btn, &hints3[i][0]); + btn_hint_set(btn2, &hints3[i][1]); + btn_hint_set(btn3, &hints3[i][2]); + btn_geom_assert(&hints3[i][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints3[i][1], efl_gfx_entity_geometry_get(btn2)); + btn_geom_assert(&hints3[i][2], efl_gfx_entity_geometry_get(btn3)); + } + + // aspect resize test + hints3[3][0].layout_expected = hints3[3][0].layout_size = EINA_SIZE2D(150, 450); + hints3[3][1].layout_expected = hints3[3][1].layout_size = EINA_SIZE2D(150, 450); + hints3[3][2].layout_expected = hints3[3][2].layout_size = EINA_SIZE2D(150, 450); + hints3[3][0].expected = EINA_RECT(50, 0, 50, 150); + hints3[3][1].expected = EINA_RECT(50, 150, 50, 150); + hints3[3][2].expected = EINA_RECT(50, 300, 50, 150); + + btn_hint_set(btn, &hints3[3][0]); + btn_hint_set(btn2, &hints3[3][1]); + btn_hint_set(btn3, &hints3[3][2]); + btn_geom_assert(&hints3[3][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints3[3][1], efl_gfx_entity_geometry_get(btn2)); + btn_geom_assert(&hints3[3][2], efl_gfx_entity_geometry_get(btn3)); + + efl_ui_direction_set(layout, EFL_UI_DIR_HORIZONTAL); + hints3[3][0].layout_expected = hints3[3][0].layout_size = EINA_SIZE2D(300, 900); + hints3[3][1].layout_expected = hints3[3][1].layout_size = EINA_SIZE2D(300, 900); + hints3[3][2].layout_expected = hints3[3][2].layout_size = EINA_SIZE2D(300, 900); + hints3[3][0].expected = EINA_RECT(0, 300, 100, 300); + hints3[3][1].expected = EINA_RECT(100, 300, 100, 300); + hints3[3][2].expected = EINA_RECT(200, 300, 100, 300); + + btn_hint_set(btn, &hints3[3][0]); + btn_hint_set(btn2, &hints3[3][1]); + btn_hint_set(btn3, &hints3[3][2]); + btn_geom_assert(&hints3[3][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints3[3][1], efl_gfx_entity_geometry_get(btn2)); + btn_geom_assert(&hints3[3][2], efl_gfx_entity_geometry_get(btn3)); + + hints3[3][0].layout_expected = hints3[3][0].layout_size = EINA_SIZE2D(150, 450); + hints3[3][1].layout_expected = hints3[3][1].layout_size = EINA_SIZE2D(150, 450); + hints3[3][2].layout_expected = hints3[3][2].layout_size = EINA_SIZE2D(150, 450); + hints3[3][0].expected = EINA_RECT(0, 150, 50, 150); + hints3[3][1].expected = EINA_RECT(50, 150, 50, 150); + hints3[3][2].expected = EINA_RECT(100, 150, 50, 150); + + btn_hint_set(btn, &hints3[3][0]); + btn_hint_set(btn2, &hints3[3][1]); + btn_hint_set(btn3, &hints3[3][2]); + btn_geom_assert(&hints3[3][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints3[3][1], efl_gfx_entity_geometry_get(btn2)); + btn_geom_assert(&hints3[3][2], efl_gfx_entity_geometry_get(btn3)); +} +EFL_END_TEST + +void efl_ui_test_box(TCase *tc) +{ + tcase_add_checked_fixture(tc, layout_setup, layout_teardown); + tcase_add_test(tc, efl_ui_box_class_check); + tcase_add_test(tc, efl_ui_box_layout_update); + tcase_add_test(tc, efl_ui_box_layout_update_pack); +} diff --git a/src/tests/elementary/meson.build b/src/tests/elementary/meson.build index c9e4cdffb6..091d1540ef 100644 --- a/src/tests/elementary/meson.build +++ b/src/tests/elementary/meson.build @@ -122,6 +122,7 @@ efl_ui_suite_src = [ 'efl_ui_test_focus_common.h', 'efl_ui_test_focus.c', 'efl_ui_test_focus_sub.c', + 'efl_ui_test_box.c', 'efl_ui_test_grid.c', 'efl_ui_test_image.c', 'efl_ui_test_image_zoomable.c', From 27e101da4b0134186217e27aceceb96ef2636fe5 Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Wed, 13 Feb 2019 08:39:20 -0500 Subject: [PATCH 31/87] ui.box: implement homogeneous mode Summary: On homogeneous mode, children are of the same weight and of the same min size which is determined by maximum min size of children. Depends on D7750 Reviewers: Jaehyun_Cho, zmike, jpeg Reviewed By: zmike Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7889 --- src/lib/elementary/efl_ui_box.c | 12 +++++++ src/lib/elementary/efl_ui_box.eo | 12 +++++++ src/lib/elementary/efl_ui_box_layout.c | 43 +++++++++++++++++++++----- 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c index aa6b2d85aa..dbf4584503 100644 --- a/src/lib/elementary/efl_ui_box.c +++ b/src/lib/elementary/efl_ui_box.c @@ -80,6 +80,18 @@ _evas_box_custom_layout(Evas_Object *evas_box EINA_UNUSED, efl_pack_layout_update(obj); } +EOLIAN static void +_efl_ui_box_homogeneous_set(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, Eina_Bool homogeneous) +{ + pd->homogeneous = !!homogeneous; +} + +EOLIAN static Eina_Bool +_efl_ui_box_homogeneous_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd) +{ + return pd->homogeneous; +} + EOLIAN static void _efl_ui_box_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED) { diff --git a/src/lib/elementary/efl_ui_box.eo b/src/lib/elementary/efl_ui_box.eo index 3b595096ef..fddf253d90 100644 --- a/src/lib/elementary/efl_ui_box.eo +++ b/src/lib/elementary/efl_ui_box.eo @@ -15,6 +15,18 @@ class Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pack_Layo THIS CLASS NEEDS GOOD UP TO DATE DOCUMENTATION. LEGACY BOX AND UI BOX BEHAVE SLIGHTLY DIFFERENTLY AND USE VASTLY DIFFERENT APIS. ]] + methods { + @property homogeneous { + [[Control homogeneous mode. + + This will enable the homogeneous mode where children are of the same + weight and of the same min size which is determined by maximum min + size of children.]] + values { + homogeneous: bool; [[$true if the box is homogeneous, $false otherwise]] + } + } + } implements { Efl.Object.constructor; Efl.Canvas.Group.group_calculate; diff --git a/src/lib/elementary/efl_ui_box_layout.c b/src/lib/elementary/efl_ui_box_layout.c index 8f8cc4d661..3b5f0a9c43 100644 --- a/src/lib/elementary/efl_ui_box_layout.c +++ b/src/lib/elementary/efl_ui_box_layout.c @@ -86,7 +86,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) Eina_Bool horiz = efl_ui_dir_is_horizontal(pd->dir, EINA_FALSE); int id = 0, count, boxl = 0, boxr = 0, boxt = 0, boxb = 0; int length, want, pad; - double cur_pos, weight[2] = { 0, 0 }, scale; + double cur_pos, weight[2] = { 0, 0 }, scale, mmin = 0; double box_align[2]; Eina_Bool box_fill[2] = { EINA_FALSE, EINA_FALSE }; @@ -141,9 +141,9 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) item->min = efl_gfx_size_hint_combined_min_get(o); efl_gfx_size_hint_aspect_get(o, &item->aspect_type, &item->aspect); - if (horiz && box_fill[0]) item->weight[0] = 1; + if (horiz && (box_fill[0] || pd->homogeneous)) item->weight[0] = 1; else if (item->weight[0] < 0) item->weight[0] = 0; - if (!horiz && box_fill[1]) item->weight[1] = 1; + if (!horiz && (box_fill[1] || pd->homogeneous)) item->weight[1] = 1; else if (item->weight[1] < 0) item->weight[1] = 0; if (EINA_DBL_EQ(item->align[0], -1)) @@ -191,13 +191,29 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) { if (item->space[1] > wanth) wanth = item->space[1]; - wantw += item->space[0]; + if (pd->homogeneous) + { + if (item->space[0] > mmin) + mmin = item->space[0]; + } + else + { + wantw += item->space[0]; + } } else { if (item->space[0] > wantw) wantw = item->space[0]; - wanth += item->space[1]; + if (pd->homogeneous) + { + if (item->space[1] > mmin) + mmin = item->space[1]; + } + else + { + wanth += item->space[1]; + } } item->id = id++; @@ -206,6 +222,8 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) // total space & available space if (horiz) { + if (pd->homogeneous) + wantw = mmin * count; want = wantw; length = boxs.w; pad = pd->pad.scalable ? (pd->pad.h * scale) : pd->pad.h; @@ -214,6 +232,8 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) } else { + if (pd->homogeneous) + wanth = mmin * count; want = wanth; length = boxs.h; pad = pd->pad.scalable ? (pd->pad.v * scale) : pd->pad.v; @@ -226,7 +246,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) cur_pos = horiz ? boxs.x : boxs.y; // calculate weight length - if ((length > want) && (weight[!horiz] > 0)) + if (!pd->homogeneous && (length > want) && (weight[!horiz] > 0)) { int orig_length = length; double orig_weight = weight[!horiz]; @@ -272,12 +292,19 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) { int x, y, w, h, sw, sh; - if ((length > want) && EINA_DBL_EQ(weight[!horiz], 0)) - cur_pos += (length - want) * box_align[!horiz]; + if (length > want) + { + if (pd->homogeneous) + mmin = (double)length / count; + else if (EINA_DBL_EQ(weight[!horiz], 0)) + cur_pos += (length - want) * box_align[!horiz]; + } for (id = 0; id < count; id++) { item = &items[id]; + if (pd->homogeneous) + item->space[!horiz] = mmin; item->space[horiz] = horiz ? boxs.h : boxs.w; sw = item->space[0] - item->pad[0] - item->pad[1]; sh = item->space[1] - item->pad[2] - item->pad[3]; From b5e90ebe0d49edc405e9a5ab60b3c1e7ea65a5fa Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 12 Feb 2019 13:51:02 -0500 Subject: [PATCH 32/87] ecore_main: Add ECORE_FD_ALWAYS flag Summary: This allows an fd handler to be called after select exits unconditionally. Our wayland client code needs this to be thread safe, as it needs to call prepare_read before entering select, and then either read or cancel_read after select. Reviewers: cedric Reviewed By: cedric Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7914 --- src/lib/ecore/Ecore_Common.h | 8 +++++- src/lib/ecore/ecore_main.c | 47 ++++++++++++++++++++++++++--------- src/lib/ecore/ecore_private.h | 1 + 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/lib/ecore/Ecore_Common.h b/src/lib/ecore/Ecore_Common.h index 9b777d7364..de515c57ed 100644 --- a/src/lib/ecore/Ecore_Common.h +++ b/src/lib/ecore/Ecore_Common.h @@ -1388,7 +1388,13 @@ enum _Ecore_Fd_Handler_Flags { ECORE_FD_READ = 1, /**< Fd Read mask */ ECORE_FD_WRITE = 2, /**< Fd Write mask */ - ECORE_FD_ERROR = 4 /**< Fd Error mask */ + ECORE_FD_ERROR = 4, /**< Fd Error mask */ + /* ECORE_FD_ALWAYS is intended to fix a problem with wayland + * and threads. It causes the fd handler to be called + * in any state, so wayland libs can call read_cancel + * if nothing is available to read. Everyone else should + * stay away. */ + ECORE_FD_ALWAYS = 8, /**< Fd Always mask - DO NOT USE! */ }; typedef enum _Ecore_Fd_Handler_Flags Ecore_Fd_Handler_Flags; diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 2c1a2ef868..9c30ac51db 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -248,7 +248,7 @@ _ecore_try_add_to_call_list(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd, Ecore_Fd_Han DBG("next_ready"); return; } - if (fdh->read_active || fdh->write_active || fdh->error_active) + if (fdh->read_active || fdh->write_active || fdh->error_active || (fdh->flags & ECORE_FD_ALWAYS)) { DBG("added"); // make sure next_ready is non-null by pointing to ourselves @@ -583,6 +583,10 @@ _ecore_main_fdh_epoll_mark_active(Eo *obj, Efl_Loop_Data *pd) fdh->write_active = EINA_TRUE; fdh->error_active = EINA_TRUE; } + /* We'll add this one anyway outside this function, + don't want it twice */ + if (fdh->flags & ECORE_FD_ALWAYS) + continue; _ecore_try_add_to_call_list(obj, pd, fdh); } @@ -1357,6 +1361,9 @@ _ecore_main_fd_handler_add(Eo *obj, if (is_file) pd->file_fd_handlers = eina_list_append (pd->file_fd_handlers, fdh); + if (fdh->flags & ECORE_FD_ALWAYS) + pd->always_fd_handlers = eina_list_append + (pd->always_fd_handlers, fdh); pd->fd_handlers = (Ecore_Fd_Handler *) eina_inlist_append(EINA_INLIST_GET(pd->fd_handlers), EINA_INLIST_GET(fdh)); @@ -1664,6 +1671,9 @@ _ecore_main_content_clear(Eo *obj, Efl_Loop_Data *pd) if (pd->file_fd_handlers) pd->file_fd_handlers = eina_list_free(pd->file_fd_handlers); + if (pd->always_fd_handlers) + pd->always_fd_handlers = + eina_list_free(pd->always_fd_handlers); if (pd->fd_handlers_to_delete) pd->fd_handlers_to_delete = eina_list_free(pd->fd_handlers_to_delete); @@ -1741,7 +1751,7 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) fd_set rfds, wfds, exfds; Ecore_Fd_Handler *fdh; Eina_List *l; - int max_fd, ret; + int max_fd, ret, outval; #ifndef _WIN32 int err_no; #endif @@ -1785,17 +1795,17 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) { if (!fdh->delete_me) { - if (fdh->flags & ECORE_FD_READ) + if ((fdh->flags & ECORE_FD_READ) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &rfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if (fdh->flags & ECORE_FD_WRITE) + if ((fdh->flags & ECORE_FD_WRITE) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &wfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if (fdh->flags & ECORE_FD_ERROR) + if ((fdh->flags & ECORE_FD_ERROR) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &exfds); if (fdh->fd > max_fd) max_fd = fdh->fd; @@ -1815,17 +1825,17 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) { if (!fdh->delete_me) { - if (fdh->flags & ECORE_FD_READ) + if ((fdh->flags & ECORE_FD_READ) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &rfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if (fdh->flags & ECORE_FD_WRITE) + if ((fdh->flags & ECORE_FD_WRITE) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &wfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if (fdh->flags & ECORE_FD_ERROR) + if ((fdh->flags & ECORE_FD_ERROR) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &exfds); if (fdh->fd > max_fd) max_fd = fdh->fd; @@ -1851,7 +1861,11 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) if (ret < 0) { #ifndef _WIN32 - if (err_no == EINTR) return -1; + if (err_no == EINTR) + { + outval = -1; + goto BAIL; + } else if (err_no == EBADF) _ecore_main_fd_handlers_bads_rem(obj, pd); #endif } @@ -1894,9 +1908,15 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) #ifdef _WIN32 _ecore_main_win32_handlers_cleanup(obj, pd); #endif - return 1; + outval = 1; + goto BAIL; } - return 0; + outval = 0; +BAIL: + EINA_LIST_FOREACH(pd->always_fd_handlers, l, fdh) + _ecore_try_add_to_call_list(obj, pd, fdh); + + return outval; } #endif @@ -2017,6 +2037,8 @@ _ecore_main_fd_handlers_cleanup(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd) EINA_INLIST_GET(fdh)); if (fdh->file) pd->file_fd_handlers = eina_list_remove(pd->file_fd_handlers, fdh); + if (fdh->flags & ECORE_FD_ALWAYS) + pd->always_fd_handlers = eina_list_remove(pd->always_fd_handlers, fdh); ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE); ecore_fd_handler_mp_free(fdh); pd->fd_handlers_to_delete = eina_list_remove_list @@ -2074,7 +2096,8 @@ _ecore_main_fd_handlers_call(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd) { if ((fdh->read_active) || (fdh->write_active) || - (fdh->error_active)) + (fdh->error_active) || + (fdh->flags & ECORE_FD_ALWAYS)) { fdh->references++; if (!_ecore_call_fd_cb(fdh->func, fdh->data, fdh)) diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index 4e980d9123..2cb3b36d27 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -138,6 +138,7 @@ struct _Efl_Loop_Data Ecore_Fd_Handler *fd_handlers; Eina_List *fd_handlers_with_prep; Eina_List *file_fd_handlers; + Eina_List *always_fd_handlers; Eina_List *fd_handlers_with_buffer; Eina_List *fd_handlers_to_delete; Ecore_Fd_Handler *fd_handlers_to_call; From efa85f35f447b54a6996337a11d13e3734f110bd Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 12 Feb 2019 13:51:21 -0500 Subject: [PATCH 33/87] ecore_wl2: Make our wayland socket handling thread safe Summary: By using the prepare read code properly we can do wayland dispatch of multiple queues in multiple threads. I'm not advocating we ever do so, but if a library (perhaps a gl implementation) wants to dispatch its own queue, and that happens in a separate thread from our event loop, we probably don't want the world to explode. Depends on D7914 Reviewers: zmike, devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7915 --- src/lib/ecore_wl2/ecore_wl2_display.c | 73 +++++++++++++-------------- src/lib/ecore_wl2/ecore_wl2_private.h | 1 - 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 8272dc27b1..376f21da1b 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -10,7 +10,6 @@ static Eina_Hash *_server_displays = NULL; static Eina_Hash *_client_displays = NULL; -static Eina_Bool _cb_connect_idle(void *data); static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl); static Eina_Bool _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync); @@ -475,8 +474,6 @@ _recovery_timer_add(Ecore_Wl2_Display *ewd) Ecore_Wl2_Window *window; eina_hash_free_buckets(ewd->globals); - ecore_idle_enterer_del(ewd->idle_enterer); - ewd->idle_enterer = NULL; ecore_main_fd_handler_del(ewd->fd_hdl); ewd->fd_hdl = NULL; @@ -528,6 +525,30 @@ _begin_recovery_maybe(Ecore_Wl2_Display *ewd, int code) } } +static void +_cb_connect_pre(void *data, Ecore_Fd_Handler *hdl EINA_UNUSED) +{ + Ecore_Wl2_Display *ewd = data; + int ret = 0, code; + + while ((wl_display_prepare_read(ewd->wl.display) != 0) && (ret >= 0)) + ret = wl_display_dispatch_pending(ewd->wl.display); + + if (ret < 0) goto err; + + ret = wl_display_get_error(ewd->wl.display); + if (ret < 0) goto err; + + return; + +err: + code = errno; + if ((ret < 0) && (code != EAGAIN)) + { + _begin_recovery_maybe(ewd, code); + } +} + static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl) { @@ -536,17 +557,20 @@ _cb_connect_data(void *data, Ecore_Fd_Handler *hdl) if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_READ)) { - ret = wl_display_dispatch(ewd->wl.display); + ret = wl_display_read_events(ewd->wl.display); code = errno; if ((ret < 0) && (code != EAGAIN)) goto err; } + else + wl_display_cancel_read(ewd->wl.display); + wl_display_dispatch_pending(ewd->wl.display); if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_WRITE)) { ret = wl_display_flush(ewd->wl.display); code = errno; if (ret >= 0) - ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ); + ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ | ECORE_FD_ALWAYS); if ((ret < 0) && (code != EAGAIN)) goto err; } @@ -572,34 +596,6 @@ _cb_globals_hash_del(void *data) free(global); } -static Eina_Bool -_cb_connect_idle(void *data) -{ - Ecore_Wl2_Display *ewd = data; - int ret = 0, code; - - ret = wl_display_get_error(ewd->wl.display); - code = errno; - if (ret < 0) goto err; - - ret = wl_display_dispatch_pending(ewd->wl.display); - code = errno; - if (ret < 0) goto err; - - return ECORE_CALLBACK_RENEW; - -err: - if ((ret < 0) && (code != EAGAIN)) - { - ewd->idle_enterer = NULL; - _begin_recovery_maybe(ewd, code); - - return ECORE_CALLBACK_CANCEL; - } - - return ECORE_CALLBACK_RENEW; -} - static Ecore_Wl2_Global * _ecore_wl2_global_find(Ecore_Wl2_Display *ewd, const char *interface) { @@ -742,10 +738,11 @@ _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync) ewd->fd_hdl = ecore_main_fd_handler_add(wl_display_get_fd(ewd->wl.display), - ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR, - _cb_connect_data, ewd, NULL, NULL); + ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR | ECORE_FD_ALWAYS, + _cb_connect_data, ewd, NULL, ewd); - ewd->idle_enterer = ecore_idle_enterer_add(_cb_connect_idle, ewd); + ecore_main_fd_handler_prepare_callback_set + (ewd->fd_hdl, _cb_connect_pre, ewd); _ecore_wl2_display_event(ewd, ECORE_WL2_EVENT_CONNECT); return EINA_TRUE; @@ -768,8 +765,6 @@ _ecore_wl2_display_cleanup(Ecore_Wl2_Display *ewd) EINA_INLIST_FOREACH_SAFE(ewd->outputs, tmp, output) _ecore_wl2_output_del(output); - if (ewd->idle_enterer) ecore_idle_enterer_del(ewd->idle_enterer); - if (ewd->fd_hdl) ecore_main_fd_handler_del(ewd->fd_hdl); eina_hash_free(ewd->globals); @@ -1160,7 +1155,7 @@ ecore_wl2_display_flush(Ecore_Wl2_Display *display) if (code == EAGAIN) { ecore_main_fd_handler_active_set(display->fd_hdl, - (ECORE_FD_READ | ECORE_FD_WRITE)); + (ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ALWAYS)); return; } diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index e62ea5f8ea..9b6d4f7e49 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -102,7 +102,6 @@ struct _Ecore_Wl2_Display struct xkb_context *xkb_context; - Ecore_Idle_Enterer *idle_enterer; Ecore_Fd_Handler *fd_hdl; Eina_Hash *globals; From e355373e3213c452492921ca728412fad54011dc Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Wed, 13 Feb 2019 09:58:11 -0500 Subject: [PATCH 34/87] ecore_wl2: fix a non-thread safe call. Summary: this patch contains a change to replace non-thread safe call 'strerror' with eina_error_msg_get. Reviewers: cedric, bu5hm4n, devilhorns Reviewed By: devilhorns Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7921 --- src/lib/ecore_wl2/ecore_wl2_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 376f21da1b..8699dfaace 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -520,7 +520,7 @@ _begin_recovery_maybe(Ecore_Wl2_Display *ewd, int code) _recovery_timer_add(ewd); else if (!_server_displays) { - ERR("Wayland Socket Error: %s", strerror(errno)); + ERR("Wayland Socket Error: %s", eina_error_msg_get(errno)); _ecore_wl2_display_signal_exit(); } } From 4c587ef6796077d879ec607ffaea8029a31351dd Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Wed, 13 Feb 2019 10:01:22 -0500 Subject: [PATCH 35/87] Revert this as it should not have been pushed yet Revert "ecore_main: Add ECORE_FD_ALWAYS flag" This reverts commit b5e90ebe0d49edc405e9a5ab60b3c1e7ea65a5fa. --- src/lib/ecore/Ecore_Common.h | 8 +----- src/lib/ecore/ecore_main.c | 47 +++++++++-------------------------- src/lib/ecore/ecore_private.h | 1 - 3 files changed, 13 insertions(+), 43 deletions(-) diff --git a/src/lib/ecore/Ecore_Common.h b/src/lib/ecore/Ecore_Common.h index de515c57ed..9b777d7364 100644 --- a/src/lib/ecore/Ecore_Common.h +++ b/src/lib/ecore/Ecore_Common.h @@ -1388,13 +1388,7 @@ enum _Ecore_Fd_Handler_Flags { ECORE_FD_READ = 1, /**< Fd Read mask */ ECORE_FD_WRITE = 2, /**< Fd Write mask */ - ECORE_FD_ERROR = 4, /**< Fd Error mask */ - /* ECORE_FD_ALWAYS is intended to fix a problem with wayland - * and threads. It causes the fd handler to be called - * in any state, so wayland libs can call read_cancel - * if nothing is available to read. Everyone else should - * stay away. */ - ECORE_FD_ALWAYS = 8, /**< Fd Always mask - DO NOT USE! */ + ECORE_FD_ERROR = 4 /**< Fd Error mask */ }; typedef enum _Ecore_Fd_Handler_Flags Ecore_Fd_Handler_Flags; diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 9c30ac51db..2c1a2ef868 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -248,7 +248,7 @@ _ecore_try_add_to_call_list(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd, Ecore_Fd_Han DBG("next_ready"); return; } - if (fdh->read_active || fdh->write_active || fdh->error_active || (fdh->flags & ECORE_FD_ALWAYS)) + if (fdh->read_active || fdh->write_active || fdh->error_active) { DBG("added"); // make sure next_ready is non-null by pointing to ourselves @@ -583,10 +583,6 @@ _ecore_main_fdh_epoll_mark_active(Eo *obj, Efl_Loop_Data *pd) fdh->write_active = EINA_TRUE; fdh->error_active = EINA_TRUE; } - /* We'll add this one anyway outside this function, - don't want it twice */ - if (fdh->flags & ECORE_FD_ALWAYS) - continue; _ecore_try_add_to_call_list(obj, pd, fdh); } @@ -1361,9 +1357,6 @@ _ecore_main_fd_handler_add(Eo *obj, if (is_file) pd->file_fd_handlers = eina_list_append (pd->file_fd_handlers, fdh); - if (fdh->flags & ECORE_FD_ALWAYS) - pd->always_fd_handlers = eina_list_append - (pd->always_fd_handlers, fdh); pd->fd_handlers = (Ecore_Fd_Handler *) eina_inlist_append(EINA_INLIST_GET(pd->fd_handlers), EINA_INLIST_GET(fdh)); @@ -1671,9 +1664,6 @@ _ecore_main_content_clear(Eo *obj, Efl_Loop_Data *pd) if (pd->file_fd_handlers) pd->file_fd_handlers = eina_list_free(pd->file_fd_handlers); - if (pd->always_fd_handlers) - pd->always_fd_handlers = - eina_list_free(pd->always_fd_handlers); if (pd->fd_handlers_to_delete) pd->fd_handlers_to_delete = eina_list_free(pd->fd_handlers_to_delete); @@ -1751,7 +1741,7 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) fd_set rfds, wfds, exfds; Ecore_Fd_Handler *fdh; Eina_List *l; - int max_fd, ret, outval; + int max_fd, ret; #ifndef _WIN32 int err_no; #endif @@ -1795,17 +1785,17 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) { if (!fdh->delete_me) { - if ((fdh->flags & ECORE_FD_READ) || (fdh->flags & ECORE_FD_ALWAYS)) + if (fdh->flags & ECORE_FD_READ) { FD_SET(fdh->fd, &rfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if ((fdh->flags & ECORE_FD_WRITE) || (fdh->flags & ECORE_FD_ALWAYS)) + if (fdh->flags & ECORE_FD_WRITE) { FD_SET(fdh->fd, &wfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if ((fdh->flags & ECORE_FD_ERROR) || (fdh->flags & ECORE_FD_ALWAYS)) + if (fdh->flags & ECORE_FD_ERROR) { FD_SET(fdh->fd, &exfds); if (fdh->fd > max_fd) max_fd = fdh->fd; @@ -1825,17 +1815,17 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) { if (!fdh->delete_me) { - if ((fdh->flags & ECORE_FD_READ) || (fdh->flags & ECORE_FD_ALWAYS)) + if (fdh->flags & ECORE_FD_READ) { FD_SET(fdh->fd, &rfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if ((fdh->flags & ECORE_FD_WRITE) || (fdh->flags & ECORE_FD_ALWAYS)) + if (fdh->flags & ECORE_FD_WRITE) { FD_SET(fdh->fd, &wfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if ((fdh->flags & ECORE_FD_ERROR) || (fdh->flags & ECORE_FD_ALWAYS)) + if (fdh->flags & ECORE_FD_ERROR) { FD_SET(fdh->fd, &exfds); if (fdh->fd > max_fd) max_fd = fdh->fd; @@ -1861,11 +1851,7 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) if (ret < 0) { #ifndef _WIN32 - if (err_no == EINTR) - { - outval = -1; - goto BAIL; - } + if (err_no == EINTR) return -1; else if (err_no == EBADF) _ecore_main_fd_handlers_bads_rem(obj, pd); #endif } @@ -1908,15 +1894,9 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) #ifdef _WIN32 _ecore_main_win32_handlers_cleanup(obj, pd); #endif - outval = 1; - goto BAIL; + return 1; } - outval = 0; -BAIL: - EINA_LIST_FOREACH(pd->always_fd_handlers, l, fdh) - _ecore_try_add_to_call_list(obj, pd, fdh); - - return outval; + return 0; } #endif @@ -2037,8 +2017,6 @@ _ecore_main_fd_handlers_cleanup(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd) EINA_INLIST_GET(fdh)); if (fdh->file) pd->file_fd_handlers = eina_list_remove(pd->file_fd_handlers, fdh); - if (fdh->flags & ECORE_FD_ALWAYS) - pd->always_fd_handlers = eina_list_remove(pd->always_fd_handlers, fdh); ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE); ecore_fd_handler_mp_free(fdh); pd->fd_handlers_to_delete = eina_list_remove_list @@ -2096,8 +2074,7 @@ _ecore_main_fd_handlers_call(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd) { if ((fdh->read_active) || (fdh->write_active) || - (fdh->error_active) || - (fdh->flags & ECORE_FD_ALWAYS)) + (fdh->error_active)) { fdh->references++; if (!_ecore_call_fd_cb(fdh->func, fdh->data, fdh)) diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index 2cb3b36d27..4e980d9123 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -138,7 +138,6 @@ struct _Efl_Loop_Data Ecore_Fd_Handler *fd_handlers; Eina_List *fd_handlers_with_prep; Eina_List *file_fd_handlers; - Eina_List *always_fd_handlers; Eina_List *fd_handlers_with_buffer; Eina_List *fd_handlers_to_delete; Ecore_Fd_Handler *fd_handlers_to_call; From 0fed1c77ae05f540fadf422b76636591fb619ae5 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Wed, 13 Feb 2019 10:01:47 -0500 Subject: [PATCH 36/87] Revert this as it should not have been pushed yet Revert "ecore_wl2: Make our wayland socket handling thread safe" This reverts commit efa85f35f447b54a6996337a11d13e3734f110bd. --- src/lib/ecore_wl2/ecore_wl2_display.c | 73 ++++++++++++++------------- src/lib/ecore_wl2/ecore_wl2_private.h | 1 + 2 files changed, 40 insertions(+), 34 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 8699dfaace..a3af818ca4 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -10,6 +10,7 @@ static Eina_Hash *_server_displays = NULL; static Eina_Hash *_client_displays = NULL; +static Eina_Bool _cb_connect_idle(void *data); static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl); static Eina_Bool _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync); @@ -474,6 +475,8 @@ _recovery_timer_add(Ecore_Wl2_Display *ewd) Ecore_Wl2_Window *window; eina_hash_free_buckets(ewd->globals); + ecore_idle_enterer_del(ewd->idle_enterer); + ewd->idle_enterer = NULL; ecore_main_fd_handler_del(ewd->fd_hdl); ewd->fd_hdl = NULL; @@ -525,30 +528,6 @@ _begin_recovery_maybe(Ecore_Wl2_Display *ewd, int code) } } -static void -_cb_connect_pre(void *data, Ecore_Fd_Handler *hdl EINA_UNUSED) -{ - Ecore_Wl2_Display *ewd = data; - int ret = 0, code; - - while ((wl_display_prepare_read(ewd->wl.display) != 0) && (ret >= 0)) - ret = wl_display_dispatch_pending(ewd->wl.display); - - if (ret < 0) goto err; - - ret = wl_display_get_error(ewd->wl.display); - if (ret < 0) goto err; - - return; - -err: - code = errno; - if ((ret < 0) && (code != EAGAIN)) - { - _begin_recovery_maybe(ewd, code); - } -} - static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl) { @@ -557,20 +536,17 @@ _cb_connect_data(void *data, Ecore_Fd_Handler *hdl) if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_READ)) { - ret = wl_display_read_events(ewd->wl.display); + ret = wl_display_dispatch(ewd->wl.display); code = errno; if ((ret < 0) && (code != EAGAIN)) goto err; } - else - wl_display_cancel_read(ewd->wl.display); - wl_display_dispatch_pending(ewd->wl.display); if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_WRITE)) { ret = wl_display_flush(ewd->wl.display); code = errno; if (ret >= 0) - ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ | ECORE_FD_ALWAYS); + ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ); if ((ret < 0) && (code != EAGAIN)) goto err; } @@ -596,6 +572,34 @@ _cb_globals_hash_del(void *data) free(global); } +static Eina_Bool +_cb_connect_idle(void *data) +{ + Ecore_Wl2_Display *ewd = data; + int ret = 0, code; + + ret = wl_display_get_error(ewd->wl.display); + code = errno; + if (ret < 0) goto err; + + ret = wl_display_dispatch_pending(ewd->wl.display); + code = errno; + if (ret < 0) goto err; + + return ECORE_CALLBACK_RENEW; + +err: + if ((ret < 0) && (code != EAGAIN)) + { + ewd->idle_enterer = NULL; + _begin_recovery_maybe(ewd, code); + + return ECORE_CALLBACK_CANCEL; + } + + return ECORE_CALLBACK_RENEW; +} + static Ecore_Wl2_Global * _ecore_wl2_global_find(Ecore_Wl2_Display *ewd, const char *interface) { @@ -738,11 +742,10 @@ _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync) ewd->fd_hdl = ecore_main_fd_handler_add(wl_display_get_fd(ewd->wl.display), - ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR | ECORE_FD_ALWAYS, - _cb_connect_data, ewd, NULL, ewd); + ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR, + _cb_connect_data, ewd, NULL, NULL); - ecore_main_fd_handler_prepare_callback_set - (ewd->fd_hdl, _cb_connect_pre, ewd); + ewd->idle_enterer = ecore_idle_enterer_add(_cb_connect_idle, ewd); _ecore_wl2_display_event(ewd, ECORE_WL2_EVENT_CONNECT); return EINA_TRUE; @@ -765,6 +768,8 @@ _ecore_wl2_display_cleanup(Ecore_Wl2_Display *ewd) EINA_INLIST_FOREACH_SAFE(ewd->outputs, tmp, output) _ecore_wl2_output_del(output); + if (ewd->idle_enterer) ecore_idle_enterer_del(ewd->idle_enterer); + if (ewd->fd_hdl) ecore_main_fd_handler_del(ewd->fd_hdl); eina_hash_free(ewd->globals); @@ -1155,7 +1160,7 @@ ecore_wl2_display_flush(Ecore_Wl2_Display *display) if (code == EAGAIN) { ecore_main_fd_handler_active_set(display->fd_hdl, - (ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ALWAYS)); + (ECORE_FD_READ | ECORE_FD_WRITE)); return; } diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 9b6d4f7e49..e62ea5f8ea 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -102,6 +102,7 @@ struct _Ecore_Wl2_Display struct xkb_context *xkb_context; + Ecore_Idle_Enterer *idle_enterer; Ecore_Fd_Handler *fd_hdl; Eina_Hash *globals; From 80b364f3928c8b986403779be665188a6762edf3 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Wed, 13 Feb 2019 10:42:24 -0500 Subject: [PATCH 37/87] ecore_evas: fix a potentional deref after null problem Summary: this patch modify a logic to return after, failing to call eore_evas_buffer_allocfunc_new function. Reviewers: Hermet, bu5hm4n, cedric, devilhorns Reviewed By: devilhorns Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7918 --- src/lib/ecore_evas/ecore_evas_buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c index 613f72dd37..147e09070b 100644 --- a/src/lib/ecore_evas/ecore_evas_buffer.c +++ b/src/lib/ecore_evas/ecore_evas_buffer.c @@ -896,7 +896,11 @@ ecore_evas_buffer_new(int w, int h) ecore_evas_buffer_allocfunc_new(w, h, _ecore_evas_buffer_pix_alloc, _ecore_evas_buffer_pix_free, NULL); - if (!ee) ecore_event_evas_shutdown(); + if (!ee) + { + ecore_event_evas_shutdown(); + return NULL; + } ecore_evas_done(ee, EINA_TRUE); From 33c40419502265c7a2c357d6a274453818d98729 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Wed, 13 Feb 2019 10:43:23 -0500 Subject: [PATCH 38/87] ecore_wl2: replace strcpy with strncpy Summary: this patch replaces a volnerable function with a safer one. Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7920 --- src/lib/ecore_wl2/ecore_wl2_input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c index 0d480f50e8..0a7ae211d3 100644 --- a/src/lib/ecore_wl2/ecore_wl2_input.c +++ b/src/lib/ecore_wl2/ecore_wl2_input.c @@ -635,9 +635,9 @@ _ecore_wl2_input_key_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window, xkb_ ev->compose = comp_len ? ev->key + key_len + 1 : NULL; ev->string = ev->compose; - strcpy((char *)ev->keyname, keyname); - strcpy((char *)ev->key, key); - if (comp_len) strcpy((char *)ev->compose, compose); + strncpy((char *)ev->keyname, keyname, key_len + 1); + strncpy((char *)ev->key, key, name_len + 1); + if (comp_len) strncpy((char *)ev->compose, compose, comp_len +1); ev->window = (Ecore_Window)window; ev->event_window = (Ecore_Window)window; From 3b2a5a429be16e5b8e5d322b7a077a2c849586b8 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 9 Feb 2019 19:08:45 +0100 Subject: [PATCH 39/87] efl_input: remove the API of efl_input_instance_get there is basically no reason for this API. You can only use the API when you know the class, when you know the class you can also just know the function to call to get this API. The reason this API needs to go is that we don't want to use polymorphism on class-functions. ref T7675 Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D7900 --- src/lib/ecore_evas/ecore_evas.c | 14 +++++++------- src/lib/elementary/efl_ui_win.c | 2 +- src/lib/evas/Evas_Internal.h | 6 +++++- src/lib/evas/canvas/efl_input_event.c | 2 +- src/lib/evas/canvas/efl_input_focus.c | 11 ++++------- src/lib/evas/canvas/efl_input_hold.c | 11 ++++------- src/lib/evas/canvas/efl_input_key.c | 12 ++++-------- src/lib/evas/canvas/efl_input_pointer.c | 12 ++++-------- src/lib/evas/canvas/evas_events.c | 20 ++++++++++---------- src/lib/evas/canvas/evas_focus.c | 2 +- src/lib/evas/canvas/evas_main.c | 2 +- src/lib/evas/include/evas_private.h | 2 +- 12 files changed, 43 insertions(+), 53 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index cbd3107fa3..ff711084d7 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -3618,7 +3618,7 @@ _ecore_evas_mouse_move_process_internal(Ecore_Evas *ee, if (!send_event) return; - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, ee->evas, (void **) &ev); + evt = efl_input_pointer_instance_get( ee->evas, (void **) &ev); if (!evt) return; ev->action = EFL_POINTER_ACTION_MOVE; @@ -4811,7 +4811,7 @@ _direct_mouse_updown(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info, Efl_P * modifiers (already passed to evas, no need to do anything) */ - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, e, (void **) &ev); + evt = efl_input_pointer_instance_get( e, (void **) &ev); if (!evt) return EINA_FALSE; ev->action = action; @@ -4875,7 +4875,7 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Move *info) * modifiers (already passed to evas, no need to do anything) */ - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, e, (void **) &ev); + evt = efl_input_pointer_instance_get( e, (void **) &ev); if (!evt) return EINA_FALSE; ev->action = EFL_POINTER_ACTION_MOVE; @@ -4915,7 +4915,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Wheel *info) * modifiers (already passed to evas, no need to do anything) */ - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, e, (void **) &ev); + evt = efl_input_pointer_instance_get( e, (void **) &ev); if (!evt) return EINA_FALSE; ev->action = EFL_POINTER_ACTION_WHEEL; @@ -4947,7 +4947,7 @@ _direct_mouse_inout(Ecore_Evas *ee, const Ecore_Event_Mouse_IO *info, Efl_Pointe * modifiers (already passed to evas, no need to do anything) */ - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, e, (void **) &ev); + evt = efl_input_pointer_instance_get( e, (void **) &ev); if (!evt) return EINA_FALSE; ev->action = action; @@ -4991,7 +4991,7 @@ _direct_axis_update_cb(Ecore_Evas *ee, const Ecore_Event_Axis_Update *info) * window, root_window, event_window */ - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, e, (void **) &ev); + evt = efl_input_pointer_instance_get( e, (void **) &ev); if (!ev) return EINA_FALSE; ev->action = EFL_POINTER_ACTION_AXIS; @@ -5110,7 +5110,7 @@ _direct_key_updown_cb(Ecore_Evas *ee, const Ecore_Event_Key *info, Eina_Bool dow * modifiers (already passed to evas, no need to do anything) */ - evt = efl_input_instance_get(EFL_INPUT_KEY_CLASS, e, (void **) &ev); + evt = efl_input_key_instance_get( e, (void **) &ev); if (!evt || !ev) return EINA_FALSE; ev->timestamp = info->timestamp; diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 72188bf5f9..2e9e463205 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -2534,7 +2534,7 @@ _efl_ui_win_efl_canvas_scene_pointer_iterate(const Eo *obj, Efl_Ui_Win_Data *sd, Efl_Input_Pointer *ptr; double x, y; - ptr = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, (Eo *) obj, (void **) &ptrdata); + ptr = efl_input_pointer_instance_get( (Eo *) obj, (void **) &ptrdata); if (!ptrdata) break; ptrdata->tool = evas_touch_point_list_nth_id_get(sd->evas, i); diff --git a/src/lib/evas/Evas_Internal.h b/src/lib/evas/Evas_Internal.h index b65277ed2d..6fd25c91cb 100644 --- a/src/lib/evas/Evas_Internal.h +++ b/src/lib/evas/Evas_Internal.h @@ -74,7 +74,11 @@ EOAPI void evas_canvas_seat_focus_out(Eo *obj, Efl_Input_Device *seat); EOAPI Eo* evas_canvas_seat_focus_get(const Eo *obj, Efl_Input_Device *seat); EOAPI void *efl_input_legacy_info_get(const Eo *obj); -EOAPI Eo *efl_input_instance_get(const Eo *obj, Efl_Object *owner, void **priv); + +EOAPI Eo *efl_input_focus_instance_get(Efl_Object *owner, void **priv); +EOAPI Eo *efl_input_hold_instance_get(Efl_Object *owner, void **priv); +EOAPI Eo *efl_input_key_instance_get(Efl_Object *owner, void **priv); +EOAPI Eo *efl_input_pointer_instance_get(Efl_Object *owner, void **priv); EWAPI extern const Efl_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE; #define EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE (&(_EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE)) diff --git a/src/lib/evas/canvas/efl_input_event.c b/src/lib/evas/canvas/efl_input_event.c index 1a172166b1..8b02713ad7 100644 --- a/src/lib/evas/canvas/efl_input_event.c +++ b/src/lib/evas/canvas/efl_input_event.c @@ -95,7 +95,7 @@ _noref_death(void *data EINA_UNUSED, const Efl_Event *event) } Efl_Input_Event * -efl_input_event_instance_get(Eo *klass, Eo *owner) +efl_input_event_instance_get(const Eo *klass, Eo *owner) { Efl_Input_Event *evt; diff --git a/src/lib/evas/canvas/efl_input_focus.c b/src/lib/evas/canvas/efl_input_focus.c index f43673bbad..d7b18dec53 100644 --- a/src/lib/evas/canvas/efl_input_focus.c +++ b/src/lib/evas/canvas/efl_input_focus.c @@ -101,14 +101,14 @@ _efl_input_focus_efl_duplicate_duplicate(const Eo *obj, Efl_Input_Focus_Data *pd return evt; } -EOLIAN static Efl_Input_Focus * -_efl_input_focus_efl_input_event_instance_get(Eo *klass, void *_pd EINA_UNUSED, - Eo *owner, void **priv) + +EOAPI Eo* +efl_input_focus_instance_get(Efl_Object *owner, void **priv) { Efl_Input_Focus_Data *ev; Efl_Input_Focus *evt; - evt = efl_input_event_instance_get(klass, owner); + evt = efl_input_event_instance_get(EFL_INPUT_FOCUS_CLASS, owner); if (!evt) return NULL; ev = efl_data_scope_get(evt, MY_CLASS); @@ -148,7 +148,4 @@ _efl_input_focus_efl_input_event_event_flags_get(const Eo *obj EINA_UNUSED, Efl_ /* Internal EO APIs */ -#define EFL_INPUT_FOCUS_EXTRA_CLASS_OPS \ - EFL_OBJECT_OP_FUNC(efl_input_instance_get, _efl_input_focus_efl_input_event_instance_get) - #include "efl_input_focus.eo.c" diff --git a/src/lib/evas/canvas/efl_input_hold.c b/src/lib/evas/canvas/efl_input_hold.c index e034e4ab6e..0713ca6e2a 100644 --- a/src/lib/evas/canvas/efl_input_hold.c +++ b/src/lib/evas/canvas/efl_input_hold.c @@ -82,11 +82,11 @@ _efl_input_hold_efl_object_destructor(Eo *obj, Efl_Input_Hold_Data *pd) efl_destructor(efl_super(obj, MY_CLASS)); } -EOLIAN static Efl_Input_Event * -_efl_input_hold_efl_input_event_instance_get(Eo *klass, void *_pd EINA_UNUSED, - Efl_Object *owner, void **priv) + +EOAPI Eo* +efl_input_hold_instance_get(Efl_Object *owner, void **priv) { - Efl_Input_Event *evt = efl_input_event_instance_get(klass, owner);; + Efl_Input_Event *evt = efl_input_event_instance_get(EFL_INPUT_HOLD_CLASS, owner);; if (!evt) return NULL; if (priv) *priv = efl_data_scope_get(evt, MY_CLASS); @@ -139,7 +139,4 @@ _efl_input_hold_efl_input_event_legacy_info_get(Eo *obj, Efl_Input_Hold_Data *pd #define EFL_INPUT_HOLD_EXTRA_OPS \ EFL_OBJECT_OP_FUNC(efl_input_legacy_info_get, _efl_input_hold_efl_input_event_legacy_info_get) -#define EFL_INPUT_HOLD_EXTRA_CLASS_OPS \ - EFL_OBJECT_OP_FUNC(efl_input_instance_get, _efl_input_hold_efl_input_event_instance_get) - #include "efl_input_hold.eo.c" diff --git a/src/lib/evas/canvas/efl_input_key.c b/src/lib/evas/canvas/efl_input_key.c index ce1acd6b26..11af16b0a2 100644 --- a/src/lib/evas/canvas/efl_input_key.c +++ b/src/lib/evas/canvas/efl_input_key.c @@ -12,18 +12,17 @@ #define MY_CLASS EFL_INPUT_KEY_CLASS -EOLIAN static Efl_Input_Key * -_efl_input_key_efl_input_event_instance_get(Eo *klass, void *_pd EINA_UNUSED, - Eo *owner, void **priv) +EOAPI Eo* +efl_input_key_instance_get(Efl_Object *owner, void **priv) { Efl_Input_Key_Data *ev; Efl_Input_Key *evt; Evas *evas; - evt = efl_input_event_instance_get(klass, owner); + evt = efl_input_event_instance_get(EFL_INPUT_KEY_CLASS, owner); if (!evt) return NULL; - ev = efl_data_scope_get(evt, klass); + ev = efl_data_scope_get(evt, EFL_INPUT_KEY_CLASS); ev->fake = EINA_FALSE; if (priv) *priv = ev; @@ -267,7 +266,4 @@ _efl_input_key_efl_input_event_legacy_info_get(Eo *obj, Efl_Input_Key_Data *pd) #define EFL_INPUT_KEY_EXTRA_OPS \ EFL_OBJECT_OP_FUNC(efl_input_legacy_info_get, _efl_input_key_efl_input_event_legacy_info_get) -#define EFL_INPUT_KEY_EXTRA_CLASS_OPS \ - EFL_OBJECT_OP_FUNC(efl_input_instance_get, _efl_input_key_efl_input_event_instance_get) - #include "efl_input_key.eo.c" diff --git a/src/lib/evas/canvas/efl_input_pointer.c b/src/lib/evas/canvas/efl_input_pointer.c index 4dfa3bc2c6..6c24f88c2c 100644 --- a/src/lib/evas/canvas/efl_input_pointer.c +++ b/src/lib/evas/canvas/efl_input_pointer.c @@ -24,17 +24,16 @@ */ /* internal eo */ -static Efl_Input_Pointer * -_efl_input_pointer_efl_input_event_instance_get(Eo *klass, void *_pd EINA_UNUSED, - Eo *owner, void **priv) +EOAPI Eo* +efl_input_pointer_instance_get(Efl_Object *owner, void **priv) { Efl_Input_Pointer_Data *ev; Efl_Input_Pointer *evt; - evt = efl_input_event_instance_get(klass, owner); + evt = efl_input_event_instance_get(EFL_INPUT_POINTER_CLASS, owner); if (!evt) return NULL; - ev = efl_data_scope_get(evt, klass); + ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS); ev->fake = EINA_FALSE; if (priv) *priv = ev; @@ -623,7 +622,4 @@ _efl_input_pointer_efl_input_event_legacy_info_get(Eo *obj, Efl_Input_Pointer_Da #define EFL_INPUT_POINTER_EXTRA_OPS \ EFL_OBJECT_OP_FUNC(efl_input_legacy_info_get, _efl_input_pointer_efl_input_event_legacy_info_get) -#define EFL_INPUT_POINTER_EXTRA_CLASS_OPS \ - EFL_OBJECT_OP_FUNC(efl_input_instance_get, _efl_input_pointer_efl_input_event_instance_get) - #include "efl_input_pointer.eo.c" diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index 7a2d4cc67b..06d6923e6c 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c @@ -1843,7 +1843,7 @@ _canvas_event_feed_mouse_updown(Eo *eo_e, int b, Evas_Button_Flags flags, if (!e) return; EVAS_EVENT_FEED_SAFETY_CHECK(e); - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev); + evt = efl_input_pointer_instance_get( eo_e, (void **) &ev); if (!ev) return; ev->data = (void *) data; @@ -1957,7 +1957,7 @@ evas_event_feed_mouse_cancel(Eo *eo_e, unsigned int timestamp, const void *data) Efl_Input_Pointer_Data *ev = NULL; Efl_Input_Pointer *evt; - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev); + evt = efl_input_pointer_instance_get( eo_e, (void **) &ev); if (!ev) return; EVAS_EVENT_FEED_SAFETY_CHECK(e); @@ -2048,7 +2048,7 @@ evas_event_feed_mouse_wheel(Eo *eo_e, int direction, int z, unsigned int timesta { EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS)); Efl_Input_Pointer_Data *ev = NULL; - Efl_Input_Pointer *evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev); + Efl_Input_Pointer *evt = efl_input_pointer_instance_get( eo_e, (void **) &ev); if (!ev) return; @@ -2489,7 +2489,7 @@ _canvas_event_feed_mouse_move_legacy(Evas *eo_e, Evas_Public_Data *e, int x, int Efl_Input_Pointer_Data *ev = NULL; Efl_Input_Pointer *evt; - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev); + evt = efl_input_pointer_instance_get( eo_e, (void **) &ev); if (!ev) return; ev->data = (void *) data; @@ -2716,7 +2716,7 @@ _canvas_event_feed_mouse_inout_legacy(Eo *eo_e, unsigned int timestamp, Efl_Input_Pointer_Data *ev = NULL; Efl_Input_Pointer *evt; - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev); + evt = efl_input_pointer_instance_get( eo_e, (void **) &ev); if (!ev) return; ev->timestamp = timestamp; @@ -2938,7 +2938,7 @@ _canvas_event_feed_multi_internal(Evas *eo_e, Evas_Public_Data *e, Efl_Input_Pointer_Data *ev = NULL; Efl_Input_Pointer *evt; - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev); + evt = efl_input_pointer_instance_get( eo_e, (void **) &ev); if (!e || !ev) return; EVAS_EVENT_FEED_SAFETY_CHECK(e); @@ -3417,7 +3417,7 @@ _canvas_event_feed_key_legacy(Eo *eo_e, Evas_Public_Data *e, if (!keyname) return; - evt = efl_input_instance_get(EFL_INPUT_KEY_CLASS, eo_e, (void **) &ev); + evt = efl_input_key_instance_get( eo_e, (void **) &ev); if (!ev) return; ev->keyname = (char *) keyname; @@ -3491,7 +3491,7 @@ evas_event_feed_hold(Eo *eo_e, int hold, unsigned int timestamp, const void *dat event_id = _evas_object_event_new(); - evt = efl_input_instance_get(EFL_INPUT_HOLD_CLASS, eo_e, (void **) &ev); + evt = efl_input_hold_instance_get(eo_e, (void **) &ev); if (!ev) return; ev->hold = !!hold; @@ -3590,7 +3590,7 @@ evas_event_feed_axis_update(Evas *eo_e, unsigned int timestamp, int device, int if (!e) return; EVAS_EVENT_FEED_SAFETY_CHECK(e); - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev); + evt = efl_input_pointer_instance_get( eo_e, (void **) &ev); if (!ev) return; ev->data = (void *) data; @@ -4203,7 +4203,7 @@ _evas_canvas_event_pointer_move_event_dispatch(Evas_Public_Data *edata, Efl_Input_Pointer_Data *ev = NULL; Efl_Input_Pointer *evt; - evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, edata->evas, + evt = efl_input_pointer_instance_get( edata->evas, (void **) &ev); if (!evt) return; diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c index 52ad4fe033..d76c1042dc 100644 --- a/src/lib/evas/canvas/evas_focus.c +++ b/src/lib/evas/canvas/evas_focus.c @@ -107,7 +107,7 @@ _evas_focus_dispatch_event(Evas_Object_Protected_Data *obj, Efl_Input_Device *se const Efl_Event_Description *efl_object_focus_event; EVAS_OBJECT_DATA_VALID_CHECK(obj); - evt = efl_input_instance_get(EFL_INPUT_FOCUS_CLASS, + evt = efl_input_focus_instance_get( efl_provider_find(obj->object, EVAS_CANVAS_CLASS), (void **) &ev_data); if (!evt) return; diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index c9baf74bca..0d574c5418 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -760,7 +760,7 @@ _evas_canvas_focus_inout_dispatch(Eo *eo_e, Efl_Input_Device *seat, Efl_Input_Focus_Data *ev_data; Efl_Input_Focus *evt; - evt = efl_input_instance_get(EFL_INPUT_FOCUS_CLASS, eo_e, (void **) &ev_data); + evt = efl_input_focus_instance_get(eo_e, (void **) &ev_data); if (!evt) return; ev_data->device = efl_ref(seat); diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 73a0c28e64..984b52ed67 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1867,7 +1867,7 @@ void _evas_device_cleanup(Evas *e); Evas_Device *_evas_device_top_get(const Evas *e); /* legacy/eo events */ -Efl_Input_Event *efl_input_event_instance_get(Eo *klass, Eo *owner); +Efl_Input_Event *efl_input_event_instance_get(const Eo *klass, Eo *owner); void efl_input_event_instance_clean(Eo *klass); void *efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Callback_Type type, Evas_Event_Flags **pflags); From 37d2d378ec2e2d1f9a3941372ef4d818996291c7 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 9 Feb 2019 18:45:27 +0100 Subject: [PATCH 40/87] eolian: drop class function overriding Until this commit eo did class functions as part of the vtable, which enabled those functions to be overwritten in classes inheriting another class. However in task T7675 we decided that this is not really good for bindings, as most OOP languages do not support this sort of feature. After this commit eolian realizes class function completly outside of the vtable, the c-symbol that is the class funciton is now just directly redirecting to a implementation, without the involvement of the vtable. This also means a change to the syntax created by eo: Calling before: class_function(CLASS_A); Calling after: class_function(); Implementation before: class_function(const Eo *obj, void *pd) { ... } Implementation after: class_function(void) { ... } This fixes T7675. Co-authored-by: lauromauro Reviewed-by: Daniel Kolesa Differential Revision: https://phab.enlightenment.org/D7901 --- src/bin/elementary/test_efl_ui_text.c | 4 +- src/bin/eolian/headers.c | 2 +- src/bin/eolian/sources.c | 94 ++++++++++++------- .../eolian/mono/function_definition.hh | 15 +-- .../ecore/efl_net_ip_address_example.c | 4 +- .../ecore/efl_net_socket_ssl_dialer_example.c | 2 +- src/lib/ecore/ecore_event_message_handler.c | 2 +- src/lib/ecore/ecore_events.c | 3 +- src/lib/ecore/efl_app.c | 2 +- src/lib/ecore/efl_core_proc_env.c | 2 +- src/lib/ecore/efl_loop.c | 8 +- src/lib/ecore_con/ecore_con_url.c | 2 +- src/lib/ecore_con/efl_net_dialer_http.c | 4 +- src/lib/ecore_con/efl_net_dialer_ssl.c | 2 +- src/lib/ecore_con/efl_net_dialer_udp.c | 2 +- src/lib/ecore_con/efl_net_ip_address.c | 16 ++-- src/lib/ecore_con/efl_net_ssl_context.c | 4 +- src/lib/edje/edje_util.c | 1 - src/lib/efl/interfaces/efl_text_markup_util.c | 6 +- src/lib/elementary/efl_access_object.c | 8 +- src/lib/elementary/efl_access_object.h | 26 ++--- src/lib/elementary/efl_access_window.h | 14 +-- src/lib/elementary/efl_ui_dnd.c | 4 +- src/lib/elementary/efl_ui_focus_layer.c | 2 +- .../elementary/efl_ui_focus_manager_calc.c | 6 +- src/lib/elementary/efl_ui_focus_util.c | 8 +- src/lib/elementary/efl_ui_widget.c | 2 +- src/lib/elementary/efl_ui_win.c | 12 +-- src/lib/elementary/elm_access.c | 2 +- src/lib/elementary/elm_atspi_bridge.c | 20 ++-- src/lib/elementary/elm_entry.c | 12 +-- src/lib/elementary/elm_focus_legacy.c | 10 +- src/lib/elementary/elm_menu.c | 4 +- src/lib/elementary/elm_sys_notify.c | 7 +- src/lib/elementary/elm_theme.c | 2 +- src/lib/eo/eo_base_class.c | 6 +- .../grammar/function_definition.hpp | 19 ++-- src/lib/evas/canvas/efl_input_event.c | 4 - src/tests/ecore/efl_app_suite.c | 2 +- src/tests/ecore/efl_app_test_env.c | 4 +- src/tests/ecore/efl_app_test_loop.c | 14 +-- src/tests/ecore/efl_app_test_loop_timer.c | 2 +- .../ecore_con_test_efl_net_ip_address.c | 92 +++++++++--------- src/tests/efl_mono/libefl_mono_native_test.c | 23 ++--- src/tests/elementary/efl_ui_model.c | 6 +- src/tests/elementary/efl_ui_test_focus.c | 4 +- src/tests/elementary/elm_test_genlist.c | 6 +- src/tests/elementary/elm_test_win.c | 5 +- src/tests/elementary/suite_helpers.c | 8 +- src/tests/eo/signals/signals_main.c | 30 +++--- src/tests/eolian/data/class_simple_ref.c | 9 +- .../eolian/data/function_as_argument_ref.c | 9 +- src/tests/eolian/data/override_ref.c | 9 +- src/tests/eolian/data/owning.eo.c | 9 +- 54 files changed, 282 insertions(+), 293 deletions(-) diff --git a/src/bin/elementary/test_efl_ui_text.c b/src/bin/elementary/test_efl_ui_text.c index f8280f0612..1ef0873935 100644 --- a/src/bin/elementary/test_efl_ui_text.c +++ b/src/bin/elementary/test_efl_ui_text.c @@ -71,7 +71,7 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi efl_text_multiline_set(en, EINA_TRUE); en = _create_label(win, bx); - markup = efl_text_markup_util_text_to_markup(EFL_TEXT_MARKUP_UTIL_CLASS, + markup = efl_text_markup_util_text_to_markup( "You can use the text -> markup helper\nto make coding easier."); efl_text_markup_set(en, markup); free(markup); @@ -80,7 +80,7 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi efl_text_multiline_set(en, EINA_TRUE); en = _create_label(win, bx); - markup = efl_text_markup_util_markup_to_text(EFL_TEXT_MARKUP_UTIL_CLASS, + markup = efl_text_markup_util_markup_to_text( "You can use markup -> text helpersto make coding easier."); efl_text_set(en, markup); free(markup); diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c index 4ebf9a7fdd..70520fc7a2 100644 --- a/src/bin/eolian/headers.c +++ b/src/bin/eolian/headers.c @@ -125,7 +125,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid, eina_stringshare_del(fcn); Eina_Strbuf *flagbuf = NULL; - int nidx = !legacy || !eolian_function_is_class(fid); + int nidx = !eolian_function_is_class(fid); eina_strbuf_append_char(buf, '('); if (nidx) diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index eb2ad41ace..493ec1ad40 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -386,8 +386,14 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_strbuf_append(params, ", "); eina_strbuf_append(params, prn); - eina_strbuf_append_printf(params_full, ", %s", ptn); - eina_strbuf_append_printf(params_full_imp, ", %s", ptn); + if (eina_strbuf_length_get(params_full) || !eolian_function_is_class(fid)) + { + eina_strbuf_append(params_full, ", "); + eina_strbuf_append(params_full_imp, ", "); + } + eina_strbuf_append_printf(params_full, "%s", ptn); + eina_strbuf_append_printf(params_full_imp, "%s", ptn); + if (ptn[strlen(ptn) - 1] != '*') { eina_strbuf_append_char(params_full, ' '); @@ -470,7 +476,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, if (eina_strbuf_length_get(params)) eina_strbuf_append(params, ", "); - eina_strbuf_append(params_full_imp, ", "); + if (eina_strbuf_length_get(params_full_imp) || !eolian_function_is_class(fid)) + eina_strbuf_append(params_full_imp, ", "); eina_strbuf_append(params_full_imp, ptn); if (!had_star) eina_strbuf_append_char(params_full_imp, ' '); @@ -480,7 +487,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_strbuf_append(params_full_imp, " EINA_UNUSED"); eina_strbuf_append(params, prn); - eina_strbuf_append(params_full, ", "); + if (eina_strbuf_length_get(params_full) || !eolian_function_is_class(fid)) + eina_strbuf_append(params_full, ", "); eina_strbuf_append(params_full, ptn); if (!had_star) eina_strbuf_append_char(params_full, ' '); @@ -559,12 +567,17 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_strbuf_append(buf, func_suffix); /* ([const ]Eo *obj, Data_Type *pd, impl_full_params); */ eina_strbuf_append_char(buf, '('); - if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid)) - eina_strbuf_append(buf, "const "); - eina_strbuf_append(buf, "Eo *obj, "); - eina_strbuf_append(buf, dt); - eina_strbuf_append(buf, " *pd"); + if (!eolian_function_is_class(fid)) + { + if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid)) + eina_strbuf_append(buf, "const "); + eina_strbuf_append(buf, "Eo *obj, "); + eina_strbuf_append(buf, dt); + eina_strbuf_append(buf, " *pd"); + } eina_strbuf_append(buf, eina_strbuf_string_get(params_full_imp)); + if (eina_strbuf_length_get(params_full_imp) == 0 && eolian_function_is_class(fid)) + eina_strbuf_append(buf, "void"); eina_strbuf_append(buf, ");\n\n"); } @@ -635,7 +648,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_stringshare_del(dt); } - if (impl_same_class) + if (impl_same_class && !eolian_function_is_class(fid)) { void *data; Eina_Iterator *itr = eolian_property_keys_get(fid, ftype); @@ -746,6 +759,36 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_stringshare_del(lfn); eina_stringshare_del(eofn); } + if (impl_same_class && eolian_function_is_class(fid)) + { + eina_strbuf_append(buf, "EOAPI "); + if (rtp) + eina_strbuf_append(buf, eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN)); + else + eina_strbuf_append(buf, "void"); + eina_strbuf_append(buf, " "); + eina_strbuf_append(buf, eolian_function_full_c_name_get(fid, ftype, EINA_FALSE)); + eina_strbuf_append(buf, "("); + if (eina_strbuf_length_get(params_full) == 0) + eina_strbuf_append(buf, "void"); + else + eina_strbuf_append_buffer(buf, params_full); + eina_strbuf_append(buf, ")\n"); + eina_strbuf_append(buf, "{\n"); + eina_strbuf_append_printf(buf, " %s();\n", eolian_class_c_get_function_name_get(cl)); + if (rtp) + eina_strbuf_append(buf, " return "); + else + eina_strbuf_append(buf, " "); + eina_strbuf_append_printf(buf, "_%s", ocnamel); + eina_strbuf_append_char(buf, '_'); + eina_strbuf_append(buf, eolian_function_name_get(fid)); + eina_strbuf_append(buf, func_suffix); + eina_strbuf_append(buf, "("); + eina_strbuf_append_buffer(buf, params); + eina_strbuf_append(buf, ");\n"); + eina_strbuf_append(buf, "}\n"); + } free(cname); free(cnamel); @@ -797,9 +840,9 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf) eina_strbuf_append(buf, "\nstatic Eina_Bool\n_"); eina_strbuf_append(buf, cnamel); eina_strbuf_append(buf, "_class_initializer(Efl_Class *klass)\n{\n"); - eina_strbuf_append(buf, " const Efl_Object_Ops *opsp = NULL, *copsp = NULL;\n\n"); + eina_strbuf_append(buf, " const Efl_Object_Ops *opsp = NULL;\n\n"); - Eina_Strbuf *ops = eina_strbuf_new(), *cops = eina_strbuf_new(); + Eina_Strbuf *ops = eina_strbuf_new(); /* start over with clean itearator */ const Eolian_Implement *imp; @@ -810,13 +853,12 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf) Eolian_Function_Type ftype; const Eolian_Function *fid = eolian_implement_function_get(imp, &ftype); + if (eolian_function_is_class(fid)) continue; + Eina_Strbuf *obuf = ops; - if (eolian_function_is_class(fid)) - obuf = cops; if (!eina_strbuf_length_get(obuf)) - eina_strbuf_append_printf(obuf, " EFL_OPS_DEFINE(%s,\n", - (obuf == ops) ? "ops" : "cops"); + eina_strbuf_append_printf(obuf, " EFL_OPS_DEFINE(ops,\n"); Eina_Bool found_get = !!eina_hash_find(_funcs_params_init_get, &imp); Eina_Bool found_set = !!eina_hash_find(_funcs_params_init_set, &imp); @@ -864,28 +906,10 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf) eina_strbuf_append(buf, " opsp = &ops;\n"); eina_strbuf_append(buf, "#endif\n\n"); } - if (eina_strbuf_length_get(cops)) - { - eina_strbuf_append_printf(buf, "#ifndef %s_EXTRA_CLASS_OPS\n", cnameu); - eina_strbuf_append_printf(buf, "#define %s_EXTRA_CLASS_OPS\n", cnameu); - eina_strbuf_append(buf, "#endif\n\n"); - eina_strbuf_append_printf(cops, " %s_EXTRA_CLASS_OPS\n );\n", cnameu); - eina_strbuf_append(buf, eina_strbuf_string_get(cops)); - eina_strbuf_append(buf, " copsp = &cops;\n\n"); - } - else - { - eina_strbuf_append_printf(buf, "#ifdef %s_EXTRA_CLASS_OPS\n", cnameu); - eina_strbuf_append_printf(buf, " EFL_OPS_DEFINE(cops, %s_EXTRA_CLASS_OPS);\n", cnameu); - eina_strbuf_append(buf, " copsp = &cops;\n"); - eina_strbuf_append(buf, "#endif\n\n"); - } - - eina_strbuf_append(buf, " return efl_class_functions_set(klass, opsp, copsp, NULL);\n"); + eina_strbuf_append(buf, " return efl_class_functions_set(klass, opsp, NULL, NULL);\n"); eina_strbuf_free(ops); - eina_strbuf_free(cops); eina_strbuf_append(buf, "}\n\n"); diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh index f89ac954cb..9fef462002 100644 --- a/src/bin/eolian_mono/eolian/mono/function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh @@ -147,11 +147,12 @@ struct function_definition_generator << (do_super ? " protected " : " private ") << "static extern " << eolian_mono::marshall_type(true) << " " << string - << "(System.IntPtr obj" - << *grammar::attribute_reorder<-1, -1> + << "(" << (f.is_static ? "" : "System.IntPtr obj") + << ((!f.is_static && (f.parameters.size() > 0)) ? ", " : "") + << (grammar::attribute_reorder<-1, -1> ( - (", " << marshall_annotation << " " << marshall_parameter) - ) + (marshall_annotation << " " << marshall_parameter) + ) % ",") << ");\n") .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context)) return false; @@ -170,14 +171,14 @@ struct function_definition_generator if (do_super && !f.is_static) self = "(inherited ? Efl.Eo.Globals.efl_super(" + self + ", this.NativeClass) : " + self + ")"; else if (f.is_static) - self = name_helpers::klass_get_full_name(f.klass) + "()"; + self = ""; if(!as_generator (scope_tab << ((do_super && !f.is_static) ? "virtual " : "") << "public " << (f.is_static ? "static " : "") << return_type << " " << string << "(" << (parameter % ", ") << ") {\n " << eolian_mono::function_definition_preamble() << string << "(" - << self - << *(", " << argument_invocation ) << ");\n" + << self << ((!f.is_static && (f.parameters.size() > 0)) ? "," : "") + << (argument_invocation % ", ") << ");\n" << eolian_mono::function_definition_epilogue() << " }\n") .generate(sink, std::make_tuple(name_helpers::managed_method_name(f), f.parameters, f, f.c_name, f.parameters, f), context)) diff --git a/src/examples/ecore/efl_net_ip_address_example.c b/src/examples/ecore/efl_net_ip_address_example.c index 16fc876117..0097c2ac72 100644 --- a/src/examples/ecore/efl_net_ip_address_example.c +++ b/src/examples/ecore/efl_net_ip_address_example.c @@ -123,7 +123,7 @@ main(int argc, char *argv[]) for (i = 1; i < argc; i++) { const char *address = argv[i]; - Eo *o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, address); + Eo *o = efl_net_ip_address_parse( address); if (o) { _print_ip_addr_info(o); @@ -131,7 +131,7 @@ main(int argc, char *argv[]) } else { - Eina_Future *f = efl_net_ip_address_resolve(EFL_NET_IP_ADDRESS_CLASS, address, 0, 0); + Eina_Future *f = efl_net_ip_address_resolve( address, 0, 0); eina_future_then(f, _resolved, address); printf("INFO: %s is not numeric, resolving...\n", address); resolving = eina_list_append(resolving, f); diff --git a/src/examples/ecore/efl_net_socket_ssl_dialer_example.c b/src/examples/ecore/efl_net_socket_ssl_dialer_example.c index 10cec47dda..45dc189d09 100644 --- a/src/examples/ecore/efl_net_socket_ssl_dialer_example.c +++ b/src/examples/ecore/efl_net_socket_ssl_dialer_example.c @@ -464,7 +464,7 @@ efl_main(void *data EINA_UNUSED, efl_net_ssl_context_hostname_set(efl_added, hostname_override), efl_net_ssl_context_setup(efl_added, cipher, EINA_TRUE)); #else - ssl_ctx = efl_net_ssl_context_default_dialer_get(EFL_NET_SSL_CONTEXT_CLASS); + ssl_ctx = efl_net_ssl_context_default_dialer_get(); fprintf(stderr, "INFO: using default context for dialers.\n"); #endif diff --git a/src/lib/ecore/ecore_event_message_handler.c b/src/lib/ecore/ecore_event_message_handler.c index 60ab2c9395..52a63b9677 100644 --- a/src/lib/ecore/ecore_event_message_handler.c +++ b/src/lib/ecore/ecore_event_message_handler.c @@ -87,7 +87,7 @@ _ecore_event_filters_call(Eo *obj, Efl_Loop_Data *pd) Filter *f; Ecore_Event_Message_Handler_Data *eemhd; Eo *ecore_event_handler = efl_loop_message_handler_get - (EFL_LOOP_CLASS, obj, ECORE_EVENT_MESSAGE_HANDLER_CLASS); + (obj, ECORE_EVENT_MESSAGE_HANDLER_CLASS); if (!ecore_event_handler) return; eemhd = efl_data_scope_get(ecore_event_handler, MY_CLASS); diff --git a/src/lib/ecore/ecore_events.c b/src/lib/ecore/ecore_events.c index 258e10e663..59c04f127c 100644 --- a/src/lib/ecore/ecore_events.c +++ b/src/lib/ecore/ecore_events.c @@ -246,8 +246,7 @@ _ecore_event_init(void) if ((!choice) || (!choice[0])) choice = "chained_mempool"; _event_msg_handler = - efl_loop_message_handler_get(EFL_LOOP_CLASS, - _mainloop_singleton, + efl_loop_message_handler_get(_mainloop_singleton, ECORE_EVENT_MESSAGE_HANDLER_CLASS); if (!_event_msg_handler) { diff --git a/src/lib/ecore/efl_app.c b/src/lib/ecore/efl_app.c index 3d090ca4d6..6bfa80088b 100644 --- a/src/lib/ecore/efl_app.c +++ b/src/lib/ecore/efl_app.c @@ -15,7 +15,7 @@ Efl_Version _app_efl_version = { 0, 0, 0, 0, NULL, NULL }; EOLIAN static Efl_App* -_efl_app_app_main_get(const Eo *obj EINA_UNUSED, void *pd EINA_UNUSED) +_efl_app_app_main_get(void) { if (_mainloop_singleton) return _mainloop_singleton; _mainloop_singleton = efl_add_ref(EFL_APP_CLASS, NULL); diff --git a/src/lib/ecore/efl_core_proc_env.c b/src/lib/ecore/efl_core_proc_env.c index 846b69a350..74519461ae 100644 --- a/src/lib/ecore/efl_core_proc_env.c +++ b/src/lib/ecore/efl_core_proc_env.c @@ -131,7 +131,7 @@ _efl_core_proc_env_efl_object_constructor(Eo *obj, Efl_Core_Proc_Env_Data *pd EI } EOLIAN static Efl_Core_Env* -_efl_core_proc_env_self(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED) +_efl_core_proc_env_self(void) { if (!env) { diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index cf8600c998..342a6f7725 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -29,7 +29,7 @@ struct _Efl_Loop_Promise_Simple_Data GENERIC_ALLOC_SIZE_DECLARE(Efl_Loop_Promise_Simple_Data); EOLIAN static Efl_Loop_Message_Handler * -_efl_loop_message_handler_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Loop *loop, const Efl_Class *klass) +_efl_loop_message_handler_get(Efl_Loop *loop, const Efl_Class *klass) { Message_Handler mh = { 0 }, *mh2; Efl_Loop_Data *ld = efl_data_scope_get(loop, EFL_LOOP_CLASS); @@ -54,7 +54,7 @@ Efl_Loop_Data *_mainloop_singleton_data = NULL; EAPI Eo * efl_main_loop_get(void) { - return efl_app_main_get(EFL_APP_CLASS); + return efl_app_main_get(); } EOLIAN static void @@ -309,7 +309,7 @@ _efl_loop_efl_object_constructor(Eo *obj, Efl_Loop_Data *pd) pd->epoll_fd = -1; pd->timer_fd = -1; pd->future_message_handler = efl_loop_message_handler_get - (EFL_LOOP_CLASS, obj, EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS); + (obj, EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS); return obj; } @@ -395,7 +395,7 @@ ecore_loop_arguments_send(int argc, const char **argv) eina_array_push(cml, arg); } - efl_core_command_line_command_array_set(efl_app_main_get(EFL_APP_CLASS), cml); + efl_core_command_line_command_array_set(efl_app_main_get(), cml); efl_future_then(efl_main_loop_get(), efl_loop_job(efl_main_loop_get()), .success = _efl_loop_arguments_send, .free = _efl_loop_arguments_cleanup, diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c index 3c9faea28c..dd8d249304 100644 --- a/src/lib/ecore_con/ecore_con_url.c +++ b/src/lib/ecore_con/ecore_con_url.c @@ -734,7 +734,7 @@ _ecore_con_url_request_prepare(Ecore_Con_Url *url_con, const char *method) if (url_con->time.condition != ECORE_CON_URL_TIME_NONE) { - char *ts = efl_net_dialer_http_date_serialize(EFL_NET_DIALER_HTTP_CLASS, url_con->time.stamp); + char *ts = efl_net_dialer_http_date_serialize(url_con->time.stamp); if (ts) { efl_net_dialer_http_request_header_add(url_con->dialer, diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c index 8bfe967c32..53788514e1 100644 --- a/src/lib/ecore_con/efl_net_dialer_http.c +++ b/src/lib/ecore_con/efl_net_dialer_http.c @@ -2375,14 +2375,14 @@ _efl_net_dialer_http_ssl_certificate_revocation_list_get(const Eo *o EINA_UNUSED } EOLIAN static int64_t -_efl_net_dialer_http_date_parse(Efl_Class *cls EINA_UNUSED, void *cd EINA_UNUSED, const char *str) +_efl_net_dialer_http_date_parse(const char *str) { EINA_SAFETY_ON_NULL_RETURN_VAL(str, 0); return curl_getdate(str, NULL); } EOLIAN static char * -_efl_net_dialer_http_date_serialize(Efl_Class *cls EINA_UNUSED, void *cd EINA_UNUSED, int64_t ts) +_efl_net_dialer_http_date_serialize(int64_t ts) { static const char *const wkday[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; static const char * const month[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; diff --git a/src/lib/ecore_con/efl_net_dialer_ssl.c b/src/lib/ecore_con/efl_net_dialer_ssl.c index 78b587973a..33d314f2f4 100644 --- a/src/lib/ecore_con/efl_net_dialer_ssl.c +++ b/src/lib/ecore_con/efl_net_dialer_ssl.c @@ -84,7 +84,7 @@ _efl_net_dialer_ssl_efl_object_finalize(Eo *o, Efl_Net_Dialer_Ssl_Data *pd) else { if (!pd->ssl_ctx) - pd->ssl_ctx = efl_ref(efl_net_ssl_context_default_dialer_get(EFL_NET_SSL_CONTEXT_CLASS)); + pd->ssl_ctx = efl_ref(efl_net_ssl_context_default_dialer_get()); efl_net_socket_ssl_adopt(o, pd->sock, pd->ssl_ctx); } diff --git a/src/lib/ecore_con/efl_net_dialer_udp.c b/src/lib/ecore_con/efl_net_dialer_udp.c index 953ae7dd2f..b42e9d414e 100644 --- a/src/lib/ecore_con/efl_net_dialer_udp.c +++ b/src/lib/ecore_con/efl_net_dialer_udp.c @@ -180,7 +180,7 @@ _efl_net_dialer_udp_resolved_bind(Eo *o, Efl_Net_Dialer_Udp_Data *pd EINA_UNUSED } } - remote_address = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, addr->ai_addr); + remote_address = efl_net_ip_address_create_sockaddr(addr->ai_addr); if (remote_address) { efl_net_socket_udp_init(o, remote_address); diff --git a/src/lib/ecore_con/efl_net_ip_address.c b/src/lib/ecore_con/efl_net_ip_address.c index 9a79c07b3e..cc29aba680 100644 --- a/src/lib/ecore_con/efl_net_ip_address.c +++ b/src/lib/ecore_con/efl_net_ip_address.c @@ -300,7 +300,7 @@ _efl_net_ip_address_any_check(const Eo *o EINA_UNUSED, Efl_Net_Ip_Address_Data * } EOLIAN static Efl_Net_Ip_Address * -_efl_net_ip_address_create(Eo *cls, void *pd EINA_UNUSED, uint16_t port, const Eina_Slice address) +_efl_net_ip_address_create(uint16_t port, const Eina_Slice address) { int family; @@ -311,26 +311,26 @@ _efl_net_ip_address_create(Eo *cls, void *pd EINA_UNUSED, uint16_t port, const E else family = AF_INET; - return efl_add_ref(cls, efl_main_loop_get(), + return efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, efl_main_loop_get(), efl_net_ip_address_family_set(efl_added, family), efl_net_ip_address_port_set(efl_added, port), efl_net_ip_address_set(efl_added, address)); } EOLIAN static Efl_Net_Ip_Address * -_efl_net_ip_address_create_sockaddr(Eo *cls, void *pd EINA_UNUSED, const void *ptr) +_efl_net_ip_address_create_sockaddr(const void *ptr) { const struct sockaddr *sockaddr = ptr; EINA_SAFETY_ON_NULL_RETURN_VAL(sockaddr, NULL); EINA_SAFETY_ON_TRUE_RETURN_VAL((sockaddr->sa_family != AF_INET) && (sockaddr->sa_family != AF_INET6), NULL); - return efl_add_ref(cls, efl_main_loop_get(), + return efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, efl_main_loop_get(), efl_net_ip_address_sockaddr_set(efl_added, sockaddr)); } EOLIAN static Efl_Net_Ip_Address * -_efl_net_ip_address_parse(Eo *cls, void *pd EINA_UNUSED, const char *numeric_address) +_efl_net_ip_address_parse(const char *numeric_address) { struct sockaddr_storage ss; Eina_Bool r; @@ -368,7 +368,7 @@ _efl_net_ip_address_parse(Eo *cls, void *pd EINA_UNUSED, const char *numeric_add return NULL; } - return efl_add_ref(cls, efl_main_loop_get(), + return efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, efl_main_loop_get(), efl_net_ip_address_sockaddr_set(efl_added, &ss)); } @@ -509,7 +509,7 @@ _efl_net_ip_address_resolve_done(void *data, if (EINA_UNLIKELY(_efl_net_ip_address_find(&r, a->ai_addr) >= 0)) continue; - o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, a->ai_addr); + o = efl_net_ip_address_create_sockaddr(a->ai_addr); if (!o) continue ; eina_value_array_append(&r, o); @@ -536,7 +536,7 @@ _efl_net_ip_address_resolve_done(void *data, } EOLIAN static Eina_Future * -_efl_net_ip_address_resolve(Eo *cls EINA_UNUSED, void *pd EINA_UNUSED, const char *address, int family, int flags) +_efl_net_ip_address_resolve(const char *address, int family, int flags) { Efl_Net_Ip_Address_Resolve_Context *ctx; struct addrinfo hints = { }; diff --git a/src/lib/ecore_con/efl_net_ssl_context.c b/src/lib/ecore_con/efl_net_ssl_context.c index 271cd8afc2..a625fe81ee 100644 --- a/src/lib/ecore_con/efl_net_ssl_context.c +++ b/src/lib/ecore_con/efl_net_ssl_context.c @@ -357,11 +357,11 @@ _efl_net_ssl_context_default_dialer_del(void *data EINA_UNUSED, const Efl_Event } EOLIAN static Efl_Net_Ssl_Context * -_efl_net_ssl_context_default_dialer_get(const Efl_Class *klass, void *pd EINA_UNUSED) +_efl_net_ssl_context_default_dialer_get(void) { if (!_efl_net_ssl_context_default_dialer) { - _efl_net_ssl_context_default_dialer = efl_add(klass, efl_main_loop_get(), + _efl_net_ssl_context_default_dialer = efl_add(EFL_NET_SSL_CONTEXT_CLASS, efl_main_loop_get(), efl_net_ssl_context_verify_mode_set(efl_added, EFL_NET_SSL_VERIFY_MODE_REQUIRED), efl_net_ssl_context_hostname_verify_set(efl_added, EINA_TRUE), efl_net_ssl_context_default_paths_load_set(efl_added, EINA_TRUE), diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index f5e80ce151..ba7da81abc 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -1979,7 +1979,6 @@ _edje_object_part_text_raw_generic_set(Edje *ed, Evas_Object *obj, Edje_Real_Par { char *mkup; mkup = efl_text_markup_util_text_to_markup( - EFL_TEXT_MARKUP_UTIL_CLASS, text); rp->typedata.text->text = eina_stringshare_add(mkup); free(mkup); diff --git a/src/lib/efl/interfaces/efl_text_markup_util.c b/src/lib/efl/interfaces/efl_text_markup_util.c index bf296c11fb..239915b4ac 100644 --- a/src/lib/efl/interfaces/efl_text_markup_util.c +++ b/src/lib/efl/interfaces/efl_text_markup_util.c @@ -68,8 +68,7 @@ _markup_get_text_utf8_append(Eina_Strbuf *sbuf, const char *text) } EOLIAN static char* -_efl_text_markup_util_text_to_markup(Eo *class EINA_UNUSED, - void *_pd EINA_UNUSED, const char *text) +_efl_text_markup_util_text_to_markup(const char *text) { Eina_Strbuf *sbuf; char *str = NULL; @@ -491,8 +490,7 @@ _text_util_markup_to_text(const char *text) } static EOLIAN char* -_efl_text_markup_util_markup_to_text(Eo *class EINA_UNUSED, - void *_pd EINA_UNUSED, const char *text) +_efl_text_markup_util_markup_to_text(const char *text) { return _text_util_markup_to_text(text); } diff --git a/src/lib/elementary/efl_access_object.c b/src/lib/elementary/efl_access_object.c index 3c56eae6a5..84ae798cc0 100644 --- a/src/lib/elementary/efl_access_object.c +++ b/src/lib/elementary/efl_access_object.c @@ -401,7 +401,7 @@ EAPI void efl_access_attributes_list_free(Eina_List *list) } EOLIAN void -_efl_access_object_event_emit(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Eo *accessible, const Efl_Event_Description *event, void *event_info) +_efl_access_object_event_emit(Eo *accessible, const Efl_Event_Description *event, void *event_info) { Eina_List *l; Efl_Access_Event_Handler *hdl; @@ -437,7 +437,7 @@ _efl_access_object_event_emit(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Eo *a } EOLIAN Efl_Access_Event_Handler * -_efl_access_object_event_handler_add(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Efl_Event_Cb cb, void *data) +_efl_access_object_event_handler_add(Efl_Event_Cb cb, void *data) { Efl_Access_Event_Handler *ret = calloc(1, sizeof(Efl_Access_Event_Handler)); if (!ret) return NULL; @@ -451,7 +451,7 @@ _efl_access_object_event_handler_add(Eo *class EINA_UNUSED, void *pd EINA_UNUSED } EOLIAN void -_efl_access_object_event_handler_del(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Efl_Access_Event_Handler *handler) +_efl_access_object_event_handler_del(Efl_Access_Event_Handler *handler) { Eina_List *l, *l2; Efl_Access_Event_Handler *hdl; @@ -596,7 +596,7 @@ _efl_access_object_relationships_clear(Eo *obj EINA_UNUSED, Efl_Access_Object_Da } EOLIAN Eo* -_efl_access_object_access_root_get(const Eo *class EINA_UNUSED, void *pd EINA_UNUSED) +_efl_access_object_access_root_get(void) { if (!root) root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, efl_main_loop_get()); diff --git a/src/lib/elementary/efl_access_object.h b/src/lib/elementary/efl_access_object.h index 22dc4bf9ad..b42db31f7f 100644 --- a/src/lib/elementary/efl_access_object.h +++ b/src/lib/elementary/efl_access_object.h @@ -46,7 +46,7 @@ efl_access_attribute_free(Efl_Access_Attribute *attr); Efl_Access_Event_State_Changed_Data evinfo; \ evinfo.type = (tp); \ evinfo.new_value = (nvl); \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_STATE_CHANGED, (void*)&evinfo); \ + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_STATE_CHANGED, (void*)&evinfo); \ } while(0); } /** @@ -55,38 +55,38 @@ efl_access_attribute_free(Efl_Access_Attribute *attr); #define efl_access_bounds_changed_signal_emit(obj, x, y, width, height) \ do { \ Efl_Access_Event_Geometry_Changed_Data evinfo = { x, y, width, height }; \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_BOUNDS_CHANGED, (void*)&evinfo); \ + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_BOUNDS_CHANGED, (void*)&evinfo); \ } while(0); /** * Emits Accessible 'PropertyChanged' signal for 'Name' property. */ #define efl_access_i18n_name_changed_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "i18n_name"); + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "i18n_name"); /** * Emits Accessible 'PropertyChanged' signal for 'Description' property. */ #define efl_access_description_changed_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "description"); + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "description"); /** * Emits Accessible 'PropertyChanged' signal for 'Parent' property. */ #define efl_access_parent_changed_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "parent"); + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "parent"); /** * Emits Accessible 'PropertyChanged' signal for 'Role' property. */ #define efl_access_role_changed_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "role"); + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "role"); /** * Emits Accessible 'PropertyChanged' signal for 'Value' property. */ #define efl_access_value_changed_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "value"); + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_PROPERTY_CHANGED, "value"); /** * Emits Accessible 'ChildrenChanged' signal with added child as argument. @@ -94,7 +94,7 @@ efl_access_attribute_free(Efl_Access_Attribute *attr); #define efl_access_children_changed_added_signal_emit(obj, child) \ do { \ Efl_Access_Event_Children_Changed_Data atspi_data = { EINA_TRUE, child }; \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_CHILDREN_CHANGED, &atspi_data); \ + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_CHILDREN_CHANGED, &atspi_data); \ } while(0); /** @@ -103,32 +103,32 @@ efl_access_attribute_free(Efl_Access_Attribute *attr); #define efl_access_children_changed_del_signal_emit(obj, child) \ do { \ Efl_Access_Event_Children_Changed_Data atspi_data = { EINA_FALSE, child }; \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_CHILDREN_CHANGED, &atspi_data); \ + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_CHILDREN_CHANGED, &atspi_data); \ } while(0); /** * Emits Accessible 'ActiveDescendantChanged' signal. */ #define efl_access_active_descendant_changed_signal_emit(obj, child) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_ACTIVE_DESCENDANT_CHANGED, child); + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_ACTIVE_DESCENDANT_CHANGED, child); /** * Emits Accessible 'VisibleDataChanged' signal. */ #define efl_access_visible_data_changed_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_VISIBLE_DATA_CHANGED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_VISIBLE_DATA_CHANGED, NULL); /** * Emits Accessible 'AddAccessible' signal. */ #define efl_access_added(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_ADDED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_ADDED, NULL); /** * Emits Accessible 'RemoveAccessible' signal. */ #define efl_access_removed(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_OBJECT_EVENT_REMOVED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_REMOVED, NULL); #endif diff --git a/src/lib/elementary/efl_access_window.h b/src/lib/elementary/efl_access_window.h index 38938d21ca..c4b3d3c398 100644 --- a/src/lib/elementary/efl_access_window.h +++ b/src/lib/elementary/efl_access_window.h @@ -14,43 +14,43 @@ * Emits 'Window:Activated' accessible signal. */ #define efl_access_window_activated_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_ACTIVATED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_ACTIVATED, NULL); /** * Emits 'Window:Deactivated' accessible signal. */ #define efl_access_window_deactivated_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_DEACTIVATED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_DEACTIVATED, NULL); /** * Emits 'Window:Created' accessible signal. */ #define efl_access_window_created_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_CREATED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_CREATED, NULL); /** * Emits 'Window:Destroyed' accessible signal. */ #define efl_access_window_destroyed_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_DESTROYED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_DESTROYED, NULL); /** * Emits 'Window:Maximized' accessible signal. */ #define efl_access_window_maximized_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_MAXIMIZED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_MAXIMIZED, NULL); /** * Emits 'Window:Minimized' accessible signal. */ #define efl_access_window_minimized_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_MINIMIZED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_MINIMIZED, NULL); /** * Emits 'Window:Restored' accessible signal. */ #define efl_access_window_restored_signal_emit(obj) \ - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_RESTORED, NULL); + efl_access_object_event_emit(obj, EFL_ACCESS_WINDOW_EVENT_WINDOW_RESTORED, NULL); #endif #endif diff --git a/src/lib/elementary/efl_ui_dnd.c b/src/lib/elementary/efl_ui_dnd.c index db13fbf242..4ed23e7d76 100644 --- a/src/lib/elementary/efl_ui_dnd.c +++ b/src/lib/elementary/efl_ui_dnd.c @@ -28,7 +28,7 @@ Eo* _efl_ui_selection_manager_get(Eo *obj) { if (!efl_isa(obj, EFL_UI_WIDGET_CLASS)) return NULL; - Eo *app = efl_app_main_get(EFL_APP_CLASS); + Eo *app = efl_app_main_get(); Eo *sel_man = efl_key_data_get(app, "__selection_manager"); if (!sel_man) { @@ -41,7 +41,7 @@ _efl_ui_selection_manager_get(Eo *obj) void _efl_ui_dnd_shutdown(void) { - Eo *app = efl_app_main_get(EFL_APP_CLASS); + Eo *app = efl_app_main_get(); Eo *sel_man = efl_key_data_get(app, "__selection_manager"); efl_del(sel_man); diff --git a/src/lib/elementary/efl_ui_focus_layer.c b/src/lib/elementary/efl_ui_focus_layer.c index 1069956881..9cab1327b8 100644 --- a/src/lib/elementary/efl_ui_focus_layer.c +++ b/src/lib/elementary/efl_ui_focus_layer.c @@ -112,7 +112,7 @@ _efl_ui_focus_layer_enable_set(Eo *obj, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool v pd->registered_manager = elm_widget_top_get(obj); EINA_SAFETY_ON_FALSE_RETURN(efl_isa(pd->registered_manager, EFL_UI_WIN_CLASS)); - manager = efl_ui_focus_util_active_manager(EFL_UI_FOCUS_UTIL_CLASS, pd->registered_manager); + manager = efl_ui_focus_util_active_manager(pd->registered_manager); efl_ui_focus_manager_calc_register_logical(pd->registered_manager, obj, efl_ui_focus_manager_root_get(pd->registered_manager), obj); _publish_state_change(obj, NULL, NULL); diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c index b2b8356cf4..308cdd861e 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.c +++ b/src/lib/elementary/efl_ui_focus_manager_calc.c @@ -157,7 +157,7 @@ border_onedirection_set(Node *node, Efl_Ui_Focus_Direction direction, Eina_List EINA_LIST_FREE(border->one_direction, partner) { - Border *b = &DIRECTION_ACCESS(partner, efl_ui_focus_util_direction_complement(EFL_UI_FOCUS_UTIL_CLASS,direction)); + Border *b = &DIRECTION_ACCESS(partner, efl_ui_focus_util_direction_complement(direction)); b->cleanup_nodes = eina_list_remove(b->cleanup_nodes, node); } @@ -165,7 +165,7 @@ border_onedirection_set(Node *node, Efl_Ui_Focus_Direction direction, Eina_List EINA_LIST_FOREACH(border->one_direction, lnode, partner) { - Border *comp_border = &DIRECTION_ACCESS(partner,efl_ui_focus_util_direction_complement(EFL_UI_FOCUS_UTIL_CLASS,direction)); + Border *comp_border = &DIRECTION_ACCESS(partner,efl_ui_focus_util_direction_complement(direction)); comp_border->cleanup_nodes = eina_list_append(comp_border->cleanup_nodes, node); } @@ -183,7 +183,7 @@ border_onedirection_cleanup(Node *node, Efl_Ui_Focus_Direction direction) EINA_LIST_FREE(border->cleanup_nodes, partner) { - Border *b = &DIRECTION_ACCESS(partner, efl_ui_focus_util_direction_complement(EFL_UI_FOCUS_UTIL_CLASS,direction)); + Border *b = &DIRECTION_ACCESS(partner, efl_ui_focus_util_direction_complement(direction)); b->one_direction = eina_list_remove(b->one_direction, node); } } diff --git a/src/lib/elementary/efl_ui_focus_util.c b/src/lib/elementary/efl_ui_focus_util.c index f422266101..3021c683eb 100644 --- a/src/lib/elementary/efl_ui_focus_util.c +++ b/src/lib/elementary/efl_ui_focus_util.c @@ -12,7 +12,7 @@ typedef struct { static void _manager_changed(void *data, const Efl_Event *event EINA_UNUSED) { - efl_ui_focus_util_focus(EFL_UI_FOCUS_UTIL_CLASS, data); + efl_ui_focus_util_focus(data); } static Eina_Bool @@ -25,7 +25,7 @@ _can_take_focus(Efl_Ui_Focus_Manager *m, Efl_Ui_Focus_Object *user) } EOLIAN static void -_efl_ui_focus_util_focus(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Ui_Focus_Object *user) +_efl_ui_focus_util_focus(Efl_Ui_Focus_Object *user) { Efl_Ui_Focus_Object *entry; Efl_Ui_Widget *top, *o; @@ -64,7 +64,7 @@ _efl_ui_focus_util_focus(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Ui_Focus } EOLIAN static Efl_Ui_Focus_Manager* -_efl_ui_focus_util_active_manager(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Ui_Focus_Manager *manager) +_efl_ui_focus_util_active_manager(Efl_Ui_Focus_Manager *manager) { while (efl_ui_focus_manager_redirect_get(manager)) manager = efl_ui_focus_manager_redirect_get(manager); @@ -73,7 +73,7 @@ _efl_ui_focus_util_active_manager(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl } EOLIAN static Efl_Ui_Focus_Direction -_efl_ui_focus_util_direction_complement(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Ui_Focus_Direction dir) +_efl_ui_focus_util_direction_complement(Efl_Ui_Focus_Direction dir) { #define COMP(a,b) \ if (dir == a) return b; \ diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 065bc3577f..67a2a01bba 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -3422,7 +3422,7 @@ elm_widget_focus_mouse_up_handle(Eo *obj) if (pd->focus.manager && !pd->focus.logical) { - efl_ui_focus_util_focus(EFL_UI_FOCUS_UTIL_CLASS, obj); + efl_ui_focus_util_focus(obj); } } diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 2e9e463205..74d741f4e2 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -2372,7 +2372,7 @@ _efl_ui_win_show(Eo *obj, Efl_Ui_Win_Data *sd) { Eo *root; efl_access_window_created_signal_emit(obj); - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); if (root) efl_access_children_changed_added_signal_emit(root, obj); } @@ -2441,7 +2441,7 @@ _efl_ui_win_hide(Eo *obj, Efl_Ui_Win_Data *sd) if (_elm_config->atspi_mode) { Eo *root; - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); efl_access_window_destroyed_signal_emit(obj); if (root) efl_access_children_changed_del_signal_emit(root, obj); @@ -2996,7 +2996,7 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd) } if (!_elm_win_list) { - efl_event_callback_call(efl_app_main_get(EFL_APP_CLASS), EFL_APP_EVENT_STANDBY, NULL); + efl_event_callback_call(efl_app_main_get(), EFL_APP_EVENT_STANDBY, NULL); if (eina_value_type_get(&exit_on_all_windows_closed)) efl_loop_quit(efl_loop_get(obj), exit_on_all_windows_closed); } @@ -6266,13 +6266,13 @@ _dbus_menu_set(Eina_Bool dbus_connect, void *data) } EOLIAN static const Eina_Value * -_efl_ui_win_exit_on_all_windows_closed_get(const Eo *obj EINA_UNUSED, void *pd EINA_UNUSED) +_efl_ui_win_exit_on_all_windows_closed_get(void) { return &exit_on_all_windows_closed; } EOLIAN static void -_efl_ui_win_exit_on_all_windows_closed_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const Eina_Value *exit_code) +_efl_ui_win_exit_on_all_windows_closed_set(const Eina_Value *exit_code) { const Eina_Value_Type *type = eina_value_type_get(exit_code); @@ -7385,7 +7385,7 @@ _efl_ui_win_efl_object_provider_find(const Eo *obj, return (Eo *)obj; // attach all kinds of windows directly to ATSPI application root object - if (klass == EFL_ACCESS_OBJECT_MIXIN) return efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + if (klass == EFL_ACCESS_OBJECT_MIXIN) return efl_access_object_access_root_get(); if (klass == EFL_UI_FOCUS_PARENT_PROVIDER_INTERFACE) return pd->provider; diff --git a/src/lib/elementary/elm_access.c b/src/lib/elementary/elm_access.c index f5dcb242dd..588a0c6762 100644 --- a/src/lib/elementary/elm_access.c +++ b/src/lib/elementary/elm_access.c @@ -701,7 +701,7 @@ _elm_access_highlight_cycle(Evas_Object *obj, Elm_Focus_Direction dir) } else { - efl_ui_focus_util_focus(EFL_UI_FOCUS_UTIL_CLASS, obj); + efl_ui_focus_util_focus(obj); efl_ui_focus_manager_move(elm_widget_top_get(obj), dir); } } diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index e75f935a71..91ad3dfc93 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -588,7 +588,7 @@ _accessible_get_application(const Eldbus_Service_Interface *iface, const Eldbus_ EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL); Eldbus_Message_Iter *iter = eldbus_message_iter_get(ret); - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); _bridge_iter_object_reference_append(bridge, iter, root); return ret; @@ -2026,7 +2026,7 @@ _bridge_object_from_path(Eo *bridge, const char *path) tmp = path + len; /* Skip over the prefix */ if (!strcmp(ELM_ACCESS_OBJECT_PATH_ROOT, tmp)) { - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); return root; } @@ -2053,7 +2053,7 @@ _path_from_object(const Eo *eo) if (!eo) return ATSPI_DBUS_PATH_NULL; - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); if (eo == root) snprintf(path, sizeof(path), "%s%s", ELM_ACCESS_OBJECT_PATH_PREFIX, ELM_ACCESS_OBJECT_PATH_ROOT); @@ -3201,7 +3201,7 @@ _cache_item_reference_append_cb(Eo *bridge, Eo *data, Eldbus_Message_Iter *iter_ Efl_Access_State_Set states; Efl_Access_Role role; Eo *root; - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); role = efl_access_object_role_get(data); @@ -3298,7 +3298,7 @@ _cache_get_items(const Eldbus_Service_Interface *iface, const Eldbus_Message *ms iter_array = eldbus_message_iter_container_new(iter, 'a', CACHE_ITEM_SIGNATURE); EINA_SAFETY_ON_NULL_GOTO(iter_array, fail); - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); to_process = eina_list_append(NULL, root); while (to_process) @@ -3703,7 +3703,7 @@ _elm_atspi_bridge_app_register(Eo *bridge) "Embed"); Eldbus_Message_Iter *iter = eldbus_message_iter_get(message); - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); _bridge_iter_object_reference_append(bridge, iter, root); eldbus_connection_send(pd->a11y_bus, message, _on_elm_atspi_bridge_app_register, NULL, -1); @@ -3716,7 +3716,7 @@ _elm_atspi_bridge_app_unregister(Eo *bridge) Eo *root; ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN_VAL(bridge, pd, EINA_FALSE); - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); Eldbus_Message *message = eldbus_message_method_call_new(ATSPI_DBUS_NAME_REGISTRY, ATSPI_DBUS_PATH_ROOT, @@ -4116,7 +4116,7 @@ static void _bridge_signal_send(Eo *bridge, Eo *obj, const char *infc, const Eld ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd); path = _path_from_object(obj); - root = efl_access_object_access_root_get(EFL_ACCESS_OBJECT_MIXIN); + root = efl_access_object_access_root_get(); msg = eldbus_message_signal_new(path, infc, signal->name); if (!msg) return; @@ -4366,7 +4366,7 @@ _a11y_connection_shutdown(Eo *bridge) if (pd->event_hash) eina_hash_free(pd->event_hash); pd->event_hash = NULL; - efl_access_object_event_handler_del(EFL_ACCESS_OBJECT_MIXIN, pd->event_hdlr); + efl_access_object_event_handler_del(pd->event_hdlr); pd->event_hdlr = NULL; efl_event_callback_legacy_call(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, NULL); @@ -4458,7 +4458,7 @@ _a11y_bus_initialize(Eo *obj, const char *socket_addr) _elm_atspi_bridge_app_register(obj); // register accessible object event listener - pd->event_hdlr = efl_access_object_event_handler_add(EFL_ACCESS_OBJECT_MIXIN, _bridge_accessible_event_dispatch, obj); + pd->event_hdlr = efl_access_object_event_handler_add(_bridge_accessible_event_dispatch, obj); } static void diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index c811e16cb4..336b0f7ae8 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -2231,14 +2231,14 @@ _entry_changed_user_signal_cb(void *data, atspi_info.content = edje_info->change.insert.content; atspi_info.pos = edje_info->change.insert.pos; atspi_info.len = edje_info->change.insert.plain_length; - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info); + efl_access_object_event_emit( data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info); } else if (edje_info && !edje_info->insert) { atspi_info.content = edje_info->change.del.content; atspi_info.pos = MIN(edje_info->change.del.start, edje_info->change.del.end); atspi_info.len = MAX(edje_info->change.del.start, edje_info->change.del.end) - atspi_info.pos; - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info); + efl_access_object_event_emit( data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info); } } } @@ -2263,7 +2263,7 @@ _entry_preedit_changed_signal_cb(void *data, atspi_info.content = text; atspi_info.pos = edje_info->change.insert.pos; atspi_info.len = edje_info->change.insert.plain_length; - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, + efl_access_object_event_emit( data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info); @@ -2355,7 +2355,7 @@ _entry_selection_changed_signal_cb(void *data, _selection_store(ELM_SEL_TYPE_PRIMARY, data); _update_selection_handler(data); if (_elm_config->atspi_mode) - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, NULL); + efl_access_object_event_emit( data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, NULL); } static void @@ -2466,7 +2466,7 @@ _entry_cursor_changed_signal_cb(void *data, efl_event_callback_legacy_call(data, ELM_ENTRY_EVENT_CURSOR_CHANGED, NULL); if (_elm_config->atspi_mode) - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL); + efl_access_object_event_emit( data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL); } static void @@ -2478,7 +2478,7 @@ _entry_cursor_changed_manual_signal_cb(void *data, efl_event_callback_legacy_call (data, ELM_ENTRY_EVENT_CURSOR_CHANGED_MANUAL, NULL); if (_elm_config->atspi_mode) - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL); + efl_access_object_event_emit( data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL); } static void diff --git a/src/lib/elementary/elm_focus_legacy.c b/src/lib/elementary/elm_focus_legacy.c index 31e1c32db1..5c9651fb15 100644 --- a/src/lib/elementary/elm_focus_legacy.c +++ b/src/lib/elementary/elm_focus_legacy.c @@ -110,7 +110,7 @@ elm_object_focus_next_object_set(Evas_Object *obj, #define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction) pd->legacy_focus.field = next; MAPPING() #undef MAP - dir = efl_ui_focus_util_direction_complement(EFL_UI_FOCUS_UTIL_CLASS, dir); + dir = efl_ui_focus_util_direction_complement(dir); #define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction) next_pd->legacy_focus.field = obj; MAPPING() #undef MAP @@ -218,7 +218,7 @@ elm_object_focus_next(Evas_Object *obj, top = elm_object_top_widget_get(obj); EINA_SAFETY_ON_FALSE_RETURN(efl_isa(top, EFL_UI_WIN_CLASS)); - manager_top = efl_ui_focus_util_active_manager(EFL_UI_FOCUS_UTIL_CLASS, obj); + manager_top = efl_ui_focus_util_active_manager(obj); logical = efl_ui_focus_manager_focus_get(manager_top); if (elm_widget_is(logical)) @@ -255,7 +255,7 @@ elm_object_focus_next(Evas_Object *obj, if (legacy_target) { - efl_ui_focus_util_focus(EFL_UI_FOCUS_UTIL_CLASS, legacy_target); + efl_ui_focus_util_focus(legacy_target); if (elm_object_focused_object_get(top) == legacy_target) { legacy_focus_move = EINA_TRUE; @@ -289,7 +289,7 @@ elm_object_focus_next_object_get(const Evas_Object *obj, MAPPING() #undef MAP - return efl_ui_focus_manager_request_move(efl_ui_focus_util_active_manager(EFL_UI_FOCUS_UTIL_CLASS, top), dir, NULL, EINA_FALSE); + return efl_ui_focus_manager_request_move(efl_ui_focus_util_active_manager(top), dir, NULL, EINA_FALSE); } EAPI Elm_Object_Item * @@ -364,7 +364,7 @@ elm_object_focus_set(Evas_Object *obj, else if (elm_widget_is(obj)) { if (focus) - efl_ui_focus_util_focus(EFL_UI_FOCUS_UTIL_CLASS, obj); + efl_ui_focus_util_focus(obj); else { if (efl_ui_focus_manager_focus_get(efl_ui_focus_object_focus_manager_get(obj)) == obj) diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c index 53cc85f2c9..19225b7287 100644 --- a/src/lib/elementary/elm_menu.c +++ b/src/lib/elementary/elm_menu.c @@ -498,7 +498,7 @@ _menu_item_activate_cb(void *data, if (eo_item2 != EO_OBJ(item)) elm_menu_item_selected_set(eo_item2, 0); } - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, EO_OBJ(item->parent), EFL_ACCESS_SELECTION_EVENT_SELECTION_CHANGED, NULL); + efl_access_object_event_emit(EO_OBJ(item->parent), EFL_ACCESS_SELECTION_EVENT_SELECTION_CHANGED, NULL); } else { @@ -513,7 +513,7 @@ _menu_item_activate_cb(void *data, elm_menu_item_selected_set(eo_item2, 0); } } - efl_access_object_event_emit(EFL_ACCESS_OBJECT_MIXIN, WIDGET(item), EFL_ACCESS_SELECTION_EVENT_SELECTION_CHANGED, NULL); + efl_access_object_event_emit(WIDGET(item), EFL_ACCESS_SELECTION_EVENT_SELECTION_CHANGED, NULL); if (sd->menu_bar && was_open) _menu_item_select_cb(item, NULL, NULL, NULL); } diff --git a/src/lib/elementary/elm_sys_notify.c b/src/lib/elementary/elm_sys_notify.c index a993a8cc3a..a4789cd12c 100644 --- a/src/lib/elementary/elm_sys_notify.c +++ b/src/lib/elementary/elm_sys_notify.c @@ -199,8 +199,7 @@ _elm_sys_notify_servers_get(const Eo *obj EINA_UNUSED, } EOLIAN static Elm_Sys_Notify * -_elm_sys_notify_singleton_get(Eo *obj EINA_UNUSED, - void *sd EINA_UNUSED) +_elm_sys_notify_singleton_get(void) { if (!_singleton) _singleton = efl_add(MY_CLASS, efl_main_loop_get()); @@ -224,7 +223,7 @@ _elm_sys_notify_class_constructor(Efl_Class *klass EINA_UNUSED) void _elm_unneed_sys_notify(void) { - Elm_Sys_Notify *manager = elm_sys_notify_singleton_get(); + Elm_Sys_Notify *manager = elm_obj_sys_notify_singleton_get(); if (manager) { elm_obj_sys_notify_servers_set(manager, ELM_SYS_NOTIFY_SERVER_NONE); @@ -242,7 +241,7 @@ elm_need_sys_notify(void) /* In theory, there can be N notification managers, but * in the implementation there will be only one: the * singleton which is initialized here. */ - manager = elm_sys_notify_singleton_get(); + manager = elm_obj_sys_notify_singleton_get(); if (EINA_UNLIKELY(!manager)) { CRI("Failed to get notification manager"); diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c index 6025a95930..13ebf233ca 100644 --- a/src/lib/elementary/elm_theme.c +++ b/src/lib/elementary/elm_theme.c @@ -1122,7 +1122,7 @@ _efl_ui_theme_efl_object_destructor(Eo *obj, Efl_Ui_Theme_Data *pd) } EOLIAN static Efl_Ui_Theme * -_efl_ui_theme_default_get(const Eo *obj EINA_UNUSED, void *pd EINA_UNUSED) +_efl_ui_theme_default_get(void) { if (theme_default) return theme_default->eo_theme; diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index 63074cce17..9e33e6e3a0 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -1850,13 +1850,13 @@ _efl_object_event_freeze_count_get(const Eo *obj EINA_UNUSED, Efl_Object_Data *p } EOLIAN static void -_efl_object_event_global_freeze(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED) +_efl_object_event_global_freeze(void) { event_freeze_count++; } EOLIAN static void -_efl_object_event_global_thaw(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED) +_efl_object_event_global_thaw(void) { if (event_freeze_count > 0) { @@ -1869,7 +1869,7 @@ _efl_object_event_global_thaw(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED) } EOLIAN static int -_efl_object_event_global_freeze_count_get(const Eo *klass EINA_UNUSED, void *pd EINA_UNUSED) +_efl_object_event_global_freeze_count_get(void) { return event_freeze_count; } diff --git a/src/lib/eolian_cxx/grammar/function_definition.hpp b/src/lib/eolian_cxx/grammar/function_definition.hpp index b3080e4c67..893218155c 100644 --- a/src/lib/eolian_cxx/grammar/function_definition.hpp +++ b/src/lib/eolian_cxx/grammar/function_definition.hpp @@ -121,24 +121,27 @@ struct function_definition_generator << " __return_value = " ).generate(sink, attributes::unused, ctx)) return false; - std::string object_flag; - if (f.is_static) object_flag = "_eo_class()"; - else object_flag = "_eo_ptr()"; + std::tuple > params; + if (f.is_static) + params = std::make_tuple(f.c_name, "", f.parameters); + else + params = std::make_tuple(f.c_name, "_eo_ptr()", f.parameters); if(!as_generator - (" ::" << string << "(" << string << - *( - "\n" << scope_tab << scope_tab << ", " + (" ::" << string << "(" << string << ((!f.is_static && (f.parameters.size() > 0)) ? "," : "") + << + ( + ("\n" << scope_tab << scope_tab << ( attribute_conditional([] (attributes::parameter_def const& p) { return p.direction == attributes::parameter_direction::in; }) [converting_argument] | ("& __out_param_" << attribute_reorder<2>(string)) - ) + )) % "," ) << ");\n" - ).generate(sink, std::make_tuple(f.c_name, object_flag, f.parameters), ctx)) + ).generate(sink, params, ctx)) return false; auto out_assignments = diff --git a/src/lib/evas/canvas/efl_input_event.c b/src/lib/evas/canvas/efl_input_event.c index 8b02713ad7..a617e504eb 100644 --- a/src/lib/evas/canvas/efl_input_event.c +++ b/src/lib/evas/canvas/efl_input_event.c @@ -136,14 +136,10 @@ efl_input_event_instance_clean(Eo *klass) /* Internal EO APIs */ EOAPI EFL_FUNC_BODY_CONST(efl_input_legacy_info_get, void *, NULL) -EOAPI EFL_FUNC_BODYV_CONST(efl_input_instance_get, Efl_Input_Event *, NULL, EFL_FUNC_CALL(owner, priv), Efl_Object *owner, void **priv) #define EFL_INPUT_EVENT_EXTRA_OPS \ EFL_OBJECT_OP_FUNC(efl_input_legacy_info_get, NULL) -#define EFL_INPUT_EVENT_EXTRA_CLASS_OPS \ - EFL_OBJECT_OP_FUNC(efl_input_instance_get, NULL) - #include "efl_input_event.eo.c" #include "efl_input_state.eo.c" #include "efl_input_interface.eo.c" diff --git a/src/tests/ecore/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c index 2cab632622..957cb3099e 100644 --- a/src/tests/ecore/efl_app_suite.c +++ b/src/tests/ecore/efl_app_suite.c @@ -16,7 +16,7 @@ EFL_START_TEST(efl_app_test_efl_build_version) ecore_init(); - app = efl_app_main_get(EFL_APP_CLASS); + app = efl_app_main_get(); fail_if(!efl_isa(app, EFL_APP_CLASS)); efl_build_version_set(EFL_VERSION_MAJOR, EFL_VERSION_MINOR, 0, 0, NULL, EFL_BUILD_ID); diff --git a/src/tests/ecore/efl_app_test_env.c b/src/tests/ecore/efl_app_test_env.c index 63bad166a2..e7e5a2e034 100644 --- a/src/tests/ecore/efl_app_test_env.c +++ b/src/tests/ecore/efl_app_test_env.c @@ -96,7 +96,7 @@ EFL_END_TEST EFL_START_TEST(efl_core_env_test_process) { - Efl_Core_Env *env_fork, *env = efl_env_self(EFL_CORE_PROC_ENV_CLASS); + Efl_Core_Env *env_fork, *env = efl_env_self(); ck_assert(env); @@ -110,7 +110,7 @@ EFL_END_TEST EFL_START_TEST(efl_core_env_test_undepend_fork) { - Efl_Core_Env *env_fork, *env = efl_env_self(EFL_CORE_PROC_ENV_CLASS); + Efl_Core_Env *env_fork, *env = efl_env_self(); ck_assert(env); diff --git a/src/tests/ecore/efl_app_test_loop.c b/src/tests/ecore/efl_app_test_loop.c index b37ba414ab..0ab7bb6bdb 100644 --- a/src/tests/ecore/efl_app_test_loop.c +++ b/src/tests/ecore/efl_app_test_loop.c @@ -15,24 +15,24 @@ EFL_START_TEST(efl_app_test_efl_loop_register) ecore_init(); - t = efl_provider_find(efl_app_main_get(EFL_APP_CLASS), EFL_LOOP_CLASS); + t = efl_provider_find(efl_app_main_get(), EFL_LOOP_CLASS); fail_if(!efl_isa(t, EFL_LOOP_CLASS)); fail_if(!efl_isa(t, EFL_APP_CLASS)); - t = efl_provider_find(efl_app_main_get(EFL_APP_CLASS), EFL_LOOP_TIMER_CLASS); + t = efl_provider_find(efl_app_main_get(), EFL_LOOP_TIMER_CLASS); fail_if(t != NULL); - n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_get(EFL_APP_CLASS), + n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_get(), efl_loop_timer_interval_set(efl_added, 1.0)); - efl_loop_register(efl_app_main_get(EFL_APP_CLASS), EFL_LOOP_TIMER_CLASS, n); + efl_loop_register(efl_app_main_get(), EFL_LOOP_TIMER_CLASS, n); - t = efl_provider_find(efl_app_main_get(EFL_APP_CLASS), EFL_LOOP_TIMER_CLASS); + t = efl_provider_find(efl_app_main_get(), EFL_LOOP_TIMER_CLASS); fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS)); fail_if(t != n); - efl_loop_unregister(efl_app_main_get(EFL_APP_CLASS), EFL_LOOP_TIMER_CLASS, n); + efl_loop_unregister(efl_app_main_get(), EFL_LOOP_TIMER_CLASS, n); - t = efl_provider_find(efl_app_main_get(EFL_APP_CLASS), EFL_LOOP_TIMER_CLASS); + t = efl_provider_find(efl_app_main_get(), EFL_LOOP_TIMER_CLASS); fail_if(t != NULL); ecore_shutdown(); diff --git a/src/tests/ecore/efl_app_test_loop_timer.c b/src/tests/ecore/efl_app_test_loop_timer.c index 999c5f1743..38d16a9728 100644 --- a/src/tests/ecore/efl_app_test_loop_timer.c +++ b/src/tests/ecore/efl_app_test_loop_timer.c @@ -66,7 +66,7 @@ EFL_END_TEST EFL_START_TEST(efl_app_test_loop_timer_invalid) { - Efl_Object *t = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_get(EFL_APP_CLASS)); + Efl_Object *t = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_get()); fail_if(t != NULL); } EFL_END_TEST diff --git a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c index 1a150ffd5c..cf83eaf402 100644 --- a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c +++ b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c @@ -236,7 +236,7 @@ _resolve_done(void *data, const Eina_Value v, const Eina_Future *dead_future EIN static void _resolve(struct resolve_ctx *ctx, const char *address, int family, int flags) { - ctx->future = efl_net_ip_address_resolve(EFL_NET_IP_ADDRESS_CLASS, + ctx->future = efl_net_ip_address_resolve( address, family, flags); ck_assert_ptr_ne(ctx->future, NULL); ctx->future = eina_future_then(ctx->future, _resolve_done, ctx, NULL); @@ -402,7 +402,7 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok) addr.sin_port = eina_htons(12345); addr.sin_addr.s_addr = eina_htonl(0xabcdefafU); - o = efl_net_ip_address_create(EFL_NET_IP_ADDRESS_CLASS, + o = efl_net_ip_address_create( eina_ntohs(addr.sin_port), slice); _ipv4_check(o, &addr); @@ -410,7 +410,7 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok) addr.sin_port = eina_htons(8081); addr.sin_addr.s_addr = eina_htonl(0); - o = efl_net_ip_address_create(EFL_NET_IP_ADDRESS_CLASS, + o = efl_net_ip_address_create( eina_ntohs(addr.sin_port), slice); _ipv4_check(o, &addr); @@ -418,7 +418,7 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok) addr.sin_port = eina_htons(0); addr.sin_addr.s_addr = eina_htonl(0x12345678); - o = efl_net_ip_address_create(EFL_NET_IP_ADDRESS_CLASS, + o = efl_net_ip_address_create( eina_ntohs(addr.sin_port), slice); _ipv4_check(o, &addr); @@ -434,7 +434,7 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_create_fail) Eo *o; TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: address.len != 4 && address.len != 16 is true"); - o = efl_net_ip_address_create(EFL_NET_IP_ADDRESS_CLASS, + o = efl_net_ip_address_create( 1234, wrong_slice); ck_assert_ptr_eq(o, NULL); @@ -452,14 +452,14 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_create_sockaddr_ok) addr.sin_port = eina_htons(12345); addr.sin_addr.s_addr = eina_htonl(0xabcdefafU); - o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); + o = efl_net_ip_address_create_sockaddr(&addr); ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); _ipv4_check(o, &addr); efl_unref(o); addr.sin_port = eina_htons(0); addr.sin_addr.s_addr = eina_htonl(0); - o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); + o = efl_net_ip_address_create_sockaddr(&addr); ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); _ipv4_check(o, &addr); efl_unref(o); @@ -475,12 +475,12 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_create_sockaddr_fail) Eo *o; TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: sockaddr == NULL"); - o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, NULL); + o = efl_net_ip_address_create_sockaddr(NULL); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(1); TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: (sockaddr->sa_family != AF_INET) && (sockaddr->sa_family != AF_INET6) is true"); - o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); + o = efl_net_ip_address_create_sockaddr(&addr); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(1); @@ -491,22 +491,22 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_parse_ok) { Eo *o; - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:12345"); + o = efl_net_ip_address_parse( "127.0.0.1:12345"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1:12345"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:0"); + o = efl_net_ip_address_parse( "127.0.0.1:0"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1"); + o = efl_net_ip_address_parse( "127.0.0.1"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "192.168.0.123:80"); + o = efl_net_ip_address_parse( "192.168.0.123:80"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "192.168.0.123:80"); efl_unref(o); @@ -519,30 +519,30 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_parse_fail) Eo *o; TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: numeric_address == NULL"); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, NULL); + o = efl_net_ip_address_parse( NULL); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(1); /* incomplete numbers */ TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127."); + o = efl_net_ip_address_parse( "127."); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(0); /* no error messages! */ TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0."); + o = efl_net_ip_address_parse( "127.0.0."); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(0); /* no error messages! */ /* hostnames are not numeric, shouldn't return an object */ TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "google.com"); + o = efl_net_ip_address_parse( "google.com"); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(0); /* no error messages! */ /* port names are not numeric, shouldn't return an object */ TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:http"); + o = efl_net_ip_address_parse( "127.0.0.1:http"); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(0); /* no error messages! */ @@ -589,13 +589,13 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_resolve_fail) struct resolve_ctx ctx = { }; TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: address == NULL"); - ctx.future = efl_net_ip_address_resolve(EFL_NET_IP_ADDRESS_CLASS, + ctx.future = efl_net_ip_address_resolve( NULL, 0, 0); ck_assert_ptr_eq(ctx.future, NULL); TRAP_ERRORS_FINISH(1); TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: (family != AF_UNSPEC) && (family != AF_INET) && (family != AF_INET6) is true"); - ctx.future = efl_net_ip_address_resolve(EFL_NET_IP_ADDRESS_CLASS, + ctx.future = efl_net_ip_address_resolve( "localhost", 1234, 0); ck_assert_ptr_eq(ctx.future, NULL); TRAP_ERRORS_FINISH(1); @@ -643,7 +643,7 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv4_checks) .sin_port = 0, .sin_addr.s_addr = eina_htonl(itr->addr), }; - Eo *o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &a); + Eo *o = efl_net_ip_address_create_sockaddr(&a); ck_assert_ptr_ne(o, NULL); ck_assert_int_eq(efl_net_ip_address_ipv4_class_a_check(o), itr->is_a); @@ -799,7 +799,7 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok) addr.sin6_port = eina_htons(12365); _ipv6_set(&addr, 1, 2, 3, 4, 5, 6, 7, 8); - o = efl_net_ip_address_create(EFL_NET_IP_ADDRESS_CLASS, + o = efl_net_ip_address_create( eina_ntohs(addr.sin6_port), slice); _ipv6_check(o, &addr); @@ -807,7 +807,7 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok) addr.sin6_port = eina_htons(8081); _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); - o = efl_net_ip_address_create(EFL_NET_IP_ADDRESS_CLASS, + o = efl_net_ip_address_create( eina_ntohs(addr.sin6_port), slice); _ipv6_check(o, &addr); @@ -815,7 +815,7 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok) addr.sin6_port = eina_htons(0); _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1); - o = efl_net_ip_address_create(EFL_NET_IP_ADDRESS_CLASS, + o = efl_net_ip_address_create( eina_ntohs(addr.sin6_port), slice); _ipv6_check(o, &addr); @@ -833,14 +833,14 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv6_create_sockaddr_ok) addr.sin6_port = eina_htons(12345); _ipv6_set(&addr, 1, 2, 3, 4, 5, 6, 7, 8); - o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); + o = efl_net_ip_address_create_sockaddr(&addr); ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); _ipv6_check(o, &addr); efl_unref(o); addr.sin6_port = eina_htons(0); _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); - o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); + o = efl_net_ip_address_create_sockaddr(&addr); ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); _ipv6_check(o, &addr); efl_unref(o); @@ -852,86 +852,86 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv6_parse_ok) { Eo *o; - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:12345"); + o = efl_net_ip_address_parse( "[::1]:12345"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]:12345"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:0"); + o = efl_net_ip_address_parse( "[::1]:0"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]"); + o = efl_net_ip_address_parse( "[::1]"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::1"); + o = efl_net_ip_address_parse( "::1"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:12345"); + o = efl_net_ip_address_parse( "[::]:12345"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]:12345"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:0"); + o = efl_net_ip_address_parse( "[::]:0"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]"); + o = efl_net_ip_address_parse( "[::]"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::"); + o = efl_net_ip_address_parse( "::"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); efl_unref(o); /* IPv4 Mapped */ - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]:12345"); + o = efl_net_ip_address_parse( "[::ffff:192.168.0.1]:12345"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]:12345"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]"); + o = efl_net_ip_address_parse( "[::ffff:192.168.0.1]"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]"); efl_unref(o); /* IPv4 Compatible */ - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]:12345"); + o = efl_net_ip_address_parse( "[::192.168.0.1]:12345"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]:12345"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]"); + o = efl_net_ip_address_parse( "[::192.168.0.1]"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]"); efl_unref(o); /* Link Local */ - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]:12345"); + o = efl_net_ip_address_parse( "[fe80::1]:12345"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]:12345"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]"); + o = efl_net_ip_address_parse( "[fe80::1]"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]"); efl_unref(o); /* Site Local */ - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]:12345"); + o = efl_net_ip_address_parse( "[fc00::1]:12345"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]:12345"); efl_unref(o); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]"); + o = efl_net_ip_address_parse( "[fc00::1]"); ck_assert_ptr_ne(o, NULL); ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]"); efl_unref(o); @@ -947,18 +947,18 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv6_parse_fail) /* incomplete numbers */ TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::9999999"); + o = efl_net_ip_address_parse( "::9999999"); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(0); /* no error messages! */ TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "ab:cd:ef:gh"); + o = efl_net_ip_address_parse( "ab:cd:ef:gh"); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(0); /* no error messages! */ /* port names are not numeric, shouldn't return an object */ TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); - o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:http"); + o = efl_net_ip_address_parse( "[::1]:http"); ck_assert_ptr_eq(o, NULL); TRAP_ERRORS_FINISH(0); /* no error messages! */ @@ -1152,7 +1152,7 @@ EFL_START_TEST(ecore_test_efl_net_ip_address_ipv6_checks) r = inet_pton(AF_INET6, itr->str, ia); ck_assert_int_eq(r, 1); - Eo *o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &a); + Eo *o = efl_net_ip_address_create_sockaddr(&a); ck_assert_ptr_ne(o, NULL); ck_assert_int_eq(efl_net_ip_address_ipv4_class_a_check(o), EINA_FALSE); diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c index 51086216e3..674d1f8f23 100644 --- a/src/tests/efl_mono/libefl_mono_native_test.c +++ b/src/tests/efl_mono/libefl_mono_native_test.c @@ -3827,24 +3827,15 @@ Dummy_MyInt _dummy_test_object_bypass_typedef(EINA_UNUSED Eo *obj, EINA_UNUSED D /* Class Properties */ static int _dummy_test_object_klass_prop = 0; -int _dummy_test_object_klass_prop_get(const Eo *klass, EINA_UNUSED void *pd) +int _dummy_test_object_klass_prop_get(void) { - EINA_LOG_ERR("FAIL on GET"); - if (klass != dummy_test_object_class_get()) - { - eina_error_set(EINVAL); - return -1; - } + EINA_LOG_ERR("FAIL on GET"); return _dummy_test_object_klass_prop; } -void _dummy_test_object_klass_prop_set(Eo *klass, EINA_UNUSED void *pd, int value) +void _dummy_test_object_klass_prop_set(int value) { - EINA_LOG_ERR("FAIL on SET"); - if (klass != dummy_test_object_class_get()) - { - eina_error_set(EINVAL); - } + EINA_LOG_ERR("FAIL on SET"); _dummy_test_object_klass_prop = value; } @@ -3858,7 +3849,7 @@ Eina_Future* _dummy_test_object_get_future(EINA_UNUSED Eo *obj, Dummy_Test_Objec { if (pd->promise == NULL) { - Eo *loop = efl_app_main_get(EFL_APP_CLASS); + Eo *loop = efl_app_main_get(); Eina_Future_Scheduler *scheduler = efl_loop_future_scheduler_get(loop); pd->promise = eina_promise_new(scheduler, _promise_cancelled, pd); } @@ -3989,14 +3980,14 @@ _dummy_child_class_destructor(Efl_Class *klass) } // Inherit -int _dummy_inherit_helper_receive_dummy_and_call_int_out(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Dummy_Test_Object *x) +int _dummy_inherit_helper_receive_dummy_and_call_int_out(Dummy_Test_Object *x) { int v = 8; dummy_test_object_int_out (x, 5, &v); return v; } -const char* _dummy_inherit_helper_receive_dummy_and_call_in_stringshare(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Dummy_Test_Object *x) +const char* _dummy_inherit_helper_receive_dummy_and_call_in_stringshare(Dummy_Test_Object *x) { return dummy_inherit_iface_stringshare_test (x, eina_stringshare_add("hello world")); } diff --git a/src/tests/elementary/efl_ui_model.c b/src/tests/elementary/efl_ui_model.c index 8b1d87c5d4..79056a726a 100644 --- a/src/tests/elementary/efl_ui_model.c +++ b/src/tests/elementary/efl_ui_model.c @@ -169,7 +169,7 @@ EFL_START_TEST(efl_ui_homogeneous_model_test) ck_assert_int_eq(_property_error_expected(model, "item.width"), EAGAIN); ck_assert_int_eq(_property_error_expected(model, "item.height"), EAGAIN); - ret__ = efl_loop_begin(efl_app_main_get(EFL_APP_CLASS)); + ret__ = efl_loop_begin(efl_app_main_get()); real__ = efl_loop_exit_code_process(ret__); fail_if(real__ != 0); @@ -240,7 +240,7 @@ EFL_START_TEST(efl_ui_exact_model_test) ck_assert_int_eq(_property_error_expected(model, "item.width"), EAGAIN); ck_assert_int_eq(_property_error_expected(model, "item.height"), EAGAIN); - ret__ = efl_loop_begin(efl_app_main_get(EFL_APP_CLASS)); + ret__ = efl_loop_begin(efl_app_main_get()); real__ = efl_loop_exit_code_process(ret__); fail_if(real__ != 0); @@ -328,7 +328,7 @@ EFL_START_TEST(efl_ui_average_model_test) ck_assert_int_eq(_property_error_expected(model, "item.width"), EAGAIN); ck_assert_int_eq(_property_error_expected(model, "item.height"), EAGAIN); - ret__ = efl_loop_begin(efl_app_main_get(EFL_APP_CLASS)); + ret__ = efl_loop_begin(efl_app_main_get()); real__ = efl_loop_exit_code_process(ret__); fail_if(real__ != 0); diff --git a/src/tests/elementary/efl_ui_test_focus.c b/src/tests/elementary/efl_ui_test_focus.c index 13791a231f..16fce9fb05 100644 --- a/src/tests/elementary/efl_ui_test_focus.c +++ b/src/tests/elementary/efl_ui_test_focus.c @@ -297,7 +297,7 @@ _check_chain(Efl_Ui_Focus_Manager *m, Efl_Ui_Focus_Object *objects[]) efl_ui_focus_manager_reset_history(m); efl_ui_focus_manager_setup_on_first_touch(m, EFL_UI_FOCUS_DIRECTION_NEXT, root); } - next = efl_ui_focus_manager_focus_get(efl_ui_focus_util_active_manager(EFL_UI_FOCUS_UTIL_CLASS, m)); + next = efl_ui_focus_manager_focus_get(efl_ui_focus_util_active_manager(m)); ck_assert_ptr_eq(next, objects[i]); } @@ -317,7 +317,7 @@ _check_chain(Efl_Ui_Focus_Manager *m, Efl_Ui_Focus_Object *objects[]) efl_ui_focus_manager_setup_on_first_touch(m, EFL_UI_FOCUS_DIRECTION_PREVIOUS, root); } - prev = efl_ui_focus_manager_focus_get(efl_ui_focus_util_active_manager(EFL_UI_FOCUS_UTIL_CLASS, m)); + prev = efl_ui_focus_manager_focus_get(efl_ui_focus_util_active_manager(m)); ck_assert_ptr_eq(prev, objects[i - 1]); } ck_assert_ptr_eq(efl_ui_focus_manager_move(m, EFL_UI_FOCUS_DIRECTION_PREVIOUS), NULL); diff --git a/src/tests/elementary/elm_test_genlist.c b/src/tests/elementary/elm_test_genlist.c index a50f3b869d..d0f89aa4d7 100644 --- a/src/tests/elementary/elm_test_genlist.c +++ b/src/tests/elementary/elm_test_genlist.c @@ -220,7 +220,7 @@ EFL_START_TEST(elm_genlist_test_atspi_children_events_add) Elm_Object_Item *it[3]; - efl_access_object_event_handler_add(EFL_ACCESS_OBJECT_MIXIN, _children_changed_cb, NULL); + efl_access_object_event_handler_add(_children_changed_cb, NULL); it[0] = elm_genlist_item_append(genlist, &itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); ck_assert(genlist == current); @@ -256,7 +256,7 @@ EFL_START_TEST(elm_genlist_test_atspi_children_events_del1) it[1] = elm_genlist_item_prepend(genlist, &itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); it[2] = elm_genlist_item_append(genlist, &itc, NULL, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL); - efl_access_object_event_handler_add(EFL_ACCESS_OBJECT_MIXIN, _children_changed_cb, NULL); + efl_access_object_event_handler_add(_children_changed_cb, NULL); elm_object_item_del(it[0]); ck_assert(genlist == current); @@ -283,7 +283,7 @@ EFL_START_TEST(elm_genlist_test_atspi_children_events_del2) it = elm_genlist_item_append(genlist, &itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); - efl_access_object_event_handler_add(EFL_ACCESS_OBJECT_MIXIN, _children_changed_cb, NULL); + efl_access_object_event_handler_add(_children_changed_cb, NULL); elm_genlist_clear(genlist); ck_assert(genlist == current); diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c index 0c346911e9..06b268d80d 100644 --- a/src/tests/elementary/elm_test_win.c +++ b/src/tests/elementary/elm_test_win.c @@ -165,12 +165,11 @@ EFL_END_TEST EFL_START_TEST (elm_win_test_app_exit_on_windows_close) { Eo *win = win_add(NULL, "win", ELM_WIN_BASIC); - Eo *app = efl_app_main_get(EFL_APP_CLASS); Eina_Value val, *exit_val; int code; val = eina_value_int_init(66); - efl_ui_win_exit_on_all_windows_closed_set(win, &val); + efl_ui_win_exit_on_all_windows_closed_set(&val); efl_gfx_entity_visible_set(win, EINA_TRUE); Eina_Bool fail_flag = EINA_FALSE; @@ -180,7 +179,7 @@ EFL_START_TEST (elm_win_test_app_exit_on_windows_close) exit_val = efl_loop_begin(efl_loop_get(win)); ck_assert(eina_value_int_get(exit_val, &code)); ck_assert_int_eq(code, 66); - efl_ui_win_exit_on_all_windows_closed_set(app, &EINA_VALUE_EMPTY); + efl_ui_win_exit_on_all_windows_closed_set(&EINA_VALUE_EMPTY); } EFL_END_TEST diff --git a/src/tests/elementary/suite_helpers.c b/src/tests/elementary/suite_helpers.c index de175fc420..4352b65408 100644 --- a/src/tests/elementary/suite_helpers.c +++ b/src/tests/elementary/suite_helpers.c @@ -64,7 +64,7 @@ efl_main(void *data EINA_UNUSED, { Efl_Loop_Arguments *arge = ev->info; - + fail_if(!arge->initialization); fprintf(stderr, "ARGC %d\n", eina_array_count(arge->argv)); fail_if(eina_array_count(arge->argv) != 2); @@ -84,10 +84,10 @@ EFL_START_TEST(efl_ui_test_init) _efl_startup_time = ecore_time_unix_get(); _EFL_APP_VERSION_SET(); fail_if(!ecore_init()); - efl_event_callback_add(efl_app_main_get(EFL_APP_CLASS), EFL_LOOP_EVENT_ARGUMENTS, efl_main, NULL); + efl_event_callback_add(efl_app_main_get(), EFL_LOOP_EVENT_ARGUMENTS, efl_main, NULL); fail_if(!ecore_init_ex(argc, argv)); __EFL_MAIN_CONSTRUCTOR; - ret__ = efl_loop_begin(efl_app_main_get(EFL_APP_CLASS)); + ret__ = efl_loop_begin(efl_app_main_get()); real__ = efl_loop_exit_code_process(ret__); fail_if(real__ != 0); __EFL_MAIN_DESTRUCTOR; @@ -270,7 +270,7 @@ suite_setup(Eina_Bool legacy) else failed_count = _efl_suite_build_and_run(0, NULL, "Efl_Ui_Init", ui_init, NULL, NULL); - + failed_count += !elm_init(1, (char*[]){"exe"}); if (buffer) { diff --git a/src/tests/eo/signals/signals_main.c b/src/tests/eo/signals/signals_main.c index 58b9eda958..c3b1648c17 100644 --- a/src/tests/eo/signals/signals_main.c +++ b/src/tests/eo/signals/signals_main.c @@ -171,15 +171,15 @@ main(int argc, char *argv[]) efl_event_callback_priority_add(obj, EV_A_CHANGED, EFL_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 1); fail_if(pd->cb_count != 1); - fcount = efl_event_global_freeze_count_get(EO_CLASS); + fcount = efl_event_global_freeze_count_get(); fail_if(fcount != 0); - efl_event_global_freeze(EO_CLASS); - fcount = efl_event_global_freeze_count_get(EO_CLASS); + efl_event_global_freeze(); + fcount = efl_event_global_freeze_count_get(); fail_if(fcount != 1); - efl_event_global_freeze(EO_CLASS); - fcount = efl_event_global_freeze_count_get(EO_CLASS); + efl_event_global_freeze(); + fcount = efl_event_global_freeze_count_get(); fail_if(fcount != 2); efl_event_callback_priority_add(obj, EV_A_CHANGED, EFL_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 2); @@ -187,30 +187,30 @@ main(int argc, char *argv[]) simple_a_set(obj, 2); fail_if(cb_count != 0); - efl_event_global_thaw(EO_CLASS); - fcount = efl_event_global_freeze_count_get(EO_CLASS); + efl_event_global_thaw(); + fcount = efl_event_global_freeze_count_get(); fail_if(fcount != 1); - efl_event_global_thaw(EO_CLASS); - fcount = efl_event_global_freeze_count_get(EO_CLASS); + efl_event_global_thaw(); + fcount = efl_event_global_freeze_count_get(); fail_if(fcount != 0); simple_a_set(obj, 3); fail_if(cb_count != 2); cb_count = 0; - efl_event_global_thaw(EO_CLASS); - fcount = efl_event_global_freeze_count_get(EO_CLASS); + efl_event_global_thaw(); + fcount = efl_event_global_freeze_count_get(); fail_if(fcount != 0); - efl_event_global_freeze(EO_CLASS); - fcount = efl_event_global_freeze_count_get(EO_CLASS); + efl_event_global_freeze(); + fcount = efl_event_global_freeze_count_get(); fail_if(fcount != 1); simple_a_set(obj, 2); fail_if(cb_count != 0); - efl_event_global_thaw(EO_CLASS); - fcount = efl_event_global_freeze_count_get(EO_CLASS); + efl_event_global_thaw(); + fcount = efl_event_global_freeze_count_get(); fail_if(fcount != 0); efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_DEFAULT, _restart_1_cb, NULL); diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c index e6c0244a55..ba1e647ee9 100644 --- a/src/tests/eolian/data/class_simple_ref.c +++ b/src/tests/eolian/data/class_simple_ref.c @@ -29,7 +29,7 @@ EOAPI EFL_FUNC_BODYV(efl_canvas_object_simple_bar, int *, NULL, EFL_FUNC_CALL(x) static Eina_Bool _class_simple_class_initializer(Efl_Class *klass) { - const Efl_Object_Ops *opsp = NULL, *copsp = NULL; + const Efl_Object_Ops *opsp = NULL; #ifndef CLASS_SIMPLE_EXTRA_OPS #define CLASS_SIMPLE_EXTRA_OPS @@ -45,12 +45,7 @@ _class_simple_class_initializer(Efl_Class *klass) ); opsp = &ops; -#ifdef CLASS_SIMPLE_EXTRA_CLASS_OPS - EFL_OPS_DEFINE(cops, CLASS_SIMPLE_EXTRA_CLASS_OPS); - copsp = &cops; -#endif - - return efl_class_functions_set(klass, opsp, copsp, NULL); + return efl_class_functions_set(klass, opsp, NULL, NULL); } static const Efl_Class_Description _class_simple_class_desc = { diff --git a/src/tests/eolian/data/function_as_argument_ref.c b/src/tests/eolian/data/function_as_argument_ref.c index ee9ccccdf7..0728dd4299 100644 --- a/src/tests/eolian/data/function_as_argument_ref.c +++ b/src/tests/eolian/data/function_as_argument_ref.c @@ -14,7 +14,7 @@ EOAPI EFL_FUNC_BODYV(function_as_argument_call_cb, char *, NULL, EFL_FUNC_CALL(a static Eina_Bool _function_as_argument_class_initializer(Efl_Class *klass) { - const Efl_Object_Ops *opsp = NULL, *copsp = NULL; + const Efl_Object_Ops *opsp = NULL; #ifndef FUNCTION_AS_ARGUMENT_EXTRA_OPS #define FUNCTION_AS_ARGUMENT_EXTRA_OPS @@ -28,12 +28,7 @@ _function_as_argument_class_initializer(Efl_Class *klass) ); opsp = &ops; -#ifdef FUNCTION_AS_ARGUMENT_EXTRA_CLASS_OPS - EFL_OPS_DEFINE(cops, FUNCTION_AS_ARGUMENT_EXTRA_CLASS_OPS); - copsp = &cops; -#endif - - return efl_class_functions_set(klass, opsp, copsp, NULL); + return efl_class_functions_set(klass, opsp, NULL, NULL); } static const Efl_Class_Description _function_as_argument_class_desc = { diff --git a/src/tests/eolian/data/override_ref.c b/src/tests/eolian/data/override_ref.c index 45cec764a5..2a6c28b813 100644 --- a/src/tests/eolian/data/override_ref.c +++ b/src/tests/eolian/data/override_ref.c @@ -59,7 +59,7 @@ static void __eolian_override_base_z_get(const Eo *obj EINA_UNUSED, Override_Dat static Eina_Bool _override_class_initializer(Efl_Class *klass) { - const Efl_Object_Ops *opsp = NULL, *copsp = NULL; + const Efl_Object_Ops *opsp = NULL; #ifndef OVERRIDE_EXTRA_OPS #define OVERRIDE_EXTRA_OPS @@ -81,12 +81,7 @@ _override_class_initializer(Efl_Class *klass) ); opsp = &ops; -#ifdef OVERRIDE_EXTRA_CLASS_OPS - EFL_OPS_DEFINE(cops, OVERRIDE_EXTRA_CLASS_OPS); - copsp = &cops; -#endif - - return efl_class_functions_set(klass, opsp, copsp, NULL); + return efl_class_functions_set(klass, opsp, NULL, NULL); } static const Efl_Class_Description _override_class_desc = { diff --git a/src/tests/eolian/data/owning.eo.c b/src/tests/eolian/data/owning.eo.c index 8712993c9b..bf7e78bf9f 100644 --- a/src/tests/eolian/data/owning.eo.c +++ b/src/tests/eolian/data/owning.eo.c @@ -43,7 +43,7 @@ EOAPI EFL_VOID_FUNC_BODYV_FALLBACK(owning_test2, _owning_test2_ownership_fallbac static Eina_Bool _owning_class_initializer(Efl_Class *klass) { - const Efl_Object_Ops *opsp = NULL, *copsp = NULL; + const Efl_Object_Ops *opsp = NULL; #ifndef OWNING_EXTRA_OPS #define OWNING_EXTRA_OPS @@ -56,12 +56,7 @@ _owning_class_initializer(Efl_Class *klass) ); opsp = &ops; -#ifdef OWNING_EXTRA_CLASS_OPS - EFL_OPS_DEFINE(cops, OWNING_EXTRA_CLASS_OPS); - copsp = &cops; -#endif - - return efl_class_functions_set(klass, opsp, copsp, NULL); + return efl_class_functions_set(klass, opsp, NULL, NULL); } static const Efl_Class_Description _owning_class_desc = { From 46885653bc0467f88042bb110fdc973b2258f69c Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 10 Feb 2019 16:57:00 +0100 Subject: [PATCH 41/87] eo: remove class functions from eo As in the previous commit explained, we want to get rid of class functions in eo, and make them just c functions right away. This commit removes the class parameter from the eo_class_function_set call, and adjusts the tests to not depend on class functions anymore. Class functions are now not tested anymore, tests that used them as a way to test *things* are adjusted to test them now with object functions, tests that just tested the working of class functions are dropped. This fixes T7675. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7902 --- src/benchmarks/eo/class_simple.c | 2 +- src/benchmarks/eo/eo_bench_eo_do.c | 2 +- src/bin/eolian/sources.c | 2 +- src/lib/elementary/efl_ui_table.c | 4 +-- src/lib/elementary/elc_combobox.c | 2 +- src/lib/eo/Eo.h | 2 +- src/lib/eo/eo.c | 11 +++---- src/tests/eo/access/access_inherit.c | 2 +- src/tests/eo/access/access_simple.c | 2 +- .../composite_objects_comp.c | 2 +- .../composite_objects_simple.c | 2 +- .../eo/constructors/constructors_mixin.c | 2 +- .../eo/constructors/constructors_simple.c | 2 +- .../eo/constructors/constructors_simple2.c | 2 +- .../eo/constructors/constructors_simple3.c | 2 +- .../eo/constructors/constructors_simple5.c | 2 +- .../eo/constructors/constructors_simple6.c | 2 +- .../eo/constructors/constructors_simple7.c | 2 +- .../function_overrides_inherit2.c | 19 +----------- .../function_overrides_inherit3.c | 2 +- .../function_overrides_simple.c | 2 +- src/tests/eo/interface/interface_interface.c | 2 +- src/tests/eo/interface/interface_interface2.c | 2 +- src/tests/eo/interface/interface_simple.c | 2 +- src/tests/eo/mixin/mixin_inherit.c | 2 +- src/tests/eo/mixin/mixin_mixin.c | 2 +- src/tests/eo/mixin/mixin_mixin2.c | 2 +- src/tests/eo/mixin/mixin_mixin3.c | 2 +- src/tests/eo/mixin/mixin_simple.c | 2 +- src/tests/eo/signals/signals_simple.c | 2 +- src/tests/eo/suite/eo_test_call_errors.c | 2 +- .../eo/suite/eo_test_class_behaviour_errors.c | 2 +- src/tests/eo/suite/eo_test_class_errors.c | 6 ++-- src/tests/eo/suite/eo_test_class_simple.c | 31 +++---------------- src/tests/eo/suite/eo_test_class_simple.h | 2 -- src/tests/eo/suite/eo_test_class_singleton.c | 2 +- src/tests/eo/suite/eo_test_domain.c | 2 +- src/tests/eo/suite/eo_test_general.c | 24 ++++++++++---- src/tests/eo/suite/eo_test_init.c | 7 +++-- src/tests/eo/suite/eo_test_threaded_calls.c | 2 +- src/tests/eolian/data/class_simple_ref.c | 2 +- .../eolian/data/function_as_argument_ref.c | 2 +- src/tests/eolian/data/override_ref.c | 2 +- src/tests/eolian/data/owning.eo.c | 2 +- 44 files changed, 72 insertions(+), 104 deletions(-) diff --git a/src/benchmarks/eo/class_simple.c b/src/benchmarks/eo/class_simple.c index 3d153cea32..63378d6033 100644 --- a/src/benchmarks/eo/class_simple.c +++ b/src/benchmarks/eo/class_simple.c @@ -38,7 +38,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_other_call, _other_call), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c index cb95185fb8..2783b91b3c 100644 --- a/src/benchmarks/eo/eo_bench_eo_do.c +++ b/src/benchmarks/eo/eo_bench_eo_do.c @@ -65,7 +65,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_a_set, _a_set), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static void diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index 493ec1ad40..76f8c64725 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -907,7 +907,7 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf) eina_strbuf_append(buf, "#endif\n\n"); } - eina_strbuf_append(buf, " return efl_class_functions_set(klass, opsp, NULL, NULL);\n"); + eina_strbuf_append(buf, " return efl_class_functions_set(klass, opsp, NULL);\n"); eina_strbuf_free(ops); diff --git a/src/lib/elementary/efl_ui_table.c b/src/lib/elementary/efl_ui_table.c index 78b17a7f81..3a90eb0655 100644 --- a/src/lib/elementary/efl_ui_table.c +++ b/src/lib/elementary/efl_ui_table.c @@ -83,11 +83,11 @@ static void _custom_table_calc(Eo *obj, Custom_Table_Data *pd); static Eina_Bool _custom_table_initializer(Efl_Class *klass) { - EFL_OPS_DEFINE(class_ops, + EFL_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC(efl_canvas_group_calculate, _custom_table_calc) ); - return efl_class_functions_set(klass, NULL, &class_ops, NULL); + return efl_class_functions_set(klass, &ops, NULL); }; static const Efl_Class_Description custom_table_class_desc = { diff --git a/src/lib/elementary/elc_combobox.c b/src/lib/elementary/elc_combobox.c index 6ca7675a16..2b231aa0c4 100644 --- a/src/lib/elementary/elc_combobox.c +++ b/src/lib/elementary/elc_combobox.c @@ -616,7 +616,7 @@ _elm_combobox_class_initializer(Efl_Class *klass) EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_combobox) ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description _elm_combobox_class_desc = { diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 2fd2c1b7e8..df5dc338e0 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -897,7 +897,7 @@ EAPI const Efl_Class *efl_class_new(const Efl_Class_Description *desc, const Efl * efl_property_reflection_set() or efl_property_reflection_get() is called. * @see #EFL_DEFINE_CLASS */ -EAPI Eina_Bool efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ops, const Efl_Object_Ops *class_ops, const Efl_Object_Property_Reflection_Ops *reflection_table); +EAPI Eina_Bool efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ops, const Efl_Object_Property_Reflection_Ops *reflection_table); /** * @brief Override Eo functions of this object. diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 95823f7a08..0611643546 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -819,7 +819,7 @@ _eo_class_funcs_set(Eo_Vtable *vtable, const Efl_Object_Ops *ops, const _Efl_Cla } EAPI Eina_Bool -efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ops, const Efl_Object_Ops *class_ops, const Efl_Object_Property_Reflection_Ops *reflection_table) +efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ops, const Efl_Object_Property_Reflection_Ops *reflection_table) { EO_CLASS_POINTER_GOTO(klass_id, klass, err_klass); Efl_Object_Ops empty_ops = { 0 }; @@ -830,11 +830,9 @@ efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ if (!object_ops) object_ops = &empty_ops; - if (!class_ops) class_ops = &empty_ops; - klass->reflection = reflection_table; - klass->ops_count = object_ops->count + class_ops->count; + klass->ops_count = object_ops->count; klass->base_id = _eo_ops_last_id; _eo_ops_last_id += klass->ops_count + 1; @@ -851,8 +849,7 @@ efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ _vtable_copy_all(&klass->vtable, &(*mro_itr)->vtable); } - return _eo_class_funcs_set(&klass->vtable, object_ops, klass, klass, 0, EINA_FALSE) && - _eo_class_funcs_set(&klass->vtable, class_ops, klass, klass, object_ops->count, EINA_FALSE); + return _eo_class_funcs_set(&klass->vtable, object_ops, klass, klass, 0, EINA_FALSE); err_funcs: ERR("Class %s already had its functions set..", klass->desc->name); @@ -1693,7 +1690,7 @@ efl_class_new(const Efl_Class_Description *desc, const Efl_Class *parent_id, ... /* If functions haven't been set, invoke it with an empty ops structure. */ if (!klass->functions_set) { - efl_class_functions_set(_eo_class_id_get(klass), NULL, NULL, NULL); + efl_class_functions_set(_eo_class_id_get(klass), NULL, NULL); } /* Mark which classes we implement */ diff --git a/src/tests/eo/access/access_inherit.c b/src/tests/eo/access/access_inherit.c index a77e3b4b8c..2f830bde8a 100644 --- a/src/tests/eo/access/access_inherit.c +++ b/src/tests/eo/access/access_inherit.c @@ -25,7 +25,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(inherit_prot_print, _prot_print), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/access/access_simple.c b/src/tests/eo/access/access_simple.c index 0ea01dbc97..5b75d0c52b 100644 --- a/src/tests/eo/access/access_simple.c +++ b/src/tests/eo/access/access_simple.c @@ -39,7 +39,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_a_set, _a_set), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/composite_objects/composite_objects_comp.c b/src/tests/eo/composite_objects/composite_objects_comp.c index 7d6fbe4c1a..b0b271ded1 100644 --- a/src/tests/eo/composite_objects/composite_objects_comp.c +++ b/src/tests/eo/composite_objects/composite_objects_comp.c @@ -44,7 +44,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_a_get, _a_get), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/composite_objects/composite_objects_simple.c b/src/tests/eo/composite_objects/composite_objects_simple.c index c2626ec530..b9bc70fb78 100644 --- a/src/tests/eo/composite_objects/composite_objects_simple.c +++ b/src/tests/eo/composite_objects/composite_objects_simple.c @@ -172,7 +172,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_a_get, _a_get), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/constructors/constructors_mixin.c b/src/tests/eo/constructors/constructors_mixin.c index 6257d9a609..c3cbdc50b1 100644 --- a/src/tests/eo/constructors/constructors_mixin.c +++ b/src/tests/eo/constructors/constructors_mixin.c @@ -46,7 +46,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_destructor, _destructor), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/constructors/constructors_simple.c b/src/tests/eo/constructors/constructors_simple.c index 69ecb0d1d7..cdce5d1e33 100644 --- a/src/tests/eo/constructors/constructors_simple.c +++ b/src/tests/eo/constructors/constructors_simple.c @@ -98,7 +98,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_b_get, _b_get), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/constructors/constructors_simple2.c b/src/tests/eo/constructors/constructors_simple2.c index 477de99e3c..71f8ae1335 100644 --- a/src/tests/eo/constructors/constructors_simple2.c +++ b/src/tests/eo/constructors/constructors_simple2.c @@ -23,7 +23,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_constructor, _constructor), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/constructors/constructors_simple3.c b/src/tests/eo/constructors/constructors_simple3.c index 80cc34f36b..7bab6dafc4 100644 --- a/src/tests/eo/constructors/constructors_simple3.c +++ b/src/tests/eo/constructors/constructors_simple3.c @@ -21,7 +21,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_constructor, _constructor), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/constructors/constructors_simple5.c b/src/tests/eo/constructors/constructors_simple5.c index abcb49261e..73bc8fe89c 100644 --- a/src/tests/eo/constructors/constructors_simple5.c +++ b/src/tests/eo/constructors/constructors_simple5.c @@ -21,7 +21,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_destructor, _destructor), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/constructors/constructors_simple6.c b/src/tests/eo/constructors/constructors_simple6.c index 671679e341..021f1f988c 100644 --- a/src/tests/eo/constructors/constructors_simple6.c +++ b/src/tests/eo/constructors/constructors_simple6.c @@ -21,7 +21,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_destructor, _destructor), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/constructors/constructors_simple7.c b/src/tests/eo/constructors/constructors_simple7.c index c81d849cf2..22c653729c 100644 --- a/src/tests/eo/constructors/constructors_simple7.c +++ b/src/tests/eo/constructors/constructors_simple7.c @@ -25,7 +25,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_constructor, _constructor), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/function_overrides/function_overrides_inherit2.c b/src/tests/eo/function_overrides/function_overrides_inherit2.c index 7f6b304281..e4aa147b67 100644 --- a/src/tests/eo/function_overrides/function_overrides_inherit2.c +++ b/src/tests/eo/function_overrides/function_overrides_inherit2.c @@ -42,20 +42,6 @@ _print2(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED) return EINA_TRUE; } -static Eina_Bool -_class_print(Efl_Class *klass, void *data EINA_UNUSED) -{ - Eina_Bool called = EINA_FALSE; - printf("Print %s-%s\n", efl_class_name_get(klass), efl_class_name_get(MY_CLASS)); - called = simple_class_print(efl_super(klass, MY_CLASS)); - fail_if(!called); - - called = simple_class_print2(efl_super(klass, MY_CLASS)); - fail_if(!called); - - return EINA_TRUE; -} - EAPI EFL_FUNC_BODY(inherit2_print, Eina_Bool, EINA_FALSE); EAPI EFL_FUNC_BODY(inherit2_print2, Eina_Bool, EINA_FALSE); @@ -67,11 +53,8 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(inherit2_print2, _print2), EFL_OBJECT_OP_FUNC(simple_a_set, _a_set), ); - EFL_OPS_DEFINE(cops, - EFL_OBJECT_OP_FUNC(simple_class_print, _class_print), - ); - return efl_class_functions_set(klass, &ops, &cops, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/function_overrides/function_overrides_inherit3.c b/src/tests/eo/function_overrides/function_overrides_inherit3.c index 54485e24ed..e3f34076d2 100644 --- a/src/tests/eo/function_overrides/function_overrides_inherit3.c +++ b/src/tests/eo/function_overrides/function_overrides_inherit3.c @@ -23,7 +23,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_a_set, _a_set), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/function_overrides/function_overrides_simple.c b/src/tests/eo/function_overrides/function_overrides_simple.c index fd65f66f20..fbd5681367 100644 --- a/src/tests/eo/function_overrides/function_overrides_simple.c +++ b/src/tests/eo/function_overrides/function_overrides_simple.c @@ -66,7 +66,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_class_print2, _class_print2), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/interface/interface_interface.c b/src/tests/eo/interface/interface_interface.c index 3fd8802ac4..dd5b293906 100644 --- a/src/tests/eo/interface/interface_interface.c +++ b/src/tests/eo/interface/interface_interface.c @@ -17,7 +17,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(interface_ab_sum_get, NULL), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/interface/interface_interface2.c b/src/tests/eo/interface/interface_interface2.c index c6e3d1b022..4b18105bba 100644 --- a/src/tests/eo/interface/interface_interface2.c +++ b/src/tests/eo/interface/interface_interface2.c @@ -18,7 +18,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(interface2_ab_sum_get2, NULL), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/interface/interface_simple.c b/src/tests/eo/interface/interface_simple.c index d960f835ba..0d20eea5fc 100644 --- a/src/tests/eo/interface/interface_simple.c +++ b/src/tests/eo/interface/interface_simple.c @@ -68,7 +68,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(interface2_ab_sum_get2, _ab_sum_get2), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/mixin/mixin_inherit.c b/src/tests/eo/mixin/mixin_inherit.c index 6d58143890..964fbe2527 100644 --- a/src/tests/eo/mixin/mixin_inherit.c +++ b/src/tests/eo/mixin/mixin_inherit.c @@ -26,7 +26,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_a_get, _a_get), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/mixin/mixin_mixin.c b/src/tests/eo/mixin/mixin_mixin.c index 4e61c216bd..06bff56d2b 100644 --- a/src/tests/eo/mixin/mixin_mixin.c +++ b/src/tests/eo/mixin/mixin_mixin.c @@ -41,7 +41,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(mixin_ab_sum_get, _ab_sum_get), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/mixin/mixin_mixin2.c b/src/tests/eo/mixin/mixin_mixin2.c index 6b378c23c4..48ea26a1d6 100644 --- a/src/tests/eo/mixin/mixin_mixin2.c +++ b/src/tests/eo/mixin/mixin_mixin2.c @@ -55,7 +55,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(mixin_ab_sum_get, _ab_sum_get), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/mixin/mixin_mixin3.c b/src/tests/eo/mixin/mixin_mixin3.c index 9f4cedc28c..8036249b89 100644 --- a/src/tests/eo/mixin/mixin_mixin3.c +++ b/src/tests/eo/mixin/mixin_mixin3.c @@ -54,7 +54,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(mixin_ab_sum_get, _ab_sum_get), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/mixin/mixin_simple.c b/src/tests/eo/mixin/mixin_simple.c index 21060b2357..9bc843514c 100644 --- a/src/tests/eo/mixin/mixin_simple.c +++ b/src/tests/eo/mixin/mixin_simple.c @@ -47,7 +47,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_b_get, _b_get), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/signals/signals_simple.c b/src/tests/eo/signals/signals_simple.c index ae158e3d8f..0e016dc550 100644 --- a/src/tests/eo/signals/signals_simple.c +++ b/src/tests/eo/signals/signals_simple.c @@ -79,7 +79,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_a_set, _a_set), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/suite/eo_test_call_errors.c b/src/tests/eo/suite/eo_test_call_errors.c index 97a8e76ec3..5a737a415d 100644 --- a/src/tests/eo/suite/eo_test_call_errors.c +++ b/src/tests/eo/suite/eo_test_call_errors.c @@ -89,7 +89,7 @@ _errorcase_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_error_test, _test), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description errorcase_class_desc = { diff --git a/src/tests/eo/suite/eo_test_class_behaviour_errors.c b/src/tests/eo/suite/eo_test_class_behaviour_errors.c index 0f670be592..02362257a5 100644 --- a/src/tests/eo/suite/eo_test_class_behaviour_errors.c +++ b/src/tests/eo/suite/eo_test_class_behaviour_errors.c @@ -29,7 +29,7 @@ _destructor_unref_class_initializer(Efl_Class *klass2) EFL_OBJECT_OP_FUNC(efl_destructor, _destructor_unref), ); - return efl_class_functions_set(klass2, &ops, NULL, NULL); + return efl_class_functions_set(klass2, &ops, NULL); } EFL_START_TEST(efl_destructor_unref) diff --git a/src/tests/eo/suite/eo_test_class_errors.c b/src/tests/eo/suite/eo_test_class_errors.c index d2dca6167e..a5052196c7 100644 --- a/src/tests/eo/suite/eo_test_class_errors.c +++ b/src/tests/eo/suite/eo_test_class_errors.c @@ -203,7 +203,7 @@ _null_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(NULL, _null_fct), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } EFL_START_TEST(eo_null_api) @@ -240,7 +240,7 @@ _redefined_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(null_fct, NULL), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } EFL_START_TEST(eo_api_redefined) @@ -277,7 +277,7 @@ _dich_func_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_a_set, NULL), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } EFL_START_TEST(eo_dich_func_override) diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c index 8d82b1eb11..fef3dd3ae5 100644 --- a/src/tests/eo/suite/eo_test_class_simple.c +++ b/src/tests/eo/suite/eo_test_class_simple.c @@ -58,14 +58,6 @@ _a_print(Eo *obj EINA_UNUSED, void *class_data) return EINA_TRUE; } -static Eina_Bool -_class_hi_print(Efl_Class *klass, void *data EINA_UNUSED) -{ - printf("Hi Print %s\n", efl_class_name_get(klass)); - - return EINA_TRUE; -} - EFL_FUNC_BODYV(simple_part_get, Eo *, NULL, EFL_FUNC_CALL(name), const char *name); static Eo * @@ -102,7 +94,6 @@ _dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, Efl_Dbg_Info *root) EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a); EFL_FUNC_BODY(simple_a_get, int, 0); EFL_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE); -EFL_FUNC_BODY_CONST(simple_class_hi_print, Eina_Bool, EINA_FALSE); EFL_VOID_FUNC_BODY(simple_pure_virtual); EFL_VOID_FUNC_BODY(simple_no_implementation); @@ -118,9 +109,6 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(simple_pure_virtual, NULL), EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _dbg_info_get), ); - EFL_OPS_DEFINE(cops, - EFL_OBJECT_OP_FUNC(simple_class_hi_print, _class_hi_print), - ); static const Efl_Object_Property_Reflection reflection_table[] = { {"simple_a", _a_set_reflect, _a_get_reflect}, }; @@ -128,7 +116,7 @@ _class_initializer(Efl_Class *klass) reflection_table, EINA_C_ARRAY_LENGTH(reflection_table) }; - return efl_class_functions_set(klass, &ops, &cops, &ref_ops); + return efl_class_functions_set(klass, &ops, &ref_ops); } static const Efl_Class_Description class_desc = { @@ -142,24 +130,13 @@ static const Efl_Class_Description class_desc = { }; EFL_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS, NULL) - - -static int -_beef_get(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED) -{ - return 0xBEEF; -} - EFL_FUNC_BODY_CONST(simple2_class_beef_get, int, 0); static Eina_Bool _class_initializer2(Efl_Class *klass) { - EFL_OPS_DEFINE(cops, - EFL_OBJECT_OP_FUNC(simple2_class_beef_get, _beef_get), - ); - return efl_class_functions_set(klass, NULL, &cops, NULL); + return efl_class_functions_set(klass, NULL, NULL); } static const Efl_Class_Description class_desc2 = { @@ -178,7 +155,7 @@ EFL_DEFINE_CLASS(simple2_class_get, &class_desc2, EO_CLASS, NULL) static Eina_Bool _class_initializer3(Efl_Class *klass) { - return efl_class_functions_set(klass, NULL, NULL, NULL); + return efl_class_functions_set(klass, NULL, NULL); } static const Efl_Class_Description class_desc3 = { @@ -209,7 +186,7 @@ _searchable_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_provider_find, _interface_get) ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc_searchable = { diff --git a/src/tests/eo/suite/eo_test_class_simple.h b/src/tests/eo/suite/eo_test_class_simple.h index 9023119577..57e6c8fe12 100644 --- a/src/tests/eo/suite/eo_test_class_simple.h +++ b/src/tests/eo/suite/eo_test_class_simple.h @@ -24,8 +24,6 @@ extern const Efl_Event_Description _EV_A_CHANGED2; #define SIMPLE_CLASS simple_class_get() const Efl_Class *simple_class_get(void); -EAPI int simple2_class_beef_get(const Efl_Class *obj); - #define SIMPLE2_CLASS simple2_class_get() const Efl_Class *simple2_class_get(void); diff --git a/src/tests/eo/suite/eo_test_class_singleton.c b/src/tests/eo/suite/eo_test_class_singleton.c index d8f325a1fd..a38a52b915 100644 --- a/src/tests/eo/suite/eo_test_class_singleton.c +++ b/src/tests/eo/suite/eo_test_class_singleton.c @@ -32,7 +32,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_constructor, _singleton_efl_constructor), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/suite/eo_test_domain.c b/src/tests/eo/suite/eo_test_domain.c index 23af2202bd..114f57060d 100644 --- a/src/tests/eo/suite/eo_test_domain.c +++ b/src/tests/eo/suite/eo_test_domain.c @@ -64,7 +64,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(domain_a_get, _a_get), EFL_OBJECT_OP_FUNC(domain_recursive, _recursive) ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c index b19bbc80bb..c483fc45be 100644 --- a/src/tests/eo/suite/eo_test_general.c +++ b/src/tests/eo/suite/eo_test_general.c @@ -66,6 +66,18 @@ _simple_obj_override_a_double_set(Eo *obj, void *class_data EINA_UNUSED, int a) simple_a_set(efl_super(obj, EFL_OBJECT_OVERRIDE_CLASS), 2 * a); } +EAPI int test_class_beef_get(const Efl_Object *obj); + +EFL_FUNC_BODY_CONST(test_class_beef_get, int, 0) + +static int +_simple_obj_override_beef_get(Eo *obj, void *class_data EINA_UNUSED) +{ + test_class_beef_get(efl_super(obj, EFL_OBJECT_OVERRIDE_CLASS)); + + return 1337; +} + EFL_START_TEST(efl_object_override_tests) { @@ -105,7 +117,7 @@ EFL_START_TEST(efl_object_override_tests) /* Try introducing a new function */ EFL_OPS_DEFINE( overrides3, - EFL_OBJECT_OP_FUNC(simple2_class_beef_get, _simple_obj_override_a_double_set)); + EFL_OBJECT_OP_FUNC(test_class_beef_get, _simple_obj_override_beef_get)); fail_if(efl_object_override(obj, &overrides3)); fail_if(!efl_object_override(obj, NULL)); fail_if(efl_object_override(obj, &overrides3)); @@ -472,7 +484,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_destructor, _man_des), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } EFL_START_TEST(eo_man_free) @@ -1049,7 +1061,7 @@ _multi_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(resolve_a_print, _a_print), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } EFL_START_TEST(efl_func_resolve) @@ -1215,7 +1227,7 @@ _add_failures_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_finalize, _efl_add_failures_finalize), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } EFL_START_TEST(efl_add_failures) @@ -1628,14 +1640,14 @@ static Eina_Bool _cast_inherit_class_initializer_1(Efl_Class *klass) { EFL_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC(inherit_value, _inherit_value_1), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static Eina_Bool _cast_inherit_class_initializer_2(Efl_Class *klass) { EFL_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC(inherit_value, _inherit_value_2), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } EFL_START_TEST(efl_cast_test) diff --git a/src/tests/eo/suite/eo_test_init.c b/src/tests/eo/suite/eo_test_init.c index cee49211e1..4cd2bf26c4 100644 --- a/src/tests/eo/suite/eo_test_init.c +++ b/src/tests/eo/suite/eo_test_init.c @@ -23,10 +23,9 @@ EFL_START_TEST(eo_test_init_shutdown) /* XXX-1: Essential for the next test to assign the wrong op. */ obj = efl_add_ref(SIMPLE_CLASS, NULL); simple_a_set(obj, 1); + /* XXX-1: Essential for the next test to cache the op. */ ck_assert_int_eq(1, simple_a_get(obj)); - /* XXX-1: Essential for the next test to cache the op. */ - ck_assert_int_eq(0xBEEF, simple2_class_beef_get(SIMPLE2_CLASS)); efl_unref(obj); fail_if(efl_object_shutdown()); @@ -34,7 +33,9 @@ EFL_START_TEST(eo_test_init_shutdown) ck_assert_str_eq("Efl.Object", efl_class_name_get(EFL_OBJECT_CLASS)); /* XXX-1: Verify that the op was not cached. */ - ck_assert_int_eq(0xBEEF, simple2_class_beef_get(SIMPLE2_CLASS)); + obj = efl_add_ref(SIMPLE_CLASS, NULL); + simple_a_set(obj, 1); + ck_assert_int_eq(1, simple_a_get(obj)); } EFL_END_TEST diff --git a/src/tests/eo/suite/eo_test_threaded_calls.c b/src/tests/eo/suite/eo_test_threaded_calls.c index df55e44150..411eb4536f 100644 --- a/src/tests/eo/suite/eo_test_threaded_calls.c +++ b/src/tests/eo/suite/eo_test_threaded_calls.c @@ -69,7 +69,7 @@ _class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(thread_test_try_swap_stack, _try_swap_stack), ); - return efl_class_functions_set(klass, &ops, NULL, NULL); + return efl_class_functions_set(klass, &ops, NULL); } static const Efl_Class_Description class_desc = { diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c index ba1e647ee9..431f083952 100644 --- a/src/tests/eolian/data/class_simple_ref.c +++ b/src/tests/eolian/data/class_simple_ref.c @@ -45,7 +45,7 @@ _class_simple_class_initializer(Efl_Class *klass) ); opsp = &ops; - return efl_class_functions_set(klass, opsp, NULL, NULL); + return efl_class_functions_set(klass, opsp, NULL); } static const Efl_Class_Description _class_simple_class_desc = { diff --git a/src/tests/eolian/data/function_as_argument_ref.c b/src/tests/eolian/data/function_as_argument_ref.c index 0728dd4299..edb394ed67 100644 --- a/src/tests/eolian/data/function_as_argument_ref.c +++ b/src/tests/eolian/data/function_as_argument_ref.c @@ -28,7 +28,7 @@ _function_as_argument_class_initializer(Efl_Class *klass) ); opsp = &ops; - return efl_class_functions_set(klass, opsp, NULL, NULL); + return efl_class_functions_set(klass, opsp, NULL); } static const Efl_Class_Description _function_as_argument_class_desc = { diff --git a/src/tests/eolian/data/override_ref.c b/src/tests/eolian/data/override_ref.c index 2a6c28b813..729f37e6c4 100644 --- a/src/tests/eolian/data/override_ref.c +++ b/src/tests/eolian/data/override_ref.c @@ -81,7 +81,7 @@ _override_class_initializer(Efl_Class *klass) ); opsp = &ops; - return efl_class_functions_set(klass, opsp, NULL, NULL); + return efl_class_functions_set(klass, opsp, NULL); } static const Efl_Class_Description _override_class_desc = { diff --git a/src/tests/eolian/data/owning.eo.c b/src/tests/eolian/data/owning.eo.c index bf7e78bf9f..7e504833c9 100644 --- a/src/tests/eolian/data/owning.eo.c +++ b/src/tests/eolian/data/owning.eo.c @@ -56,7 +56,7 @@ _owning_class_initializer(Efl_Class *klass) ); opsp = &ops; - return efl_class_functions_set(klass, opsp, NULL, NULL); + return efl_class_functions_set(klass, opsp, NULL); } static const Efl_Class_Description _owning_class_desc = { From 66ce295fc9d09a0ba1454d25ca7b4e32a51c9553 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 26 Jul 2018 15:37:00 -0500 Subject: [PATCH 42/87] ecore_main: Add ECORE_FD_ALWAYS flag This allows an fd handler to be called after select exits unconditionally. Our wayland client code needs this to be thread safe, as it needs to call prepare_read before entering select, and then either read or cancel_read after select. Signed-off-by: Derek Foreman Reviewed-by: Chris Michael Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7914 --- src/lib/ecore/Ecore_Common.h | 8 +++++- src/lib/ecore/ecore_main.c | 50 ++++++++++++++++++++++++++--------- src/lib/ecore/ecore_private.h | 1 + 3 files changed, 46 insertions(+), 13 deletions(-) diff --git a/src/lib/ecore/Ecore_Common.h b/src/lib/ecore/Ecore_Common.h index 9b777d7364..de515c57ed 100644 --- a/src/lib/ecore/Ecore_Common.h +++ b/src/lib/ecore/Ecore_Common.h @@ -1388,7 +1388,13 @@ enum _Ecore_Fd_Handler_Flags { ECORE_FD_READ = 1, /**< Fd Read mask */ ECORE_FD_WRITE = 2, /**< Fd Write mask */ - ECORE_FD_ERROR = 4 /**< Fd Error mask */ + ECORE_FD_ERROR = 4, /**< Fd Error mask */ + /* ECORE_FD_ALWAYS is intended to fix a problem with wayland + * and threads. It causes the fd handler to be called + * in any state, so wayland libs can call read_cancel + * if nothing is available to read. Everyone else should + * stay away. */ + ECORE_FD_ALWAYS = 8, /**< Fd Always mask - DO NOT USE! */ }; typedef enum _Ecore_Fd_Handler_Flags Ecore_Fd_Handler_Flags; diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 2c1a2ef868..42d554cf0f 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -248,7 +248,7 @@ _ecore_try_add_to_call_list(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd, Ecore_Fd_Han DBG("next_ready"); return; } - if (fdh->read_active || fdh->write_active || fdh->error_active) + if (fdh->read_active || fdh->write_active || fdh->error_active || (fdh->flags & ECORE_FD_ALWAYS)) { DBG("added"); // make sure next_ready is non-null by pointing to ourselves @@ -583,6 +583,10 @@ _ecore_main_fdh_epoll_mark_active(Eo *obj, Efl_Loop_Data *pd) fdh->write_active = EINA_TRUE; fdh->error_active = EINA_TRUE; } + /* We'll add this one anyway outside this function, + don't want it twice */ + if (fdh->flags & ECORE_FD_ALWAYS) + continue; _ecore_try_add_to_call_list(obj, pd, fdh); } @@ -1357,6 +1361,9 @@ _ecore_main_fd_handler_add(Eo *obj, if (is_file) pd->file_fd_handlers = eina_list_append (pd->file_fd_handlers, fdh); + if (fdh->flags & ECORE_FD_ALWAYS) + pd->always_fd_handlers = eina_list_append + (pd->always_fd_handlers, fdh); pd->fd_handlers = (Ecore_Fd_Handler *) eina_inlist_append(EINA_INLIST_GET(pd->fd_handlers), EINA_INLIST_GET(fdh)); @@ -1664,6 +1671,9 @@ _ecore_main_content_clear(Eo *obj, Efl_Loop_Data *pd) if (pd->file_fd_handlers) pd->file_fd_handlers = eina_list_free(pd->file_fd_handlers); + if (pd->always_fd_handlers) + pd->always_fd_handlers = + eina_list_free(pd->always_fd_handlers); if (pd->fd_handlers_to_delete) pd->fd_handlers_to_delete = eina_list_free(pd->fd_handlers_to_delete); @@ -1741,7 +1751,7 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) fd_set rfds, wfds, exfds; Ecore_Fd_Handler *fdh; Eina_List *l; - int max_fd, ret; + int max_fd, ret, outval; #ifndef _WIN32 int err_no; #endif @@ -1785,17 +1795,17 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) { if (!fdh->delete_me) { - if (fdh->flags & ECORE_FD_READ) + if ((fdh->flags & ECORE_FD_READ) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &rfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if (fdh->flags & ECORE_FD_WRITE) + if ((fdh->flags & ECORE_FD_WRITE) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &wfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if (fdh->flags & ECORE_FD_ERROR) + if ((fdh->flags & ECORE_FD_ERROR) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &exfds); if (fdh->fd > max_fd) max_fd = fdh->fd; @@ -1815,17 +1825,17 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) { if (!fdh->delete_me) { - if (fdh->flags & ECORE_FD_READ) + if ((fdh->flags & ECORE_FD_READ) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &rfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if (fdh->flags & ECORE_FD_WRITE) + if ((fdh->flags & ECORE_FD_WRITE) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &wfds); if (fdh->fd > max_fd) max_fd = fdh->fd; } - if (fdh->flags & ECORE_FD_ERROR) + if ((fdh->flags & ECORE_FD_ERROR) || (fdh->flags & ECORE_FD_ALWAYS)) { FD_SET(fdh->fd, &exfds); if (fdh->fd > max_fd) max_fd = fdh->fd; @@ -1851,7 +1861,11 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) if (ret < 0) { #ifndef _WIN32 - if (err_no == EINTR) return -1; + if (err_no == EINTR) + { + outval = -1; + goto BAIL; + } else if (err_no == EBADF) _ecore_main_fd_handlers_bads_rem(obj, pd); #endif } @@ -1890,13 +1904,22 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout) _ecore_try_add_to_call_list(obj, pd, fdh); } } + outval = 1; + goto BAIL; + } + outval = 0; +BAIL: + EINA_LIST_FOREACH(pd->always_fd_handlers, l, fdh) + _ecore_try_add_to_call_list(obj, pd, fdh); + + if (ret > 0) + { _ecore_main_fd_handlers_cleanup(obj, pd); #ifdef _WIN32 _ecore_main_win32_handlers_cleanup(obj, pd); #endif - return 1; } - return 0; + return outval || pd->always_fd_handlers; } #endif @@ -2017,6 +2040,8 @@ _ecore_main_fd_handlers_cleanup(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd) EINA_INLIST_GET(fdh)); if (fdh->file) pd->file_fd_handlers = eina_list_remove(pd->file_fd_handlers, fdh); + if (fdh->flags & ECORE_FD_ALWAYS) + pd->always_fd_handlers = eina_list_remove(pd->always_fd_handlers, fdh); ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE); ecore_fd_handler_mp_free(fdh); pd->fd_handlers_to_delete = eina_list_remove_list @@ -2074,7 +2099,8 @@ _ecore_main_fd_handlers_call(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd) { if ((fdh->read_active) || (fdh->write_active) || - (fdh->error_active)) + (fdh->error_active) || + (fdh->flags & ECORE_FD_ALWAYS)) { fdh->references++; if (!_ecore_call_fd_cb(fdh->func, fdh->data, fdh)) diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index 4e980d9123..2cb3b36d27 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -138,6 +138,7 @@ struct _Efl_Loop_Data Ecore_Fd_Handler *fd_handlers; Eina_List *fd_handlers_with_prep; Eina_List *file_fd_handlers; + Eina_List *always_fd_handlers; Eina_List *fd_handlers_with_buffer; Eina_List *fd_handlers_to_delete; Ecore_Fd_Handler *fd_handlers_to_call; From 87cf5188b466d3fa1e8c8ff7ad6d5039b28e298a Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 13 Feb 2019 14:58:10 +0000 Subject: [PATCH 43/87] ecore_wl2: Make our wayland socket handling thread safe By using the prepare read code properly we can do wayland dispatch of multiple queues in multiple threads. I'm not advocating we ever do so, but if a library (perhaps a gl implementation) wants to dispatch its own queue, and that happens in a separate thread from our event loop, we probably don't want the world to explode. Reviewed-by: Chris Michael Differential Revision: https://phab.enlightenment.org/D7915 --- src/lib/ecore_wl2/ecore_wl2_display.c | 73 +++++++++++++-------------- src/lib/ecore_wl2/ecore_wl2_private.h | 1 - 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index a3af818ca4..8699dfaace 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -10,7 +10,6 @@ static Eina_Hash *_server_displays = NULL; static Eina_Hash *_client_displays = NULL; -static Eina_Bool _cb_connect_idle(void *data); static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl); static Eina_Bool _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync); @@ -475,8 +474,6 @@ _recovery_timer_add(Ecore_Wl2_Display *ewd) Ecore_Wl2_Window *window; eina_hash_free_buckets(ewd->globals); - ecore_idle_enterer_del(ewd->idle_enterer); - ewd->idle_enterer = NULL; ecore_main_fd_handler_del(ewd->fd_hdl); ewd->fd_hdl = NULL; @@ -528,6 +525,30 @@ _begin_recovery_maybe(Ecore_Wl2_Display *ewd, int code) } } +static void +_cb_connect_pre(void *data, Ecore_Fd_Handler *hdl EINA_UNUSED) +{ + Ecore_Wl2_Display *ewd = data; + int ret = 0, code; + + while ((wl_display_prepare_read(ewd->wl.display) != 0) && (ret >= 0)) + ret = wl_display_dispatch_pending(ewd->wl.display); + + if (ret < 0) goto err; + + ret = wl_display_get_error(ewd->wl.display); + if (ret < 0) goto err; + + return; + +err: + code = errno; + if ((ret < 0) && (code != EAGAIN)) + { + _begin_recovery_maybe(ewd, code); + } +} + static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl) { @@ -536,17 +557,20 @@ _cb_connect_data(void *data, Ecore_Fd_Handler *hdl) if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_READ)) { - ret = wl_display_dispatch(ewd->wl.display); + ret = wl_display_read_events(ewd->wl.display); code = errno; if ((ret < 0) && (code != EAGAIN)) goto err; } + else + wl_display_cancel_read(ewd->wl.display); + wl_display_dispatch_pending(ewd->wl.display); if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_WRITE)) { ret = wl_display_flush(ewd->wl.display); code = errno; if (ret >= 0) - ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ); + ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ | ECORE_FD_ALWAYS); if ((ret < 0) && (code != EAGAIN)) goto err; } @@ -572,34 +596,6 @@ _cb_globals_hash_del(void *data) free(global); } -static Eina_Bool -_cb_connect_idle(void *data) -{ - Ecore_Wl2_Display *ewd = data; - int ret = 0, code; - - ret = wl_display_get_error(ewd->wl.display); - code = errno; - if (ret < 0) goto err; - - ret = wl_display_dispatch_pending(ewd->wl.display); - code = errno; - if (ret < 0) goto err; - - return ECORE_CALLBACK_RENEW; - -err: - if ((ret < 0) && (code != EAGAIN)) - { - ewd->idle_enterer = NULL; - _begin_recovery_maybe(ewd, code); - - return ECORE_CALLBACK_CANCEL; - } - - return ECORE_CALLBACK_RENEW; -} - static Ecore_Wl2_Global * _ecore_wl2_global_find(Ecore_Wl2_Display *ewd, const char *interface) { @@ -742,10 +738,11 @@ _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync) ewd->fd_hdl = ecore_main_fd_handler_add(wl_display_get_fd(ewd->wl.display), - ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR, - _cb_connect_data, ewd, NULL, NULL); + ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR | ECORE_FD_ALWAYS, + _cb_connect_data, ewd, NULL, ewd); - ewd->idle_enterer = ecore_idle_enterer_add(_cb_connect_idle, ewd); + ecore_main_fd_handler_prepare_callback_set + (ewd->fd_hdl, _cb_connect_pre, ewd); _ecore_wl2_display_event(ewd, ECORE_WL2_EVENT_CONNECT); return EINA_TRUE; @@ -768,8 +765,6 @@ _ecore_wl2_display_cleanup(Ecore_Wl2_Display *ewd) EINA_INLIST_FOREACH_SAFE(ewd->outputs, tmp, output) _ecore_wl2_output_del(output); - if (ewd->idle_enterer) ecore_idle_enterer_del(ewd->idle_enterer); - if (ewd->fd_hdl) ecore_main_fd_handler_del(ewd->fd_hdl); eina_hash_free(ewd->globals); @@ -1160,7 +1155,7 @@ ecore_wl2_display_flush(Ecore_Wl2_Display *display) if (code == EAGAIN) { ecore_main_fd_handler_active_set(display->fd_hdl, - (ECORE_FD_READ | ECORE_FD_WRITE)); + (ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ALWAYS)); return; } diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index e62ea5f8ea..9b6d4f7e49 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -102,7 +102,6 @@ struct _Ecore_Wl2_Display struct xkb_context *xkb_context; - Ecore_Idle_Enterer *idle_enterer; Ecore_Fd_Handler *fd_hdl; Eina_Hash *globals; From 56f06d21c19cddb056f6ced6822b275c08ebfc3a Mon Sep 17 00:00:00 2001 From: Thierry Date: Wed, 13 Feb 2019 11:28:01 -0500 Subject: [PATCH 44/87] ecore-x: only modify _ecore_key_grabs when key is toggled A New entry is added to _ecore_key_grabs even when no key was grabbed. Summary: The key grab and ungrab functions should return which keycode was used. Proposed by pascal@ordissimo.com Reviewers: zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7923 --- src/lib/ecore_x/ecore_x.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c index bab8a41f6d..ae357df542 100644 --- a/src/lib/ecore_x/ecore_x.c +++ b/src/lib/ecore_x/ecore_x.c @@ -1921,7 +1921,7 @@ struct _Keygrab }; Keygrab *_ecore_key_grabs = NULL; -static void +static KeyCode _ecore_x_window_key_grab_internal(Ecore_X_Window win, const char *key, int mod, @@ -1940,13 +1940,13 @@ _ecore_x_window_key_grab_internal(Ecore_X_Window win, { keysym = XStringToKeysym(key); if (keysym == NoSymbol) - return; + return 0; keycode = XKeysymToKeycode(_ecore_x_disp, keysym); } if (keycode == 0) - return; + return 0; m = _ecore_x_event_modifier(mod); if (any_mod) @@ -1966,6 +1966,7 @@ _ecore_x_window_key_grab_internal(Ecore_X_Window win, win, False, GrabModeAsync, GrabModeAsync); if (_ecore_xlib_sync) ecore_x_sync(); } + return keycode; } EAPI void @@ -1975,9 +1976,11 @@ ecore_x_window_key_grab(Ecore_X_Window win, int any_mod) { Keygrab *t; + KeyCode keycode; EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); - _ecore_x_window_key_grab_internal(win, key, mod, any_mod); + if (!(keycode = _ecore_x_window_key_grab_internal(win, key, mod, any_mod))) + return; _ecore_key_grabs_num++; t = realloc(_ecore_key_grabs, _ecore_key_grabs_num * sizeof(Keygrab)); @@ -2034,7 +2037,7 @@ _ecore_x_key_grab_remove(Ecore_X_Window win, return shuffle; } -static void +static KeyCode _ecore_x_window_key_ungrab_internal(Ecore_X_Window win, const char *key, int mod, @@ -2053,13 +2056,13 @@ _ecore_x_window_key_ungrab_internal(Ecore_X_Window win, { keysym = XStringToKeysym(key); if (keysym == NoSymbol) - return; + return 0; keycode = XKeysymToKeycode(_ecore_x_disp, keysym); } if (keycode == 0) - return; + return 0; m = _ecore_x_event_modifier(mod); if (any_mod) @@ -2075,6 +2078,7 @@ _ecore_x_window_key_ungrab_internal(Ecore_X_Window win, locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL; for (i = 0; i < 8; i++) XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win); + return keycode; } EAPI void From 6b7346b7b2b0db05e76cc217966d3304e4cbc41a Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Wed, 13 Feb 2019 11:58:33 +0100 Subject: [PATCH 45/87] Remove individual class BETA guards Summary: Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged as @beta. This means that any app (and the EFL code) wanting to use BETA features has to enable them class by class, which is cumbersome. This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT guard, so apps only need to define one symbol to access BETA features. Any usage of the per-class guards has been removed from the EFL code and examples. When building EFL the global guard is defined by configure, so all EFL methods already have access to BETA API. Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to use BETA API have to define this symbol before including any EFL header (It has been added to the examples requiring it). Test Plan: make && make check && make examples still work, but there's a lot less #defines in the code Reviewers: zmike, bu5hm4n, q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T6788 Differential Revision: https://phab.enlightenment.org/D7924 --- src/bin/eolian/headers.c | 10 +++++----- src/examples/ecore/ecore_promise2_example.c | 1 + src/examples/ecore/efl_io_buffered_stream_example.c | 1 + src/examples/ecore/efl_io_copier_example.c | 1 + src/examples/ecore/efl_io_copier_simple_example.c | 1 + src/examples/ecore/efl_io_queue_example.c | 1 + src/examples/ecore/efl_net_control_example.c | 1 + src/examples/ecore/efl_net_dialer_http_example.c | 1 + src/examples/ecore/efl_net_dialer_simple_example.c | 1 + src/examples/ecore/efl_net_dialer_udp_example.c | 1 + src/examples/ecore/efl_net_dialer_unix_example.c | 1 + .../ecore/efl_net_dialer_websocket_autobahntestee.c | 1 + .../ecore/efl_net_dialer_websocket_example.c | 1 + src/examples/ecore/efl_net_server_example.c | 1 + src/examples/ecore/efl_net_server_simple_example.c | 1 + src/examples/ecore/efl_net_session_example.c | 1 + .../ecore/efl_net_socket_ssl_dialer_example.c | 1 + .../ecore/efl_net_socket_ssl_server_example.c | 1 + src/lib/edje/edje_calc.c | 1 - src/lib/edje/edje_edit.c | 1 - src/lib/edje/edje_private.h | 1 - src/lib/edje/edje_smart.c | 1 - src/lib/efl/interfaces/efl_interfaces_main.c | 2 -- src/lib/eio/eio_sentry.c | 1 - src/lib/elementary/efl_access_action.c | 1 - src/lib/elementary/efl_access_component.c | 1 - src/lib/elementary/efl_access_widget_action.c | 1 - src/lib/elementary/efl_ui_anchor_popup.c | 1 - src/lib/elementary/efl_ui_dnd.c | 1 - src/lib/elementary/efl_ui_grid.c | 1 - src/lib/elementary/efl_ui_image_zoomable.c | 1 - src/lib/elementary/efl_ui_internal_text_scroller.c | 1 - src/lib/elementary/efl_ui_list.c | 1 - src/lib/elementary/efl_ui_list_view.c | 1 - src/lib/elementary/efl_ui_scroll_alert_popup.c | 1 - src/lib/elementary/efl_ui_scroll_manager.c | 1 - src/lib/elementary/efl_ui_scroller.c | 1 - src/lib/elementary/efl_ui_selection.c | 1 - src/lib/elementary/efl_ui_tab_bar.c | 1 - src/lib/elementary/efl_ui_tab_pager.c | 1 - src/lib/elementary/efl_ui_widget.c | 1 - src/lib/elementary/efl_ui_win.c | 3 --- src/lib/elementary/elc_ctxpopup.c | 1 - src/lib/elementary/elc_fileselector.c | 1 - src/lib/elementary/elc_fileselector_button.c | 1 - src/lib/elementary/elc_fileselector_entry.c | 1 - src/lib/elementary/elementary_config.h | 10 ---------- src/lib/elementary/elm_atspi_bridge.c | 1 - src/lib/elementary/elm_interface_fileselector.c | 1 - src/lib/emotion/emotion_smart.c | 1 - src/lib/evas/canvas/evas_callbacks.c | 2 -- src/lib/evas/canvas/evas_image_legacy.c | 1 - src/lib/evas/canvas/evas_main.c | 1 - src/lib/evas/canvas/evas_object_box.c | 1 - src/lib/evas/canvas/evas_object_main.c | 1 - src/lib/evas/canvas/evas_object_smart.c | 1 - src/lib/evas/canvas/evas_object_table.c | 2 -- src/lib/evas/canvas/evas_object_textblock.c | 1 - src/tests/eolian/data/class_simple_ref_eo.h | 12 ++++++------ 59 files changed, 28 insertions(+), 65 deletions(-) diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c index 70520fc7a2..472043b649 100644 --- a/src/bin/eolian/headers.c +++ b/src/bin/eolian/headers.c @@ -92,7 +92,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid, /* this one will never be satisfied in legacy */ if (eolian_function_is_beta(fid)) - eina_strbuf_append_printf(buf, "#ifdef %s_BETA\n", cnameu); + eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); /* XXX: is this right? we expose potentially internal stuff into legacy */ if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED)) eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu); @@ -174,10 +174,10 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid, } eina_strbuf_append(buf, ";\n"); - if (eolian_function_is_beta(fid)) - eina_strbuf_append_printf(buf, "#endif\n"); if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED)) eina_strbuf_append_printf(buf, "#endif\n"); + if (eolian_function_is_beta(fid)) + eina_strbuf_append_printf(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); } void @@ -267,7 +267,7 @@ events: if (eolian_event_is_beta(ev)) { - eina_strbuf_append_printf(buf, "\n#ifdef %s_BETA\n", cnameu); + eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); } if (evs == EOLIAN_SCOPE_PROTECTED) { @@ -292,7 +292,7 @@ events: if (evs == EOLIAN_SCOPE_PROTECTED) eina_strbuf_append(buf, "#endif\n"); if (eolian_event_is_beta(ev)) - eina_strbuf_append(buf, "#endif\n"); + eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); eina_stringshare_del(evn); } diff --git a/src/examples/ecore/ecore_promise2_example.c b/src/examples/ecore/ecore_promise2_example.c index bdf153d7ba..a88b1ff13e 100644 --- a/src/examples/ecore/ecore_promise2_example.c +++ b/src/examples/ecore/ecore_promise2_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT 1 #include #include #include diff --git a/src/examples/ecore/efl_io_buffered_stream_example.c b/src/examples/ecore/efl_io_buffered_stream_example.c index 3338bae396..c7fe102890 100644 --- a/src/examples/ecore/efl_io_buffered_stream_example.c +++ b/src/examples/ecore/efl_io_buffered_stream_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include diff --git a/src/examples/ecore/efl_io_copier_example.c b/src/examples/ecore/efl_io_copier_example.c index b7e526bd3c..25a81140bd 100644 --- a/src/examples/ecore/efl_io_copier_example.c +++ b/src/examples/ecore/efl_io_copier_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_io_copier_simple_example.c b/src/examples/ecore/efl_io_copier_simple_example.c index ee945cce7b..0a1fd65297 100644 --- a/src/examples/ecore/efl_io_copier_simple_example.c +++ b/src/examples/ecore/efl_io_copier_simple_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include static void diff --git a/src/examples/ecore/efl_io_queue_example.c b/src/examples/ecore/efl_io_queue_example.c index 9367716729..62e6035450 100644 --- a/src/examples/ecore/efl_io_queue_example.c +++ b/src/examples/ecore/efl_io_queue_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include diff --git a/src/examples/ecore/efl_net_control_example.c b/src/examples/ecore/efl_net_control_example.c index 3053c87cad..408ea8e6c9 100644 --- a/src/examples/ecore/efl_net_control_example.c +++ b/src/examples/ecore/efl_net_control_example.c @@ -1,6 +1,7 @@ #ifdef HAVE_SYS_SOCKET_H #include #endif +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_dialer_http_example.c b/src/examples/ecore/efl_net_dialer_http_example.c index f1a97eefe9..70861dc438 100644 --- a/src/examples/ecore/efl_net_dialer_http_example.c +++ b/src/examples/ecore/efl_net_dialer_http_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_dialer_simple_example.c b/src/examples/ecore/efl_net_dialer_simple_example.c index 219da892f1..1285dae2f1 100644 --- a/src/examples/ecore/efl_net_dialer_simple_example.c +++ b/src/examples/ecore/efl_net_dialer_simple_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_dialer_udp_example.c b/src/examples/ecore/efl_net_dialer_udp_example.c index 3b13a60ca7..bb01b58f8a 100644 --- a/src/examples/ecore/efl_net_dialer_udp_example.c +++ b/src/examples/ecore/efl_net_dialer_udp_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_dialer_unix_example.c b/src/examples/ecore/efl_net_dialer_unix_example.c index b610dd42a6..f0298aed4a 100644 --- a/src/examples/ecore/efl_net_dialer_unix_example.c +++ b/src/examples/ecore/efl_net_dialer_unix_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_dialer_websocket_autobahntestee.c b/src/examples/ecore/efl_net_dialer_websocket_autobahntestee.c index fd0c09818c..037a0aca52 100644 --- a/src/examples/ecore/efl_net_dialer_websocket_autobahntestee.c +++ b/src/examples/ecore/efl_net_dialer_websocket_autobahntestee.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_dialer_websocket_example.c b/src/examples/ecore/efl_net_dialer_websocket_example.c index e0b72e4991..e46a8c78a9 100644 --- a/src/examples/ecore/efl_net_dialer_websocket_example.c +++ b/src/examples/ecore/efl_net_dialer_websocket_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_server_example.c b/src/examples/ecore/efl_net_server_example.c index d98e66bb35..b599336960 100644 --- a/src/examples/ecore/efl_net_server_example.c +++ b/src/examples/ecore/efl_net_server_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_server_simple_example.c b/src/examples/ecore/efl_net_server_simple_example.c index a68e9b9fb9..6477ad2a3d 100644 --- a/src/examples/ecore/efl_net_server_simple_example.c +++ b/src/examples/ecore/efl_net_server_simple_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_session_example.c b/src/examples/ecore/efl_net_session_example.c index 683f3414e0..fbefb21791 100644 --- a/src/examples/ecore/efl_net_session_example.c +++ b/src/examples/ecore/efl_net_session_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include diff --git a/src/examples/ecore/efl_net_socket_ssl_dialer_example.c b/src/examples/ecore/efl_net_socket_ssl_dialer_example.c index 45dc189d09..0bc77c3477 100644 --- a/src/examples/ecore/efl_net_socket_ssl_dialer_example.c +++ b/src/examples/ecore/efl_net_socket_ssl_dialer_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/examples/ecore/efl_net_socket_ssl_server_example.c b/src/examples/ecore/efl_net_socket_ssl_server_example.c index 2babc8b6a0..33b67d2b21 100644 --- a/src/examples/ecore/efl_net_socket_ssl_server_example.c +++ b/src/examples/ecore/efl_net_socket_ssl_server_example.c @@ -1,3 +1,4 @@ +#define EFL_BETA_API_SUPPORT #include #include #include diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index cdfcc81732..f09265f37b 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -1,4 +1,3 @@ -#define EFL_GFX_FILTER_BETA #define EFL_GFX_SIZE_HINT_PROTECTED #include "edje_private.h" diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 859fcc2851..010b1aff6b 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -9,7 +9,6 @@ #define _EDJE_EDIT_EO_CLASS_TYPE #define EFL_CANVAS_GROUP_PROTECTED -#define EFL_CANVAS_GROUP_BETA #include "edje_private.h" diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index 98311b8525..25a00022b4 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -40,7 +40,6 @@ #endif // auto_unref -#define EFL_CANVAS_LAYOUT_BETA #define EFL_CANVAS_OBJECT_PROTECTED #define EFL_LAYOUT_CALC_PROTECTED diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index 5a715b35ed..b7ca9c02d2 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -1,5 +1,4 @@ #define EFL_CANVAS_GROUP_PROTECTED -#define EFL_CANVAS_GROUP_BETA #define EFL_PART_PROTECTED #include "edje_private.h" diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 75ffcd984c..aee86025d6 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -2,9 +2,7 @@ # include #endif -#define EFL_CANVAS_SCENE_BETA #define EFL_UI_SCROLLBAR_PROTECTED -#define EFL_UI_SCROLLBAR_BETA #define EFL_PART_PROTECTED #include "eo_internal.h" diff --git a/src/lib/eio/eio_sentry.c b/src/lib/eio/eio_sentry.c index 84b958f694..20ca327282 100644 --- a/src/lib/eio/eio_sentry.c +++ b/src/lib/eio/eio_sentry.c @@ -21,7 +21,6 @@ # include #endif -#define EIO_SENTRY_BETA 1 #include #include "Ecore.h" diff --git a/src/lib/elementary/efl_access_action.c b/src/lib/elementary/efl_access_action.c index 8e56d79fd2..da5cd1b4e2 100644 --- a/src/lib/elementary/efl_access_action.c +++ b/src/lib/elementary/efl_access_action.c @@ -3,7 +3,6 @@ #endif #define EFL_ACCESS_ACTION_PROTECTED -#define EFL_ACCESS_ACTION_BETA #include #include "elm_widget.h" diff --git a/src/lib/elementary/efl_access_component.c b/src/lib/elementary/efl_access_component.c index f4a3c653bc..83f7640249 100644 --- a/src/lib/elementary/efl_access_component.c +++ b/src/lib/elementary/efl_access_component.c @@ -3,7 +3,6 @@ #endif #define EFL_ACCESS_COMPONENT_PROTECTED -#define EFL_ACCESS_COMPONENT_BETA #define EFL_ACCESS_OBJECT_PROTECTED #include diff --git a/src/lib/elementary/efl_access_widget_action.c b/src/lib/elementary/efl_access_widget_action.c index bb0c920f49..47b2f2724a 100644 --- a/src/lib/elementary/efl_access_widget_action.c +++ b/src/lib/elementary/efl_access_widget_action.c @@ -4,7 +4,6 @@ #define EFL_ACCESS_ACTION_PROTECTED #define EFL_ACCESS_WIDGET_ACTION_PROTECTED -#define EFL_ACCESS_ACTION_BETA #include #include "elm_widget.h" diff --git a/src/lib/elementary/efl_ui_anchor_popup.c b/src/lib/elementary/efl_ui_anchor_popup.c index 9b0e9c680d..88e2269826 100644 --- a/src/lib/elementary/efl_ui_anchor_popup.c +++ b/src/lib/elementary/efl_ui_anchor_popup.c @@ -3,7 +3,6 @@ #endif #define EFL_UI_POPUP_PROTECTED -#define EFL_UI_ANCHOR_POPUP_BETA #include diff --git a/src/lib/elementary/efl_ui_dnd.c b/src/lib/elementary/efl_ui_dnd.c index 4ed23e7d76..df79eb9762 100644 --- a/src/lib/elementary/efl_ui_dnd.c +++ b/src/lib/elementary/efl_ui_dnd.c @@ -7,7 +7,6 @@ #define ELM_INTERFACE_ATSPI_TEXT_EDITABLE_PROTECTED #define ELM_LAYOUT_PROTECTED -#define EFL_UI_SELECTION_MANAGER_BETA #include #include diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c index 4db9968d90..c9ecd825b5 100644 --- a/src/lib/elementary/efl_ui_grid.c +++ b/src/lib/elementary/efl_ui_grid.c @@ -5,7 +5,6 @@ #define ELM_LAYOUT_PROTECTED #define EFL_UI_SCROLL_MANAGER_PROTECTED #define EFL_UI_SCROLLBAR_PROTECTED -#define EFL_UI_SCROLLBAR_BETA #include #include "elm_priv.h" diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index 9590838c1e..16876a068c 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -6,7 +6,6 @@ #define EFL_ACCESS_WIDGET_ACTION_PROTECTED #define EFL_UI_SCROLL_MANAGER_PROTECTED #define EFL_UI_SCROLLBAR_PROTECTED -#define EFL_UI_SCROLLBAR_BETA #include diff --git a/src/lib/elementary/efl_ui_internal_text_scroller.c b/src/lib/elementary/efl_ui_internal_text_scroller.c index 9ff9934b79..237343a024 100644 --- a/src/lib/elementary/efl_ui_internal_text_scroller.c +++ b/src/lib/elementary/efl_ui_internal_text_scroller.c @@ -5,7 +5,6 @@ #define ELM_LAYOUT_PROTECTED #define EFL_UI_SCROLL_MANAGER_PROTECTED #define EFL_UI_SCROLLBAR_PROTECTED -#define EFL_UI_SCROLLBAR_BETA #ifdef HAVE_CONFIG_H # include "elementary_config.h" diff --git a/src/lib/elementary/efl_ui_list.c b/src/lib/elementary/efl_ui_list.c index 1a0f9aa812..e7d4bfced9 100644 --- a/src/lib/elementary/efl_ui_list.c +++ b/src/lib/elementary/efl_ui_list.c @@ -5,7 +5,6 @@ #define ELM_LAYOUT_PROTECTED #define EFL_UI_SCROLL_MANAGER_PROTECTED #define EFL_UI_SCROLLBAR_PROTECTED -#define EFL_UI_SCROLLBAR_BETA #include #include "elm_priv.h" diff --git a/src/lib/elementary/efl_ui_list_view.c b/src/lib/elementary/efl_ui_list_view.c index 5481803e4e..fe454690a0 100644 --- a/src/lib/elementary/efl_ui_list_view.c +++ b/src/lib/elementary/efl_ui_list_view.c @@ -5,7 +5,6 @@ #define EFL_ACCESS_SELECTION_PROTECTED #define EFL_UI_SCROLL_MANAGER_PROTECTED #define EFL_UI_SCROLLBAR_PROTECTED -#define EFL_UI_SCROLLBAR_BETA #define EFL_UI_FOCUS_COMPOSITION_PROTECTED #define EFL_UI_WIDGET_FOCUS_MANAGER_PROTECTED diff --git a/src/lib/elementary/efl_ui_scroll_alert_popup.c b/src/lib/elementary/efl_ui_scroll_alert_popup.c index 3e7c8d9b5e..d23e2919b3 100644 --- a/src/lib/elementary/efl_ui_scroll_alert_popup.c +++ b/src/lib/elementary/efl_ui_scroll_alert_popup.c @@ -2,7 +2,6 @@ # include "elementary_config.h" #endif -#define EFL_UI_SCROLL_ALERT_POPUP_BETA #define EFL_PART_PROTECTED #include diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c index d88e0d4b15..866b79e11c 100644 --- a/src/lib/elementary/efl_ui_scroll_manager.c +++ b/src/lib/elementary/efl_ui_scroll_manager.c @@ -4,7 +4,6 @@ #define EFL_UI_SCROLL_MANAGER_PROTECTED #define EFL_UI_SCROLLBAR_PROTECTED -#define EFL_UI_SCROLLBAR_BETA #include #include "elm_priv.h" diff --git a/src/lib/elementary/efl_ui_scroller.c b/src/lib/elementary/efl_ui_scroller.c index ef8cc1a52b..be2e773bc4 100644 --- a/src/lib/elementary/efl_ui_scroller.c +++ b/src/lib/elementary/efl_ui_scroller.c @@ -5,7 +5,6 @@ #define ELM_LAYOUT_PROTECTED #define EFL_UI_SCROLL_MANAGER_PROTECTED #define EFL_UI_SCROLLBAR_PROTECTED -#define EFL_UI_SCROLLBAR_BETA #include #include "elm_priv.h" diff --git a/src/lib/elementary/efl_ui_selection.c b/src/lib/elementary/efl_ui_selection.c index 2fd60c4a38..675eb0cf99 100644 --- a/src/lib/elementary/efl_ui_selection.c +++ b/src/lib/elementary/efl_ui_selection.c @@ -2,7 +2,6 @@ # include "elementary_config.h" #endif -#define EFL_UI_SELECTION_MANAGER_BETA #include #include "elm_priv.h" diff --git a/src/lib/elementary/efl_ui_tab_bar.c b/src/lib/elementary/efl_ui_tab_bar.c index f7b37f3799..f191f87e02 100644 --- a/src/lib/elementary/efl_ui_tab_bar.c +++ b/src/lib/elementary/efl_ui_tab_bar.c @@ -2,7 +2,6 @@ # include "elementary_config.h" #endif -#define EFL_UI_TAB_BAR_BETA #include #include "elm_priv.h" diff --git a/src/lib/elementary/efl_ui_tab_pager.c b/src/lib/elementary/efl_ui_tab_pager.c index 5fbae19c3c..45758cbc98 100644 --- a/src/lib/elementary/efl_ui_tab_pager.c +++ b/src/lib/elementary/efl_ui_tab_pager.c @@ -2,7 +2,6 @@ # include "elementary_config.h" #endif -#define EFL_UI_TAB_BAR_BETA #include #include "elm_priv.h" diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 67a2a01bba..5840051086 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -6,7 +6,6 @@ #define EFL_ACCESS_COMPONENT_PROTECTED #define ELM_WIDGET_PROTECTED #define ELM_WIDGET_ITEM_PROTECTED -#define EFL_CANVAS_OBJECT_BETA #define EFL_INPUT_EVENT_PROTECTED #define EFL_UI_L10N_PROTECTED #define EFL_UI_FOCUS_OBJECT_PROTECTED diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 74d741f4e2..442194e1cb 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -7,13 +7,10 @@ #define EFL_ACCESS_WIDGET_ACTION_PROTECTED #define EFL_INPUT_EVENT_PROTECTED #define EFL_GFX_SIZE_HINT_PROTECTED -#define EFL_CANVAS_OBJECT_BETA #define EFL_CANVAS_OBJECT_PROTECTED #define EFL_UI_L10N_PROTECTED #define EFL_UI_WIN_INLINED_PROTECTED #define EFL_UI_FOCUS_OBJECT_PROTECTED -#define EFL_UI_WIN_BETA -#define EFL_CANVAS_SCENE_BETA #define EFL_UI_WIDGET_FOCUS_MANAGER_PROTECTED #define EFL_PART_PROTECTED #define IPA_YLNO_ESU_LANRETNI_MLE diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c index fd8a4337e5..dabc798777 100644 --- a/src/lib/elementary/elc_ctxpopup.c +++ b/src/lib/elementary/elc_ctxpopup.c @@ -5,7 +5,6 @@ #define EFL_ACCESS_OBJECT_PROTECTED #define EFL_ACCESS_WIDGET_ACTION_PROTECTED #define EFL_UI_WIDGET_PROTECTED -//#define EFL_UI_WIDGET_BETA #define ELM_WIDGET_ITEM_PROTECTED #define EFL_UI_L10N_PROTECTED #define EFL_PART_PROTECTED diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c index 0001287ca7..6dabb93164 100644 --- a/src/lib/elementary/elc_fileselector.c +++ b/src/lib/elementary/elc_fileselector.c @@ -11,7 +11,6 @@ #define EFL_ACCESS_OBJECT_PROTECTED #define EFL_ACCESS_WIDGET_ACTION_PROTECTED -#define ELM_INTERFACE_FILESELECTOR_BETA #define EFL_PART_PROTECTED #define EFL_UI_FOCUS_COMPOSITION_PROTECTED diff --git a/src/lib/elementary/elc_fileselector_button.c b/src/lib/elementary/elc_fileselector_button.c index 82b9c699f2..6724a0e080 100644 --- a/src/lib/elementary/elc_fileselector_button.c +++ b/src/lib/elementary/elc_fileselector_button.c @@ -3,7 +3,6 @@ #endif #define EFL_ACCESS_OBJECT_PROTECTED -#define ELM_INTERFACE_FILESELECTOR_BETA #include #include "Eio_Eo.h" diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c index 1a963bd6d8..0c0290ea88 100644 --- a/src/lib/elementary/elc_fileselector_entry.c +++ b/src/lib/elementary/elc_fileselector_entry.c @@ -4,7 +4,6 @@ #endif #define EFL_ACCESS_OBJECT_PROTECTED -#define ELM_INTERFACE_FILESELECTOR_BETA #define EFL_PART_PROTECTED #include diff --git a/src/lib/elementary/elementary_config.h b/src/lib/elementary/elementary_config.h index c726711d94..9bff045c04 100644 --- a/src/lib/elementary/elementary_config.h +++ b/src/lib/elementary/elementary_config.h @@ -11,17 +11,7 @@ #if defined(ELEMENTARY_BUILD) || defined(ELM_INTERNAL_API_ARGESFSDFEFC) #define EFL_UI_WIDGET_PROTECTED -#define EFL_UI_WIDGET_BETA #define EFL_CANVAS_OBJECT_PROTECTED #define EFL_CANVAS_GROUP_PROTECTED -#define EFL_CANVAS_GROUP_BETA -#define EFL_ACCESS_OBJECT_BETA -#define EFL_ACCESS_COMPONENT_BETA -#define EFL_ACCESS_EDITABLE_TEXT_BETA -#define EFL_ACCESS_IMAGE_BETA -#define EFL_ACCESS_SELECTION_BETA -#define EFL_ACCESS_TEXT_BETA -#define EFL_ACCESS_VALUE_BETA -#define EFL_ACCESS_WIDGET_ACTION_BETA #define EFL_UI_FOCUS_OBJECT_PROTECTED #endif diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index 91ad3dfc93..4b1eb17609 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -10,7 +10,6 @@ #define EFL_ACCESS_TEXT_PROTECTED #define EFL_ACCESS_EDITABLE_TEXT_PROTECTED -#define EFL_ACCESS_ACTION_BETA #include "atspi/atspi-constants.h" diff --git a/src/lib/elementary/elm_interface_fileselector.c b/src/lib/elementary/elm_interface_fileselector.c index 091911100a..cd2c1957c6 100644 --- a/src/lib/elementary/elm_interface_fileselector.c +++ b/src/lib/elementary/elm_interface_fileselector.c @@ -2,7 +2,6 @@ # include "elementary_config.h" #endif -#define ELM_INTERFACE_FILESELECTOR_BETA #include #include "Eio_Eo.h" diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index 8e59f0ac6b..ed5eb36f34 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c @@ -4,7 +4,6 @@ #define EFL_CANVAS_OBJECT_PROTECTED #define EFL_CANVAS_GROUP_PROTECTED -#define EFL_CANVAS_GROUP_BETA #include #include diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c index 2cd1f51fd9..6c55790d1c 100644 --- a/src/lib/evas/canvas/evas_callbacks.c +++ b/src/lib/evas/canvas/evas_callbacks.c @@ -1,5 +1,3 @@ -#define EFL_CANVAS_OBJECT_BETA -#define EVAS_CANVAS_BETA #include "evas_common_private.h" #include "evas_private.h" diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c index 9891a68b15..75f4c2cfc0 100644 --- a/src/lib/evas/canvas/evas_image_legacy.c +++ b/src/lib/evas/canvas/evas_image_legacy.c @@ -1,4 +1,3 @@ -#define EFL_CANVAS_OBJECT_BETA #include "evas_image_private.h" #include "evas_image.eo.h" diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 0d574c5418..1c70871c96 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -1,4 +1,3 @@ -#define EVAS_CANVAS_BETA #define EFL_INPUT_EVENT_PROTECTED #include "evas_common_private.h" diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index fb8177639f..49647136f0 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -1,5 +1,4 @@ #define EFL_CANVAS_GROUP_PROTECTED -#define EFL_CANVAS_GROUP_BETA #include "evas_common_private.h" #include "evas_private.h" diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 8f218fa8c2..aa0ac8359a 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -1,5 +1,4 @@ #define EFL_CANVAS_OBJECT_PROTECTED -#define EFL_CANVAS_OBJECT_BETA #define EFL_GFX_SIZE_HINT_PROTECTED #include "evas_common_private.h" diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index a5ff430772..03e036beab 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -1,5 +1,4 @@ #define EFL_CANVAS_GROUP_PROTECTED -#define EFL_CANVAS_GROUP_BETA #include "evas_common_private.h" #include "evas_private.h" diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c index bc18487e95..fb49c4abc4 100644 --- a/src/lib/evas/canvas/evas_object_table.c +++ b/src/lib/evas/canvas/evas_object_table.c @@ -1,6 +1,4 @@ -#define EFL_CANVAS_OBJECT_BETA #define EFL_CANVAS_GROUP_PROTECTED -#define EFL_CANVAS_GROUP_BETA #include "evas_common_private.h" #include "evas_private.h" diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index e73bea08ab..578db6427f 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -62,7 +62,6 @@ * @todo write @ref textblock_layout */ -#define EFL_CANVAS_OBJECT_BETA #define EFL_CANVAS_FILTER_INTERNAL_PROTECTED #include "evas_common_private.h" diff --git a/src/tests/eolian/data/class_simple_ref_eo.h b/src/tests/eolian/data/class_simple_ref_eo.h index 16a690decc..1b63422e7b 100644 --- a/src/tests/eolian/data/class_simple_ref_eo.h +++ b/src/tests/eolian/data/class_simple_ref_eo.h @@ -41,7 +41,7 @@ EWAPI extern long BAZ; EWAPI const Efl_Class *class_simple_class_get(void); -#ifdef CLASS_SIMPLE_BETA +#ifdef EFL_BETA_API_SUPPORT /** * @brief Common desc for a * @@ -55,9 +55,9 @@ EWAPI const Efl_Class *class_simple_class_get(void); * @ingroup Class_Simple */ EOAPI Eina_Bool efl_canvas_object_simple_a_set(Eo *obj, int value); -#endif +#endif /* EFL_BETA_API_SUPPORT */ -#ifdef CLASS_SIMPLE_BETA +#ifdef EFL_BETA_API_SUPPORT /** * @brief Common desc for a * @@ -68,11 +68,11 @@ EOAPI Eina_Bool efl_canvas_object_simple_a_set(Eo *obj, int value); * @ingroup Class_Simple */ EOAPI int efl_canvas_object_simple_a_get(const Eo *obj); -#endif +#endif /* EFL_BETA_API_SUPPORT */ EOAPI void efl_canvas_object_simple_b_set(Eo *obj); -#ifdef CLASS_SIMPLE_BETA +#ifdef EFL_BETA_API_SUPPORT /** * @brief comment foo * @@ -87,7 +87,7 @@ EOAPI void efl_canvas_object_simple_b_set(Eo *obj); * @ingroup Class_Simple */ EOAPI char *efl_canvas_object_simple_foo(Eo *obj, int a, char *b, double *c, int *d); -#endif +#endif /* EFL_BETA_API_SUPPORT */ EOAPI int *efl_canvas_object_simple_bar(Eo *obj, int x); From 19fcd6e60fdb702ea0db4a9884c4822e624ecde4 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Wed, 13 Feb 2019 18:12:59 +0100 Subject: [PATCH 46/87] eolian: allow tagging complete classes as BETA Summary: This allows using the @beta tag in classes, like this: class @beta Efl.Foo extends Efl.Bar { ... } This will surround the class definition in the .eo.h file with an EFL_BETA_API_SUPPORT #define, equivalent to tag every method and event with @beta. Test Plan: Nothing changes since no class uses this tag yet Reviewers: q66, bu5hm4n, zmike Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7933 --- src/bin/eolian/headers.c | 8 ++++++++ src/lib/eolian/Eolian.h | 10 ++++++++++ src/lib/eolian/database_class_api.c | 7 +++++++ src/lib/eolian/eo_parser.c | 5 +++++ src/lib/eolian/eolian_database.h | 1 + 5 files changed, 31 insertions(+) diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c index 472043b649..7fbd576082 100644 --- a/src/bin/eolian/headers.c +++ b/src/bin/eolian/headers.c @@ -192,6 +192,10 @@ eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, /* class definition */ + if (!legacy && eolian_class_is_beta(cl)) + { + eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); + } if (!legacy) { const Eolian_Documentation *doc = eolian_class_documentation_get(cl); @@ -298,6 +302,10 @@ events: } eina_iterator_free(itr); } + if (!legacy && eolian_class_is_beta(cl)) + { + eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); + } free(cname); free(cnameu); diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index fc28058c6b..0320da2010 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -2298,6 +2298,16 @@ EAPI Eina_Stringshare *eolian_class_c_name_get(const Eolian_Class *klass); */ EAPI Eina_Stringshare *eolian_class_c_data_type_get(const Eolian_Class *klass); +/* + * @brief Get whether a class is beta. + * + * @param[in] klass the class + * @return EINA_TRUE if the class has been marked as BETA + * + * @ingroup Eolian + */ +EAPI Eina_Bool eolian_class_is_beta(const Eolian_Class *klass); + /* * @brief Get the type of a type declaration. * diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c index f79cdb800b..73d013672b 100644 --- a/src/lib/eolian/database_class_api.c +++ b/src/lib/eolian/database_class_api.c @@ -228,3 +228,10 @@ eolian_class_c_data_type_get(const Eolian_Class *cl) *p = '_'; return eina_stringshare_add(buf); } + +EAPI Eina_Bool +eolian_class_is_beta(const Eolian_Class *cl) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(cl, EINA_FALSE); + return cl->is_beta; +} diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index fe5d153962..4346b3432d 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -2093,6 +2093,11 @@ parse_class(Eo_Lexer *ls, Eolian_Class_Type type) eo_lexer_get(ls); ls->klass->type = type; eo_lexer_context_push(ls); + if (ls->t.kw == KW_at_beta) + { + ls->klass->is_beta = EINA_TRUE; + eo_lexer_get(ls); + } parse_name(ls, buf); bnm = eina_stringshare_ref(ls->filename); fnm = database_class_to_filename(eina_strbuf_string_get(buf)); diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index d0d7873fdd..b70f2b4f1e 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -196,6 +196,7 @@ struct _Eolian_Class Eina_List *callables; /* internal for now */ Eina_Bool class_ctor_enable:1; Eina_Bool class_dtor_enable:1; + Eina_Bool is_beta :1; }; struct _Eolian_Function From 1cdedaa33b25b95f5305fb808c20526ced763110 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Wed, 13 Feb 2019 04:06:36 +0000 Subject: [PATCH 47/87] ecore_con: Fix potentional problems around ecore_con non-thread safe functions are used like rand(), strerror(). this patch replace them with thread safe one. and also this patch contains a change to fix a memory leak problem. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7917 --- src/lib/ecore_con/ecore_con.c | 6 +++--- src/lib/ecore_con/ecore_con_legacy.c | 2 +- src/lib/ecore_con/ecore_con_local.c | 4 ++-- src/lib/ecore_con/ecore_con_url.c | 2 +- src/lib/ecore_con/efl_net_dialer_http.c | 2 +- src/lib/ecore_con/efl_net_server_fd.c | 6 +++--- src/lib/ecore_con/efl_net_server_udp.c | 9 +++++++-- src/lib/ecore_con/efl_net_socket_udp.c | 2 +- src/lib/ecore_con/efl_net_ssl_ctx-gnutls.c | 2 +- src/lib/ecore_con/efl_net_ssl_ctx-openssl.c | 2 +- 10 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c index 5a305d0ab4..7c6e93e62f 100644 --- a/src/lib/ecore_con/ecore_con.c +++ b/src/lib/ecore_con/ecore_con.c @@ -201,7 +201,7 @@ efl_net_unix_fmt(char *buf, size_t buflen, SOCKET fd, const struct sockaddr_un * int r = snprintf(buf, buflen, "unnamed:" SOCKET_FMT, fd); if (r < 0) { - ERR("snprintf(): %s", strerror(errno)); + ERR("snprintf(): %s", eina_error_msg_get(errno)); return EINA_FALSE; } else if ((size_t)r > buflen) @@ -330,7 +330,7 @@ efl_net_ip_port_fmt(char *buf, size_t buflen, const struct sockaddr *addr) if (!inet_ntop(addr->sa_family, mem, p, sizeof(p))) { ERR("inet_ntop(%d, %p, %p, %zd): %s", - addr->sa_family, mem, p, sizeof(p), strerror(errno)); + addr->sa_family, mem, p, sizeof(p), eina_error_msg_get(errno)); return EINA_FALSE; } @@ -341,7 +341,7 @@ efl_net_ip_port_fmt(char *buf, size_t buflen, const struct sockaddr *addr) if (r < 0) { - ERR("could not snprintf(): %s", strerror(errno)); + ERR("could not snprintf(): %s", eina_error_msg_get(errno)); return EINA_FALSE; } else if ((size_t)r > buflen) diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c index 1ac6c2ac15..0e241b7fa9 100644 --- a/src/lib/ecore_con/ecore_con_legacy.c +++ b/src/lib/ecore_con/ecore_con_legacy.c @@ -2659,7 +2659,7 @@ _ecore_con_lookup_done_cb(void *data, const char *host, const char *port EINA_UN if (!inet_ntop(result->ai_family, mem, ip, sizeof(ip))) { - ERR("could not convert IP to string: %s", strerror(errno)); + ERR("could not convert IP to string: %s", eina_error_msg_get(errno)); goto end; } ctx->cb(result->ai_canonname, ip, result->ai_addr, result->ai_addrlen, (void *)ctx->data); diff --git a/src/lib/ecore_con/ecore_con_local.c b/src/lib/ecore_con/ecore_con_local.c index b3568837b5..e91819ec42 100644 --- a/src/lib/ecore_con/ecore_con_local.c +++ b/src/lib/ecore_con/ecore_con_local.c @@ -127,7 +127,7 @@ _ecore_con_local_mkpath(const char *path, mode_t mode) { if (errno != EEXIST) { - ERR("could not create parent directory '%s' of path '%s': %s", d, path, strerror(errno)); + ERR("could not create parent directory '%s' of path '%s': %s", d, path, eina_error_msg_get(errno)); goto end; } } @@ -138,7 +138,7 @@ _ecore_con_local_mkpath(const char *path, mode_t mode) if (mkdir(d, mode) != 0) { if (errno != EEXIST) - ERR("could not create parent directory '%s' of path '%s': %s", d, path, strerror(errno)); + ERR("could not create parent directory '%s' of path '%s': %s", d, path, eina_error_msg_get(errno)); else { struct stat st; diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c index dd8d249304..5f94ebf2d1 100644 --- a/src/lib/ecore_con/ecore_con_url.c +++ b/src/lib/ecore_con/ecore_con_url.c @@ -425,7 +425,7 @@ _ecore_con_url_dialer_can_read_changed(void *data, const Efl_Event *event EINA_U ssize_t r = write(url_con->write_fd, slice.bytes, slice.len); if (r == -1) { - ERR("Could not write to fd=%d: %s", url_con->write_fd, strerror(errno)); + ERR("Could not write to fd=%d: %s", url_con->write_fd, eina_error_msg_get(errno)); break; } slice.bytes += r; diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c index 53788514e1..20f3156e1c 100644 --- a/src/lib/ecore_con/efl_net_dialer_http.c +++ b/src/lib/ecore_con/efl_net_dialer_http.c @@ -1796,7 +1796,7 @@ _efl_net_dialer_http_efl_io_closer_close_on_exec_set(Eo *o EINA_UNUSED, Efl_Net_ if (!eina_file_close_on_exec(pd->fd, close_on_exec)) { - ERR("fcntl(" SOCKET_FMT ", F_SETFD): %s", pd->fd, strerror(errno)); + ERR("fcntl(" SOCKET_FMT ", F_SETFD): %s", pd->fd, eina_error_msg_get(errno)); pd->close_on_exec = old; return EINA_FALSE; } diff --git a/src/lib/ecore_con/efl_net_server_fd.c b/src/lib/ecore_con/efl_net_server_fd.c index 8a493404a9..28626b0712 100644 --- a/src/lib/ecore_con/efl_net_server_fd.c +++ b/src/lib/ecore_con/efl_net_server_fd.c @@ -54,7 +54,7 @@ efl_net_accept4(SOCKET fd, struct sockaddr *addr, socklen_t *addrlen, Eina_Bool if (!eina_file_close_on_exec(client, EINA_TRUE)) { int errno_bkp = errno; - ERR("fcntl(" SOCKET_FMT ", F_SETFD, FD_CLOEXEC): %s", client, strerror(errno)); + ERR("fcntl(" SOCKET_FMT ", F_SETFD, FD_CLOEXEC): %s", client, eina_error_msg_get(errno)); closesocket(client); errno = errno_bkp; return INVALID_SOCKET; @@ -282,7 +282,7 @@ _efl_net_server_fd_close_on_exec_set(Eo *o, Efl_Net_Server_Fd_Data *pd, Eina_Boo if (!eina_file_close_on_exec(fd, close_on_exec)) { - ERR("fcntl(" SOCKET_FMT ", F_SETFD,): %s", fd, strerror(errno)); + ERR("fcntl(" SOCKET_FMT ", F_SETFD,): %s", fd, eina_error_msg_get(errno)); pd->close_on_exec = old; return EINA_FALSE; } @@ -311,7 +311,7 @@ _efl_net_server_fd_close_on_exec_get(const Eo *o, Efl_Net_Server_Fd_Data *pd) flags = fcntl(fd, F_GETFD); if (flags < 0) { - ERR("fcntl(" SOCKET_FMT ", F_GETFD): %s", fd, strerror(errno)); + ERR("fcntl(" SOCKET_FMT ", F_GETFD): %s", fd, eina_error_msg_get(errno)); return EINA_FALSE; } diff --git a/src/lib/ecore_con/efl_net_server_udp.c b/src/lib/ecore_con/efl_net_server_udp.c index ced3e04662..50a0c97908 100644 --- a/src/lib/ecore_con/efl_net_server_udp.c +++ b/src/lib/ecore_con/efl_net_server_udp.c @@ -171,7 +171,7 @@ _efl_net_server_udp_resolved(void *data, const char *host EINA_UNUSED, const cha Eo *o = data; Efl_Net_Server_Udp_Data *pd = efl_data_scope_get(o, MY_CLASS); const struct addrinfo *addr; - Eina_Error err; + Eina_Error err = EINA_ERROR_NO_ERROR; pd->resolver = NULL; @@ -351,6 +351,7 @@ _efl_net_server_udp_efl_net_server_fd_process_incoming_data(Eo *o, Efl_Net_Serve client = eina_hash_find(pd->clients, str); if (client) { + free(buf); _efl_net_server_udp_client_feed(client, slice); return; } @@ -393,8 +394,12 @@ _efl_net_server_udp_efl_net_server_fd_process_incoming_data(Eo *o, Efl_Net_Serve efl_event_callback_add(client, EFL_IO_CLOSER_EVENT_CLOSED, _efl_net_server_udp_client_event_closed, o); if (!efl_net_server_client_announce(o, client)) - return; + { + free(buf); + return; + } + free(buf); _efl_net_server_udp_client_feed(client, slice); } diff --git a/src/lib/ecore_con/efl_net_socket_udp.c b/src/lib/ecore_con/efl_net_socket_udp.c index 29b66f3ed6..67e3f6a795 100644 --- a/src/lib/ecore_con/efl_net_socket_udp.c +++ b/src/lib/ecore_con/efl_net_socket_udp.c @@ -119,7 +119,7 @@ _efl_net_socket_udp_bind(Eo *o, Efl_Net_Socket_Udp_Data *pd) if (errno) { err = errno; - ERR("invalid port numer '%s': %s", bport, strerror(errno)); + ERR("invalid port numer '%s': %s", bport, eina_error_msg_get(errno)); goto error_bind; } diff --git a/src/lib/ecore_con/efl_net_ssl_ctx-gnutls.c b/src/lib/ecore_con/efl_net_ssl_ctx-gnutls.c index 7a92a821e9..cb1980827f 100644 --- a/src/lib/ecore_con/efl_net_ssl_ctx-gnutls.c +++ b/src/lib/ecore_con/efl_net_ssl_ctx-gnutls.c @@ -125,7 +125,7 @@ _efl_net_ssl_ctx_load_lists(Efl_Net_Ssl_Ctx *ctx, Efl_Net_Ssl_Ctx_Config cfg) r = 0; if (stat(path, &st) != 0) { - ERR("ssl_ctx=%p could not load certificate authorities from '%s': %s", ctx, path, strerror(errno)); + ERR("ssl_ctx=%p could not load certificate authorities from '%s': %s", ctx, path, eina_error_msg_get(errno)); eina_stringshare_del(path); *cfg.certificate_authorities = eina_list_remove_list(*cfg.certificate_authorities, n); continue; diff --git a/src/lib/ecore_con/efl_net_ssl_ctx-openssl.c b/src/lib/ecore_con/efl_net_ssl_ctx-openssl.c index 6efba8476f..d8e4b6e220 100644 --- a/src/lib/ecore_con/efl_net_ssl_ctx-openssl.c +++ b/src/lib/ecore_con/efl_net_ssl_ctx-openssl.c @@ -196,7 +196,7 @@ _efl_net_ssl_ctx_check_errors(); if (stat(path, &st) != 0) { - ERR("ssl_ctx=%p could not load certificate authorities from '%s': %s", ctx, path, strerror(errno)); + ERR("ssl_ctx=%p could not load certificate authorities from '%s': %s", ctx, path, eina_error_msg_get(errno)); eina_stringshare_del(path); *cfg.certificate_authorities = eina_list_remove_list(*cfg.certificate_authorities, n); continue; From 94be8a88d3c28fd8b339b141f2f209a01e589564 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Wed, 13 Feb 2019 07:59:46 +0000 Subject: [PATCH 48/87] eet_dictionary: remove dead code If index value is not -1, then eet_dictionary_string_add() returns. Therefore, it does not need to check the index value after that. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7922 --- src/lib/eet/eet_dictionary.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/lib/eet/eet_dictionary.c b/src/lib/eet/eet_dictionary.c index 46e8cbf723..7a80463bd6 100644 --- a/src/lib/eet/eet_dictionary.c +++ b/src/lib/eet/eet_dictionary.c @@ -130,17 +130,9 @@ eet_dictionary_string_add(Eet_Dictionary *ed, current->str = str; current->len = len; - if (idx == -1) - { - current->next = ed->hash[hash]; - ed->hash[hash] = ed->count; - } - else - { - current->next = idx; - if (pidx != -1) ed->all[pidx].next = ed->count; - else ed->hash[hash] = ed->count; - } + current->next = ed->hash[hash]; + ed->hash[hash] = ed->count; + cnt = ed->count++; eina_rwlock_release(&ed->rwlock); return cnt; From 63cbdd300802131a1e605a5dc50b9a1316ad080f Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Thu, 14 Feb 2019 12:57:13 +0900 Subject: [PATCH 49/87] efl_pack: move layout,updated event to Efl.Pack_Layout Summary: 'layout,updated' event is more suitable for Efl.Pack_Layout which have layout_update method. Test Plan: make Reviewers: segfaultxavi, cedric, Jaehyun_Cho Reviewed By: segfaultxavi, Jaehyun_Cho Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7906 --- src/lib/efl/interfaces/efl_pack.eo | 3 --- src/lib/efl/interfaces/efl_pack_layout.eo | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/efl/interfaces/efl_pack.eo b/src/lib/efl/interfaces/efl_pack.eo index 0b8f1d670f..012c9699eb 100644 --- a/src/lib/efl/interfaces/efl_pack.eo +++ b/src/lib/efl/interfaces/efl_pack.eo @@ -57,7 +57,4 @@ interface Efl.Pack extends Efl.Container } } } - events { - layout,updated: void; [[Sent after the layout was updated.]] - } } diff --git a/src/lib/efl/interfaces/efl_pack_layout.eo b/src/lib/efl/interfaces/efl_pack_layout.eo index cdc593b031..3b47fa37d7 100644 --- a/src/lib/efl/interfaces/efl_pack_layout.eo +++ b/src/lib/efl/interfaces/efl_pack_layout.eo @@ -23,4 +23,7 @@ interface Efl.Pack_Layout ]] } } + events { + layout,updated: void; [[Sent after the layout was updated.]] + } } From dea75d0f3283f31751e577925e81758836c10b70 Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Wed, 13 Feb 2019 21:22:59 +0900 Subject: [PATCH 50/87] efl_page_transition_scroll: avoid explicit null dereference --- src/lib/elementary/efl_page_transition_scroll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_page_transition_scroll.c b/src/lib/elementary/efl_page_transition_scroll.c index 432ada89ea..bb1ee08054 100644 --- a/src/lib/elementary/efl_page_transition_scroll.c +++ b/src/lib/elementary/efl_page_transition_scroll.c @@ -415,7 +415,7 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED, pi->id = (pi->id - 1 + pd->page_info_num) % pd->page_info_num; target = pi->prev; } - else if (diff == -1) + else { pi->id = (pi->id + 1) % pd->page_info_num; target = pi->next; @@ -443,7 +443,7 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED, pd->head = pd->head->next; pd->tail = pd->tail->next; } - else if (diff == -1) + else { pd->head = pd->head->prev; pd->tail = pd->tail->prev; From e39c71085801ca5cb73ff74815a4a203acd268d6 Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Thu, 14 Feb 2019 16:08:33 +0900 Subject: [PATCH 51/87] test/efl_ui_pager: add NULL checking after calloc() function --- src/bin/elementary/test_ui_pager.c | 19 +++++++++++++++++++ src/bin/elementary/test_ui_pager_scroll.c | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/bin/elementary/test_ui_pager.c b/src/bin/elementary/test_ui_pager.c index ca2cec593b..f864a430c4 100644 --- a/src/bin/elementary/test_ui_pager.c +++ b/src/bin/elementary/test_ui_pager.c @@ -361,6 +361,8 @@ static void page_size_cb(void *data, efl_pack_end(inbox, efl_added)); size_params = calloc(1, sizeof(Size_Params)); + if (!size_params) return; + size_params->slider = sl; size_params->pager = params->pager; size_params->params = params; @@ -400,6 +402,8 @@ static void page_size_cb(void *data, efl_pack_end(inbox, efl_added)); size_params = calloc(1, sizeof(Size_Params)); + if (!size_params) return; + size_params->slider = sl; size_params->pager = params->pager; size_params->params = params; @@ -456,6 +460,8 @@ static void pack_cb(void *data, // Pack Begin pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -472,6 +478,8 @@ static void pack_cb(void *data, // Pack End pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -488,6 +496,8 @@ static void pack_cb(void *data, // Pack Before pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -504,6 +514,8 @@ static void pack_cb(void *data, // Pack After pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -520,6 +532,8 @@ static void pack_cb(void *data, // Pack At pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -539,6 +553,8 @@ static void pack_cb(void *data, // Unpack At pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -577,6 +593,7 @@ static void current_page_cb(void *data, Eo *pager = params->pager; Eo *btn, *box, *sp; Page_Set_Params *psp = calloc(1, sizeof(Page_Set_Params)); + if (!psp) return; btn = efl_add(EFL_UI_BUTTON_CLASS, navi, efl_text_set(efl_added, "Back"), @@ -699,6 +716,8 @@ void test_ui_pager(void *data EINA_UNUSED, efl_content_set(efl_part(layout, "next_btn"), efl_added)); params = calloc(1, sizeof(Params)); + if (!params) return; + params->navi = navi; params->pager = pager; params->indicator = NULL; diff --git a/src/bin/elementary/test_ui_pager_scroll.c b/src/bin/elementary/test_ui_pager_scroll.c index b336f11cd7..99a6fc9146 100644 --- a/src/bin/elementary/test_ui_pager_scroll.c +++ b/src/bin/elementary/test_ui_pager_scroll.c @@ -417,6 +417,8 @@ static void page_size_cb(void *data, efl_pack_end(inbox, efl_added)); size_params = calloc(1, sizeof(Size_Params)); + if (!size_params) return; + size_params->slider = sl; size_params->pager = params->pager; size_params->params = params; @@ -456,6 +458,8 @@ static void page_size_cb(void *data, efl_pack_end(inbox, efl_added)); size_params = calloc(1, sizeof(Size_Params)); + if (!size_params) return; + size_params->slider = sl; size_params->pager = params->pager; size_params->params = params; @@ -570,6 +574,8 @@ static void pack_cb(void *data, // Pack Begin pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -586,6 +592,8 @@ static void pack_cb(void *data, // Pack End pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -602,6 +610,8 @@ static void pack_cb(void *data, // Pack Before pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -618,6 +628,8 @@ static void pack_cb(void *data, // Pack After pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -634,6 +646,8 @@ static void pack_cb(void *data, // Pack At pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -653,6 +667,8 @@ static void pack_cb(void *data, // Unpack At pack_param = calloc(1, sizeof(Pack_Params)); + if (!pack_param) return; + pack_param->pager = pager; pack_param->pack_sp = sp1; pack_param->unpack_sp = sp2; @@ -691,6 +707,7 @@ static void current_page_cb(void *data, Eo *pager = params->pager; Eo *btn, *box, *sp; Page_Set_Params *psp = calloc(1, sizeof(Page_Set_Params)); + if (!psp) return; btn = efl_add(EFL_UI_BUTTON_CLASS, navi, efl_text_set(efl_added, "Back"), @@ -884,6 +901,8 @@ void test_ui_pager_scroll(void *data EINA_UNUSED, efl_ui_pager_transition_set(pager, efl_added)); params = calloc(1, sizeof(Params)); + if (!params) return; + params->navi = navi; params->pager = pager; params->transition = NULL; From c695dde8c378fc095c74ac771fee6251073ce26b Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 14 Feb 2019 09:31:02 +0000 Subject: [PATCH 52/87] ecore wl2 - remove pointless sntrcpys causing warnings again pointless: strcpy(dest, x); -> len - strlen(x); strncpy(dest, x, len); code put in causing new warnings. this kind of "get rid of strcpy" is actua;;y dangerous as it's more likely a mistake is made along the way and bugs are added. strcpy's should be reviewed and if ok - left as-is. doing otherwise makes the code worse, not better and raises risk. it now also produces warnings at compile time which creates noise we just shouldnt' have. --- src/lib/ecore_wl2/ecore_wl2_input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c index 0a7ae211d3..0d480f50e8 100644 --- a/src/lib/ecore_wl2/ecore_wl2_input.c +++ b/src/lib/ecore_wl2/ecore_wl2_input.c @@ -635,9 +635,9 @@ _ecore_wl2_input_key_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window, xkb_ ev->compose = comp_len ? ev->key + key_len + 1 : NULL; ev->string = ev->compose; - strncpy((char *)ev->keyname, keyname, key_len + 1); - strncpy((char *)ev->key, key, name_len + 1); - if (comp_len) strncpy((char *)ev->compose, compose, comp_len +1); + strcpy((char *)ev->keyname, keyname); + strcpy((char *)ev->key, key); + if (comp_len) strcpy((char *)ev->compose, compose); ev->window = (Ecore_Window)window; ev->event_window = (Ecore_Window)window; From b39d3990e9b7a5aa26e4db2bb980b50e56793203 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Thu, 14 Feb 2019 10:40:13 +0100 Subject: [PATCH 53/87] tests: guard eina bool variable to avoid compilation failure on windows The timeout_reached bool is only used in this function when HAVE_FORK is available. This is not the case on windows. Eina.h would only be included with fork available so the Eina_Bool type causes a compilation fail on windows. Guarding them as the other parts of the function using it solves the problem. Reviewed-by: Vincent Torri Differential Revision: https://phab.enlightenment.org/D7947 --- src/tests/efl_check.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/efl_check.h b/src/tests/efl_check.h index 81fa1844e8..d5b0d2fcc2 100644 --- a/src/tests/efl_check.h +++ b/src/tests/efl_check.h @@ -287,7 +287,9 @@ _efl_suite_build_and_run(int argc, const char **argv, const char *suite_name, co int do_fork; int num_forks = 0; int can_fork = 0; +#ifdef HAVE_FORK Eina_Bool timeout_reached = EINA_FALSE; +#endif #ifdef ENABLE_TIMING_INFO double tstart = 0.0, tcstart = 0.0; int timing = _timing_enabled(); From a49c783c32e095a5280f2c5bd334e7ff92759620 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 13 Feb 2019 12:36:12 +0100 Subject: [PATCH 54/87] build: fix autotools release tarbal generation this file was forgotten when initially writing this patch. Reviewed-by: Stefan Schmidt Differential Revision: https://phab.enlightenment.org/D7928 --- src/Makefile_Ecore.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index fd6074dec3..c7f66ebd02 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -77,6 +77,7 @@ ecoreeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@ ecoreeolianfiles_DATA = $(ecore_eolian_files_public) lib/ecore/efl_loop_timer.eo EXTRA_DIST2 += $(ecore_eolian_files) +EXTRA_DIST2 += $(ecore_test_eolian_files) lib_LTLIBRARIES += lib/ecore/libecore.la From ac6061057355c21cb8d48bd6517344923dde7681 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 13 Feb 2019 13:42:55 +0100 Subject: [PATCH 55/87] build: add a option to bootstrap eolian this is here in order to make cross compiling easier, and we can just provide the *all the time changing* eolian_gen binary. Reviewed-by: Stefan Schmidt Differential Revision: https://phab.enlightenment.org/D7929 --- meson.build | 33 +++++++++++++++++++++------------ meson_options.txt | 6 ++++++ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index d6b9b6074d..401ba04f00 100644 --- a/meson.build +++ b/meson.build @@ -242,6 +242,12 @@ endif ecore_evas_wayland_engine_include_dir = [] +boot_strap_eolian = [ + ['evil' ,[] , false, true, false, false, false, false, [], []], + ['eina' ,[] , false, true, false, false, false, false, [], []], + ['eolian' ,[] , false, true, true, false, false, false, ['eina'], []], +] + subprojects = [ # name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs ['evil' ,[] , false, true, false, false, false, false, [], []], @@ -304,6 +310,9 @@ test_dirs = [] example_dirs = [] tmp_empty = declare_dependency() +if get_option('eolian-bootstrap') + subprojects = boot_strap_eolian +endif foreach package : subprojects package_name = package[0] @@ -404,23 +413,23 @@ foreach package : subprojects endforeach -#build this later, as the debug services are depending on ecore -subdir(join_paths('src', 'bin', 'efl')) - -subdir(join_paths('src', 'generic', 'evas')) -subdir(join_paths('src', 'generic', 'emotion')) subdir('cmakeconfig') +#build this later, as the debug services are depending on ecore +if get_option('eolian-bootstrap') == false + subdir(join_paths('src', 'bin', 'efl')) -bindings = get_option('bindings') + subdir(join_paths('src', 'generic', 'evas')) + subdir(join_paths('src', 'generic', 'emotion')) -foreach binding : bindings - subdir(join_paths('src', 'bindings', binding)) -endforeach + bindings = get_option('bindings') -subdir(join_paths('src', 'edje_external')) + foreach binding : bindings + subdir(join_paths('src', 'bindings', binding)) + endforeach - -subdir(join_paths('data')) + subdir(join_paths('src', 'edje_external')) + subdir(join_paths('data')) +endif if get_option('build-tests') check = dependency('check') diff --git a/meson_options.txt b/meson_options.txt index 651fbcc01e..c1677606ee 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -353,3 +353,9 @@ option('elementary-base-dir', value : '.elementary', description : 'Put the name of a base directory for elementary data' ) + +option('eolian-bootstrap', + type : 'boolean', + value : false, + description : 'Only build efl up to eolian_gen and install eina libeolian and eolian_gen, usefull for cross compiles' +) From 7ab9b48151e42b23e2fd10f58c463b18dbc7ef5a Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 13 Feb 2019 13:48:24 +0100 Subject: [PATCH 56/87] build: enable eolian_gen bootstrapping for cross compile this enables travis to build eolian_gen before cross compiling in mingw. This is done in order to make eolian_gen patches easier on CI. Reviewed-by: Stefan Schmidt Differential Revision: https://phab.enlightenment.org/D7930 --- .ci/bootstrap_eolian.sh | 7 +++++++ .ci/ci-configure.sh | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 .ci/bootstrap_eolian.sh diff --git a/.ci/bootstrap_eolian.sh b/.ci/bootstrap_eolian.sh new file mode 100755 index 0000000000..3e2734e714 --- /dev/null +++ b/.ci/bootstrap_eolian.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +mkdir build-eolian-bootstrap +meson --prefix=/usr/ --libdir=/usr/lib -Deolian-bootstrap=true build-eolian-bootstrap +ninja -C build-eolian-bootstrap install +rm -rf build-eolian-bootstrap +ldconfig diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh index 3f35c9e969..b2a7a03f26 100755 --- a/.ci/ci-configure.sh +++ b/.ci/ci-configure.sh @@ -77,7 +77,7 @@ else RELEASE_READY_LINUX_COPTS=" --with-profile=release" - MINGW_COPTS=" --prefix=/ewpi-64-install --host=x86_64-w64-mingw32 --with-eolian-gen=/usr/local/bin/eolian_gen \ + MINGW_COPTS=" --prefix=/ewpi-64-install --host=x86_64-w64-mingw32 --with-eolian-gen=/usr/bin/eolian_gen \ --with-edje-cc=/usr/local/bin/edje_cc --with-eet-eet=/usr/local/bin/eet \ --with-bin-elm-prefs-cc=/usr/local/bin/elm_prefs_cc \ --disable-static --with-tests=regular --with-crypto=openssl \ @@ -110,6 +110,7 @@ else if [ "$1" = "mingw" ]; then OPTS="$OPTS $MINGW_COPTS" docker exec $(cat $HOME/cid) sh -c 'rm -f /src/config.cache' + docker exec $(cat $HOME/cid) sh -c '.ci/bootstrap_eolian.sh' fi docker exec $(cat $HOME/cid) sh -c 'rm -f ~/.ccache/ccache.conf' travis_fold autoreconf autoreconf From 39aee233684408e13605f5649d3ce5fdf4c275c3 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 14 Feb 2019 13:20:28 +0100 Subject: [PATCH 57/87] docs: Clarify docs for Efl.Screen. --- src/lib/efl/interfaces/efl_screen.eo | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/efl/interfaces/efl_screen.eo b/src/lib/efl/interfaces/efl_screen.eo index ee58232781..1f9a5d964d 100644 --- a/src/lib/efl/interfaces/efl_screen.eo +++ b/src/lib/efl/interfaces/efl_screen.eo @@ -25,19 +25,19 @@ interface Efl.Screen ]] } values { - rotation: int; [[The degree of the screen.]] + rotation: int; [[Screen rortation in degrees.]] } } @property screen_dpi { get { - [[Get screen dpi for the screen that a window is on. + [[Get the pixel density in DPI (Dots Per Inch) for the screen that a window is on. @since 1.7 ]] } values { - xdpi: int; [[Pointer to value to store return horizontal dpi. May be $null.]] - ydpi: int; [[Pointer to value to store return vertical dpi. May be $null.]] + xdpi: int; [[Horizontal DPI.]] + ydpi: int; [[Vertical DPI.]] } } } From c270aabdc0122e8a572b04566f5a6645cba22c9f Mon Sep 17 00:00:00 2001 From: SangHyeon Jade Lee Date: Thu, 14 Feb 2019 08:50:04 -0500 Subject: [PATCH 58/87] efl_ui : fix infinite loop in efl_ui_exact model Summary: the loop in infinite because of wrong condition. need to loop while the count of list_index. Reviewers: cedric, zmike Subscribers: zmike, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7925 --- src/lib/elementary/efl_ui_exact_model.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_exact_model.c b/src/lib/elementary/efl_ui_exact_model.c index b44bd822fc..fac8298745 100644 --- a/src/lib/elementary/efl_ui_exact_model.c +++ b/src/lib/elementary/efl_ui_exact_model.c @@ -76,6 +76,7 @@ _efl_ui_exact_model_slot_compress(unsigned int index, Eina_List *compressed, uns Eina_Binbuf *cbuf; Eina_Binbuf *tbuf; Eina_List *l = NULL; + unsigned int i; _efl_ui_exact_model_list_find(list_index, compressed, &l); @@ -106,7 +107,10 @@ _efl_ui_exact_model_slot_compress(unsigned int index, Eina_List *compressed, uns } // Fill the list all the way to the needed index with buffer full of zero - while (list_index) compressed = eina_list_append(compressed, z); + for (i = 0; i < list_index; i++) + { + compressed = eina_list_append(compressed, z); + } l = eina_list_last(compressed); } From c2adefd7f29e98fd782cf5f90fe2b395c4d82c9e Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 14 Feb 2019 08:57:22 -0500 Subject: [PATCH 59/87] Efl.Gfx.Stack: Rename raise and lower Summary: to move_to_top and move_to_bottom since the previous names seemed to indicate that the object only moved one step instead of all the way through the top or the bottom of the stack. Ref T7560 Test Plan: make && make check && make examples work as before Reviewers: cedric, zmike Reviewed By: zmike Subscribers: kimcinoo, #reviewers, #committers Tags: #efl Maniphest Tasks: T7560 Differential Revision: https://phab.enlightenment.org/D7934 --- src/bin/elementary/test_photocam.c | 2 +- src/lib/efl/interfaces/efl_gfx_stack.eo | 8 ++++---- src/lib/elementary/efl_ui_list_view.c | 2 +- src/lib/elementary/efl_ui_win.c | 6 +++--- src/lib/elementary/efl_ui_win.eo | 6 +++--- src/lib/evas/canvas/efl_canvas_object.eo | 4 ++-- src/lib/evas/canvas/efl_canvas_vg_node.c | 8 ++++---- src/lib/evas/canvas/efl_canvas_vg_node.eo | 4 ++-- src/lib/evas/canvas/evas_stack.x | 8 ++++---- src/tests/emotion/emotion_test_main-eo.c | 4 ++-- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c index f6c2e9711b..9c54b01207 100644 --- a/src/bin/elementary/test_photocam.c +++ b/src/bin/elementary/test_photocam.c @@ -836,7 +836,7 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win, efl_gfx_color_set(efl_added, 0, 0, 0, 0), - efl_gfx_stack_raise(efl_added), + efl_gfx_stack_raise_to_top(efl_added), efl_canvas_object_repeat_events_set(efl_added, EINA_TRUE), efl_event_callback_add(efl_added, EFL_EVENT_POINTER_WHEEL, _zoomable_mouse_wheel_cb, zoomable) ); diff --git a/src/lib/efl/interfaces/efl_gfx_stack.eo b/src/lib/efl/interfaces/efl_gfx_stack.eo index c122b48260..515fa73a30 100644 --- a/src/lib/efl/interfaces/efl_gfx_stack.eo +++ b/src/lib/efl/interfaces/efl_gfx_stack.eo @@ -84,13 +84,13 @@ interface Efl.Gfx.Stack @in below: Efl.Gfx.Stack @nonull; [[The object below which to stack]] } } - raise { + raise_to_top { [[Raise $obj to the top of its layer. $obj will, then, be the highest one in the layer it belongs to. Object on other layers won't get touched. - See also @.stack_above(), @.stack_below() and @.lower()]] + See also @.stack_above(), @.stack_below() and @.lower_to_bottom()]] } stack_above { @@ -118,13 +118,13 @@ interface Efl.Gfx.Stack @in above: Efl.Gfx.Stack @nonull; [[The object above which to stack]] } } - lower { + lower_to_bottom { [[Lower $obj to the bottom of its layer. $obj will, then, be the lowest one in the layer it belongs to. Objects on other layers won't get touched. - See also @.stack_above(), @.stack_below() and @.raise() ]] + See also @.stack_above(), @.stack_below() and @.raise_to_top() ]] } } diff --git a/src/lib/elementary/efl_ui_list_view.c b/src/lib/elementary/efl_ui_list_view.c index fe454690a0..7370fce15f 100644 --- a/src/lib/elementary/efl_ui_list_view.c +++ b/src/lib/elementary/efl_ui_list_view.c @@ -609,7 +609,7 @@ _efl_ui_list_view_efl_canvas_group_group_add(Eo *obj, Efl_Ui_List_View_Data *pd) edje_object_freeze(wd->resize_obj); o = (Evas_Object *)edje_object_part_object_get(wd->resize_obj, "efl.dragable.vbar"); edje_object_thaw(wd->resize_obj); - efl_gfx_stack_raise((Eo *)o); + efl_gfx_stack_raise_to_top((Eo *)o); efl_gfx_entity_visible_set(pd->pan_obj, EINA_TRUE); efl_access_object_access_type_set(obj, EFL_ACCESS_TYPE_DISABLED); diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 442194e1cb..4a6ec30605 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -5972,7 +5972,7 @@ _efl_ui_win_activate(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) } EOLIAN static void -_efl_ui_win_efl_gfx_stack_raise(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd) +_efl_ui_win_efl_gfx_stack_raise_to_top(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd) { TRAP(pd, raise); } @@ -5980,11 +5980,11 @@ _efl_ui_win_efl_gfx_stack_raise(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd) EAPI void elm_win_raise(Eo *obj) { - efl_gfx_stack_raise(obj); + efl_gfx_stack_raise_to_top(obj); } EOLIAN static void -_efl_ui_win_efl_gfx_stack_lower(Eo *obj, Efl_Ui_Win_Data *pd EINA_UNUSED) +_efl_ui_win_efl_gfx_stack_lower_to_bottom(Eo *obj, Efl_Ui_Win_Data *pd EINA_UNUSED) { // Do nothing: in X we could request to stack lower but that has been abused // and transformed into a kind of "iconify". As a consequence, lower is diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index fc2d52fd52..98907b4c55 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -832,9 +832,9 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W Efl.Gfx.Entity.visible { set; } Efl.Gfx.Entity.position { set; } Efl.Gfx.Entity.size { set; } - Efl.Gfx.Stack.raise; [[Places the window at the top of the stack, so - that it's not covered by any other window.]] - Efl.Gfx.Stack.lower; [[This action is ignored by the Window.]] + Efl.Gfx.Stack.raise_to_top; [[Places the window at the top of the stack, so + that it's not covered by any other window.]] + Efl.Gfx.Stack.lower_to_bottom; [[This action is ignored by the Window.]] Efl.Ui.Widget.theme_apply; Efl.Ui.Focus.Object.focus { get; } Efl.Ui.Widget.focus_highlight_style { get; set; } diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo index 6bcae5d1ee..131be273f7 100644 --- a/src/lib/evas/canvas/efl_canvas_object.eo +++ b/src/lib/evas/canvas/efl_canvas_object.eo @@ -598,8 +598,8 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Stack.above { get; } Efl.Gfx.Stack.stack_below; Efl.Gfx.Stack.stack_above; - Efl.Gfx.Stack.raise; - Efl.Gfx.Stack.lower; + Efl.Gfx.Stack.raise_to_top; + Efl.Gfx.Stack.lower_to_bottom; Efl.Gfx.Size_Hint.hint_aspect { get; set; } Efl.Gfx.Size_Hint.hint_align { get; set; } Efl.Gfx.Size_Hint.hint_combined_min { get; } diff --git a/src/lib/evas/canvas/efl_canvas_vg_node.c b/src/lib/evas/canvas/efl_canvas_vg_node.c index fba95e7924..2d83a4a79f 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_node.c +++ b/src/lib/evas/canvas/efl_canvas_vg_node.c @@ -384,7 +384,7 @@ _efl_canvas_vg_node_efl_object_parent_set(Eo *obj, } static void -_efl_canvas_vg_node_efl_gfx_stack_raise(Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED) +_efl_canvas_vg_node_efl_gfx_stack_raise_to_top(Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED) { Efl_Canvas_Vg_Container_Data *cd; Eina_List *lookup, *next; @@ -472,7 +472,7 @@ _efl_canvas_vg_node_efl_gfx_stack_stack_below(Eo *obj, } static void -_efl_canvas_vg_node_efl_gfx_stack_lower(Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED) +_efl_canvas_vg_node_efl_gfx_stack_lower_to_bottom(Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED) { Efl_Canvas_Vg_Container_Data *cd; Eina_List *lookup, *prev; @@ -833,13 +833,13 @@ evas_vg_node_stack_above(Eo *obj, Eo *above) EAPI void evas_vg_node_raise(Eo *obj) { - efl_gfx_stack_raise(obj); + efl_gfx_stack_raise_to_top(obj); } EAPI void evas_vg_node_lower(Eo *obj) { - efl_gfx_stack_lower(obj); + efl_gfx_stack_lower_to_bottom(obj); } #include "efl_canvas_vg_node.eo.c" diff --git a/src/lib/evas/canvas/efl_canvas_vg_node.eo b/src/lib/evas/canvas/efl_canvas_vg_node.eo index b20ec58f9d..55ce3ef6fb 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_node.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_node.eo @@ -66,8 +66,8 @@ abstract Efl.Canvas.Vg.Node extends Efl.Object implements Efl.Gfx.Entity, Efl.Gf Efl.Gfx.Stack.above { get; } Efl.Gfx.Stack.stack_below; Efl.Gfx.Stack.stack_above; - Efl.Gfx.Stack.raise; - Efl.Gfx.Stack.lower; + Efl.Gfx.Stack.raise_to_top; + Efl.Gfx.Stack.lower_to_bottom; Efl.Gfx.Path.interpolate; Efl.Duplicate.duplicate; } diff --git a/src/lib/evas/canvas/evas_stack.x b/src/lib/evas/canvas/evas_stack.x index 4b73c22999..914d04731e 100644 --- a/src/lib/evas/canvas/evas_stack.x +++ b/src/lib/evas/canvas/evas_stack.x @@ -37,11 +37,11 @@ evas_object_below_get_internal(const Evas_Object_Protected_Data *obj) EAPI void evas_object_raise(Evas_Object *obj) { - efl_gfx_stack_raise((Evas_Object *)obj); + efl_gfx_stack_raise_to_top((Evas_Object *)obj); } EOLIAN void -_efl_canvas_object_efl_gfx_stack_raise(Eo *eo_obj, Evas_Object_Protected_Data *obj) +_efl_canvas_object_efl_gfx_stack_raise_to_top(Eo *eo_obj, Evas_Object_Protected_Data *obj) { if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_RAISE, 1)) return; @@ -86,11 +86,11 @@ _efl_canvas_object_efl_gfx_stack_raise(Eo *eo_obj, Evas_Object_Protected_Data *o EAPI void evas_object_lower(Evas_Object *obj) { - efl_gfx_stack_lower((Evas_Object *)obj); + efl_gfx_stack_lower_to_bottom((Evas_Object *)obj); } EOLIAN void -_efl_canvas_object_efl_gfx_stack_lower(Eo *eo_obj, Evas_Object_Protected_Data *obj) +_efl_canvas_object_efl_gfx_stack_lower_to_bottom(Eo *eo_obj, Evas_Object_Protected_Data *obj) { if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_LOWER, 1)) return; diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c index b3f850c812..65508a0cc5 100644 --- a/src/tests/emotion/emotion_test_main-eo.c +++ b/src/tests/emotion/emotion_test_main-eo.c @@ -506,7 +506,7 @@ video_obj_signal_frame_move_start_cb(void *data EINA_UNUSED, Evas_Object *o, con evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y); fd->x = x; fd->y = y; - efl_gfx_stack_raise(o); + efl_gfx_stack_raise_to_top(o); } static void @@ -531,7 +531,7 @@ video_obj_signal_frame_resize_start_cb(void *data EINA_UNUSED, Evas_Object *o, c evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y); fd->x = x; fd->y = y; - efl_gfx_stack_raise(o); + efl_gfx_stack_raise_to_top(o); } static void From f94ca6c26975cf8615a4e3afbbaa3448cee83561 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 14 Feb 2019 15:22:01 +0100 Subject: [PATCH 60/87] docs: Typo --- src/lib/efl/interfaces/efl_screen.eo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/efl/interfaces/efl_screen.eo b/src/lib/efl/interfaces/efl_screen.eo index 1f9a5d964d..c779dcedce 100644 --- a/src/lib/efl/interfaces/efl_screen.eo +++ b/src/lib/efl/interfaces/efl_screen.eo @@ -25,7 +25,7 @@ interface Efl.Screen ]] } values { - rotation: int; [[Screen rortation in degrees.]] + rotation: int; [[Screen rotation in degrees.]] } } @property screen_dpi { From 1fabc8fb9936b68284cc7477cb5160d30efa11e0 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Thu, 14 Feb 2019 15:24:45 +0100 Subject: [PATCH 61/87] 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 --- src/lib/eo/Eo.h | 7 ++----- src/lib/eo/efl_object.eo | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index df5dc338e0..403bef9925 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -182,8 +182,6 @@ typedef Eo Efl_Class; typedef Eo Efl_Object; #define _EFL_OBJECT_EO_CLASS_TYPE -#ifdef EFL_BETA_API_SUPPORT - /** * @var _efl_class_creation_lock * This variable is used for locking purposes in the class_get function @@ -1009,6 +1007,7 @@ EAPI Eina_Bool efl_object_init(void); */ EAPI Eina_Bool efl_object_shutdown(void); +#ifdef EFL_BETA_API_SUPPORT /** * The virtual allocation domain where an object lives @@ -1192,8 +1191,7 @@ EAPI Eina_Bool efl_domain_data_return(Efl_Id_Domain domain); */ EAPI Eina_Bool efl_compatible(const Eo *obj, const Eo *obj_target); - - +#endif // to fetch internal function and object data at once typedef struct _Efl_Object_Op_Call_Data @@ -2293,7 +2291,6 @@ EAPI Eina_Iterator *eo_objects_iterator_new(void); * @} */ -#endif #ifdef __cplusplus } diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo index a9ac302eee..e9fd4b6afa 100644 --- a/src/lib/eo/efl_object.eo +++ b/src/lib/eo/efl_object.eo @@ -345,7 +345,7 @@ abstract Efl.Object [[Get an iterator on all childrens]] return: iterator @owned @warn_unused; [[Children iterator]] } - composite_attach { + composite_attach @beta { [[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. @@ -359,7 +359,7 @@ abstract Efl.Object } return: bool; [[$true if successful. $false otherwise.]] } - composite_detach { + composite_detach @beta { [[Detach a composite object from another object. This functions also sets the parent of comp_obj to $null. @@ -371,7 +371,7 @@ abstract Efl.Object } return: bool; [[$true if successful. $false otherwise.]] } - composite_part_is { + composite_part_is @beta { [[Check if an object is part of a composite object. See @.composite_attach, @.composite_part_is. From 9ed59b8002e3c69039372d0aa0c3f82db19fa541 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 14 Feb 2019 16:11:32 +0100 Subject: [PATCH 62/87] Mark efl_types.eot as stable Summary: This allows using Efl_Version without EFL_BETA_API_SUPPORT, which in turn allows failing when trying to use restricted BETA API with a more meaningful error message. The error will now tell you which restricted API you are trying to use, instead of Efl_Version symbol not found. Fixes T7696 Depends on D7932 Test Plan: make && make check && make examples continue working. Building a BETA example while removing the EFL_BETA_API_SUPPORT define should tell you which BETA API you tried to use. Reviewers: zmike, bu5hm4n, cedric Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7696 Differential Revision: https://phab.enlightenment.org/D7948 --- src/lib/efl/Efl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 4b37800ced..52a22d44a5 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -69,10 +69,10 @@ typedef struct tm Efl_Time; typedef struct _Efl_Text_Cursor_Cursor Efl_Text_Cursor_Cursor; typedef struct _Efl_Text_Annotate_Annotation Efl_Text_Annotate_Annotation; -#ifdef EFL_BETA_API_SUPPORT - #include "interfaces/efl_types.eot.h" +#ifdef EFL_BETA_API_SUPPORT + #include /* Data types */ From 751ff0ed06be9cd91fa230e56eee7ae151d52cca Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 14 Feb 2019 17:09:23 +0100 Subject: [PATCH 63/87] Mark EFL_MAIN and EFL_MAIN_EX macros as stable They no longer require EFL_BETA_API_SUPPORT to be defined. --- src/lib/ecore/Ecore_Common.h | 3 --- src/lib/ecore/efl_general.h | 4 ---- 2 files changed, 7 deletions(-) diff --git a/src/lib/ecore/Ecore_Common.h b/src/lib/ecore/Ecore_Common.h index de515c57ed..060ffe82f2 100644 --- a/src/lib/ecore/Ecore_Common.h +++ b/src/lib/ecore/Ecore_Common.h @@ -87,8 +87,6 @@ EAPI unsigned int ecore_init_ex(int argc, char **argv); */ EAPI unsigned int ecore_shutdown_ex(void); - -#ifdef EFL_BETA_API_SUPPORT /** * @brief Inform EFL of the version this application was built for. * @@ -97,7 +95,6 @@ EAPI unsigned int ecore_shutdown_ex(void); * @since 1.18 (as beta) */ EWAPI void efl_build_version_set(int vmaj, int vmin, int vmic, int revision, const char *flavor, const char *build_id); -#endif /** * @} diff --git a/src/lib/ecore/efl_general.h b/src/lib/ecore/efl_general.h index 222c799c2c..70d594d60a 100644 --- a/src/lib/ecore/efl_general.h +++ b/src/lib/ecore/efl_general.h @@ -31,8 +31,6 @@ # define __EFL_NET(...) #endif -#ifdef EFL_BETA_API_SUPPORT - // This file is designed to be included again and again // so cleanup last inclusion before generating this one. #undef _EFL_VERSION_MICRO @@ -127,5 +125,3 @@ ecore_shutdown(); \ return real__; \ } - -#endif /* EFL_BETA_API_SUPPORT */ From 333330a6e51225b3ef8d725c4a930fc8c02fac18 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 14 Feb 2019 17:37:02 +0100 Subject: [PATCH 64/87] 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 --- src/lib/ecore/efl_accelerate_interpolator.eo | 2 +- src/lib/ecore/efl_app.eo | 2 +- src/lib/ecore/efl_appthread.eo | 2 +- src/lib/ecore/efl_boolean_model.eo | 2 +- src/lib/ecore/efl_bounce_interpolator.eo | 2 +- src/lib/ecore/efl_composite_model.eo | 2 +- src/lib/ecore/efl_container_model.eo | 2 +- src/lib/ecore/efl_container_model_item.eo | 2 +- src/lib/ecore/efl_core_command_line.eo | 2 +- src/lib/ecore/efl_core_env.eo | 2 +- src/lib/ecore/efl_core_proc_env.eo | 2 +- src/lib/ecore/efl_cubic_bezier_interpolator.eo | 2 +- src/lib/ecore/efl_decelerate_interpolator.eo | 2 +- src/lib/ecore/efl_divisor_interpolator.eo | 2 +- src/lib/ecore/efl_exe.eo | 2 +- src/lib/ecore/efl_generic_model.eo | 2 +- src/lib/ecore/efl_io_buffered_stream.eo | 2 +- src/lib/ecore/efl_io_closer_fd.eo | 2 +- src/lib/ecore/efl_io_copier.eo | 2 +- src/lib/ecore/efl_io_file.eo | 2 +- src/lib/ecore/efl_io_positioner_fd.eo | 2 +- src/lib/ecore/efl_io_reader_fd.eo | 2 +- src/lib/ecore/efl_io_sizer_fd.eo | 2 +- src/lib/ecore/efl_io_stderr.eo | 2 +- src/lib/ecore/efl_io_stdin.eo | 2 +- src/lib/ecore/efl_io_stdout.eo | 2 +- src/lib/ecore/efl_io_writer_fd.eo | 2 +- src/lib/ecore/efl_linear_interpolator.eo | 2 +- src/lib/ecore/efl_loop.eo | 2 +- src/lib/ecore/efl_loop_consumer.eo | 2 +- src/lib/ecore/efl_loop_fd.eo | 2 +- src/lib/ecore/efl_loop_handler.eo | 2 +- src/lib/ecore/efl_loop_message.eo | 2 +- src/lib/ecore/efl_loop_message_future.eo | 2 +- src/lib/ecore/efl_loop_message_future_handler.eo | 2 +- src/lib/ecore/efl_loop_message_handler.eo | 2 +- src/lib/ecore/efl_loop_model.eo | 2 +- src/lib/ecore/efl_loop_timer.eo | 2 +- src/lib/ecore/efl_select_model.eo | 2 +- src/lib/ecore/efl_sinusoidal_interpolator.eo | 2 +- src/lib/ecore/efl_spring_interpolator.eo | 2 +- src/lib/ecore/efl_task.eo | 2 +- src/lib/ecore/efl_thread.eo | 2 +- src/lib/ecore/efl_threadio.eo | 2 +- src/lib/ecore/efl_view_model.eo | 2 +- src/lib/ecore_con/efl_net_control_access_point.eo | 2 +- src/lib/ecore_con/efl_net_control_manager.eo | 2 +- src/lib/ecore_con/efl_net_control_technology.eo | 2 +- src/lib/ecore_con/efl_net_dialer.eo | 2 +- src/lib/ecore_con/efl_net_dialer_http.eo | 2 +- src/lib/ecore_con/efl_net_dialer_simple.eo | 2 +- src/lib/ecore_con/efl_net_dialer_ssl.eo | 2 +- src/lib/ecore_con/efl_net_dialer_tcp.eo | 2 +- src/lib/ecore_con/efl_net_dialer_udp.eo | 2 +- src/lib/ecore_con/efl_net_dialer_unix.eo | 2 +- src/lib/ecore_con/efl_net_dialer_websocket.eo | 2 +- src/lib/ecore_con/efl_net_dialer_windows.eo | 2 +- src/lib/ecore_con/efl_net_ip_address.eo | 2 +- src/lib/ecore_con/efl_net_server.eo | 2 +- src/lib/ecore_con/efl_net_server_fd.eo | 2 +- src/lib/ecore_con/efl_net_server_ip.eo | 2 +- src/lib/ecore_con/efl_net_server_simple.eo | 2 +- src/lib/ecore_con/efl_net_server_ssl.eo | 2 +- src/lib/ecore_con/efl_net_server_tcp.eo | 2 +- src/lib/ecore_con/efl_net_server_udp.eo | 2 +- src/lib/ecore_con/efl_net_server_udp_client.eo | 2 +- src/lib/ecore_con/efl_net_server_unix.eo | 2 +- src/lib/ecore_con/efl_net_server_windows.eo | 2 +- src/lib/ecore_con/efl_net_session.eo | 2 +- src/lib/ecore_con/efl_net_socket.eo | 2 +- src/lib/ecore_con/efl_net_socket_fd.eo | 2 +- src/lib/ecore_con/efl_net_socket_simple.eo | 2 +- src/lib/ecore_con/efl_net_socket_ssl.eo | 2 +- src/lib/ecore_con/efl_net_socket_tcp.eo | 2 +- src/lib/ecore_con/efl_net_socket_udp.eo | 2 +- src/lib/ecore_con/efl_net_socket_unix.eo | 2 +- src/lib/ecore_con/efl_net_socket_windows.eo | 2 +- src/lib/ecore_con/efl_net_ssl_context.eo | 2 +- src/lib/edje/efl_canvas_layout.eo | 2 +- src/lib/edje/efl_canvas_layout_part.eo | 2 +- src/lib/edje/efl_canvas_layout_part_box.eo | 2 +- src/lib/edje/efl_canvas_layout_part_external.eo | 2 +- src/lib/edje/efl_canvas_layout_part_invalid.eo | 2 +- src/lib/edje/efl_canvas_layout_part_swallow.eo | 2 +- src/lib/edje/efl_canvas_layout_part_table.eo | 2 +- src/lib/edje/efl_canvas_layout_part_text.eo | 2 +- src/lib/edje/efl_layout_calc.eo | 2 +- src/lib/edje/efl_layout_group.eo | 2 +- src/lib/edje/efl_layout_signal.eo | 2 +- src/lib/efl/Efl.h | 4 ++-- src/lib/efl/interfaces/efl_animator.eo | 2 +- src/lib/efl/interfaces/efl_cached_item.eo | 2 +- src/lib/efl/interfaces/efl_canvas_pointer.eo | 2 +- src/lib/efl/interfaces/efl_canvas_scene.eo | 2 +- src/lib/efl/interfaces/efl_config.eo | 2 +- src/lib/efl/interfaces/efl_container.eo | 2 +- src/lib/efl/interfaces/efl_content.eo | 2 +- src/lib/efl/interfaces/efl_control.eo | 2 +- src/lib/efl/interfaces/efl_duplicate.eo | 2 +- src/lib/efl/interfaces/efl_file.eo | 2 +- src/lib/efl/interfaces/efl_file_save.eo | 2 +- src/lib/efl/interfaces/efl_gfx_blur.eo | 2 +- src/lib/efl/interfaces/efl_gfx_buffer.eo | 2 +- src/lib/efl/interfaces/efl_gfx_color.eo | 2 +- src/lib/efl/interfaces/efl_gfx_color_class.eo | 2 +- src/lib/efl/interfaces/efl_gfx_entity.eo | 2 +- src/lib/efl/interfaces/efl_gfx_fill.eo | 2 +- src/lib/efl/interfaces/efl_gfx_filter.eo | 2 +- src/lib/efl/interfaces/efl_gfx_frame_controller.eo | 2 +- src/lib/efl/interfaces/efl_gfx_gradient.eo | 2 +- src/lib/efl/interfaces/efl_gfx_gradient_linear.eo | 2 +- src/lib/efl/interfaces/efl_gfx_gradient_radial.eo | 2 +- src/lib/efl/interfaces/efl_gfx_image.eo | 2 +- src/lib/efl/interfaces/efl_gfx_image_load_controller.eo | 2 +- src/lib/efl/interfaces/efl_gfx_path.eo | 2 +- src/lib/efl/interfaces/efl_gfx_shape.eo | 2 +- src/lib/efl/interfaces/efl_gfx_size_class.eo | 2 +- src/lib/efl/interfaces/efl_gfx_size_hint.eo | 2 +- src/lib/efl/interfaces/efl_gfx_stack.eo | 2 +- src/lib/efl/interfaces/efl_gfx_text_class.eo | 2 +- src/lib/efl/interfaces/efl_gfx_view.eo | 2 +- src/lib/efl/interfaces/efl_input_device.eo | 2 +- src/lib/efl/interfaces/efl_interpolator.eo | 2 +- src/lib/efl/interfaces/efl_io_buffer.eo | 2 +- src/lib/efl/interfaces/efl_io_closer.eo | 2 +- src/lib/efl/interfaces/efl_io_positioner.eo | 2 +- src/lib/efl/interfaces/efl_io_queue.eo | 2 +- src/lib/efl/interfaces/efl_io_reader.eo | 2 +- src/lib/efl/interfaces/efl_io_sizer.eo | 2 +- src/lib/efl/interfaces/efl_io_writer.eo | 2 +- src/lib/efl/interfaces/efl_model.eo | 2 +- src/lib/efl/interfaces/efl_observable.eo | 2 +- src/lib/efl/interfaces/efl_observer.eo | 2 +- src/lib/efl/interfaces/efl_orientation.eo | 2 +- src/lib/efl/interfaces/efl_pack.eo | 2 +- src/lib/efl/interfaces/efl_pack_layout.eo | 2 +- src/lib/efl/interfaces/efl_pack_linear.eo | 2 +- src/lib/efl/interfaces/efl_pack_table.eo | 2 +- src/lib/efl/interfaces/efl_part.eo | 2 +- src/lib/efl/interfaces/efl_playable.eo | 2 +- src/lib/efl/interfaces/efl_player.eo | 2 +- src/lib/efl/interfaces/efl_screen.eo | 2 +- src/lib/efl/interfaces/efl_text.eo | 2 +- src/lib/efl/interfaces/efl_text_annotate.eo | 2 +- src/lib/efl/interfaces/efl_text_cursor.eo | 2 +- src/lib/efl/interfaces/efl_text_font.eo | 2 +- src/lib/efl/interfaces/efl_text_format.eo | 2 +- src/lib/efl/interfaces/efl_text_markup.eo | 2 +- src/lib/efl/interfaces/efl_text_markup_interactive.eo | 2 +- src/lib/efl/interfaces/efl_text_markup_util.eo | 2 +- src/lib/efl/interfaces/efl_text_style.eo | 2 +- src/lib/efl/interfaces/efl_ui_autorepeat.eo | 2 +- src/lib/efl/interfaces/efl_ui_clickable.eo | 2 +- src/lib/efl/interfaces/efl_ui_direction.eo | 2 +- src/lib/efl/interfaces/efl_ui_direction_readonly.eo | 2 +- src/lib/efl/interfaces/efl_ui_drag.eo | 2 +- src/lib/efl/interfaces/efl_ui_draggable.eo | 2 +- src/lib/efl/interfaces/efl_ui_factory.eo | 2 +- src/lib/efl/interfaces/efl_ui_factory_bind.eo | 2 +- src/lib/efl/interfaces/efl_ui_format.eo | 2 +- src/lib/efl/interfaces/efl_ui_i18n.eo | 2 +- src/lib/efl/interfaces/efl_ui_menu.eo | 2 +- src/lib/efl/interfaces/efl_ui_multi_selectable.eo | 2 +- src/lib/efl/interfaces/efl_ui_property_bind.eo | 2 +- src/lib/efl/interfaces/efl_ui_range_display.eo | 2 +- src/lib/efl/interfaces/efl_ui_range_interactive.eo | 2 +- src/lib/efl/interfaces/efl_ui_scrollable.eo | 2 +- src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo | 2 +- src/lib/efl/interfaces/efl_ui_scrollbar.eo | 2 +- src/lib/efl/interfaces/efl_ui_selectable.eo | 2 +- src/lib/efl/interfaces/efl_ui_view.eo | 2 +- src/lib/efl/interfaces/efl_ui_zoom.eo | 2 +- src/lib/eio/efl_io_manager.eo | 2 +- src/lib/eio/efl_io_model.eo | 2 +- src/lib/elementary/efl_access_action.eo | 2 +- src/lib/elementary/efl_access_component.eo | 2 +- src/lib/elementary/efl_access_editable_text.eo | 2 +- src/lib/elementary/efl_access_object.eo | 2 +- src/lib/elementary/efl_access_selection.eo | 2 +- src/lib/elementary/efl_access_text.eo | 2 +- src/lib/elementary/efl_access_value.eo | 2 +- src/lib/elementary/efl_access_widget_action.eo | 2 +- src/lib/elementary/efl_access_window.eo | 2 +- src/lib/elementary/efl_config_global.eo | 2 +- src/lib/elementary/efl_datetime_manager.eo | 2 +- src/lib/elementary/efl_page_indicator.eo | 2 +- src/lib/elementary/efl_page_indicator_icon.eo | 2 +- src/lib/elementary/efl_page_transition.eo | 2 +- src/lib/elementary/efl_page_transition_scroll.eo | 2 +- src/lib/elementary/efl_text_interactive.eo | 2 +- src/lib/elementary/efl_ui_alert_popup.eo | 2 +- src/lib/elementary/efl_ui_alert_popup_part.eo | 2 +- src/lib/elementary/efl_ui_anchor_popup.eo | 2 +- src/lib/elementary/efl_ui_average_model.eo | 2 +- src/lib/elementary/efl_ui_bg.eo | 2 +- src/lib/elementary/efl_ui_bg_legacy.eo | 2 +- src/lib/elementary/efl_ui_box.eo | 2 +- src/lib/elementary/efl_ui_box_flow.eo | 2 +- src/lib/elementary/efl_ui_box_stack.eo | 2 +- src/lib/elementary/efl_ui_button.eo | 2 +- src/lib/elementary/efl_ui_button_legacy.eo | 2 +- src/lib/elementary/efl_ui_button_legacy_part.eo | 2 +- src/lib/elementary/efl_ui_caching_factory.eo | 2 +- src/lib/elementary/efl_ui_calendar.eo | 2 +- src/lib/elementary/efl_ui_calendar_item.eo | 2 +- src/lib/elementary/efl_ui_check.eo | 2 +- src/lib/elementary/efl_ui_check_legacy.eo | 2 +- src/lib/elementary/efl_ui_check_legacy_part.eo | 2 +- src/lib/elementary/efl_ui_clock.eo | 2 +- src/lib/elementary/efl_ui_clock_legacy.eo | 2 +- src/lib/elementary/efl_ui_cursor.eo | 2 +- src/lib/elementary/efl_ui_datepicker.eo | 2 +- src/lib/elementary/efl_ui_dnd.eo | 2 +- src/lib/elementary/efl_ui_dnd_container.eo | 2 +- src/lib/elementary/efl_ui_exact_model.eo | 2 +- src/lib/elementary/efl_ui_flip.eo | 2 +- src/lib/elementary/efl_ui_flip_legacy.eo | 2 +- src/lib/elementary/efl_ui_flip_part.eo | 2 +- src/lib/elementary/efl_ui_focus_composition.eo | 2 +- src/lib/elementary/efl_ui_focus_composition_adapter.eo | 2 +- src/lib/elementary/efl_ui_focus_layer.eo | 2 +- src/lib/elementary/efl_ui_focus_manager.eo | 2 +- src/lib/elementary/efl_ui_focus_manager_calc.eo | 2 +- src/lib/elementary/efl_ui_focus_manager_root_focus.eo | 2 +- src/lib/elementary/efl_ui_focus_manager_sub.eo | 2 +- src/lib/elementary/efl_ui_focus_manager_window_root.eo | 2 +- src/lib/elementary/efl_ui_focus_object.eo | 2 +- src/lib/elementary/efl_ui_focus_parent_provider.eo | 2 +- src/lib/elementary/efl_ui_focus_parent_provider_gen.eo | 2 +- src/lib/elementary/efl_ui_focus_parent_provider_standard.eo | 2 +- src/lib/elementary/efl_ui_focus_util.eo | 2 +- src/lib/elementary/efl_ui_frame.eo | 2 +- src/lib/elementary/efl_ui_frame_legacy.eo | 2 +- src/lib/elementary/efl_ui_grid.eo | 2 +- src/lib/elementary/efl_ui_grid_default_item.eo | 2 +- src/lib/elementary/efl_ui_grid_default_item_part_end.eo | 2 +- src/lib/elementary/efl_ui_grid_default_item_part_icon.eo | 2 +- src/lib/elementary/efl_ui_grid_item.eo | 2 +- src/lib/elementary/efl_ui_homogeneous_model.eo | 2 +- src/lib/elementary/efl_ui_image.eo | 2 +- src/lib/elementary/efl_ui_image_factory.eo | 2 +- src/lib/elementary/efl_ui_image_legacy.eo | 2 +- src/lib/elementary/efl_ui_image_zoomable.eo | 2 +- src/lib/elementary/efl_ui_image_zoomable_legacy.eo | 2 +- src/lib/elementary/efl_ui_image_zoomable_pan.eo | 2 +- src/lib/elementary/efl_ui_internal_text_interactive.eo | 2 +- src/lib/elementary/efl_ui_internal_text_scroller.eo | 2 +- src/lib/elementary/efl_ui_item.eo | 2 +- src/lib/elementary/efl_ui_l10n.eo | 2 +- src/lib/elementary/efl_ui_layout.eo | 2 +- src/lib/elementary/efl_ui_layout_factory.eo | 2 +- src/lib/elementary/efl_ui_layout_legacy.eo | 2 +- src/lib/elementary/efl_ui_layout_part.eo | 2 +- src/lib/elementary/efl_ui_layout_part_bg.eo | 2 +- src/lib/elementary/efl_ui_layout_part_box.eo | 2 +- src/lib/elementary/efl_ui_layout_part_content.eo | 2 +- src/lib/elementary/efl_ui_layout_part_legacy.eo | 2 +- src/lib/elementary/efl_ui_layout_part_table.eo | 2 +- src/lib/elementary/efl_ui_layout_part_text.eo | 2 +- src/lib/elementary/efl_ui_legacy.eo | 2 +- src/lib/elementary/efl_ui_list.eo | 2 +- src/lib/elementary/efl_ui_list_default_item.eo | 2 +- src/lib/elementary/efl_ui_list_default_item_part_end.eo | 2 +- src/lib/elementary/efl_ui_list_default_item_part_icon.eo | 2 +- src/lib/elementary/efl_ui_list_empty_item.eo | 2 +- src/lib/elementary/efl_ui_list_item.eo | 2 +- src/lib/elementary/efl_ui_list_view.eo | 2 +- src/lib/elementary/efl_ui_list_view_model.eo | 2 +- src/lib/elementary/efl_ui_list_view_pan.eo | 2 +- src/lib/elementary/efl_ui_list_view_precise_layouter.eo | 2 +- src/lib/elementary/efl_ui_list_view_relayout.eo | 2 +- src/lib/elementary/efl_ui_navigation_bar.eo | 2 +- src/lib/elementary/efl_ui_navigation_bar_part.eo | 2 +- src/lib/elementary/efl_ui_navigation_bar_part_back_button.eo | 2 +- src/lib/elementary/efl_ui_navigation_layout.eo | 2 +- src/lib/elementary/efl_ui_nstate.eo | 2 +- src/lib/elementary/efl_ui_pager.eo | 2 +- src/lib/elementary/efl_ui_pan.eo | 2 +- src/lib/elementary/efl_ui_panel.eo | 2 +- src/lib/elementary/efl_ui_panes.eo | 2 +- src/lib/elementary/efl_ui_panes_legacy.eo | 2 +- src/lib/elementary/efl_ui_panes_part.eo | 2 +- src/lib/elementary/efl_ui_popup.eo | 2 +- src/lib/elementary/efl_ui_popup_part_backwall.eo | 2 +- src/lib/elementary/efl_ui_progressbar.eo | 2 +- src/lib/elementary/efl_ui_progressbar_legacy.eo | 2 +- src/lib/elementary/efl_ui_progressbar_legacy_part.eo | 2 +- src/lib/elementary/efl_ui_progressbar_part.eo | 2 +- src/lib/elementary/efl_ui_radio.eo | 2 +- src/lib/elementary/efl_ui_radio_legacy.eo | 2 +- src/lib/elementary/efl_ui_radio_legacy_part.eo | 2 +- src/lib/elementary/efl_ui_scroll_alert_popup.eo | 2 +- src/lib/elementary/efl_ui_scroll_alert_popup_part.eo | 2 +- src/lib/elementary/efl_ui_scroll_manager.eo | 2 +- src/lib/elementary/efl_ui_scroller.eo | 2 +- src/lib/elementary/efl_ui_selection.eo | 2 +- src/lib/elementary/efl_ui_selection_manager.eo | 2 +- src/lib/elementary/efl_ui_size_model.eo | 2 +- src/lib/elementary/efl_ui_slider.eo | 2 +- src/lib/elementary/efl_ui_slider_interval.eo | 2 +- src/lib/elementary/efl_ui_spin.eo | 2 +- src/lib/elementary/efl_ui_spin_button.eo | 2 +- src/lib/elementary/efl_ui_stack.eo | 2 +- src/lib/elementary/efl_ui_state_model.eo | 2 +- src/lib/elementary/efl_ui_tab_bar.eo | 2 +- src/lib/elementary/efl_ui_tab_page.eo | 2 +- src/lib/elementary/efl_ui_tab_page_part_tab.eo | 2 +- src/lib/elementary/efl_ui_tab_pager.eo | 2 +- src/lib/elementary/efl_ui_table.eo | 2 +- src/lib/elementary/efl_ui_table_static.eo | 2 +- src/lib/elementary/efl_ui_tags.eo | 2 +- src/lib/elementary/efl_ui_text.eo | 2 +- src/lib/elementary/efl_ui_text_alert_popup.eo | 2 +- src/lib/elementary/efl_ui_text_alert_popup_part.eo | 2 +- src/lib/elementary/efl_ui_text_async.eo | 2 +- src/lib/elementary/efl_ui_text_editable.eo | 2 +- src/lib/elementary/efl_ui_text_factory_emoticons.eo | 2 +- src/lib/elementary/efl_ui_text_factory_fallback.eo | 2 +- src/lib/elementary/efl_ui_text_factory_images.eo | 2 +- src/lib/elementary/efl_ui_text_part.eo | 2 +- src/lib/elementary/efl_ui_textpath.eo | 2 +- src/lib/elementary/efl_ui_textpath_legacy.eo | 2 +- src/lib/elementary/efl_ui_textpath_part.eo | 2 +- src/lib/elementary/efl_ui_theme.eo | 2 +- src/lib/elementary/efl_ui_timepicker.eo | 2 +- src/lib/elementary/efl_ui_video.eo | 2 +- src/lib/elementary/efl_ui_video_legacy.eo | 2 +- src/lib/elementary/efl_ui_widget.eo | 2 +- src/lib/elementary/efl_ui_widget_factory.eo | 2 +- src/lib/elementary/efl_ui_widget_focus_manager.eo | 2 +- src/lib/elementary/efl_ui_widget_part.eo | 2 +- src/lib/elementary/efl_ui_widget_part_bg.eo | 2 +- src/lib/elementary/efl_ui_widget_part_shadow.eo | 2 +- src/lib/elementary/efl_ui_win.eo | 2 +- src/lib/elementary/efl_ui_win_inlined.eo | 2 +- src/lib/elementary/efl_ui_win_inlined_legacy.eo | 2 +- src/lib/elementary/efl_ui_win_legacy.eo | 2 +- src/lib/elementary/efl_ui_win_part.eo | 2 +- src/lib/elementary/efl_ui_win_socket.eo | 2 +- src/lib/elementary/efl_ui_win_socket_legacy.eo | 2 +- src/lib/emotion/efl_canvas_video.eo | 2 +- src/lib/eo/efl_class.eo | 2 +- src/lib/eo/efl_object.eo | 2 +- src/lib/eo/efl_object_override.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_alpha.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_group.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_player.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_rotate.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_scale.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_translate.eo | 2 +- src/lib/evas/canvas/efl_canvas_event_grabber.eo | 2 +- src/lib/evas/canvas/efl_canvas_filter_internal.eo | 2 +- src/lib/evas/canvas/efl_canvas_group.eo | 2 +- src/lib/evas/canvas/efl_canvas_image.eo | 2 +- src/lib/evas/canvas/efl_canvas_image_internal.eo | 2 +- src/lib/evas/canvas/efl_canvas_object.eo | 2 +- src/lib/evas/canvas/efl_canvas_polygon.eo | 2 +- src/lib/evas/canvas/efl_canvas_proxy.eo | 2 +- src/lib/evas/canvas/efl_canvas_rectangle.eo | 2 +- src/lib/evas/canvas/efl_canvas_scene3d.eo | 2 +- src/lib/evas/canvas/efl_canvas_snapshot.eo | 2 +- src/lib/evas/canvas/efl_canvas_surface.eo | 2 +- src/lib/evas/canvas/efl_canvas_surface_tbm.eo | 2 +- src/lib/evas/canvas/efl_canvas_surface_wayland.eo | 2 +- src/lib/evas/canvas/efl_canvas_surface_x11.eo | 2 +- src/lib/evas/canvas/efl_canvas_text.eo | 2 +- src/lib/evas/canvas/efl_canvas_text_factory.eo | 2 +- src/lib/evas/canvas/efl_canvas_vg_container.eo | 2 +- src/lib/evas/canvas/efl_canvas_vg_gradient.eo | 2 +- src/lib/evas/canvas/efl_canvas_vg_gradient_linear.eo | 2 +- src/lib/evas/canvas/efl_canvas_vg_gradient_radial.eo | 2 +- src/lib/evas/canvas/efl_canvas_vg_node.eo | 2 +- src/lib/evas/canvas/efl_canvas_vg_object.eo | 2 +- src/lib/evas/canvas/efl_canvas_vg_shape.eo | 2 +- src/lib/evas/canvas/efl_gfx_map.eo | 2 +- src/lib/evas/canvas/efl_input_event.eo | 2 +- src/lib/evas/canvas/efl_input_focus.eo | 2 +- src/lib/evas/canvas/efl_input_hold.eo | 2 +- src/lib/evas/canvas/efl_input_interface.eo | 2 +- src/lib/evas/canvas/efl_input_key.eo | 2 +- src/lib/evas/canvas/efl_input_pointer.eo | 2 +- src/lib/evas/canvas/efl_input_state.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_manager.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo | 2 +- .../evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_tap.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_touch.eo | 2 +- 393 files changed, 394 insertions(+), 394 deletions(-) diff --git a/src/lib/ecore/efl_accelerate_interpolator.eo b/src/lib/ecore/efl_accelerate_interpolator.eo index 793f8b6212..9af36694af 100644 --- a/src/lib/ecore/efl_accelerate_interpolator.eo +++ b/src/lib/ecore/efl_accelerate_interpolator.eo @@ -1,4 +1,4 @@ -class Efl.Accelerate_Interpolator extends Efl.Object implements Efl.Interpolator +class @beta Efl.Accelerate_Interpolator extends Efl.Object implements Efl.Interpolator { [[Efl accelerate interpolator class diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo index e046428626..61d0065a42 100644 --- a/src/lib/ecore/efl_app.eo +++ b/src/lib/ecore/efl_app.eo @@ -1,6 +1,6 @@ import efl_types; -class Efl.App extends Efl.Loop implements Efl.Core.Command_Line +class @beta Efl.App extends Efl.Loop implements Efl.Core.Command_Line { [[ ]] data: null; diff --git a/src/lib/ecore/efl_appthread.eo b/src/lib/ecore/efl_appthread.eo index 82a9d77ace..076a1506ee 100644 --- a/src/lib/ecore/efl_appthread.eo +++ b/src/lib/ecore/efl_appthread.eo @@ -1,4 +1,4 @@ -class Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line +class @beta Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line { [[ ]] methods { diff --git a/src/lib/ecore/efl_boolean_model.eo b/src/lib/ecore/efl_boolean_model.eo index ab6c2e80bb..19f8f02935 100644 --- a/src/lib/ecore/efl_boolean_model.eo +++ b/src/lib/ecore/efl_boolean_model.eo @@ -1,4 +1,4 @@ -class Efl.Boolean_Model extends Efl.Composite_Model +class @beta Efl.Boolean_Model extends Efl.Composite_Model { [[Efl boolean model class]] methods { diff --git a/src/lib/ecore/efl_bounce_interpolator.eo b/src/lib/ecore/efl_bounce_interpolator.eo index 85dc219ec2..d6b1147d17 100644 --- a/src/lib/ecore/efl_bounce_interpolator.eo +++ b/src/lib/ecore/efl_bounce_interpolator.eo @@ -1,4 +1,4 @@ -class Efl.Bounce_Interpolator extends Efl.Object implements Efl.Interpolator +class @beta Efl.Bounce_Interpolator extends Efl.Object implements Efl.Interpolator { [[Efl bounce interpolator class]] data: Efl_Bounce_Interpolator_Data; diff --git a/src/lib/ecore/efl_composite_model.eo b/src/lib/ecore/efl_composite_model.eo index b1b3cc7ef5..18a60bcd49 100644 --- a/src/lib/ecore/efl_composite_model.eo +++ b/src/lib/ecore/efl_composite_model.eo @@ -1,4 +1,4 @@ -class Efl.Composite_Model extends Efl.Loop_Model implements Efl.Ui.View +class @beta Efl.Composite_Model extends Efl.Loop_Model implements Efl.Ui.View { [[Efl model for all composite class which provide a unified API to set source of data. diff --git a/src/lib/ecore/efl_container_model.eo b/src/lib/ecore/efl_container_model.eo index 10c6515c51..9ee441587f 100644 --- a/src/lib/ecore/efl_container_model.eo +++ b/src/lib/ecore/efl_container_model.eo @@ -1,6 +1,6 @@ import eina_types; -class Efl.Container_Model extends Efl.Loop_Model +class @beta Efl.Container_Model extends Efl.Loop_Model { [[ Class used to create data models from Eina containers. diff --git a/src/lib/ecore/efl_container_model_item.eo b/src/lib/ecore/efl_container_model_item.eo index 779806ebf5..7fe818600e 100644 --- a/src/lib/ecore/efl_container_model_item.eo +++ b/src/lib/ecore/efl_container_model_item.eo @@ -1,4 +1,4 @@ -class Efl.Container_Model_Item extends Efl.Object implements Efl.Model +class @beta Efl.Container_Model_Item extends Efl.Object implements Efl.Model { [[ Used as a child of @Efl.Container_Model. diff --git a/src/lib/ecore/efl_core_command_line.eo b/src/lib/ecore/efl_core_command_line.eo index 1cbb020856..436720d9bd 100644 --- a/src/lib/ecore/efl_core_command_line.eo +++ b/src/lib/ecore/efl_core_command_line.eo @@ -1,4 +1,4 @@ -mixin Efl.Core.Command_Line { +mixin @beta Efl.Core.Command_Line { [[A mixin that implements standard functions for command lines. This object parses the command line that gets passed, later the object can be accessed via accessor or the string directly. diff --git a/src/lib/ecore/efl_core_env.eo b/src/lib/ecore/efl_core_env.eo index 86da8c14ff..5aaaa3a263 100644 --- a/src/lib/ecore/efl_core_env.eo +++ b/src/lib/ecore/efl_core_env.eo @@ -1,4 +1,4 @@ -class Efl.Core.Env extends Efl.Object implements Efl.Duplicate { +class @beta Efl.Core.Env extends Efl.Object implements Efl.Duplicate { [[This object can maintain a set of key value pairs A object of this type alone does not apply the object to the system. diff --git a/src/lib/ecore/efl_core_proc_env.eo b/src/lib/ecore/efl_core_proc_env.eo index 23c2c67d75..07840548dd 100644 --- a/src/lib/ecore/efl_core_proc_env.eo +++ b/src/lib/ecore/efl_core_proc_env.eo @@ -1,4 +1,4 @@ -class Efl.Core.Proc_Env extends Efl.Core.Env +class @beta Efl.Core.Proc_Env extends Efl.Core.Env { eo_prefix : efl_env; methods { diff --git a/src/lib/ecore/efl_cubic_bezier_interpolator.eo b/src/lib/ecore/efl_cubic_bezier_interpolator.eo index a4dd964bb6..c6dd1449d2 100644 --- a/src/lib/ecore/efl_cubic_bezier_interpolator.eo +++ b/src/lib/ecore/efl_cubic_bezier_interpolator.eo @@ -1,4 +1,4 @@ -class Efl.Cubic_Bezier_Interpolator extends Efl.Object implements Efl.Interpolator +class @beta Efl.Cubic_Bezier_Interpolator extends Efl.Object implements Efl.Interpolator { [[Efl cubic_bezier interpolator class]] data: Efl_Cubic_Bezier_Interpolator_Data; diff --git a/src/lib/ecore/efl_decelerate_interpolator.eo b/src/lib/ecore/efl_decelerate_interpolator.eo index 3e376f8976..802d409b2d 100644 --- a/src/lib/ecore/efl_decelerate_interpolator.eo +++ b/src/lib/ecore/efl_decelerate_interpolator.eo @@ -1,4 +1,4 @@ -class Efl.Decelerate_Interpolator extends Efl.Object implements Efl.Interpolator +class @beta Efl.Decelerate_Interpolator extends Efl.Object implements Efl.Interpolator { [[Efl decelerate interpolator class diff --git a/src/lib/ecore/efl_divisor_interpolator.eo b/src/lib/ecore/efl_divisor_interpolator.eo index f9baae503c..848c44bf6e 100644 --- a/src/lib/ecore/efl_divisor_interpolator.eo +++ b/src/lib/ecore/efl_divisor_interpolator.eo @@ -1,4 +1,4 @@ -class Efl.Divisor_Interpolator extends Efl.Object implements Efl.Interpolator +class @beta Efl.Divisor_Interpolator extends Efl.Object implements Efl.Interpolator { [[Efl divisor interpolator class]] data: Efl_Divisor_Interpolator_Data; diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index b7f97da7dc..0d3c29e7f2 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -19,7 +19,7 @@ enum Efl.Exe_Flags { hide_io = 4 } -class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer,Efl.Core.Command_Line +class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer,Efl.Core.Command_Line { [[ ]] methods { diff --git a/src/lib/ecore/efl_generic_model.eo b/src/lib/ecore/efl_generic_model.eo index 4509027a17..bb67dafbc5 100644 --- a/src/lib/ecore/efl_generic_model.eo +++ b/src/lib/ecore/efl_generic_model.eo @@ -1,4 +1,4 @@ -class Efl.Generic_Model extends Efl.Loop_Model +class @beta Efl.Generic_Model extends Efl.Loop_Model { [[ Generic model that allows any property to be manually set. diff --git a/src/lib/ecore/efl_io_buffered_stream.eo b/src/lib/ecore/efl_io_buffered_stream.eo index 8e22b828af..c61248b30d 100644 --- a/src/lib/ecore/efl_io_buffered_stream.eo +++ b/src/lib/ecore/efl_io_buffered_stream.eo @@ -1,4 +1,4 @@ -class Efl.Io.Buffered_Stream extends Efl.Loop_Consumer implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer { +class @beta Efl.Io.Buffered_Stream extends Efl.Loop_Consumer implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer { [[A wrapper object offering easy to use buffered streams over existing I/O class. The buffered stream encapsulates an actual @Efl.Io.Reader or diff --git a/src/lib/ecore/efl_io_closer_fd.eo b/src/lib/ecore/efl_io_closer_fd.eo index e601f582ad..c927cb5b2d 100644 --- a/src/lib/ecore/efl_io_closer_fd.eo +++ b/src/lib/ecore/efl_io_closer_fd.eo @@ -1,4 +1,4 @@ -mixin Efl.Io.Closer_Fd requires Efl.Object extends Efl.Io.Closer { +mixin @beta Efl.Io.Closer_Fd requires Efl.Object extends Efl.Io.Closer { [[Close fd using close(2). @since 1.19 diff --git a/src/lib/ecore/efl_io_copier.eo b/src/lib/ecore/efl_io_copier.eo index 2565fba66f..ba4412f359 100644 --- a/src/lib/ecore/efl_io_copier.eo +++ b/src/lib/ecore/efl_io_copier.eo @@ -1,6 +1,6 @@ import eina_types; -class Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer { +class @beta Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer { [[Copy from an @Efl.Io.Reader source to @Efl.Io.Writer destination. During usage it will keep reference to @.source and diff --git a/src/lib/ecore/efl_io_file.eo b/src/lib/ecore/efl_io_file.eo index c0b48c381d..c663b723c5 100644 --- a/src/lib/ecore/efl_io_file.eo +++ b/src/lib/ecore/efl_io_file.eo @@ -1,4 +1,4 @@ -class Efl.Io.File extends Efl.Loop_Fd implements Efl.File, Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Efl.Io.Closer_Fd, Efl.Io.Sizer_Fd, Efl.Io.Positioner_Fd { +class @beta Efl.Io.File extends Efl.Loop_Fd implements Efl.File, Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Efl.Io.Closer_Fd, Efl.Io.Sizer_Fd, Efl.Io.Positioner_Fd { [[File access (open, close, read, write, lseek, ftruncate) @Efl.Io.Closer.close_on_exec and diff --git a/src/lib/ecore/efl_io_positioner_fd.eo b/src/lib/ecore/efl_io_positioner_fd.eo index ed9cd22f15..f5169e10be 100644 --- a/src/lib/ecore/efl_io_positioner_fd.eo +++ b/src/lib/ecore/efl_io_positioner_fd.eo @@ -1,4 +1,4 @@ -mixin Efl.Io.Positioner_Fd extends Efl.Io.Positioner { +mixin @beta Efl.Io.Positioner_Fd extends Efl.Io.Positioner { [[Positions fd using lseek(2). @since 1.19 diff --git a/src/lib/ecore/efl_io_reader_fd.eo b/src/lib/ecore/efl_io_reader_fd.eo index 30b95b31ef..9c6fc83bae 100644 --- a/src/lib/ecore/efl_io_reader_fd.eo +++ b/src/lib/ecore/efl_io_reader_fd.eo @@ -1,4 +1,4 @@ -mixin Efl.Io.Reader_Fd extends Efl.Io.Reader { +mixin @beta Efl.Io.Reader_Fd extends Efl.Io.Reader { [[Reads fd using read(2). @since 1.19 diff --git a/src/lib/ecore/efl_io_sizer_fd.eo b/src/lib/ecore/efl_io_sizer_fd.eo index 9320324447..6eb12ad8b7 100644 --- a/src/lib/ecore/efl_io_sizer_fd.eo +++ b/src/lib/ecore/efl_io_sizer_fd.eo @@ -1,4 +1,4 @@ -mixin Efl.Io.Sizer_Fd extends Efl.Io.Sizer { +mixin @beta Efl.Io.Sizer_Fd extends Efl.Io.Sizer { [[Resizes fd usign ftruncate(2). @since 1.19 diff --git a/src/lib/ecore/efl_io_stderr.eo b/src/lib/ecore/efl_io_stderr.eo index c8ecff3dd4..f183e371e2 100644 --- a/src/lib/ecore/efl_io_stderr.eo +++ b/src/lib/ecore/efl_io_stderr.eo @@ -1,4 +1,4 @@ -class Efl.Io.Stderr extends Efl.Loop_Fd implements Efl.Io.Writer_Fd { +class @beta Efl.Io.Stderr extends Efl.Loop_Fd implements Efl.Io.Writer_Fd { [[Application's standard error (stderr). @since 1.19 diff --git a/src/lib/ecore/efl_io_stdin.eo b/src/lib/ecore/efl_io_stdin.eo index 1d4b914e60..75645d2461 100644 --- a/src/lib/ecore/efl_io_stdin.eo +++ b/src/lib/ecore/efl_io_stdin.eo @@ -1,4 +1,4 @@ -class Efl.Io.Stdin extends Efl.Loop_Fd implements Efl.Io.Reader_Fd { +class @beta Efl.Io.Stdin extends Efl.Loop_Fd implements Efl.Io.Reader_Fd { [[Application's standard input (stdin). @since 1.19 diff --git a/src/lib/ecore/efl_io_stdout.eo b/src/lib/ecore/efl_io_stdout.eo index 1bc7099397..66497b1211 100644 --- a/src/lib/ecore/efl_io_stdout.eo +++ b/src/lib/ecore/efl_io_stdout.eo @@ -1,4 +1,4 @@ -class Efl.Io.Stdout extends Efl.Loop_Fd implements Efl.Io.Writer_Fd { +class @beta Efl.Io.Stdout extends Efl.Loop_Fd implements Efl.Io.Writer_Fd { [[Application's standard output (stdout). @since 1.19 diff --git a/src/lib/ecore/efl_io_writer_fd.eo b/src/lib/ecore/efl_io_writer_fd.eo index b43b8b1d0d..70fe627725 100644 --- a/src/lib/ecore/efl_io_writer_fd.eo +++ b/src/lib/ecore/efl_io_writer_fd.eo @@ -1,4 +1,4 @@ -mixin Efl.Io.Writer_Fd extends Efl.Io.Writer { +mixin @beta Efl.Io.Writer_Fd extends Efl.Io.Writer { [[Writes fd using write(2). @since 1.19 diff --git a/src/lib/ecore/efl_linear_interpolator.eo b/src/lib/ecore/efl_linear_interpolator.eo index 748a3be384..e22e980552 100644 --- a/src/lib/ecore/efl_linear_interpolator.eo +++ b/src/lib/ecore/efl_linear_interpolator.eo @@ -1,4 +1,4 @@ -class Efl.Linear_Interpolator extends Efl.Object implements Efl.Interpolator +class @beta Efl.Linear_Interpolator extends Efl.Object implements Efl.Interpolator { [[Efl linear interpolator class]] data: Efl_Linear_Interpolator_Data; diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index 7480eee867..737c641cf4 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -4,7 +4,7 @@ struct Efl.Loop_Arguments { initialization: bool; [[Set to $true when the program should initialize its internal state. This happen once per process instance.]] } -class Efl.Loop extends Efl.Task +class @beta Efl.Loop extends Efl.Task { [[The Efl Main Loop diff --git a/src/lib/ecore/efl_loop_consumer.eo b/src/lib/ecore/efl_loop_consumer.eo index f03a4d6d86..2f9122075c 100644 --- a/src/lib/ecore/efl_loop_consumer.eo +++ b/src/lib/ecore/efl_loop_consumer.eo @@ -1,4 +1,4 @@ -abstract Efl.Loop_Consumer extends Efl.Object +abstract @beta Efl.Loop_Consumer extends Efl.Object { [[An @Efl.Loop_Consumer is a class which requires one of the parents to provide an @Efl.Loop interface when performing @Efl.Object.provider_find. It will enforce this by diff --git a/src/lib/ecore/efl_loop_fd.eo b/src/lib/ecore/efl_loop_fd.eo index 5ced4e709f..7c8faa1b39 100644 --- a/src/lib/ecore/efl_loop_fd.eo +++ b/src/lib/ecore/efl_loop_fd.eo @@ -1,4 +1,4 @@ -class Efl.Loop_Fd extends Efl.Loop_Consumer +class @beta Efl.Loop_Fd extends Efl.Loop_Consumer { [[Fds are objects that watch the activity on a given file descriptor. This file descriptor can be a diff --git a/src/lib/ecore/efl_loop_handler.eo b/src/lib/ecore/efl_loop_handler.eo index aab8443132..148759d0c0 100644 --- a/src/lib/ecore/efl_loop_handler.eo +++ b/src/lib/ecore/efl_loop_handler.eo @@ -7,7 +7,7 @@ enum Efl.Loop_Handler_Flags { error = 4, [[ Error channel input is desired ]] } -class Efl.Loop_Handler extends Efl.Object +class @beta Efl.Loop_Handler extends Efl.Object { [[ An object that describes an low-level source of I/O to listen to for available data to be read or written, depending on the OS and data diff --git a/src/lib/ecore/efl_loop_message.eo b/src/lib/ecore/efl_loop_message.eo index ef5ec0ce2a..5a1877c424 100644 --- a/src/lib/ecore/efl_loop_message.eo +++ b/src/lib/ecore/efl_loop_message.eo @@ -1,4 +1,4 @@ -class Efl.Loop_Message extends Efl.Object +class @beta Efl.Loop_Message extends Efl.Object { [[Base message payload object class. Inherit this and extend for specific message types.]] diff --git a/src/lib/ecore/efl_loop_message_future.eo b/src/lib/ecore/efl_loop_message_future.eo index 047c1c4b6a..f1c508d18f 100644 --- a/src/lib/ecore/efl_loop_message_future.eo +++ b/src/lib/ecore/efl_loop_message_future.eo @@ -1,4 +1,4 @@ -class Efl.Loop_Message_Future extends Efl.Loop_Message +class @beta Efl.Loop_Message_Future extends Efl.Loop_Message { [[ Used internally for futures on the loop ]] methods { diff --git a/src/lib/ecore/efl_loop_message_future_handler.eo b/src/lib/ecore/efl_loop_message_future_handler.eo index a676555aca..34e0a5982e 100644 --- a/src/lib/ecore/efl_loop_message_future_handler.eo +++ b/src/lib/ecore/efl_loop_message_future_handler.eo @@ -1,4 +1,4 @@ -class Efl.Loop_Message_Future_Handler extends Efl.Loop_Message_Handler +class @beta Efl.Loop_Message_Future_Handler extends Efl.Loop_Message_Handler { [[ Internal use for future on an efl loop - replacing legacy ecore events ]] methods { diff --git a/src/lib/ecore/efl_loop_message_handler.eo b/src/lib/ecore/efl_loop_message_handler.eo index 291b0bc6af..3fb60a8168 100644 --- a/src/lib/ecore/efl_loop_message_handler.eo +++ b/src/lib/ecore/efl_loop_message_handler.eo @@ -1,4 +1,4 @@ -class Efl.Loop_Message_Handler extends Efl.Object +class @beta Efl.Loop_Message_Handler extends Efl.Object { [[Message handlers represent a single message type on the Efl.Loop parent object. These message handlers can be used to listen for diff --git a/src/lib/ecore/efl_loop_model.eo b/src/lib/ecore/efl_loop_model.eo index cf11e56242..72e094f221 100644 --- a/src/lib/ecore/efl_loop_model.eo +++ b/src/lib/ecore/efl_loop_model.eo @@ -1,4 +1,4 @@ -abstract Efl.Loop_Model extends Efl.Loop_Consumer implements Efl.Model +abstract @beta Efl.Loop_Model extends Efl.Loop_Consumer implements Efl.Model { data: null; implements { diff --git a/src/lib/ecore/efl_loop_timer.eo b/src/lib/ecore/efl_loop_timer.eo index b5b025e7ec..218223a1a3 100644 --- a/src/lib/ecore/efl_loop_timer.eo +++ b/src/lib/ecore/efl_loop_timer.eo @@ -1,4 +1,4 @@ -class Efl.Loop_Timer extends Efl.Loop_Consumer +class @beta Efl.Loop_Timer extends Efl.Loop_Consumer { [[Timers are objects that will call a given callback at some point in the future and repeat that tick at a given interval. diff --git a/src/lib/ecore/efl_select_model.eo b/src/lib/ecore/efl_select_model.eo index 3300abcb5e..ed7821fa68 100644 --- a/src/lib/ecore/efl_select_model.eo +++ b/src/lib/ecore/efl_select_model.eo @@ -1,4 +1,4 @@ -class Efl.Select_Model extends Efl.Boolean_Model +class @beta Efl.Select_Model extends Efl.Boolean_Model { [[Efl select model class]] implements { diff --git a/src/lib/ecore/efl_sinusoidal_interpolator.eo b/src/lib/ecore/efl_sinusoidal_interpolator.eo index 2f644ff354..e0701aa5d3 100644 --- a/src/lib/ecore/efl_sinusoidal_interpolator.eo +++ b/src/lib/ecore/efl_sinusoidal_interpolator.eo @@ -1,4 +1,4 @@ -class Efl.Sinusoidal_Interpolator extends Efl.Object implements Efl.Interpolator +class @beta Efl.Sinusoidal_Interpolator extends Efl.Object implements Efl.Interpolator { [[Efl sinusoidal interpolator class diff --git a/src/lib/ecore/efl_spring_interpolator.eo b/src/lib/ecore/efl_spring_interpolator.eo index 14593425a4..5549046ff4 100644 --- a/src/lib/ecore/efl_spring_interpolator.eo +++ b/src/lib/ecore/efl_spring_interpolator.eo @@ -1,4 +1,4 @@ -class Efl.Spring_Interpolator extends Efl.Object implements Efl.Interpolator +class @beta Efl.Spring_Interpolator extends Efl.Object implements Efl.Interpolator { [[Efl spring interpolator class]] data: Efl_Spring_Interpolator_Data; diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index ddab5e6826..f3c1ac9b4f 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -15,7 +15,7 @@ enum Efl.Task_Flags { no_exit_code_error = 4, } -abstract Efl.Task extends Efl.Object +abstract @beta Efl.Task extends Efl.Object { [[ ]] methods { diff --git a/src/lib/ecore/efl_thread.eo b/src/lib/ecore/efl_thread.eo index 02bf2f15df..b935077d8e 100644 --- a/src/lib/ecore/efl_thread.eo +++ b/src/lib/ecore/efl_thread.eo @@ -1,4 +1,4 @@ -class Efl.Thread extends Efl.Task implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line +class @beta Efl.Thread extends Efl.Task implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line { methods { } diff --git a/src/lib/ecore/efl_threadio.eo b/src/lib/ecore/efl_threadio.eo index 1d3af45cdc..25b1ba29a7 100644 --- a/src/lib/ecore/efl_threadio.eo +++ b/src/lib/ecore/efl_threadio.eo @@ -15,7 +15,7 @@ function EFlThreadIOCallSync { return: void_ptr; [[ ]] }; -mixin Efl.ThreadIO +mixin @beta Efl.ThreadIO { [[ ]] methods { diff --git a/src/lib/ecore/efl_view_model.eo b/src/lib/ecore/efl_view_model.eo index 349a5a4e77..432bfe8499 100644 --- a/src/lib/ecore/efl_view_model.eo +++ b/src/lib/ecore/efl_view_model.eo @@ -17,7 +17,7 @@ function EflViewModelPropertySet { return: future; [[The value that was finally set.]] }; -class Efl.View_Model extends Efl.Composite_Model +class @beta Efl.View_Model extends Efl.Composite_Model { [[Efl model providing helpers for custom properties used when linking a model to a view and you need to generate/adapt values for display. diff --git a/src/lib/ecore_con/efl_net_control_access_point.eo b/src/lib/ecore_con/efl_net_control_access_point.eo index 53903032f9..7d3d9364ac 100644 --- a/src/lib/ecore_con/efl_net_control_access_point.eo +++ b/src/lib/ecore_con/efl_net_control_access_point.eo @@ -74,7 +74,7 @@ enum Efl.Net.Control.Access_Point_Proxy_Method { unset, [[Only to be used with @Efl.Net.Control.Access_Point.configuration_proxy.]] } -class Efl.Net.Control.Access_Point extends Efl.Loop_Consumer { +class @beta Efl.Net.Control.Access_Point extends Efl.Loop_Consumer { [[An access point for network connectivity. The @Efl.Net.Control.Manager is composed of multiple technologies, each diff --git a/src/lib/ecore_con/efl_net_control_manager.eo b/src/lib/ecore_con/efl_net_control_manager.eo index 5afdeb465c..448bdba362 100644 --- a/src/lib/ecore_con/efl_net_control_manager.eo +++ b/src/lib/ecore_con/efl_net_control_manager.eo @@ -65,7 +65,7 @@ struct Efl.Net.Control.Agent_Browser_Url { url: string; [[The URL to point the browser at.]] } -class Efl.Net.Control.Manager extends Efl.Loop_Consumer { +class @beta Efl.Net.Control.Manager extends Efl.Loop_Consumer { [[Controls network connectivity. This class and its child objects are only useful to implement diff --git a/src/lib/ecore_con/efl_net_control_technology.eo b/src/lib/ecore_con/efl_net_control_technology.eo index ccc2cf6e8f..947aa11ac3 100644 --- a/src/lib/ecore_con/efl_net_control_technology.eo +++ b/src/lib/ecore_con/efl_net_control_technology.eo @@ -15,7 +15,7 @@ enum Efl.Net.Control.Technology_Type { p2p, [[Type: Peer-2-Peer]] } -class Efl.Net.Control.Technology extends Efl.Loop_Consumer { +class @beta Efl.Net.Control.Technology extends Efl.Loop_Consumer { [[A technology that allows control of network access points. The @Efl.Net.Control.Manager is composed of multiple technologies, each diff --git a/src/lib/ecore_con/efl_net_dialer.eo b/src/lib/ecore_con/efl_net_dialer.eo index 1b7b2e9c16..7abba99b1a 100644 --- a/src/lib/ecore_con/efl_net_dialer.eo +++ b/src/lib/ecore_con/efl_net_dialer.eo @@ -2,7 +2,7 @@ var Efl.Net.Dialer_Error.COULDNT_CONNECT: Eina.Error; [[The dialer could not con var Efl.Net.Dialer_Error.COULDNT_RESOLVE_PROXY: Eina.Error; [[The dialer could not resolve the given proxy server]] var Efl.Net.Dialer_Error.PROXY_AUTHENTICATION_FAILED: Eina.Error; [[The dialer failed to authenticate against the proxy server]] -interface Efl.Net.Dialer extends Efl.Net.Socket { +interface @beta Efl.Net.Dialer extends Efl.Net.Socket { [[Creates a client socket to reach a remote peer. The connection process starts when @.dial is executed. This diff --git a/src/lib/ecore_con/efl_net_dialer_http.eo b/src/lib/ecore_con/efl_net_dialer_http.eo index 18c0c35e0b..032c5c7bbb 100644 --- a/src/lib/ecore_con/efl_net_dialer_http.eo +++ b/src/lib/ecore_con/efl_net_dialer_http.eo @@ -7,7 +7,7 @@ enum Efl.Net.Dialer_Http_Primary_Mode { upload, [[HTTP upload mode]] } -class Efl.Net.Dialer_Http extends Efl.Loop_Consumer implements Efl.Net.Dialer, Efl.Io.Sizer { +class @beta Efl.Net.Dialer_Http extends Efl.Loop_Consumer implements Efl.Net.Dialer, Efl.Io.Sizer { [[HTTP Dialer (Client). The effective URL in use, if @.allow_redirects is $true will be diff --git a/src/lib/ecore_con/efl_net_dialer_simple.eo b/src/lib/ecore_con/efl_net_dialer_simple.eo index 0a5aa941b2..e28c929dd1 100644 --- a/src/lib/ecore_con/efl_net_dialer_simple.eo +++ b/src/lib/ecore_con/efl_net_dialer_simple.eo @@ -1,4 +1,4 @@ -class Efl.Net.Dialer_Simple extends Efl.Net.Socket_Simple implements Efl.Net.Dialer { +class @beta Efl.Net.Dialer_Simple extends Efl.Net.Socket_Simple implements Efl.Net.Dialer { [[Connects to a remote server offering an easy to use, buffered I/O. The simple dialer is based on @Efl.Net.Socket_Simple, which diff --git a/src/lib/ecore_con/efl_net_dialer_ssl.eo b/src/lib/ecore_con/efl_net_dialer_ssl.eo index 832361bbea..a80c063aec 100644 --- a/src/lib/ecore_con/efl_net_dialer_ssl.eo +++ b/src/lib/ecore_con/efl_net_dialer_ssl.eo @@ -1,4 +1,4 @@ -class Efl.Net.Dialer_Ssl extends Efl.Net.Socket_Ssl implements Efl.Net.Dialer { +class @beta Efl.Net.Dialer_Ssl extends Efl.Net.Socket_Ssl implements Efl.Net.Dialer { [[Connects to a remote SSL server using TCP. This creates an internal @Efl.Net.Dialer_Tcp and once connected diff --git a/src/lib/ecore_con/efl_net_dialer_tcp.eo b/src/lib/ecore_con/efl_net_dialer_tcp.eo index 75c7deeefc..fdbf7d3797 100644 --- a/src/lib/ecore_con/efl_net_dialer_tcp.eo +++ b/src/lib/ecore_con/efl_net_dialer_tcp.eo @@ -1,4 +1,4 @@ -class Efl.Net.Dialer_Tcp extends Efl.Net.Socket_Tcp implements Efl.Net.Dialer { +class @beta Efl.Net.Dialer_Tcp extends Efl.Net.Socket_Tcp implements Efl.Net.Dialer { [[Connects to a remote TCP server. If the proxy is NULL (default), then the system proxy will be diff --git a/src/lib/ecore_con/efl_net_dialer_udp.eo b/src/lib/ecore_con/efl_net_dialer_udp.eo index af7aeec1bd..709031a71e 100644 --- a/src/lib/ecore_con/efl_net_dialer_udp.eo +++ b/src/lib/ecore_con/efl_net_dialer_udp.eo @@ -1,4 +1,4 @@ -class Efl.Net.Dialer_Udp extends Efl.Net.Socket_Udp implements Efl.Net.Dialer { +class @beta Efl.Net.Dialer_Udp extends Efl.Net.Socket_Udp implements Efl.Net.Dialer { [[Connects to a remote UDP server. UDP proxies are not supported, not even using SOCKSv5. diff --git a/src/lib/ecore_con/efl_net_dialer_unix.eo b/src/lib/ecore_con/efl_net_dialer_unix.eo index f2454e5db2..a74f34d784 100644 --- a/src/lib/ecore_con/efl_net_dialer_unix.eo +++ b/src/lib/ecore_con/efl_net_dialer_unix.eo @@ -1,4 +1,4 @@ -class Efl.Net.Dialer_Unix extends Efl.Net.Socket_Unix implements Efl.Net.Dialer { +class @beta Efl.Net.Dialer_Unix extends Efl.Net.Socket_Unix implements Efl.Net.Dialer { [[Connects to a local AF_UNIX server. The dial address is a file system path (portable) or diff --git a/src/lib/ecore_con/efl_net_dialer_websocket.eo b/src/lib/ecore_con/efl_net_dialer_websocket.eo index dfd89a1cf8..d400b02261 100644 --- a/src/lib/ecore_con/efl_net_dialer_websocket.eo +++ b/src/lib/ecore_con/efl_net_dialer_websocket.eo @@ -47,7 +47,7 @@ struct Efl.Net.Dialer_Websocket_Closed_Reason { message: string; [[Textual closing reason message]] } -class Efl.Net.Dialer_Websocket extends Efl.Loop_Consumer implements Efl.Net.Dialer { +class @beta Efl.Net.Dialer_Websocket extends Efl.Loop_Consumer implements Efl.Net.Dialer { [[WebSocket Dialer (Client). The WebSocket Protocol (https://tools.ietf.org/html/rfc6455) is diff --git a/src/lib/ecore_con/efl_net_dialer_windows.eo b/src/lib/ecore_con/efl_net_dialer_windows.eo index 202b636183..9bce9c35ac 100644 --- a/src/lib/ecore_con/efl_net_dialer_windows.eo +++ b/src/lib/ecore_con/efl_net_dialer_windows.eo @@ -1,4 +1,4 @@ -class Efl.Net.Dialer_Windows extends Efl.Net.Socket_Windows implements Efl.Net.Dialer { +class @beta Efl.Net.Dialer_Windows extends Efl.Net.Socket_Windows implements Efl.Net.Dialer { [[Connects to a Windows NamedPipe server. The dial address will have "\\\\.\\pipe\\" prepended as required by diff --git a/src/lib/ecore_con/efl_net_ip_address.eo b/src/lib/ecore_con/efl_net_ip_address.eo index 3d1263134f..9b00a66ca3 100644 --- a/src/lib/ecore_con/efl_net_ip_address.eo +++ b/src/lib/ecore_con/efl_net_ip_address.eo @@ -12,7 +12,7 @@ struct Efl.Net.Ip_Address_Resolve_Results { results: array; [[The resolved objects. Do not modify this array but you can keep reference to elements using efl_ref() and efl_unref()]] } -class Efl.Net.Ip_Address extends Efl.Object { +class @beta Efl.Net.Ip_Address extends Efl.Object { [[An Internet Protocol (IP) Address. This class is a set of helpers to translate to and from address diff --git a/src/lib/ecore_con/efl_net_server.eo b/src/lib/ecore_con/efl_net_server.eo index 8e9487f310..141cf9d0ae 100644 --- a/src/lib/ecore_con/efl_net_server.eo +++ b/src/lib/ecore_con/efl_net_server.eo @@ -1,4 +1,4 @@ -interface Efl.Net.Server { +interface @beta Efl.Net.Server { [[The basic server interface. This will start serving and accepting clients once @.serve is diff --git a/src/lib/ecore_con/efl_net_server_fd.eo b/src/lib/ecore_con/efl_net_server_fd.eo index 4758be1634..74d734d86a 100644 --- a/src/lib/ecore_con/efl_net_server_fd.eo +++ b/src/lib/ecore_con/efl_net_server_fd.eo @@ -1,4 +1,4 @@ -abstract Efl.Net.Server_Fd extends Efl.Loop_Fd implements Efl.Net.Server { +abstract @beta Efl.Net.Server_Fd extends Efl.Loop_Fd implements Efl.Net.Server { [[A generic server based on file descriptors. @since 1.19 diff --git a/src/lib/ecore_con/efl_net_server_ip.eo b/src/lib/ecore_con/efl_net_server_ip.eo index 3fb8b96d3b..ab1f770b54 100644 --- a/src/lib/ecore_con/efl_net_server_ip.eo +++ b/src/lib/ecore_con/efl_net_server_ip.eo @@ -1,4 +1,4 @@ -abstract Efl.Net.Server_Ip extends Efl.Net.Server_Fd { +abstract @beta Efl.Net.Server_Ip extends Efl.Net.Server_Fd { [[An IP server. @since 1.20 diff --git a/src/lib/ecore_con/efl_net_server_simple.eo b/src/lib/ecore_con/efl_net_server_simple.eo index 3934828ffb..7dc4488731 100644 --- a/src/lib/ecore_con/efl_net_server_simple.eo +++ b/src/lib/ecore_con/efl_net_server_simple.eo @@ -1,4 +1,4 @@ -class Efl.Net.Server_Simple extends Efl.Loop_Consumer implements Efl.Net.Server { +class @beta Efl.Net.Server_Simple extends Efl.Loop_Consumer implements Efl.Net.Server { [[A network server wrapper that creates clients based on @Efl.Net.Socket_Simple. This is just a wrapper server. It takes an actual server diff --git a/src/lib/ecore_con/efl_net_server_ssl.eo b/src/lib/ecore_con/efl_net_server_ssl.eo index 52b0bcc595..18a7c22db6 100644 --- a/src/lib/ecore_con/efl_net_server_ssl.eo +++ b/src/lib/ecore_con/efl_net_server_ssl.eo @@ -1,4 +1,4 @@ -class Efl.Net.Server_Ssl extends Efl.Net.Server_Tcp { +class @beta Efl.Net.Server_Ssl extends Efl.Net.Server_Tcp { [[A SSL server over TCP. @since 1.19 diff --git a/src/lib/ecore_con/efl_net_server_tcp.eo b/src/lib/ecore_con/efl_net_server_tcp.eo index de6631a32b..4a4e99833f 100644 --- a/src/lib/ecore_con/efl_net_server_tcp.eo +++ b/src/lib/ecore_con/efl_net_server_tcp.eo @@ -1,4 +1,4 @@ -class Efl.Net.Server_Tcp extends Efl.Net.Server_Ip { +class @beta Efl.Net.Server_Tcp extends Efl.Net.Server_Ip { [[A TCP server. @since 1.19 diff --git a/src/lib/ecore_con/efl_net_server_udp.eo b/src/lib/ecore_con/efl_net_server_udp.eo index 8d7fc01ce9..b5f5cec09d 100644 --- a/src/lib/ecore_con/efl_net_server_udp.eo +++ b/src/lib/ecore_con/efl_net_server_udp.eo @@ -1,4 +1,4 @@ -class Efl.Net.Server_Udp extends Efl.Net.Server_Ip { +class @beta Efl.Net.Server_Udp extends Efl.Net.Server_Ip { [[A UDP server. @since 1.19 diff --git a/src/lib/ecore_con/efl_net_server_udp_client.eo b/src/lib/ecore_con/efl_net_server_udp_client.eo index 205ca8ba9f..28d979687c 100644 --- a/src/lib/ecore_con/efl_net_server_udp_client.eo +++ b/src/lib/ecore_con/efl_net_server_udp_client.eo @@ -1,4 +1,4 @@ -class Efl.Net.Server_Udp_Client extends Efl.Object implements Efl.Net.Socket { +class @beta Efl.Net.Server_Udp_Client extends Efl.Object implements Efl.Net.Socket { [[A UDP client child of Efl.Net.Server_Udp Unlike connection protocols such as TCP or Local, UDP doesn't diff --git a/src/lib/ecore_con/efl_net_server_unix.eo b/src/lib/ecore_con/efl_net_server_unix.eo index 9e05dd6848..2a541b4eb1 100644 --- a/src/lib/ecore_con/efl_net_server_unix.eo +++ b/src/lib/ecore_con/efl_net_server_unix.eo @@ -1,4 +1,4 @@ -class Efl.Net.Server_Unix extends Efl.Net.Server_Fd { +class @beta Efl.Net.Server_Unix extends Efl.Net.Server_Fd { [[An AF_UNIX server. The @Efl.Net.Server.serve method will call bind(2) directly. diff --git a/src/lib/ecore_con/efl_net_server_windows.eo b/src/lib/ecore_con/efl_net_server_windows.eo index 5bd087a534..e235ea0bb5 100644 --- a/src/lib/ecore_con/efl_net_server_windows.eo +++ b/src/lib/ecore_con/efl_net_server_windows.eo @@ -1,4 +1,4 @@ -class Efl.Net.Server_Windows extends Efl.Loop_Consumer implements Efl.Net.Server { +class @beta Efl.Net.Server_Windows extends Efl.Loop_Consumer implements Efl.Net.Server { [[A Windows NamedPipe server. The @Efl.Net.Server.serve method calls CreateNamedPipe() diff --git a/src/lib/ecore_con/efl_net_session.eo b/src/lib/ecore_con/efl_net_session.eo index 84db3f8ab7..ed968667ef 100644 --- a/src/lib/ecore_con/efl_net_session.eo +++ b/src/lib/ecore_con/efl_net_session.eo @@ -27,7 +27,7 @@ enum Efl.Net.Session_Technology { all = (Efl.Net.Session_Technology.ethernet | Efl.Net.Session_Technology.wifi | Efl.Net.Session_Technology.bluetooth | Efl.Net.Session_Technology.cellular | Efl.Net.Session_Technology.vpn | Efl.Net.Session_Technology.gadget), [[All technology types]] } -class Efl.Net.Session extends Efl.Loop_Consumer { +class @beta Efl.Net.Session extends Efl.Loop_Consumer { [[Used by application to request network connectivity. This API is targeted at applications that need access to the diff --git a/src/lib/ecore_con/efl_net_socket.eo b/src/lib/ecore_con/efl_net_socket.eo index f8741226ad..90804f366c 100644 --- a/src/lib/ecore_con/efl_net_socket.eo +++ b/src/lib/ecore_con/efl_net_socket.eo @@ -1,4 +1,4 @@ -interface Efl.Net.Socket extends Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer { +interface @beta Efl.Net.Socket extends Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer { [[The basic socket interface. This is built upon the three core Input/Output interfaces: diff --git a/src/lib/ecore_con/efl_net_socket_fd.eo b/src/lib/ecore_con/efl_net_socket_fd.eo index c5b468b759..a02cb65666 100644 --- a/src/lib/ecore_con/efl_net_socket_fd.eo +++ b/src/lib/ecore_con/efl_net_socket_fd.eo @@ -1,4 +1,4 @@ -class Efl.Net.Socket_Fd extends Efl.Loop_Fd implements Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Efl.Io.Closer_Fd, Efl.Net.Socket { +class @beta Efl.Net.Socket_Fd extends Efl.Loop_Fd implements Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Efl.Io.Closer_Fd, Efl.Net.Socket { [[A base implementation for sockets over filedescriptors (fd) This is the common class and takes an existing FD, usually diff --git a/src/lib/ecore_con/efl_net_socket_simple.eo b/src/lib/ecore_con/efl_net_socket_simple.eo index 07b7c3e8da..dd255b5003 100644 --- a/src/lib/ecore_con/efl_net_socket_simple.eo +++ b/src/lib/ecore_con/efl_net_socket_simple.eo @@ -1,4 +1,4 @@ -class Efl.Net.Socket_Simple extends Efl.Io.Buffered_Stream implements Efl.Net.Socket { +class @beta Efl.Net.Socket_Simple extends Efl.Io.Buffered_Stream implements Efl.Net.Socket { [[A wrapper socket offering an easy to use, buffered I/O. The simple socket encapsulates an actual @Efl.Net.Socket and diff --git a/src/lib/ecore_con/efl_net_socket_ssl.eo b/src/lib/ecore_con/efl_net_socket_ssl.eo index dc607636dc..02c3b82031 100644 --- a/src/lib/ecore_con/efl_net_socket_ssl.eo +++ b/src/lib/ecore_con/efl_net_socket_ssl.eo @@ -1,7 +1,7 @@ var Efl.Net.Socket_Ssl_Error.HANDSHAKE: Eina.Error; [[Failed SSL handshake]] var Efl.Net.Socket_Ssl_Error.CERTIFICATE_VERIFY_FAILED: Eina.Error; [[Failed to verify peer's certificate]] -class Efl.Net.Socket_Ssl extends Efl.Loop_Consumer implements Efl.Net.Socket { +class @beta Efl.Net.Socket_Ssl extends Efl.Loop_Consumer implements Efl.Net.Socket { [[A wrapper socket doing SSL (Secure Sockets Layer). Use this wrapper around an existing socket for secure diff --git a/src/lib/ecore_con/efl_net_socket_tcp.eo b/src/lib/ecore_con/efl_net_socket_tcp.eo index d3f0d5b3e7..449f255540 100644 --- a/src/lib/ecore_con/efl_net_socket_tcp.eo +++ b/src/lib/ecore_con/efl_net_socket_tcp.eo @@ -1,4 +1,4 @@ -class Efl.Net.Socket_Tcp extends Efl.Net.Socket_Fd { +class @beta Efl.Net.Socket_Tcp extends Efl.Net.Socket_Fd { [[A base TCP socket. This is the common class and takes an existing FD, usually diff --git a/src/lib/ecore_con/efl_net_socket_udp.eo b/src/lib/ecore_con/efl_net_socket_udp.eo index 7e2b53307c..dd36e8c58e 100644 --- a/src/lib/ecore_con/efl_net_socket_udp.eo +++ b/src/lib/ecore_con/efl_net_socket_udp.eo @@ -1,6 +1,6 @@ import efl_net_ip_address; -class Efl.Net.Socket_Udp extends Efl.Net.Socket_Fd { +class @beta Efl.Net.Socket_Udp extends Efl.Net.Socket_Fd { [[A base UDP socket. This is the common class and takes an existing FD, usually diff --git a/src/lib/ecore_con/efl_net_socket_unix.eo b/src/lib/ecore_con/efl_net_socket_unix.eo index 854130e512..b7a193efc0 100644 --- a/src/lib/ecore_con/efl_net_socket_unix.eo +++ b/src/lib/ecore_con/efl_net_socket_unix.eo @@ -1,4 +1,4 @@ -class Efl.Net.Socket_Unix extends Efl.Net.Socket_Fd { +class @beta Efl.Net.Socket_Unix extends Efl.Net.Socket_Fd { [[A base UNIX socket. This is the common class and takes an existing FD, usually diff --git a/src/lib/ecore_con/efl_net_socket_windows.eo b/src/lib/ecore_con/efl_net_socket_windows.eo index f1e1625aa1..dbce9f133b 100644 --- a/src/lib/ecore_con/efl_net_socket_windows.eo +++ b/src/lib/ecore_con/efl_net_socket_windows.eo @@ -1,4 +1,4 @@ -class Efl.Net.Socket_Windows extends Efl.Loop_Consumer implements Efl.Net.Socket { +class @beta Efl.Net.Socket_Windows extends Efl.Loop_Consumer implements Efl.Net.Socket { [[A base Windows NamedPipe socket. This is the common class and takes an existing file HANDLE, diff --git a/src/lib/ecore_con/efl_net_ssl_context.eo b/src/lib/ecore_con/efl_net_ssl_context.eo index c19fe198b8..c6ad382341 100644 --- a/src/lib/ecore_con/efl_net_ssl_context.eo +++ b/src/lib/ecore_con/efl_net_ssl_context.eo @@ -1,6 +1,6 @@ import efl_net_ssl_types; -class Efl.Net.Ssl.Context extends Efl.Object { +class @beta Efl.Net.Ssl.Context extends Efl.Object { [[A SSL Context that is used to start a SSL socket wrapper. The context will contain common configurations such as diff --git a/src/lib/edje/efl_canvas_layout.eo b/src/lib/edje/efl_canvas_layout.eo index e4f4f6fa8d..d61ef892f2 100644 --- a/src/lib/edje/efl_canvas_layout.eo +++ b/src/lib/edje/efl_canvas_layout.eo @@ -1,6 +1,6 @@ // FIXME: This EO doc needs a direct link to the "edcref" doc -class Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl.Container, Efl.Part, +class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl.Container, Efl.Part, Efl.Observer, Efl.Layout.Calc, Efl.Layout.Signal, Efl.Layout.Group, Efl.Player, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class, diff --git a/src/lib/edje/efl_canvas_layout_part.eo b/src/lib/edje/efl_canvas_layout_part.eo index 927e70ac9a..416ab4aa97 100644 --- a/src/lib/edje/efl_canvas_layout_part.eo +++ b/src/lib/edje/efl_canvas_layout_part.eo @@ -1,6 +1,6 @@ import edje_types; -class Efl.Canvas.Layout_Part extends Efl.Object implements Efl.Gfx.Entity, Efl.Ui.Drag +class @beta Efl.Canvas.Layout_Part extends Efl.Object implements Efl.Gfx.Entity, Efl.Ui.Drag { [[Common class for part proxy objects for @Efl.Canvas.Layout. diff --git a/src/lib/edje/efl_canvas_layout_part_box.eo b/src/lib/edje/efl_canvas_layout_part_box.eo index 4db959292e..0fa1e39f17 100644 --- a/src/lib/edje/efl_canvas_layout_part_box.eo +++ b/src/lib/edje/efl_canvas_layout_part_box.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Layout_Part_Box extends Efl.Canvas.Layout_Part implements Efl.Pack_Linear, +class @beta Efl.Canvas.Layout_Part_Box extends Efl.Canvas.Layout_Part implements Efl.Pack_Linear, Efl.Ui.Direction_Readonly { [[Represents a Box created as part of a layout. diff --git a/src/lib/edje/efl_canvas_layout_part_external.eo b/src/lib/edje/efl_canvas_layout_part_external.eo index 25e694c589..eb5ca38815 100644 --- a/src/lib/edje/efl_canvas_layout_part_external.eo +++ b/src/lib/edje/efl_canvas_layout_part_external.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Layout_Part_External extends Efl.Canvas.Layout_Part implements Efl.Content +class @beta Efl.Canvas.Layout_Part_External extends Efl.Canvas.Layout_Part implements Efl.Content { [[Class representing an external part in Edje layouts. diff --git a/src/lib/edje/efl_canvas_layout_part_invalid.eo b/src/lib/edje/efl_canvas_layout_part_invalid.eo index 1dbef9ffe2..d048657cb8 100644 --- a/src/lib/edje/efl_canvas_layout_part_invalid.eo +++ b/src/lib/edje/efl_canvas_layout_part_invalid.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Layout_Part_Invalid extends Efl.Canvas.Layout_Part implements Efl.Content, +class @beta Efl.Canvas.Layout_Part_Invalid extends Efl.Canvas.Layout_Part implements Efl.Content, Efl.Pack_Linear, Efl.Ui.Direction_Readonly, Efl.Pack_Table, Efl.Text, Efl.Text_Markup, Efl.Text_Markup_Interactive diff --git a/src/lib/edje/efl_canvas_layout_part_swallow.eo b/src/lib/edje/efl_canvas_layout_part_swallow.eo index 6b1c4723ed..96088da982 100644 --- a/src/lib/edje/efl_canvas_layout_part_swallow.eo +++ b/src/lib/edje/efl_canvas_layout_part_swallow.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Layout_Part_Swallow extends Efl.Canvas.Layout_Part implements Efl.Content +class @beta Efl.Canvas.Layout_Part_Swallow extends Efl.Canvas.Layout_Part implements Efl.Content { [[Represents a SWALLOW part of an Edje object. diff --git a/src/lib/edje/efl_canvas_layout_part_table.eo b/src/lib/edje/efl_canvas_layout_part_table.eo index e0184381c4..4abd546bcc 100644 --- a/src/lib/edje/efl_canvas_layout_part_table.eo +++ b/src/lib/edje/efl_canvas_layout_part_table.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Layout_Part_Table extends Efl.Canvas.Layout_Part implements Efl.Pack_Table +class @beta Efl.Canvas.Layout_Part_Table extends Efl.Canvas.Layout_Part implements Efl.Pack_Table { [[Represents a Table created as part of a layout. diff --git a/src/lib/edje/efl_canvas_layout_part_text.eo b/src/lib/edje/efl_canvas_layout_part_text.eo index b987c915e7..09213c663e 100644 --- a/src/lib/edje/efl_canvas_layout_part_text.eo +++ b/src/lib/edje/efl_canvas_layout_part_text.eo @@ -10,7 +10,7 @@ enum Efl.Canvas.Layout_Part_Text_Expand max_y = 1 << 3, } -class Efl.Canvas.Layout_Part_Text extends Efl.Canvas.Layout_Part implements Efl.Text, +class @beta Efl.Canvas.Layout_Part_Text extends Efl.Canvas.Layout_Part implements Efl.Text, Efl.Text_Markup, Efl.Text_Markup_Interactive, Efl.Text_Format, Efl.Text_Font, Efl.Text_Style { [[Represents a TEXT part of a layout diff --git a/src/lib/edje/efl_layout_calc.eo b/src/lib/edje/efl_layout_calc.eo index 018cd7e197..ab43fbbe1f 100644 --- a/src/lib/edje/efl_layout_calc.eo +++ b/src/lib/edje/efl_layout_calc.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Layout.Calc +interface @beta Efl.Layout.Calc { [[This interface defines a common set of APIs used to trigger calculations with layout objects. diff --git a/src/lib/edje/efl_layout_group.eo b/src/lib/edje/efl_layout_group.eo index 864a3a86c9..5d4d56afcd 100644 --- a/src/lib/edje/efl_layout_group.eo +++ b/src/lib/edje/efl_layout_group.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Layout.Group +interface @beta Efl.Layout.Group { [[APIs representing static data from a group in an edje file. diff --git a/src/lib/edje/efl_layout_signal.eo b/src/lib/edje/efl_layout_signal.eo index 3b4562e596..90709fb8d0 100644 --- a/src/lib/edje/efl_layout_signal.eo +++ b/src/lib/edje/efl_layout_signal.eo @@ -17,7 +17,7 @@ function EflLayoutSignalCb { } }; -interface Efl.Layout.Signal +interface @beta Efl.Layout.Signal { [[Layouts asynchronous messaging and signaling interface. diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 52a22d44a5..0ac67feea8 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -71,8 +71,6 @@ typedef struct _Efl_Text_Annotate_Annotation Efl_Text_Annotate_Annotation; #include "interfaces/efl_types.eot.h" -#ifdef EFL_BETA_API_SUPPORT - #include /* Data types */ @@ -187,6 +185,8 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #include "interfaces/efl_text_markup_interactive.eo.h" #include "interfaces/efl_text_markup_util.eo.h" +#ifdef EFL_BETA_API_SUPPORT + EAPI void efl_observable_tuple_free(Efl_Observable_Tuple *tuple); /** diff --git a/src/lib/efl/interfaces/efl_animator.eo b/src/lib/efl/interfaces/efl_animator.eo index ca969d99fe..39f7e3ce3f 100644 --- a/src/lib/efl/interfaces/efl_animator.eo +++ b/src/lib/efl/interfaces/efl_animator.eo @@ -5,7 +5,7 @@ struct Efl.Event_Animator_Tick { update_area: Eina.Rect; [[Area of the canvas that will be pushed to screen.]] } -interface Efl.Animator { +interface @beta Efl.Animator { [[Efl animator interface]] eo_prefix: efl_animator; event_prefix: efl; diff --git a/src/lib/efl/interfaces/efl_cached_item.eo b/src/lib/efl/interfaces/efl_cached_item.eo index f3f82d6baf..a8da315453 100644 --- a/src/lib/efl/interfaces/efl_cached_item.eo +++ b/src/lib/efl/interfaces/efl_cached_item.eo @@ -1,4 +1,4 @@ -interface Efl.Cached.Item +interface @beta Efl.Cached.Item { [[Efl Cached Item interface]] methods { diff --git a/src/lib/efl/interfaces/efl_canvas_pointer.eo b/src/lib/efl/interfaces/efl_canvas_pointer.eo index 45e34f7849..3ea8cddfc7 100644 --- a/src/lib/efl/interfaces/efl_canvas_pointer.eo +++ b/src/lib/efl/interfaces/efl_canvas_pointer.eo @@ -1,6 +1,6 @@ import efl_input_device; -interface Efl.Canvas.Pointer +interface @beta Efl.Canvas.Pointer { [[Efl Canvas Pointer interface]] methods { diff --git a/src/lib/efl/interfaces/efl_canvas_scene.eo b/src/lib/efl/interfaces/efl_canvas_scene.eo index ab624be34c..2133378b05 100644 --- a/src/lib/efl/interfaces/efl_canvas_scene.eo +++ b/src/lib/efl/interfaces/efl_canvas_scene.eo @@ -1,7 +1,7 @@ import efl_input_device; import efl_gfx_types; -interface Efl.Canvas.Scene +interface @beta Efl.Canvas.Scene { [[Common interface for window and some internal classes in EFL.]] methods { diff --git a/src/lib/efl/interfaces/efl_config.eo b/src/lib/efl/interfaces/efl_config.eo index 78a3f342e3..e6605d4282 100644 --- a/src/lib/efl/interfaces/efl_config.eo +++ b/src/lib/efl/interfaces/efl_config.eo @@ -1,4 +1,4 @@ -interface Efl.Config +interface @beta Efl.Config { [[A generic configuration interface, that holds key-value pairs.]] methods { diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo index e7157ee0a7..c2f90d4e89 100644 --- a/src/lib/efl/interfaces/efl_container.eo +++ b/src/lib/efl/interfaces/efl_container.eo @@ -1,4 +1,4 @@ -interface Efl.Container +interface @beta Efl.Container { [[Common interface for objects that have multiple contents (sub objects). diff --git a/src/lib/efl/interfaces/efl_content.eo b/src/lib/efl/interfaces/efl_content.eo index da2088d834..a5dbe43ef6 100644 --- a/src/lib/efl/interfaces/efl_content.eo +++ b/src/lib/efl/interfaces/efl_content.eo @@ -1,4 +1,4 @@ -interface Efl.Content +interface @beta Efl.Content { [[Common interface for objects that have a (single) content. diff --git a/src/lib/efl/interfaces/efl_control.eo b/src/lib/efl/interfaces/efl_control.eo index 39d327eef5..3382cc4392 100644 --- a/src/lib/efl/interfaces/efl_control.eo +++ b/src/lib/efl/interfaces/efl_control.eo @@ -1,6 +1,6 @@ /* FIXME: Rename */ -interface Efl.Control { +interface @beta Efl.Control { [[Efl control interface]] methods { @property priority { diff --git a/src/lib/efl/interfaces/efl_duplicate.eo b/src/lib/efl/interfaces/efl_duplicate.eo index 1b71d803be..6419f35280 100644 --- a/src/lib/efl/interfaces/efl_duplicate.eo +++ b/src/lib/efl/interfaces/efl_duplicate.eo @@ -1,4 +1,4 @@ -interface Efl.Duplicate +interface @beta Efl.Duplicate { [[An interface for duplication of objects. diff --git a/src/lib/efl/interfaces/efl_file.eo b/src/lib/efl/interfaces/efl_file.eo index c9873f06da..8d98a004a4 100644 --- a/src/lib/efl/interfaces/efl_file.eo +++ b/src/lib/efl/interfaces/efl_file.eo @@ -1,7 +1,7 @@ import eina_types; import efl_gfx_types; -mixin Efl.File { +mixin @beta Efl.File { [[Efl file interface]] methods { @property load_error { diff --git a/src/lib/efl/interfaces/efl_file_save.eo b/src/lib/efl/interfaces/efl_file_save.eo index 153b74b23e..3cdc234fff 100644 --- a/src/lib/efl/interfaces/efl_file_save.eo +++ b/src/lib/efl/interfaces/efl_file_save.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.File_Save { +interface @beta Efl.File_Save { [[Efl file saving interface]] methods { save @const { diff --git a/src/lib/efl/interfaces/efl_gfx_blur.eo b/src/lib/efl/interfaces/efl_gfx_blur.eo index c69e7871fb..a3f2d5dac0 100644 --- a/src/lib/efl/interfaces/efl_gfx_blur.eo +++ b/src/lib/efl/interfaces/efl_gfx_blur.eo @@ -1,4 +1,4 @@ -interface Efl.Gfx.Blur +interface @beta Efl.Gfx.Blur { [[A simple API to apply blur effects. diff --git a/src/lib/efl/interfaces/efl_gfx_buffer.eo b/src/lib/efl/interfaces/efl_gfx_buffer.eo index a4fa28cb98..795b6663bc 100644 --- a/src/lib/efl/interfaces/efl_gfx_buffer.eo +++ b/src/lib/efl/interfaces/efl_gfx_buffer.eo @@ -12,7 +12,7 @@ enum Efl.Gfx.Buffer_Access_Mode { /* FIXME: YUV and other planar formats are not properly handled in this API! */ -interface Efl.Gfx.Buffer +interface @beta Efl.Gfx.Buffer { [[Common APIs for all objects representing images and 2D pixel buffers.]] diff --git a/src/lib/efl/interfaces/efl_gfx_color.eo b/src/lib/efl/interfaces/efl_gfx_color.eo index d3c41e1e31..a72cae23db 100644 --- a/src/lib/efl/interfaces/efl_gfx_color.eo +++ b/src/lib/efl/interfaces/efl_gfx_color.eo @@ -1,6 +1,6 @@ import efl_gfx_types; -mixin Efl.Gfx.Color +mixin @beta Efl.Gfx.Color { [[Efl Gfx Color mixin class]] data: null; diff --git a/src/lib/efl/interfaces/efl_gfx_color_class.eo b/src/lib/efl/interfaces/efl_gfx_color_class.eo index 990835dfce..51bade3d11 100644 --- a/src/lib/efl/interfaces/efl_gfx_color_class.eo +++ b/src/lib/efl/interfaces/efl_gfx_color_class.eo @@ -1,6 +1,6 @@ import efl_gfx_types; -mixin Efl.Gfx.Color_Class +mixin @beta Efl.Gfx.Color_Class { [[Efl Gfx Color Class mixin class]] data: null; diff --git a/src/lib/efl/interfaces/efl_gfx_entity.eo b/src/lib/efl/interfaces/efl_gfx_entity.eo index 30131d6ba3..5f40f6f17a 100644 --- a/src/lib/efl/interfaces/efl_gfx_entity.eo +++ b/src/lib/efl/interfaces/efl_gfx_entity.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Gfx.Entity { +interface @beta Efl.Gfx.Entity { [[Efl graphics interface]] eo_prefix: efl_gfx_entity; methods { diff --git a/src/lib/efl/interfaces/efl_gfx_fill.eo b/src/lib/efl/interfaces/efl_gfx_fill.eo index 566f26daad..0cd438012d 100644 --- a/src/lib/efl/interfaces/efl_gfx_fill.eo +++ b/src/lib/efl/interfaces/efl_gfx_fill.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Gfx.Fill { +interface @beta Efl.Gfx.Fill { [[Efl graphics fill interface]] methods { @property fill_auto { diff --git a/src/lib/efl/interfaces/efl_gfx_filter.eo b/src/lib/efl/interfaces/efl_gfx_filter.eo index 499a29c8de..5cee031f3f 100644 --- a/src/lib/efl/interfaces/efl_gfx_filter.eo +++ b/src/lib/efl/interfaces/efl_gfx_filter.eo @@ -1,4 +1,4 @@ -interface Efl.Gfx.Filter +interface @beta Efl.Gfx.Filter { [[Graphical filters can be applied to any object implementing this interface. diff --git a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo index f08026f2b4..b2a164ca23 100644 --- a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo +++ b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo @@ -8,7 +8,7 @@ enum Efl.Gfx.Frame_Controller_Loop_Hint { pingpong = 2 [[Ping-pong bouncing loop: 1->2->3->2->1->2->3->1]] } -interface Efl.Gfx.Frame_Controller +interface @beta Efl.Gfx.Frame_Controller { [[Efl frame controller of frame based animated object interface.]] diff --git a/src/lib/efl/interfaces/efl_gfx_gradient.eo b/src/lib/efl/interfaces/efl_gfx_gradient.eo index 311e873698..3622034a45 100644 --- a/src/lib/efl/interfaces/efl_gfx_gradient.eo +++ b/src/lib/efl/interfaces/efl_gfx_gradient.eo @@ -1,6 +1,6 @@ import efl_gfx_types; -interface Efl.Gfx.Gradient +interface @beta Efl.Gfx.Gradient { [[Efl graphics gradient interface]] eo_prefix: efl_gfx_gradient; diff --git a/src/lib/efl/interfaces/efl_gfx_gradient_linear.eo b/src/lib/efl/interfaces/efl_gfx_gradient_linear.eo index ec7a9bfdfd..238e5d04a4 100644 --- a/src/lib/efl/interfaces/efl_gfx_gradient_linear.eo +++ b/src/lib/efl/interfaces/efl_gfx_gradient_linear.eo @@ -1,4 +1,4 @@ -interface Efl.Gfx.Gradient_Linear extends Efl.Gfx.Gradient +interface @beta Efl.Gfx.Gradient_Linear extends Efl.Gfx.Gradient { [[Efl graphics gradient linear interface]] methods { diff --git a/src/lib/efl/interfaces/efl_gfx_gradient_radial.eo b/src/lib/efl/interfaces/efl_gfx_gradient_radial.eo index 1b2d6bdf26..9cc3f3f069 100644 --- a/src/lib/efl/interfaces/efl_gfx_gradient_radial.eo +++ b/src/lib/efl/interfaces/efl_gfx_gradient_radial.eo @@ -1,4 +1,4 @@ -interface Efl.Gfx.Gradient_Radial extends Efl.Gfx.Gradient +interface @beta Efl.Gfx.Gradient_Radial extends Efl.Gfx.Gradient { [[Efl graphics gradient radial interface]] methods { diff --git a/src/lib/efl/interfaces/efl_gfx_image.eo b/src/lib/efl/interfaces/efl_gfx_image.eo index 4e8a23cdea..420bb8199d 100644 --- a/src/lib/efl/interfaces/efl_gfx_image.eo +++ b/src/lib/efl/interfaces/efl_gfx_image.eo @@ -40,7 +40,7 @@ enum Efl.Gfx.Image_Scale_Type none [[Not scale the image]] } -interface Efl.Gfx.Image +interface @beta Efl.Gfx.Image { [[Common APIs for all 2D images that can be rendered on the canvas.]] diff --git a/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo b/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo index 66ae1d4085..4771be1478 100644 --- a/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo +++ b/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo @@ -13,7 +13,7 @@ enum Efl.Gfx.Image_Load_Controller_State } */ -interface Efl.Gfx.Image_Load_Controller +interface @beta Efl.Gfx.Image_Load_Controller { [[Common APIs for all loadable 2D images.]] diff --git a/src/lib/efl/interfaces/efl_gfx_path.eo b/src/lib/efl/interfaces/efl_gfx_path.eo index d60886e499..5f8e0baa59 100644 --- a/src/lib/efl/interfaces/efl_gfx_path.eo +++ b/src/lib/efl/interfaces/efl_gfx_path.eo @@ -1,7 +1,7 @@ import eina_types; import efl_gfx_types; -mixin Efl.Gfx.Path +mixin @beta Efl.Gfx.Path { [[EFL graphics path object interface]] methods { diff --git a/src/lib/efl/interfaces/efl_gfx_shape.eo b/src/lib/efl/interfaces/efl_gfx_shape.eo index 2dfb554e81..f71ec933ae 100644 --- a/src/lib/efl/interfaces/efl_gfx_shape.eo +++ b/src/lib/efl/interfaces/efl_gfx_shape.eo @@ -1,6 +1,6 @@ import efl_gfx_types; -mixin Efl.Gfx.Shape extends Efl.Gfx.Path +mixin @beta Efl.Gfx.Shape extends Efl.Gfx.Path { [[EFL graphics shape object interface]] methods { diff --git a/src/lib/efl/interfaces/efl_gfx_size_class.eo b/src/lib/efl/interfaces/efl_gfx_size_class.eo index a3e7fc96b2..4cf49ae70e 100644 --- a/src/lib/efl/interfaces/efl_gfx_size_class.eo +++ b/src/lib/efl/interfaces/efl_gfx_size_class.eo @@ -1,4 +1,4 @@ -interface Efl.Gfx.Size_Class +interface @beta Efl.Gfx.Size_Class { [[Efl Gfx Size Class interface]] methods { diff --git a/src/lib/efl/interfaces/efl_gfx_size_hint.eo b/src/lib/efl/interfaces/efl_gfx_size_hint.eo index 676cc04d37..af01fe08be 100644 --- a/src/lib/efl/interfaces/efl_gfx_size_hint.eo +++ b/src/lib/efl/interfaces/efl_gfx_size_hint.eo @@ -4,7 +4,7 @@ import efl_gfx_types; const Efl.Gfx.Size_Hint_Expand: double = 1.0; [[Use with @Efl.Gfx.Size_Hint.hint_weight.]] -interface Efl.Gfx.Size_Hint +interface @beta Efl.Gfx.Size_Hint { [[Efl graphics size hint interface]] event_prefix: efl_gfx_entity; diff --git a/src/lib/efl/interfaces/efl_gfx_stack.eo b/src/lib/efl/interfaces/efl_gfx_stack.eo index 515fa73a30..56bdde626f 100644 --- a/src/lib/efl/interfaces/efl_gfx_stack.eo +++ b/src/lib/efl/interfaces/efl_gfx_stack.eo @@ -1,7 +1,7 @@ const Efl.Gfx.Stack_Layer_Min: short = -32768; [[bottom-most layer number]] const Efl.Gfx.Stack_Layer_Max: short = 32767; [[top-most layer number]] -interface Efl.Gfx.Stack +interface @beta Efl.Gfx.Stack { [[Efl graphics stack interface]] event_prefix: efl_gfx_entity; diff --git a/src/lib/efl/interfaces/efl_gfx_text_class.eo b/src/lib/efl/interfaces/efl_gfx_text_class.eo index bf2c5a1339..a3c7f3f20b 100644 --- a/src/lib/efl/interfaces/efl_gfx_text_class.eo +++ b/src/lib/efl/interfaces/efl_gfx_text_class.eo @@ -1,6 +1,6 @@ import efl_gfx_types; -interface Efl.Gfx.Text_Class +interface @beta Efl.Gfx.Text_Class { [[Efl Gfx Text Class interface]] methods { diff --git a/src/lib/efl/interfaces/efl_gfx_view.eo b/src/lib/efl/interfaces/efl_gfx_view.eo index 233175c6a2..f18d0dc52a 100644 --- a/src/lib/efl/interfaces/efl_gfx_view.eo +++ b/src/lib/efl/interfaces/efl_gfx_view.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Gfx.View +interface @beta Efl.Gfx.View { [[Efl graphics view interface]] eo_prefix: efl_gfx; diff --git a/src/lib/efl/interfaces/efl_input_device.eo b/src/lib/efl/interfaces/efl_input_device.eo index 91a0760bb5..86091a2d11 100644 --- a/src/lib/efl/interfaces/efl_input_device.eo +++ b/src/lib/efl/interfaces/efl_input_device.eo @@ -19,7 +19,7 @@ enum Efl.Input.Device_Type @property canvas { values { canvas: Efl.Canvas; } } */ -class Efl.Input.Device extends Efl.Object +class @beta Efl.Input.Device extends Efl.Object { [[Represents a pointing device such as a touch finger, pen or mouse. diff --git a/src/lib/efl/interfaces/efl_interpolator.eo b/src/lib/efl/interfaces/efl_interpolator.eo index 870582ab6f..ba01e742d2 100644 --- a/src/lib/efl/interfaces/efl_interpolator.eo +++ b/src/lib/efl/interfaces/efl_interpolator.eo @@ -1,4 +1,4 @@ -interface Efl.Interpolator +interface @beta Efl.Interpolator { [[Efl interpolator interface]] methods { diff --git a/src/lib/efl/interfaces/efl_io_buffer.eo b/src/lib/efl/interfaces/efl_io_buffer.eo index 230c2aa061..0f781d0bd0 100644 --- a/src/lib/efl/interfaces/efl_io_buffer.eo +++ b/src/lib/efl/interfaces/efl_io_buffer.eo @@ -1,4 +1,4 @@ -class Efl.Io.Buffer extends Efl.Object implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Io.Sizer, Efl.Io.Positioner { +class @beta Efl.Io.Buffer extends Efl.Object implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Io.Sizer, Efl.Io.Positioner { [[Generic In-memory buffer of data to be used as I/O. This class offers both input and output, which can be used at diff --git a/src/lib/efl/interfaces/efl_io_closer.eo b/src/lib/efl/interfaces/efl_io_closer.eo index 2ba4323085..42be3284ba 100644 --- a/src/lib/efl/interfaces/efl_io_closer.eo +++ b/src/lib/efl/interfaces/efl_io_closer.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Io.Closer { +interface @beta Efl.Io.Closer { [[Generic interface for objects that can close themselves. This interface allows external objects to transparently close an diff --git a/src/lib/efl/interfaces/efl_io_positioner.eo b/src/lib/efl/interfaces/efl_io_positioner.eo index 4b4033c670..ace155f400 100644 --- a/src/lib/efl/interfaces/efl_io_positioner.eo +++ b/src/lib/efl/interfaces/efl_io_positioner.eo @@ -7,7 +7,7 @@ enum Efl.Io.Positioner_Whence { end, [[Seek from the end of stream/file]] } -mixin Efl.Io.Positioner { +mixin @beta Efl.Io.Positioner { [[Generic interface for objects that can change or report position. @since 1.19 diff --git a/src/lib/efl/interfaces/efl_io_queue.eo b/src/lib/efl/interfaces/efl_io_queue.eo index c8c6f1e46c..39bc760c8e 100644 --- a/src/lib/efl/interfaces/efl_io_queue.eo +++ b/src/lib/efl/interfaces/efl_io_queue.eo @@ -1,4 +1,4 @@ -class Efl.Io.Queue extends Efl.Object implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer { +class @beta Efl.Io.Queue extends Efl.Object implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer { [[Generic In-memory queue of data to be used as I/O. This class is to be used to receive temporary data using diff --git a/src/lib/efl/interfaces/efl_io_reader.eo b/src/lib/efl/interfaces/efl_io_reader.eo index ccb3efe90f..0fa08b4798 100644 --- a/src/lib/efl/interfaces/efl_io_reader.eo +++ b/src/lib/efl/interfaces/efl_io_reader.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Io.Reader { +interface @beta Efl.Io.Reader { [[Generic interface for objects that can read data into a provided memory. This interface allows external objects to transparently monitor diff --git a/src/lib/efl/interfaces/efl_io_sizer.eo b/src/lib/efl/interfaces/efl_io_sizer.eo index a91cf665a1..9f358619e5 100644 --- a/src/lib/efl/interfaces/efl_io_sizer.eo +++ b/src/lib/efl/interfaces/efl_io_sizer.eo @@ -1,6 +1,6 @@ import eina_types; -mixin Efl.Io.Sizer { +mixin @beta Efl.Io.Sizer { [[Generic interface for objects that can resize or report size of themselves. This interface allows external objects to transparently resize diff --git a/src/lib/efl/interfaces/efl_io_writer.eo b/src/lib/efl/interfaces/efl_io_writer.eo index 7e109cf372..295fe7c9e4 100644 --- a/src/lib/efl/interfaces/efl_io_writer.eo +++ b/src/lib/efl/interfaces/efl_io_writer.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Io.Writer { +interface @beta Efl.Io.Writer { [[Generic interface for objects that can write data from a provided memory. This interface allows external objects to transparently write diff --git a/src/lib/efl/interfaces/efl_model.eo b/src/lib/efl/interfaces/efl_model.eo index 72de91d809..48c4809aa8 100644 --- a/src/lib/efl/interfaces/efl_model.eo +++ b/src/lib/efl/interfaces/efl_model.eo @@ -13,7 +13,7 @@ struct Efl.Model_Children_Event { the parent, it will be available here.]] } -interface Efl.Model +interface @beta Efl.Model { [[Efl model interface]] eo_prefix: efl_model; diff --git a/src/lib/efl/interfaces/efl_observable.eo b/src/lib/efl/interfaces/efl_observable.eo index 4055217c51..cf31f41e48 100644 --- a/src/lib/efl/interfaces/efl_observable.eo +++ b/src/lib/efl/interfaces/efl_observable.eo @@ -1,6 +1,6 @@ import efl_types; -class Efl.Observable extends Efl.Object { +class @beta Efl.Observable extends Efl.Object { [[Efl observable class]] methods { observer_add { diff --git a/src/lib/efl/interfaces/efl_observer.eo b/src/lib/efl/interfaces/efl_observer.eo index 38764f843d..82e91c2682 100644 --- a/src/lib/efl/interfaces/efl_observer.eo +++ b/src/lib/efl/interfaces/efl_observer.eo @@ -1,4 +1,4 @@ -interface Efl.Observer { +interface @beta Efl.Observer { [[Efl observer interface]] methods { update { diff --git a/src/lib/efl/interfaces/efl_orientation.eo b/src/lib/efl/interfaces/efl_orientation.eo index 4f83c25c97..8eb4f55b4a 100644 --- a/src/lib/efl/interfaces/efl_orientation.eo +++ b/src/lib/efl/interfaces/efl_orientation.eo @@ -28,7 +28,7 @@ enum Efl.Flip vertical = 2 [[Flip image vertically]] } -interface Efl.Orientation +interface @beta Efl.Orientation { [[Efl orientation interface]] methods { diff --git a/src/lib/efl/interfaces/efl_pack.eo b/src/lib/efl/interfaces/efl_pack.eo index 012c9699eb..624a0004fe 100644 --- a/src/lib/efl/interfaces/efl_pack.eo +++ b/src/lib/efl/interfaces/efl_pack.eo @@ -1,4 +1,4 @@ -interface Efl.Pack extends Efl.Container +interface @beta Efl.Pack extends Efl.Container { [[API common to all UI container objects.]] methods diff --git a/src/lib/efl/interfaces/efl_pack_layout.eo b/src/lib/efl/interfaces/efl_pack_layout.eo index 3b47fa37d7..2760886705 100644 --- a/src/lib/efl/interfaces/efl_pack_layout.eo +++ b/src/lib/efl/interfaces/efl_pack_layout.eo @@ -1,4 +1,4 @@ -interface Efl.Pack_Layout +interface @beta Efl.Pack_Layout { [[Low-level APIs for object that can lay their children out. diff --git a/src/lib/efl/interfaces/efl_pack_linear.eo b/src/lib/efl/interfaces/efl_pack_linear.eo index 5829c73d27..423c6cbb6c 100644 --- a/src/lib/efl/interfaces/efl_pack_linear.eo +++ b/src/lib/efl/interfaces/efl_pack_linear.eo @@ -1,4 +1,4 @@ -interface Efl.Pack_Linear extends Efl.Pack +interface @beta Efl.Pack_Linear extends Efl.Pack { [[API for containers ]] eo_prefix: efl_pack; diff --git a/src/lib/efl/interfaces/efl_pack_table.eo b/src/lib/efl/interfaces/efl_pack_table.eo index 6b0bfd8b6e..ea88ca61da 100644 --- a/src/lib/efl/interfaces/efl_pack_table.eo +++ b/src/lib/efl/interfaces/efl_pack_table.eo @@ -1,6 +1,6 @@ import efl_ui_direction; -interface Efl.Pack_Table extends Efl.Pack_Linear +interface @beta Efl.Pack_Table extends Efl.Pack_Linear { [[2D containers aligned on a table with rows and columns]] eo_prefix: efl_pack; diff --git a/src/lib/efl/interfaces/efl_part.eo b/src/lib/efl/interfaces/efl_part.eo index 1f37e7e4ab..04bfd2bc4f 100644 --- a/src/lib/efl/interfaces/efl_part.eo +++ b/src/lib/efl/interfaces/efl_part.eo @@ -1,6 +1,6 @@ import efl_object; -interface Efl.Part +interface @beta Efl.Part { [[Interface for objects supporting named parts. diff --git a/src/lib/efl/interfaces/efl_playable.eo b/src/lib/efl/interfaces/efl_playable.eo index 56dbc9e51b..69df4235d9 100644 --- a/src/lib/efl/interfaces/efl_playable.eo +++ b/src/lib/efl/interfaces/efl_playable.eo @@ -1,4 +1,4 @@ -interface Efl.Playable +interface @beta Efl.Playable { [[Efl media playable interface]] methods { diff --git a/src/lib/efl/interfaces/efl_player.eo b/src/lib/efl/interfaces/efl_player.eo index 0353b36752..5c3a32c6d7 100644 --- a/src/lib/efl/interfaces/efl_player.eo +++ b/src/lib/efl/interfaces/efl_player.eo @@ -1,4 +1,4 @@ -interface Efl.Player +interface @beta Efl.Player { [[Efl media player interface]] methods { diff --git a/src/lib/efl/interfaces/efl_screen.eo b/src/lib/efl/interfaces/efl_screen.eo index c779dcedce..ee1696f3d4 100644 --- a/src/lib/efl/interfaces/efl_screen.eo +++ b/src/lib/efl/interfaces/efl_screen.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Screen +interface @beta Efl.Screen { [[Efl screen interface]] methods { diff --git a/src/lib/efl/interfaces/efl_text.eo b/src/lib/efl/interfaces/efl_text.eo index 13733b0d4e..8d0851048a 100644 --- a/src/lib/efl/interfaces/efl_text.eo +++ b/src/lib/efl/interfaces/efl_text.eo @@ -1,4 +1,4 @@ -interface Efl.Text +interface @beta Efl.Text { [[Efl text interface]] methods { diff --git a/src/lib/efl/interfaces/efl_text_annotate.eo b/src/lib/efl/interfaces/efl_text_annotate.eo index f22209ec39..9dc5f6e003 100644 --- a/src/lib/efl/interfaces/efl_text_annotate.eo +++ b/src/lib/efl/interfaces/efl_text_annotate.eo @@ -1,6 +1,6 @@ import efl_text_types; -interface Efl.Text_Annotate { +interface @beta Efl.Text_Annotate { [[Cursor API @since 1.20 diff --git a/src/lib/efl/interfaces/efl_text_cursor.eo b/src/lib/efl/interfaces/efl_text_cursor.eo index 87bba61bdd..855c49f207 100644 --- a/src/lib/efl/interfaces/efl_text_cursor.eo +++ b/src/lib/efl/interfaces/efl_text_cursor.eo @@ -22,7 +22,7 @@ enum Efl.Text_Cursor_Type under [[Cursor type under]] } -interface Efl.Text_Cursor { +interface @beta Efl.Text_Cursor { [[Cursor API @since 1.20 diff --git a/src/lib/efl/interfaces/efl_text_font.eo b/src/lib/efl/interfaces/efl_text_font.eo index 34e5dab22a..bcbc837439 100644 --- a/src/lib/efl/interfaces/efl_text_font.eo +++ b/src/lib/efl/interfaces/efl_text_font.eo @@ -49,7 +49,7 @@ enum Efl.Text_Font_Bitmap_Scalable { color = (1 << 0), [[Enable scalable feature for color bitmap fonts.]] } -interface Efl.Text_Font { +interface @beta Efl.Text_Font { [[Font settings of the text @since 1.20 diff --git a/src/lib/efl/interfaces/efl_text_format.eo b/src/lib/efl/interfaces/efl_text_format.eo index 0ec9c98240..04a99ac582 100644 --- a/src/lib/efl/interfaces/efl_text_format.eo +++ b/src/lib/efl/interfaces/efl_text_format.eo @@ -16,7 +16,7 @@ enum Efl.Text_Format_Horizontal_Alignment_Auto_Type { end [[Text is places at opposite side of LTR/RTL (bidirectional) settings]] } -interface Efl.Text_Format { +interface @beta Efl.Text_Format { [[The look and layout of the text The text format can affect the geometry of the text object, as well as diff --git a/src/lib/efl/interfaces/efl_text_markup.eo b/src/lib/efl/interfaces/efl_text_markup.eo index 7d6968445c..a12b0728b8 100644 --- a/src/lib/efl/interfaces/efl_text_markup.eo +++ b/src/lib/efl/interfaces/efl_text_markup.eo @@ -1,4 +1,4 @@ -interface Efl.Text_Markup { +interface @beta Efl.Text_Markup { [[Markup data that populates the text object's style and format @since 1.21 diff --git a/src/lib/efl/interfaces/efl_text_markup_interactive.eo b/src/lib/efl/interfaces/efl_text_markup_interactive.eo index 4906d5931a..dc0a04af5d 100644 --- a/src/lib/efl/interfaces/efl_text_markup_interactive.eo +++ b/src/lib/efl/interfaces/efl_text_markup_interactive.eo @@ -1,4 +1,4 @@ -interface Efl.Text_Markup_Interactive extends Efl.Text_Cursor { +interface @beta Efl.Text_Markup_Interactive extends Efl.Text_Cursor { [[Markup data that populates the text object's style and format @since 1.22 diff --git a/src/lib/efl/interfaces/efl_text_markup_util.eo b/src/lib/efl/interfaces/efl_text_markup_util.eo index 845694d489..f29d2f8d77 100644 --- a/src/lib/efl/interfaces/efl_text_markup_util.eo +++ b/src/lib/efl/interfaces/efl_text_markup_util.eo @@ -1,4 +1,4 @@ -class Efl.Text_Markup_Util { +class @beta Efl.Text_Markup_Util { [[Utility class for markup, such as conversions @since 1.21. diff --git a/src/lib/efl/interfaces/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style.eo index 99552ac036..d6952cd53b 100644 --- a/src/lib/efl/interfaces/efl_text_style.eo +++ b/src/lib/efl/interfaces/efl_text_style.eo @@ -55,7 +55,7 @@ enum Efl.Text_Style_Underline_Type dashed, [[Underlined with a dashed line]] } -interface Efl.Text_Style { +interface @beta Efl.Text_Style { [[Style to apply to the text A style can be coloring, effects, underline, strikethrough etc. diff --git a/src/lib/efl/interfaces/efl_ui_autorepeat.eo b/src/lib/efl/interfaces/efl_ui_autorepeat.eo index 5bcf451e5a..1c374a5172 100644 --- a/src/lib/efl/interfaces/efl_ui_autorepeat.eo +++ b/src/lib/efl/interfaces/efl_ui_autorepeat.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Autorepeat { +interface @beta Efl.Ui.Autorepeat { [[Efl UI autorepeat interface]] eo_prefix: efl_ui; methods { diff --git a/src/lib/efl/interfaces/efl_ui_clickable.eo b/src/lib/efl/interfaces/efl_ui_clickable.eo index 869d5e3650..34da147875 100644 --- a/src/lib/efl/interfaces/efl_ui_clickable.eo +++ b/src/lib/efl/interfaces/efl_ui_clickable.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Clickable +interface @beta Efl.Ui.Clickable { [[Efl UI clickable interface]] event_prefix: efl_ui; diff --git a/src/lib/efl/interfaces/efl_ui_direction.eo b/src/lib/efl/interfaces/efl_ui_direction.eo index 7e5aa74c0e..9a0ad01847 100644 --- a/src/lib/efl/interfaces/efl_ui_direction.eo +++ b/src/lib/efl/interfaces/efl_ui_direction.eo @@ -25,7 +25,7 @@ enum Efl.Ui.Dir left = Efl.Ui.Dir.rtl, [[Left is an alias for RTL.]] } -interface Efl.Ui.Direction +interface @beta Efl.Ui.Direction { [[EFL UI object direction interface]] methods { diff --git a/src/lib/efl/interfaces/efl_ui_direction_readonly.eo b/src/lib/efl/interfaces/efl_ui_direction_readonly.eo index 900b990c49..aaba2d45c5 100644 --- a/src/lib/efl/interfaces/efl_ui_direction_readonly.eo +++ b/src/lib/efl/interfaces/efl_ui_direction_readonly.eo @@ -1,4 +1,4 @@ -mixin Efl.Ui.Direction_Readonly extends Efl.Ui.Direction +mixin @beta Efl.Ui.Direction_Readonly extends Efl.Ui.Direction { implements { Efl.Ui.Direction.direction { set; [[This will always print and error that this is a readonly object]]} diff --git a/src/lib/efl/interfaces/efl_ui_drag.eo b/src/lib/efl/interfaces/efl_ui_drag.eo index dedcb348f1..acc1304cdc 100644 --- a/src/lib/efl/interfaces/efl_ui_drag.eo +++ b/src/lib/efl/interfaces/efl_ui_drag.eo @@ -2,7 +2,7 @@ import efl_ui_types; -interface Efl.Ui.Drag +interface @beta Efl.Ui.Drag { [[Common interface for draggable objects and parts. diff --git a/src/lib/efl/interfaces/efl_ui_draggable.eo b/src/lib/efl/interfaces/efl_ui_draggable.eo index a202a3e434..3cd939667b 100644 --- a/src/lib/efl/interfaces/efl_ui_draggable.eo +++ b/src/lib/efl/interfaces/efl_ui_draggable.eo @@ -1,5 +1,5 @@ /* FIXME: Edje Drag and this Dnd Draggable have confusingly similar names! */ -interface Efl.Ui.Draggable +interface @beta Efl.Ui.Draggable { [[Efl UI draggable interface]] event_prefix: efl_ui; diff --git a/src/lib/efl/interfaces/efl_ui_factory.eo b/src/lib/efl/interfaces/efl_ui_factory.eo index 7b4356a04b..6f6735a6d9 100644 --- a/src/lib/efl/interfaces/efl_ui_factory.eo +++ b/src/lib/efl/interfaces/efl_ui_factory.eo @@ -4,7 +4,7 @@ struct Efl.Ui.Factory_Item_Created_Event { item: Efl.Gfx.Entity; [[The item that was just created.]] } -interface Efl.Ui.Factory extends Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind +interface @beta Efl.Ui.Factory extends Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind { [[Efl UI factory interface]] methods { diff --git a/src/lib/efl/interfaces/efl_ui_factory_bind.eo b/src/lib/efl/interfaces/efl_ui_factory_bind.eo index 0e36b44f05..d26832453f 100644 --- a/src/lib/efl/interfaces/efl_ui_factory_bind.eo +++ b/src/lib/efl/interfaces/efl_ui_factory_bind.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Factory_Bind +interface @beta Efl.Ui.Factory_Bind { [[Efl UI Property interface. view object can have @Efl.Model and need to set cotent with those model stored data. diff --git a/src/lib/efl/interfaces/efl_ui_format.eo b/src/lib/efl/interfaces/efl_ui_format.eo index e78478e8bd..07e51ce28e 100644 --- a/src/lib/efl/interfaces/efl_ui_format.eo +++ b/src/lib/efl/interfaces/efl_ui_format.eo @@ -6,7 +6,7 @@ function Efl.Ui.Format_Func_Cb { } }; -mixin Efl.Ui.Format +mixin @beta Efl.Ui.Format { [[interface class for format_func]] methods { diff --git a/src/lib/efl/interfaces/efl_ui_i18n.eo b/src/lib/efl/interfaces/efl_ui_i18n.eo index 3dffa16c1e..ece81f6314 100644 --- a/src/lib/efl/interfaces/efl_ui_i18n.eo +++ b/src/lib/efl/interfaces/efl_ui_i18n.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.I18n +interface @beta Efl.Ui.I18n { [[A common Internationalization interface for UI objects.]] eo_prefix: efl_ui; diff --git a/src/lib/efl/interfaces/efl_ui_menu.eo b/src/lib/efl/interfaces/efl_ui_menu.eo index be4b6cb82f..699790ab49 100644 --- a/src/lib/efl/interfaces/efl_ui_menu.eo +++ b/src/lib/efl/interfaces/efl_ui_menu.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Menu { +interface @beta Efl.Ui.Menu { [[Efl UI menu interface]] legacy_prefix: null; methods { diff --git a/src/lib/efl/interfaces/efl_ui_multi_selectable.eo b/src/lib/efl/interfaces/efl_ui_multi_selectable.eo index f8a95afeed..90c825f223 100644 --- a/src/lib/efl/interfaces/efl_ui_multi_selectable.eo +++ b/src/lib/efl/interfaces/efl_ui_multi_selectable.eo @@ -9,7 +9,7 @@ enum Efl.Ui.Select_Mode { none [[Last value of select mode. child cannot be selected at all.]] } -interface Efl.Ui.Multi_Selectable +interface @beta Efl.Ui.Multi_Selectable { [[Efl UI Multi selectable interface. The container have to control select property of multiple chidren.]] diff --git a/src/lib/efl/interfaces/efl_ui_property_bind.eo b/src/lib/efl/interfaces/efl_ui_property_bind.eo index e709bd87c7..54ce4d9d26 100644 --- a/src/lib/efl/interfaces/efl_ui_property_bind.eo +++ b/src/lib/efl/interfaces/efl_ui_property_bind.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Property_Bind +interface @beta Efl.Ui.Property_Bind { [[Efl UI Property_Bind interface. view object can have @Efl.Model to manage the data, diff --git a/src/lib/efl/interfaces/efl_ui_range_display.eo b/src/lib/efl/interfaces/efl_ui_range_display.eo index 3a3891d5c4..ca9d2c1e1b 100644 --- a/src/lib/efl/interfaces/efl_ui_range_display.eo +++ b/src/lib/efl/interfaces/efl_ui_range_display.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Range_Display +interface @beta Efl.Ui.Range_Display { [[Interface that contains properties regarding the displaying of a range.]] eo_prefix: efl_ui_range; diff --git a/src/lib/efl/interfaces/efl_ui_range_interactive.eo b/src/lib/efl/interfaces/efl_ui_range_interactive.eo index d7114e8073..a7af8c8c8f 100644 --- a/src/lib/efl/interfaces/efl_ui_range_interactive.eo +++ b/src/lib/efl/interfaces/efl_ui_range_interactive.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Range_Interactive extends Efl.Ui.Range_Display +interface @beta Efl.Ui.Range_Interactive extends Efl.Ui.Range_Display { [[Interface that extends the normal displaying properties with usage properties. diff --git a/src/lib/efl/interfaces/efl_ui_scrollable.eo b/src/lib/efl/interfaces/efl_ui_scrollable.eo index b1284e5cd6..3b30a25ccb 100644 --- a/src/lib/efl/interfaces/efl_ui_scrollable.eo +++ b/src/lib/efl/interfaces/efl_ui_scrollable.eo @@ -12,7 +12,7 @@ enum Efl.Ui.Scroll_Block horizontal = 2 [[Block horizontal movement.]] } -interface Efl.Ui.Scrollable +interface @beta Efl.Ui.Scrollable { [[Efl UI scrollable interface]] event_prefix: efl_ui; diff --git a/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo b/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo index 3e72ba4853..c5bbc1cceb 100644 --- a/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo +++ b/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable +interface @beta Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable { eo_prefix: efl_ui_scrollable; methods { diff --git a/src/lib/efl/interfaces/efl_ui_scrollbar.eo b/src/lib/efl/interfaces/efl_ui_scrollbar.eo index 46e1bad5fe..18b9e05d8b 100644 --- a/src/lib/efl/interfaces/efl_ui_scrollbar.eo +++ b/src/lib/efl/interfaces/efl_ui_scrollbar.eo @@ -12,7 +12,7 @@ enum Efl.Ui.Scrollbar_Direction vertical, last } -interface Efl.Ui.Scrollbar +interface @beta Efl.Ui.Scrollbar { methods { @property bar_mode { diff --git a/src/lib/efl/interfaces/efl_ui_selectable.eo b/src/lib/efl/interfaces/efl_ui_selectable.eo index 2d67ac018f..770e5e2132 100644 --- a/src/lib/efl/interfaces/efl_ui_selectable.eo +++ b/src/lib/efl/interfaces/efl_ui_selectable.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Selectable +interface @beta Efl.Ui.Selectable { [[Efl UI selectable interface]] event_prefix: efl_ui; diff --git a/src/lib/efl/interfaces/efl_ui_view.eo b/src/lib/efl/interfaces/efl_ui_view.eo index 144b2fa660..33919d5c96 100644 --- a/src/lib/efl/interfaces/efl_ui_view.eo +++ b/src/lib/efl/interfaces/efl_ui_view.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.View +interface @beta Efl.Ui.View { [[Efl UI view interface]] methods { diff --git a/src/lib/efl/interfaces/efl_ui_zoom.eo b/src/lib/efl/interfaces/efl_ui_zoom.eo index d719d3bfae..c053aec1b4 100644 --- a/src/lib/efl/interfaces/efl_ui_zoom.eo +++ b/src/lib/efl/interfaces/efl_ui_zoom.eo @@ -9,7 +9,7 @@ enum Efl.Ui.Zoom_Mode last [[Sentinel value to indicate last enum field during iteration]] } -interface Efl.Ui.Zoom +interface @beta Efl.Ui.Zoom { [[Efl UI zoom interface]] event_prefix: efl_ui; diff --git a/src/lib/eio/efl_io_manager.eo b/src/lib/eio/efl_io_manager.eo index 9ac9e637c9..8213591b87 100644 --- a/src/lib/eio/efl_io_manager.eo +++ b/src/lib/eio/efl_io_manager.eo @@ -21,7 +21,7 @@ function EflIoDirectInfo { } }; -class Efl.Io.Manager extends Efl.Loop_Consumer +class @beta Efl.Io.Manager extends Efl.Loop_Consumer { [[Class representing an asynchronous file operation.]] diff --git a/src/lib/eio/efl_io_model.eo b/src/lib/eio/efl_io_model.eo index 9939a80f51..0d881fe6e2 100644 --- a/src/lib/eio/efl_io_model.eo +++ b/src/lib/eio/efl_io_model.eo @@ -9,7 +9,7 @@ function EflIoFilter { return: int; }; -class Efl.Io.Model extends Efl.Loop_Model +class @beta Efl.Io.Model extends Efl.Loop_Model { [[Efl Io model class]] diff --git a/src/lib/elementary/efl_access_action.eo b/src/lib/elementary/efl_access_action.eo index 073a7a2f1b..94804b5081 100644 --- a/src/lib/elementary/efl_access_action.eo +++ b/src/lib/elementary/efl_access_action.eo @@ -1,6 +1,6 @@ import efl_ui; -mixin Efl.Access.Action +mixin @beta Efl.Access.Action { [[Accessible action mixin]] data: null; diff --git a/src/lib/elementary/efl_access_component.eo b/src/lib/elementary/efl_access_component.eo index 3b5f561191..b18921b3fd 100644 --- a/src/lib/elementary/efl_access_component.eo +++ b/src/lib/elementary/efl_access_component.eo @@ -1,6 +1,6 @@ import eina_types; -mixin Efl.Access.Component extends Efl.Gfx.Entity, Efl.Gfx.Stack +mixin @beta Efl.Access.Component extends Efl.Gfx.Entity, Efl.Gfx.Stack { [[AT-SPI component mixin]] data: null; diff --git a/src/lib/elementary/efl_access_editable_text.eo b/src/lib/elementary/efl_access_editable_text.eo index 126d8f7821..e780f0576f 100644 --- a/src/lib/elementary/efl_access_editable_text.eo +++ b/src/lib/elementary/efl_access_editable_text.eo @@ -1,4 +1,4 @@ -interface Efl.Access.Editable.Text +interface @beta Efl.Access.Editable.Text { [[Elementary editable text interface]] methods { diff --git a/src/lib/elementary/efl_access_object.eo b/src/lib/elementary/efl_access_object.eo index 9a11511a9b..26ebcca586 100644 --- a/src/lib/elementary/efl_access_object.eo +++ b/src/lib/elementary/efl_access_object.eo @@ -239,7 +239,7 @@ struct Efl.Access.Relation objects: list; [[List with relation objects]] } -mixin Efl.Access.Object requires Efl.Object +mixin @beta Efl.Access.Object requires Efl.Object { [[Accessibility accessible mixin]] eo_prefix: efl_access_object; diff --git a/src/lib/elementary/efl_access_selection.eo b/src/lib/elementary/efl_access_selection.eo index ca9c4f085b..4f199ff73a 100644 --- a/src/lib/elementary/efl_access_selection.eo +++ b/src/lib/elementary/efl_access_selection.eo @@ -1,4 +1,4 @@ -interface Efl.Access.Selection +interface @beta Efl.Access.Selection { [[Elementary access selection interface]] methods { diff --git a/src/lib/elementary/efl_access_text.eo b/src/lib/elementary/efl_access_text.eo index 6226af90ee..d49e0d372b 100644 --- a/src/lib/elementary/efl_access_text.eo +++ b/src/lib/elementary/efl_access_text.eo @@ -44,7 +44,7 @@ struct Efl.Access.Text_Change_Info len: size; [[Change length]] } -interface Efl.Access.Text +interface @beta Efl.Access.Text { [[Elementary accessible text interface]] methods { diff --git a/src/lib/elementary/efl_access_value.eo b/src/lib/elementary/efl_access_value.eo index 43d6d219b8..4ab0a7b35e 100644 --- a/src/lib/elementary/efl_access_value.eo +++ b/src/lib/elementary/efl_access_value.eo @@ -1,4 +1,4 @@ -interface Efl.Access.Value +interface @beta Efl.Access.Value { [[Elementary Access value interface]] methods { diff --git a/src/lib/elementary/efl_access_widget_action.eo b/src/lib/elementary/efl_access_widget_action.eo index da381591af..58f795948f 100644 --- a/src/lib/elementary/efl_access_widget_action.eo +++ b/src/lib/elementary/efl_access_widget_action.eo @@ -1,6 +1,6 @@ import efl_ui; -mixin Efl.Access.Widget.Action extends Efl.Access.Action +mixin @beta Efl.Access.Widget.Action extends Efl.Access.Action { [[Access widget action mixin]] data: null; diff --git a/src/lib/elementary/efl_access_window.eo b/src/lib/elementary/efl_access_window.eo index 9422b1b5a0..12c00a81ef 100644 --- a/src/lib/elementary/efl_access_window.eo +++ b/src/lib/elementary/efl_access_window.eo @@ -1,4 +1,4 @@ -interface Efl.Access.Window +interface @beta Efl.Access.Window { [[Elementary accessible window interface]] events { diff --git a/src/lib/elementary/efl_config_global.eo b/src/lib/elementary/efl_config_global.eo index aba9adedb4..5ec518a8a6 100644 --- a/src/lib/elementary/efl_config_global.eo +++ b/src/lib/elementary/efl_config_global.eo @@ -1,4 +1,4 @@ -class Efl.Config_Global extends Efl.Object implements Efl.Config +class @beta Efl.Config_Global extends Efl.Object implements Efl.Config { [[This class is a singleton representing the global configuration for the running application. diff --git a/src/lib/elementary/efl_datetime_manager.eo b/src/lib/elementary/efl_datetime_manager.eo index 194c6bd546..3368fdcdc5 100644 --- a/src/lib/elementary/efl_datetime_manager.eo +++ b/src/lib/elementary/efl_datetime_manager.eo @@ -1,6 +1,6 @@ import efl_types; -class Efl.Datetime.Manager extends Efl.Object +class @beta Efl.Datetime.Manager extends Efl.Object { [[Efl datetime manager class for Datepicker and Timepicker]] methods { diff --git a/src/lib/elementary/efl_page_indicator.eo b/src/lib/elementary/efl_page_indicator.eo index a3602438cb..be03c56433 100644 --- a/src/lib/elementary/efl_page_indicator.eo +++ b/src/lib/elementary/efl_page_indicator.eo @@ -1,4 +1,4 @@ -class Efl.Page.Indicator extends Efl.Object +class @beta Efl.Page.Indicator extends Efl.Object { [[Page indicator diff --git a/src/lib/elementary/efl_page_indicator_icon.eo b/src/lib/elementary/efl_page_indicator_icon.eo index d6b8ec93f1..1af3bdc397 100644 --- a/src/lib/elementary/efl_page_indicator_icon.eo +++ b/src/lib/elementary/efl_page_indicator_icon.eo @@ -1,4 +1,4 @@ -class Efl.Page.Indicator_Icon extends Efl.Page.Indicator +class @beta Efl.Page.Indicator_Icon extends Efl.Page.Indicator { [[Icon type page indicator diff --git a/src/lib/elementary/efl_page_transition.eo b/src/lib/elementary/efl_page_transition.eo index bf67b7ea7b..5f97951b0e 100644 --- a/src/lib/elementary/efl_page_transition.eo +++ b/src/lib/elementary/efl_page_transition.eo @@ -1,4 +1,4 @@ -class Efl.Page.Transition extends Efl.Object +class @beta Efl.Page.Transition extends Efl.Object { [[Page transition for @Efl.Ui.Pager diff --git a/src/lib/elementary/efl_page_transition_scroll.eo b/src/lib/elementary/efl_page_transition_scroll.eo index 2575a507fe..e9af63b224 100644 --- a/src/lib/elementary/efl_page_transition_scroll.eo +++ b/src/lib/elementary/efl_page_transition_scroll.eo @@ -1,4 +1,4 @@ -class Efl.Page.Transition_Scroll extends Efl.Page.Transition +class @beta Efl.Page.Transition_Scroll extends Efl.Page.Transition { [[Page transition for @Efl.Ui.Pager diff --git a/src/lib/elementary/efl_text_interactive.eo b/src/lib/elementary/efl_text_interactive.eo index 0cb4d6f766..8d2d444a34 100644 --- a/src/lib/elementary/efl_text_interactive.eo +++ b/src/lib/elementary/efl_text_interactive.eo @@ -1,6 +1,6 @@ import efl_text_types; -interface Efl.Text_Interactive extends Efl.Text, Efl.Text_Font, +interface @beta Efl.Text_Interactive extends Efl.Text, Efl.Text_Font, Efl.Text_Format, Efl.Text_Style { [[This is an interface interactive text inputs should implement]] diff --git a/src/lib/elementary/efl_ui_alert_popup.eo b/src/lib/elementary/efl_ui_alert_popup.eo index fdcb6eb86f..9b2e911592 100644 --- a/src/lib/elementary/efl_ui_alert_popup.eo +++ b/src/lib/elementary/efl_ui_alert_popup.eo @@ -10,7 +10,7 @@ struct Efl.Ui.Alert_Popup_Button_Clicked_Event { button_type: Efl.Ui.Alert_Popup_Button; [[Clicked button type]] } -class Efl.Ui.Alert_Popup extends Efl.Ui.Popup +class @beta Efl.Ui.Alert_Popup extends Efl.Ui.Popup { [[EFL UI Alert Popup class]] methods { diff --git a/src/lib/elementary/efl_ui_alert_popup_part.eo b/src/lib/elementary/efl_ui_alert_popup_part.eo index 41e00d05c7..b5860a99ff 100644 --- a/src/lib/elementary/efl_ui_alert_popup_part.eo +++ b/src/lib/elementary/efl_ui_alert_popup_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Alert_Popup_Part extends Efl.Ui.Layout_Part_Text +class @beta Efl.Ui.Alert_Popup_Part extends Efl.Ui.Layout_Part_Text { [[Efl UI Alert Popup internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_anchor_popup.eo b/src/lib/elementary/efl_ui_anchor_popup.eo index 1f8ab61651..85b81c80e3 100644 --- a/src/lib/elementary/efl_ui_anchor_popup.eo +++ b/src/lib/elementary/efl_ui_anchor_popup.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Anchor_Popup extends Efl.Ui.Popup +class @beta Efl.Ui.Anchor_Popup extends Efl.Ui.Popup { [[EFL UI Anchor Popup class]] methods { diff --git a/src/lib/elementary/efl_ui_average_model.eo b/src/lib/elementary/efl_ui_average_model.eo index 16831e7af6..98d97598f8 100644 --- a/src/lib/elementary/efl_ui_average_model.eo +++ b/src/lib/elementary/efl_ui_average_model.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Average_Model extends Efl.Ui.Exact_Model +class @beta Efl.Ui.Average_Model extends Efl.Ui.Exact_Model { [[Class to be used to store object item size for List/Grid View. diff --git a/src/lib/elementary/efl_ui_bg.eo b/src/lib/elementary/efl_ui_bg.eo index 26b16437ab..b928549fef 100644 --- a/src/lib/elementary/efl_ui_bg.eo +++ b/src/lib/elementary/efl_ui_bg.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Bg extends Efl.Ui.Layout implements Efl.Gfx.Color, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller +class @beta Efl.Ui.Bg extends Efl.Ui.Layout implements Efl.Gfx.Color, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller { [[The bg (background) widget is used for setting (solid) background decorations for a window (unless it has transparency enabled) or for any container object. It diff --git a/src/lib/elementary/efl_ui_bg_legacy.eo b/src/lib/elementary/efl_ui_bg_legacy.eo index 7ab9aab3b4..cc681b0b8e 100644 --- a/src/lib/elementary/efl_ui_bg_legacy.eo +++ b/src/lib/elementary/efl_ui_bg_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Bg_Legacy extends Efl.Ui.Bg implements Efl.Ui.Legacy +class @beta Efl.Ui.Bg_Legacy extends Efl.Ui.Bg implements Efl.Ui.Legacy { [[The bg (background) widget is used for setting (solid) background decorations diff --git a/src/lib/elementary/efl_ui_box.eo b/src/lib/elementary/efl_ui_box.eo index fddf253d90..164bdb8879 100644 --- a/src/lib/elementary/efl_ui_box.eo +++ b/src/lib/elementary/efl_ui_box.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pack_Layout, +class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pack_Layout, Efl.Ui.Direction { [[The box widget. diff --git a/src/lib/elementary/efl_ui_box_flow.eo b/src/lib/elementary/efl_ui_box_flow.eo index 82e5bdbdfe..3ba120b6fb 100644 --- a/src/lib/elementary/efl_ui_box_flow.eo +++ b/src/lib/elementary/efl_ui_box_flow.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Box_Flow extends Efl.Ui.Box +class @beta Efl.Ui.Box_Flow extends Efl.Ui.Box { [[A custom layout engine for @Efl.Ui.Box.]] methods { diff --git a/src/lib/elementary/efl_ui_box_stack.eo b/src/lib/elementary/efl_ui_box_stack.eo index 7d2ebfbbee..61035b45f9 100644 --- a/src/lib/elementary/efl_ui_box_stack.eo +++ b/src/lib/elementary/efl_ui_box_stack.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Box_Stack extends Efl.Ui.Box +class @beta Efl.Ui.Box_Stack extends Efl.Ui.Box { [[A custom layout engine for @Efl.Ui.Box that stacks items. diff --git a/src/lib/elementary/efl_ui_button.eo b/src/lib/elementary/efl_ui_button.eo index adb22ba3dc..ff79209e27 100644 --- a/src/lib/elementary/efl_ui_button.eo +++ b/src/lib/elementary/efl_ui_button.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Button extends Efl.Ui.Layout implements Efl.Ui.Clickable, Efl.Ui.Autorepeat, +class @beta Efl.Ui.Button extends Efl.Ui.Layout implements Efl.Ui.Clickable, Efl.Ui.Autorepeat, Efl.Text, Efl.Content, Efl.Access.Widget.Action { diff --git a/src/lib/elementary/efl_ui_button_legacy.eo b/src/lib/elementary/efl_ui_button_legacy.eo index acb2c8d7ac..557704b9d2 100644 --- a/src/lib/elementary/efl_ui_button_legacy.eo +++ b/src/lib/elementary/efl_ui_button_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Button_Legacy extends Efl.Ui.Button implements Efl.Ui.Legacy +class @beta Efl.Ui.Button_Legacy extends Efl.Ui.Button implements Efl.Ui.Legacy { [[Push-button widget diff --git a/src/lib/elementary/efl_ui_button_legacy_part.eo b/src/lib/elementary/efl_ui_button_legacy_part.eo index baa055146e..0d7c7c9967 100644 --- a/src/lib/elementary/efl_ui_button_legacy_part.eo +++ b/src/lib/elementary/efl_ui_button_legacy_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Button_Legacy_Part extends Efl.Ui.Layout_Part_Content +class @beta Efl.Ui.Button_Legacy_Part extends Efl.Ui.Layout_Part_Content { [[Elementary button internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_caching_factory.eo b/src/lib/elementary/efl_ui_caching_factory.eo index ee53983a54..266ea5803d 100644 --- a/src/lib/elementary/efl_ui_caching_factory.eo +++ b/src/lib/elementary/efl_ui_caching_factory.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory +class @beta Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory { [[Efl Ui Factory that provides object caching. diff --git a/src/lib/elementary/efl_ui_calendar.eo b/src/lib/elementary/efl_ui_calendar.eo index 78bc2b4a38..33547507da 100644 --- a/src/lib/elementary/efl_ui_calendar.eo +++ b/src/lib/elementary/efl_ui_calendar.eo @@ -16,7 +16,7 @@ enum Efl.Ui.Calendar_Weekday last [[Sentinel value to indicate last enum field during iteration]] } -class Efl.Ui.Calendar extends Efl.Ui.Layout implements Efl.Ui.Focus.Composition, Efl.Access.Widget.Action, Efl.Ui.Format +class @beta Efl.Ui.Calendar extends Efl.Ui.Layout implements Efl.Ui.Focus.Composition, Efl.Access.Widget.Action, Efl.Ui.Format { [[Calendar widget diff --git a/src/lib/elementary/efl_ui_calendar_item.eo b/src/lib/elementary/efl_ui_calendar_item.eo index ad235e0332..2dcd80a613 100644 --- a/src/lib/elementary/efl_ui_calendar_item.eo +++ b/src/lib/elementary/efl_ui_calendar_item.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Calendar_Item extends Efl.Object implements Efl.Ui.Focus.Object +class @beta Efl.Ui.Calendar_Item extends Efl.Object implements Efl.Ui.Focus.Object { [[EFL UI Calendar Item class]] methods { diff --git a/src/lib/elementary/efl_ui_check.eo b/src/lib/elementary/efl_ui_check.eo index b6ea04f879..19d77613a1 100644 --- a/src/lib/elementary/efl_ui_check.eo +++ b/src/lib/elementary/efl_ui_check.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Check extends Efl.Ui.Nstate implements Efl.Access.Widget.Action +class @beta Efl.Ui.Check extends Efl.Ui.Nstate implements Efl.Access.Widget.Action { [[Check widget diff --git a/src/lib/elementary/efl_ui_check_legacy.eo b/src/lib/elementary/efl_ui_check_legacy.eo index 9486bf608f..f16ded2435 100644 --- a/src/lib/elementary/efl_ui_check_legacy.eo +++ b/src/lib/elementary/efl_ui_check_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Check_Legacy extends Efl.Ui.Check implements Efl.Ui.Legacy +class @beta Efl.Ui.Check_Legacy extends Efl.Ui.Check implements Efl.Ui.Legacy { [[Check widget diff --git a/src/lib/elementary/efl_ui_check_legacy_part.eo b/src/lib/elementary/efl_ui_check_legacy_part.eo index b856f08f12..afd8703716 100644 --- a/src/lib/elementary/efl_ui_check_legacy_part.eo +++ b/src/lib/elementary/efl_ui_check_legacy_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Check_Legacy_Part extends Efl.Ui.Layout_Part_Content +class @beta Efl.Ui.Check_Legacy_Part extends Efl.Ui.Layout_Part_Content { [[Elementary check internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_clock.eo b/src/lib/elementary/efl_ui_clock.eo index 678b210af2..767f8b2b7d 100644 --- a/src/lib/elementary/efl_ui_clock.eo +++ b/src/lib/elementary/efl_ui_clock.eo @@ -16,7 +16,7 @@ enum Efl.Ui.Clock_Type ampm = 7, [[Indicates AM/PM field .]] } -class Efl.Ui.Clock extends Efl.Ui.Layout +class @beta Efl.Ui.Clock extends Efl.Ui.Layout { [[Efl UI clock class]] methods { diff --git a/src/lib/elementary/efl_ui_clock_legacy.eo b/src/lib/elementary/efl_ui_clock_legacy.eo index 463af9676e..acc7cea33c 100644 --- a/src/lib/elementary/efl_ui_clock_legacy.eo +++ b/src/lib/elementary/efl_ui_clock_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Clock_Legacy extends Efl.Ui.Clock implements Efl.Ui.Legacy +class @beta Efl.Ui.Clock_Legacy extends Efl.Ui.Clock implements Efl.Ui.Legacy { [[Efl UI clock class]] data: null; diff --git a/src/lib/elementary/efl_ui_cursor.eo b/src/lib/elementary/efl_ui_cursor.eo index a172e533f7..4c14411bd4 100644 --- a/src/lib/elementary/efl_ui_cursor.eo +++ b/src/lib/elementary/efl_ui_cursor.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Cursor +interface @beta Efl.Ui.Cursor { [[An interface to define mouse cursors to use when hovering over UI widgets. diff --git a/src/lib/elementary/efl_ui_datepicker.eo b/src/lib/elementary/efl_ui_datepicker.eo index 81d9b1634e..4225c28e75 100644 --- a/src/lib/elementary/efl_ui_datepicker.eo +++ b/src/lib/elementary/efl_ui_datepicker.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Datepicker extends Efl.Ui.Layout +class @beta Efl.Ui.Datepicker extends Efl.Ui.Layout { [[Datepicker widget diff --git a/src/lib/elementary/efl_ui_dnd.eo b/src/lib/elementary/efl_ui_dnd.eo index a4ea5e9b78..08f668856b 100644 --- a/src/lib/elementary/efl_ui_dnd.eo +++ b/src/lib/elementary/efl_ui_dnd.eo @@ -1,6 +1,6 @@ import efl_ui_dnd_types; -mixin Efl.Ui.Dnd { +mixin @beta Efl.Ui.Dnd { data: null; methods { drag_start { diff --git a/src/lib/elementary/efl_ui_dnd_container.eo b/src/lib/elementary/efl_ui_dnd_container.eo index ee1e727a4a..05eccfeef8 100644 --- a/src/lib/elementary/efl_ui_dnd_container.eo +++ b/src/lib/elementary/efl_ui_dnd_container.eo @@ -1,6 +1,6 @@ import efl_ui_dnd_types; -mixin Efl.Ui.Dnd_Container { +mixin @beta Efl.Ui.Dnd_Container { methods { @property drag_delay_time { [[The time since mouse down happens to drag starts.]] diff --git a/src/lib/elementary/efl_ui_exact_model.eo b/src/lib/elementary/efl_ui_exact_model.eo index 0a91e21023..691a7504ef 100644 --- a/src/lib/elementary/efl_ui_exact_model.eo +++ b/src/lib/elementary/efl_ui_exact_model.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Exact_Model extends Efl.Ui.Size_Model +class @beta Efl.Ui.Exact_Model extends Efl.Ui.Size_Model { [[Class to be used to store object item size for List/Grid View. diff --git a/src/lib/elementary/efl_ui_flip.eo b/src/lib/elementary/efl_ui_flip.eo index 80999e0cda..ac233a1fbe 100644 --- a/src/lib/elementary/efl_ui_flip.eo +++ b/src/lib/elementary/efl_ui_flip.eo @@ -28,7 +28,7 @@ enum Efl.Ui.Flip_Interaction page [[Page interaction]] } -class Efl.Ui.Flip extends Efl.Ui.Widget implements Efl.Pack_Linear +class @beta Efl.Ui.Flip extends Efl.Ui.Widget implements Efl.Pack_Linear { [[Efl UI flip class]] legacy_prefix: elm_flip; diff --git a/src/lib/elementary/efl_ui_flip_legacy.eo b/src/lib/elementary/efl_ui_flip_legacy.eo index c19762fe56..19eb088d28 100644 --- a/src/lib/elementary/efl_ui_flip_legacy.eo +++ b/src/lib/elementary/efl_ui_flip_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Flip_Legacy extends Efl.Ui.Flip implements Efl.Ui.Legacy +class @beta Efl.Ui.Flip_Legacy extends Efl.Ui.Flip implements Efl.Ui.Legacy { [[Efl UI flip class]] data: null; diff --git a/src/lib/elementary/efl_ui_flip_part.eo b/src/lib/elementary/efl_ui_flip_part.eo index 84c3b0f1fb..f0b06442fc 100644 --- a/src/lib/elementary/efl_ui_flip_part.eo +++ b/src/lib/elementary/efl_ui_flip_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Flip_Part extends Efl.Ui.Widget_Part implements Efl.Content +class @beta Efl.Ui.Flip_Part extends Efl.Ui.Widget_Part implements Efl.Content { [[Efl UI flip internal class]] data: null; diff --git a/src/lib/elementary/efl_ui_focus_composition.eo b/src/lib/elementary/efl_ui_focus_composition.eo index 120867e53a..3fb5a360dc 100644 --- a/src/lib/elementary/efl_ui_focus_composition.eo +++ b/src/lib/elementary/efl_ui_focus_composition.eo @@ -1,4 +1,4 @@ -mixin Efl.Ui.Focus.Composition requires Efl.Ui.Widget { +mixin @beta Efl.Ui.Focus.Composition requires Efl.Ui.Widget { [[This defines the inheriting widget as Composition widget. A composition widget is a widget that's the logical parent of another set of widgets which can be used for interaction. diff --git a/src/lib/elementary/efl_ui_focus_composition_adapter.eo b/src/lib/elementary/efl_ui_focus_composition_adapter.eo index bb4e81c222..118f4a3a2a 100644 --- a/src/lib/elementary/efl_ui_focus_composition_adapter.eo +++ b/src/lib/elementary/efl_ui_focus_composition_adapter.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Focus.Composition_Adapter extends Efl.Object implements Efl.Ui.Focus.Object +class @beta Efl.Ui.Focus.Composition_Adapter extends Efl.Object implements Efl.Ui.Focus.Object { [[EFL UI Focus Composition Adapter class]] methods { diff --git a/src/lib/elementary/efl_ui_focus_layer.eo b/src/lib/elementary/efl_ui_focus_layer.eo index 92145ae29c..fd177caf62 100644 --- a/src/lib/elementary/efl_ui_focus_layer.eo +++ b/src/lib/elementary/efl_ui_focus_layer.eo @@ -1,4 +1,4 @@ -mixin Efl.Ui.Focus.Layer requires Efl.Ui.Widget extends Efl.Ui.Widget_Focus_Manager { +mixin @beta Efl.Ui.Focus.Layer requires Efl.Ui.Widget extends Efl.Ui.Widget_Focus_Manager { [[This defines the inheriting widget as focus layer A focus layer is the uppermost one which received input and handles all focus related events for as long as it exists and is visible. It's NOT possible to escape this layer with focus movement. diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index 425ad9de67..2d777bfa02 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -28,7 +28,7 @@ struct Efl.Ui.Focus.Manager_Logical_End_Detail { element : Efl.Ui.Focus.Object; [[Focus object element]] } -interface Efl.Ui.Focus.Manager { +interface @beta Efl.Ui.Focus.Manager { [[Calculates the directions of Efl.Ui.Focus.Direction Each registered item will get a other registered object into each diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.eo b/src/lib/elementary/efl_ui_focus_manager_calc.eo index 19212c7c87..72f0a2299b 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.eo +++ b/src/lib/elementary/efl_ui_focus_manager_calc.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Focus.Manager_Calc extends Efl.Object implements Efl.Ui.Focus.Manager { +class @beta Efl.Ui.Focus.Manager_Calc extends Efl.Object implements Efl.Ui.Focus.Manager { [[Calculates the directions of Efl.Ui.Focus.Direction Each registered item will get an other registered object in each diff --git a/src/lib/elementary/efl_ui_focus_manager_root_focus.eo b/src/lib/elementary/efl_ui_focus_manager_root_focus.eo index 14f0f3a43a..64b4d83695 100644 --- a/src/lib/elementary/efl_ui_focus_manager_root_focus.eo +++ b/src/lib/elementary/efl_ui_focus_manager_root_focus.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Focus.Manager_Root_Focus extends Efl.Ui.Focus.Manager_Calc { +class @beta Efl.Ui.Focus.Manager_Root_Focus extends Efl.Ui.Focus.Manager_Calc { [[ This class ensures that the root is at least focusable, if nothing else is focusable]] methods { @property canvas_object { diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.eo b/src/lib/elementary/efl_ui_focus_manager_sub.eo index a2414d43eb..79e06c86ff 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.eo +++ b/src/lib/elementary/efl_ui_focus_manager_sub.eo @@ -1,4 +1,4 @@ -mixin Efl.Ui.Focus.Manager_Sub requires Efl.Object extends Efl.Ui.Focus.Manager +mixin @beta Efl.Ui.Focus.Manager_Sub requires Efl.Object extends Efl.Ui.Focus.Manager { [[A class that automatically registers its border elements in the parent manager diff --git a/src/lib/elementary/efl_ui_focus_manager_window_root.eo b/src/lib/elementary/efl_ui_focus_manager_window_root.eo index 201e3bffc1..18eed60eda 100644 --- a/src/lib/elementary/efl_ui_focus_manager_window_root.eo +++ b/src/lib/elementary/efl_ui_focus_manager_window_root.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Focus.Manager_Window_Root { +interface @beta Efl.Ui.Focus.Manager_Window_Root { [[ A interface to indicate the end of a focus chain. Focusmanagers are ensuring that if they give focus to something, that they are registered in the upper focus manager. diff --git a/src/lib/elementary/efl_ui_focus_object.eo b/src/lib/elementary/efl_ui_focus_object.eo index 1ac6e0fd36..451e0b314a 100644 --- a/src/lib/elementary/efl_ui_focus_object.eo +++ b/src/lib/elementary/efl_ui_focus_object.eo @@ -1,6 +1,6 @@ import eina_types; -mixin Efl.Ui.Focus.Object +mixin @beta Efl.Ui.Focus.Object { [[Functions of focusable objects. diff --git a/src/lib/elementary/efl_ui_focus_parent_provider.eo b/src/lib/elementary/efl_ui_focus_parent_provider.eo index 04fa38ae31..7e33027da5 100644 --- a/src/lib/elementary/efl_ui_focus_parent_provider.eo +++ b/src/lib/elementary/efl_ui_focus_parent_provider.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Focus.Parent_Provider { +interface @beta Efl.Ui.Focus.Parent_Provider { [[EFL UI Focus Parent Provider interface]] methods { find_logical_parent { diff --git a/src/lib/elementary/efl_ui_focus_parent_provider_gen.eo b/src/lib/elementary/efl_ui_focus_parent_provider_gen.eo index 3bb66972d2..8cf0135610 100644 --- a/src/lib/elementary/efl_ui_focus_parent_provider_gen.eo +++ b/src/lib/elementary/efl_ui_focus_parent_provider_gen.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Focus.Parent_Provider_Gen extends Efl.Object implements Efl.Ui.Focus.Parent_Provider { +class @beta Efl.Ui.Focus.Parent_Provider_Gen extends Efl.Object implements Efl.Ui.Focus.Parent_Provider { [[EFL UI Focus Parent Provider Gen class]] methods { @property content_item_map { diff --git a/src/lib/elementary/efl_ui_focus_parent_provider_standard.eo b/src/lib/elementary/efl_ui_focus_parent_provider_standard.eo index d9d38b5301..40cce41449 100644 --- a/src/lib/elementary/efl_ui_focus_parent_provider_standard.eo +++ b/src/lib/elementary/efl_ui_focus_parent_provider_standard.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Focus.Parent_Provider_Standard extends Efl.Object implements Efl.Ui.Focus.Parent_Provider { +class @beta Efl.Ui.Focus.Parent_Provider_Standard extends Efl.Object implements Efl.Ui.Focus.Parent_Provider { [[EFL UI Focus Parent Provider Standard Class]] implements { Efl.Ui.Focus.Parent_Provider.find_logical_parent; diff --git a/src/lib/elementary/efl_ui_focus_util.eo b/src/lib/elementary/efl_ui_focus_util.eo index 4724dccc47..c19c05cb18 100644 --- a/src/lib/elementary/efl_ui_focus_util.eo +++ b/src/lib/elementary/efl_ui_focus_util.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Focus.Util extends Efl.Object { +class @beta Efl.Ui.Focus.Util extends Efl.Object { [[EFL UI Focus Util class]] methods { focus @class { diff --git a/src/lib/elementary/efl_ui_frame.eo b/src/lib/elementary/efl_ui_frame.eo index af6b59278a..853c7a72c2 100644 --- a/src/lib/elementary/efl_ui_frame.eo +++ b/src/lib/elementary/efl_ui_frame.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Frame extends Efl.Ui.Layout implements Efl.Ui.Clickable, Efl.Text, Efl.Text_Markup, +class @beta Efl.Ui.Frame extends Efl.Ui.Layout implements Efl.Ui.Clickable, Efl.Text, Efl.Text_Markup, Efl.Content { [[Frame widget diff --git a/src/lib/elementary/efl_ui_frame_legacy.eo b/src/lib/elementary/efl_ui_frame_legacy.eo index fb21570094..bb8dd99653 100644 --- a/src/lib/elementary/efl_ui_frame_legacy.eo +++ b/src/lib/elementary/efl_ui_frame_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Frame_Legacy extends Efl.Ui.Frame implements Efl.Ui.Legacy +class @beta Efl.Ui.Frame_Legacy extends Efl.Ui.Frame implements Efl.Ui.Legacy { [[Frame widget diff --git a/src/lib/elementary/efl_ui_grid.eo b/src/lib/elementary/efl_ui_grid.eo index 293eacf11e..4b61a52e13 100644 --- a/src/lib/elementary/efl_ui_grid.eo +++ b/src/lib/elementary/efl_ui_grid.eo @@ -1,6 +1,6 @@ import efl_ui_grid_item; -class Efl.Ui.Grid extends Efl.Ui.Layout implements +class @beta Efl.Ui.Grid extends Efl.Ui.Layout implements Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar, Efl.Pack_Linear, Efl.Pack_Layout, diff --git a/src/lib/elementary/efl_ui_grid_default_item.eo b/src/lib/elementary/efl_ui_grid_default_item.eo index c0f5862484..625482ed82 100644 --- a/src/lib/elementary/efl_ui_grid_default_item.eo +++ b/src/lib/elementary/efl_ui_grid_default_item.eo @@ -1,5 +1,5 @@ -class Efl.Ui.Grid_Default_Item extends Efl.Ui.Grid_Item implements +class @beta Efl.Ui.Grid_Default_Item extends Efl.Ui.Grid_Item implements Efl.Text, Efl.Text_Markup, Efl.Ui.L10n, diff --git a/src/lib/elementary/efl_ui_grid_default_item_part_end.eo b/src/lib/elementary/efl_ui_grid_default_item_part_end.eo index 66ebd2a1a7..dc3b6dfbbb 100644 --- a/src/lib/elementary/efl_ui_grid_default_item_part_end.eo +++ b/src/lib/elementary/efl_ui_grid_default_item_part_end.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Grid_Default_Item_Part_End extends Efl.Ui.Layout_Part implements Efl.Content +class @beta Efl.Ui.Grid_Default_Item_Part_End extends Efl.Ui.Layout_Part implements Efl.Content { [[Grid Default Item internal content of end part class]] data: null; diff --git a/src/lib/elementary/efl_ui_grid_default_item_part_icon.eo b/src/lib/elementary/efl_ui_grid_default_item_part_icon.eo index 4dede025b6..47e290bace 100644 --- a/src/lib/elementary/efl_ui_grid_default_item_part_icon.eo +++ b/src/lib/elementary/efl_ui_grid_default_item_part_icon.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Grid_Default_Item_Part_Icon extends Efl.Ui.Layout_Part implements Efl.Content +class @beta Efl.Ui.Grid_Default_Item_Part_Icon extends Efl.Ui.Layout_Part implements Efl.Content { [[Grid Default Item internal content of icon part class]] data: null; diff --git a/src/lib/elementary/efl_ui_grid_item.eo b/src/lib/elementary/efl_ui_grid_item.eo index f430cab123..99a4abca01 100644 --- a/src/lib/elementary/efl_ui_grid_item.eo +++ b/src/lib/elementary/efl_ui_grid_item.eo @@ -1,5 +1,5 @@ -abstract Efl.Ui.Grid_Item extends Efl.Ui.Item +abstract @beta Efl.Ui.Grid_Item extends Efl.Ui.Item { implements { //Efl.Object diff --git a/src/lib/elementary/efl_ui_homogeneous_model.eo b/src/lib/elementary/efl_ui_homogeneous_model.eo index 4a82f6cf66..996c1ac364 100644 --- a/src/lib/elementary/efl_ui_homogeneous_model.eo +++ b/src/lib/elementary/efl_ui_homogeneous_model.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Homogeneous_Model extends Efl.Ui.Size_Model +class @beta Efl.Ui.Homogeneous_Model extends Efl.Ui.Size_Model { [[Class to be used to store object item size for List/Grid View. diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index 8cdc14ff5b..7a19d04b8f 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -18,7 +18,7 @@ struct Efl.Ui.Image_Error open_error: bool; [[$true if the error happened when opening the file, $false otherwise]] } -class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.Ui.Draggable, +class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.Ui.Draggable, Efl.File, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller, Efl.Player, Efl.Gfx.View, Efl.Access.Component, Efl.Access.Widget.Action, Efl.Gfx.Color, Efl.Orientation, diff --git a/src/lib/elementary/efl_ui_image_factory.eo b/src/lib/elementary/efl_ui_image_factory.eo index 884fb9099c..5ebcc1cd32 100644 --- a/src/lib/elementary/efl_ui_image_factory.eo +++ b/src/lib/elementary/efl_ui_image_factory.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Image_Factory extends Efl.Ui.Caching_Factory +class @beta Efl.Ui.Image_Factory extends Efl.Ui.Caching_Factory { [[Efl UI image factory class]] implements { diff --git a/src/lib/elementary/efl_ui_image_legacy.eo b/src/lib/elementary/efl_ui_image_legacy.eo index 15a3005746..1e9b90cc64 100644 --- a/src/lib/elementary/efl_ui_image_legacy.eo +++ b/src/lib/elementary/efl_ui_image_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Image_Legacy extends Efl.Ui.Image implements Efl.Ui.Legacy +class @beta Efl.Ui.Image_Legacy extends Efl.Ui.Image implements Efl.Ui.Legacy { [[ Efl UI image class]] data: null; diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo index b22c45c110..1c458e1cd6 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.eo +++ b/src/lib/elementary/efl_ui_image_zoomable.eo @@ -2,7 +2,7 @@ struct @extern Elm.Photocam.Error; struct @extern Elm.Photocam.Progress; -class Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom, +class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom, Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar { diff --git a/src/lib/elementary/efl_ui_image_zoomable_legacy.eo b/src/lib/elementary/efl_ui_image_zoomable_legacy.eo index 233d9ad95e..b1a41977be 100644 --- a/src/lib/elementary/efl_ui_image_zoomable_legacy.eo +++ b/src/lib/elementary/efl_ui_image_zoomable_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Image_Zoomable_Legacy extends Efl.Ui.Image_Zoomable implements Efl.Ui.Legacy +class @beta Efl.Ui.Image_Zoomable_Legacy extends Efl.Ui.Image_Zoomable implements Efl.Ui.Legacy { [[Elementary Image Zoomable class]] data: null; diff --git a/src/lib/elementary/efl_ui_image_zoomable_pan.eo b/src/lib/elementary/efl_ui_image_zoomable_pan.eo index 4cb307e04e..792f1a9a2f 100644 --- a/src/lib/elementary/efl_ui_image_zoomable_pan.eo +++ b/src/lib/elementary/efl_ui_image_zoomable_pan.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Image_Zoomable_Pan extends Efl.Ui.Pan +class @beta Efl.Ui.Image_Zoomable_Pan extends Efl.Ui.Pan { [[Elementary photocom pan class]] legacy_prefix: elm_photocam_pan; diff --git a/src/lib/elementary/efl_ui_internal_text_interactive.eo b/src/lib/elementary/efl_ui_internal_text_interactive.eo index f3505140ae..a7bf52293c 100644 --- a/src/lib/elementary/efl_ui_internal_text_interactive.eo +++ b/src/lib/elementary/efl_ui_internal_text_interactive.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Internal.Text.Interactive extends Efl.Canvas.Text implements Efl.Text_Interactive +class @beta Efl.Ui.Internal.Text.Interactive extends Efl.Canvas.Text implements Efl.Text_Interactive { [[An internal object in charge of the interactive aspect of the text widget. diff --git a/src/lib/elementary/efl_ui_internal_text_scroller.eo b/src/lib/elementary/efl_ui_internal_text_scroller.eo index bc9b33e86e..4b46694b6b 100644 --- a/src/lib/elementary/efl_ui_internal_text_scroller.eo +++ b/src/lib/elementary/efl_ui_internal_text_scroller.eo @@ -5,7 +5,7 @@ enum Efl.Ui.Text_Scroller_Mode multiline = 1, } -class Efl.Ui.Internal_Text_Scroller extends Efl.Ui.Scroller +class @beta Efl.Ui.Internal_Text_Scroller extends Efl.Ui.Scroller { [[Internal-usage text scroller class. diff --git a/src/lib/elementary/efl_ui_item.eo b/src/lib/elementary/efl_ui_item.eo index e3ba8afa33..f2a85b6aeb 100644 --- a/src/lib/elementary/efl_ui_item.eo +++ b/src/lib/elementary/efl_ui_item.eo @@ -1,4 +1,4 @@ -abstract Efl.Ui.Item extends Efl.Ui.Layout implements Efl.Ui.Selectable, Efl.Ui.Clickable +abstract @beta Efl.Ui.Item extends Efl.Ui.Layout implements Efl.Ui.Selectable, Efl.Ui.Clickable { [[Item abstract class for pack widget. All item have to be inherited from this class.]] methods { diff --git a/src/lib/elementary/efl_ui_l10n.eo b/src/lib/elementary/efl_ui_l10n.eo index 5275759262..8eec6e12d4 100644 --- a/src/lib/elementary/efl_ui_l10n.eo +++ b/src/lib/elementary/efl_ui_l10n.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.L10n +interface @beta Efl.Ui.L10n { [[Interface for all translatable text APIs. diff --git a/src/lib/elementary/efl_ui_layout.eo b/src/lib/elementary/efl_ui_layout.eo index b1855cfcd0..350fac560c 100644 --- a/src/lib/elementary/efl_ui_layout.eo +++ b/src/lib/elementary/efl_ui_layout.eo @@ -1,6 +1,6 @@ import efl_ui; -class Efl.Ui.Layout extends Efl.Ui.Widget implements Efl.Container, Efl.File, +class @beta Efl.Ui.Layout extends Efl.Ui.Widget implements Efl.Container, Efl.File, Efl.Ui.View, Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind, Efl.Layout.Calc, Efl.Layout.Signal, Efl.Layout.Group diff --git a/src/lib/elementary/efl_ui_layout_factory.eo b/src/lib/elementary/efl_ui_layout_factory.eo index 75ced32ed7..b31486db02 100644 --- a/src/lib/elementary/efl_ui_layout_factory.eo +++ b/src/lib/elementary/efl_ui_layout_factory.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Layout_Factory extends Efl.Ui.Caching_Factory +class @beta Efl.Ui.Layout_Factory extends Efl.Ui.Caching_Factory { [[Efl Ui Layout Factory class]] methods { diff --git a/src/lib/elementary/efl_ui_layout_legacy.eo b/src/lib/elementary/efl_ui_layout_legacy.eo index ca16e604c8..6f43fc18e7 100644 --- a/src/lib/elementary/efl_ui_layout_legacy.eo +++ b/src/lib/elementary/efl_ui_layout_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Layout_Legacy extends Efl.Ui.Layout implements Efl.Ui.Legacy +class @beta Efl.Ui.Layout_Legacy extends Efl.Ui.Layout implements Efl.Ui.Legacy { [[Elementary layout class]] data: null; diff --git a/src/lib/elementary/efl_ui_layout_part.eo b/src/lib/elementary/efl_ui_layout_part.eo index 9dad61e75f..50a6c4728c 100644 --- a/src/lib/elementary/efl_ui_layout_part.eo +++ b/src/lib/elementary/efl_ui_layout_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Layout_Part extends Efl.Ui.Widget_Part implements Efl.Ui.Cursor +class @beta Efl.Ui.Layout_Part extends Efl.Ui.Widget_Part implements Efl.Ui.Cursor { [[Elementary layout internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_layout_part_bg.eo b/src/lib/elementary/efl_ui_layout_part_bg.eo index dff060f9bd..f1404d2c10 100644 --- a/src/lib/elementary/efl_ui_layout_part_bg.eo +++ b/src/lib/elementary/efl_ui_layout_part_bg.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Layout_Part_Bg extends Efl.Ui.Widget_Part_Bg +class @beta Efl.Ui.Layout_Part_Bg extends Efl.Ui.Widget_Part_Bg { [[Elementary layout internal part background class]] data: null; diff --git a/src/lib/elementary/efl_ui_layout_part_box.eo b/src/lib/elementary/efl_ui_layout_part_box.eo index 799fc7c752..3f19196898 100644 --- a/src/lib/elementary/efl_ui_layout_part_box.eo +++ b/src/lib/elementary/efl_ui_layout_part_box.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Layout_Part_Box extends Efl.Object implements Efl.Pack_Linear, +class @beta Efl.Ui.Layout_Part_Box extends Efl.Object implements Efl.Pack_Linear, Efl.Ui.Direction_Readonly { [[Represents a Box created as part of a layout. diff --git a/src/lib/elementary/efl_ui_layout_part_content.eo b/src/lib/elementary/efl_ui_layout_part_content.eo index c09d075d40..923033dd4e 100644 --- a/src/lib/elementary/efl_ui_layout_part_content.eo +++ b/src/lib/elementary/efl_ui_layout_part_content.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Layout_Part_Content extends Efl.Ui.Layout_Part implements Efl.Content +class @beta Efl.Ui.Layout_Part_Content extends Efl.Ui.Layout_Part implements Efl.Content { [[Elementary layout internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_layout_part_legacy.eo b/src/lib/elementary/efl_ui_layout_part_legacy.eo index af6279eea2..3137a43b6d 100644 --- a/src/lib/elementary/efl_ui_layout_part_legacy.eo +++ b/src/lib/elementary/efl_ui_layout_part_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Layout_Part_Legacy extends Efl.Ui.Layout_Part implements Efl.Content, Efl.Text, +class @beta Efl.Ui.Layout_Part_Legacy extends Efl.Ui.Layout_Part implements Efl.Content, Efl.Text, Efl.Text_Markup, Efl.Ui.L10n { [[Elementary layout internal part class]] diff --git a/src/lib/elementary/efl_ui_layout_part_table.eo b/src/lib/elementary/efl_ui_layout_part_table.eo index db6ce0836d..a2d580de6c 100644 --- a/src/lib/elementary/efl_ui_layout_part_table.eo +++ b/src/lib/elementary/efl_ui_layout_part_table.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Layout_Part_Table extends Efl.Object implements Efl.Pack_Table +class @beta Efl.Ui.Layout_Part_Table extends Efl.Object implements Efl.Pack_Table { [[Represents a Table created as part of a layout. diff --git a/src/lib/elementary/efl_ui_layout_part_text.eo b/src/lib/elementary/efl_ui_layout_part_text.eo index 0a092a251f..a7442a7f45 100644 --- a/src/lib/elementary/efl_ui_layout_part_text.eo +++ b/src/lib/elementary/efl_ui_layout_part_text.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Layout_Part_Text extends Efl.Ui.Layout_Part implements Efl.Text, Efl.Text_Markup, +class @beta Efl.Ui.Layout_Part_Text extends Efl.Ui.Layout_Part implements Efl.Text, Efl.Text_Markup, Efl.Ui.L10n { [[Elementary layout internal part class]] diff --git a/src/lib/elementary/efl_ui_legacy.eo b/src/lib/elementary/efl_ui_legacy.eo index eab362b1f4..4537d302ed 100644 --- a/src/lib/elementary/efl_ui_legacy.eo +++ b/src/lib/elementary/efl_ui_legacy.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.Legacy +interface @beta Efl.Ui.Legacy { [[The bg (background) widget is used for setting (solid) background decorations diff --git a/src/lib/elementary/efl_ui_list.eo b/src/lib/elementary/efl_ui_list.eo index 6f6b640889..7dcf29931a 100644 --- a/src/lib/elementary/efl_ui_list.eo +++ b/src/lib/elementary/efl_ui_list.eo @@ -1,6 +1,6 @@ import efl_ui_list_item; -class Efl.Ui.List extends Efl.Ui.Layout implements +class @beta Efl.Ui.List extends Efl.Ui.Layout implements Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar, Efl.Pack_Linear, Efl.Pack_Layout, diff --git a/src/lib/elementary/efl_ui_list_default_item.eo b/src/lib/elementary/efl_ui_list_default_item.eo index d4aca6941e..5ea4d2e44a 100644 --- a/src/lib/elementary/efl_ui_list_default_item.eo +++ b/src/lib/elementary/efl_ui_list_default_item.eo @@ -1,5 +1,5 @@ -class Efl.Ui.List_Default_Item extends Efl.Ui.List_Item implements +class @beta Efl.Ui.List_Default_Item extends Efl.Ui.List_Item implements Efl.Text, Efl.Text_Markup, Efl.Content diff --git a/src/lib/elementary/efl_ui_list_default_item_part_end.eo b/src/lib/elementary/efl_ui_list_default_item_part_end.eo index c7b51fbf01..9ff2d1160e 100644 --- a/src/lib/elementary/efl_ui_list_default_item_part_end.eo +++ b/src/lib/elementary/efl_ui_list_default_item_part_end.eo @@ -1,4 +1,4 @@ -class Efl.Ui.List_Default_Item_Part_End extends Efl.Ui.Layout_Part implements Efl.Content +class @beta Efl.Ui.List_Default_Item_Part_End extends Efl.Ui.Layout_Part implements Efl.Content { [[List Default Item internal content of end part class]] data: null; diff --git a/src/lib/elementary/efl_ui_list_default_item_part_icon.eo b/src/lib/elementary/efl_ui_list_default_item_part_icon.eo index ff0ec0e432..232b0d95b1 100644 --- a/src/lib/elementary/efl_ui_list_default_item_part_icon.eo +++ b/src/lib/elementary/efl_ui_list_default_item_part_icon.eo @@ -1,4 +1,4 @@ -class Efl.Ui.List_Default_Item_Part_Icon extends Efl.Ui.Layout_Part implements Efl.Content +class @beta Efl.Ui.List_Default_Item_Part_Icon extends Efl.Ui.Layout_Part implements Efl.Content { [[List Default Item internal content of icon part class]] data: null; diff --git a/src/lib/elementary/efl_ui_list_empty_item.eo b/src/lib/elementary/efl_ui_list_empty_item.eo index 9b3456dee5..070b60531f 100644 --- a/src/lib/elementary/efl_ui_list_empty_item.eo +++ b/src/lib/elementary/efl_ui_list_empty_item.eo @@ -1,5 +1,5 @@ -class Efl.Ui.List_Empty_Item extends Efl.Ui.List_Item implements Efl.Content +class @beta Efl.Ui.List_Empty_Item extends Efl.Ui.List_Item implements Efl.Content { [[List Empty Item class. This item have only one swallow space, thus user can decorate item by filling the swallow with diff --git a/src/lib/elementary/efl_ui_list_item.eo b/src/lib/elementary/efl_ui_list_item.eo index e1bcf9235d..2997926cfd 100644 --- a/src/lib/elementary/efl_ui_list_item.eo +++ b/src/lib/elementary/efl_ui_list_item.eo @@ -1,5 +1,5 @@ -abstract Efl.Ui.List_Item extends Efl.Ui.Item +abstract @beta Efl.Ui.List_Item extends Efl.Ui.Item { implements { //Efl.Object diff --git a/src/lib/elementary/efl_ui_list_view.eo b/src/lib/elementary/efl_ui_list_view.eo index 2828756908..b6a2bf8016 100644 --- a/src/lib/elementary/efl_ui_list_view.eo +++ b/src/lib/elementary/efl_ui_list_view.eo @@ -6,7 +6,7 @@ struct Efl.Ui.List_View_Item_Event child: Efl.Model; index: int; } -class Efl.Ui.List_View extends Efl.Ui.Layout implements Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar, +class @beta Efl.Ui.List_View extends Efl.Ui.Layout implements Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar, Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Ui.Focus.Composition, Efl.Ui.Focus.Manager_Sub, Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.List_View_Model, Efl.Ui.Widget_Focus_Manager { diff --git a/src/lib/elementary/efl_ui_list_view_model.eo b/src/lib/elementary/efl_ui_list_view_model.eo index 1c99555606..cf4780ed5f 100644 --- a/src/lib/elementary/efl_ui_list_view_model.eo +++ b/src/lib/elementary/efl_ui_list_view_model.eo @@ -1,6 +1,6 @@ import efl_ui_list_view_types; -interface Efl.Ui.List_View_Model +interface @beta Efl.Ui.List_View_Model { methods { @property load_range { diff --git a/src/lib/elementary/efl_ui_list_view_pan.eo b/src/lib/elementary/efl_ui_list_view_pan.eo index e05cd09b96..1bd72a8300 100644 --- a/src/lib/elementary/efl_ui_list_view_pan.eo +++ b/src/lib/elementary/efl_ui_list_view_pan.eo @@ -1,4 +1,4 @@ -class Efl.Ui.List_View_Pan extends Efl.Ui.Pan +class @beta Efl.Ui.List_View_Pan extends Efl.Ui.Pan { [[Elementary Efl_Ui_List_View pan class]] implements { diff --git a/src/lib/elementary/efl_ui_list_view_precise_layouter.eo b/src/lib/elementary/efl_ui_list_view_precise_layouter.eo index 52f4964c6c..0a83c0a08b 100644 --- a/src/lib/elementary/efl_ui_list_view_precise_layouter.eo +++ b/src/lib/elementary/efl_ui_list_view_precise_layouter.eo @@ -1,4 +1,4 @@ -class Efl.Ui.List_View_Precise_Layouter extends Efl.Object implements Efl.Ui.List_View_Relayout +class @beta Efl.Ui.List_View_Precise_Layouter extends Efl.Object implements Efl.Ui.List_View_Relayout { implements { Efl.Object.constructor; diff --git a/src/lib/elementary/efl_ui_list_view_relayout.eo b/src/lib/elementary/efl_ui_list_view_relayout.eo index 77112450a9..07b5dc65bb 100644 --- a/src/lib/elementary/efl_ui_list_view_relayout.eo +++ b/src/lib/elementary/efl_ui_list_view_relayout.eo @@ -1,4 +1,4 @@ -interface Efl.Ui.List_View_Relayout +interface @beta Efl.Ui.List_View_Relayout { methods { layout_do { diff --git a/src/lib/elementary/efl_ui_navigation_bar.eo b/src/lib/elementary/efl_ui_navigation_bar.eo index 15f4d922a8..77f1e5abdc 100644 --- a/src/lib/elementary/efl_ui_navigation_bar.eo +++ b/src/lib/elementary/efl_ui_navigation_bar.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Navigation_Bar extends Efl.Ui.Layout implements Efl.Content, Efl.Text +class @beta Efl.Ui.Navigation_Bar extends Efl.Ui.Layout implements Efl.Content, Efl.Text { [[Navigation_Bar widget. diff --git a/src/lib/elementary/efl_ui_navigation_bar_part.eo b/src/lib/elementary/efl_ui_navigation_bar_part.eo index c94b5a5f02..40b0bcf74b 100644 --- a/src/lib/elementary/efl_ui_navigation_bar_part.eo +++ b/src/lib/elementary/efl_ui_navigation_bar_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Navigation_Bar_Part extends Efl.Ui.Layout_Part_Content +class @beta Efl.Ui.Navigation_Bar_Part extends Efl.Ui.Layout_Part_Content { [[Efl UI Navigation_Bar internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_navigation_bar_part_back_button.eo b/src/lib/elementary/efl_ui_navigation_bar_part_back_button.eo index 43e3dd1613..2ed99a181f 100644 --- a/src/lib/elementary/efl_ui_navigation_bar_part_back_button.eo +++ b/src/lib/elementary/efl_ui_navigation_bar_part_back_button.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Navigation_Bar_Part_Back_Button extends Efl.Ui.Layout_Part implements Efl.Ui.Clickable, Efl.Gfx.Entity, Efl.Text, Efl.Content +class @beta Efl.Ui.Navigation_Bar_Part_Back_Button extends Efl.Ui.Layout_Part implements Efl.Ui.Clickable, Efl.Gfx.Entity, Efl.Text, Efl.Content { [[Efl Ui Navigation_Bar internal part back button class]] data: null; diff --git a/src/lib/elementary/efl_ui_navigation_layout.eo b/src/lib/elementary/efl_ui_navigation_layout.eo index 51fe71f8ae..373d711839 100644 --- a/src/lib/elementary/efl_ui_navigation_layout.eo +++ b/src/lib/elementary/efl_ui_navigation_layout.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Navigation_Layout extends Efl.Ui.Layout implements Efl.Content +class @beta Efl.Ui.Navigation_Layout extends Efl.Ui.Layout implements Efl.Content { [[Navigation_Layout widget. diff --git a/src/lib/elementary/efl_ui_nstate.eo b/src/lib/elementary/efl_ui_nstate.eo index 31b29acd56..622d4c1e69 100644 --- a/src/lib/elementary/efl_ui_nstate.eo +++ b/src/lib/elementary/efl_ui_nstate.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Nstate extends Efl.Ui.Button +class @beta Efl.Ui.Nstate extends Efl.Ui.Button { [[Efl UI nstate class]] methods { diff --git a/src/lib/elementary/efl_ui_pager.eo b/src/lib/elementary/efl_ui_pager.eo index 7ccdd0c791..50bcecb78b 100644 --- a/src/lib/elementary/efl_ui_pager.eo +++ b/src/lib/elementary/efl_ui_pager.eo @@ -5,7 +5,7 @@ enum Efl.Ui.Pager_Loop enabled } -class Efl.Ui.Pager extends Efl.Ui.Layout implements Efl.Pack_Linear +class @beta Efl.Ui.Pager extends Efl.Ui.Layout implements Efl.Pack_Linear { [[Pager widget diff --git a/src/lib/elementary/efl_ui_pan.eo b/src/lib/elementary/efl_ui_pan.eo index 907d50b197..84d2e0df81 100644 --- a/src/lib/elementary/efl_ui_pan.eo +++ b/src/lib/elementary/efl_ui_pan.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Pan extends Efl.Canvas.Group implements Efl.Content +class @beta Efl.Ui.Pan extends Efl.Canvas.Group implements Efl.Content { [[Elementary pan class]] methods { diff --git a/src/lib/elementary/efl_ui_panel.eo b/src/lib/elementary/efl_ui_panel.eo index 6d0bc5ccb5..8aa1189001 100644 --- a/src/lib/elementary/efl_ui_panel.eo +++ b/src/lib/elementary/efl_ui_panel.eo @@ -15,7 +15,7 @@ struct Efl.Ui.Panel_Scroll_Info rel_y: double; [[content scrolled position (0.0 ~ 1.0) in the panel]] } -class Efl.Ui.Panel extends Efl.Ui.Layout implements Efl.Ui.Focus.Layer, Elm.Interface_Scrollable, Efl.Content, +class @beta Efl.Ui.Panel extends Efl.Ui.Layout implements Efl.Ui.Focus.Layer, Elm.Interface_Scrollable, Efl.Content, Efl.Access.Widget.Action { [[Elementary panel class]] diff --git a/src/lib/elementary/efl_ui_panes.eo b/src/lib/elementary/efl_ui_panes.eo index eb4d0c3669..a7e15570ad 100644 --- a/src/lib/elementary/efl_ui_panes.eo +++ b/src/lib/elementary/efl_ui_panes.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Panes extends Efl.Ui.Layout implements Efl.Ui.Direction, +class @beta Efl.Ui.Panes extends Efl.Ui.Layout implements Efl.Ui.Direction, Efl.Ui.Clickable { [[Elementary panes class]] diff --git a/src/lib/elementary/efl_ui_panes_legacy.eo b/src/lib/elementary/efl_ui_panes_legacy.eo index 28f9ca5af9..6c8355e0b9 100644 --- a/src/lib/elementary/efl_ui_panes_legacy.eo +++ b/src/lib/elementary/efl_ui_panes_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Panes_Legacy extends Efl.Ui.Panes implements Efl.Ui.Legacy +class @beta Efl.Ui.Panes_Legacy extends Efl.Ui.Panes implements Efl.Ui.Legacy { [[Elementary panes class]] data: null; diff --git a/src/lib/elementary/efl_ui_panes_part.eo b/src/lib/elementary/efl_ui_panes_part.eo index 4a96713c83..d7e6da12a4 100644 --- a/src/lib/elementary/efl_ui_panes_part.eo +++ b/src/lib/elementary/efl_ui_panes_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Panes_Part extends Efl.Ui.Layout_Part_Content +class @beta Efl.Ui.Panes_Part extends Efl.Ui.Layout_Part_Content { [[Elementary Panes internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_popup.eo b/src/lib/elementary/efl_ui_popup.eo index e2946adca2..31b7b531f2 100644 --- a/src/lib/elementary/efl_ui_popup.eo +++ b/src/lib/elementary/efl_ui_popup.eo @@ -8,7 +8,7 @@ enum Efl.Ui.Popup_Align { bottom [[Popup aligned to bottom]] } -class Efl.Ui.Popup extends Efl.Ui.Layout implements Efl.Content, Efl.Ui.Focus.Layer +class @beta Efl.Ui.Popup extends Efl.Ui.Layout implements Efl.Content, Efl.Ui.Focus.Layer { [[EFL UI popup class]] methods { diff --git a/src/lib/elementary/efl_ui_popup_part_backwall.eo b/src/lib/elementary/efl_ui_popup_part_backwall.eo index 124d27c909..759e0f4697 100644 --- a/src/lib/elementary/efl_ui_popup_part_backwall.eo +++ b/src/lib/elementary/efl_ui_popup_part_backwall.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Popup_Part_Backwall extends Efl.Ui.Layout_Part implements Efl.File +class @beta Efl.Ui.Popup_Part_Backwall extends Efl.Ui.Layout_Part implements Efl.File { [[Efl UI Popup internal part backwall class]] data: null; diff --git a/src/lib/elementary/efl_ui_progressbar.eo b/src/lib/elementary/efl_ui_progressbar.eo index 39dff28ee0..9b291707f6 100644 --- a/src/lib/elementary/efl_ui_progressbar.eo +++ b/src/lib/elementary/efl_ui_progressbar.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Progressbar extends Efl.Ui.Layout implements Efl.Ui.Range_Display, Efl.Ui.Format, +class @beta Efl.Ui.Progressbar extends Efl.Ui.Layout implements Efl.Ui.Range_Display, Efl.Ui.Format, Efl.Ui.Direction, Efl.Access.Value, Efl.Text, Efl.Content, Efl.Text_Markup { diff --git a/src/lib/elementary/efl_ui_progressbar_legacy.eo b/src/lib/elementary/efl_ui_progressbar_legacy.eo index a8361cf09d..a59f3342cc 100644 --- a/src/lib/elementary/efl_ui_progressbar_legacy.eo +++ b/src/lib/elementary/efl_ui_progressbar_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Progressbar_Legacy extends Efl.Ui.Progressbar implements Efl.Ui.Legacy +class @beta Efl.Ui.Progressbar_Legacy extends Efl.Ui.Progressbar implements Efl.Ui.Legacy { [[Elementary progressbar class]] data: null; diff --git a/src/lib/elementary/efl_ui_progressbar_legacy_part.eo b/src/lib/elementary/efl_ui_progressbar_legacy_part.eo index fd989e518d..da75f9602d 100644 --- a/src/lib/elementary/efl_ui_progressbar_legacy_part.eo +++ b/src/lib/elementary/efl_ui_progressbar_legacy_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Progressbar_Legacy_Part extends Efl.Ui.Layout_Part_Content +class @beta Efl.Ui.Progressbar_Legacy_Part extends Efl.Ui.Layout_Part_Content { [[Elementary progressbar internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_progressbar_part.eo b/src/lib/elementary/efl_ui_progressbar_part.eo index 3ab05796f3..b80177dd16 100644 --- a/src/lib/elementary/efl_ui_progressbar_part.eo +++ b/src/lib/elementary/efl_ui_progressbar_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Progressbar_Part extends Efl.Ui.Layout_Part implements Efl.Ui.Range_Display +class @beta Efl.Ui.Progressbar_Part extends Efl.Ui.Layout_Part implements Efl.Ui.Range_Display { [[Elementary progressbar internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_radio.eo b/src/lib/elementary/efl_ui_radio.eo index c85d163be1..96e6f76b05 100644 --- a/src/lib/elementary/efl_ui_radio.eo +++ b/src/lib/elementary/efl_ui_radio.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Radio extends Efl.Ui.Check implements Efl.Access.Widget.Action, Efl.Content +class @beta Efl.Ui.Radio extends Efl.Ui.Check implements Efl.Access.Widget.Action, Efl.Content { [[Elementary radio class]] legacy_prefix: elm_radio; diff --git a/src/lib/elementary/efl_ui_radio_legacy.eo b/src/lib/elementary/efl_ui_radio_legacy.eo index 8089c48763..a129d6152a 100644 --- a/src/lib/elementary/efl_ui_radio_legacy.eo +++ b/src/lib/elementary/efl_ui_radio_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Radio_Legacy extends Efl.Ui.Radio implements Efl.Ui.Legacy +class @beta Efl.Ui.Radio_Legacy extends Efl.Ui.Radio implements Efl.Ui.Legacy { [[Elementary radio class]] data: null; diff --git a/src/lib/elementary/efl_ui_radio_legacy_part.eo b/src/lib/elementary/efl_ui_radio_legacy_part.eo index e7edcdeb2e..12a99be7c8 100644 --- a/src/lib/elementary/efl_ui_radio_legacy_part.eo +++ b/src/lib/elementary/efl_ui_radio_legacy_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Radio_Legacy_Part extends Efl.Ui.Layout_Part_Content +class @beta Efl.Ui.Radio_Legacy_Part extends Efl.Ui.Layout_Part_Content { [[Elementary radio internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_scroll_alert_popup.eo b/src/lib/elementary/efl_ui_scroll_alert_popup.eo index fe4cf365d5..fb9aeb2558 100644 --- a/src/lib/elementary/efl_ui_scroll_alert_popup.eo +++ b/src/lib/elementary/efl_ui_scroll_alert_popup.eo @@ -1,6 +1,6 @@ import eina_types; -class Efl.Ui.Scroll_Alert_Popup extends Efl.Ui.Alert_Popup +class @beta Efl.Ui.Scroll_Alert_Popup extends Efl.Ui.Alert_Popup { [[EFL UI Scroll Alert Popup class]] methods { diff --git a/src/lib/elementary/efl_ui_scroll_alert_popup_part.eo b/src/lib/elementary/efl_ui_scroll_alert_popup_part.eo index f100d02286..b9a818a00f 100644 --- a/src/lib/elementary/efl_ui_scroll_alert_popup_part.eo +++ b/src/lib/elementary/efl_ui_scroll_alert_popup_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Scroll_Alert_Popup_Part extends Efl.Ui.Layout_Part implements Efl.Content, Efl.Text +class @beta Efl.Ui.Scroll_Alert_Popup_Part extends Efl.Ui.Layout_Part implements Efl.Content, Efl.Text { [[Efl UI Scroll Alert Popup internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_scroll_manager.eo b/src/lib/elementary/efl_ui_scroll_manager.eo index c390e166ff..ee7a3a46aa 100644 --- a/src/lib/elementary/efl_ui_scroll_manager.eo +++ b/src/lib/elementary/efl_ui_scroll_manager.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Scroll.Manager extends Efl.Object implements +class @beta Efl.Ui.Scroll.Manager extends Efl.Object implements Efl.Ui.I18n, Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar diff --git a/src/lib/elementary/efl_ui_scroller.eo b/src/lib/elementary/efl_ui_scroller.eo index a6bfb5978d..bb9d998640 100644 --- a/src/lib/elementary/efl_ui_scroller.eo +++ b/src/lib/elementary/efl_ui_scroller.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Scroller extends Efl.Ui.Layout implements +class @beta Efl.Ui.Scroller extends Efl.Ui.Layout implements Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar, Efl.Content diff --git a/src/lib/elementary/efl_ui_selection.eo b/src/lib/elementary/efl_ui_selection.eo index 89714ceb8b..6132a4f2db 100644 --- a/src/lib/elementary/efl_ui_selection.eo +++ b/src/lib/elementary/efl_ui_selection.eo @@ -1,6 +1,6 @@ import efl_ui_selection_types; -mixin Efl.Ui.Selection { +mixin @beta Efl.Ui.Selection { [[Efl Ui Selection class]] data: null; methods { diff --git a/src/lib/elementary/efl_ui_selection_manager.eo b/src/lib/elementary/efl_ui_selection_manager.eo index 50b5d5b22c..e7df9cce77 100644 --- a/src/lib/elementary/efl_ui_selection_manager.eo +++ b/src/lib/elementary/efl_ui_selection_manager.eo @@ -1,6 +1,6 @@ import efl_ui_dnd_types; -class Efl.Ui.Selection_Manager extends Efl.Object { +class @beta Efl.Ui.Selection_Manager extends Efl.Object { methods { selection_set @beta { [[Set selection]] diff --git a/src/lib/elementary/efl_ui_size_model.eo b/src/lib/elementary/efl_ui_size_model.eo index 408a5bccd3..333347d478 100644 --- a/src/lib/elementary/efl_ui_size_model.eo +++ b/src/lib/elementary/efl_ui_size_model.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Size_Model extends Efl.Composite_Model +class @beta Efl.Ui.Size_Model extends Efl.Composite_Model { [[Class to be used to store object item size for List/Grid View. diff --git a/src/lib/elementary/efl_ui_slider.eo b/src/lib/elementary/efl_ui_slider.eo index 7f70913d4a..1b7ada655f 100644 --- a/src/lib/elementary/efl_ui_slider.eo +++ b/src/lib/elementary/efl_ui_slider.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Slider extends Efl.Ui.Layout implements Efl.Ui.Range_Interactive, Efl.Ui.Direction, +class @beta Efl.Ui.Slider extends Efl.Ui.Layout implements Efl.Ui.Range_Interactive, Efl.Ui.Direction, Efl.Access.Value, Efl.Access.Widget.Action { diff --git a/src/lib/elementary/efl_ui_slider_interval.eo b/src/lib/elementary/efl_ui_slider_interval.eo index 0a833893a5..2304388e49 100644 --- a/src/lib/elementary/efl_ui_slider_interval.eo +++ b/src/lib/elementary/efl_ui_slider_interval.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Slider_Interval extends Efl.Ui.Slider +class @beta Efl.Ui.Slider_Interval extends Efl.Ui.Slider { [[An interval slider. diff --git a/src/lib/elementary/efl_ui_spin.eo b/src/lib/elementary/efl_ui_spin.eo index 60232c7f72..bf705171e2 100644 --- a/src/lib/elementary/efl_ui_spin.eo +++ b/src/lib/elementary/efl_ui_spin.eo @@ -5,7 +5,7 @@ struct Efl.Ui.Spin_Special_Value label: string; [[String to replace]] } -class Efl.Ui.Spin extends Efl.Ui.Layout implements Efl.Ui.Range_Interactive, Efl.Ui.Format, +class @beta Efl.Ui.Spin extends Efl.Ui.Layout implements Efl.Ui.Range_Interactive, Efl.Ui.Format, Efl.Access.Value, Efl.Access.Widget.Action { [[A Spin. diff --git a/src/lib/elementary/efl_ui_spin_button.eo b/src/lib/elementary/efl_ui_spin_button.eo index 840f5c898e..6dad41f2fe 100644 --- a/src/lib/elementary/efl_ui_spin_button.eo +++ b/src/lib/elementary/efl_ui_spin_button.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Spin_Button extends Efl.Ui.Spin implements Efl.Ui.Focus.Composition, Efl.Ui.Direction, +class @beta Efl.Ui.Spin_Button extends Efl.Ui.Spin implements Efl.Ui.Focus.Composition, Efl.Ui.Direction, Efl.Access.Widget.Action { [[A Button Spin. diff --git a/src/lib/elementary/efl_ui_stack.eo b/src/lib/elementary/efl_ui_stack.eo index 57c8d70424..115547a124 100644 --- a/src/lib/elementary/efl_ui_stack.eo +++ b/src/lib/elementary/efl_ui_stack.eo @@ -18,7 +18,7 @@ struct Efl.Ui.Stack_Event_Deactivated { content: Efl.Canvas.Object; [[Deactivated content.]] } -class Efl.Ui.Stack extends Efl.Ui.Layout +class @beta Efl.Ui.Stack extends Efl.Ui.Layout { [[Stack widget. diff --git a/src/lib/elementary/efl_ui_state_model.eo b/src/lib/elementary/efl_ui_state_model.eo index 62693ecc3a..7ac2730086 100644 --- a/src/lib/elementary/efl_ui_state_model.eo +++ b/src/lib/elementary/efl_ui_state_model.eo @@ -1,4 +1,4 @@ -class Efl.Ui.State_Model extends Efl.Boolean_Model +class @beta Efl.Ui.State_Model extends Efl.Boolean_Model { [[Efl model handling visibility, enable and selected state]] implements { diff --git a/src/lib/elementary/efl_ui_tab_bar.eo b/src/lib/elementary/efl_ui_tab_bar.eo index 2fbdd4dcd4..a2c135980c 100644 --- a/src/lib/elementary/efl_ui_tab_bar.eo +++ b/src/lib/elementary/efl_ui_tab_bar.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Tab_Bar extends Efl.Ui.Layout implements Efl.Ui.Clickable +class @beta Efl.Ui.Tab_Bar extends Efl.Ui.Layout implements Efl.Ui.Clickable { [[Tab Bar class]] methods { diff --git a/src/lib/elementary/efl_ui_tab_page.eo b/src/lib/elementary/efl_ui_tab_page.eo index 9f2e4c0664..74a2d7f787 100644 --- a/src/lib/elementary/efl_ui_tab_page.eo +++ b/src/lib/elementary/efl_ui_tab_page.eo @@ -8,7 +8,7 @@ struct Efl.Ui.Tab_Page_Tab_Changed_Event { changed_info: Efl.Ui.Tab_Page_Tab_Changed; } -class Efl.Ui.Tab_Page extends Efl.Ui.Layout implements Efl.Content +class @beta Efl.Ui.Tab_Page extends Efl.Ui.Layout implements Efl.Content { [[Tab Page class]] methods { diff --git a/src/lib/elementary/efl_ui_tab_page_part_tab.eo b/src/lib/elementary/efl_ui_tab_page_part_tab.eo index 03626fcb04..735437fe76 100644 --- a/src/lib/elementary/efl_ui_tab_page_part_tab.eo +++ b/src/lib/elementary/efl_ui_tab_page_part_tab.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Tab_Page_Part_Tab extends Efl.Ui.Layout_Part implements Efl.Text +class @beta Efl.Ui.Tab_Page_Part_Tab extends Efl.Ui.Layout_Part implements Efl.Text { [[Tab_Page internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_tab_pager.eo b/src/lib/elementary/efl_ui_tab_pager.eo index fa79b58975..b602cce018 100644 --- a/src/lib/elementary/efl_ui_tab_pager.eo +++ b/src/lib/elementary/efl_ui_tab_pager.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Tab_Pager extends Efl.Ui.Pager +class @beta Efl.Ui.Tab_Pager extends Efl.Ui.Pager { [[Tab Pager class]] methods { diff --git a/src/lib/elementary/efl_ui_table.eo b/src/lib/elementary/efl_ui_table.eo index a1b7f45e87..c62612a02a 100644 --- a/src/lib/elementary/efl_ui_table.eo +++ b/src/lib/elementary/efl_ui_table.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Table extends Efl.Ui.Widget implements Efl.Pack_Table, Efl.Pack_Layout, +class @beta Efl.Ui.Table extends Efl.Ui.Widget implements Efl.Pack_Table, Efl.Pack_Layout, Efl.Ui.Direction { [[Efl UI table class]] diff --git a/src/lib/elementary/efl_ui_table_static.eo b/src/lib/elementary/efl_ui_table_static.eo index 12d39f32d2..c459dcb03a 100644 --- a/src/lib/elementary/efl_ui_table_static.eo +++ b/src/lib/elementary/efl_ui_table_static.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Table_Static extends Efl.Ui.Table +class @beta Efl.Ui.Table_Static extends Efl.Ui.Table { [[Efl UI table static class]] data: null; diff --git a/src/lib/elementary/efl_ui_tags.eo b/src/lib/elementary/efl_ui_tags.eo index 234910e440..267c7ed429 100644 --- a/src/lib/elementary/efl_ui_tags.eo +++ b/src/lib/elementary/efl_ui_tags.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Tags extends Efl.Ui.Layout implements Efl.Text, Efl.Ui.Format +class @beta Efl.Ui.Tags extends Efl.Ui.Layout implements Efl.Text, Efl.Ui.Format { [[A widget displaying a list of tags. The user can remove tags by clicking on each tag "close" button and add new tags by typing text in the text diff --git a/src/lib/elementary/efl_ui_text.eo b/src/lib/elementary/efl_ui_text.eo index 56da65dbc7..afb6094e69 100644 --- a/src/lib/elementary/efl_ui_text.eo +++ b/src/lib/elementary/efl_ui_text.eo @@ -1,7 +1,7 @@ /* FIXME - Text object must stop using elm_general! */ import elm_general; -class Efl.Ui.Text extends Efl.Ui.Layout implements Efl.Ui.Clickable, +class @beta Efl.Ui.Text extends Efl.Ui.Layout implements Efl.Ui.Clickable, Efl.Access.Text, Efl.Access.Editable.Text, Efl.File, Efl.Ui.Selectable, Efl.Text_Interactive { diff --git a/src/lib/elementary/efl_ui_text_alert_popup.eo b/src/lib/elementary/efl_ui_text_alert_popup.eo index fc52f8cf05..0f684866c7 100644 --- a/src/lib/elementary/efl_ui_text_alert_popup.eo +++ b/src/lib/elementary/efl_ui_text_alert_popup.eo @@ -1,6 +1,6 @@ import eina_types; -class Efl.Ui.Text_Alert_Popup extends Efl.Ui.Alert_Popup implements Efl.Text +class @beta Efl.Ui.Text_Alert_Popup extends Efl.Ui.Alert_Popup implements Efl.Text { [[EFL UI Text Alert Popup class]] methods { diff --git a/src/lib/elementary/efl_ui_text_alert_popup_part.eo b/src/lib/elementary/efl_ui_text_alert_popup_part.eo index c572dad4e9..e8d34a0872 100644 --- a/src/lib/elementary/efl_ui_text_alert_popup_part.eo +++ b/src/lib/elementary/efl_ui_text_alert_popup_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Text_Alert_Popup_Part extends Efl.Ui.Layout_Part implements Efl.Content, Efl.Text +class @beta Efl.Ui.Text_Alert_Popup_Part extends Efl.Ui.Layout_Part implements Efl.Content, Efl.Text { [[Efl UI Text Alert Popup internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_text_async.eo b/src/lib/elementary/efl_ui_text_async.eo index 9afc2acf4a..e61de4bda5 100644 --- a/src/lib/elementary/efl_ui_text_async.eo +++ b/src/lib/elementary/efl_ui_text_async.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Text_Async extends Efl.Ui.Text +class @beta Efl.Ui.Text_Async extends Efl.Ui.Text { [[Efl UI text async class diff --git a/src/lib/elementary/efl_ui_text_editable.eo b/src/lib/elementary/efl_ui_text_editable.eo index d025f017f0..32a987e493 100644 --- a/src/lib/elementary/efl_ui_text_editable.eo +++ b/src/lib/elementary/efl_ui_text_editable.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Text_Editable extends Efl.Ui.Text +class @beta Efl.Ui.Text_Editable extends Efl.Ui.Text { [[Efl UI text editable class]] data: null; diff --git a/src/lib/elementary/efl_ui_text_factory_emoticons.eo b/src/lib/elementary/efl_ui_text_factory_emoticons.eo index 05d4618c68..429dc14b91 100644 --- a/src/lib/elementary/efl_ui_text_factory_emoticons.eo +++ b/src/lib/elementary/efl_ui_text_factory_emoticons.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Text_Factory.Emoticons extends Efl.Object implements Efl.Canvas.Text_Factory +class @beta Efl.Ui.Text_Factory.Emoticons extends Efl.Object implements Efl.Canvas.Text_Factory { [[Factory that creates emoticons from the current theme given a key. diff --git a/src/lib/elementary/efl_ui_text_factory_fallback.eo b/src/lib/elementary/efl_ui_text_factory_fallback.eo index 8158c5001a..98ad98bafd 100644 --- a/src/lib/elementary/efl_ui_text_factory_fallback.eo +++ b/src/lib/elementary/efl_ui_text_factory_fallback.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Text_Factory.Fallback extends Efl.Object implements Efl.Canvas.Text_Factory +class @beta Efl.Ui.Text_Factory.Fallback extends Efl.Object implements Efl.Canvas.Text_Factory { [[Internal factory for fallback cases. diff --git a/src/lib/elementary/efl_ui_text_factory_images.eo b/src/lib/elementary/efl_ui_text_factory_images.eo index dbbe2a2bb7..ae72bee1b3 100644 --- a/src/lib/elementary/efl_ui_text_factory_images.eo +++ b/src/lib/elementary/efl_ui_text_factory_images.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Text_Factory.Images extends Efl.Object implements Efl.Canvas.Text_Factory +class @beta Efl.Ui.Text_Factory.Images extends Efl.Object implements Efl.Canvas.Text_Factory { [[Factory that creates images given key string diff --git a/src/lib/elementary/efl_ui_text_part.eo b/src/lib/elementary/efl_ui_text_part.eo index b1bf6d5bcc..f5d8c0e97e 100644 --- a/src/lib/elementary/efl_ui_text_part.eo +++ b/src/lib/elementary/efl_ui_text_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Text_Part extends Efl.Ui.Layout_Part_Text +class @beta Efl.Ui.Text_Part extends Efl.Ui.Layout_Part_Text { [[Efl UI Text internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_textpath.eo b/src/lib/elementary/efl_ui_textpath.eo index 3c9dff4ab7..7fa97539f2 100644 --- a/src/lib/elementary/efl_ui_textpath.eo +++ b/src/lib/elementary/efl_ui_textpath.eo @@ -4,7 +4,7 @@ enum Efl.Ui.Textpath_Direction { ccw [[Counter-clockwise]] } -class Efl.Ui.Textpath extends Efl.Ui.Layout implements Efl.Text, Efl.Gfx.Path +class @beta Efl.Ui.Textpath extends Efl.Ui.Layout implements Efl.Text, Efl.Gfx.Path { [[Efl Ui Textpath class]] legacy_prefix: elm_textpath; diff --git a/src/lib/elementary/efl_ui_textpath_legacy.eo b/src/lib/elementary/efl_ui_textpath_legacy.eo index 7ac3572ea2..0bc275f996 100644 --- a/src/lib/elementary/efl_ui_textpath_legacy.eo +++ b/src/lib/elementary/efl_ui_textpath_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Textpath_Legacy extends Efl.Ui.Textpath implements Efl.Ui.Legacy +class @beta Efl.Ui.Textpath_Legacy extends Efl.Ui.Textpath implements Efl.Ui.Legacy { [[Textpath widget]] data: null; diff --git a/src/lib/elementary/efl_ui_textpath_part.eo b/src/lib/elementary/efl_ui_textpath_part.eo index 8a51a53ffe..8a25b9207b 100644 --- a/src/lib/elementary/efl_ui_textpath_part.eo +++ b/src/lib/elementary/efl_ui_textpath_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Textpath_Part extends Efl.Ui.Layout_Part_Text +class @beta Efl.Ui.Textpath_Part extends Efl.Ui.Layout_Part_Text { [[Efl UI Textpath internal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_theme.eo b/src/lib/elementary/efl_ui_theme.eo index 8f18db4021..73805a90a5 100644 --- a/src/lib/elementary/efl_ui_theme.eo +++ b/src/lib/elementary/efl_ui_theme.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Theme extends Efl.Object +class @beta Efl.Ui.Theme extends Efl.Object { [[Efl Ui Theme class]] eo_prefix: efl_ui_theme; diff --git a/src/lib/elementary/efl_ui_timepicker.eo b/src/lib/elementary/efl_ui_timepicker.eo index d91a76137f..1943aa3d7f 100644 --- a/src/lib/elementary/efl_ui_timepicker.eo +++ b/src/lib/elementary/efl_ui_timepicker.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Timepicker extends Efl.Ui.Layout +class @beta Efl.Ui.Timepicker extends Efl.Ui.Layout { [[Timepicker widget diff --git a/src/lib/elementary/efl_ui_video.eo b/src/lib/elementary/efl_ui_video.eo index 72cd89dbee..61cef8fc7a 100644 --- a/src/lib/elementary/efl_ui_video.eo +++ b/src/lib/elementary/efl_ui_video.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Video extends Efl.Ui.Layout implements Efl.Player, Efl.Access.Widget.Action +class @beta Efl.Ui.Video extends Efl.Ui.Layout implements Efl.Player, Efl.Access.Widget.Action { [[Efl UI video class]] legacy_prefix: elm_video; diff --git a/src/lib/elementary/efl_ui_video_legacy.eo b/src/lib/elementary/efl_ui_video_legacy.eo index 4d5efc8def..c6bcd5cb74 100644 --- a/src/lib/elementary/efl_ui_video_legacy.eo +++ b/src/lib/elementary/efl_ui_video_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Video_Legacy extends Efl.Ui.Video implements Efl.Ui.Legacy +class @beta Efl.Ui.Video_Legacy extends Efl.Ui.Video implements Efl.Ui.Legacy { [[Efl UI video class]] data: null; diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo index a66458c1d2..fe0c35c89f 100644 --- a/src/lib/elementary/efl_ui_widget.eo +++ b/src/lib/elementary/efl_ui_widget.eo @@ -13,7 +13,7 @@ struct Efl.Ui.Widget_Focus_State { logical : bool; [[$true if this is registered as logical currently]] } -abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object, +abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object, Efl.Access.Component, Efl.Part, Efl.Ui.Focus.Object, Efl.Ui.Cursor, Efl.Ui.L10n, Efl.Ui.Selection, Efl.Ui.Dnd diff --git a/src/lib/elementary/efl_ui_widget_factory.eo b/src/lib/elementary/efl_ui_widget_factory.eo index 4542a4879c..fe1db277c4 100644 --- a/src/lib/elementary/efl_ui_widget_factory.eo +++ b/src/lib/elementary/efl_ui_widget_factory.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Widget_Factory extends Efl.Loop_Consumer implements Efl.Ui.Factory +class @beta Efl.Ui.Widget_Factory extends Efl.Loop_Consumer implements Efl.Ui.Factory { [[Efl Ui Factory that provides @Efl.Ui.Widget. diff --git a/src/lib/elementary/efl_ui_widget_focus_manager.eo b/src/lib/elementary/efl_ui_widget_focus_manager.eo index 4ffc1353d0..dacc6e9c23 100644 --- a/src/lib/elementary/efl_ui_widget_focus_manager.eo +++ b/src/lib/elementary/efl_ui_widget_focus_manager.eo @@ -1,4 +1,4 @@ -mixin Efl.Ui.Widget_Focus_Manager requires Efl.Ui.Widget extends Efl.Ui.Focus.Manager +mixin @beta Efl.Ui.Widget_Focus_Manager requires Efl.Ui.Widget extends Efl.Ui.Focus.Manager { methods { focus_manager_create @protected @pure_virtual { diff --git a/src/lib/elementary/efl_ui_widget_part.eo b/src/lib/elementary/efl_ui_widget_part.eo index b984e499ff..a2a51baf9f 100644 --- a/src/lib/elementary/efl_ui_widget_part.eo +++ b/src/lib/elementary/efl_ui_widget_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Widget_Part extends Efl.Object +class @beta Efl.Ui.Widget_Part extends Efl.Object { [[This is the base class for all "Part" handles in Efl.Ui widgets. diff --git a/src/lib/elementary/efl_ui_widget_part_bg.eo b/src/lib/elementary/efl_ui_widget_part_bg.eo index 59fd3014ef..cbe42fd341 100644 --- a/src/lib/elementary/efl_ui_widget_part_bg.eo +++ b/src/lib/elementary/efl_ui_widget_part_bg.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Widget_Part_Bg extends Efl.Ui.Widget_Part implements Efl.File, Efl.Gfx.Color, Efl.Gfx.Image +class @beta Efl.Ui.Widget_Part_Bg extends Efl.Ui.Widget_Part implements Efl.File, Efl.Gfx.Color, Efl.Gfx.Image { [[Elementary widget internal part background class]] data: null; diff --git a/src/lib/elementary/efl_ui_widget_part_shadow.eo b/src/lib/elementary/efl_ui_widget_part_shadow.eo index 0dc4c7d127..77002c0b41 100644 --- a/src/lib/elementary/efl_ui_widget_part_shadow.eo +++ b/src/lib/elementary/efl_ui_widget_part_shadow.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Widget_Part_Shadow extends Efl.Ui.Widget_Part implements Efl.Gfx.Color, +class @beta Efl.Ui.Widget_Part_Shadow extends Efl.Ui.Widget_Part implements Efl.Gfx.Color, Efl.Gfx.Blur, Efl.Gfx.Filter { [[A drop-shadow or glow effect around any widget. diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 98907b4c55..62499423cd 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -154,7 +154,7 @@ enum Efl.Ui.Win_Move_Resize_Mode right = (1 << 4) [[Start resizing window to the right]] } -class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.Window, +class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.Window, Efl.Access.Component, Efl.Access.Widget.Action, Efl.Content, Efl.Input.State, Efl.Input.Interface, Efl.Screen, Efl.Text, Efl.Config, diff --git a/src/lib/elementary/efl_ui_win_inlined.eo b/src/lib/elementary/efl_ui_win_inlined.eo index 2ef4806cc3..27aebb80bc 100644 --- a/src/lib/elementary/efl_ui_win_inlined.eo +++ b/src/lib/elementary/efl_ui_win_inlined.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Win_Inlined extends Efl.Ui.Win +class @beta Efl.Ui.Win_Inlined extends Efl.Ui.Win { [[An inlined window. diff --git a/src/lib/elementary/efl_ui_win_inlined_legacy.eo b/src/lib/elementary/efl_ui_win_inlined_legacy.eo index 91ca73878f..817160a2ea 100644 --- a/src/lib/elementary/efl_ui_win_inlined_legacy.eo +++ b/src/lib/elementary/efl_ui_win_inlined_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Win_Inlined_Legacy extends Efl.Ui.Win_Inlined implements Efl.Ui.Legacy +class @beta Efl.Ui.Win_Inlined_Legacy extends Efl.Ui.Win_Inlined implements Efl.Ui.Legacy { [[Elementary window inlined class]] data: null; diff --git a/src/lib/elementary/efl_ui_win_legacy.eo b/src/lib/elementary/efl_ui_win_legacy.eo index 7a0e562f97..24d3143009 100644 --- a/src/lib/elementary/efl_ui_win_legacy.eo +++ b/src/lib/elementary/efl_ui_win_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Win_Legacy extends Efl.Ui.Win implements Efl.Ui.Legacy +class @beta Efl.Ui.Win_Legacy extends Efl.Ui.Win implements Efl.Ui.Legacy { [[Efl UI window class]] data: null; diff --git a/src/lib/elementary/efl_ui_win_part.eo b/src/lib/elementary/efl_ui_win_part.eo index a2c4c549a8..55919f7f1d 100644 --- a/src/lib/elementary/efl_ui_win_part.eo +++ b/src/lib/elementary/efl_ui_win_part.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Win_Part extends Efl.Ui.Widget_Part implements Efl.Content, Efl.Gfx.Color, Efl.File +class @beta Efl.Ui.Win_Part extends Efl.Ui.Widget_Part implements Efl.Content, Efl.Gfx.Color, Efl.File { [[Efl UI window interal part class]] data: null; diff --git a/src/lib/elementary/efl_ui_win_socket.eo b/src/lib/elementary/efl_ui_win_socket.eo index 9f2aa02cb9..2b226a140d 100644 --- a/src/lib/elementary/efl_ui_win_socket.eo +++ b/src/lib/elementary/efl_ui_win_socket.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Win_Socket extends Efl.Ui.Win +class @beta Efl.Ui.Win_Socket extends Efl.Ui.Win { [[An off-screen window to be displayed in a remote process. diff --git a/src/lib/elementary/efl_ui_win_socket_legacy.eo b/src/lib/elementary/efl_ui_win_socket_legacy.eo index 0dff710193..91e601908b 100644 --- a/src/lib/elementary/efl_ui_win_socket_legacy.eo +++ b/src/lib/elementary/efl_ui_win_socket_legacy.eo @@ -1,4 +1,4 @@ -class Efl.Ui.Win_Socket_Legacy extends Efl.Ui.Win_Socket implements Efl.Ui.Legacy +class @beta Efl.Ui.Win_Socket_Legacy extends Efl.Ui.Win_Socket implements Efl.Ui.Legacy { [[Elementary window socket class]] data: null; diff --git a/src/lib/emotion/efl_canvas_video.eo b/src/lib/emotion/efl_canvas_video.eo index b9701302f7..0adbf3e3d0 100644 --- a/src/lib/emotion/efl_canvas_video.eo +++ b/src/lib/emotion/efl_canvas_video.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Video extends Efl.Canvas.Group implements Efl.File, Efl.Player, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller +class @beta Efl.Canvas.Video extends Efl.Canvas.Group implements Efl.File, Efl.Player, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller { [[Efl canvas video class]] methods { diff --git a/src/lib/eo/efl_class.eo b/src/lib/eo/efl_class.eo index b665ec2e8c..410a6e4c65 100644 --- a/src/lib/eo/efl_class.eo +++ b/src/lib/eo/efl_class.eo @@ -1,4 +1,4 @@ -abstract Efl.Class +abstract @beta Efl.Class { [[Abstract Efl class]] data: null; diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo index e9fd4b6afa..1103d85192 100644 --- a/src/lib/eo/efl_object.eo +++ b/src/lib/eo/efl_object.eo @@ -27,7 +27,7 @@ const Efl.Callback_Priority_Default : Efl.Callback_Priority = 0; const Efl.Callback_Priority_After : Efl.Callback_Priority = 100; [[Slightly less prioritized than default.]] -abstract Efl.Object +abstract @beta Efl.Object { [[Abstract EFL object class. diff --git a/src/lib/eo/efl_object_override.eo b/src/lib/eo/efl_object_override.eo index 65f46dad03..f7cc35b497 100644 --- a/src/lib/eo/efl_object_override.eo +++ b/src/lib/eo/efl_object_override.eo @@ -1,4 +1,4 @@ -abstract Efl.Object_Override +abstract @beta Efl.Object_Override { [[A special class to pass to #eo_super() when using #eo_override() diff --git a/src/lib/evas/canvas/efl_canvas_animation.eo b/src/lib/evas/canvas/efl_canvas_animation.eo index 977de0579d..ca55a3e1e1 100644 --- a/src/lib/evas/canvas/efl_canvas_animation.eo +++ b/src/lib/evas/canvas/efl_canvas_animation.eo @@ -1,6 +1,6 @@ import efl_canvas_animation_types; -class Efl.Canvas.Animation extends Efl.Object implements Efl.Playable +class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable { [[Efl animation class]] eo_prefix: efl_animation; diff --git a/src/lib/evas/canvas/efl_canvas_animation_alpha.eo b/src/lib/evas/canvas/efl_canvas_animation_alpha.eo index 1a4acfa73d..667e3c3f55 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_alpha.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_alpha.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Animation_Alpha extends Efl.Canvas.Animation +class @beta Efl.Canvas.Animation_Alpha extends Efl.Canvas.Animation { [[Efl alpha animation class]] eo_prefix: efl_animation_alpha; diff --git a/src/lib/evas/canvas/efl_canvas_animation_group.eo b/src/lib/evas/canvas/efl_canvas_animation_group.eo index 091fc45e6c..6f8f77613b 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_group.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_group.eo @@ -1,4 +1,4 @@ -abstract Efl.Canvas.Animation_Group extends Efl.Canvas.Animation +abstract @beta Efl.Canvas.Animation_Group extends Efl.Canvas.Animation { [[Efl group animation abstract class]] eo_prefix: efl_animation_group; diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo b/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo index 833c85f960..c404323c18 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Animation_Group_Parallel extends Efl.Canvas.Animation_Group +class @beta Efl.Canvas.Animation_Group_Parallel extends Efl.Canvas.Animation_Group { [[Efl group parallel animation class]] eo_prefix: efl_animation_group_parallel; diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo b/src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo index 81144e327f..415a87f999 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Animation_Group_Sequential extends Efl.Canvas.Animation_Group +class @beta Efl.Canvas.Animation_Group_Sequential extends Efl.Canvas.Animation_Group { [[Efl group sequential animation class]] data: null; diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.eo b/src/lib/evas/canvas/efl_canvas_animation_player.eo index fe4fb90d4d..7e1ce30fc2 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_player.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_player.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Animation_Player extends Efl.Object implements Efl.Player +class @beta Efl.Canvas.Animation_Player extends Efl.Object implements Efl.Player { [[Efl animation object class]] eo_prefix: efl_animation_player; diff --git a/src/lib/evas/canvas/efl_canvas_animation_rotate.eo b/src/lib/evas/canvas/efl_canvas_animation_rotate.eo index e37720f03f..0dabb21b7b 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_rotate.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_rotate.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Animation_Rotate extends Efl.Canvas.Animation +class @beta Efl.Canvas.Animation_Rotate extends Efl.Canvas.Animation { [[Efl rotate animation class]] eo_prefix: efl_animation_rotate; diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale.eo b/src/lib/evas/canvas/efl_canvas_animation_scale.eo index 7ffe2cb39f..5276371990 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_scale.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_scale.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation +class @beta Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation { [[Efl scale animation class]] eo_prefix: efl_animation_scale; diff --git a/src/lib/evas/canvas/efl_canvas_animation_translate.eo b/src/lib/evas/canvas/efl_canvas_animation_translate.eo index 822fbd4f85..09204a8c52 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_translate.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_translate.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Animation_Translate extends Efl.Canvas.Animation +class @beta Efl.Canvas.Animation_Translate extends Efl.Canvas.Animation { [[Efl translate animation class]] eo_prefix: efl_animation_translate; diff --git a/src/lib/evas/canvas/efl_canvas_event_grabber.eo b/src/lib/evas/canvas/efl_canvas_event_grabber.eo index 24a2a8ff3b..4d55be3eca 100644 --- a/src/lib/evas/canvas/efl_canvas_event_grabber.eo +++ b/src/lib/evas/canvas/efl_canvas_event_grabber.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Event_Grabber extends Efl.Canvas.Group +class @beta Efl.Canvas.Event_Grabber extends Efl.Canvas.Group { [[Low-level rectangle object. diff --git a/src/lib/evas/canvas/efl_canvas_filter_internal.eo b/src/lib/evas/canvas/efl_canvas_filter_internal.eo index c13d8bd5b3..fc8ac18a0e 100644 --- a/src/lib/evas/canvas/efl_canvas_filter_internal.eo +++ b/src/lib/evas/canvas/efl_canvas_filter_internal.eo @@ -41,7 +41,7 @@ struct Efl.Canvas.Filter.State pos: double; [[Position]] } -mixin Efl.Canvas.Filter.Internal requires Efl.Object extends Efl.Gfx.Filter +mixin @beta Efl.Canvas.Filter.Internal requires Efl.Object extends Efl.Gfx.Filter { [[Evas internal implementation of filters.]] diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group.eo index 2823f7e71d..f21ffda3e5 100644 --- a/src/lib/evas/canvas/efl_canvas_group.eo +++ b/src/lib/evas/canvas/efl_canvas_group.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Group extends Efl.Canvas.Object +class @beta Efl.Canvas.Group extends Efl.Canvas.Object { [[A group object is a container for other canvas objects. Its children move along their parent and are often clipped with a common clipper. diff --git a/src/lib/evas/canvas/efl_canvas_image.eo b/src/lib/evas/canvas/efl_canvas_image.eo index d49839125c..f92da8c171 100644 --- a/src/lib/evas/canvas/efl_canvas_image.eo +++ b/src/lib/evas/canvas/efl_canvas_image.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Image extends Efl.Canvas.Image_Internal implements +class @beta Efl.Canvas.Image extends Efl.Canvas.Image_Internal implements Efl.Gfx.Image_Load_Controller, Efl.Gfx.Frame_Controller, Efl.File { diff --git a/src/lib/evas/canvas/efl_canvas_image_internal.eo b/src/lib/evas/canvas/efl_canvas_image_internal.eo index b3b8f3b082..5d9ff95f9a 100644 --- a/src/lib/evas/canvas/efl_canvas_image_internal.eo +++ b/src/lib/evas/canvas/efl_canvas_image_internal.eo @@ -1,4 +1,4 @@ -abstract Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements Efl.Canvas.Filter.Internal, +abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements Efl.Canvas.Filter.Internal, Efl.Gfx.Image, Efl.Gfx.Buffer, Efl.Gfx.Fill, Efl.Gfx.View, Efl.Orientation, Efl.File_Save diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo index 131be273f7..7ae78d61c2 100644 --- a/src/lib/evas/canvas/efl_canvas_object.eo +++ b/src/lib/evas/canvas/efl_canvas_object.eo @@ -2,7 +2,7 @@ import efl_text_types; struct Efl.Canvas.Object_Animation_Event; [[Information of animation events]] -abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Animator, +abstract @beta Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Animator, Efl.Input.Interface, Efl.Gfx.Size_Hint, Efl.Gfx.Map, Efl.Ui.I18n, Efl.Canvas.Pointer { diff --git a/src/lib/evas/canvas/efl_canvas_polygon.eo b/src/lib/evas/canvas/efl_canvas_polygon.eo index 668ac95090..1806389723 100644 --- a/src/lib/evas/canvas/efl_canvas_polygon.eo +++ b/src/lib/evas/canvas/efl_canvas_polygon.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Polygon extends Efl.Canvas.Object +class @beta Efl.Canvas.Polygon extends Efl.Canvas.Object { [[Low-level polygon object]] diff --git a/src/lib/evas/canvas/efl_canvas_proxy.eo b/src/lib/evas/canvas/efl_canvas_proxy.eo index 9c3f9a3f0e..20a30c5bfc 100644 --- a/src/lib/evas/canvas/efl_canvas_proxy.eo +++ b/src/lib/evas/canvas/efl_canvas_proxy.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Proxy extends Efl.Canvas.Image_Internal +class @beta Efl.Canvas.Proxy extends Efl.Canvas.Image_Internal { [[Low-level proxy image object. diff --git a/src/lib/evas/canvas/efl_canvas_rectangle.eo b/src/lib/evas/canvas/efl_canvas_rectangle.eo index 181481d688..1c93c7c4fe 100644 --- a/src/lib/evas/canvas/efl_canvas_rectangle.eo +++ b/src/lib/evas/canvas/efl_canvas_rectangle.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Rectangle extends Efl.Canvas.Object +class @beta Efl.Canvas.Rectangle extends Efl.Canvas.Object { [[Evas canvas rectangle class]] implements { diff --git a/src/lib/evas/canvas/efl_canvas_scene3d.eo b/src/lib/evas/canvas/efl_canvas_scene3d.eo index 4fb08435d9..7d9095086e 100644 --- a/src/lib/evas/canvas/efl_canvas_scene3d.eo +++ b/src/lib/evas/canvas/efl_canvas_scene3d.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Scene3d extends Efl.Canvas.Image_Internal +class @beta Efl.Canvas.Scene3d extends Efl.Canvas.Image_Internal { [[A UI view for EFL Canvas 3D.]] data: null; diff --git a/src/lib/evas/canvas/efl_canvas_snapshot.eo b/src/lib/evas/canvas/efl_canvas_snapshot.eo index 147f58ed77..82a913fc15 100644 --- a/src/lib/evas/canvas/efl_canvas_snapshot.eo +++ b/src/lib/evas/canvas/efl_canvas_snapshot.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Snapshot extends Efl.Canvas.Image_Internal +class @beta Efl.Canvas.Snapshot extends Efl.Canvas.Image_Internal { [[Low-level snapshot image object. diff --git a/src/lib/evas/canvas/efl_canvas_surface.eo b/src/lib/evas/canvas/efl_canvas_surface.eo index 729fb1a37f..cf42a58c0d 100644 --- a/src/lib/evas/canvas/efl_canvas_surface.eo +++ b/src/lib/evas/canvas/efl_canvas_surface.eo @@ -1,4 +1,4 @@ -abstract Efl.Canvas.Surface extends Efl.Canvas.Image_Internal +abstract @beta Efl.Canvas.Surface extends Efl.Canvas.Image_Internal { [[Native surfaces usually bound to an externally-managed buffer. diff --git a/src/lib/evas/canvas/efl_canvas_surface_tbm.eo b/src/lib/evas/canvas/efl_canvas_surface_tbm.eo index 6171c1ec88..89a00d2472 100644 --- a/src/lib/evas/canvas/efl_canvas_surface_tbm.eo +++ b/src/lib/evas/canvas/efl_canvas_surface_tbm.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Surface_Tbm extends Efl.Canvas.Surface +class @beta Efl.Canvas.Surface_Tbm extends Efl.Canvas.Surface { [[Native Tizen Buffer Manager surface for Efl canvas]] diff --git a/src/lib/evas/canvas/efl_canvas_surface_wayland.eo b/src/lib/evas/canvas/efl_canvas_surface_wayland.eo index 882d4c8e27..517c56b9a1 100644 --- a/src/lib/evas/canvas/efl_canvas_surface_wayland.eo +++ b/src/lib/evas/canvas/efl_canvas_surface_wayland.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Surface_Wayland extends Efl.Canvas.Surface +class @beta Efl.Canvas.Surface_Wayland extends Efl.Canvas.Surface { [[Native Wayland surface for Efl canvas]] diff --git a/src/lib/evas/canvas/efl_canvas_surface_x11.eo b/src/lib/evas/canvas/efl_canvas_surface_x11.eo index 64fe4efdf9..6572a8e04f 100644 --- a/src/lib/evas/canvas/efl_canvas_surface_x11.eo +++ b/src/lib/evas/canvas/efl_canvas_surface_x11.eo @@ -5,7 +5,7 @@ struct Efl.Canvas.Surface_X11_Pixmap pixmap: ulong; [[X11 Pixmap ID.]] } -class Efl.Canvas.Surface_X11 extends Efl.Canvas.Surface +class @beta Efl.Canvas.Surface_X11 extends Efl.Canvas.Surface { [[Native X11 surface for Efl canvas]] diff --git a/src/lib/evas/canvas/efl_canvas_text.eo b/src/lib/evas/canvas/efl_canvas_text.eo index 644b1c4890..359b3dc356 100644 --- a/src/lib/evas/canvas/efl_canvas_text.eo +++ b/src/lib/evas/canvas/efl_canvas_text.eo @@ -2,7 +2,7 @@ import efl_text_types; struct Efl.Canvas.Text_Style; [[EFL text style data structure]] -class Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, +class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, Efl.Canvas.Filter.Internal, Efl.Text_Font, Efl.Text_Style, Efl.Text_Format, Efl.Text_Cursor, Efl.Text_Annotate, Efl.Text_Markup, Efl.Text_Markup_Interactive, Efl.Ui.I18n diff --git a/src/lib/evas/canvas/efl_canvas_text_factory.eo b/src/lib/evas/canvas/efl_canvas_text_factory.eo index 6f55935015..a86295cf46 100644 --- a/src/lib/evas/canvas/efl_canvas_text_factory.eo +++ b/src/lib/evas/canvas/efl_canvas_text_factory.eo @@ -1,4 +1,4 @@ -interface Efl.Canvas.Text_Factory +interface @beta Efl.Canvas.Text_Factory { [[Object factory that creates Efl.Canvas.Object objects. diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.eo b/src/lib/evas/canvas/efl_canvas_vg_container.eo index 3c24c03a2b..a5968d6c98 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_container.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_container.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Vg.Container extends Efl.Canvas.Vg.Node +class @beta Efl.Canvas.Vg.Container extends Efl.Canvas.Vg.Node { [[Efl vector graphics container class]] legacy_prefix: evas_vg_container; diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient.eo b/src/lib/evas/canvas/efl_canvas_vg_gradient.eo index 409b24633d..ad059a1604 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_gradient.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_gradient.eo @@ -1,4 +1,4 @@ -abstract Efl.Canvas.Vg.Gradient extends Efl.Canvas.Vg.Node implements Efl.Gfx.Gradient +abstract @beta Efl.Canvas.Vg.Gradient extends Efl.Canvas.Vg.Node implements Efl.Gfx.Gradient { [[Efl vectopr graphics gradient abstract class]] legacy_prefix: evas_vg_gradient; diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.eo b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.eo index 2fa9a7122c..a6e24e6ec6 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Vg.Gradient_Linear extends Efl.Canvas.Vg.Gradient implements Efl.Gfx.Gradient_Linear +class @beta Efl.Canvas.Vg.Gradient_Linear extends Efl.Canvas.Vg.Gradient implements Efl.Gfx.Gradient_Linear { [[Efl vector graphics gradient linear class]] legacy_prefix: evas_vg_gradient_linear; diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.eo b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.eo index 07df740238..c321c442f9 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Vg.Gradient_Radial extends Efl.Canvas.Vg.Gradient implements Efl.Gfx.Gradient_Radial +class @beta Efl.Canvas.Vg.Gradient_Radial extends Efl.Canvas.Vg.Gradient implements Efl.Gfx.Gradient_Radial { [[Efl vector graphics gradient radial class]] legacy_prefix: evas_vg_gradient_radial; diff --git a/src/lib/evas/canvas/efl_canvas_vg_node.eo b/src/lib/evas/canvas/efl_canvas_vg_node.eo index 55ce3ef6fb..c3fde3e69a 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_node.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_node.eo @@ -1,6 +1,6 @@ import eina_types; -abstract Efl.Canvas.Vg.Node extends Efl.Object implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Duplicate, Efl.Gfx.Path +abstract @beta Efl.Canvas.Vg.Node extends Efl.Object implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Duplicate, Efl.Gfx.Path { [[Efl vector graphics abstract class]] eo_prefix: efl_canvas_vg_node; diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.eo b/src/lib/evas/canvas/efl_canvas_vg_object.eo index 710909658e..44c9ce0f2e 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_object.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_object.eo @@ -21,7 +21,7 @@ enum Efl.Canvas.Vg.Fill_Mode dimension of the viewport.]] } -class Efl.Canvas.Vg.Object extends Efl.Canvas.Object implements Efl.File, Efl.File_Save +class @beta Efl.Canvas.Vg.Object extends Efl.Canvas.Object implements Efl.File, Efl.File_Save { [[Efl vector graphics class]] legacy_prefix: evas_object_vg; diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.eo b/src/lib/evas/canvas/efl_canvas_vg_shape.eo index 0d95a6eb0b..e832109ea8 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_shape.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_shape.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Vg.Shape extends Efl.Canvas.Vg.Node implements Efl.Gfx.Shape +class @beta Efl.Canvas.Vg.Shape extends Efl.Canvas.Vg.Node implements Efl.Gfx.Shape { [[Efl vector graphics shape class]] legacy_prefix: evas_vg_shape; diff --git a/src/lib/evas/canvas/efl_gfx_map.eo b/src/lib/evas/canvas/efl_gfx_map.eo index 9dc5b3246a..77c010d8d1 100644 --- a/src/lib/evas/canvas/efl_gfx_map.eo +++ b/src/lib/evas/canvas/efl_gfx_map.eo @@ -1,4 +1,4 @@ -mixin Efl.Gfx.Map requires Efl.Object +mixin @beta Efl.Gfx.Map requires Efl.Object { [[Texture UV mapping for all objects (rotation, perspective, 3d, ...). diff --git a/src/lib/evas/canvas/efl_input_event.eo b/src/lib/evas/canvas/efl_input_event.eo index 14b9b38e31..91fc56da3c 100644 --- a/src/lib/evas/canvas/efl_input_event.eo +++ b/src/lib/evas/canvas/efl_input_event.eo @@ -1,6 +1,6 @@ import efl_input_types; -mixin Efl.Input.Event requires Efl.Object extends Efl.Duplicate +mixin @beta Efl.Input.Event requires Efl.Object extends Efl.Duplicate { [[Represents a generic event data. diff --git a/src/lib/evas/canvas/efl_input_focus.eo b/src/lib/evas/canvas/efl_input_focus.eo index d15685a339..2adb226f71 100644 --- a/src/lib/evas/canvas/efl_input_focus.eo +++ b/src/lib/evas/canvas/efl_input_focus.eo @@ -1,4 +1,4 @@ -class Efl.Input.Focus extends Efl.Object implements Efl.Input.Event +class @beta Efl.Input.Focus extends Efl.Object implements Efl.Input.Event { [[Represents a focus event. @since 1.19]] methods { diff --git a/src/lib/evas/canvas/efl_input_hold.eo b/src/lib/evas/canvas/efl_input_hold.eo index 9649d75cb6..d5f939f341 100644 --- a/src/lib/evas/canvas/efl_input_hold.eo +++ b/src/lib/evas/canvas/efl_input_hold.eo @@ -1,4 +1,4 @@ -class Efl.Input.Hold extends Efl.Object implements Efl.Input.Event +class @beta Efl.Input.Hold extends Efl.Object implements Efl.Input.Event { [[Event data sent when inputs are put on hold or resumed.]] methods { diff --git a/src/lib/evas/canvas/efl_input_interface.eo b/src/lib/evas/canvas/efl_input_interface.eo index 48bf1bb81e..4309b9f7b1 100644 --- a/src/lib/evas/canvas/efl_input_interface.eo +++ b/src/lib/evas/canvas/efl_input_interface.eo @@ -1,4 +1,4 @@ -interface Efl.Input.Interface +interface @beta Efl.Input.Interface { [[An object implementing this interface can send pointer events. diff --git a/src/lib/evas/canvas/efl_input_key.eo b/src/lib/evas/canvas/efl_input_key.eo index 29b7d85dd3..f79db973c0 100644 --- a/src/lib/evas/canvas/efl_input_key.eo +++ b/src/lib/evas/canvas/efl_input_key.eo @@ -1,4 +1,4 @@ -class Efl.Input.Key extends Efl.Object implements Efl.Input.Event, Efl.Input.State +class @beta Efl.Input.Key extends Efl.Object implements Efl.Input.Event, Efl.Input.State { [[Represents a single key event from a keyboard or similar device. diff --git a/src/lib/evas/canvas/efl_input_pointer.eo b/src/lib/evas/canvas/efl_input_pointer.eo index cda511b6bc..d7edc6a81e 100644 --- a/src/lib/evas/canvas/efl_input_pointer.eo +++ b/src/lib/evas/canvas/efl_input_pointer.eo @@ -1,6 +1,6 @@ import efl_input_types; -class Efl.Input.Pointer extends Efl.Object implements Efl.Input.Event, Efl.Input.State +class @beta Efl.Input.Pointer extends Efl.Object implements Efl.Input.Event, Efl.Input.State { [[Event data carried over with any pointer event (mouse, touch, pen, ...) diff --git a/src/lib/evas/canvas/efl_input_state.eo b/src/lib/evas/canvas/efl_input_state.eo index f3dc8354b8..51b8155082 100644 --- a/src/lib/evas/canvas/efl_input_state.eo +++ b/src/lib/evas/canvas/efl_input_state.eo @@ -1,6 +1,6 @@ import efl_input_types; -interface Efl.Input.State +interface @beta Efl.Input.State { [[Efl input state interface]] eo_prefix: efl_input; diff --git a/src/lib/evas/gesture/efl_canvas_gesture.eo b/src/lib/evas/gesture/efl_canvas_gesture.eo index 731f02206a..86fa775770 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture.eo @@ -1,6 +1,6 @@ import efl_canvas_gesture_types; -abstract Efl.Canvas.Gesture extends Efl.Object +abstract @beta Efl.Canvas.Gesture extends Efl.Object { [[EFL Gesture abstract class]] eo_prefix: efl_gesture; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo index 944723508c..12473d6761 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Gesture_Long_Tap extends Efl.Canvas.Gesture +class @beta Efl.Canvas.Gesture_Long_Tap extends Efl.Canvas.Gesture { [[EFL Gesture Long Tap class]] eo_prefix: efl_gesture_long_tap; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo index 3804e228da..f42c2dccb3 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Gesture_Manager extends Efl.Object +class @beta Efl.Canvas.Gesture_Manager extends Efl.Object { [[EFL Gesture Manager class]] eo_prefix: efl_gesture_manager; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo index 9b4bdb28d8..a3a11c3a1c 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo @@ -1,6 +1,6 @@ import efl_canvas_gesture_types; -abstract Efl.Canvas.Gesture_Recognizer extends Efl.Object +abstract @beta Efl.Canvas.Gesture_Recognizer extends Efl.Object { [[EFL Gesture Recognizer abstract class]] eo_prefix: efl_gesture_recognizer; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo index 72cea52895..025cc4e19b 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Gesture_Recognizer_Long_Tap extends Efl.Canvas.Gesture_Recognizer +class @beta Efl.Canvas.Gesture_Recognizer_Long_Tap extends Efl.Canvas.Gesture_Recognizer { [[EFL Gesture Recognizer Long Tap class]] data: null; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo index 62e84ec9a9..43fe77a654 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Gesture_Recognizer_Tap extends Efl.Canvas.Gesture_Recognizer +class @beta Efl.Canvas.Gesture_Recognizer_Tap extends Efl.Canvas.Gesture_Recognizer { [[EFL Gesture Recognizer Tap class]] data: null; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_tap.eo index d22f075dd6..88e6e5c18e 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_tap.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Gesture_Tap extends Efl.Canvas.Gesture +class @beta Efl.Canvas.Gesture_Tap extends Efl.Canvas.Gesture { [[EFL Gesture Tap class]] eo_prefix: efl_gesture_tap; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_touch.eo b/src/lib/evas/gesture/efl_canvas_gesture_touch.eo index f606a60ede..7d773b56c5 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_touch.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_touch.eo @@ -3,7 +3,7 @@ import efl_input_types; /* FIXME: This class lacks a lot of useful helpers. */ -class Efl.Canvas.Gesture_Touch extends Efl.Object +class @beta Efl.Canvas.Gesture_Touch extends Efl.Object { [[EFL Gesture Touch class]] eo_prefix: efl_gesture_touch; From c4bb24020be0e95075e67a55348c8b74799f9f07 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 14 Feb 2019 16:24:56 +0100 Subject: [PATCH 65/87] Stop defining EFL_BETA_API_SUPPORT in Efl_Core.h and Efl_Ui.h Summary: Including these headers does no longer mean that you want to use BETA API. More and more methods in these libs will come out of BETA and they will be usable without requiring EFL_BETA_API_SUPPORT to be defined by the app. This concludes this patchset. Now apps can chose to define EFL_BETA_API_SUPPORT or not, and they will have access to the requested API subset, but both options are available. Depends on D7951 Fixes T7692 Reviewers: zmike, bu5hm4n, cedric Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7692 Differential Revision: https://phab.enlightenment.org/D7952 --- src/lib/ecore/Efl_Core.h | 4 ---- src/lib/elementary/Efl_Ui.h | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/lib/ecore/Efl_Core.h b/src/lib/ecore/Efl_Core.h index 92ff448cae..6ae81904ea 100644 --- a/src/lib/ecore/Efl_Core.h +++ b/src/lib/ecore/Efl_Core.h @@ -3,10 +3,6 @@ #include -#ifndef EFL_BETA_API_SUPPORT -#define EFL_BETA_API_SUPPORT -#endif - #include #include #include diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h index 34db59a475..54b816a6fe 100644 --- a/src/lib/elementary/Efl_Ui.h +++ b/src/lib/elementary/Efl_Ui.h @@ -8,10 +8,6 @@ # define EFL_EO_API_SUPPORT #endif -#ifndef EFL_BETA_API_SUPPORT -# define EFL_BETA_API_SUPPORT -#endif - /* Standard headers for standard system calls etc. */ #include #include From a2ea993f50f787ad0087babe381b59c692dd9cbe Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Thu, 14 Feb 2019 20:10:21 +0100 Subject: [PATCH 66/87] efl_core_command_line: a +1 was forgotten in order to account \0 this forgotten and the allocated string buffer was too small. This fixes a valgrind warnings --- src/lib/ecore/efl_core_command_line.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore/efl_core_command_line.c b/src/lib/ecore/efl_core_command_line.c index 74ae690c26..24cab90b0e 100644 --- a/src/lib/ecore/efl_core_command_line.c +++ b/src/lib/ecore/efl_core_command_line.c @@ -214,7 +214,7 @@ _efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_L for (i = 0; i < (array ? eina_array_count(array) : 0); ++i) { char *content = eina_array_data_get(array, i); - char *param = calloc(1, strlen(content)); + char *param = calloc(1, strlen(content) + 1); if (!param) { From 512e37d02fc8ee37d0f3b541b3316775eda8f51b Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 14 Feb 2019 15:33:55 -0500 Subject: [PATCH 67/87] Remove warnings when building without EFL_BETA_API_SUPPORT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: efl_alive_get should be a method defined in efl_object.eo, protected by EFL_BETA_API_SUPPORT while that class is still @beta. Instead, it is defined in Eo.h, so the BETA guard has to be defined manually. This was causing some unsighly warnings during "make" and "make check" (implicit declaration of function ‘efl_invalidating_get’) Test Plan: make && make check do not throw that warning anymore Reviewers: zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7958 --- src/lib/eo/Eo.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 403bef9925..7f90e79653 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -2231,6 +2231,7 @@ eina_value_object_get(Eina_Value *v) return r; } +#ifdef EFL_BETA_API_SUPPORT /** * @brief Get if the object is in its main lifetime. * @param obj the object to check @@ -2243,6 +2244,7 @@ efl_alive_get(const Eo *obj) { return efl_finalized_get(obj) && !efl_invalidating_get(obj) && !efl_invalidated_get(obj); } +#endif /* EFL_BETA_API_SUPPORT */ /** * @brief Event triggered when a callback was added to the object From 0fba6c89a162b33feecfe357900c4d9e4f9b4f6c Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 14 Feb 2019 15:41:23 -0500 Subject: [PATCH 68/87] Move Efl.Observable_Tuple into efl_observable.eo Summary: And out of efl_types.eot Makes sense, right? Test Plan: Everything builds Reviewers: cedric, zmike, bu5hm4n Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7953 --- src/lib/efl/interfaces/efl_observable.eo | 7 +++++++ src/lib/efl/interfaces/efl_types.eot | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/efl/interfaces/efl_observable.eo b/src/lib/efl/interfaces/efl_observable.eo index cf31f41e48..2ac6ed750b 100644 --- a/src/lib/efl/interfaces/efl_observable.eo +++ b/src/lib/efl/interfaces/efl_observable.eo @@ -1,5 +1,12 @@ import efl_types; +struct @free(efl_observable_tuple_free) Efl.Observable_Tuple +{ + [[This type describes an observable touple]] + key: string; [[Touple key]] + data: iterator @owned; [[Touple data]] +} + class @beta Efl.Observable extends Efl.Object { [[Efl observable class]] methods { diff --git a/src/lib/efl/interfaces/efl_types.eot b/src/lib/efl/interfaces/efl_types.eot index cf45db8f9c..fd5a23f255 100644 --- a/src/lib/efl/interfaces/efl_types.eot +++ b/src/lib/efl/interfaces/efl_types.eot @@ -39,9 +39,3 @@ struct Efl.Version build_id: string; [[Contains $EFL_BUILD_ID.]] } -struct @free(efl_observable_tuple_free) Efl.Observable_Tuple -{ - [[This type describes an observable touple]] - key: string; [[Touple key]] - data: iterator @owned; [[Touple data]] -} From 9d65e64c00858f6827ec786737a59c728f440f8b Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 14 Feb 2019 11:27:27 +0000 Subject: [PATCH 69/87] env obj - fixx implementation to use a shared object so this chnage totally threww away all the thread safety and locking without doing the simple thing of using a shared obcj for the global env obj to ensure brute force safety at least. fix. --- src/lib/ecore/efl_core_proc_env.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/ecore/efl_core_proc_env.c b/src/lib/ecore/efl_core_proc_env.c index 74519461ae..98f0731f07 100644 --- a/src/lib/ecore/efl_core_proc_env.c +++ b/src/lib/ecore/efl_core_proc_env.c @@ -135,7 +135,9 @@ _efl_core_proc_env_self(void) { if (!env) { + efl_domain_current_push(EFL_ID_DOMAIN_SHARED); env = efl_add_ref(EFL_CORE_PROC_ENV_CLASS, NULL); + efl_domain_current_pop(); efl_wref_add(env, &env); } From 8e98c7eef9cdc6b337841fdd11d5b2c8a3079067 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 14 Feb 2019 11:28:23 +0000 Subject: [PATCH 70/87] cmdline iface - fix to consume input array AND strings totally strings often enough are generated e.g. via "%s/%s" or "%i" or similar etc. ... i have poitned to examples, so move to make all strings consistently stringshared, fix a bug added to the efl thread code where it accessed and freed array even tho array was consumed (but not strings) in the set, and the code used free to consume not stringshare_del. fix other code and tests to match EXCTLY the kind of bugs and mistakes with this kind of design that i said would happen more often just happened... --- src/lib/ecore/efl_core_command_line.c | 3 +++ src/lib/ecore/efl_core_command_line.eo | 2 +- src/lib/ecore/efl_loop.c | 5 ++++- src/lib/ecore/efl_thread.c | 4 +--- src/tests/ecore/efl_app_test_cml.c | 14 +++++++------- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/lib/ecore/efl_core_command_line.c b/src/lib/ecore/efl_core_command_line.c index 24cab90b0e..bd6d21f2d4 100644 --- a/src/lib/ecore/efl_core_command_line.c +++ b/src/lib/ecore/efl_core_command_line.c @@ -223,6 +223,8 @@ _efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_L eina_stringshare_del(eina_array_pop(pd->command)); eina_array_free(pd->command); pd->command = NULL; + for (;i < (array ? eina_array_count(array) : 0); ++i) + eina_stringshare_del(content); eina_array_free(array); return EINA_FALSE; } @@ -236,6 +238,7 @@ _efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_L _remove_invalid_chars(param); eina_array_push(pd->command, eina_stringshare_add(param)); free(param); + eina_stringshare_del(content); } pd->string_command = eina_strbuf_release(command); pd->filled = EINA_TRUE; diff --git a/src/lib/ecore/efl_core_command_line.eo b/src/lib/ecore/efl_core_command_line.eo index 436720d9bd..25b7c88b6e 100644 --- a/src/lib/ecore/efl_core_command_line.eo +++ b/src/lib/ecore/efl_core_command_line.eo @@ -60,7 +60,7 @@ mixin @beta Efl.Core.Command_Line { return : bool; [[On success $true, $false otherwise]] } values { - array : array @owned; [[An array where every array field is an argument]] + array : array @owned; [[An array where every array field is an argument]] } } @property command_string { diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index 342a6f7725..1096c62bdb 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -390,8 +390,11 @@ ecore_loop_arguments_send(int argc, const char **argv) cml = eina_array_new(argc); for (i = 0; i < argc; i++) { - Eina_Stringshare *arg = eina_stringshare_add(argv[i]); + Eina_Stringshare *arg; + + arg = eina_stringshare_add(argv[i]); eina_array_push(arga, arg); + arg = eina_stringshare_add(argv[i]); eina_array_push(cml, arg); } diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c index a324af4f58..421c92dba7 100644 --- a/src/lib/ecore/efl_thread.c +++ b/src/lib/ecore/efl_thread.c @@ -277,11 +277,9 @@ _efl_thread_main(void *data, Eina_Thread t) it->func, it->user_data); } efl_core_command_line_command_array_set(obj, thdat->argv); + thdat->argv = NULL; efl_future_then(obj, efl_loop_job(obj), .success = _efl_loop_arguments_send); - - while (thdat->argv && eina_array_count(thdat->argv)) free(eina_array_pop(thdat->argv)); - eina_array_free(thdat->argv); free(thdat->event_cb); thdat->event_cb = NULL; diff --git a/src/tests/ecore/efl_app_test_cml.c b/src/tests/ecore/efl_app_test_cml.c index 1b7cebf552..33024dabb8 100644 --- a/src/tests/ecore/efl_app_test_cml.c +++ b/src/tests/ecore/efl_app_test_cml.c @@ -23,13 +23,13 @@ _construct_array(void) { Eina_Array *array = eina_array_new(16); - eina_array_push(array, "/bin/sh"); - eina_array_push(array, "-C"); - eina_array_push(array, "foo"); - eina_array_push(array, "--test"); - eina_array_push(array, "--option=done"); - eina_array_push(array, "--"); - eina_array_push(array, "asdf --test"); + eina_array_push(array, eina_stringshare_add("/bin/sh")); + eina_array_push(array, eina_stringshare_add("-C")); + eina_array_push(array, eina_stringshare_add("foo")); + eina_array_push(array, eina_stringshare_add("--test")); + eina_array_push(array, eina_stringshare_add("--option=done")); + eina_array_push(array, eina_stringshare_add("--")); + eina_array_push(array, eina_stringshare_add("asdf --test")); return array; } From eb2ead11b5b1852569b34f78ad0a91096dfc7f0a Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 15 Feb 2019 01:16:49 +0000 Subject: [PATCH 71/87] fix args handling in cmdline class to not be broken first use consistent ownership (stringshare the strings) and then also properly dup and pass them and not free null arrays and so on where they are used --- src/lib/ecore/efl_core_command_line.c | 11 +++++++---- src/lib/ecore/efl_thread.c | 27 +++++++++++++++++---------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/lib/ecore/efl_core_command_line.c b/src/lib/ecore/efl_core_command_line.c index bd6d21f2d4..424dd3486a 100644 --- a/src/lib/ecore/efl_core_command_line.c +++ b/src/lib/ecore/efl_core_command_line.c @@ -180,13 +180,13 @@ _escape(const char *s) return s2; } -EOLIAN static const char* +EOLIAN static const char * _efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) { - return eina_strdup(pd->string_command); + return pd->string_command; } -EOLIAN static Eina_Accessor* +EOLIAN static Eina_Accessor * _efl_core_command_line_command_access(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) { return pd->command ? eina_array_accessor_new(pd->command) : NULL; @@ -224,7 +224,10 @@ _efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_L eina_array_free(pd->command); pd->command = NULL; for (;i < (array ? eina_array_count(array) : 0); ++i) - eina_stringshare_del(content); + { + content = eina_array_data_get(array, i); + eina_stringshare_del(content); + } eina_array_free(array); return EINA_FALSE; } diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c index 421c92dba7..7e52d7b637 100644 --- a/src/lib/ecore/efl_thread.c +++ b/src/lib/ecore/efl_thread.c @@ -153,19 +153,26 @@ _efl_loop_arguments_send(Eo *obj, void *data EINA_UNUSED, const Eina_Value v) int i = 0; accessor = efl_core_command_line_command_access(obj); - arga = eina_array_new(10); - - EINA_ACCESSOR_FOREACH(accessor, i, argv) + if (accessor) { - eina_array_push(arga, eina_stringshare_add(argv)); + arga = eina_array_new(10); + + EINA_ACCESSOR_FOREACH(accessor, i, argv) + { + eina_array_push(arga, eina_stringshare_add(argv)); + } + arge.argv = arga; } - arge.argv = arga; + else arge.argv = NULL; arge.initialization = EINA_TRUE; efl_event_callback_call(obj, EFL_LOOP_EVENT_ARGUMENTS, &arge); - - while ((s = eina_array_pop(arga))) eina_stringshare_del(s); - eina_array_free(arga); + if (accessor) + { + while ((s = eina_array_pop(arga))) eina_stringshare_del(s); + eina_array_free(arga); + eina_accessor_free(accessor); + } return v; } @@ -276,7 +283,7 @@ _efl_thread_main(void *data, Eina_Thread t) efl_event_callback_priority_add(obj, it->desc, it->priority, it->func, it->user_data); } - efl_core_command_line_command_array_set(obj, thdat->argv); + if (thdat->argv) efl_core_command_line_command_array_set(obj, thdat->argv); thdat->argv = NULL; efl_future_then(obj, efl_loop_job(obj), .success = _efl_loop_arguments_send); @@ -728,7 +735,7 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) acc = efl_core_command_line_command_access(obj); if (acc) { - thdat->argv = eina_array_new(0); + thdat->argv = eina_array_new(1); EINA_ACCESSOR_FOREACH(acc, i, argv) { eina_array_push(thdat->argv, eina_stringshare_add(argv)); From 0bf8b1ab1a48c14a2f9d0a902887afee83ae56f1 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 15 Feb 2019 01:19:03 +0000 Subject: [PATCH 72/87] fix efl exe/thread/appthread to work again after seemingly bitrotting --- src/lib/ecore/efl_appthread.c | 8 ++++---- src/lib/ecore/efl_exe.eo | 2 +- src/lib/ecore/efl_task.eo | 2 +- src/lib/ecore/efl_thread.c | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/ecore/efl_appthread.c b/src/lib/ecore/efl_appthread.c index 250d879118..4eb190bd63 100644 --- a/src/lib/ecore/efl_appthread.c +++ b/src/lib/ecore/efl_appthread.c @@ -37,10 +37,10 @@ _efl_appthread_efl_object_destructor(Eo *obj, Efl_Appthread_Data *pd) { if (pd->fd.in >= 0) { - efl_del(pd->fd.in_handler); - efl_del(pd->fd.out_handler); - efl_del(pd->ctrl.in_handler); - efl_del(pd->ctrl.out_handler); +// efl_del(pd->fd.in_handler); +// efl_del(pd->fd.out_handler); +// efl_del(pd->ctrl.in_handler); +// efl_del(pd->ctrl.out_handler); close(pd->fd.in); close(pd->fd.out); close(pd->ctrl.in); diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index 0d3c29e7f2..01ba9a34bf 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -19,7 +19,7 @@ enum Efl.Exe_Flags { hide_io = 4 } -class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer,Efl.Core.Command_Line +class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line { [[ ]] methods { diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index f3c1ac9b4f..6745411218 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -15,7 +15,7 @@ enum Efl.Task_Flags { no_exit_code_error = 4, } -abstract @beta Efl.Task extends Efl.Object +abstract @beta Efl.Task extends Efl.Loop_Consumer { [[ ]] methods { diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c index 7e52d7b637..ce1ab8f6d8 100644 --- a/src/lib/ecore/efl_thread.c +++ b/src/lib/ecore/efl_thread.c @@ -535,10 +535,10 @@ _efl_thread_efl_object_destructor(Eo *obj, Efl_Thread_Data *pd) if (pd->thdat) { eina_thread_join(pd->thread); - efl_del(pd->fd.in_handler); - efl_del(pd->fd.out_handler); - efl_del(pd->ctrl.in_handler); - efl_del(pd->ctrl.out_handler); +// efl_del(pd->fd.in_handler); +// efl_del(pd->fd.out_handler); +// efl_del(pd->ctrl.in_handler); +// efl_del(pd->ctrl.out_handler); close(pd->fd.in); close(pd->fd.out); close(pd->ctrl.in); From a4def9d276cb4145886c02ca655e4e18a337cfcf Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 15 Feb 2019 10:38:09 +0000 Subject: [PATCH 73/87] ecore audio - mark it all as beta this api needs a re-think in terms of being portablke/back-enmd agnostic. it shouldnt expose windows vs pulse etc. and shouldnt be ecore_XXX for sure. --- src/lib/ecore_audio/ecore_audio.eo | 2 +- src/lib/ecore_audio/ecore_audio_in.eo | 2 +- src/lib/ecore_audio/ecore_audio_in_sndfile.eo | 2 +- src/lib/ecore_audio/ecore_audio_in_tone.eo | 2 +- src/lib/ecore_audio/ecore_audio_out.eo | 2 +- src/lib/ecore_audio/ecore_audio_out_pulse.eo | 2 +- src/lib/ecore_audio/ecore_audio_out_sndfile.eo | 2 +- src/lib/ecore_audio/ecore_audio_out_wasapi.eo | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/ecore_audio/ecore_audio.eo b/src/lib/ecore_audio/ecore_audio.eo index c93726f800..dff009eea9 100644 --- a/src/lib/ecore_audio/ecore_audio.eo +++ b/src/lib/ecore_audio/ecore_audio.eo @@ -12,7 +12,7 @@ enum Ecore.Audio.Format { last [[Sentinel value to indicate last enum field during iteration]] } -abstract Ecore.Audio extends Efl.Object +abstract @beta Ecore.Audio extends Efl.Object { [[Convenience audio class.]] diff --git a/src/lib/ecore_audio/ecore_audio_in.eo b/src/lib/ecore_audio/ecore_audio_in.eo index a8ef913dba..7c8582f985 100644 --- a/src/lib/ecore_audio/ecore_audio_in.eo +++ b/src/lib/ecore_audio/ecore_audio_in.eo @@ -1,4 +1,4 @@ -class Ecore.Audio.In extends Ecore.Audio +class @beta Ecore.Audio.In extends Ecore.Audio { [[Ecore Audio input object.]] eo_prefix: ecore_audio_obj_in; diff --git a/src/lib/ecore_audio/ecore_audio_in_sndfile.eo b/src/lib/ecore_audio/ecore_audio_in_sndfile.eo index 76aeb42f51..cb1476029c 100644 --- a/src/lib/ecore_audio/ecore_audio_in_sndfile.eo +++ b/src/lib/ecore_audio/ecore_audio_in_sndfile.eo @@ -1,4 +1,4 @@ -class Ecore.Audio.In.Sndfile extends Ecore.Audio.In +class @beta Ecore.Audio.In.Sndfile extends Ecore.Audio.In { [[Ecore Audio sndfile input.]] eo_prefix: ecore_audio_obj_in_sndfile; diff --git a/src/lib/ecore_audio/ecore_audio_in_tone.eo b/src/lib/ecore_audio/ecore_audio_in_tone.eo index 8e6e3d48e6..0fc51c13c5 100644 --- a/src/lib/ecore_audio/ecore_audio_in_tone.eo +++ b/src/lib/ecore_audio/ecore_audio_in_tone.eo @@ -1,4 +1,4 @@ -class Ecore.Audio.In.Tone extends Ecore.Audio.In +class @beta Ecore.Audio.In.Tone extends Ecore.Audio.In { [[Ecore Audio tone input.]] eo_prefix: ecore_audio_obj_in_tone; diff --git a/src/lib/ecore_audio/ecore_audio_out.eo b/src/lib/ecore_audio/ecore_audio_out.eo index d50f1c1473..59821c3dd9 100644 --- a/src/lib/ecore_audio/ecore_audio_out.eo +++ b/src/lib/ecore_audio/ecore_audio_out.eo @@ -1,4 +1,4 @@ -abstract Ecore.Audio.Out extends Ecore.Audio +abstract @beta Ecore.Audio.Out extends Ecore.Audio { [[Ecore Audio output object.]] diff --git a/src/lib/ecore_audio/ecore_audio_out_pulse.eo b/src/lib/ecore_audio/ecore_audio_out_pulse.eo index ea3940acae..0729a752e8 100644 --- a/src/lib/ecore_audio/ecore_audio_out_pulse.eo +++ b/src/lib/ecore_audio/ecore_audio_out_pulse.eo @@ -1,4 +1,4 @@ -class Ecore.Audio.Out.Pulse extends Ecore.Audio.Out +class @beta Ecore.Audio.Out.Pulse extends Ecore.Audio.Out { [[Ecore audio ouput for PulseAudio.]] eo_prefix: ecore_audio_obj_out_pulse; diff --git a/src/lib/ecore_audio/ecore_audio_out_sndfile.eo b/src/lib/ecore_audio/ecore_audio_out_sndfile.eo index e5358d543b..9b57d83fa4 100644 --- a/src/lib/ecore_audio/ecore_audio_out_sndfile.eo +++ b/src/lib/ecore_audio/ecore_audio_out_sndfile.eo @@ -1,4 +1,4 @@ -class Ecore.Audio.Out.Sndfile extends Ecore.Audio.Out +class @beta Ecore.Audio.Out.Sndfile extends Ecore.Audio.Out { [[Ecore audio output to the sndfile library.]] eo_prefix: ecore_audio_obj_out_sndfile; diff --git a/src/lib/ecore_audio/ecore_audio_out_wasapi.eo b/src/lib/ecore_audio/ecore_audio_out_wasapi.eo index c32e9ecef8..ab50a980b8 100644 --- a/src/lib/ecore_audio/ecore_audio_out_wasapi.eo +++ b/src/lib/ecore_audio/ecore_audio_out_wasapi.eo @@ -1,4 +1,4 @@ -class Ecore.Audio.Out.Wasapi extends Ecore.Audio.Out +class @beta Ecore.Audio.Out.Wasapi extends Ecore.Audio.Out { [[Ecore audio ouput for WasapiAudio.]] eo_prefix: ecore_audio_obj_out_wasapi; From 8eb06f71e487e88d091c855ee3dd2cff1fd9e7fb Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 15 Feb 2019 12:27:21 +0000 Subject: [PATCH 74/87] efl commandline - make strings also owned as well as array this seems like it should be the right one. i don't have sample tests etc. to run - the mono suite succeeds... so... --- src/lib/ecore/efl_core_command_line.eo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore/efl_core_command_line.eo b/src/lib/ecore/efl_core_command_line.eo index 25b7c88b6e..7842949d96 100644 --- a/src/lib/ecore/efl_core_command_line.eo +++ b/src/lib/ecore/efl_core_command_line.eo @@ -60,7 +60,7 @@ mixin @beta Efl.Core.Command_Line { return : bool; [[On success $true, $false otherwise]] } values { - array : array @owned; [[An array where every array field is an argument]] + array : array @owned; [[An array where every array field is an argument]] } } @property command_string { From 4935202caab9485c0b62006ffece5b85c334773a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 15 Feb 2019 16:20:58 +0100 Subject: [PATCH 75/87] efl.canvas.scene: improve class docs Summary: these were some pretty efl docs, and I've tried to make them more accessible ref T7584 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7584 Differential Revision: https://phab.enlightenment.org/D7954 --- src/lib/efl/interfaces/efl_canvas_scene.eo | 64 +++++++++++----------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/src/lib/efl/interfaces/efl_canvas_scene.eo b/src/lib/efl/interfaces/efl_canvas_scene.eo index 2133378b05..07f9d6cf80 100644 --- a/src/lib/efl/interfaces/efl_canvas_scene.eo +++ b/src/lib/efl/interfaces/efl_canvas_scene.eo @@ -3,18 +3,18 @@ import efl_gfx_types; interface @beta Efl.Canvas.Scene { - [[Common interface for window and some internal classes in EFL.]] + [[Interface containing basic canvas-related methods and events.]] methods { @property image_max_size { get { - [[Get the maximum image size evas can possibly handle. + [[Get the maximum image size the canvas can possibly handle. This function returns the largest image or surface size that - evas can handle in pixels, and if there is one, returns $true. + the canvas can handle in pixels, and if there is one, returns $true. It returns $false if no extra constraint on maximum image - size exists. You still should check the return values of - $maxw and $maxh as there may still be a limit, just a - much higher one. + size exists. + + The default limit is 65535x65535. ]] return: bool; [[$true on success, $false otherwise]] @@ -38,17 +38,15 @@ interface @beta Efl.Canvas.Scene } } objects_at_xy_get { - [[Retrieve a list of objects lying over a given position in - a canvas. + [[Retrieve a list of objects at a given position in a canvas. This function will traverse all the layers of the given canvas, from top to bottom, querying for objects with areas covering the - given position. The user can remove from query objects which are + given position. The user can exclude from the query objects which are hidden and/or which are set to pass events. - Warning: This function will skip objects parented by smart - objects, acting only on the ones at the "top level", with - regard to object parenting. + Warning: This function will only evaluate top-level objects; child + or "sub" objects will be skipped. ]] return: iterator @owned @warn_unused; [[ The list of objects that are over the given position in $e. @@ -71,14 +69,13 @@ interface @beta Efl.Canvas.Scene This function will traverse all the layers of the given canvas, from top to bottom, querying for objects with areas covering the - given position. The user can remove from the query - objects which are hidden and/or which are set to pass events. + given position. The user can exclude from the query objects which are + hidden and/or which are set to pass events. - Warning: This function will skip objects parented by smart - objects, acting only on the ones at the "top level", with - regard to object parenting. + Warning: This function will only evaluate top-level objects; child + or "sub" objects will be skipped. ]] - return: Efl.Gfx.Entity @warn_unused; [[The Evas object that is over all other objects at the given position.]] + return: Efl.Gfx.Entity @warn_unused; [[The canvas object that is over all other objects at the given position.]] params { @in pos: Eina.Position2D; [[The pixel position.]] @in include_pass_events_objects: bool; [[ @@ -92,18 +89,16 @@ interface @beta Efl.Canvas.Scene } } objects_in_rectangle_get { - [[Retrieve a list of objects lying over a given - rectangular region in a canvas. + [[Retrieve a list of objects overlapping a given rectangular region in a canvas. This function will traverse all the layers of the given canvas, from top to bottom, querying for objects with areas overlapping - with the given rectangular region inside $e. The user can remove + with the given rectangular region. The user can exclude from the query objects which are hidden and/or which are set to pass events. - Warning: This function will skip objects parented by smart - objects, acting only on the ones at the "top level", with - regard to object parenting. + Warning: This function will only evaluate top-level objects; child + or "sub" objects will be skipped. ]] return: iterator @owned @warn_unused; [[Iterator to objects]] params { @@ -119,18 +114,17 @@ interface @beta Efl.Canvas.Scene } } object_top_in_rectangle_get @const { - [[Retrieve the Evas object stacked at the top of a given + [[Retrieve the canvas object stacked at the top of a given rectangular region in a canvas This function will traverse all the layers of the given canvas, from top to bottom, querying for objects with areas overlapping - with the given rectangular region inside $e. The user can remove + with the given rectangular region. The user can exclude from the query objects which are hidden and/or which are set to pass events. - Warning: This function will skip objects parented by smart - objects, acting only on the ones at the "top level", with - regard to object parenting. + Warning: This function will only evaluate top-level objects; child + or "sub" objects will be skipped. ]] return: Efl.Gfx.Entity @warn_unused; [[ The object that is over all other objects at the given @@ -149,7 +143,11 @@ interface @beta Efl.Canvas.Scene } } seats { - [[Iterate over the input device seats. + [[Iterate over the available input device seats for the canvas. + + A "seat" is the term used for a group of input devices, typically including + a pointer and a keyboard. A seat object is the parent of the individual input + devices. @since 1.20 ]] @@ -175,7 +173,11 @@ interface @beta Efl.Canvas.Scene } } @property seat { - [[A seat attached to this canvas, found by id. + [[Get a seat attached to this canvas using the seat's id property. + + Seats are associated with an arbitrary integer id. The id is not a + persistent value and should never be hardcoded, as it may change between + runs of an application depending on the environment. See also @.device to find a seat by name instead of by id. ]] From 8952c05ddd6299d35dbfe51b4dbdec1c482d4783 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Fri, 15 Feb 2019 17:15:36 +0100 Subject: [PATCH 76/87] eolian gen: initial support for reflection api This adds support for generating reflection functions for properties. This support is basic for now, supporting only primitive types and string(shares), it will be expanded later as required. @feature --- src/bin/eolian/sources.c | 215 ++++++++++++++++-- src/tests/eolian/data/class_simple_ref.c | 30 ++- .../eolian/data/function_as_argument_ref.c | 4 +- src/tests/eolian/data/override_ref.c | 4 +- src/tests/eolian/data/owning.eo.c | 4 +- 5 files changed, 235 insertions(+), 22 deletions(-) diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index 76f8c64725..e4491a22b3 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -322,11 +322,118 @@ _gen_function_param_fallback(Eina_Iterator *itr, Eina_Strbuf *fallback_free_owne return owners; } +static const char * +_get_reflect_initf(const Eolian_Type *abtp) +{ + Eolian_Type_Builtin_Type btp = eolian_type_builtin_type_get(abtp); + const char *initf = NULL; + switch (btp) + { + case EOLIAN_TYPE_BUILTIN_BYTE: + case EOLIAN_TYPE_BUILTIN_CHAR: + initf = "char"; break; + case EOLIAN_TYPE_BUILTIN_UBYTE: + initf = "uchar"; break; + case EOLIAN_TYPE_BUILTIN_SHORT: + case EOLIAN_TYPE_BUILTIN_USHORT: + case EOLIAN_TYPE_BUILTIN_INT: + case EOLIAN_TYPE_BUILTIN_UINT: + case EOLIAN_TYPE_BUILTIN_LONG: + case EOLIAN_TYPE_BUILTIN_ULONG: + case EOLIAN_TYPE_BUILTIN_INT64: + case EOLIAN_TYPE_BUILTIN_UINT64: + case EOLIAN_TYPE_BUILTIN_TIME: + case EOLIAN_TYPE_BUILTIN_FLOAT: + case EOLIAN_TYPE_BUILTIN_DOUBLE: + case EOLIAN_TYPE_BUILTIN_BOOL: + case EOLIAN_TYPE_BUILTIN_STRING: + case EOLIAN_TYPE_BUILTIN_STRINGSHARE: + initf = eolian_type_name_get(abtp); break; + default: + break; + } + return initf; +} + +static void +_gen_reflect_get(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt, + const Eolian_Function *fid, Eina_Hash *refh) +{ + if (eolian_type_is_ptr(valt)) + return; + + const Eolian_Type *abtp = eolian_type_aliased_base_get(valt); + const char *initf = _get_reflect_initf(abtp); + if (!initf) + return; + + Eolian_Function_Type et = (Eolian_Function_Type)eina_hash_find(refh, &fid); + if (et == EOLIAN_PROP_SET) + eina_hash_set(refh, &fid, (void *)EOLIAN_PROPERTY); + else + eina_hash_set(refh, &fid, (void *)EOLIAN_PROP_GET); + + eina_strbuf_append(buf, "\nstatic Eina_Value\n"); + eina_strbuf_append_printf(buf, "__eolian_%s_%s_get_reflect(Eo *obj)\n", + cnamel, eolian_function_name_get(fid)); + eina_strbuf_append(buf, "{\n"); + + Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_RETURN); + const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : ""; + + Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_GET, EINA_FALSE); + eina_strbuf_append_printf(buf, " %s%sval = %s(obj);\n", ct, starsp, fcn); + eina_stringshare_del(fcn); + eina_stringshare_del(ct); + + eina_strbuf_append_printf(buf, " return eina_value_%s_init(val);\n", initf); + eina_strbuf_append(buf, "}\n\n"); +} + +static void +_gen_reflect_set(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt, + const Eolian_Function *fid, Eina_Hash *refh) +{ + if (eolian_type_is_ptr(valt)) + return; + + const Eolian_Type *abtp = eolian_type_aliased_base_get(valt); + const char *initf = _get_reflect_initf(abtp); + if (!initf) + return; + + Eolian_Function_Type et = (Eolian_Function_Type)eina_hash_find(refh, &fid); + if (et == EOLIAN_PROP_GET) + eina_hash_set(refh, &fid, (void *)EOLIAN_PROPERTY); + else + eina_hash_set(refh, &fid, (void *)EOLIAN_PROP_SET); + + eina_strbuf_append(buf, "\nstatic void\n"); + eina_strbuf_append_printf(buf, "__eolian_%s_%s_set_reflect(Eo *obj, Eina_Value val)\n", + cnamel, eolian_function_name_get(fid)); + eina_strbuf_append(buf, "{\n"); + + Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_PARAM); + const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : ""; + eina_strbuf_append_printf(buf, " %s%scval;\n", ct, starsp); + eina_stringshare_del(ct); + + eina_strbuf_append_printf(buf, " eina_value_%s_convert(&val, &cval);\n", initf); + + Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_SET, EINA_FALSE); + eina_strbuf_append_printf(buf, " %s(obj, cval);\n", fcn); + eina_stringshare_del(fcn); + + eina_strbuf_append(buf, " eina_value_flush(&val);\n"); + + eina_strbuf_append(buf, "}\n\n"); +} static void _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, Eolian_Function_Type ftype, Eina_Strbuf *buf, - const Eolian_Implement *impl, Eina_Strbuf *lbuf) + const Eolian_Implement *impl, Eina_Strbuf *lbuf, + Eina_Hash *refh) { Eina_Bool is_empty = eolian_implement_is_empty(impl, ftype); Eina_Bool is_auto = eolian_implement_is_auto(impl, ftype); @@ -336,6 +443,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET); Eina_Bool var_as_ret = EINA_FALSE; + /* assume we're not generating reflection api by default */ + const Eolian_Type *reflect_type = NULL; const Eolian_Expression *def_ret = NULL; const Eolian_Type *rtp = eolian_function_return_type_get(fid, ftype); @@ -357,6 +466,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, { Eolian_Function_Parameter *pr = d1; rtp = eolian_parameter_type_get(pr); + /* reflect only when returning 1 val */ + reflect_type = rtp; var_as_ret = EINA_TRUE; def_ret = eolian_parameter_default_value_get(pr); } @@ -364,7 +475,18 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, } } else if (ftype == EOLIAN_PROP_SET) - func_suffix = "_set"; + { + func_suffix = "_set"; + Eina_Iterator *itr = eolian_property_values_get(fid, ftype); + void *d1, *d2; + /* reflect with 1 value */ + if (eina_iterator_next(itr, &d1) && !eina_iterator_next(itr, &d2)) + { + Eolian_Function_Parameter *pr = d1; + reflect_type = eolian_parameter_type_get(pr); + } + eina_iterator_free(itr); + } Eina_Strbuf *params = eina_strbuf_new(); /* par1, par2, par3, ... */ Eina_Strbuf *params_full = eina_strbuf_new(); /* T par1, U par2, ... for decl */ @@ -375,6 +497,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, /* property keys */ { Eina_Iterator *itr = eolian_property_keys_get(fid, ftype); + if (itr) /* has keys: no reflection */ + reflect_type = NULL; Eolian_Function_Parameter *pr; EINA_ITERATOR_FOREACH(itr, pr) { @@ -650,6 +774,15 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, if (impl_same_class && !eolian_function_is_class(fid)) { + /* generate reflection implementation */ + if (reflect_type) + { + if (ftype == EOLIAN_PROP_GET) + _gen_reflect_get(buf, cnamel, reflect_type, fid, refh); + else + _gen_reflect_set(buf, cnamel, reflect_type, fid, refh); + } + void *data; Eina_Iterator *itr = eolian_property_keys_get(fid, ftype); Eina_Bool has_params = eina_iterator_next(itr, &data); @@ -832,7 +965,33 @@ _gen_opfunc(const Eolian_Function *fid, Eolian_Function_Type ftype, } static void -_gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf) +_gen_reflop(const Eolian_Function *fid, Eina_Strbuf *buf, const char *cnamel, Eina_Hash *refh) +{ + Eolian_Function_Type aftype = (Eolian_Function_Type)eina_hash_find(refh, &fid); + if (aftype == EOLIAN_UNRESOLVED) + return; + + eina_strbuf_append_printf(buf, " {\"%s\", ", eolian_function_name_get(fid)); + + if (aftype == EOLIAN_PROP_SET || aftype == EOLIAN_PROPERTY) + { + eina_strbuf_append_printf(buf, "__eolian_%s_%s_set_reflect, ", + cnamel, eolian_function_name_get(fid)); + } + else + eina_strbuf_append(buf, "NULL, "); + + if (aftype == EOLIAN_PROP_GET || aftype == EOLIAN_PROPERTY) + { + eina_strbuf_append_printf(buf, "__eolian_%s_%s_get_reflect},\n", + cnamel, eolian_function_name_get(fid)); + } + else + eina_strbuf_append(buf, "NULL},\n"); +} + +static void +_gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Hash *refh) { char *cnamel = NULL, *cnameu = NULL; eo_gen_class_names_get(cl, NULL, &cnameu, &cnamel); @@ -841,8 +1000,10 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf) eina_strbuf_append(buf, cnamel); eina_strbuf_append(buf, "_class_initializer(Efl_Class *klass)\n{\n"); eina_strbuf_append(buf, " const Efl_Object_Ops *opsp = NULL;\n\n"); + eina_strbuf_append(buf, " const Efl_Object_Property_Reflection_Ops *ropsp = NULL;\n\n"); Eina_Strbuf *ops = eina_strbuf_new(); + Eina_Strbuf *refls = eina_strbuf_new(); /* start over with clean itearator */ const Eolian_Implement *imp; @@ -855,10 +1016,8 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf) if (eolian_function_is_class(fid)) continue; - Eina_Strbuf *obuf = ops; - - if (!eina_strbuf_length_get(obuf)) - eina_strbuf_append_printf(obuf, " EFL_OPS_DEFINE(ops,\n"); + if (!eina_strbuf_length_get(ops)) + eina_strbuf_append_printf(ops, " EFL_OPS_DEFINE(ops,\n"); Eina_Bool found_get = !!eina_hash_find(_funcs_params_init_get, &imp); Eina_Bool found_set = !!eina_hash_find(_funcs_params_init_set, &imp); @@ -869,17 +1028,20 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf) switch (ftype) { case EOLIAN_PROP_GET: - _gen_opfunc(fid, EOLIAN_PROP_GET, obuf, imp, found_get, cnamel, ocnamel); + _gen_opfunc(fid, EOLIAN_PROP_GET, ops, imp, found_get, cnamel, ocnamel); + _gen_reflop(fid, refls, cnamel, refh); break; case EOLIAN_PROP_SET: - _gen_opfunc(fid, EOLIAN_PROP_SET, obuf, imp, found_set, cnamel, ocnamel); + _gen_opfunc(fid, EOLIAN_PROP_SET, ops, imp, found_set, cnamel, ocnamel); + _gen_reflop(fid, refls, cnamel, refh); break; case EOLIAN_PROPERTY: - _gen_opfunc(fid, EOLIAN_PROP_SET, obuf, imp, found_set, cnamel, ocnamel); - _gen_opfunc(fid, EOLIAN_PROP_GET, obuf, imp, found_get, cnamel, ocnamel); + _gen_opfunc(fid, EOLIAN_PROP_SET, ops, imp, found_set, cnamel, ocnamel); + _gen_opfunc(fid, EOLIAN_PROP_GET, ops, imp, found_get, cnamel, ocnamel); + _gen_reflop(fid, refls, cnamel, refh); break; default: - _gen_opfunc(fid, EOLIAN_METHOD, obuf, imp, found_get, cnamel, ocnamel); + _gen_opfunc(fid, EOLIAN_METHOD, ops, imp, found_get, cnamel, ocnamel); break; } @@ -907,7 +1069,18 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf) eina_strbuf_append(buf, "#endif\n\n"); } - eina_strbuf_append(buf, " return efl_class_functions_set(klass, opsp, NULL);\n"); + if (eina_strbuf_length_get(refls)) + { + eina_strbuf_append(buf, " static const Efl_Object_Property_Reflection refl_table[] = {\n"); + eina_strbuf_append_buffer(buf, refls); + eina_strbuf_append(buf, " };\n"); + eina_strbuf_append(buf, " static const Efl_Object_Property_Reflection_Ops rops = {\n"); + eina_strbuf_append(buf, " refl_table, EINA_C_ARRAY_LENGTH(refl_table)\n"); + eina_strbuf_append(buf, " };\n"); + eina_strbuf_append(buf, " ropsp = &rops;\n\n"); + } + + eina_strbuf_append(buf, " return efl_class_functions_set(klass, opsp, ropsp);\n"); eina_strbuf_free(ops); @@ -951,6 +1124,11 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf) Eina_Strbuf *lbuf = eina_strbuf_new(); + /* Eolian_Function -> Eolian_Function_Type + * maps which parts of which functions are qualified for reflection + */ + Eina_Hash *refh = eina_hash_pointer_new(NULL); + /* method section */ { Eina_Iterator *itr = eolian_class_implements_get(cl); @@ -963,21 +1141,22 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf) { case EOLIAN_PROP_GET: case EOLIAN_PROP_SET: - _gen_func(cl, fid, ftype, buf, imp, lbuf); + _gen_func(cl, fid, ftype, buf, imp, lbuf, refh); break; case EOLIAN_PROPERTY: - _gen_func(cl, fid, EOLIAN_PROP_SET, buf, imp, lbuf); - _gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, lbuf); + _gen_func(cl, fid, EOLIAN_PROP_SET, buf, imp, lbuf, refh); + _gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, lbuf, refh); break; default: - _gen_func(cl, fid, EOLIAN_METHOD, buf, imp, lbuf); + _gen_func(cl, fid, EOLIAN_METHOD, buf, imp, lbuf, refh); } } eina_iterator_free(itr); } /* class initializer - contains method defs */ - _gen_initializer(cl, buf); + _gen_initializer(cl, buf, refh); + eina_hash_free(refh); /* class description */ eina_strbuf_append(buf, "static const Efl_Class_Description _"); diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c index 431f083952..3bf9d2063b 100644 --- a/src/tests/eolian/data/class_simple_ref.c +++ b/src/tests/eolian/data/class_simple_ref.c @@ -2,10 +2,28 @@ EWAPI float BAR = 10.300000f; Eina_Bool _class_simple_a_set(Eo *obj, Evas_Simple_Data *pd, int value); + +static void +__eolian_class_simple_a_set_reflect(Eo *obj, Eina_Value val) +{ + int cval; + eina_value_int_convert(&val, &cval); + efl_canvas_object_simple_a_set(obj, cval); + eina_value_flush(&val); +} + EOAPI EFL_FUNC_BODYV(efl_canvas_object_simple_a_set, Eina_Bool, EINA_TRUE /* true */, EFL_FUNC_CALL(value), int value); int _class_simple_a_get(const Eo *obj, Evas_Simple_Data *pd); + +static Eina_Value +__eolian_class_simple_a_get_reflect(Eo *obj) +{ + int val = efl_canvas_object_simple_a_get(obj); + return eina_value_int_init(val); +} + EOAPI EFL_FUNC_BODY_CONST(efl_canvas_object_simple_a_get, int, 100); void _class_simple_b_set(Eo *obj, Evas_Simple_Data *pd); @@ -31,6 +49,8 @@ _class_simple_class_initializer(Efl_Class *klass) { const Efl_Object_Ops *opsp = NULL; + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + #ifndef CLASS_SIMPLE_EXTRA_OPS #define CLASS_SIMPLE_EXTRA_OPS #endif @@ -45,7 +65,15 @@ _class_simple_class_initializer(Efl_Class *klass) ); opsp = &ops; - return efl_class_functions_set(klass, opsp, NULL); + static const Efl_Object_Property_Reflection refl_table[] = { + {"a", __eolian_class_simple_a_set_reflect, __eolian_class_simple_a_get_reflect}, + }; + static const Efl_Object_Property_Reflection_Ops rops = { + refl_table, EINA_C_ARRAY_LENGTH(refl_table) + }; + ropsp = &rops; + + return efl_class_functions_set(klass, opsp, ropsp); } static const Efl_Class_Description _class_simple_class_desc = { diff --git a/src/tests/eolian/data/function_as_argument_ref.c b/src/tests/eolian/data/function_as_argument_ref.c index edb394ed67..0c00260e09 100644 --- a/src/tests/eolian/data/function_as_argument_ref.c +++ b/src/tests/eolian/data/function_as_argument_ref.c @@ -16,6 +16,8 @@ _function_as_argument_class_initializer(Efl_Class *klass) { const Efl_Object_Ops *opsp = NULL; + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + #ifndef FUNCTION_AS_ARGUMENT_EXTRA_OPS #define FUNCTION_AS_ARGUMENT_EXTRA_OPS #endif @@ -28,7 +30,7 @@ _function_as_argument_class_initializer(Efl_Class *klass) ); opsp = &ops; - return efl_class_functions_set(klass, opsp, NULL); + return efl_class_functions_set(klass, opsp, ropsp); } static const Efl_Class_Description _function_as_argument_class_desc = { diff --git a/src/tests/eolian/data/override_ref.c b/src/tests/eolian/data/override_ref.c index 729f37e6c4..dbbbbae263 100644 --- a/src/tests/eolian/data/override_ref.c +++ b/src/tests/eolian/data/override_ref.c @@ -61,6 +61,8 @@ _override_class_initializer(Efl_Class *klass) { const Efl_Object_Ops *opsp = NULL; + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + #ifndef OVERRIDE_EXTRA_OPS #define OVERRIDE_EXTRA_OPS #endif @@ -81,7 +83,7 @@ _override_class_initializer(Efl_Class *klass) ); opsp = &ops; - return efl_class_functions_set(klass, opsp, NULL); + return efl_class_functions_set(klass, opsp, ropsp); } static const Efl_Class_Description _override_class_desc = { diff --git a/src/tests/eolian/data/owning.eo.c b/src/tests/eolian/data/owning.eo.c index 7e504833c9..3df14c9098 100644 --- a/src/tests/eolian/data/owning.eo.c +++ b/src/tests/eolian/data/owning.eo.c @@ -45,6 +45,8 @@ _owning_class_initializer(Efl_Class *klass) { const Efl_Object_Ops *opsp = NULL; + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + #ifndef OWNING_EXTRA_OPS #define OWNING_EXTRA_OPS #endif @@ -56,7 +58,7 @@ _owning_class_initializer(Efl_Class *klass) ); opsp = &ops; - return efl_class_functions_set(klass, opsp, NULL); + return efl_class_functions_set(klass, opsp, ropsp); } static const Efl_Class_Description _owning_class_desc = { From a81a85f9dd2fe725fb9559eeaffab7d0d6d38947 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 15 Feb 2019 19:52:50 +0000 Subject: [PATCH 77/87] efl cmdline use simpler stringshare type to not be redundant --- src/lib/ecore/efl_core_command_line.eo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore/efl_core_command_line.eo b/src/lib/ecore/efl_core_command_line.eo index 7842949d96..54efbdb870 100644 --- a/src/lib/ecore/efl_core_command_line.eo +++ b/src/lib/ecore/efl_core_command_line.eo @@ -60,7 +60,7 @@ mixin @beta Efl.Core.Command_Line { return : bool; [[On success $true, $false otherwise]] } values { - array : array @owned; [[An array where every array field is an argument]] + array : array @owned; [[An array where every array field is an argument]] } } @property command_string { From b59d2e049c05073e3ab0087e3cce0b1ae6f92d12 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sat, 16 Feb 2019 22:03:08 +0000 Subject: [PATCH 78/87] examples - add examples for efl exe/thread --- src/examples/ecore/efl_exe.c | 70 +++++++++++ src/examples/ecore/efl_exe_test.sh | 9 ++ src/examples/ecore/efl_thread.c | 193 +++++++++++++++++++++++++++++ 3 files changed, 272 insertions(+) create mode 100644 src/examples/ecore/efl_exe.c create mode 100755 src/examples/ecore/efl_exe_test.sh create mode 100644 src/examples/ecore/efl_thread.c diff --git a/src/examples/ecore/efl_exe.c b/src/examples/ecore/efl_exe.c new file mode 100644 index 0000000000..e50d49588c --- /dev/null +++ b/src/examples/ecore/efl_exe.c @@ -0,0 +1,70 @@ +#define EFL_BETA_API_SUPPORT +#define EFL_EO_API_SUPPORT + +#include +#include + +#include +#include +#include + +static void _read_change(void *data EINA_UNUSED, const Efl_Event *ev); +static Eina_Value _task_exit(void *data, Eina_Value v, const Eina_Future *dead EINA_UNUSED); + +static void +_read_change(void *data EINA_UNUSED, const Efl_Event *ev) +{ + // read output from exe status changed - read what we can + Eo *obj = ev->object; + char buf[4096]; + Eina_Rw_Slice rw_slice = EINA_SLICE_ARRAY(buf); + + while (efl_io_reader_can_read_get(obj)) + { + Eina_Error err = efl_io_reader_read(obj, &rw_slice); + if (!err) + { + buf[rw_slice.len] = 0; + printf("--- READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf); + } + } +} + +static Eina_Value +_task_exit(void *data, Eina_Value v, const Eina_Future *dead EINA_UNUSED) +{ + // called when the task says it has completed and exited. + // all output to read has stopped + Eo *obj = data; + printf("--- [%p] EXITED exit_code=%i\n", obj, efl_task_exit_code_get(obj)); + efl_loop_quit(efl_provider_find(obj, EFL_LOOP_CLASS), eina_value_int_init(99)); + efl_del(obj); + return v; +} + +EAPI_MAIN void +efl_main(void *data EINA_UNUSED, const Efl_Event *ev) +{ + Eo *app = ev->object; + + const Efl_Version *v = efl_app_build_efl_version_get(app); + printf("--- EFL %i.%i.%i\n", v->major, v->minor, v->micro); + Eina_Array *args = eina_array_new(1); + eina_array_push(args, eina_stringshare_add("./efl_exe_test.sh")); + Eo *env = efl_duplicate(efl_env_self()); + efl_core_env_set(env, "BLAH", "blahvalue"); + Eo *obj = efl_add(EFL_EXE_CLASS, app, + efl_core_command_line_command_array_set(efl_added, args), + efl_exe_env_set(efl_added, env), + efl_task_flags_set(efl_added, EFL_TASK_FLAGS_USE_STDOUT | EFL_TASK_FLAGS_USE_STDIN), + efl_event_callback_add(efl_added, EFL_IO_READER_EVENT_CAN_READ_CHANGED, _read_change, NULL), + eina_future_then(efl_task_run(efl_added), _task_exit, efl_added) + ); + efl_unref(env); + + char *buf2 = "sample-input\n"; + Eina_Slice slice = { strlen(buf2), buf2 }; + Eina_Error err = efl_io_writer_write(obj, &slice, NULL); + if (!err) printf("--- WRITE [%p] [%s] ok %i bytes\n", obj, efl_core_command_line_command_get(obj), (int)slice.len); +} +EFL_MAIN() diff --git a/src/examples/ecore/efl_exe_test.sh b/src/examples/ecore/efl_exe_test.sh new file mode 100755 index 0000000000..a2f4db1e13 --- /dev/null +++ b/src/examples/ecore/efl_exe_test.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +echo "BLAH is $BLAH" +sleep 1 +read IN +sleep 1 +echo "INPUT is $IN" +sleep 1 +exit 7 diff --git a/src/examples/ecore/efl_thread.c b/src/examples/ecore/efl_thread.c new file mode 100644 index 0000000000..48a20e9ccc --- /dev/null +++ b/src/examples/ecore/efl_thread.c @@ -0,0 +1,193 @@ +#define EFL_BETA_API_SUPPORT +#define EFL_EO_API_SUPPORT + +#include +#include + +#include +#include +#include + +static void _th_read_change(void *data EINA_UNUSED, const Efl_Event *ev); +static void _th_main(void *data EINA_UNUSED, const Efl_Event *ev); +static void _read_change(void *data EINA_UNUSED, const Efl_Event *ev); +static Eina_Value _task_exit(void *data, Eina_Value v, const Eina_Future *dead EINA_UNUSED); + +//////////////////////////////////////////////////////////////////////////// +//// thread side of code +static void +_th_timeout(void *data EINA_UNUSED, const Efl_Event *ev) +{ + Eo *obj = data; + + printf("--- START EXIT [%p]\n", obj); + efl_threadio_outdata_set(obj, (void *)0x9876); + efl_loop_quit(obj, eina_value_int_init(99)); +} + +static void +_th_read_change(void *data EINA_UNUSED, const Efl_Event *ev) +{ + // read input from parent thread/loop status chnaged - read what we can + Eo *obj = ev->object; + char buf[4096]; + Eina_Rw_Slice rw_slice = EINA_SLICE_ARRAY(buf); + + while (efl_io_reader_can_read_get(obj)) + { + Eina_Error err = efl_io_reader_read(obj, &rw_slice); + if (!err) + { + buf[rw_slice.len] = 0; + printf("--- TH READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf); + + char *buf2 = "yes-im-here "; + Eina_Slice slice = { strlen(buf2), buf2 }; + Eina_Error err = efl_io_writer_write(obj, &slice, NULL); + if (!err) + { + Eina_Accessor *args_access = efl_core_command_line_command_access(obj); + printf("--- TH WRITE [%p] [%s] ok %i bytes\n", obj, efl_core_command_line_command_get(obj), (int)slice.len); + void *s = ""; + eina_accessor_data_get(args_access, 1, &s); + if (!strcmp(s, "one")) + efl_add(EFL_LOOP_TIMER_CLASS, obj, + efl_loop_timer_interval_set(efl_added, 2.0), + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _th_timeout, obj)); + else + efl_add(EFL_LOOP_TIMER_CLASS, obj, + efl_loop_timer_interval_set(efl_added, 1.0), + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _th_timeout, obj)); + eina_accessor_free(args_access); + } + } + } +} + +static void +_th_main(void *data EINA_UNUSED, const Efl_Event *ev) +{ + // the "main function" of the thread thayt gets called with arguments + // just like eflm_main for the main loop + Eo *obj = ev->object; + Eina_Accessor *args_access = efl_core_command_line_command_access(obj); + void *s = "", *ss = ""; + eina_accessor_data_get(args_access, 0, &s); + eina_accessor_data_get(args_access, 1, &ss); + printf("--- TH main %p, '%s' '%s' indata=%p\n", obj, s, ss, efl_threadio_indata_get(obj)); + efl_event_callback_add + (obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, _th_read_change, NULL); + if (!strcmp(s, "one")) + { + Eina_Array *args = eina_array_new(1); + eina_array_push(args, eina_stringshare_add("number")); + eina_array_push(args, eina_stringshare_add("one")); + Eo *obj2 = efl_add(EFL_THREAD_CLASS, obj, + efl_threadio_indata_set(efl_added, (void *)0x1234), + efl_core_command_line_command_array_set(efl_added, args), + efl_task_flags_set(efl_added, EFL_TASK_FLAGS_USE_STDOUT | EFL_TASK_FLAGS_USE_STDIN), + efl_event_callback_add(efl_added, EFL_LOOP_EVENT_ARGUMENTS, _th_main, NULL), + efl_event_callback_add(efl_added, EFL_IO_READER_EVENT_CAN_READ_CHANGED, _read_change, NULL), + eina_future_then(efl_task_run(efl_added), _task_exit, efl_added) + ); + + char *buf2 = "hello-out-there2 "; + Eina_Slice slice = { strlen(buf2), buf2 }; + Eina_Error err = efl_io_writer_write(obj2, &slice, NULL); + if (!err) printf("--- WRITE [%p] [%s] ok %i bytes\n", obj2, efl_core_command_line_command_get(obj), (int)slice.len); + } + eina_accessor_free(args_access); +} + +//////////////////////////////////////////////////////////////////////////// +//// main loop side of code +static void +_read_change(void *data EINA_UNUSED, const Efl_Event *ev) +{ + // read output from thread status chnaged - read what we can + Eo *obj = ev->object; + char buf[4096]; + Eina_Rw_Slice rw_slice = EINA_SLICE_ARRAY(buf); + + while (efl_io_reader_can_read_get(obj)) + { + Eina_Error err = efl_io_reader_read(obj, &rw_slice); + if (!err) + { + buf[rw_slice.len] = 0; + printf("--- READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf); + } + } +} + +static Eina_Value +_task_exit(void *data, Eina_Value v, const Eina_Future *dead EINA_UNUSED) +{ + // called when the task says it has completed and exited. + // all output to read has stopped + Eo *obj = data; + printf("--- [%p] EXITED exit_code=%i outdata=%p\n", obj, efl_task_exit_code_get(obj), efl_threadio_outdata_get(obj)); + efl_del(obj); + return v; +} + +//////////////////////////////////////////////////////////////////////////// +// just main loop input handling +static void +_stdin_read_change(void *data EINA_UNUSED, const Efl_Event *ev) +{ + // read output from thread status chnaged - read what we can + Eo *obj = ev->object; + char buf[4096]; + Eina_Rw_Slice rw_slice = EINA_SLICE_ARRAY(buf); + + while (efl_io_reader_can_read_get(obj)) + { + Eina_Error err = efl_io_reader_read(obj, &rw_slice); + if (!err) + { + buf[rw_slice.len] = 0; + printf("--- STDIN READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf); + } + } +} + +EAPI_MAIN void +efl_main(void *data EINA_UNUSED, const Efl_Event *ev) +{ + Eo *app = ev->object; + int threads = 2, i; + Eina_Accessor *args_access = efl_core_command_line_command_access(app); + void *s; + + const Efl_Version *v = efl_app_build_efl_version_get(app); + printf("--- EFL %i.%i.%i\n", v->major, v->minor, v->micro); + s = NULL; + eina_accessor_data_get(args_access, 2, &s); + if (s && (!strcmp(s, "-stdinwatch"))) + efl_event_callback_add(app, EFL_IO_READER_EVENT_CAN_READ_CHANGED, + _stdin_read_change, NULL); + s = NULL; + eina_accessor_data_get(args_access, 1, &s); + if (s) threads = atoi(s); + for (i = 0; i < threads; i++) + { + Eina_Array *args = eina_array_new(1); + eina_array_push(args, eina_stringshare_add("number")); + eina_array_push(args, eina_stringshare_add("one")); + Eo *obj = efl_add(EFL_THREAD_CLASS, app, + efl_threadio_indata_set(efl_added, (void *)0x5678), + efl_core_command_line_command_array_set(efl_added, args), + efl_task_flags_set(efl_added, EFL_TASK_FLAGS_USE_STDOUT | EFL_TASK_FLAGS_USE_STDIN), + efl_event_callback_add(efl_added, EFL_LOOP_EVENT_ARGUMENTS, _th_main, NULL), + efl_event_callback_add(efl_added, EFL_IO_READER_EVENT_CAN_READ_CHANGED, _read_change, NULL), + eina_future_then(efl_task_run(efl_added), _task_exit, efl_added) + ); + + char *buf2 = "hello-out-there "; + Eina_Slice slice = { strlen(buf2), buf2 }; + Eina_Error err = efl_io_writer_write(obj, &slice, NULL); + if (!err) printf("--- WRITE [%p] [%s] ok %i bytes\n", obj, efl_core_command_line_command_get(obj), (int)slice.len); + } +} +EFL_MAIN() From 9674dadbdad9f03afe802733e119444e38af3096 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Sun, 17 Feb 2019 02:11:02 +0100 Subject: [PATCH 79/87] eolian: restrict usage of ptr() to directly used types That means, it can only now be used on parameters and struct fields, never aliased within typedefs. This simplifies the logic so that we don't have ptr metadata buried several layers deep. --- src/lib/eolian/eo_parser.c | 40 ++++++++++++++++-------------- src/tests/eolian/data/free_func.eo | 8 ------ src/tests/eolian/eolian_parsing.c | 15 ----------- 3 files changed, 21 insertions(+), 42 deletions(-) diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 4346b3432d..d7e5abb636 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -404,14 +404,14 @@ parse_expr(Eo_Lexer *ls) return parse_expr_bin(ls, 1); } -static Eolian_Type *parse_type_void(Eo_Lexer *ls); +static Eolian_Type *parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr); static Eolian_Type * -parse_type(Eo_Lexer *ls) +parse_type(Eo_Lexer *ls, Eina_Bool allow_ptr) { Eolian_Type *ret; eo_lexer_context_push(ls); - ret = parse_type_void(ls); + ret = parse_type_void(ls, allow_ptr); if (ret->type == EOLIAN_TYPE_VOID) { eo_lexer_context_restore(ls); @@ -464,7 +464,7 @@ parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, eolian_object_ref(&fdef->base); eo_lexer_get(ls); check_next(ls, ':'); - tp = parse_type(ls); + tp = parse_type(ls, EINA_TRUE); FILL_BASE(fdef->base, ls, fline, fcol, STRUCT_FIELD); fdef->type = eo_lexer_type_release(ls, tp); fdef->base.name = eina_stringshare_ref(fname); @@ -628,7 +628,7 @@ parse_struct_attrs(Eo_Lexer *ls, Eina_Bool is_enum, Eina_Bool *is_extern, } static Eolian_Type * -parse_type_void(Eo_Lexer *ls) +parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr) { Eolian_Type *def; Eina_Strbuf *buf; @@ -642,7 +642,7 @@ parse_type_void(Eo_Lexer *ls) pline = ls->line_number; pcol = ls->column; check_next(ls, '('); - def = parse_type_void(ls); + def = parse_type_void(ls, allow_ptr); FILL_BASE(def->base, ls, line, col, TYPE); def->is_const = EINA_TRUE; check_match(ls, ')', '(', pline, pcol); @@ -650,12 +650,14 @@ parse_type_void(Eo_Lexer *ls) } case KW_ptr: { + if (!allow_ptr) + break; int pline, pcol; eo_lexer_get(ls); pline = ls->line_number; pcol = ls->column; check_next(ls, '('); - def = parse_type_void(ls); + def = parse_type_void(ls, EINA_FALSE); FILL_BASE(def->base, ls, line, col, TYPE); def->is_ptr = EINA_TRUE; check_match(ls, ')', '(', pline, pcol); @@ -668,7 +670,7 @@ parse_type_void(Eo_Lexer *ls) pline = ls->line_number; pcol = ls->column; check_next(ls, '('); - def = parse_type_void(ls); + def = parse_type_void(ls, allow_ptr); FILL_BASE(def->base, ls, line, col, TYPE); def->legacy = EINA_TRUE; check_match(ls, ')', '(', pline, pcol); @@ -681,7 +683,7 @@ parse_type_void(Eo_Lexer *ls) pline = ls->line_number; pcolumn = ls->column; check_next(ls, '('); - def = parse_type_void(ls); + def = parse_type_void(ls, allow_ptr); check_next(ls, ','); check(ls, TOK_VALUE); def->freefunc = eina_stringshare_ref(ls->t.value.s); @@ -721,16 +723,16 @@ parse_type_void(Eo_Lexer *ls) int bline = ls->line_number, bcol = ls->column; check_next(ls, '<'); if (tpid == KW_future) - def->base_type = eo_lexer_type_release(ls, parse_type_void(ls)); + def->base_type = eo_lexer_type_release(ls, parse_type_void(ls, EINA_TRUE)); else - def->base_type = eo_lexer_type_release(ls, parse_type(ls)); + def->base_type = eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE)); if ((def->base_type->owned = (ls->t.kw == KW_at_owned))) eo_lexer_get(ls); if (tpid == KW_hash) { check_next(ls, ','); def->base_type->next_type = - eo_lexer_type_release(ls, parse_type(ls)); + eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE)); if ((def->base_type->next_type->owned = (ls->t.kw == KW_at_owned))) eo_lexer_get(ls); } @@ -802,7 +804,7 @@ parse_typedef(Eo_Lexer *ls) } eo_lexer_context_pop(ls); check_next(ls, ':'); - def->base_type = eo_lexer_type_release(ls, parse_type(ls)); + def->base_type = eo_lexer_type_release(ls, parse_type(ls, EINA_FALSE)); check_next(ls, ';'); FILL_DOC(ls, def, doc); eo_lexer_dtor_pop(ls); @@ -835,7 +837,7 @@ parse_variable(Eo_Lexer *ls, Eina_Bool global) } eo_lexer_context_pop(ls); check_next(ls, ':'); - def->base_type = eo_lexer_type_release(ls, parse_type(ls)); + def->base_type = eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE)); /* constants are required to have a value */ if (!global) check(ls, '='); @@ -870,9 +872,9 @@ parse_return(Eo_Lexer *ls, Eo_Ret_Def *ret, Eina_Bool allow_void, eo_lexer_get(ls); check_next(ls, ':'); if (allow_void) - ret->type = parse_type_void(ls); + ret->type = parse_type_void(ls, EINA_TRUE); else - ret->type = parse_type(ls); + ret->type = parse_type(ls, EINA_TRUE); ret->doc = NULL; ret->default_ret_val = NULL; ret->warn_unused = EINA_FALSE; @@ -940,9 +942,9 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout, eo_lexer_get(ls); check_next(ls, ':'); if (par->param_dir == EOLIAN_OUT_PARAM || par->param_dir == EOLIAN_INOUT_PARAM) - par->type = eo_lexer_type_release(ls, parse_type_void(ls)); + par->type = eo_lexer_type_release(ls, parse_type_void(ls, EINA_TRUE)); else - par->type = eo_lexer_type_release(ls, parse_type(ls)); + par->type = eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE)); if ((is_vals || (par->param_dir == EOLIAN_OUT_PARAM)) && (ls->t.token == '(')) { int line = ls->line_number, col = ls->column; @@ -1775,7 +1777,7 @@ parse_event(Eo_Lexer *ls) } end: check_next(ls, ':'); - ev->type = eo_lexer_type_release(ls, parse_type_void(ls)); + ev->type = eo_lexer_type_release(ls, parse_type_void(ls, EINA_TRUE)); ev->type->owned = has_owned; check(ls, ';'); eo_lexer_get(ls); diff --git a/src/tests/eolian/data/free_func.eo b/src/tests/eolian/data/free_func.eo index 6a3228ba81..55cc05e2b6 100644 --- a/src/tests/eolian/data/free_func.eo +++ b/src/tests/eolian/data/free_func.eo @@ -6,18 +6,10 @@ struct @free(test_free) Named2 { field: int; } -/* typedef */ -type Typedef1: int; -type @free(def_free) Typedef2: int; - /* opaque */ struct Opaque1; struct @free(opaque_free) Opaque2; -/* pointers */ -type Pointer1: ptr(char); -type Pointer2: free(ptr(char), ptr_free); - class Free_Func { methods { foo { diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index b029a4ddad..616c920440 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -981,7 +981,6 @@ EFL_START_TEST(eolian_free_func) { const Eolian_Class *class; const Eolian_Typedecl *tdl; - const Eolian_Type *type; const Eolian_Unit *unit; Eolian_State *eos = eolian_state_new(); @@ -1000,26 +999,12 @@ EFL_START_TEST(eolian_free_func) fail_if(!(tdl = eolian_unit_struct_by_name_get(unit, "Named2"))); fail_if(strcmp(eolian_typedecl_free_func_get(tdl), "test_free")); - /* typedef */ - fail_if(!(tdl = eolian_unit_alias_by_name_get(unit, "Typedef1"))); - fail_if(eolian_typedecl_free_func_get(tdl)); - fail_if(!(tdl = eolian_unit_alias_by_name_get(unit, "Typedef2"))); - fail_if(strcmp(eolian_typedecl_free_func_get(tdl), "def_free")); - /* opaque struct */ fail_if(!(tdl = eolian_unit_struct_by_name_get(unit, "Opaque1"))); fail_if(eolian_typedecl_free_func_get(tdl)); fail_if(!(tdl = eolian_unit_struct_by_name_get(unit, "Opaque2"))); fail_if(strcmp(eolian_typedecl_free_func_get(tdl), "opaque_free")); - /* pointer */ - fail_if(!(tdl = eolian_unit_alias_by_name_get(unit, "Pointer1"))); - fail_if(!(type = eolian_typedecl_base_type_get(tdl))); - fail_if(eolian_type_free_func_get(type)); - fail_if(!(tdl = eolian_unit_alias_by_name_get(unit, "Pointer2"))); - fail_if(!(type = eolian_typedecl_base_type_get(tdl))); - fail_if(strcmp(eolian_type_free_func_get(type), "ptr_free")); - eolian_state_free(eos); } EFL_END_TEST From dc563769900310241962c3e920559a1074ea5d2f Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Sun, 17 Feb 2019 02:20:35 +0100 Subject: [PATCH 80/87] eolian: disallow freefuncs on typedefs Now the only kind of typedecl that is allowed a freefunc is a struct. This simplifies the overall logic and makes freefuncs a bit more predictable. --- src/lib/eolian/eo_parser.c | 76 ++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index d7e5abb636..f28d8ae86c 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -593,40 +593,6 @@ parse_enum(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, return def; } -static void -parse_struct_attrs(Eo_Lexer *ls, Eina_Bool is_enum, Eina_Bool *is_extern, - const char **freefunc) -{ - Eina_Bool has_extern = EINA_FALSE, has_free = EINA_FALSE; - *freefunc = NULL; - *is_extern = EINA_FALSE; - for (;;) switch (ls->t.kw) - { - case KW_at_extern: - CASE_LOCK(ls, extern, "@extern qualifier") - eo_lexer_get(ls); - *is_extern = EINA_TRUE; - break; - case KW_at_free: - { - CASE_LOCK(ls, free, "@free qualifier") - if (is_enum) - eo_lexer_syntax_error(ls, "enums cannot have @free"); - eo_lexer_get(ls); - int pline = ls->line_number, pcol = ls->column; - check_next(ls, '('); - check(ls, TOK_VALUE); - *freefunc = eina_stringshare_add(ls->t.value.s); - eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_stringshare_del), (void *)*freefunc); - eo_lexer_get(ls); - check_match(ls, ')', '(', pline, pcol); - break; - } - default: - return; - } -} - static Eolian_Type * parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr) { @@ -778,18 +744,14 @@ static Eolian_Typedecl * parse_typedef(Eo_Lexer *ls) { Eolian_Typedecl *def = eo_lexer_typedecl_new(ls); - Eina_Bool has_extern; - const char *freefunc; Eina_Strbuf *buf; eo_lexer_get(ls); - parse_struct_attrs(ls, EINA_FALSE, &has_extern, &freefunc); - if (freefunc) + if (ls->t.kw == KW_at_extern) { - def->freefunc = eina_stringshare_ref(freefunc); - eo_lexer_dtor_pop(ls); + def->is_extern = EINA_TRUE; + eo_lexer_get(ls); } def->type = EOLIAN_TYPEDECL_ALIAS; - def->is_extern = has_extern; buf = eina_strbuf_new(); eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf); eo_lexer_context_push(ls); @@ -2246,11 +2208,37 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot) Eina_Bool is_enum = (ls->t.kw == KW_enum); const char *name; int line, col; - Eina_Bool has_extern; - const char *freefunc; + const char *freefunc = NULL; Eina_Strbuf *buf; eo_lexer_get(ls); - parse_struct_attrs(ls, is_enum, &has_extern, &freefunc); + Eina_Bool has_extern = EINA_FALSE, has_free = EINA_FALSE; + for (;;) switch (ls->t.kw) + { + case KW_at_extern: + CASE_LOCK(ls, extern, "@extern qualifier") + eo_lexer_get(ls); + break; + case KW_at_free: + { + if (is_enum) + goto postparams; + CASE_LOCK(ls, free, "@free qualifier") + if (is_enum) + eo_lexer_syntax_error(ls, "enums cannot have @free"); + eo_lexer_get(ls); + int pline = ls->line_number, pcol = ls->column; + check_next(ls, '('); + check(ls, TOK_VALUE); + freefunc = eina_stringshare_add(ls->t.value.s); + eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_stringshare_del), (void *)freefunc); + eo_lexer_get(ls); + check_match(ls, ')', '(', pline, pcol); + break; + } + default: + goto postparams; + } +postparams: buf = eina_strbuf_new(); eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf); eo_lexer_context_push(ls); From 3967e1f3543435cb95e0208330845c6b7995d876 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 18 Feb 2019 14:35:27 +0900 Subject: [PATCH 81/87] evas main: check for OOM when calloc(). --- src/lib/evas/canvas/evas_object_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index aa0ac8359a..fa44327564 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -2674,6 +2674,7 @@ _efl_canvas_object_event_animation_set(Eo *eo_obj, if (!animation) return; event_anim = calloc(1, sizeof(Event_Animation)); + EINA_SAFETY_ON_NULL_RETURN(event_anim); //Set callback for Hide event if (desc == EFL_GFX_ENTITY_EVENT_HIDE) From a8d5f275c780692df8a63897601a0c05e48678ac Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 18 Feb 2019 14:47:14 +0900 Subject: [PATCH 82/87] evas vg: use strncpy() instead of strcpy() for better security. --- src/lib/evas/vg/evas_vg_cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/vg/evas_vg_cache.c b/src/lib/evas/vg/evas_vg_cache.c index ec5fc6b0be..9833ef65ae 100644 --- a/src/lib/evas/vg/evas_vg_cache.c +++ b/src/lib/evas/vg/evas_vg_cache.c @@ -181,8 +181,9 @@ _vg_file_save(Vg_File_Data *vfd, const char *file, const char *key, const char * char *p, *pp; char *tflags; - tflags = alloca(strlen(flags) + 1); - strcpy(tflags, flags); + int len = strlen(flags); + tflags = alloca(len) + 1; + strncpy(tflags, flags, len); p = tflags; while (p) { From 63e11e1b18f0af3c491f3d793fc683e2eb7e9f08 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 18 Feb 2019 14:53:09 +0900 Subject: [PATCH 83/87] evas vg: avoid integral division not to loss precision. --- src/static_libs/vg_common/vg_common_svg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index eba876e160..703ebde7d8 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -608,10 +608,10 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F efl_gfx_path_bounds_get(grad_obj, &grad_geom); - double cy = (grad_geom.h / 2) + grad_geom.y; - double cy_scaled = (grad_geom.h / 2) * scale_reversed_Y; - double cx = grad_geom.w / 2 + grad_geom.x; - double cx_scaled = (grad_geom.w / 2) * scale_reversed_X; + double cy = ((double) grad_geom.h) * 0.5 + grad_geom.y; + double cy_scaled = (((double) grad_geom.h) * 0.5) * scale_reversed_Y; + double cx = ((double) grad_geom.w) * 0.5 + grad_geom.x; + double cx_scaled = (((double) grad_geom.w) * 0.5) * scale_reversed_X; /* matrix tranformation of gradient figure: * 0. we remember size of gradient and it's center point From 1442690680d8d2b0e93d432b32a71db3c161e22d Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 18 Feb 2019 15:02:47 +0900 Subject: [PATCH 84/87] evas vg: check for OOM when calloc() --- src/static_libs/vg_common/vg_common_svg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index 703ebde7d8..c17b0246bb 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -884,6 +884,7 @@ _create_gradient_node(Efl_VG *vg) unsigned int count = 0, i; Svg_Style_Gradient *grad = calloc(1, sizeof(Svg_Style_Gradient)); + EINA_SAFETY_ON_NULL_RETURN_VAL(grad, NULL); grad->spread = evas_vg_gradient_spread_get(vg); evas_vg_gradient_stop_get(vg, &stops, &count); From a921040743aece335cd8040d3f28084c6932958c Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 18 Feb 2019 15:07:01 +0900 Subject: [PATCH 85/87] evas vg: check for OOM when calloc() --- src/static_libs/vg_common/vg_common_svg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index c17b0246bb..396c4dba17 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -823,6 +823,8 @@ vg_common_svg_create_vg_node(Svg_Node *node) if (!node || (node->type != SVG_NODE_DOC)) return NULL; vg_data = calloc(1, sizeof(Vg_File_Data)); + EINA_SAFETY_ON_NULL_RETURN_VAL(vg_data, NULL); + vg_data->view_box.x = node->node.doc.vx; vg_data->view_box.y = node->node.doc.vy; vg_data->view_box.w = node->node.doc.vw; @@ -838,6 +840,7 @@ static Svg_Node * _create_node(Svg_Node *parent, Svg_Node_Type type) { Svg_Node *node = calloc(1, sizeof(Svg_Node)); + EINA_SAFETY_ON_NULL_RETURN_VAL(node, NULL); // default fill property node->style = calloc(1, sizeof(Svg_Style_Property)); From 0a47a0ef3274b37508f0ddc31d0153d4a244d1f2 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 18 Feb 2019 15:09:44 +0900 Subject: [PATCH 86/87] evas vg: check for OOM when calloc() --- src/static_libs/vg_common/vg_common_svg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index 396c4dba17..9c69b14b89 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -844,6 +844,11 @@ _create_node(Svg_Node *parent, Svg_Node_Type type) // default fill property node->style = calloc(1, sizeof(Svg_Style_Property)); + if (!node->style) + { + free(node); + EINA_SAFETY_ON_NULL_RETURN_VAL(node->style, NULL); + } // update the default value of stroke and fill //https://www.w3.org/TR/SVGTiny12/painting.html#SpecifyingPaint From 9a5dacdb3684c7b0e4bc939ef1920f69e82aeaa2 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 18 Feb 2019 15:17:41 +0900 Subject: [PATCH 87/87] evas vg: check for OOM when calloc() --- src/static_libs/vg_common/vg_common_svg.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index 9c69b14b89..6b18a0e5b3 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -899,6 +899,7 @@ _create_gradient_node(Efl_VG *vg) for (i = 0; i < count; i++) { new_stop = calloc(1, sizeof(Efl_Gfx_Gradient_Stop)); + if (!new_stop) goto oom_error; memcpy(new_stop, stops, sizeof(Efl_Gfx_Gradient_Stop)); grad->stops = eina_list_append(grad->stops, new_stop); stops++; @@ -907,6 +908,7 @@ _create_gradient_node(Efl_VG *vg) { grad->type = SVG_LINEAR_GRADIENT; grad->linear = calloc(1, sizeof(Svg_Linear_Gradient)); + if (!grad->linear) goto oom_error; evas_vg_gradient_linear_start_get(vg, &grad->linear->x1, &grad->linear->y1); evas_vg_gradient_linear_end_get(vg, &grad->linear->x2, &grad->linear->y2); } @@ -914,12 +916,18 @@ _create_gradient_node(Efl_VG *vg) { grad->type = SVG_RADIAL_GRADIENT; grad->radial = calloc(1, sizeof(Svg_Radial_Gradient)); + if (!grad->radial) goto oom_error; evas_vg_gradient_radial_center_get(vg, &grad->radial->cx, &grad->radial->cy); evas_vg_gradient_radial_focal_get(vg, &grad->radial->fx, &grad->radial->fy); grad->radial->r = evas_vg_gradient_radial_radius_get(vg); } return grad; + +oom_error: + ERR("OOM: Failed calloc()"); + return grad; + } static void