Commit Graph

162 Commits

Author SHA1 Message Date
Mike Blumenkrantz ca5b68a620 elm/gengrid: handle gengrid finding of nearest visible item when not realized
Summary:
FIXME--

@fix
Depends on D8960

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8961
2019-05-30 13:09:10 -04:00
Mike Blumenkrantz 87e589a6b9 elm/gen*: only call focus_object_setup_order_non_recursive if realized
Summary:
this function cannot process unrealized items

@fix
Depends on D8990

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8992
2019-05-29 12:29:04 -04:00
Mike Blumenkrantz 9144055498 elm/gengrid: trigger unrealize event after unsetting unrealized flag
Summary:
this flag is accessed by other components (e.g., focus) during the event
and so it must reflect the emitted event

@fix
Depends on D8989

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8990
2019-05-29 12:29:04 -04:00
Mike Blumenkrantz 2e8f714979 elm/gengrid: handle focus events when no previous focus item was set
Summary:
this triggers fewer error messages

@fix
Depends on D8962

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8963
2019-05-29 12:29:03 -04:00
Mike Blumenkrantz da877d9e63 elm/gengrid: more null checks for setting mirrored state during construction
Summary:
sd->obj is only non-null later in construction, so add even more checks for it
here

@fix
Depends on D8961

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8962
2019-05-29 12:29:03 -04:00
Mike Blumenkrantz 1ba2a99b9a elm/gengrid: handle cache item deletion without errors
Summary:
@fix
Depends on D8959

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8960
2019-05-29 12:29:03 -04:00
Marcel Hollerbach 41e1dadbf1 elementary: do not emit new events in legacy
Summary:
This commits prepares the tree in order to mess with the events in the
Efl.Ui.Clickable event. Events which have been emitted in a none legacy
widget, are now emitted either with evas, when the widget is legacy due
to inheritance. Or via the normal event and normal event functions.

In case the widget is a legacy only widget (not used at all in the new
api), then the events are for now emitted with
evas_object_smart_callback_call.

Cases where event handlers have been added to legacy widgets, smart
events are now used, and not the eo one anymore.

ref T7844

Depends on D8813

Reviewers: cedric, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7844

Differential Revision: https://phab.enlightenment.org/D8816
2019-05-13 15:14:13 -04:00
Yeongjong Lee 41136db8e8 ui.widget: remove elm_widget_sub_object_parent_add from each of widgets
since commit a1addad60e, To add myself as a sub object of parent object will be
done in Efl.Ui.Widget constructor.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8280
2019-04-18 11:01:19 +02:00
Marcel Hollerbach 0c0f47796b efl_ui_widget: move from elm_widget_top_get to provider_find
this resolves a lot of cases where focus_highlight API was called on a
object, which is not a efl_ui_win object. With this patch we ensure that
the object is always a window.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8476
2019-03-29 14:02:32 +01:00
Marcel Hollerbach 04122ec311 elm_gengrid: speed up update order calls
update order can be quite expensive, so this here tries to skip it as
often as possible.

ref T7384

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8367
2019-03-25 10:54:13 +01:00
Marcel Hollerbach f1678d06c2 elm_gengrid: rework focus registration
before just everything has been registered, now only the realized items
are registered.

ref T7384

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8366
2019-03-25 10:54:12 +01:00
Marcel Hollerbach 9a3d4310be elm: do not use eo events here
Summary:
we want to rename it, and this would break legacy behaviour, so better
this way.
Depends on D8412

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8413
2019-03-19 16:29:45 -04:00
Marcel Hollerbach c9cdb916cd Revert "efl_ui_selectable: namespace events to avoid conflicts"
Summary:
This reverts commit f629f11bed.

This breaks legacy events. As the selected event is used in legacy
widgets. Also this commits mixed up two different concepts, selection in
a entry etc. and selection of a item.
Depends on D8411

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8412
2019-03-19 16:29:39 -04:00
Mike Blumenkrantz f629f11bed efl_ui_selectable: namespace events to avoid conflicts
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8261
2019-03-08 12:17:54 -08:00
Yeongjong Lee 97416e9996 elm_gengrid: fix correct parent-child relation of item content
Summary:
see 1b2401849a that said
`evas_object_smart_member_del` doesn't make sense here.
I guess `_sub_object_del` should have been used when item_all_contents_unset is
implemented.

