Commit Graph

12 Commits

Author SHA1 Message Date
Cedric Bail 892c26f906 efl: simplify logic for widget created by factory.
In an attempt to make things more complex than they should have been,
I tried to change the inheritance tree on the fly and assume widget would
rely on autodeleting its children. This is way more complex of a solution
than to let the View actually release all the child manually and just set
the window as the default parent.h

Co-authored-by: Marcel Hollerbach <mail@marcel-hollerbach.de>

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9953
2019-09-24 09:18:49 +02:00
Marcel Hollerbach 759ac54e7f efl: split Efl.Ui.Factory.create stage into constructing and building
constructing is called during construction time, building is called
after finalize. This is usefull for theme related properties that can
only be set after the theme is applied, which happens during finalize.
Being event allow the user of the factory to add more initialization
without needing to implement any new class.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9952
2019-09-24 09:18:47 +02:00
Jaehyun Cho 98c2a75bda elementary: unref objects when memory allocation fails in factory
The objects referenced are unreferenced when memory allocation fails in
elementary factory.

Differential Revision: https://phab.enlightenment.org/D9968
2019-09-23 14:15:41 +02:00
Chris Michael 21c7f95d08 efl_ui_caching_factory: Fix resource leaks
Small patch to fix resource leaks pointed out by Coverity

Fixes Coverity CID1404762
2019-09-17 09:23:46 -04:00
Cedric BAIL 00d58640e5 efl: mark Efl.Ui.Factory.create a protected method.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9606
2019-08-21 11:18:46 -07:00
Cedric BAIL f6cdbc2d43 elementary: allow Efl.Ui.Factory to have a chance to call constructor function.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9599
2019-08-21 11:18:36 -07:00
Cedric BAIL 0248d504b3 elementary: switch Efl.Ui.Factory API to a batch API and update all class using it.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Differential Revision: https://phab.enlightenment.org/D9579
2019-08-21 11:18:34 -07:00
Cedric BAIL d0b70ef4e7 efl: Property_Bind should actually tell us if it succeeded or failed by returning an Eina.Error.
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7939
2019-03-07 09:58:54 -08:00
SangHyeon Jade Lee 053146598c 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 <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7529
2019-02-11 11:06:13 -08:00
Cedric BAIL c910679917 elementary: update Efl.Ui.Caching_Factory to rely on Efl.Ui.Widget_Factory for Efl.Ui.Widget.
I am not sure we really need Efl.Ui.Caching_Factory after this, but in case we want a Caching_Factory
for non Efl.Ui.Widget, this is supported by this patch (And is the reason why most of the complexity).
The benefit from inheriting from Efl.Ui.Widget_Factory allow to get the style of an Efl.Ui.Widget
defined by an Efl.Model properly done at creation time.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Reviewed-by: Larry Lira <larry@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7705
2019-01-30 11:29:31 -08:00
Cedric BAIL f5172faebb efl: remove warning due to unused variable/parameters.
Reviewers: #committers, felipealmeida, zmike

Reviewed By: #committers, felipealmeida, zmike

Subscribers: zmike, YOhoho, Hermet, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7554
2019-01-09 14:54:54 -05:00
Cedric BAIL 4fe4f76b8c elementary: add a factory that handle caching for you.
This factory handle caching of one type of object and automatically empty the cache
when the application goes into pause.

Creating object is costly and time consuming, keeping a few on hands for when you next will need them help a lot.
This is what this factory caching infrastructure provide. It will create the object from the class defined on it,
set the parent and the model as needed for all items a Factory create. The View has to release the Item using the
release function of the Factory interface for all of this to work properly.

This is copying what Elm_Genlist was doing for you in the background and bring Efl interface to parity.

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7443
2019-01-09 11:02:11 -08:00