Fix callback signatures
authorlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 2 Jul 2010 01:38:05 +0000 (01:38 +0000)
committerlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 2 Jul 2010 01:38:05 +0000 (01:38 +0000)
The change from returning int to Eina_Bool left several call sites with
warnings because they were not updated. Here they are fixed by using
Coccinelle, a tool that allows us to automate tasks like that. This
commit was generated from the following semantic patch:

virtual org

@r1@
identifier fn!=NULL, fn2;
expression E1, E2, E3;
@@
(
ecore_event_handler_add(E1, fn, ...)
|
ecore_event_filter_add(E1, fn, ...)
|
ecore_idler_add(fn, ...)
|
ecore_idle_enterer_add(E1, fn, ...)
|
ecore_idle_enterer_before_add(E1, fn, ...)
|
ecore_idle_exiter_add(E1, fn, ...)
|
ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...)
|
ecore_main_win32_handler_add(E1, fn, ...)
|
ecore_timer_add(E1, fn, ...)
|
ecore_timer_loop_add(E1, fn, ...)
|
ecore_animator_add(fn, ...)
|
ecore_poller_add(E1, E2, fn, ...)
)

@r2@
identifier r1.fn;
identifier ret;
typedef Eina_Bool;
position p;
@@
- int
+ Eina_Bool
fn@p(...) {
<...
(
- return 1;
+ return EINA_TRUE;
|
- return 0;
+ return EINA_FALSE;
|
- int
+ Eina_Bool
ret;
...
return <+...ret...+>;
|
return ...;
)
...>
}

@r3@
identifier r1.fn2;
identifier ret;
position p;
@@
- int
+ Eina_Bool
fn2@p(...) {
...
(
- return 1;
+ return EINA_TRUE;
|
- return 0;
+ return EINA_FALSE;
|
- int
+ Eina_Bool
ret;
...
return <+...ret...+>;
|
return ...;
)
...
}

@r4@
identifier r1.fn;
@@
- int
+ Eina_Bool
fn(...);

@r5@
identifier r1.fn2;
@@
- int
+ Eina_Bool
fn2(...);

@script:python depends on org@
p << r2.p;
f << r1.fn;
@@
import sys
msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line)
print >> sys.stderr, msg

@script:python depends on org@
p << r3.p;
f << r1.fn2;
@@
import sys
msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line)
print >> sys.stderr, msg

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@49985 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

12 files changed:
src/lib/ecore_config/ecore_config_ipc_ecore.c
src/lib/ecore_directfb/ecore_directfb.c
src/lib/ecore_evas/ecore_evas_cocoa.c
src/lib/ecore_evas/ecore_evas_directfb.c
src/lib/ecore_evas/ecore_evas_fb.c
src/lib/ecore_fb/ecore_fb_kbd.c
src/lib/ecore_fb/ecore_fb_li.c
src/lib/ecore_fb/ecore_fb_ps2.c
src/lib/ecore_fb/ecore_fb_ts.c
src/lib/ecore_fb/ecore_fb_vt.c
src/lib/ecore_x/xcb/ecore_xcb.c
src/tests/ecore_test_ecore.c

