Commit Graph

43 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
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
Carsten Haitzler c1441e1c3a e:
1. configure/build changes to allow cross-compiling painlessly
2. pager module namespace changes - this was still dirty afdter the namespace
cleanup, so clean it up
3. add a powersave subsystem - doesnt have an "automatic" way to turn on and
off right now, this i think is best provided by modules (that do things like
monitor acpi status's (eg close lid of laptop), AC power status etc. etc.
this allows e to nicely defer "power" expensive actions to avoid disk
spinups etc.
4. move to use the new ecore poller system  - discussed long ago as part of
power management/saving issues. now it exists
5. add a canvas idle flush call that helsp cope with the new shm greedy
software x11 engine stuff
6. use the new powersave subsystem where appropriate
7. fix non-zeroed/initted memory access in e_fm_main
8. fix mem leak for e menus
9. remove ipc handlers for changed/removed config values
10. use animaotr not timer for menu scrolls - then menu scrolls obey the fps
config
11. fix up timer/poll happienss of cursor idle stuff
12. remove avoid damage from popups for now - causing problems
13. change battery and temp readouts to b e shorter so they fit
14. pager can emit signals on focus change for mini-windows now
15. temperature module now uses a slave process and uses stdin/out to talk to
it and get output - this makes e smoother as in my expereicne i found getting
the temp on my laptop actually took like 200ms so e "hang" for 200ms while
reading the acpi files - so now the subprocess does it and just writesa back
to e when it gets it.

ecore:
1. add ecore_pollers. see the documentation on them in doxygen comments :)
2. fix timers to only go off when they have to - bug there that made e's
select time out a LOT more than it needed to. defensive coding hid the
problem. now fixed. e should be much more power friendly now.
3. formatting/niceness in ecore_exe stuff
4. some comments on comments with SIGIO ideas vs. select
5. add call to be able to add an idle enterer at the start of the list of
them, not just the end (as has been the default)
6. fix ecore_evas to support auto evas idler calls after 0.5 secs of idle in
all canvases - and to do it right
7. if argb destination - set the shape EVENT shape (to mask out events in
transparent regions much like shape does withotu translucency)
8. in ecore_x add support for the event shape

evas:
1. fix cache to work properly and not just always fill up (as it seemed to
like to think cahce useage dropped below 0 when it didnt and thus just
over-fill)
2. software x11 engine now ONLY uses shm segments - no ximages over the
socket. this ximage hack was there to avoid the 2 round trips involved in
setting up an shm image - now i mitigated that wih an shm image cache pool.
it keeps shm images around and repurposes them for new update regions if
appropriate. this means many fewer shm creates (about 1/100th the number) and
since we recycle the memory less 0 memory page filling by the kernel - in the
end, i recorded about a 10-20% speedup over the old software x11 engine.
simple tests i have seen up to 120% speedups. idle flush now does something -
it frees all the cached shm segments. it has a hard-coded limit of 4mb worth
of shm segments (or 32 segments - whichever comes first) to keep around. once
can never complain much about speedups methinks :). also evas will defer sync
until the NEXT frame is written - this means evas can calculate the next
frame of data while x dma's/copies the images to the screen at the same time
(if you hve a dual core or multi-cpu machnike or your xserver is able to use
DMA to copy image data to the screen/video ram then this should see a decent
speedup).


SVN revision: 33448
2008-01-11 07:33:57 +00:00
rephorm 20afc1f154 add some docs
SVN revision: 27579
2006-12-28 03:31:44 +00:00
Carsten Haitzler 12aa35dd99 fix up some warnings
SVN revision: 19563
2006-01-06 17:58:12 +00:00
Carsten Haitzler e430a7e6fc delete timer on 0 return AND if manually deleted prefer the delete over the
continue return of 1


SVN revision: 18954
2005-12-11 14:33:21 +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 da09755f02 slaten's timer patch :)
SVN revision: 14096
2005-04-04 16:01:39 +00:00
sebastid de2a380ce9 Change timer interval.
SVN revision: 13461
2005-02-22 12:39:50 +00:00
Carsten Haitzler 8912db12ef oops. 1 ) too many
SVN revision: 11901
2004-10-19 01:59:09 +00:00
Carsten Haitzler 581a860bad timer oopsie - thanks brett
SVN revision: 11900
2004-10-19 00:19:31 +00:00
ncn fa6db0a70e Ecore_Con module documentation, timer functions cleaned up, Time functions linked into Ecore.h docs.
SVN revision: 11704
2004-09-23 04:58:16 +00:00
Carsten Haitzler 5ef8dedf2e ecore animators... IN!
SVN revision: 11520
2004-09-05 08:00:10 +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 75047789ad slight change in doc comments... get rid of htmlisms...
SVN revision: 9037
2004-02-20 07:06:29 +00:00
Carsten Haitzler bc8c86bc75 update docs comments.. oops..
SVN revision: 7786
2003-11-03 01:27:06 +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