Commit Graph

63 Commits

Author SHA1 Message Date
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 1ecbe5cffb ecore: add Efl_Core.h 2017-10-27 18:51:38 -07:00
Taehyub Kim 5360034675 ecore: remove doxygen warning messages
Summary:
remove doxygen warning messages
@fix

Reviewers: jpeg, cedric, woohyun

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D5339
2017-10-18 19:24:28 +09:00
Jean-Philippe Andre 5971277e71 ecore: Try to fix build
ecore_types.eot does not exist anymore.
2017-05-29 13:36:51 +09:00
Jean-Philippe Andre 71678f301a ecore: Remove ecore_types.eot
This moves one enum from EO to legacy only (Ecore_Pos_Map).
Ideally the type should be in Ecore_Legacy and no Common, that
can be done later.

Ref T5522
2017-05-29 10:49:16 +09:00
Cedric BAIL 614c255f3b ecore: add ecore_event_type_flush.
During shutdown it is possible that some event are still in ecore events
queue and get processed after the shutdown of the module that did emit them.
This would lead to crash in some case. The answer to this problem is to
normally manually track all ecore event in the queue and destroy them
before shutdown... Of course that make the API difficult to use and
basically nobody got it right.

This new API do actually as it says remove all the ecore event of a
certain type from ecore events queue. It is to be called on shutdown.

@fix
2017-03-09 16:17:58 -08:00
Myoungwoon Roy, Kim 0f446c10be doxygen: fix typos, cacologique statements in API reference doxygen of Ecore_Common
Summary: There are some typos and calogique statements in doxygen of Ecore_Common so I had fixed typos, cacologique statements.

Test Plan: doxygen revision

Reviewers: stefan, cedric, raster, Jaehyun_Cho

Subscribers: conr2d, jpeg

Differential Revision: https://phab.enlightenment.org/D4650

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-08 11:09:18 -08:00
Cedric BAIL 08c3102dc0 ecore: remove ecore_thread_promise_run. 2016-11-07 10:49:02 -08:00
Gustavo Sverzut Barbieri 564e499467 ecore_init() use getenv(ECORE_NO_SYSTEM_MODULES) and disable those.
Sometimes during debug of efl_net we get some "extra" sockets from
DBus to talk to upower, localed, timedated... which are helpful in
real life, but pollutes debugging.

Since I don't want to contaminate examples with
ecore_app_no_system_modules(), which could lead users to naively copy
those and end without the system modules features, add an envvar that
I can define in my tests when I need them.
2016-10-27 09:33:09 -02:00
Cedric BAIL 6c514dddb3 ecore: add a prototype ecore_thread helper with Efl_Promise/Efl_Future coupled. 2016-09-26 16:35:52 -07:00
Gustavo Sverzut Barbieri 960e1a1d16 eina/ecore: allow threads to be canceled, use in ecore_con.
As discussed in the mailing list, many people will use worker threads
to execute blocking syscalls and mandating ecore_thread_check() for
voluntary preemption reduces the ecore_thread usefulness a lot.

A clear example is ecore_con usage of connect() and getaddrinfo() in
threads. If the connect timeout expires, the thread will be cancelled,
but it was blocked on syscalls and they will hang around for long
time. If the application exits, ecore will print an error saying it
can SEGV.

Then enable access to pthread_setcancelstate(PTHREAD_CANCEL_ENABLE)
via eina_thread_cancellable_set(EINA_TRUE), to pthread_cancel() via
eina_thread_cancel(), to pthread_cleanup_push()/pthread_cleanup_pop()
via EINA_THREAD_CLEANUP_PUSH()/EINA_THREAD_CLEANUP_POP() and so on.

Ecore threads will enforce non-cancellable threads on its own code,
but the user may decide to enable that and allow cancellation, that's
not an issue since ecore_thread now plays well and use cleanup
functions.

Ecore con connect/resolve make use of that and enable cancellable
state, efl_net_dialer_tcp benefits a lot from that.

A good comparison of the benefit is to run:

   ./src/examples/ecore/efl_io_copier_example tcp://google.com:1234 :stdout:

before and after. It will timeout after 30s and with this patch the
thread is gone, no ecore error is printed about possible SEGV.
2016-09-14 01:47:23 -03:00
Jean-Philippe Andre 87d1b3f7c4 elm: Hide new init APIs behind BETA tag
This places the following behind beta:
- efl_quicklaunch_fallback
- efl_build_version_set

I don't think EFL_MAIN would have worked without BETA API support,
so no need to expose those for now.

