Commit Graph

88 Commits

Author SHA1 Message Date
Mike Blumenkrantz 43ef483801 efl.ui.widget: remove widget_top property
Summary:
this can be mimicked with efl_provider_find as the top widget should
always be efl.ui.win

ref T7553
Depends on D8063

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7553

Differential Revision: https://phab.enlightenment.org/D8064
2019-03-04 13:36:47 -05:00
Mike Blumenkrantz 644b771fe4 efl.ui: Efl.Ui.Theme_Apply_Result -> Efl.Ui.Theme_Apply_Error
Summary:
this swaps the values of "no error" and "error" in order to maintain
consistency with the rest of efl where the zero value means "no error"
Depends on D8060

Reviewers: cedric

Reviewed By: cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8063
2019-03-04 13:36:41 -05:00
Mike Blumenkrantz da16711974 efl.ui.layout: fix theme.get implementation (+unit test)
Summary: ref T7512

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7512

Differential Revision: https://phab.enlightenment.org/D8059
2019-03-04 13:36:25 -05:00
Cedric BAIL 0091e8b5b6 elementary: Efl.Ui.Layout should use the new API efl_content to control object lifecycle property.
efl_content leave the caller in charge of the lifecycle of the object. This means we can
rely on the factory to actually do something with the object before it is destroyed by anyone.

Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D8091
2019-03-01 17:10:43 -08:00
Mike Blumenkrantz 649433560b efl_ui_layout: check part existence in text_set
Summary: fix T6931

Reviewers: bu5hm4n, cedric, segfaultxavi

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T6931

Differential Revision: https://phab.enlightenment.org/D7888
2019-02-27 16:03:50 -05:00
Yeongjong Lee 4628021fe5 efl_container: remove content_remove
Most of classes implements Efl.Container.content_remove are just calling "unpack"
except of "Efl.Canvas.Layout" and "Efl.Ui.Layout".
This patch remove the asymmetrical API and add content_remove API of
"Efl.Canvas.Layout" and "Efl.Ui.Layout" that child can be remove without efl_part
APIs.

ref T7576

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7913
2019-02-27 21:20:33 +01:00
Mike Blumenkrantz 0b152734ba efl_ui_widget: redo disable handling
before the disable property was a bit weird. Setting something to
disabled=true will disable all children of the widget that is changed.
However, only the update function of the children will get the false flag,
not the flag itself. Which means, to query the real disabled state, we
need to walk up the parent relations.

With this patch, every change to disabled will go through the disabled
property, which mean, a implementor can just overwrite the disabled
property, and adjust its internal state there. Just be carefull, a set
to disabled=true still might result in disabled=false. This makes the
function on_disable_update unneccesary. Which also cleans up the
Efl.Ui.Widget class.

ref T7553

Depends on D8016

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8017
2019-02-27 20:19:23 +01:00
Mike Blumenkrantz b3327c761e efl_ui_widget: move orientation to the specific users of this widget
The new api is moved into either Efl.Ui.Win or Efl.Ui.Layout.
Only Efl.Ui.Layout is interested in the rotation, as this is the only
widget that can actaully apply it to the theme. The value itself however
is unique to the window, which means, the window is the only point where
the rotation is stored, and this is the point, where rotation changes
are brought to the layouts.

ref T7553

Depends on D8014

Differential Revision: https://phab.enlightenment.org/D8015
2019-02-27 20:19:07 +01:00
Mike Blumenkrantz 335936e79d efl.ui.layout: split into abstract and real class
Summary:
most widgets inherit from layout to provide implementations for common
functionality such as content/text/theme get+set.

one of the things that layout also brings into its inheritance hierarchy
is efl.file and implementations for its methods. this becomes a problem
when the widget which inherits layout also wants to provide implementations
for efl.file methods (e.g., entry, which uses efl.file to load text files)
as it will result in calling all of the efl.file implementations up the
chain.

in the case of entry, this could result in the 'file' property eventually being
set to the current theme file in use by the entry's layout object, and then the
entry will attempt to autosave its content to the default theme file when it is
destroyed, corrupting the theme file and breaking everything

