Commit Graph

25 Commits

Author SHA1 Message Date
Marcel Hollerbach 2c0ea5b5e3 efl_ui_focus_layer: we should cleanup on invalidate
Summary:
otherwise there will be errors. Lets pray this did not break anything
else.
Depends on D9518

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9521
2019-08-07 10:24:08 -04:00
Marcel Hollerbach 229dc576e6 efl_ui_focus_object: rename events
the event now math the pattern of <property-name>,changed.

ref T7571

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7989
2019-02-22 14:00:32 +01:00
Marcel Hollerbach 37d2d378ec 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 <lauromoura@expertisesolutions.com.br>

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D7901
2019-02-13 16:59:58 +01:00
Marcel Hollerbach 9c6175b3d6 efl_ui_focus_layer: do not call on NULL objects
This fixes the following backtrace

	#5  0x00007ffff4ee87d0 in efl_ui_focus_manager_root_get (obj=0x0) at lib/elementary/efl_ui_focus_manager.eo.c:17
	#6  0x00007ffff4ef50cb in _efl_ui_focus_layer_enable_set (obj=0x40000004adfe, pd=0x12fde40, v=0 '\000') at lib/elementary/efl_ui_focus_layer.c:127
	#7  0x00007ffff4ef52dd in efl_ui_focus_layer_enable_set (obj=0x40000004adfe, v=1 '\001') at lib/elementary/efl_ui_focus_layer.eo.c:4
	#8  0x00007ffff4ef4df0 in _efl_ui_focus_layer_efl_gfx_entity_visible_set (obj=0x40000004adfe, pd=0x12fde40, v=1 '\001') at lib/elementary/efl_ui_focus_layer.c:35
	#9  0x00007ffff0f366a3 in efl_gfx_entity_visible_set (obj=0x40000004adfe, v=1 '\001') at ../src/lib/efl/interfaces/efl_gfx_entity.eo.c:15
	#10 0x00007ffff5d832bb in evas_object_show (eo_obj=0x40000004adfe) at lib/evas/canvas/evas_object_main.c:1917
	#11 0x00007fffcc365c74 in _bar_icon_preview_show (data=0xfaa7e0) at ../src/modules/luncher/bar.c:906
	#12 0x00007ffff6d4305a in _ecore_call_task_cb (func=0x7fffcc36549c <_bar_icon_preview_show>, data=0xfaa7e0) at lib/ecore/ecore_private.h:442
	#13 0x00007ffff6d434d2 in _ecore_timer_legacy_tick (data=0x12ca950, event=0x7ffffffc57c0) at lib/ecore/ecore_timer.c:160
	#14 0x00007ffff0d06e90 in _event_callback_call (obj_id=0x4000001f25b2, pd=0x923820, desc=0x7ffff6f673e0 <_EFL_LOOP_TIMER_EVENT_TICK>, event_info=0x0, legacy_compare=0 '\000') at lib/eo/eo_base_class.c:1671
	#15 0x00007ffff0d07162 in _efl_object_event_callback_call (obj_id=0x4000001f25b2, pd=0x923820, desc=0x7ffff6f673e0 <_EFL_LOOP_TIMER_EVENT_TICK>, event_info=0x0) at lib/eo/eo_base_class.c:1755
	#16 0x00007ffff0d07208 in efl_event_callback_call (obj=0x4000001f25b2, desc=0x7ffff6f673e0 <_EFL_LOOP_TIMER_EVENT_TICK>, event_info=0x0) at lib/eo/eo_base_class.c:1758
	#17 0x00007ffff6d4478e in _efl_loop_timer_expired_call (obj=0x4000000003dc, pd=0x890bf0, when=333436.894054887) at lib/ecore/ecore_timer.c:634
	#18 0x00007ffff6d445bd in _efl_loop_timer_expired_timers_call (obj=0x4000000003dc, pd=0x890bf0, when=333436.894054887) at lib/ecore/ecore_timer.c:587
	#19 0x00007ffff6d0b423 in _ecore_main_loop_iterate_internal (obj=0x4000000003dc, pd=0x890bf0, once_only=0) at lib/ecore/ecore_main.c:2317
	#20 0x00007ffff6d08e66 in _ecore_main_loop_begin (obj=0x4000000003dc, pd=0x890bf0) at lib/ecore/ecore_main.c:1175
	#21 0x00007ffff6d11757 in _efl_loop_begin (obj=0x4000000003dc, pd=0x890bf0) at lib/ecore/efl_loop.c:83
	#22 0x00007ffff6d13e6e in efl_loop_begin (obj=0x4000000003dc) at lib/ecore/efl_loop.eo.c:28
	#23 0x00007ffff6d08fe0 in ecore_main_loop_begin () at lib/ecore/ecore_main.c:1248
	#24 0x000000000054817c in main (argc=2, argv=0x7fffffffdc78) at ../src/bin/e_main.c:1090