@fix
2016-08-16 17:33:05 +09:00
Tom Hacohen bf772125e8 Eo: Move Eo back into beta.
Eo should now be considered beta again. This commit puts it back in beta
and makes it necessary to define EFL_BETA_API_SUPPORT before including
Eo.h.
2016-08-02 16:34:35 +01:00
Jean-Philippe Andre 45cd0465a4 efl: Add Efl.Version struct and APIs
The original idea behind knowing the app's version of EFL is not
a great story. It comes from the fact that some bugs exist in
earlier versions of EFL, and some things need to be fixed. But
those fixes may break behaviour for older apps. This patch is
opening the way to the slippery slope of bug compatibility.

Unfortunately this is a requirement if we want to be able to move
forward and not break apps when we fix bugs (behaviour or ABI).

I hope we will not need to implement too many (if any) workaround
such issues. For now, this will only be used as debugging info.

EFL_MAIN() and ELM_MAIN() will both set the app's EFL version
automatically at startup time. Some internal helpers can be added
later to check how the app build-time and run-time version of
EFL differ.

@feature
2016-06-29 15:01:34 +09:00
Cedric BAIL 5cc16b1c29 ecore: remove Ecore_Animator Eo object.
This is only a legacy API.
2016-06-03 17:00:12 -07:00
Felipe Magno de Almeida 8fec0d5139 eina: Remove unnecessary indirection to promises
Now when dealing with pointer types, we will not get pointer to
pointer semantics in callbacks and eina_promise_owner_value_set
for Eina_Promise.

It will work as expected:

Eina_Promise_Owner* promise = eina_promise_add();

void* p = malloc(sizeof(T));
eina_promise_owner_value_set(promise, p, &free);
2016-06-03 17:22:12 -03:00
Jean Guyomarc'h 198326fbd2 ecore: fix typo in documentation of Ecore_Exe_Event_Del 2016-05-06 22:18:57 +02:00
Cedric BAIL c1141c7b0b ecore: remove dead Ecore_Job eo object. 2016-05-03 13:31:43 -07:00
Cedric BAIL 3108f023ba ecore: move ecore idle exiter to relly on the factorized main loop event. 2016-04-21 14:49:00 -07:00
Cedric BAIL e87e501230 ecore: remove useless define 2016-04-21 14:49:00 -07:00
Cedric BAIL 5c87f2762f ecore: use new refactorized idle infrastructure to make idle enterer rely on mainloop events 2016-04-21 14:07:49 -07:00
Cedric BAIL 7c62154d52 ecore: allow for possible factorization of all idler event. 2016-04-21 14:07:49 -07:00
Cedric BAIL 3ff21c021d ecore: move Ecore_Idler to legacy and rely on Eo event restart capability. 2016-04-21 12:07:50 -07:00
Jean Guyomarc'h ca346eb273 ecore: fix documentation of Ecore_Exe_Event_Del 2016-04-09 21:52:39 +02:00
Felipe Magno de Almeida 887608e146 ecore: add promise for Ecore_Thread
Add ecore_thread_promise_run function that returns a Promise
and runs function in another thread which you can set the
value on a Eina_Promise_Owner.

Eina_Promise* promise;
Ecore_Thread* thread = ecore_thread_promise_run
( &function_heavy, &cancellation_function, private_data,
sizeof(ValueType), &promise);

This calls function_heavy on another thread and returns
the Ecore_Thread and a Eina_Promise as an out-parameter.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-05 11:35:12 -07:00
Tom Hacohen 2bddf709c7 Ecore poller: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-16 14:00:46 +00:00
Tom Hacohen 57cb1d8ec0 Ecore exe: Move more structs and enums to Eolian. 2016-02-12 14:29:27 +00:00
Felipe Magno de Almeida e1de58a3ad efl: Renamed Ecore.Time to Efl.Time and defined it
Moved the Ecore.Time @extern struct to Efl lib and defined it as
specified in C specification for struct tm. Thus, bindings can be
automatically generated for where struct tm is used.
2016-02-09 13:28:25 -02:00
Vitor Sousa 0e8ce5dd23 ecore: move Ecore_Pos_Map to ecore_types.eot
Move Ecore_Pos_Map from Ecore_Common.h to ecore_types.eot.
Give it the namespaced Eolian name "Ecore_Pos_Map" to follow the
standards.

Update documentation to refer to Ecore_Pos_Map instead of its previous
enum definition "_Ecore_Pos_Map".
2016-02-09 11:38:58 -02:00
Vitor Sousa c674f64a07 ecore: create ecore_types.eot and add Ecore.Time to it
Create the file ecore_types.eot to hold common types related with Ecore.

