Commit Graph

75 Commits

Author SHA1 Message Date
Daniel Kolesa 4f4b58bf4c efl: change all occurences of @owned to @move 2019-09-06 17:01:05 +02:00
Xavi Artigas dc05cbbee8 docs: Fix typos and wrap EO files to 120 chars
As per our style guide:
https://www.enlightenment.org/contrib/docs/eo-guide.md
2019-09-02 16:24:26 +02:00
Cedric BAIL 83700fe13c ecore: remove efl_loop_{un,}register from .eo.
We have to keep this as an API, but binding do not need to see it at this point.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9297
2019-07-17 21:57:58 +02:00
Cedric BAIL 0aba6030bd ecore: rely on efl_provider_{un,}register to do the job of efl_loop_{un,}register.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9294
2019-07-17 21:57:55 +02:00
Xavi Artigas 205193f1ab docs: Add @since 1.22 to all stable classes' EO docs
Summary: Previous @since tags have already been removed from eo files.

Test Plan: Everything builds, but stable classes now have Since tags in the docs.

Reviewers: zmike, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8446
2019-03-22 16:57:36 +01:00
Marcel Hollerbach f493e0e676 ecore: declare efl_app and the inherits stable
fix T7556
fix T7514
fix T7514
fix T7514

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8001
2019-03-06 11:34:55 -08:00
Marcel Hollerbach cc9f236a29 efl_loop: remove message_handler_get
it appears that this could be emulated with other functions. Plus the
function had the limitation, that no constructors could be used.

ref T7597

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7985
2019-02-21 19:13:41 +01:00
Marcel Hollerbach 078ccd1ca9 efl_loop / efl_app: make efl_app / efl_loop abstract
this is done inorder to ensure that noone ever thinks of creating theire
own app/loop object.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7982
2019-02-21 19:13:39 +01:00
Marcel Hollerbach 08908373f7 efl_loop: document and annotate efl_loop_time correctly
this adds over the documentation of the legacy header.
Additionally set is defined as protected.

ref T7597
2019-02-21 08:56:13 +01:00
Marcel Hollerbach 5ee81f7720 efl_loop: declare this class function to the object
we pass the object as first argument, so everything is just like object
function, thus we can declare it like this.

ref T7597
2019-02-21 08:56:13 +01:00
Xavi Artigas 333330a6e5 Mark BETA classes individually
Summary:
Instead of surrounding all the #include "*.eo.h" lines in Efl.h
with #ifdef EFL_BETA_API_SUPPORT, include these files unconditionally, but mark
all classes as @beta in the eo files.
This will allow taking them out of beta one by one as we deem them stable enough.
Otherwise, the current procedure involves moving the #include line out of the
ifdef block, which is cumbersome and messes include order.

Depends on D7950
Fixes T7692

Test Plan: Nothing changes

Reviewers: zmike, bu5hm4n, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7692

Differential Revision: https://phab.enlightenment.org/D7951
2019-02-14 17:46:50 +01:00
Marcel Hollerbach 06160466e8 Revert "Revert the env object because it's broken portability - please redo"
This reverts commit d6294fa22b.
2019-02-12 21:34:27 +01:00
Carsten Haitzler d6294fa22b Revert the env object because it's broken portability - please redo
setenv and unsetenv are not portable. i explained to you at fosdem
there are issues and it's why i used putenv in the original
implementation and even though it's a pain (the string tou pass to
putenv is a pointer used literallt from there on in and you get it
from getenv, thus making ownership a pain -this is a libc issue we
can't readily solve). use putenv like the original code. then put it
back in. vtorri now has windows porting issues with the setenv use. i
knew there was a reason that still existed...

in addition your in_sync stuff is broken.  psuedocode:

// assuming BLAGH env is not set to anything here
c = efl_core_env_get(global_env, "BLAH");
...
putenv("BLAH=10");
...
c = efl_core_env_Get(global_env, "BLAH");

i will get NULL in both cases for c ... but i should get "10" for the
2nd in reality. reality is lots of code across application code and
libraries will at times mess with the environment. it has to work with
this. the prior implementation did work with this.

Revert "ecore: here comes a env object"
  This reverts commit 2373d5db5b.

Revert "efl_task: remove env from this object"
  This reverts commit c3d69f66a6.
