Commit Graph

49 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 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 4ce0e74d63 housekeeping++
* process filters in their own function
* remove commented printf
* remove trailing white space
* lower indentation needed by breaking loop instead of a big if



SVN revision: 49436
2010-06-04 02:47:00 +00:00
Lucas De Marchi bda2b1d0af Fix current event pointer when walking filters
When walking the filters' list, using event_current might screw a
recursive main loop that had to process filters *and* events on the
first iteration. Thus, use a new pointer to mark the current event being
treated when walking filters' list.

Tests for this one is difficult. I'll try to think about a test later.



SVN revision: 49435
2010-06-04 02:45:47 +00:00
Lucas De Marchi 0fa2ca5721 Fix semantics of event->delete_me
* _ecore_event_purge_deleted() purges only events marked with
delete_me
* _ecore_events_exist() walks the events list to control that
at least one event with delete_me == 0 exists

Tests coming in a separate patch.



SVN revision: 49434
2010-06-04 02:45:20 +00:00
Lucas De Marchi c3dd8fa055 Fix ecore_events for recursive main loops
This fixes the following scenario:
1) An event handler starts another main loop
2) The new main loop processes all the remaining event_handlers of this
event and the remaining events
3) New events are added to the events list
4) A new iteration occurs

Prior behavior was that on (4) the events already processed were
triggered again. The code added to ecore_suite shows a test case,
similar to the one that is fixed now for modal dialogs on WebKit-EFL. I
preferred to let the INF() messages in order to be easy to copy, paste
and debug outside of the suite if anyone wants to. When the number of
tests grows more, we might want to separate them in different files.

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



SVN revision: 49390
2010-06-02 06:20:18 +00:00
Carsten Haitzler d639576e8e wanring: shadddaaap
SVN revision: 49297
2010-05-29 13:43:48 +00:00
Carsten Haitzler 17873647fc ooh someone somewhere made the main event loop not work quite right.
fix if event purge happens to generate events.



SVN revision: 49203
2010-05-26 11:40:22 +00:00
Carsten Haitzler cbebd8f00b data passed in wrong order! fix.
SVN revision: 48964
2010-05-18 06:59:59 +00:00
Gustavo Sverzut Barbieri 50d0af9d5e Fix events when using recursive main loops.
If an event handler/filter created a recursive main loop (just called
ecore_main_loop_begin()), then this recursive main loop should
continue to process events/handlers/filters from there and on, thus
event_current/event_filter_current/event_handler_current were
added. When going back from recursion, the current iterator should be
updated properly.

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_Event_Handler *handle;

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

static int cb1(void *data, int type, void *event)
{
    Ecore_Event *e;

    INF("cb1: begin");
    INF("    add cb2");

    type = ecore_event_type_new();
    ecore_event_handler_add(type, cb2, NULL);
    e = ecore_event_add(type, NULL, NULL, NULL);
    INF("    add event to trigger cb2: event=%p", e);
    INF("    inner main loop begin (recurse)");
    ecore_main_loop_begin(); /* will it crash due
                              * ecore_event_handler_del(handle) inside
                              * cb2()? It used to!
                              */
    INF("cb1: end");

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

    return 0;
}

int main(void)
{
    Ecore_Event *e;
    int type;

    ecore_init();

    _log_dom = eina_log_domain_register("test", EINA_COLOR_CYAN);

    /*
     * Creating a new main loop from inside an event 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.
     */

    type = ecore_event_type_new();

    INF("main: begin");
    handle = ecore_event_handler_add(type, cb1, NULL);
    e = ecore_event_add(type, NULL, NULL, NULL);
    INF("    add event to trigger cb1: event=%p", e);
    INF("    main loop begin");
    ecore_main_loop_begin();
    INF("main: end");
    return 0;
}




SVN revision: 46419
2010-02-24 02:30:27 +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 18b1bf46d7 move bitfield booleans to Eina_Bool.
using one bit with integers will just have room for 0 and -1, not 0 and 1.