fix T7034.

Differential Revision: https://phab.enlightenment.org/D6492
2018-07-02 18:21:15 +02:00
Marcel Hollerbach 2137ce7e1e efl_ui_focus_layer: elm_widget_top_get considered harmfull
Summary:
You think elm_widget_top_get returns a window object ? Oh no! For the
case that the widget tree splits, and the widget_parent gets NULL of
some widget in the chain, elm_widget_top_get returns where the NULL
reference is placed.

For the case of elm_notify this is somehow intended, as the notify does
not have a parent when the parent is deleted.

ref T7090

Reviewers: netstar, zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7090

Differential Revision: https://phab.enlightenment.org/D6471
2018-06-29 11:31:56 -04:00
Marcel Hollerbach a218c883c7 Introduce efl_ui_widget_focus_manager
Summary:
The mixin encapsulates the correct
- creation
- composition attaching
- Lifecycle handling

of the focus managers that are assosiated with the object.

This fixes error messages on shutdown, and additionally lifetime issues
where the composite_attached object was deleted before the object was
deleted.

Reviewers: cedric, zmike

Reviewed By: zmike

Subscribers: segfaultxavi, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6108
2018-05-16 13:30:28 -04:00
Marcel Hollerbach d7011b52e7 efl_ui_focus_composition: add fields for manager and parent
the manager objects are build on the assertion that registered elements
are returning the manager they are registered on if
efl_ui_focus_object_manager_get is called.
2018-04-25 00:16:50 +02: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
Stephen 'Okra' Houston cf359629a5 Focus: If tree focus is set to not allow focus on the object - don't give it focus.
Patch from Marcel 'bu5hm4n' Hollerbach
2018-04-19 11:19:51 -05: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
Chris Michael b5c9742cb7 efl_ui_focus: Add missing EINA_UNUSED for unused function parameters 2018-04-11 10:11:20 -04:00
Marcel Hollerbach 59828721d8 efl_ui_focus_layer: return the registered focus manager when active
this fixes in chain setting for hovers and ctxpopups
2018-04-09 18:05:27 +02:00
YeongJong Lee 8eda161f67 efl_ui_focus_layer: avoid a call to NULL
Summary:
efl_ui_focus_layer_enable_set(obj, EINA_FALSE) can be called before
registered_manager assigned

Test Plan:
1. EINA_LOG_LEVELS=eo:2 elementary_test -to menu
2. terminate the elemetary_test
3. check that there is no focus_manager warning about a call to NULL

Reviewers: bu5hm4n

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5759
2018-01-24 18:49:04 +09:00
Yeongjong Lee 210db8fc5d efl_ui_focus: merge efl_ui_focus_user and efl_ui_focus_object into one mixin
Summary:
focus_user and focus_object are similar classes. by merging them into
one mixin, we can maintain consistency.

Test Plan: make check

Reviewers: bu5hm4n

Subscribers: cedric, Jaehyun_Cho, woohyun, jpeg

Differential Revision: https://phab.enlightenment.org/D5734
2018-01-16 22:39:13 +01:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Jean-Philippe Andre 116f24fd78 elm: Rename struct to Efl.Ui.Widget.Focus_State
Ref T5363
2017-12-12 12:01:46 +09:00
Marcel Hollerbach 78afa2fb84 efl_ui_focus_user/object: fix api duplication
just like the commit before, this fixes duplicated api names
2017-12-05 17:19:28 +01:00
Pawel Aksiutowicz 59a573fabb elementary: fixed single typos in few modules
Reviewers: stanluk, lukasz.stanislawski

Reviewed By: lukasz.stanislawski

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5534
2017-11-27 17:36:58 +09:00
Marcel Hollerbach a58cc75e55 efl_ui_focus_layer: rely on _manager_in_chain_set
so we dont have to set the direct by hand anymore
2017-11-21 16:32:27 +01:00
Jean-Philippe Andre 6cea4993e0 elm: Don't do anything before construction
Obviously ui.win is still the ugly exception.
2017-11-07 14:43:22 +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
Marcel Hollerbach 9790de4b0c elm: include those headers in Elementary.h 2017-10-11 09:51:33 +02:00
Marcel Hollerbach 8453ebfe4e elm: move the focus direction definition to general
and remove the old definition
2017-10-10 19:28:48 +02:00
Marcel Hollerbach 94afff21da elm_ui_focus_layer: add configurable behaviour
the layer can now be configured if it should be automatically enabled at
visibility and if the focus should cycle in the layer or not.
2017-10-10 19:28:47 +02:00
Marcel Hollerbach 6ba107b899 elm: introduce efl_ui_focus_layer
what it does is described in the mixin

this commit refactors inwin hover popup ctxpopup to use that behaviour.
Since it should do exactly that.
2017-10-10 19:28:47 +02:00