Commit Graph

92 Commits

Author SHA1 Message Date
Marcel Hollerbach b704db8f07 efl_ui_widget: move focus_highlight to the window
summary_:
the widget implementation just redirected calls from efl_ui_widget to
efl_ui_win. Which makes the properties unncessesary on the widget. This
commit moves them now to the window.

The legacy implementation of the window can now go away, as this is
taken care of by eolian directly.

ref T7553

Depends on D8017

Reviewers: woohyun

Reviewed By: woohyun

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7553

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8025
2019-02-27 20:19:25 +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
Marcel Hollerbach 5235f1da85 efl_ui_widget: remove focused_item
focused_item is only used in item containers. This API is now moved into
a widget item container, which *can* have a focused item.

ref T7553

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8013
2019-02-25 10:37:44 +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
Marcel Hollerbach f62a289cf4 elm_list: fix focus without items
Differential Revision: https://phab.enlightenment.org/D7232
2018-11-20 13:04:48 +01: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
Mike Blumenkrantz 791fc27c40 elm/list: correctly handle ELM_LIST_COMPRESS
according to the docs, this mode means that no content size hints should
be taken into account when calculating size hints for the overall object

fix T7313

Differential Revision: https://phab.enlightenment.org/D6860
2018-08-17 21:55:43 +02:00
Mike Blumenkrantz e708c0ae33 elm/list: use while() loop to iterate item list during smart delete
Summary:
using EINA_LIST_FREE here double deletes 2 list items on every iteration
due to recursive list removals, which prevents some items from being
deleted as expected

fix T7266

Reviewers: netstar

Reviewed By: netstar

Subscribers: netstar, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7266

Differential Revision: https://phab.enlightenment.org/D6829
2018-08-15 09:45:06 +01:00
Mike Blumenkrantz d0f48312c2 elm/list: remove max size setting on item contents
Summary:
this was added in a giant block commit in 2009 without direct explanation;
it doesn't seem to make functional sense in the original patch and it
definitely doesn't make sense now

this greatly improves list performance by causing fewer edje recalcs on
list items resulting from list fighting with item content objects over
max size hint

fix T7176

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl_widgets

Maniphest Tasks: T7176

Differential Revision: https://phab.enlightenment.org/D6669
2018-07-24 11:05:13 -04:00
Hermet Park 1297e81e81 elementary list: add a todo comment. 2018-07-19 17:04:42 +09:00
Mike Blumenkrantz 5e64ddec31 elm/list: block recursive recalc loops
Summary:
this size hints callback is triggered by both list objects and list
item objects, meaning that setting size hints on the item objects during
recalc will trigger a recursive recalc, potentially infinitely

this blocks recursive recalcs unless triggered by size hint changes
from a main list object, since those will eventually resolve themselves

fix T7121

Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: netstar, DaveMDS, cedric, #committers

Tags: #efl_widgets

Maniphest Tasks: T7121

Differential Revision: https://phab.enlightenment.org/D6572
2018-07-19 17:01:05 +09:00
Mike Blumenkrantz a43cb224c1 elm_list: return from sizing_eval immediately if called during constructor
Summary:
this is both invalid and useless, so return immediately before spending cpu
time and generating error messages

fix T7035

Depends on D6324

Reviewers: bu5hm4n, Hermet, woohyun, devilhorns

Reviewed By: bu5hm4n

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7035

Differential Revision: https://phab.enlightenment.org/D6325
2018-06-19 13:41:44 -04:00
Cedric BAIL 0eacebfec8 elementary: fix elm_list items lifecycle.
Elm.List.Item lifecycle where an exception in Efl. They were trying to prevent the death of
there parent, to avoid dealing with safely walking on items list. This has been on the todo
list for years and is now fixed by this patch.
2018-05-24 16:02:21 -07:00
Cedric BAIL e4a6aaa4c1 elementary: enforce walk to protect the object existence by using eo refcounting. 2018-05-24 16:02:19 -07:00
Cedric BAIL 048a93e6e3 elementary: reorder operation to only call efl_parent_set when the object still has a chance to exist. 2018-05-24 16:02:19 -07:00
Cedric BAIL 0fe3b7962d elementary: due to lifecycle difference between legacy object and unified object, we need to track their lifecycle more explicitely.
It is my understanding that some items view are created with efl_add directly
and manipulate VIEW directly with Eo new API. This clash with the inconsistent
behavior that evas_object_del expect. To work around this, we track object life
by explictely relying on efl_wref_add while holding the pointer to the object.
2018-05-24 16:02:19 -07:00
Cedric BAIL b265c5c887 elementary: make del_pre not return a bool and force rely on Eo ref counting.
Differential Revision: https://phab.enlightenment.org/D6071
2018-05-24 16:02:18 -07:00
Cedric BAIL a669fb820a elementary: prevent death of list item using Eo ref counting.
Differential Revision: https://phab.enlightenment.org/D6070
2018-05-24 16:02:18 -07:00
Mike Blumenkrantz 6932f0fdd6 elm_list: prevent list item operations during item deletion
ref T6880

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>

Differential Revision: https://phab.enlightenment.org/D6066
2018-05-24 16:02:17 -07:00
Mike Blumenkrantz 499beb9162 elm_list: fix crash in item deletion
this is still broken

ref T6881

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>

Differential Revision: https://phab.enlightenment.org/D6065
2018-05-24 16:02:17 -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
YeongJong Lee ffbbf7b7d6 elm_list: check there is focused item when list get focus at first
Summary:
list have got focus. but there isn't logic to check whether focused_item exist.
we need that logic for list focus
this fixes T6807, T6799