to solve this:

* efl.ui.layout remains an instantiable class which implements efl.file
* efl.ui.layout_base is the abstract class which provides all the methods of layout
  but should be inherited by all widgets which want to implement efl.file functionality

Depends on D8018

Reviewers: bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8032
2019-02-27 13:17:16 -05:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Mike Blumenkrantz 41f0ebb52b api: remove efl.ui.cursor interface
this existed only to provide the methods for Efl.Ui.Layout_Part and fill
in implementation for some legacy functions which should probably not be
supported going forward

the corresponding methods have been merged into efl_ui_widget and the
legacy functions no longer use eolian-generated implementations

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7899
2019-02-21 21:08:26 +01: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 f484ca0951 edje: migrate Eo API to use Eo callback instead of opaque type.
Summary: Depends on D7869

Reviewers: zmike, q66, segfaultxavi, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7671

Differential Revision: https://phab.enlightenment.org/D7870
2019-02-06 13:48:43 -05:00
Marcel Hollerbach 993c843291 efl_ui_layout: use the correct object
the obejct used in D7740 have been false.
Here comes the fix + a few tests.

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7746
2019-01-24 10:24:50 +01:00
Mike Blumenkrantz 70827b4d7e efl_ui_layout: implement remaining efl.layout.calc methods
this is just proxying the method calls onto the inner edje object

ref T5719

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7740
2019-01-24 08:24:32 +01:00
Cedric BAIL 88dbd866e0 elementary: rename Efl.Ui.Translatable -> Efl.Ui.L10n
If we are to choose Efl.Ui.I18n for the internationalization support, the localization API
should be named accordingly L10n.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7507
2019-01-02 11:03:53 -08:00
Cedric BAIL e74578c7d3 elementary: switch to the new efl_future_then syntax.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7448
2018-12-20 10:44:45 -08:00
Cedric BAIL 50d675d6c1 elementary: make all view generate an event when the item is created.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7447
2018-12-20 10:44:44 -08:00
Cedric BAIL 4d6f20d714 elementary: make Efl.Ui.Factory.create asynchronous.
Reviewers: felipealmeida, SanghyeonLee, vitor.sousa, bu5hm4n, segfaultxavi

Reviewed By: felipealmeida, vitor.sousa, segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7472

Differential Revision: https://phab.enlightenment.org/D7332
2018-12-07 11:47:21 +01:00
Larry Lira 6b0c85cb0d Efl.Ui.List.View: fixed MVVM life-cycle
Fix bugs on Views and Model related with null items and proper ownership and
life-cycle of components.

Configure default theme for default factory on finalize.
2018-11-30 16:56:47 -02:00
Vitor Sousa 0398b8f19c elementary: rework Efl.Ui.Layout boolean signal-connection to Models
Add new feature to specify signal connection to boolean properties of Models.
This also fix some '%v' substitution problems.

Parsing EINA_VALUE_TYPE_BOOL as boolean in Efl.Ui.Layout signal updates from
Models (instead of EINA_VALUE_TYPE_UCHAR). UCHAR no longer has special handling
and falls to the general result of eina_value_to_string() as other types do.

Use EINA_VALUE_TYPE_BOOL instead of EINA_VALUE_TYPE_UCHAR to signal selection on
click events to the Model.

Update examples to make usage of the new property connection feature in order to
model selection of items on Views.
2018-11-30 16:56:47 -02:00
Jaehyun Cho 4f9c8d524c efl_ui_theme: Introduce Efl.Ui.Theme class
Summary:
Efl.Ui.Theme class is required to support language bindings.
Efl.Ui.Theme works based on current elm_theme features.

This patch fixes T7357.

Reviewers: segfaultxavi, cedric, lauromoura, woohyun, zmike, SanghyeonLee

Reviewed By: segfaultxavi, SanghyeonLee

Subscribers: SanghyeonLee, herdsman, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7357

