Commit Graph

115 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
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
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
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
Mike Blumenkrantz a08570fdae api: rename efl.gfx.entity geometry events and add geometry data to those events
the convention for event naming is to use $property,changed where possible
and to always emit related data with the event to reduce function calls

ref T7558

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7987
2019-02-22 10:09:46 +01: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
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
Carsten Haitzler 42a3ad53d2 elm main - fix unused param in cb warn 2018-12-04 08:40:02 +00:00
Marcel Hollerbach e36dce177e efl_ui_focus_manager: introduce a new API
the new api can be used to freeze the cache. This means, when the
widgets of the focus manager are all equally moved, the cache can stay,
cause the relative positions did not change, this enables a whole new
set of available optimizations.

Differential Revision: https://phab.enlightenment.org/D7348
2018-11-26 11:37:04 +01:00
Marcel Hollerbach 97ece33134 efl_ui_focus_object: introduce a new event for focus geometry changes
before the move and resize events have been used. However, this turned
out to not work well, because not all registered items are real
efl.gfx.entity objects, there is also a custom property for getting the
focus geometry, so now this property is completed with a event that is
emitted when the focus geometry changes. With this event we can
reintroduce relation caching. Since all events are marked correctly
dirty now.

Differential Revision: https://phab.enlightenment.org/D7347
2018-11-26 11:37:04 +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
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
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
Marcel Hollerbach 66aa76ad89 efl_ui_dnd: fixup leaking inits and code duplication
In fff4d1ba97 one selection_manager_get
method was patched to behave like this, however, it completly broke the
fact of *only-one-manager* since the same code was duplicated in a other
files (efl_selection.c). This now unifies this code, and adds back the
assertion for only one manager per window.

Additionally a shutdown function is added, the app never destroyes, but
the selection manager decided to init some subsystems itself
(ecore_x for example). This lead to to a leak of init counts in ecore_x,
which lead to elementary test suite issues. This is now *finaly* fixed.

Differential Revision: https://phab.enlightenment.org/D7105
2018-10-02 16:13:13 +02:00
Hermet Park 640596e68a elementary main: fix typo
Differential Revision: https://phab.enlightenment.org/D6910
2018-08-27 21:18:37 +02:00
Alastair Poole 9342c1a3f4 efl_selection: reintroduce missing ELM_CNP_EVENT_SELECTION_CHANGED symbol.
Summary:
During the 1.21 development cycle the symbol ELM_CNP_EVENT_SELECTION_CHANGED was lost.

The commit which introduced this:  e88bbaa1e3

This patch re-introduced the symbol and expected behaviour.

Reviewers: #committers, zmike, bu5hm4n, herb

Reviewed By: #committers, zmike

Subscribers: herb, ManMower, segfaultxavi, stefan_schmidt, cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6689
2018-07-30 11:42:28 -04:00
Mike Blumenkrantz 69fdec545e elm: handle all failure cases with error messages in init
Summary:
fix T7021
Depends on D6678

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7021

Differential Revision: https://phab.enlightenment.org/D6679
2018-07-26 21:13:46 +09:00
Daniel Zaoui 1ab3094dac Clouseau: use the config flag only for the old Clouseau 2018-06-15 10:10:50 +03:00
Cedric Bail 13ae5b1f0c elementary: the config subsystem expect a stringshare. 2018-05-24 16:02:20 -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
WooHyun Jung ea1760380e elm_main: call _elm_config_shutdown() after loop_iterate()
In _elm_config_shutdown(), _elm_config is freed.
So, if some ecore events call efl_ui_xxx API which refers _elm_config,
there can be crashes.

@fix
2018-05-24 15:30:29 +09:00
Mike Blumenkrantz 9c7f5ca33b elm: use build dir data when EFL_RUN_IN_TREE is set
Summary:
this prevents tests from loading user configs and providing inconsistent
results or accidentally modifying a user's config

fix T6863
Depends on D6013

Reviewers: cedric, stefan_schmidt

Reviewed By: stefan_schmidt

Subscribers: stefan_schmidt

Tags: #efl

Maniphest Tasks: T6863

Differential Revision: https://phab.enlightenment.org/D6014
2018-05-14 18:26:21 +02:00
junsu choi c1f5d64511 elm_object : Support to translatable_part_text of legacy widget
Summary:
this commit supports aliasing of legacy widget
about translatable_part_text_set/get.

Test Plan:
elm_object_domain_translatable_part_text_set(btn, "default", NULL, "sample_text");
const char* text = elm_object_translatable_part_text_get(btn, "default");

