Commit Graph

114 Commits

Author SHA1 Message Date
Daniel Zaoui 9eb2d0e685 Remove EAPI that were not supposed to be.
vtorri is hot today!!!

Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>

SVN revision: 78303
2012-10-21 08:17:08 +00:00
Yakov Goldberg dbda81582a Porting to Eo: Job, Animator, Idler, Idle_Enterer, Idle_Exiter, Timer, Ecore_Poll
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>

SVN revision: 77722
2012-10-10 08:19:58 +00:00
Cedric BAIL 6d2b2f366f ecore: force pthread_join even when main loop isn't running.
pthread_create can fail if to much pthread are pending. As pthread_join
is only called when the main loop can flush the async call list, there was
a possibility for edje_cc to run out of thread due to that. We know
force the flush of the async call list and so call pthread_join when
pthread_create fail.


SVN revision: 71555
2012-05-30 12:14:34 +00:00
Gustavo Sverzut Barbieri e107124555 remove EAPI from _ecore_event_signal_user_new().
It should never	be exported outside of libecore.so


SVN revision: 70176
2012-04-13 15:36:42 +00:00
Cedric BAIL d55504f4e5 ecore: remove an impossible to track assert.
NOTE: I am now all for removing this lock. They trigger crash,
are not implementing the feature they are advertising, are not
maintained and impossible to fix.


SVN revision: 68987
2012-03-07 16:11:55 +00:00
Cedric BAIL 34c0022210 ecore: people are still hurt by that assert.
NOTE: I think that this code should be removed as it is useless, will never
work as expected and nobody care anymore about it.


SVN revision: 68477
2012-02-27 14:40:02 +00:00
Cedric BAIL c1f2c6f682 ecore: add Exotic support.
SVN revision: 68402
2012-02-24 11:20:25 +00:00
Mike McCormack 844431ed06 ecore: Fix modularity
This also fixes the glib build.

Signed-off-by: Mike McCormack <mikem@ring3k.org>

SVN revision: 66091
2011-12-11 08:29:35 +00:00
Mike Blumenkrantz b0b7fc46b2 #undef header macro
SVN revision: 65834
2011-12-03 03:42:41 +00:00
Mike Blumenkrantz 54a2db0044 mempools++
SVN revision: 65833
2011-12-03 03:39:07 +00:00
Carsten Haitzler 58cbf16625 ran ecrustify on ecore. some manual fixing too.
SVN revision: 64238
2011-10-21 05:40:39 +00:00
Youness Alaoui bbbf959e77 Ecore: Oups, typo, check for PS3 with __lv2ppu__ and not __ppulv2__
SVN revision: 63504
2011-09-20 22:06:33 +00:00
Youness Alaoui df10c78174 Ecore: Do not declare the siginfo_t and signal functions for the PS3
SVN revision: 63465
2011-09-18 21:57:38 +00:00
Carsten Haitzler f67bdb7c37 mainloop cleanups on top of previous ones and fixes for previous refactors
SVN revision: 63082
2011-09-02 03:29:11 +00:00
Mike McCormack bfffcce2fe ecore: Create a lockless ecore_event_handler_del
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 62375
2011-08-12 05:22:16 +00:00
Mike McCormack 01e790ed40 ecore: Create a lockless ecore_main_fd_handler_del
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 62374
2011-08-12 05:22:07 +00:00
Mike McCormack a541e19c16 ecore: Use eina locks for _ecore_lock()
Always count lock calls too.

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 62372
2011-08-12 05:21:49 +00:00
Mike McCormack f05e37addf ecore: Create callback wrappers
This gets rid of a lot of temporary variables and cleans the code up again...

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 62342
2011-08-11 10:59:48 +00:00
Cedric BAIL 6ac11a9806 ecore: remove bad macro from ecore.
SVN revision: 62241
2011-08-09 08:50:47 +00:00
Mike McCormack 5c8256e337 ecore: Add main loop thread safety
Thread safety is disabled by default.
Enable it with --enable-thread-safety

Should cover timers, events, animators, idlers and fd handlers.