Item content should have widget(gengrid) as the parent. but that relationship
is removed by c075b7caaa.
See also, `_item_content_realize` of genlist.

Test Plan: make check

Reviewers: Hermet, SanghyeonLee, bu5hm4n

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8238
2019-03-08 13:18:05 +09:00
Mike Blumenkrantz 71f49619dc elm_interface_scrollable: remove elm_pan_eo.h from public header
this is a legacy header so it can't include (non-installed) eo headers

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8229
2019-03-07 14:17:09 -08:00
Mike Blumenkrantz bbaafb5314 efl_ui_focus_parent_provider_gen: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8210
2019-03-07 14:16:44 -08:00
Mike Blumenkrantz bb85bb6b1d elm_gengrid*: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8169
2019-03-07 14:15:18 -08:00
Mike Blumenkrantz 9a361ac917 efl_access_object: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8131
2019-03-06 13:03:02 -08:00
Mike Blumenkrantz bb6caaa471 efl.ui: remove Efl.Ui.Theme_Apply_Error
Summary:
now that the error codes have been change to be compatible with eina_error,
this can be removed and will work through eina_error naturally

fix T7718

Depends on D8067

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8068
2019-03-04 13:37:07 -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
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
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
WooHyun Jung a2cfa9340a efl_ui_widget: remove "moved" event
Summary:
This "moved" event is only used by elm_gengrid now.
And it's not something common for all widget classes,
because the event is giving notification when the legacy
item is reordered.

ref T7553

Test Plan: elementary_test "GenGrid"

Reviewers: bu5hm4n, YOhoho, Jaehyun_Cho

Reviewed By: bu5hm4n, YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7553

Differential Revision: https://phab.enlightenment.org/D8005
2019-02-25 13:13:53 +09:00
Marcel Hollerbach 89b62fd225 efl_ui_focus_object: rename API
these API names have been considered a better choice.

ref T7571

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7994
2019-02-22 14:00:33 +01:00
Marcel Hollerbach b9f82ccac3 efl_ui_focus_composition: remove unneeded API
the purpose of this API can be improved, and the values there can be
guessed.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7993
2019-02-22 14:00:31 +01:00
Marcel Hollerbach 93903a7ba3 efl_ui_focus_manager: rename focus,changed
focus,changed is already used in efl_ui_focus_object, which makes sense
there. However, here we listen for the property focus_manager, thus its
renamed to focus_manager,changed.

ref T7571

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7990
2019-02-22 14:00:28 +01:00
Jérémy Zurcher 8a617fda97 silence most left over compiler warnings
Summary: silence -Wshadow -Wunused-variable -Wunused-parameter

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7473
2018-12-18 13:08:01 +01:00
Marcel Hollerbach 27e5e8fa75 elm_gengrid: improve genlist behaviour
the new behaviour is (as genlist in the previous commit):
- focus the first item when down is pressed
- focus the last item when up is pressed
- do not go into the widget with tab or ctrl+tab and just return
immidiantly

fixes T6805

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7454
2018-12-17 09:12:22 +01:00
Marcel Hollerbach 6922761f3f elm_gen****: fix focus restoring on window focus changes
this ensures that if there is no focused item, that at least the
container is focused. This leads to the fact that the elm_genlist
/elm_gengrid is refocused when a window is unfocused and focused again.

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7451
2018-12-17 09:12:22 +01:00
SangHyeon Jade Lee edacff4fa5 gengrid : remove elm_access_text_set for code consistancy.
Summary:
Early accessibility read object and item infomations by elm_access_text_set
but this code is redundant now and removed genlist and list already.
To make a same consistancy of our accessibility informations in list-look widgets
we need to remove this function calls here.

Test Plan: tested Gengrid Item is not readed in gengrid item focused with accessibility on.

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7370
2018-11-27 20:15:54 +09:00
Yeongjong Lee 424bd60084 elm_gengrid: remove all_items_deselect call in _gengrid_element_focused
focus_changed doesn't mean select_changed. selection is handled the code below.
Differential Revision: https://phab.enlightenment.org/D7268
2018-11-23 12:48:37 +01:00
Chris Michael e2862ef2e2 elementary: Reduce EO calls by using geometry_set
This patch reduces EO calls by using evas_object_geometry_set rather
than calling move & resize.
2018-11-21 11:25:58 -05:00
Marcel Hollerbach a81540ead5 elm_gengrid: enable focus api for none realized items
this ensures that the item is focused once the item is realized.
The last_focused_item point is not NULLed anymore, it will be overridden
anyways a few lines below, if the 'if' below is not going to be
executed, then we should not NULL out the field at all, since we want to
remember the item when we are restoring focus in
_elm_gengrid_efl_ui_focus_manager_setup_on_first_touch.

