Commit Graph

66 Commits

Author SHA1 Message Date
Jonas M. Gastal faa433a789 Improvements to ecore timer docs.
SVN revision: 69115
2012-03-09 19:21:52 +00:00
Jonas M. Gastal 7c7a6bade4 Splitting time and timer into separte groups.
SVN revision: 69114
2012-03-09 19:21:47 +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 32808c9760 totally meant to write this wrong the first time to see if anyone was watching.
SVN revision: 65878
2011-12-04 23:54:41 +00:00
Mike Blumenkrantz 955e23a8a9 +ecore_timer_reset
SVN revision: 65876
2011-12-04 23:12:06 +00:00
Mike Blumenkrantz 54a2db0044 mempools++
SVN revision: 65833
2011-12-03 03:39:07 +00:00
Vincent Torri cae47a6650 Ecore: fix warning when no timer dump are requested
Patch by Fabien Romano from OpenBSD


SVN revision: 65212
2011-11-14 22:33:34 +00:00
Carsten Haitzler 58cbf16625 ran ecrustify on ecore. some manual fixing too.
SVN revision: 64238
2011-10-21 05:40:39 +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 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
Gustavo Lima Chaves 0603a5cf50 [ecore] Put order in header file, splitting function groups in contiguous chunks.
Sorry for having to pratically rewrite the header, but the other way
    to get docs right would be to put lots of @addtogroup around several
    chunks of the file, which is ugly too and doesn't organize anything.

    I have tested ecore with that and it seems to be okay.



SVN revision: 62307
2011-08-10 19:14:48 +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
Carsten Haitzler e93763d785 fix timer precision handling to do what it was meant to do to begin with
SVN revision: 61730
2011-07-26 07:01:55 +00:00
Mike McCormack 7b1d7bd4a0 ecore: Add basic thread checks
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 61041
2011-07-05 11:13:29 +00:00
Rafael Antognolli 2cb63dce2a ecore - add and fix links to examples on each module description.
SVN revision: 61014
2011-07-04 18:31:02 +00:00
Rafael Antognolli 47cdbe390a ecore/timer - Document ecore_timer_freeze and ecore_timer_thaw.
SVN revision: 60830
2011-06-29 18:15:36 +00:00
Rafael Antognolli 2344ff2a81 ecore/time - Add an example to use the ecore_time_* functions.
It exemplifies the difference between ecore_time_get(), ecore_time_unix_get()
and ecore_loop_time_get(). A description of this example is also provided.



SVN revision: 60557
2011-06-21 17:15:54 +00:00
Cedric BAIL e91adae8b4 ecore: improve ecore_timer_dump.
Now E17 msgbus module will provide an usefull way to
list all the running timer and see if we are not waking up
to often. Use d-feet to see that information.


SVN revision: 59542
2011-05-19 15:38:30 +00:00
Cedric BAIL 52acb710f5 ecore: improve ecore_timer_dump.
SVN revision: 59491
2011-05-18 09:12:07 +00:00
Cedric BAIL 6228ce0d60 ecore: add ecore_timer_dump.
Note: Will add tomorrow code needed inside e17 to dump all created timer.


SVN revision: 59473
2011-05-17 17:32:32 +00:00
Vincent Torri a17c58d0b0 improve doc layout
SVN revision: 53509
2010-10-17 07:03:28 +00:00
Vincent Torri 16263f52cc tab--
SVN revision: 52918
2010-09-30 06:09:20 +00:00
Lucas De Marchi be1b6d32ef Fix common misspellings
Following misspellings were fixed:

alledgedly->allegedly
cant->can't
carefull->careful
consistant->consistent
currenly->currently
dependancy->dependency
descripters->descriptors
doesnt->doesn't
dosen't->doesn't
existant->existent
exmaple->example
inbetween->between
independant->independent
isnt->isn't
mroe->more
neccessary->necessary
occured->occurred
occurence->occurrence
parrallel->parallel
particualr->particular
preceeding->preceding
recieved->received
recieves->receives
seperate->separate
substraction->subtraction
succesfully->successfully
successfull->successful
sucess->success
supress->suppress
usefull->useful
witht->with



SVN revision: 51986
2010-09-08 11:23:42 +00:00
Lucas De Marchi 0a4617ae38 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +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
Rafael Antognolli 3934ad9f68 Fix accounting safeness logic introduced at rev. 50158.
SVN revision: 50202
2010-07-12 17:59:48 +00:00
Gustavo Sverzut Barbieri 747fd6151a be loud about deleting timers, idlers and events more than once.
SVN revision: 50158
2010-07-09 14:52:45 +00:00
Cedric BAIL fbe9064310 * ecore: Ecore callback really should return Eina_Bool.
SVN revision: 49829
2010-06-24 16:15:56 +00:00
Lucas De Marchi 98d843e91b Reschedule timer_current in case of inner mainloop
Timers' list is and *ordered list*. Therefore, timers can be added
before timer_current in an inner mainloop. Reschedule timer_current in
this case before looping through timers' list.