2019-02-12 20:22:28 +00:00
Marcel Hollerbach c3d69f66a6 efl_task: remove env from this object
the env operations are moved to the efl.core.env objects, which can be
used there.

Differential Revision: https://phab.enlightenment.org/D7514
2019-02-12 11:19:28 +01:00
Marcel Hollerbach 20ddd4c679 efl_app: introduce app_main for getting the app object
This brings in the possibility to receive the app object from bindings.
With the app object you can listen to pause / args / terminate / resume
events.

fix T7509

Differential Revision: https://phab.enlightenment.org/D7480
2018-12-20 12:56:54 +01:00
Daniel Kolesa c8e0a1d2e2 eolian: implement new syntax for inheritance
This new syntax separates the parent class from extensions, in
a familiar way to similar to e.g. Java. Since changing everything
at once is a lot of effort, implement it alongside for the time
being.
2018-11-23 13:57:07 +01:00
Myoungwoon Roy, Kim e06a9b6acf docs: Fix typos and some wrong expressions in API reference doc.
Summary: I had fixed some typos and some wrong expressions in API reference doc

Test Plan: N/A

Reviewers: raster, zmike, Hermet, segfaultxavi

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6943
2018-08-30 14:01:21 +09:00
Cedric BAIL 93893def9f ecore: properly handle shutdown of Efl.Loop children by using invalidate.
Differential Revision: https://phab.enlightenment.org/D6077
2018-05-24 16:02:18 -07:00
Xavi Artigas 35bbedc96f efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).

In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).

Test Plan: make with c# bindings works, make check and make examples work too.

Reviewers: cedric, q66, lauromoura

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6169
2018-05-19 01:42:26 +02:00
Daniel Kolesa 577c00789a eolian: second batch of unused import removals
This fixes all remaining occurences introduced by false negatives
in 6bcd70f01d. The rest was already
fixed in 6be3809c04.
2018-05-13 18:13:12 +02:00
Daniel Kolesa 6be3809c04 eolian: first batch of unused import removals
Initial results of our static analysis showed a bunch of unused
imports or imports used only for documentation references. In the
first case, remove entirely, in the second case, change to 'parse'
in order to keep references working.

