Commit Graph

9075 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri 9436429a09 follow vtorri's advice and mark txt and config as deprecated in the summary
SVN revision: 46542
2010-02-27 00:33:19 +00:00
Gustavo Sverzut Barbieri 456f222a0f [PATCH2/2] Improve edje documentation.
This reorder couple of functions so the generated documentation makes
sense.

By: Eduardo Felipe < eduardofelipe87@gmail.com>



SVN revision: 46541
2010-02-27 00:25:32 +00:00
Gustavo Sverzut Barbieri 46f0a73003 [PATCH1/2] Improve edje documentation.
This fixes the documentation, but they are still in the wrong order.

By: Eduardo Felipe <eduardofelipe87@gmail.com>


SVN revision: 46540
2010-02-27 00:15:41 +00:00
Gustavo Sverzut Barbieri e54bd066ec Convert everything to EINA_(TRUE|FALSE)
make it consistent.

By: Lucas de Marchi.



SVN revision: 46539
2010-02-27 00:01:10 +00:00
Gustavo Sverzut Barbieri 6e00c5f84a update docs to say EINA_(TRUE|FALSE)
By: Lucas De Marchi


SVN revision: 46538
2010-02-26 23:59:47 +00:00
Gustavo Sverzut Barbieri 2a204c684a find and replace too much!
SVN revision: 46535
2010-02-26 23:41:43 +00:00
Gustavo Sverzut Barbieri 9c3af651ba simplify and optimize parsing of percentage and float values.
Use strtod() and avoid couple of walks. Of course the walks were quite
small and it will not bring noticeable improvements, but code is
smaller and easier to read, so why not?



SVN revision: 46530
2010-02-26 22:51:07 +00:00
Gustavo Sverzut Barbieri 62301bc16d minor but easy speedups for tag processing.
keep tag and replacement size, compare it before doing strcmp() and
return the size so further calculations use it (eina_strbuf_append()
-> eina_strbuf_append_length())



SVN revision: 46529
2010-02-26 22:32:07 +00:00
Gustavo Sverzut Barbieri 3a11fbe02c use eina_strbuf faster variants whenever possible.
call me your bitch, call me your duplicated code, call me your complex code!



SVN revision: 46528
2010-02-26 22:03:25 +00:00
Gustavo Sverzut Barbieri 6769ba3b45 optimization attributes for functions.
SVN revision: 46523
2010-02-26 21:42:03 +00:00
Gustavo Sverzut Barbieri 7dfc83a627 add missing macro for prepend.
SVN revision: 46522
2010-02-26 21:34:28 +00:00
Gustavo Sverzut Barbieri bba70aef2e eina_strbuf_insert variants and fix leak with eina_strbuf_append_escaped()
SVN revision: 46521
2010-02-26 21:33:17 +00:00
Gustavo Sverzut Barbieri 3a8741c75e more docs for strbuf
SVN revision: 46518
2010-02-26 20:25:09 +00:00
Gustavo Sverzut Barbieri 2511972dde documentation improvements for eina_strbuf.
SVN revision: 46517
2010-02-26 20:23:12 +00:00
Gustavo Sverzut Barbieri f32672764d add eina_strbuf_append_length()
SVN revision: 46516
2010-02-26 20:09:36 +00:00
Christopher Michael a4571eb6bb Fix FALSE...should be EINA_FALSE.
SVN revision: 46504
2010-02-26 06:01:09 +00:00
Christopher Michael 300d53a4f4 Patch from Brian Wang to fix the TRUE/FALSE --> EINA_TRUE/EINA_FALSE mess.
(NB: Win32/CE people may need to fix some TRUE/FALSE parts...couldn't test
those).

Thanks Brian :)



SVN revision: 46503
2010-02-26 05:56:49 +00:00
Gustavo Sverzut Barbieri e3c9d3f62a TRUE/FALSE are gone, use EINA_TRUE/EINA_FALSE instead.
SVN revision: 46500
2010-02-26 00:59:11 +00:00
Gustavo Sverzut Barbieri ff6532a1bd minor documentation fixes.
still needs someone to read and review that.


SVN revision: 46499
2010-02-26 00:57:20 +00:00
Gustavo Sverzut Barbieri 926789e247 fix warnings.
SVN revision: 46498
2010-02-26 00:38:35 +00:00
Gustavo Sverzut Barbieri fc6c3ebb65 remove static/builtin modules warning, we ship with them on by default.
SVN revision: 46497
2010-02-26 00:30:01 +00:00
Gustavo Sverzut Barbieri 7c8ca04def Remove eina_error deprecated functions.
There were deprecated looooooooong ago, use eina_log if there are some
alien users out there.



SVN revision: 46496
2010-02-26 00:28:58 +00:00
Gustavo Sverzut Barbieri a98924ce6d turn off build of ecore-txt and ecore-config by default.
These are deprecated and will be killed in short time, stop using them!

Recommendations:

 * ecore-txt: use eina_str_convert, drop in replacement, just sed.

 * ecore-config: convert your code to use eet + Eet_Data_Descriptors
   directly, it is simpler and faster, but requires you to change your
   code. Consider using eet_data_descriptor_file_new() and
   eet_eina_file_data_descriptor_class_set() or
   EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(). Then describe your type
   with EET_DATA_DESCRIPTOR_ADD_*().