Thanks to Barbieri for the insight.

The following test didn't work before and it's ok now (I'm adding it to
ecore_suite too).

static int _timer3(void *data)
{
printf("timer 3, do nothing\n");
return 0;
}

static int _timer2(void *data)
{
printf("timer 2, quit inner\n");
ecore_main_loop_quit();
return 0;
}

static int _timer1(void *data)
{
int *times = data;
(*times)++;
printf("BEGIN: inner\n");

ecore_timer_add(0.3, _timer2, NULL);
ecore_timer_add(0.1, _timer3, NULL);

ecore_main_loop_begin();
printf("END: inner\n");
ecore_main_loop_quit();

return 0;
}

int main(void)
{
int times = 0;

ecore_init();
ecore_timer_add(1.0, _timer1, &times);
printf("BEGIN: main\n");
ecore_main_loop_begin();
assert(times == 1);
printf("timer1 called %d times \n", times);
printf("END: main\n");
return 0;
}

By: Lucas De Marchi <lucas.demarchi@profusion.mobi>



SVN revision: 49245
2010-05-28 02:31:02 +00:00
Gustavo Sverzut Barbieri 0bdbf9d147 rewrite ecore_timer internals to make it simpler and do better with
recursive main loops.

Unlike idlers, timers seems to work reasonably well with main loops, I
*think* they might fail since it used a boolean to flag running as
opposed to a reference count with incremental increments/decrements. I
could not write a test case to demonstrate so.

The now code should be simpler, particularly the
_ecore_timer_call(). It will also consider the previous position when
entering recursive main loops, preserving the order.

Deletion of timers are delegated to ecore_main.c, that was already
calling _ecore_timer_cleanup() after timers were executed.



SVN revision: 46416
2010-02-24 00:27:04 +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
Carsten Haitzler e70759878c rfiddling wiht lop to try and get rid of pauses. i think i found it... plus a
bit of streamlining. need to test more widely now.



SVN revision: 46303
2010-02-19 08:00:44 +00:00
Carsten Haitzler 698f67609c aaaah bummer. (see comment)
SVN revision: 46243
2010-02-17 08:13:30 +00:00
Carsten Haitzler c13819b98a hmmmm try this. let me know if u see issues.
SVN revision: 46218
2010-02-16 16:52:02 +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
Cedric BAIL 060153934a * ecore: Fix ecore_timer_freeze during timer execution.
SVN revision: 43667
2009-11-13 17:37:43 +00:00
Cedric BAIL c91bb90bf2 * ecore: Fix destruction of frozen timer, by not delaying their destruction.
SVN revision: 43665
2009-11-13 16:57:12 +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
Jaime Thomas 22ec9fd53b Add a function to retrieve the timer interval.
SVN revision: 40404
2009-04-26 17:16:33 +00:00
Carsten Haitzler d38a2a9488 new timer add func - avoids more gettimeofday calls.
SVN revision: 39638
2009-03-23 02:13:50 +00:00
Carsten Haitzler a63715c0c4 patch from julian - fix typos in docs.
SVN revision: 39460
2009-03-13 09:38:46 +00:00
Vincent Torri e18508b701 remove a bit the mess n ecore. It's just the first patch...
* add vim header
 * include config.h when necessary
 * fix the order of some include
 * move the standard header in ecore_private.h to the source files

I have recompiled all the efl and e17, and e17 seems to work fine with these changes.
If you encounter problems with that commit, let me know.


SVN revision: 38864
2009-01-31 18:33:39 +00:00
Vincent Torri b1f46fb7e8 remove trailing spaces
SVN revision: 37851
2008-11-29 11:23:17 +00:00
Gustavo Sverzut Barbieri 14243bc1b3 runtime configurable timer precision
One can now configure the maximum acceptable delay to be introduced by
Ecore so possibly more timers will be dispatched together, reducing
wakeups and saving more power.



SVN revision: 37607
2008-11-13 20:42:01 +00:00
Carsten Haitzler 41ac47244f remove more useless ecore_time_get's
SVN revision: 37392
2008-11-02 02:19:18 +00:00
Carsten Haitzler 57ecfa2b1f This patch add the possibility to delay a timer and to know the
pending time before the next wake up.

They should not affect any current code using the timer.

--
Cedric BAIL


SVN revision: 34250
2008-04-11 23:39:55 +00:00
Carsten Haitzler 4a3d696dcf cedric's timer freeze code.
SVN revision: 33967
2008-03-09 15:56:17 +00:00
Peter Wehrfritz 2c87820492 add ECORE_CALLBACK_RENEW and ECORE_CALLBACK_CANCEL
SVN revision: 33612
2008-01-25 18:28:16 +00:00