Commit Graph

94 Commits

Author SHA1 Message Date
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
Amitesh Singh 10103b9b45 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:38:39 +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 bed67ef0d0 elm: fix legacy code
earlier elm_object_focused_object_get returned gengrid genlist toolbar
objects if a item of them is focused. This should fix that.

thank you @davemds for the report!
2017-11-26 19:47:05 +01:00
Marcel Hollerbach 6daff0e6f4 elm_main: checking the redirect chain is not neccessery
the manager is in or has no focused element
2017-11-17 16:08:14 +01:00
Marcel Hollerbach 1e5c894a1b elm_main: replace _elm_object_focus_set with efl_ui_focus_util_focus 2017-11-17 16:08:14 +01:00
Cedric Bail 30adccd6a2 elementary: make sure that ecore shutdown match ecore init. 2017-11-15 16:29:14 -08:00
Cedric Bail 1112ce2a8a ecore: should be the one triggering EFL_LOOP_EVENT_TERMINATE. 2017-11-15 16:29:14 -08:00
Carsten Haitzler 2a5267d416 unbreak efl so e works again.... after cedric
we cant go iterating the mainloop before the current point. if someone
set up handlers but hasnt configured the things those handles use yet
as they dont expect them to be used until the mainloop is started...
thenthings break. we cant change this assumption without breaking
things.
2017-11-08 16:32:52 +09:00
Cedric BAIL 50cc85f426 elementary: fix quicklaunch support. 2017-11-07 16:08:39 -08:00
Cedric BAIL e32dd07c9d elementary: refactor and clean efl_quicklaunch_prepare. 2017-11-07 16:08:39 -08:00
Cedric BAIL ee65414ef6 ecore: introduce ecore_init_ex/ecore_shutdown_ex to propagate argc,argv properly. 2017-11-07 16:08:39 -08:00
Cedric BAIL dd40079185 ecore,elementary: move startup time accounting in ecore. 2017-11-07 16:08:39 -08:00
Jean-Philippe Andre 824792f09d elm: Major cleanup of EO files
This prevents legacy EO classes from being exposed through .eo.h headers
or .eo in share/eolian/includes. Also removes a slew of useless xxx_eo.h
intermediate headers.

Notes:
 - elm_systray has no proper API: it's not clear if the EO API should be
   released (in which case it needs to be renamed to efl_something) and
   there is no legacy API to create a systray object.
 - Some files have been placed in a "FIXME" section, as I believe they
   are necessary within EO land, but at the same time still don't
   conform to the interfaces (eg. name starts with elm_).
 - elm_interface_scrollable is required by photocam. This means photocam
   needs to be adapted to fit the EO scroller API (still to be
   completed, I believe).

Bugs:
 - This breaks most C++ examples. I KNOW. And I'm working on it.

Ref T5301
2017-11-01 21:23:31 +09:00
Cedric Bail 173de925ed elementary, ecore: move efl_exit helper to Ecore. 2017-10-27 16:37:58 -07:00
Cedric Bail a959337a29 elementary: rely on main loop terminate event to execute ELM_POLICY_EXIT_WINDOWS_DEL. 2017-10-27 16:20:56 -07:00
Cedric Bail ba01c5c3eb elementary: actually we do not need efl_quicklaunch_fallback. 2017-10-27 15:46:26 -07:00
Cedric Bail 03df8483f6 elementary: update efl_quicklaunch_fallback to use the new EFL exit API. 2017-10-27 15:43:23 -07:00
Cedric Bail 3e41da66a8 elementary: update elm_quicklaunch_fork to use the new Eina_Value exit API. 2017-10-27 15:41:37 -07:00
Cedric Bail e361189e27 elementary: make the exit helper work with int (This is just for C). 2017-10-27 15:39:34 -07:00
Marcel Hollerbach fa49488f3a elm_main: make sure we dont go deeper than the widget top level 2017-10-25 14:36:13 +02:00
Marcel Hollerbach a417af04e8 elm_widget: also delay focus set if something is not registered
this fixes a infinite loop
2017-10-24 17:37:31 +02:00