SVN revision: 46494
2010-02-26 00:20:34 +00:00
Gustavo Sverzut Barbieri e758e125f9 fix help string.
SVN revision: 46488
2010-02-25 21:26:32 +00:00
Gustavo Sverzut Barbieri 36bb64b0d0 maximum log level option.
this will have compilers to completely compile out log statements
using levels greater than the given number.

this is defined in config.h, thus C files should include this before
including Eina.h, as should be the case for all files (IOW: if it does
not work for some file, that file already have a bug).




SVN revision: 46482
2010-02-25 20:28:15 +00:00
Gustavo Sverzut Barbieri 6cd7135e5d couple of simple positive tests.
This is far from real unit testing, just simple cases are covered, but
it's better than nothing.



SVN revision: 46477
2010-02-25 19:38:32 +00:00
Cedric BAIL bb8ede02af * evas: Always redraw Textblock on style change.
SVN revision: 46469
2010-02-25 16:31:00 +00:00
Cedric BAIL 816974ff0b * ecore: Match what doc when disabling thread support in ecore.
SVN revision: 46467
2010-02-25 15:26:38 +00:00
Cedric BAIL 4d945f2c6a * evas: Remove duplicated code.
SVN revision: 46466
2010-02-25 15:10:05 +00:00
Carsten Haitzler 02d8dc445f why do a round trip for local info like.. root window # 0...
SVN revision: 46460
2010-02-25 12:26:25 +00:00
Carsten Haitzler b0045cb9b7 add lots of logging functions - for trackign x overhead when u cant get
symbols... booo! - disabled of course.



SVN revision: 46458
2010-02-25 12:19:02 +00:00
Vincent Torri a02b17d2f5 add unit tests framework with some examples.
pass --enable-tests to configure to enable them,
then 'make check' to run the tests.


SVN revision: 46456
2010-02-25 08:05:56 +00:00
Vincent Torri aab5142dd5 revert
SVN revision: 46455
2010-02-25 05:59:44 +00:00
Vincent Torri ca54f3d22b change option --enable-pthreads to --enable-threaded-rendering
change your scripts if needed


SVN revision: 46453
2010-02-25 05:39:30 +00:00
Christopher Michael 140de33a79 Fix some doxy typos.
SVN revision: 46450
2010-02-24 23:58:27 +00:00
Ulisses Furquim f316516b1c Checking init count before actually freeing ecore evases.
SVN revision: 46447
2010-02-24 22:48:55 +00:00
Gustavo Sverzut Barbieri 2d60db1c2b Fix fd_handlers when using recursive main loops.
If an fd_handler created a recursive main loop (just called
ecore_main_loop_begin()), then this recursive main loop should
continue to process fd_handlers from there and on, thus
fd_handler_current (and win32_handler_current) was added. When going
back from recursion, the current iterator should be updated properly.

This patch also fixes the deletion of fd_handler 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.

PS: win32 code is untested (or even compiled).

The following test case used to crash but not anymore:

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

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

static Ecore_Fd_Handler *handle;
static int a[2], b[2];

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

static int cb1(void *data, Ecore_Fd_Handler *h)
{
    unsigned char ch = 222;

    INF("cb1: begin");
    INF("    add cb2");
    ecore_main_fd_handler_add(b[0], ECORE_FD_READ, cb2, NULL, NULL, NULL);
    INF("    wake up pipe b");
    if (write(b[1], &ch, 1) != 1)
        ERR("could not write to pipe b");
    INF("    inner main loop begin (recurse)");
    ecore_main_loop_begin(); /* will it crash due
                              * ecore_main_fd_handler_del(handle)
                              * inside cb2()? It used to!
                              */
    INF("cb1: end");

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

    return 0;
}

int main(void)
{
    unsigned char ch = 111;

    ecore_init();

    _log_dom = eina_log_domain_register("test", EINA_COLOR_CYAN);
    pipe(a);
    pipe(b);

    /*
     * Creating a new main loop from inside an fd_handler 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_main_fd_handler_add
        (a[0], ECORE_FD_READ, cb1, NULL, NULL, NULL);
    INF("main: wake up pipe a");
    if (write(a[1], &ch, 1) != 1)
        ERR("could not write to pipe a");
    ecore_main_loop_begin();
    INF("main: end");
    return 0;
}



SVN revision: 46443
2010-02-24 20:59:44 +00:00
Vincent Torri 89594ec456 fix declaration of struct addrinfo
SVN revision: 46434
2010-02-24 17:52:54 +00:00
Vincent Torri 3c8d96125a use C (and not C++) pthread library on Windows
SVN revision: 46431
2010-02-24 15:43:32 +00:00
Cedric BAIL fc20b4541e * edje: Use fixed point for tween too.
SVN revision: 46429
2010-02-24 15:37:16 +00:00
Cedric BAIL 41b6529e00 * edje: Fix typo preventing creation of multiple edje box layout.
SVN revision: 46425
2010-02-24 14:50:07 +00:00
Carsten Haitzler 6ddefd5b4f -n - not -z!
SVN revision: 46424
2010-02-24 07:35:32 +00:00
Carsten Haitzler beb1b3820c oooh that was bad! oops. fix!
SVN revision: 46423
2010-02-24 05:47:23 +00:00
Carsten Haitzler eb650a7300 some roundtrips--
SVN revision: 46420
2010-02-24 04:36:22 +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 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
Christopher Michael 34f6da920a Actually send the events wrt randr changes.
SVN revision: 46414
2010-02-23 23:32:30 +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
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