Commit Graph

35 Commits

Author SHA1 Message Date
Marcel Hollerbach 63ebd0e9cc efl_ui_focus_managr_sub: fix a err message
with this commit there are a few errors less, for the case a object is
destroyed while registered as a border element in the sub manager.
This adds a few more callbacks to the list of callbacks, however, i
could not messure a big performance impact.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10067
2019-09-23 10:33:17 -07:00
Mike Blumenkrantz 28ac4d08cc efl_ui_focus_manager_sub: handle manager change when tree is set to unfocusable
Summary:
in this case, the event is emitted and no manager exists because the objects
are not focusable

@fix

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8935
2019-05-23 09:32:00 -04:00
Marcel Hollerbach e4e14f50db efl_ui_focus_manager_sub: apply new event calling convention
Summary: ref T7758

Reviewers: cedric, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7758

Differential Revision: https://phab.enlightenment.org/D8405
2019-03-19 16:31:34 -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
Derek Foreman 5f207d79e3 focus_manager: fix memory leaks
_set_a_without_b() makes a list clone internally, so cloning the list
first will leak a copy.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7622
2019-01-15 13:47:21 -06:00
Marcel Hollerbach a444ff743f elm_interface_scrollable: add support for *jumping* into a scroller
Until recently we have been only registering the border elements of the
graph, (so only the elements that don't have a neighboor). However this
lead to the situation that a scroller that is scrolled into the middle
(so not the x nor the y axis is scrolled to the max), is not accessable.

Now, we register all elements that have a neighboor in the outside.
The patch in the test suite is required in order to provide the correct
geometry to the implementation of efl_ui_focus_manager_sub.

Differential Revision: https://phab.enlightenment.org/D7360
2018-12-04 08:45:49 +01:00
Marcel Hollerbach acee09f585 efl_ui_focus_manager_sub: freeze manager when parent manager is frozen
a efl_ui_focus_manager_sub object is a manager object by itself. It
registeres the border elements of itself in the parent focus manager.
However, all elements that are registered in this manager object, are
also automatically children of the parent root object, which means, when
the root object of the parent manager object is moved, then those
children will also be moved. Which means, when the parent manager can
ignore those changes, we can also ignore them.
This improves the overall performance of the "Scroller 2" test case by
26%.

The change to the test is required in order to redirect the events so
the self_dirty bit is setted correctly

Differential Revision: https://phab.enlightenment.org/D7350
2018-11-26 11:37:04 +01:00
Marcel Hollerbach 44a3e2b7c4 efl_ui_focus_manager_sub: flush the border if we cannot find a candidate
after that someone probebly wants to check where the last focus was on,
if the set of boder elements has changed since the last border flush, then the
element might not be registered in the parent manager
2018-03-15 15:39:12 +01:00
YeongJong Lee 6f0d962f67 efl_ui_focus_manager_sub: remove needless call
Summary: focus manager is not assigned in constructor

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5772
2018-02-15 14:53:46 +01:00
YeongJong Lee f00000df5a efl_ui_focus_manager_sub: avoid a call to NULL
Summary:
we need to consider the manager change to NULL

@ref T6616

Reviewers: bu5hm4n

Subscribers: cedric

Maniphest Tasks: T6616

Differential Revision: https://phab.enlightenment.org/D5771
2018-01-31 14:29:18 +01: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
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
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
Marcel Hollerbach 87900a97d0 efl_ui_focus_manager_sub: remove event callback array when destructing
i forgot about that and this leads to a segfault in enlightenment, the
object then segfaults when the parent manager emits a event and then the
code tries to access the private data of a dead object.
2017-11-20 09:13:08 +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
Thiep Ha 60aa0f2389 focus_manager: remove unused parameter warning 2017-09-05 14:44:21 +09:00
Marcel Hollerbach 3f379b6d49 efl_ui_focus_manager_sub: not needed anymore, handled by calc 2017-09-02 20:06:15 +02:00
Marcel Hollerbach b846545072 efl_ui_focus_manager_sub: make it a mixin
This just brings the functionality, the manager that is used as sub can
still be decided and be brought in via inheritance or compositition
2017-09-02 20:06:15 +02:00
Marcel Hollerbach df3d0e3d7b efl_ui_focus_manager: make focus a property 2017-08-10 20:56:04 +02:00
Marcel Hollerbach d4cd85aa55 efl_ui_focus_manager: split this of tinto a class and a interface
it turns out to be very handy to have a interface for the moving and
border elements, that is unconnected to the way of how widgets are
registering themself.

This for example enables us to get a simple focus manager that just
redirects the call into a internal 2 dimensional data struct
2017-08-10 20:55:50 +02:00
Jean-Philippe Andre d4b2eb1e7f elm: Move calls to efl_destructor(efl_super()) to the end
When destroying any object, its parent class destructor should
be called after the subclass destructor has been called. Only
some extremely limited work may be done after the super call.

This commit makes sure that all efl_destructor() overrides in
elementary are doing operations in the right order.

Also, remove a return void.
2017-07-25 14:43:12 +09:00
Marcel Hollerbach dd883a7064 elm_widget: only emit events when there is really a changed manager
A manager change to NULL is to be used as "this object is not registered
anymore" call, which will happen quite regular during shutdown.
2017-07-24 23:40:38 +02:00
Marcel Hollerbach 178b363bac efl_ui_focus_manager: specify the event in the same way evas does 2017-05-04 20:44:42 +02:00
Marcel Hollerbach 800390bcb0 focus_tests: fix the test suite
this brings back the working testsuite and fixes a bug in the
submanager.
2017-04-20 14:38:59 +02:00
Marcel Hollerbach fb6c37f16f elementary: introduce helper functions for the redirects 2017-04-20 14:38:59 +02:00
Marcel Hollerbach 74b4327746 update according to cedrics review comments 2017-04-20 14:38:58 +02:00
Marcel Hollerbach a3c44fcf68 efl_ui_focus_manager_sub: do not update if parent is NULL
is is actually a dangerous case, and should NEVER happen
2017-04-20 14:38:58 +02:00
Marcel Hollerbach 924033e88a efl_ui_focus_manager: fix sub manager logical handling 2017-04-20 14:38:57 +02:00
Marcel Hollerbach 09824ec450 efl_ui_focus_manager_sub: focus the item in sub and main manager 2017-04-20 14:38:57 +02:00
Marcel Hollerbach 0df0d9d358 efl_ui_focus_manager_sub: register the forwared itself 2017-04-20 14:38:57 +02:00
Marcel Hollerbach 669db4841a efl_ui_focus_manager_sub: update to recenent changes 2017-04-20 14:38:57 +02:00
Marcel Hollerbach 7eb1df349c efl_ui_focus_manager_sub: register children correctly 2017-04-20 14:38:57 +02:00
Marcel Hollerbach 6264eb64e4 efl_ui_focus_manager_sub: register the root as logical 2017-04-20 14:38:57 +02:00
Marcel Hollerbach b75b5f4c05 managersub: remove the select_set call
this can be done directly be inheriting border_elements and cutting down
the set.
2017-04-20 14:38:57 +02:00
Marcel Hollerbach 01f46ae205 efl_ui: introduce a focus manager and sub manager object
The Efl.Ui.Focus.Manager abstracts the creation of a localization graph
and a logical tree. The localization graph is used to find a object
right left up or down of a given object. The logical tree is used to
iterate throuw the containers which are used to build a ui.

Those managers can be used bound to some layer in the ui, so for
example the window is a layer, the content of a scroller is a layer.
With those layers, we can make sure that movements of a scroller for
example just means that this graph of objects in the scroller needs to
be recalculated, and not the complete ui.

The advantage of having this to layer bound datastructures is that you
can easily debug those graphs, since the complete layer of this
managerobject can be calculated completly.
2017-04-20 14:38:57 +02:00