SVN revision: 46412
2010-02-23 22:49:15 +00:00
Christopher Michael ecb57ac1b8 Fix nasty formatting.
SVN revision: 44988
2010-01-08 19:49:05 +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 19ce6dce92 * ecore: Fix a segv during ecore_shutdown.
SVN revision: 41075
2009-06-17 12:38:15 +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
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
Carsten Haitzler 28bb3a6a08 ok - see comments with idle-enter.
SVN revision: 34779
2008-06-09 12:15:34 +00:00
Peter Wehrfritz 2c87820492 add ECORE_CALLBACK_RENEW and ECORE_CALLBACK_CANCEL
SVN revision: 33612
2008-01-25 18:28:16 +00:00
Sebastian Dransfeld 1c2b692618 Fix typo.
SVN revision: 29364
2007-04-05 06:44:42 +00:00
Carsten Haitzler 5f7e0227c4 allow NULL events.
SVN revision: 29269
2007-03-31 01:58:31 +00:00
Kim Woelders 91e6ee5f66 Add const, fix warnings.
SVN revision: 26975
2006-11-05 16:42:30 +00:00
Christopher Michael 0f3a48361e Format like 'E' formatting.
Note: No functional changes, only formatting.


SVN revision: 23549
2006-06-23 06:38:52 +00:00
David Walter Seikel e754564803 Refactoring the exe exit stuff.
SVN revision: 19844
2006-01-16 03:20:36 +00:00
David Walter Seikel e109255415 More ecore_exe naming break'n'fix. Should be all done now.
SVN revision: 19832
2006-01-15 11:27:19 +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 e5d55213fd bracketsessss
SVN revision: 15283
2005-06-13 02:30:37 +00:00
tsauerbeck 6510cb9d31 fixed a segfault that happened when a event was emitted but no event handlers were registered. not tested though :)
SVN revision: 15282
2005-06-12 21:32:18 +00:00
Carsten Haitzler d1671c23e7 optimise ecore and ecore_evas. makes e look better in benchmarks... and
well.. it does make it faster for certain situations/scenarios... and well..
in general too.


SVN revision: 14973
2005-05-28 03:57:17 +00:00
Carsten Haitzler de28192bda kwo's ecore cleanup patch
SVN revision: 13559
2005-03-02 07:06:44 +00:00
Carsten Haitzler ff96904faa working on fixign this weird job loss....
SVN revision: 12961
2005-01-14 04:50:08 +00:00
tsauerbeck f83c81433d mingw portability
SVN revision: 11926
2004-10-20 17:51:29 +00:00
tsauerbeck e21b5dd247 don't use our own event_free callback when the default is good enough
SVN revision: 10141
2004-05-09 08:15:34 +00:00
tsauerbeck 110fd6f399 if the caller doesn't specify free_func, use a sane default function instead
SVN revision: 10139
2004-05-09 07:54:00 +00:00
Carsten Haitzler 093bd1d9c2 nathan's docs :)
SVN revision: 10113
2004-05-08 04:44:04 +00:00
tsauerbeck 087eb83658 added support for realtime signals. all signal event structs now have a siginfo_t member (this might replace the unused void *ext_data). sa_sigaction is now used instead of sa_handler
SVN revision: 9591
2004-04-04 19:53:19 +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 75047789ad slight change in doc comments... get rid of htmlisms...
SVN revision: 9037
2004-02-20 07:06:29 +00:00
Carsten Haitzler d2010dac48 ACTUALLY you want this one... that fix would lead to a segv... :) i think
this si what i originally intended but somehow just got wrong :(


SVN revision: 7604
2003-10-15 05:20:07 +00:00
xcomputerman 95080ea56c Little critter in filter deletion
SVN revision: 7603
2003-10-15 05:12:39 +00:00
Carsten Haitzler 67ca2319f5 1. fix docs for event handlers. oops. that was wrong
2. default op for exit event is to quit the main loop if u dont set handlers


SVN revision: 7518
2003-10-09 02:20:37 +00:00
azundris f5b71965c9 raster: please advise which semantics we'll stick with.
SVN revision: 7515
2003-10-08 15:04:54 +00:00
Carsten Haitzler a5c2425084 damn you salizar! damn you!
errr. i mean. ecore moves to HEAD!


SVN revision: 7475
2003-09-23 08:09:32 +00:00