index a36efe3..3c8e1fd 100644 (file)
@@ -235,7 +235,7 @@ _ecore_config_ipc_ecore_handle_request(Ecore_Ipc_Server * server,
 
 /*****************************************************************************/
 
-static int
+static Eina_Bool
 _ecore_config_ipc_client_add(void *data, int type __UNUSED__, void *event)
 {
    Ecore_Ipc_Server  **server;
@@ -245,13 +245,13 @@ _ecore_config_ipc_client_add(void *data, int type __UNUSED__, void *event)
    e = (Ecore_Ipc_Event_Client_Data *) event;
 
    if (*server != ecore_ipc_client_server_get(e->client))
-      return 1;
+      return EINA_TRUE;
 
    INF("IPC/eCore: Client connected. @ %p", server);
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_config_ipc_client_del(void *data, int type __UNUSED__, void *event)
 {
    Ecore_Ipc_Server  **server;
@@ -261,13 +261,13 @@ _ecore_config_ipc_client_del(void *data, int type __UNUSED__, void *event)
    e = (Ecore_Ipc_Event_Client_Data *) event;
 
    if (*server != ecore_ipc_client_server_get(e->client))
-      return 1;
+      return EINA_TRUE;
 
    INF("IPC/eCore: Client disconnected. @ %p", server);
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_config_ipc_client_sent(void *data, int type __UNUSED__, void *event)
 {
    Ecore_Ipc_Server  **server;
@@ -277,10 +277,10 @@ _ecore_config_ipc_client_sent(void *data, int type __UNUSED__, void *event)
    e = (Ecore_Ipc_Event_Client_Data *) event;
 
    if (*server != ecore_ipc_client_server_get(e->client))
-      return 1;
+      return EINA_TRUE;
 
    _ecore_config_ipc_ecore_handle_request(*server, e);
-   return 1;
+   return EINA_TRUE;
 }
 
 /*****************************************************************************/
index 2b6c44d..d305c11 100644 (file)
@@ -393,15 +393,15 @@ _ecore_directfb_event_handle_lost_focus(DFBWindowEvent *evt)
  * window at a time */
 
 
-static int
+static Eina_Bool
 _ecore_directfb_input_event_fd_handler(void *data __UNUSED__,Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
        DFBEvent evt;
        int v = 0;
                
        v = read(_input_event_fd, &evt, sizeof(DFBEvent));
-       if (v < 0) return 1;
-       if (v < 1) return 1;
+       if (v < 0) return EINA_TRUE;
+       if (v < 1) return EINA_TRUE;
        
        /* we are getting duplicate events, only parse if we are in fullscreen */
        //if(_ecore_directfb_fullscreen_window_id == 0) break;
@@ -416,18 +416,18 @@ _ecore_directfb_input_event_fd_handler(void *data __UNUSED__,Ecore_Fd_Handler *f
        if(evt.input.type == DIET_AXISMOTION)
                _ecore_directfb_event_handle_motion(&evt);
 
-       return 1;
+       return EINA_TRUE;
 }
        
-static int
+static Eina_Bool
 _ecore_directfb_window_event_fd_handler(void *data __UNUSED__,Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
        DFBEvent evt;
        int v = 0;
                
        v = read(_window_event_fd, &evt, sizeof(DFBEvent));
-       if (v < 0) return 1;
-       if (v < 1) return 1;
+       if (v < 0) return EINA_TRUE;
+       if (v < 1) return EINA_TRUE;
                        
        if(evt.window.type & DWET_POSITION)
                INF("position");
@@ -457,7 +457,7 @@ _ecore_directfb_window_event_fd_handler(void *data __UNUSED__,Ecore_Fd_Handler *
                _ecore_directfb_event_handle_leave(&evt.window);
        if(evt.window.type & DWET_WHEEL)
                _ecore_directfb_event_handle_wheel(&evt.window);
-       return 1;
+       return EINA_TRUE;
 }
        
 /* api functions */
index f1b3445..9eea6cc 100644 (file)
@@ -99,20 +99,20 @@ _ecore_evas_cocoa_event_got_focus(void *data __UNUSED__, int type __UNUSED__, vo
    return 0;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_cocoa_event_lost_focus(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas                   *ee;
 
    ee = _ecore_evas_cocoa_match();
 
-   if (!ee) return 1;
+   if (!ee) return EINA_TRUE;
    ee->prop.focused = 0;
 
-   return 0;
+   return EINA_FALSE;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_cocoa_event_video_resize(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    /*Ecore_Cocoa_Event_Video_Resize *e;
@@ -127,7 +127,7 @@ _ecore_evas_cocoa_event_video_resize(void *data __UNUSED__, int type __UNUSED__,
    return 0;*/
 }
 
-static int
+static Eina_Bool
 _ecore_evas_cocoa_event_video_expose(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
 {
    Ecore_Evas                   *ee;
@@ -136,11 +136,11 @@ _ecore_evas_cocoa_event_video_expose(void *data __UNUSED__, int type __UNUSED__,
 
    ee = _ecore_evas_cocoa_match();
 
-   if (!ee) return 1;
+   if (!ee) return EINA_TRUE;
    evas_output_size_get(ee->evas, &w, &h);
    evas_damage_rectangle_add(ee->evas, 0, 0, w, h);
 
-   return 0;
+   return EINA_FALSE;
 }
 
 static int
index 46e81c9..97ed9e2 100644 (file)
@@ -93,7 +93,7 @@ _ecore_evas_directfb_event_key_down(void *data __UNUSED__, int type __UNUSED__,
    return 1;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_directfb_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -102,13 +102,13 @@ _ecore_evas_directfb_event_key_up(void *data __UNUSED__, int type __UNUSED__, vo
    e = event;
    ee = _ecore_evas_directfb_match(e->win);
 
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    evas_event_feed_key_up(ee->evas, e->name, e->name, e->string,
                           e->key_compose, e->time, NULL);
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_directfb_event_motion(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -117,12 +117,12 @@ _ecore_evas_directfb_event_motion(void *data __UNUSED__, int type __UNUSED__, vo
    e = event;
    ee = _ecore_evas_directfb_match(e->win);
 
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_directfb_event_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -131,13 +131,13 @@ _ecore_evas_directfb_event_button_down(void *data __UNUSED__, int type __UNUSED_
    e = event;
    ee = _ecore_evas_directfb_match(e->win);
 
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    // _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
    evas_event_feed_mouse_down(ee->evas, e->button, EVAS_BUTTON_NONE, e->time, NULL);
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_directfb_event_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -147,13 +147,13 @@ _ecore_evas_directfb_event_button_up(void *data __UNUSED__, int type __UNUSED__,
    e = event;
    ee = _ecore_evas_directfb_match(e->win);
 
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    //_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
    evas_event_feed_mouse_up(ee->evas, e->button, flags, e->time, NULL);
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_directfb_event_enter(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -162,13 +162,13 @@ _ecore_evas_directfb_event_enter(void *data __UNUSED__, int type __UNUSED__, voi
    e = event;
    ee = _ecore_evas_directfb_match(e->win);
 
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    evas_event_feed_mouse_in(ee->evas, e->time, NULL);
    //_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_directfb_event_leave(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -177,15 +177,15 @@ _ecore_evas_directfb_event_leave(void *data __UNUSED__, int type __UNUSED__, voi
    e = event;
    ee = _ecore_evas_directfb_match(e->win);
 
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    evas_event_feed_mouse_out(ee->evas, e->time, NULL);
    //_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
    if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee);
    if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object);
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_directfb_event_wheel(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -194,12 +194,12 @@ _ecore_evas_directfb_event_wheel(void *data __UNUSED__, int type __UNUSED__, voi
    e = event;
    ee = _ecore_evas_directfb_match(e->win);
 
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    evas_event_feed_mouse_wheel(ee->evas, e->direction, e->z, e->time, NULL);
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_directfb_event_got_focus(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -208,12 +208,12 @@ _ecore_evas_directfb_event_got_focus(void *data __UNUSED__, int type __UNUSED__,
    e = event;
    ee = _ecore_evas_directfb_match(e->win);
 
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    ee->prop.focused = 1;
-   return 1;
+   return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _ecore_evas_directfb_event_lost_focus(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -222,9 +222,9 @@ _ecore_evas_directfb_event_lost_focus(void *data __UNUSED__, int type __UNUSED__
    e = event;
    ee = _ecore_evas_directfb_match(e->win);
 
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    ee->prop.focused = 0;
-   return 1;
+   return EINA_TRUE;
 }
 
 int
index 3280589..c19d343 100644 (file)
@@ -107,7 +107,7 @@ _ecore_evas_fb_gain(void *data __UNUSED__)
      ecore_fb_input_device_listen(dev, 1);
 }
 
-static int
+static Eina_Bool
 _ecore_evas_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -115,12 +115,12 @@ _ecore_evas_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *eve
 
    e = event;
    ee = _ecore_evas_fb_match();
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
-   return 0; /* dont pass it on */
+   return EINA_FALSE; /* dont pass it on */
 }
 
-static int
+static Eina_Bool
 _ecore_evas_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -128,12 +128,12 @@ _ecore_evas_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event
 
    e = event;
    ee = _ecore_evas_fb_match();
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
-   return 0; /* dont pass it on */
+   return EINA_FALSE; /* dont pass it on */
 }
 
-static int
+static Eina_Bool
 _ecore_evas_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -142,15 +142,15 @@ _ecore_evas_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__,
 
    e = event;
    ee = _ecore_evas_fb_match();
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    _ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
    if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
    if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
    evas_event_feed_mouse_down(ee->evas, e->button, flags, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
-   return 0; /* dont pass it on */
+   return EINA_FALSE; /* dont pass it on */
 }
 
-static int
+static Eina_Bool
 _ecore_evas_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -158,13 +158,13 @@ _ecore_evas_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, vo
 
    e = event;
    ee = _ecore_evas_fb_match();
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    _ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
    evas_event_feed_mouse_up(ee->evas, e->button, EVAS_BUTTON_NONE, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
-   return 0; /* dont pass it on */
+   return EINA_FALSE; /* dont pass it on */
 }
 
-static int
+static Eina_Bool
 _ecore_evas_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -172,12 +172,12 @@ _ecore_evas_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *e
 
    e = event;
    ee = _ecore_evas_fb_match();
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    _ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
-   return 0; /* dont pass it on */
+   return EINA_FALSE; /* dont pass it on */
 }
 
-static int
+static Eina_Bool
 _ecore_evas_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
@@ -185,9 +185,9 @@ _ecore_evas_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *
 
    e = event;
    ee = _ecore_evas_fb_match();
-   if (!ee) return 1; /* pass on event */
+   if (!ee) return EINA_TRUE; /* pass on event */
    _ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
-   return 0; /* dont pass it on */
+   return EINA_FALSE; /* dont pass it on */
 }
 
 static int
index 0cc1186..91f2ac1 100644 (file)
@@ -128,7 +128,7 @@ static int _ecore_fb_shift = 0;
 static int _ecore_fb_lock = 0;
 
 static Ecore_Fd_Handler *_ecore_fb_kbd_fd_handler_handle = NULL;
-static int _ecore_fb_kbd_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
+static Eina_Bool _ecore_fb_kbd_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
 
 static void 
 _ecore_fb_event_free_key_down(void *data __UNUSED__, void *ev)
@@ -153,7 +153,7 @@ _ecore_fb_event_free_key_up(void *data __UNUSED__, void *ev)
    free(e);
 }
 
-static int
+static Eina_Bool
 _ecore_fb_kbd_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
    int v = 0;
@@ -163,8 +163,8 @@ _ecore_fb_kbd_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __U
        unsigned char buf;
        
        v = read(_ecore_fb_kbd_fd, &buf, 1);
-       if (v < 0) return 1;
-       if (v < 1) return 1;
+       if (v < 0) return EINA_TRUE;
+       if (v < 1) return EINA_TRUE;
        if (!(buf & 0x80))
          {
             /* DOWN */
@@ -272,7 +272,7 @@ _ecore_fb_kbd_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __U
        ;
      }
    while (v > 0);
-   return 1;
+   return EINA_TRUE;
 }
 
 int
index c0e80eb..3e9fa4a 100644 (file)
@@ -349,7 +349,7 @@ _ecore_fb_li_device_event_syn(Ecore_Fb_Input_Device *dev, struct input_event *ie
        }
 }
 
-static int
+static Eina_Bool
 _ecore_fb_li_device_fd_callback(void *data, Ecore_Fd_Handler *fdh)
 {
        Ecore_Fb_Input_Device *dev;
@@ -381,7 +381,7 @@ _ecore_fb_li_device_fd_callback(void *data, Ecore_Fd_Handler *fdh)
                                break;
                }
        }
-       return 1;
+       return EINA_TRUE;
 }
 
 /* 
index 3a062da..7c8dc62 100644 (file)
@@ -10,7 +10,7 @@ struct _Ecore_Fb_Ps2_Event
 static int _ecore_fb_ps2_event_byte_count = 0;
 static Ecore_Fb_Ps2_Event _ecore_fb_ps2_event;
 static int _ecore_fb_ps2_fd = 0;
-static int _ecore_fb_ps2_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
+static Eina_Bool _ecore_fb_ps2_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
 
 int
 ecore_fb_ps2_init(void)
index cb9eff6..0303aa7 100644 (file)
@@ -64,7 +64,7 @@ struct _Ecore_Fb_Ts_Flite
    unsigned char brightness;
 };
 
-static int _ecore_fb_ts_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
+static Eina_Bool _ecore_fb_ts_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
 static int _ecore_fb_ts_fd = -1;
 static int _ecore_fb_ts_event_byte_count = 0;
 static int _ecore_fb_ts_apply_cal = 0;
index 972aa9b..d24a780 100644 (file)
@@ -19,7 +19,7 @@ static int _ecore_fb_vt_prev_vt = 0;
 static struct termios _ecore_fb_tty_prev_tio_mode;
 static struct vt_mode _ecore_fb_vt_prev_mode;
 
-static int _ecore_fb_signal_usr_handler(void *data, int type, void *ev);
+static Eina_Bool _ecore_fb_signal_usr_handler(void *data, int type, void *ev);
 static Ecore_Event_Handler *_ecore_fb_user_handler = NULL;
 static int _ecore_fb_tty_prev_mode = 0;
 static int _ecore_fb_tty_prev_kd_mode = 0;
@@ -34,7 +34,7 @@ static void *_ecore_fb_func_fb_gain_data = NULL;
 static Ecore_Event_Filter *_ecore_fb_filter_handler = NULL;
 
 static void *_ecore_fb_event_filter_start(void *data);
-static int   _ecore_fb_event_filter_filter(void *data, void *loop_data, int type, void *event);
+static Eina_Bool   _ecore_fb_event_filter_filter(void *data, void *loop_data, int type, void *event);
 static void  _ecore_fb_event_filter_end(void *data, void *loop_data);
 
 /* prototypes */
@@ -261,23 +261,23 @@ _ecore_fb_event_filter_start(void *data __UNUSED__)
    return filter_data;
 }
 
-static int
+static Eina_Bool
 _ecore_fb_event_filter_filter(void *data __UNUSED__, void *loop_data,int type, void *event __UNUSED__)
 {
    Ecore_Fb_Filter_Data *filter_data;
    
    filter_data = loop_data;
-   if (!filter_data) return 1;
+   if (!filter_data) return EINA_TRUE;
    if (type == ECORE_FB_EVENT_MOUSE_MOVE)
      {
        if ((filter_data->last_event_type) == ECORE_FB_EVENT_MOUSE_MOVE)
          {
             filter_data->last_event_type = type;
-            return 0;
+            return EINA_FALSE;
          }
      }
    filter_data->last_event_type = type;
-   return 1;
+   return EINA_TRUE;
 }
 
 static void
index f3fc6c2..7e08484 100644 (file)
@@ -18,7 +18,7 @@ static int _ecore_xcb_key_mask_get(xcb_keysym_t sym);
 static int _ecore_xcb_event_modifier(unsigned int state);
 
 static void *_ecore_xcb_event_filter_start(void *data);
-static int   _ecore_xcb_event_filter_filter(void *data, void *loop_data,int type, void *event);
+static Eina_Bool   _ecore_xcb_event_filter_filter(void *data, void *loop_data,int type, void *event);
 static void  _ecore_xcb_event_filter_end(void *data, void *loop_data);
 
 static Ecore_Fd_Handler *_ecore_xcb_fd_handler_handle = NULL;
@@ -1026,23 +1026,23 @@ _ecore_xcb_event_filter_start(void *data __UNUSED__)
    return filter_data;
 }
 
-static int
+static Eina_Bool
 _ecore_xcb_event_filter_filter(void *data __UNUSED__, void *loop_data,int type, void *event __UNUSED__)
 {
    Ecore_X_Filter_Data *filter_data;
 
    filter_data = loop_data;
-   if (!filter_data) return 1;
+   if (!filter_data) return EINA_TRUE;
    if (type == ECORE_EVENT_MOUSE_MOVE)
      {
        if ((filter_data->last_event_type) == ECORE_EVENT_MOUSE_MOVE)
          {
             filter_data->last_event_type = type;
-            return 0;
+            return EINA_FALSE;
          }
      }
    filter_data->last_event_type = type;
-   return 1;
+   return EINA_TRUE;
 }
 
 static void
index d6bbac0..02e9c6b 100644 (file)
 static int _log_dom;
 #define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)
 
-static int
+static Eina_Bool
 _quit_cb(void *data)
 {
    Eina_Bool *val = data;
    *val = EINA_TRUE;
    ecore_main_loop_quit();
-   return 0;
+   return EINA_FALSE;
 }
 
-static int
+static Eina_Bool
 _dummy_cb(void *data)
 {
    return (int)(long)data;
@@ -155,20 +155,20 @@ START_TEST(ecore_test_ecore_main_loop_timer)
 }
 END_TEST
 
-static int _timer3(void *data)
+static Eina_Bool _timer3(void *data)
 {
    /* timer 3, do nothing */
-   return 0;
+   return EINA_FALSE;
 }
 
-static int _timer2(void *data)
+static Eina_Bool _timer2(void *data)
 {
    /* timer 2, quit inner mainloop */
    ecore_main_loop_quit();
-   return 0;
+   return EINA_FALSE;
 }
 
-static int _timer1(void *data)
+static Eina_Bool _timer1(void *data)
 {
    /* timer 1, begin inner mainloop */
    int *times = data;
@@ -180,7 +180,7 @@ static int _timer1(void *data)
 
    ecore_main_loop_quit();
 
-   return 0;
+   return EINA_FALSE;
 }
 
 START_TEST(ecore_test_ecore_main_loop_timer_inner)
@@ -198,13 +198,13 @@ START_TEST(ecore_test_ecore_main_loop_timer_inner)
 }
 END_TEST
 
-static int
+static Eina_Bool
 _fd_handler_cb(void *data, Ecore_Fd_Handler *handler __UNUSED__)
 {
    Eina_Bool *val = data;
    *val = EINA_TRUE;
    ecore_main_loop_quit();
-   return 0;
+   return EINA_FALSE;
 }
 
 START_TEST(ecore_test_ecore_main_loop_fd_handler)
@@ -239,13 +239,13 @@ START_TEST(ecore_test_ecore_main_loop_fd_handler)
 }
 END_TEST
 
-static int
+static Eina_Bool
 _event_handler_cb(void *data, int type __UNUSED__, void *event __UNUSED__)
 {
    Eina_Bool *val = data;
    *val = EINA_TRUE;
    ecore_main_loop_quit();
-   return 0;
+   return EINA_FALSE;
 }
 
 START_TEST(ecore_test_ecore_main_loop_event)
@@ -276,16 +276,16 @@ START_TEST(ecore_test_ecore_main_loop_event)
 }
 END_TEST
 
-static int
+static Eina_Bool
 _timer_quit_recursive(void *data)
 {
    INF("   _timer_quit_recursive: begin");
    ecore_main_loop_quit(); /* quits inner main loop */
    INF("   _timer_quit_recursive: end");
-   return 0;
+   return EINA_FALSE;
 }
 
-static int
+static Eina_Bool
 _event_recursive_cb(void *data, int type, void *event)
 {
    Ecore_Event *e;
@@ -308,7 +308,7 @@ _event_recursive_cb(void *data, int type, void *event)
 
    INF("   guard = %d", guard);
    INF("  event_recursive_cb: end");
-   return 0;
+   return EINA_FALSE;
 }