Tested with Enlightenment and elementary_test.

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 61851
2011-07-28 12:01:16 +00:00
Mike McCormack c94a9eff7f ecore: Remove most #ifdef HAVE_EPOLL blocks
Replace with if statements and stub epoll calls, and let the
compiler optimize out the stub code.

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 61081
2011-07-06 10:54:30 +00:00
Mike McCormack f7ec79e13e ecore: Add function to check we're the main loop thread
Rearrange the the order of startup to avoid triggering
the thread checks in ecore_event_type_new().

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 61040
2011-07-05 11:13:20 +00:00
Carsten Haitzler 9bbe57e6e6 add ecore_throttle
SVN revision: 60756
2011-06-28 12:34:52 +00:00
Cedric BAIL 707f908ba1 ecore: add ecore_pipe_wait.
SVN revision: 60135
2011-06-09 14:54:24 +00:00
Mike Blumenkrantz 677b5d0c73 this adds a small helper function for use in finding cases where the epoll fd gets deleted and calls it after each fdh function
if epoll support is not enabled, the function does nothing
this will be removed prior to actual release, but will be very useful in finding the last epoll bugs until then


SVN revision: 55791
2011-01-01 03:07:58 +00:00
Iván Briano 1277d5b855 Dead code bye bye
SVN revision: 53497
2010-10-16 21:32:08 +00:00
Vincent Torri 16263f52cc tab--
SVN revision: 52918
2010-09-30 06:09:20 +00:00
Lucas De Marchi 162070b8f5 Respect namespace
_ecore_loop_time -> _ecore_time_loop_time



SVN revision: 52825
2010-09-27 22:35:55 +00:00
Lucas De Marchi d17de81175 Make ecore_time_get and friends use monotonic clock
Instead of relying on unix time, use a monotonic clock provided by
clock_gettime(). If a monotonic clock is not available, it will fallback
to CLOCK_REALTIME or unix time if neither is available.

The impact is that now it only makes sense to call ecore_time_get() or
ecore_time_loop_get() if the value retrieved is intended to be used as
relative to previous/posterior measurements. If an absolute value is
needed, the right function to call now is ecore_time_unix_get() which
will give the number of seconds since Jan 1st, 1970, 12:00AM.



SVN revision: 52824
2010-09-27 22:35:35 +00:00
Mike McCormack 3bdbb34d64 From: Mike McCormack <mj.mccormack@samsung.com>
This patch implements the ecore main loop in terms of the GTK main loop, so
ecore is a layer on top of glib.

Compared the the current glib integration in ecore, this has the added
advantage of allowing use of EFL libraries in GTK.



SVN revision: 51113
2010-08-14 11:19:03 +00:00
Mike Blumenkrantz a475971aaa convert all function pointers to typedefs, add doxy stubs for typedefs.
note: I've chosen to consolidate typedefs where possible to simplify things

my time is limited this week, so feel free to expand on the doxy stubs I've added if you know what they do


SVN revision: 50803
2010-08-04 02:55:20 +00:00
Carsten Haitzler eaad0eb095 big patch from Samsung SAIT (Advanced research group) for async multi-frame
rendering. to turn on:

1.
configure with --enable-async-render
2.
export EVAS_RENDER_MODE=non-blocking
  
presto. necessitates some api swizzling (thus the expedite. ecore etc. changes)

the kind of results you get on a desktop:

http://www.rasterman.com/files/evas-async-vs-none.html



SVN revision: 49087
2010-05-21 07:10:45 +00:00
Carsten Haitzler e8d5b972b4 --enable-glib-integration-always <- option. can be disabled by
ecore_main_loop_glib_always_integrate_disable() before ecore_init()



SVN revision: 47360
2010-03-22 03:30:40 +00:00
Gustavo Sverzut Barbieri b9c3b58561 events (also filters and handlers) now have reference counting.
Add reference counting to events, event filters and event handlers so
they can recurse main loops.

Note that the required "continuation" when entering main loops is not
there, thus recursion will restart and this will fail badly in lots of
cases. This should be fixed in future commits.



SVN revision: 46417
2010-02-24 01:16:00 +00:00
Gustavo Sverzut Barbieri dbc4a40265 Fix the bug of the first timer being added from idler.
We should start doing unit-test for ecore, accumulating these
problems. Follows the test case:

#include <Ecore.h>
#include <Eina.h>

static int _log_dom;
#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)

static int quiter(void *data)
{
    INF("quit!");
    ecore_main_loop_quit();
    return 1;
}

static int idler(void *data)
{
    INF("idler");
    return 1;
}

static int cb1(void *data)
{
    INF("cb1");
    ecore_timer_add(0.0, quiter, NULL);

    return 0;
}

int main(void)
{
    ecore_init();

    _log_dom = eina_log_domain_register("test", EINA_COLOR_CYAN);

    /*
     * Create a main loop with just idlers, there is a special case
     * for just idlers without timers in ecore.
     *
     * From idler, add a timer that quits the application. It should
     * always quit.
     *
     * If it does not quit, then there is a bug of new timers not
     * being immediately detected and system never exits idle.
     */

    INF("main: begin");
    ecore_idler_add(cb1, NULL);
    ecore_idler_add(idler, NULL);
    ecore_main_loop_begin();
    INF("main: end");
    return 0;
}