This resolved the latest comment in D7230

This also resolves T7391.

Differential Revision: https://phab.enlightenment.org/D7271
2018-11-20 20:50:42 +01:00
Marcel Hollerbach 1524c94180 elm_gen****: correctly return the focus parent
this was forgotten before. However, now the correct parents are returned
This is needed in order to have the child_focus property propagated
correctly accross the parent chain.

Differential Revision: https://phab.enlightenment.org/D7266
2018-11-20 14:42:32 +01:00
Marcel Hollerbach edf1fbea20 elm_gen****: ensure that no focus item is handled correctly
This ensures that on first touch the root dummy element is focused
correctly.

fix T7203

Differential Revision: https://phab.enlightenment.org/D7231
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
Marcel Hollerbach d5fea77162 gengrid: unset last_focused pointer when focus moved away
this was requested by T7391.

fix T7391

Differential Revision: https://phab.enlightenment.org/D7123
2018-11-13 17:01:37 +01:00
Marcel Hollerbach c5add3ef40 elm: add unfocus / focus signals to gen* and toolbar
this adds back unfocus / focus emitting when items in those containers
are getting focus.

Differential Revision: https://phab.enlightenment.org/D7100
2018-11-13 17:01:37 +01:00
Marcel Hollerbach 17b57ba5ac efl_ui_focus_manager: rename a event
In eo there is a difference between legacy events and normal events.
However, when a legacy event, that is called "focused" is emitted, the
event EFL_UI_FOCUS_MANAGER_FOCUSED is emitted on those objects. This
leads to bugs and unexpected results in elm_scroller, and additionally
this problem blocks work that is done right now to add those "focused"
event calls to gengrid.

Differential Revision: https://phab.enlightenment.org/D7099
2018-11-02 02:22:13 +01:00
SangHyeon Jade Lee 82060c5798 elm_gengrid: fix item_show / bring_in deferred call.
Summary:
item_show / bring_in will be deferred, if object is not resized properly.
the deferred call of item_show_region() is on the calc_job(),
after calculating proper object, pan size, but still item is not placed,
so target scrolling position is wrong while item_show_region().

move deferred call to group_calculate() to get correct item position,
after item_place() and group_item_place() were processed.

This patch is reported on [[ https://phab.enlightenment.org/T7367 | T7367 ]].

Test Plan: {F3302967}please check attached gengrid_example_01.c

Reviewers: eagleeye, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7367

Differential Revision: https://phab.enlightenment.org/D7014
2018-09-19 09:21:31 +09:00
Derek Foreman 33b085551a elm_gengrid: Convert to new animators
Summary:
Use more efficient animator mechanism.
Depends on D7045

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7046
2018-09-18 09:42:58 -05:00
SangHyeon Lee ac9dfe7e46 elm_gengrid : fix gengrid cached items disapearing issue by wrong reference counting
gengrid item view is managed by cache while scrolling,
but efl_wref_add/del and VIEW_ADD is not paired well.

this commit is fixing the issue of item dispearing when it scrolls.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2018-06-21 14:09:13 +09:00
Marcel Hollerbach 054eab8ad8 elm_gen****: ensure the correct parent is set
fixes T6474
2018-06-12 11:51:08 +02:00
Marcel Hollerbach 42bb537170 efl_ui_focus_parent_provider_gen: do not accidently flatten the widgets
in the provider we accidently flattend out the widget history by
returning the wrong parent. However, this flattening code was required
for the element focus code of the two generic widgets, so the item is
found for every widget, in every subtree.
2018-06-12 11:32:51 +02: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 2a51465593 elementary: use Eo ref counting to prevent death of gengrid items.
Differential Revision: https://phab.enlightenment.org/D6067
2018-05-24 16:02:18 -07:00
Marcel Hollerbach 5815ba52ec elm_****: do not make group items focusable 2018-04-30 15:22:52 +02:00
Marcel Hollerbach fa02849193 gen****: just set focus to genlist / gengrid if no item is available
Additional move requests are still redirected to the gen**** widget.

ref T6805
2018-04-25 00:17:58 +02:00