Differential Revision: https://phab.enlightenment.org/D7244
2018-11-20 13:56:37 +09:00
Jaehyun Cho 2d460e52e4 elementary: remove Efl.Ui.Layout namespace
Summary:
Efl.Ui.Layout namespace is removed to keep consistency with other
widgets.
Consequently, "Efl.Ui.Layout.Object" is renamed to "Efl.Ui.Layout" and
"Efl.Ui.Layout." is renamed to "Efl.Ui.Layout_".

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers, SanghyeonLee, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7291
2018-11-16 11:11:13 +01:00
Xavi Artigas 6a98b84cd7 Efl.Ui.Layout.Object (from Efl.Ui.Layout)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:54 -07:00
Xavi Artigas 6b5ac687c1 Efl.Text_* (from Efl.Text.*)
Including:
Efl.Text.Cursor_* (from Efl.Text.Cursor.Cursor_*)
Efl.Text.Font_* (from Efl.Text.Font.*)
Efl.Text.Format_* (from Efl.Text.Format.*)
Efl.Text.Style_* (from Efl.Text.Style.*)
Efl.Ui.Text_* (from Efl.Ui.Text.*)

Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:49 -07:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Xavi Artigas 9dcc31ed4a Efl.Access.Object (from Efl.Access)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:24 -07:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Mike Blumenkrantz 6b9a35d763 Efl.Ui.Model.Factory.Connect: remove this entirely
merge 'connect' method into Efl.Ui.Factory class as 'model_connect'
2018-02-15 13:11:00 -05:00
Sungtaek Hong 73f8b3b78f efl.ui.layout: change signal name for icon/text
Summary:
when set/unset icon and text,
signal "elm,state,[part],visible/hidden" is emitted.
This is wrong because visible/hidden should be handled by
Efl.Gfx.visible, not Efl.Text nor Efl.Content.
This should be changed into elm,state,[part],set/unset"
All relating edc should be fixed.

Test Plan: run elementary_test->button, Efl.Ui.Button

Reviewers: jpeg, cedric, woohyun, Jaehyun_Cho

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-02-14 12:47:40 -08:00
Daniel Hirt a89c9e037a Ui layout: fix another text retrieval line of code
This is a follow-up to a44ae48df811ff2bd085da86db1688c0f387efc4.Need to
undo the markup_get call, so that the correct code path
(_efl_ui_layout_text_set) is used. Legacy checks are in that code path.

ref T6642
2018-02-01 19:24:44 +02:00
Daniel Hirt a44ae48df8 Ui layout: fix latest attempt to fix markup retreival
Commits c07a40c745 and
429e19563d tried to fix markup retrieval by
creating a different code path for the setter and getter. However, legacy code
paths needs to be taken into consideration.
This commit fixes legacy widgets (like guide text that did not show any text
        in the entry at the top of 'elementary_test').

ref T6642
2018-02-01 13:48:03 +02:00
Shinwoo Kim 429e19563d elm: make elm_layout_text_set use efl_text_markup_set
The elm_layout_text_get is using efl_text_markup_get by following commit.

    commit c07a40c745
    elm: make elm_object_text_get return markup info as well.

    This commit solves following issue

    https://phab.enlightenment.org/T6642

    If I set object text as below
    elm_object_text_set(btn, "Some<br>text");
    then elm_object_text_get(btn) returns "Some text" not "Some<br>text".

So using efl_text_markup_set makes sense.
2018-01-29 12:25:18 +09:00
Shinwoo Kim c07a40c745 elm: make elm_object_text_get return markup info as well.
This commit solves following issue

https://phab.enlightenment.org/T6642

If I set object text as below
elm_object_text_set(btn, "Some<br>text");
then elm_object_text_get(btn) returns "Some text" not "Some<br>text".
2018-01-25 22:10:32 +09:00
Sungtaek Hong cb25699dac efl_ui_legacy: add new interface to indicate legacy widget
Summary:
For now, how to check whether a widget is legacy or not
is to check flags in private data or static flag, which is set
during elm_legacy_add.
If Efl.Ui.Legacy interface is added, it can be easilly checked
by efl_isa(obj, EFL_UI_LEGACY_INTERFACE)

