Commit Graph

18 Commits

Author SHA1 Message Date
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
Gustavo Lima Chaves 2c1a54103d Changes accounting safeness logic introduced at rev. 50158.
SVN revision: 50201
2010-07-12 17:20:14 +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
Gustavo Sverzut Barbieri 0c24c76c5a Fix idle_exiters when using recursive main loops.
If an idle_exiter created a recursive main loop (just called
ecore_main_loop_begin()), then this recursive main loop should
continue to process idle_exiters from there and on, thus
idle_exiter_current was added. When going back from recursion, the
current iterator should be updated properly.

This patch also fixes the deletion of idle_exiters from recursive
main loops by reference counting them. This way, the node will not be
free()d inside inner loop cleanups and then crash when going back to
outer loop.

The following test case used to crash but not anymore:

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

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

static Ecore_Idle_Exiter *handle;

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

static int timer(void *data)
{
    INF("timer (exited idle!)");
    return 0;
}

static int exit_idle(void *data)
{
    INF("add request (timer) to exit idle");
    ecore_timer_add(0.0, timer, NULL);
    return 0;
}

static int cb2(void *data)
{
    INF("cb2 - delete cb1 handle");
    ecore_idle_exiter_del(handle);
    ecore_main_loop_quit(); /* quits inner main loop */
    return 0;
}

static int cb1(void *data)
{
    INF("cb1: begin");
    INF("    add cb2");
    ecore_idle_exiter_add(cb2, NULL);
    INF("    add exit idler");
    ecore_idler_add(exit_idle, NULL);
    INF("    inner main loop begin (recurse)");
    ecore_main_loop_begin(); /* will it crash due ecore_idle_exiter_del(handle)
                              * inside cb2()? It used to!
                              */
    INF("cb1: end");

    ecore_main_loop_quit(); /* quits outer main loop */

    return 0;
}

int main(void)
{
    ecore_init();

    _log_dom = eina_log_domain_register("test", EINA_COLOR_CYAN);

    /*
     * Creating a new main loop from inside an idle_exiter callback,
     * and inside this new (inner) main loop deleting the caller
     * callback used to crash since the handle would be effectively
     * free()d, but when the recursion is over the pointer would be
     * used.
     */

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



SVN revision: 46410
2010-02-23 22:25:35 +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 8e392a0742 * ecore: Remove user of Ecore_List2 from ecore events.
SVN revision: 41070
2009-06-17 11:39:37 +00:00
Gustavo Sverzut Barbieri 0664a8fd5e Avoid getting stuck into ecore main loop dispatchers.
The old way we could run endless with the following case:

   int my_buggy_idler(void *data) {
       ecore_idler_add(my_buggy_idler, NULL);
       return 0;
   }

since it would append to that list, then the list would never end.

Now we just dispatch up to the last know idler, then go back to
regular processing, if nothing happens we'll be back to dispatch
again.

I tested it here and works fine, but might show issues with ecore
enterers/exiters of some applications that rely on the old (broken)
behavior.



SVN revision: 40847
2009-05-29 16:33:00 +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
Christopher Michael 2572e14d3e Formatting to 'E' format.
Note: No functional changes, only formatting.


SVN revision: 23551
2006-06-23 06:40:26 +00:00
Carsten Haitzler 12aa35dd99 fix up some warnings
SVN revision: 19563
2006-01-06 17:58:12 +00:00
sebastid 19d9aa1452 Move Ecore_Oldlist to Ecore_List2 and rename the funcs from _list_
to _list2_


SVN revision: 16425
2005-08-30 10:05:27 +00:00
Carsten Haitzler 093bd1d9c2 nathan's docs :)
SVN revision: 10113
2004-05-08 04:44:04 +00:00
xcomputerman 1034f13443 Merge Ewd code into Ecore.
The new functions (Ecore_Data.h) have not been tested yet, be warned! :)


SVN revision: 9384
2004-03-18 05:29:54 +00:00
Carsten Haitzler 002beaf9a6 add file.
SVN revision: 9380
2004-03-17 05:44:17 +00:00