SVN revision: 46405
2010-02-23 21:04:38 +00:00
Cedric BAIL 44193541f7 * ecore: Move ecore_job inside ecore.
Patch from Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>.


SVN revision: 45570
2010-01-25 21:59:21 +00:00
Vincent Torri a4b0afb1e4 * move structures from ecore_private.h to the corresponding source files
* add 2 internal ecore_exe functions as ecore_signak.c uses Ecore_Exe members
   no test is done in those 2 functions
 * remove standard headers from ecore_private.h



SVN revision: 44862
2010-01-03 21:55:50 +00:00
Sebastian Dransfeld 0a9456ccf7 Remove duplication from ecore headers
Clean up Ecore.h and ecore_private.h

SVN revision: 44664
2009-12-22 21:15:12 +00:00
Cedric BAIL d8e1895350 * ecore: Use eina_log.
Patch from Mathieu Taillefumier.


SVN revision: 44637
2009-12-21 17:32:19 +00:00
Vincent Torri f4e1c3a9b9 * add a _del function for win32 HANDLEs
* delete HANDLES when asked
 * minor fixes in the win32 code

SVN revision: 43939
2009-11-23 23:09:48 +00:00
Cedric BAIL 060153934a * ecore: Fix ecore_timer_freeze during timer execution.
SVN revision: 43667
2009-11-13 17:37:43 +00:00
Carsten Haitzler 06b3646593 fix build!
SVN revision: 43260
2009-10-25 10:11:59 +00:00
Vincent Torri f5fec31eb9 wait on HANDLES in the select loop on Windows.
SVN revision: 43253
2009-10-25 07:07:48 +00:00
Vincent Torri b7bd2998c4 ecore_exe for Windows.
Not complete yet but it executes a command and kills it
TODO: pipes


SVN revision: 43112
2009-10-16 09:17:26 +00:00
Vincent Torri 43d3c84907 no need for ref count in ecore_thread init/shutdown functions
SVN revision: 42991
2009-10-10 03:24:56 +00:00
Gustavo Sverzut Barbieri 728841b576 welcome glib main loop integration support.
that's it, it's here... tested and works fine, please try with your
favorite gmainloop dependent library and report problems. Suggestions:

  * GConf to access Gnome and its applications settings.
  * GtkSettings to access other properties of Gnome and its applications.
  * GUPnP (okay, we have EUPnP, but they have more features so far)
  * Rygel, based on GUPnP.
  * Libsoup, SOAP and HTTP access, useful for web access and required
    by other libraries.
  * Mojito, by Moblin, access to various web2.0 services like flickr,
    picasa, twitter...

And last but not least, this enables Flash plugin on WebKit-EFL and
may enable us to get Google Gadgets sooner (before someone writes a
proper EFL backend).

Support is auto-detected at compile time but can be disabled with
--disable-glib. Runtime support is not enabled by default (so
compiling with it will just link yet another library), one needs to
call ecore_main_loop_glib_integrate() to do so.

Thanks to INdT folks that provided the initial implementation. I
rewrote it to make it correct, but the idea was good.



SVN revision: 42825
2009-10-01 03:56:38 +00:00
Vincent Torri d8acbfc6f6 rename ecore_thread_init and ecore_thread_shutdown to fit usual private function names
SVN revision: 42240
2009-09-04 05:49:54 +00:00
Cedric BAIL 2bb8e5ad8e * ecore_thread_run: Add a facility to run heavy code in another thread
that still integrate cleanly with the EFL.

	ecore_thread_run need two callbacks :

	* func_heavy is called from another thread and should not use the
	EFL except Eina, but carefully.

	* func_end is called when func_heavy is done, but from inside ecore
	main loop, so you can at this point call every EFL functions without
	fear.

	Note :

	The system automatically detect how many CPU you have and will spread
	the load on all of them.

	You must not assume that the result will come in the same order you
	requested it. Depend on each CPU load and how heavy the function on it
	are.



SVN revision: 41555
2009-07-31 17:06:11 +00:00
Cedric BAIL d5757de0c9 * ecore: Remove Ecore_List2 at all.
SVN revision: 41074
2009-06-17 11:47:28 +00:00
Cedric BAIL 8e392a0742 * ecore: Remove user of Ecore_List2 from ecore events.
SVN revision: 41070
2009-06-17 11:39:37 +00:00