The static analysis is not perfect and yields false negatives for
certain cases, so there will be a second batch later.
2018-05-13 17:28:47 +02:00
Daniel Kolesa f58bdbf23a eolian: switch Eina.Future instances to future<T> 2018-05-03 17:14:39 +02:00
Xavi Artigas 23c303f87b Efl.Loop_* (from Efl.Loop.*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:04:03 -07:00
Carsten Haitzler 6391a13558 efl.task - move to returning future insead of bool + exit event
title says it all...
2018-03-20 20:56:46 +09:00
Carsten Haitzler aabbb211ea efl.task - add an api to clear environment 2018-03-03 18:01:05 +09: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 3dbca39f98 efl: move signal events from efl.loop to efl.app
these are process-wide and not loop-specific
2018-02-26 14:02:51 -05:00
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Carsten Haitzler 47ff2d8126 ecore - start work on efl task/exe/thread
this is  astart of the work for having a common task class/interface
between loops, threads ane exe's so the i/o is all symmetric and works
the same way between all of them as well as similarly for launching
and knowing when the exit etc. etc.

this is not final and not perfect, but it's a start. comments of
course welcome
2018-02-21 16:56:38 +09:00
Carsten Haitzler f62e051343 efl signals - add signal callbacks for minimal signal set on loops
this willonly apply to the main loop, but to be able to see these
signals as callbacks, we have to expose them. term/quit/int are
already handled internally where the loop will terminate (efl will
enforce this) AND ... there is a terminate event already on the loop
to deal with this cleanup. other signals really arent applicable IMHO
except usr1/2 and hup.
2018-01-06 18:49:07 +09:00
Cedric BAIL c19ef91020 Revert "efl_loop: move scheduler_get to eo API"
This reverts commit f910ba248e.

The scheduler is meant to be used only in C, not by bindings so there isn't really
a use for it in the loop class. Now this patch was triggered due to complexity in
using future/promise, so will do a follow up patch to improve that.
2018-01-03 11:21:34 -08:00
Andy Williams f910ba248e efl_loop: move scheduler_get to eo API 2018-01-03 12:46:06 +00:00
Andy Williams e942dd6420 Eo docs: update for grammar and readability 2017-12-20 09:41:46 +00:00
Cedric BAIL 29d4cb864b ecore: make message_process and message_exists internal function. 2017-12-18 16:10:11 -08:00
Carsten Haitzler d9e149eb4d efl loop message stuff - document the eo files. 2017-12-16 12:09:52 +09:00
Carsten Haitzler 5dd52fd09b ecore - begin moving data into the efl loop data in the object
we really should have data inside the loop object, so begin moving it
one small thing at a time. this is the basics that will allow multiple
efl loops. make an eo efl object and class for fd handlers that is efl loop
bound make fd handlers really bound to their parent loop and not global  as
well as have a nice class/obj. create an message queue per loop and
put legacy ecore events on top of it... and a lot more.

this is not 100% done, but it's a lot of the core and groundwork.
various ecore_timer_add(), ecore_diler_add() etc. need changes.

The following still need doing:

  ecore_timer (internal usage for sure)
  ecore_idler (internal usage for sure)
  ecore_idle_enterer
  ecore_idle_exiter
  ecore_pollers? (is the new efl loop stuff ok?)
  ecore_exe (fork/spawn from any thread and track exe from that thread?)
  ecore_signal code
  ecore_throttle (should we have a single global too? we have per loop)
  ecore_app ? (should every loop be given its own argv/argc?)

Lots of internal ecore code uses/calls these legacy calls and we
should have efl loop replacements and/or use the ones we have

The following will bedifferently designed for loop to loop
control/messaging/ipc:

  ecore_thread
  ecore_pipe
2017-12-15 14:16:53 +09:00
Cedric BAIL c976f16606 ecore: rename efl_loop_Eina_FutureXXX_idle to efl_loop_idle 2017-12-11 14:04:09 -08:00
Cedric BAIL d614894d04 ecore: rename efl_loop_Eina_FutureXXX_job to efl_loop_job. 2017-12-11 14:04:09 -08:00
Cedric BAIL d95a0a1377 ecore: remove efl_loop_job(). 2017-12-11 14:04:09 -08:00
Cedric Bail 25747d0881 ecore: rename efl_loop_Eina_FutureXXX_timeout to efl_loop_timeout. 2017-12-03 16:30:53 -08:00
Cedric Bail d0518f7325 ecore: remove efl_loop_timeout. 2017-12-03 16:20:20 -08:00
Daniel Kolesa 4f5b72a3ed eo files: convert various to use @cref 2017-11-02 16:41:01 +01:00
Cedric Bail 1c82250994 ecore: efl_loop should actually handle exit via Eina_Value.
This is for binding consistency. Example with python :
sys.exit("Bye, world")

Which with efl would be :
loop.quit("Bye, world")

T6228
2017-10-27 15:34:42 -07:00
Cedric BAIL 5c14be4ecf ecore: we need a different event for tracking the lifecycle of the main loop.
If the main loop is destroyed a lot of companion information might already
have been so relying on EFL_EVENT_DEL might be way to late in the shutdown
process. terminate will be triggered as soon as the process of shutting down
is started, so all the data are still valid and have not been destroyed yet.
2017-09-26 10:15:07 -07:00
Cedric BAIL ec9869b933 ecore: start adding life cycle support to Efl.Loop.
pause event is triggered when no more windows are visible to any user.
resume event is triggered when a window make the application visible
for the first time to the user after a pause or when starting the application.
2017-09-25 15:47:00 -07:00
Cedric BAIL 8400859213 ecore: make efl_loop_future_scheduler_get shouldn't be exposed in the object function.
Function declared in a .eo are something that we want to allow people to inherit from
or use in a binding. I can't think of a situation where that would be the case for
this function and it solves at the same time problem of needing a shared interface
for both loop and loop_user.
2017-09-18 13:33:34 -07:00
Daniel Kolesa 8f6ba61011 ecore: convert existing eo files to new ownership 2017-09-15 16:51:37 +02:00
Gustavo Sverzut Barbieri 22cee38239 Efl_Loop: add job, timeout and idle based on Eina_Future.
Since some clash with old version, then add Eina_FutureXXX to their
name, later we'll sed.
2017-09-04 10:24:00 -03:00
Guilherme Iscaro 5bd8c9a78d Eina: Add Eina_Promise/Eina_Future.
This commit adds a new promise/future API which aims to replace
efl_future.
2017-09-04 10:24:00 -03:00