Test Plan: elementary_test -to 'list focus'

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric

Maniphest Tasks: T6807, T6799

Differential Revision: https://phab.enlightenment.org/D5935
2018-04-15 11:52:34 +02:00
Mike Blumenkrantz 8555a22972 elm_list: revert some accidental changes
ref f8e93775c0

fix T6712
2018-02-20 10:56:14 -05:00
Mike Blumenkrantz 654656e69d Efl.Access.Selection: clear -> access_selection_clear
maybe there should be a text selection interface...
2018-02-15 13:28:49 -05:00
Mike Blumenkrantz b0bb09ef7a Efl.Access: resolve more name conflicts
children -> access_children
type -> access_type
2018-02-15 13:28:45 -05:00
Mike Blumenkrantz a6566ef8ae elm_interface_scrollable: use 'mirrored' from Efl.Ui.Base 2018-02-15 13:11:01 -05:00
Mike Blumenkrantz f45e972c8c Elm.Widget.Item: focus -> item_focus 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz f8e93775c0 efl.access: remove parent property
most of this is just a reimplementation of efl_provider_find
2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 8b7bbb2398 efl.access: name -> i18n_name 2018-02-15 13:11:00 -05: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
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Amitesh Singh 10103b9b45 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:38:39 +09:00
Amitesh Singh ad9e36d750 focus: use elm_object_focus_get instead 2017-12-02 00:54:21 +09:00
Amitesh Singh 29b47e0a07 focus: remove focus.get{} from widget.eo
This is taking care by focus manager now.
2017-11-29 19:25:14 +09:00
Marcel Hollerbach b27944da08 elm_list: use internal focus set instead of public focus set
elm_object_item_focus_set ensures that the list also gets focus, thus calling
that in _elm_list_elm_widget_on_focus_update would result in a infinite
call recursion, if setting the focus fails (for example when the object
is not visible yet, [see enlightenment for that]).

This fixes a freeze if you open lunchers config.
2017-11-19 11:08:36 +01:00
Jean-Philippe Andre e9ebe5c676 elm: Define and rename internal atspi struct in EO
This thing is used by only 2 EO APIs that are marked as @beta. I wonder
if the @beta tag or the ptr() expression made it work for eolian,
because it simply wasn't defined in EO.

I'm renaming it just so that it's more consistent with the new names
used by atspi (and EO API in general).
2017-11-16 12:00:18 +09:00
Lukasz Stanislawski c838e30a24 elm: Rename elm_interface_atspi_widget_action mixin
Reviewers: jpeg

Subscribers: jenkins, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5400
2017-11-16 12:00:18 +09:00
Jean-Philippe Andre d39bbc1491 elm: Create legacy widgets with elm_legacy_add
This will be used to solve issues around style_set:
if the widget is legacy or pure eo we may need to select a different
style. So in the constructor we need to know whether we are legacy or
eo. Note that calling style_set in finalize only is too late as we would
lose information such as efl_text_set() called inside efl_add().
2017-11-07 14:50:31 +09:00
Jean-Philippe Andre 2f465e1fbb widget: Rename EO APIs to efl_ui_widget_xxx
This only changes the eo_prefix for APIs.

Ref T5363
2017-10-24 14:30:21 +09:00
Lukasz Stanislawski 57aefc53c1 elm: rename Elm_Interface_Atspi_Accessible interface
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5341
2017-10-19 10:13:54 +09:00
Marcel Hollerbach 89290b40a9 elm_list: for now disable the code
it will return later
2017-10-10 19:28:47 +02:00
Jean-Philippe Andre e9dfcb44ff widget: Implement translation API in layout
This moves the API entry points from Widget to Layout parts. I don't
think the other widgets support translation, but that is easy to fix.
The actual code implementation remains in elm_widget.c.

Legacy-only widgets are covered by Part_Legacy, while all EO widgets
that have text inherit from Layout (except Win but I don't think the
window title was translatable in legacy).

This removes 2/3 remaining part APIs from Widget.

Ref T5363
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 839c4ed395 elm: Introduce interface Efl.Ui.Translatable
This will be used to replace the part translation API in Elm.Widget. It
should work for both parts and non-parts (ie. the main text of a button,
for instance).

For now I'm taking the following approach:
 - All efl_text_set/get strings are untranslatable, i.e. get() returns
   the visible string, set replaces and can not be translated.
 - translatable_text_set/get needs to be used to enable automatic
   translation, which in turns calls efl_text_set to modify the visible
   string. Thus, translatable applications will have to use
   efl_ui_translatable_text_set a lot more than efl_text_set, unless
   they translate strings application-side.

Note that some other frameworks take a simpler approach equivalent to
calling efl_text_set() with an already translated text. This prevents
runtime language changes of the application, unless the application
handles them specifically.
2017-09-26 17:58:07 +09:00
Lukasz Stanislawski 3e6cc83369 elm: rename Elm.Interface.Atspi.Selection => Efl.Access.Selection
Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5165
2017-09-19 11:18:22 +09:00
Jean-Philippe Andre a72f3ec64e efl: Use Eina.Size2D for size hint combined min
For this patch I decided to add a pseudo legacy wrapper as the function
is called in a very large number of places. Fixing all those calls to
use the size2d form is a lot of work and a greater risk of b0rking
something.
2017-09-18 16:33:33 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00