Reviewers: cedric, herb, id213sin, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6056
2018-05-04 20:34:29 +09:00
Marcel Hollerbach fdfcae968b elm_widget: Introduce elm_focus_legacy
Code located here is meant for a legacy tree and legacy widgets.
This is checked on the entry of the function
2018-04-30 19:24:47 +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
Marcel Hollerbach 803fddea5d efl_ui_focus_manager_calc: do not redirect requested calls
this is not documented and does not make sense.
2018-04-13 11:07:34 +02:00
Marcel Hollerbach 01272c71d0 efl_ui_focus_manager: make request_move more powerfull
it turns out that it is useful and needed (for future patches) to
request moves for nodes that are not focused currently. It is also
needed to request a move that might end up in a logical node.
2018-04-13 11:07:33 +02:00
Mike Blumenkrantz 7bf389f3a7 elm: remove hacky calls to emotion_init/shutdown
these are irrelevant since emotion manages init/shutdown internally

fixes elm test pass state

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:27 +02:00
Cedric BAIL 24db9f60be elm: call ecore_event_shutdown during elm_shutdown
ref 4e14ba3f48

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-13 15:14:50 -07:00
Cedric Bail 6b1b3d25d6 elementary: fix backward compatibility bug introduced by 9c8749b99a. 2018-03-07 09:34:49 -08:00
Carsten Haitzler 1bdd9e4dd1 ecore - a different take on efl.app class as a super class to efl.loop
so the MAIN loop is actually an efl.app object. which inherits from
efl.loop. the idea is that other loops in threads will not be efl.app
objects. thread on the creator side return an efl.thread object.
inside the thread, like the mainloop, there is now an efl.appthread
object that is for all non-main-loop threads.

every thread (main loop or child) when it spawns a thread is the
parent. there are i/o pipes from parnet to child and back. so parents
are generally expected to, if they want to talk to child thread, so
use the efl.io interfaces on efl.thread, and the main loop's elf.app
class allows you to talk to stdio back to the parent process like the
efl.appthread does the same using the efl.io interfaces to talk to its
parent app or appthread. it's symmetrical

no tests here - sure. i have been holding off on tests until things
settle. that's why i haven't done them yet. those will come back in a
subsequent commit

for really quick examples on using this see:

https://phab.enlightenment.org/F2983118
https://phab.enlightenment.org/F2983142

they are just my test code for this.

Please see this design document:

https://phab.enlightenment.org/w/efl-loops-threads/
2018-03-03 13:40:33 +09:00
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Cedric Bail d57b9a7d14 eina: make eina_vpath_interface_app_set an internal function.
I am wondering if this one shouldn't even be a private one and
directly used by eina_prefix.
2018-02-22 15:26:28 -08:00
Marcel Hollerbach c4f33c67a8 move from efl.vpath to eina_vpath
The usages from efl.vpath are moved to to eina_vpath
2018-02-22 09:26:55 +01:00
Mike Blumenkrantz 5263f311f4 efl_widget_item: remove 'del'
this now uses regular efl_del
2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 80cc3f230d elm: remove ecore-x init from quicklaunch post-fork
this is invalid for basically every possible case. allow components
to naturally call this function as needed

@fix
2018-02-07 13:32:08 -05:00
Mike Blumenkrantz b7bec2ba9a elm: call ecore_app_args_set() after quicklaunch fork
ensure that apps get expected behavior when calling args_get()

@fix
2018-02-07 13:30:37 -05:00
Mike Blumenkrantz c4e5bbe441 elm: print error if setsid() fails during quicklaunch fork 2018-02-07 12:12:22 -05:00
Mike Blumenkrantz 4e14ba3f48 elm: call ecore_event_init() during init
events from this component are used internally in elm, don't rely on
other components to do it

@fix
2018-02-02 16:59:44 -05:00
Mike Blumenkrantz 023127bf6f quicklaunch: return child pid from elm_quicklaunch_fork() on success 2018-01-26 14:10:31 -05:00
Jean-Philippe Andre a465f4d878 widget: Use enum for orientation_mode
This was proposed by Dave on the ML, I think it makes sense. Right now
the enum is just like the boolean, feature-wise, but it makes more sense
semantically (mode is not a bool) and allows for future extension (eg.
only apply orientation update for landscape vs. portrait modes).

There is absolutely zero testing for this in our existing codebase. Yay.
2018-01-19 16:19:36 +09:00
Jean-Philippe Andre f312ed6db9 widget: Rename orientation_mode_disabled
Name is stupid and long, why not just invert this bool?
2018-01-18 17:25:15 +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
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Jean-Philippe Andre ff24ac2d6d efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would
become invalid, since they are now stored in a dynamic array rather than
a statically stored array.

The risk here is that if a module of EFL tends to init/shutdown in a
"normal" scenario then the event type array will grow in a leaking
manner. This could be fixed by resetting those event ID's only when the
loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using
EFL_EVENT_DEL in this patch as this would add too many event callbacks
to the main loop object, which may result in slightly slower event calls
to it, affecting the overall performance.
2017-12-19 11:14:37 +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