Reviewers: woohyun, jpeg, cedric, Jaehyun_Cho

Subscribers: conr2d, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5748
2018-01-24 18:14:26 +09:00
Carsten Haitzler d309687865 fix break of hoversels
this fixes T6627
2018-01-21 19:26:38 +09:00
Jean-Philippe Andre 20570f74d3 widget: Move on_focus_update to Focus.Object
Following @taxi2se's recommendation. This is indeed a focus method, and
Widget already inherits from Focus.Object.

Ping @bu5hm4n who probably wants to adapt this further.

Ref T5363
2018-01-19 17:30:04 +09:00
Jean-Philippe Andre c35f257bf2 widget: Remove item from on_focus_update
It's legacy stuff, and always NULL.
2018-01-19 17:17:01 +09:00
Jean-Philippe Andre 001fa5af11 edje: add invalid part handler 2018-01-16 19:35:54 +09:00
Jean-Philippe Andre a92186be6a ecore/edje/elm: Fix a few WRN from calls to NULL
This fixes some of the warnings generated by calling functions on NULL
objects. One of the main remaining points is to avoid unwanted warnings
on non-existing parts.

Ref T6326
2018-01-16 18:37:05 +09:00
Jean-Philippe Andre 9e2f2970b8 edje: Add property "part_exist"
This allows to safely verify if a part exists, without triggering any
potential call to NULL object, or even requiring the efl_part() handle
to be created.

This is perfectly equivalent to edje_object_part_exists(), but
implemented by both edje object and elm layout.
2018-01-16 18:37:04 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
SangHyeon Lee 0f16a06710 interface : change efl_pack_grid and efl_ui_grid to efl_pack_table and efl_ui_table
Summary:
Change name of 'grid' to 'table' for matching on common ui naming
and avoiding confusion with 'gengrid' and 'grid view'.
grid will be introduced as grid image view after.

Test Plan:
checked make & make install
checked make check - there are errors but not related with these changes.
checked make examples - there are errors in cxx but not related with these changes.
checked make discheck - failed
test in elementary_test with Efl.Ui.Table and Table_static.

Reviewers: raster, cedric, jpeg, felipealmeida

Differential Revision: https://phab.enlightenment.org/D5668
2017-12-19 14:25:08 +09:00
Jean-Philippe Andre a13e61a37b elm: Add "shadow" part to all widgets
This makes it possible to very easily create drop shadows and glow
effects on any widget. This is absolutely not optimized, though the main
performance bottleneck is that the proxy images get redrawn after just
moving.

@feature
2017-12-14 18:03:49 +09:00
Felipe Magno de Almeida fd92dec358 elementary: Add efl_ui_list widget 2017-12-13 14:13:09 -02:00
Sungtaek Hong f80ab519af efl_ui_widget: use elm_widget_element_update to set subobj edc
affected widget list:
efl_ui_clock: test, ampm
efl_ui_multibuttonentry: guidetext, label, closedbutton
efl_ui_slider: popup(indicator)
efl_ui_text: scroller, handler, magnifier, cursor, selection, anchor
2017-12-08 15:57:26 +09:00
Sungtaek Hong cff9b1b11a efl_ui_widget: add new internal EAPI for new group name
theme_klass: set/get klass name used for resize_obj
theme_element: set/get group name used for resize_obj
theme_style: set/get style name used for resize_obj
element_update: automatically sets and apply theme for
             sub object of widget.
2017-12-08 15:57:25 +09:00
Amitesh Singh 54ae9cc18b edje: rename Edje.Object to Efl.Canvas.Layout 2017-12-06 13:12:29 +09:00
Amitesh Singh bdc3969452 edje: rename intf Efl.Canvas.Layout_Group to Efl.Layout.Group 2017-12-05 16:18:32 +09:00
Amitesh Singh c7aa3b2f83 edje: rename intf Efl.Canvas.Layout_Calc to Efl.Layout.Calc 2017-12-05 16:18:32 +09:00