Add Ecore.Time as an external type to ecore_types.eot.
This type is intended to be a alias to struct tm (from time.h).
That way .eo files have a standard way to reference it.
Each language should manually bind it.
2016-02-09 11:38:58 -02:00
Carsten Haitzler 594dab8078 ecore docs - adjust docs to be explicit about ecore main loops nesting
it seems some people think ecore main loops can nest. they can't. be
explicit in docs.
2015-10-05 16:04:31 +09:00
Amitesh Singh 5f74afe4f7 ecore: fix typos in documentation 2015-09-28 15:49:11 +05:30
Vinícius dos Santos Oliveira d744223f6d ecore: add documentation for ecore_timer_dump 2015-05-15 10:29:35 +02:00
Stefan Schmidt eae15fbb28 ecore: Move documentation for ecore_timer_add at the correct place.
Many thanks to Vinicius dos Santos Oliveira for spotting this and
pointing it out on the mailing list.
2015-04-01 10:23:00 +02:00
Stefan Schmidt 5eb2d474ff ecore: Add since tag for new ecore_thread_wait() API
Added in this cycle but no since tag was given.
2015-01-27 11:35:54 +01:00
Cedric BAIL e5ddfb4b2b ecore: add ecore_thread_wait and necessary infrastructure.
This enable the possibility to block the main loop until a
specific thread is done. It may trigger still process ending
of other thread during that function call, but not any other
type of event (timer, animator, idler, ... are all ignored).
2015-01-07 16:45:07 +01:00
Carsten Haitzler 0e4cfade80 ecore animator pos map - move from v[] array to *v pointer.
this moves from double v[][ as a param to double *v - which is more
consistent with the rest of efl. this shouldnt be an abi break.
2014-12-17 17:00:11 +09:00
ChunEon Park 8df0c5cf6d ecore/animator: improve the doc description. 2014-12-09 16:51:08 +09:00
Mike Blumenkrantz 0c6844707f upower module now errors and kills itself off when unsupported new version detected
0.99.0 removed the OnLowBattery property and added the per-device WarningLevel property. this requires what will effectively be a full rewrite of the module to track all the power levels of all the attached batteries and set the ecore power level somehow based on a combination of their levels

since I have no desire to spend any more hours working on and debugging this module which is based on a known-unstable api, I'm making it disable itself if it detects a version >= 0.99.0. hopefully someone will decide to maintain both this and eldbus in the future so that we can more accurately track upstream when they make changes to these things

ref T1908

ref T1909
2014-12-08 15:22:19 -05:00
Stefan Schmidt e291b3c226 ecore: Fix @since version to 1.13 for new API
1.3 is acient so we really will release this with 1.13.
Removed some trailing whitespaces devilhorns added. :)
2014-12-04 15:02:34 +01:00
Chris Michael 607026d3c6 ecore: Add a new API function ecore_main_loop_nested_get
Summary: This commit adds a new function 'ecore_main_loop_nested_get'
so that we can detect if the ecore_main_loop is running.

NB: This is going to be needed for a new eldbus function that we have
to add in order to handle a use-case on the Wayland side. Spoke with
cedric for a while wrt to all this, and he gave it his 'ok' ;)

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-04 08:58:10 -05:00
Daniel Juyung Seo 29abdd9ca4 ecore: Add warnings to the public internal APIs.
These APIs were not meant to be exposed so it is not recommended to
use them out side of EFL. We had to expose them to use them between
EFL libraries. (Talked with Raster)
2014-11-25 19:30:16 +09:00
Pierre Le Magourou f59359d5be ecore: update missing Ecore_Common.h API documentation.
Add some new documentation when missing, and fix old documentation
warnings in Doxygen output.
2014-10-20 18:17:26 +02:00
Nicolas Aguirre 0bbcef65ab ecore: add documentation for Ecore_Version structure. 2014-10-20 18:01:49 +02:00
Daniel Juyung Seo b8ce446c2b ecore: Add more documentation for ecore_animator_source_set(). 2014-10-13 14:56:19 +09:00
Cedric BAIL 7e0631eafb ecore: fix documentation. 2014-09-09 18:10:48 +02:00
Jérémy Zurcher 4cbdd93b13 Ecore_Common: protect against Ecore_Exe redefinition 2014-08-22 09:20:32 +02:00
Tom Hacohen eed11ac529 Ecore Exe: Migrate to eo. 2014-08-21 11:02:11 +01:00
Daniel Kolesa bb24b60638 eolian: generate implicit typedef for each class
And use these typedefs instead of just Eo in API.
2014-08-21 09:26:03 +01:00
Stefan Schmidt 9412a409a2 ecore: Add missing since version for new ecore_loop_time_set()
Introuduced during this cycle. Note it down in doxy.
2014-08-07 11:43:14 +02:00