* edje: remove warning due to API change in Ecore.

SVN revision: 49830
This commit is contained in:
Cedric BAIL 2010-06-24 16:16:50 +00:00
parent fbe9064310
commit 73ac5cdc95
13 changed files with 125 additions and 130 deletions

View File

@ -168,7 +168,7 @@ struct slave_cmd
{NULL, NULL} {NULL, NULL}
}; };
static int static Eina_Bool
_slave_mode(void *data, Ecore_Fd_Handler *fd_handler) _slave_mode(void *data, Ecore_Fd_Handler *fd_handler)
{ {
Evas_Object *edje = data; Evas_Object *edje = data;
@ -180,23 +180,23 @@ _slave_mode(void *data, Ecore_Fd_Handler *fd_handler)
{ {
fputs("ERROR: error on stdin! Exit.\n", stderr); fputs("ERROR: error on stdin! Exit.\n", stderr);
ecore_main_loop_quit(); ecore_main_loop_quit();
return 0; return ECORE_CALLBACK_CANCEL;
} }
if (!ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_READ)) if (!ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_READ))
return 1; return ECORE_CALLBACK_RENEW;
if (!fgets(buf, sizeof(buf), stdin)) if (!fgets(buf, sizeof(buf), stdin))
{ {
fputs("ERROR: end of stdin! Exit.\n", stderr); fputs("ERROR: end of stdin! Exit.\n", stderr);
ecore_main_loop_quit(); ecore_main_loop_quit();
return 0; return ECORE_CALLBACK_CANCEL;
} }
len = strlen(buf); len = strlen(buf);
if (len < 1) if (len < 1)
{ {
fputs("ERROR: no input! Try: help\n", stderr); fputs("ERROR: no input! Try: help\n", stderr);
return 1; return ECORE_CALLBACK_RENEW;
} }
if (buf[len - 1] == '\n') if (buf[len - 1] == '\n')
{ {
@ -235,7 +235,7 @@ _slave_mode(void *data, Ecore_Fd_Handler *fd_handler)
} }
} }
return 1; return ECORE_CALLBACK_RENEW;
} }
static void static void
@ -508,7 +508,7 @@ _create_edje(Evas *evas, const struct opts *opts)
return edje; return edje;
} }
static unsigned char _parse_color(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage) static unsigned char _parse_color(__UNUSED__ const Ecore_Getopt *parser, __UNUSED__ const Ecore_Getopt_Desc *desc, const char *str, __UNUSED__ void *data, Ecore_Getopt_Value *storage)
{ {
unsigned char *color = (unsigned char *)storage->ptrp; unsigned char *color = (unsigned char *)storage->ptrp;
@ -521,7 +521,7 @@ static unsigned char _parse_color(const Ecore_Getopt *parser, const Ecore_Getop
return 1; return 1;
} }
static void _cb_delete (Ecore_Evas *ee) static void _cb_delete(__UNUSED__ Ecore_Evas *ee)
{ {
ecore_main_loop_quit(); ecore_main_loop_quit();
} }
@ -720,7 +720,6 @@ int main(int argc, char **argv)
ecore_evas_show(win); ecore_evas_show(win);
ecore_main_loop_begin(); ecore_main_loop_begin();
end_win:
ecore_evas_free(win); ecore_evas_free(win);
end: end:
edje_shutdown(); edje_shutdown();

View File

@ -24,7 +24,7 @@ _edje_hold_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
} }
static void static void
_edje_focus_in_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event_info) _edje_focus_in_signal_cb(void *data, Evas * e, Evas_Object * obj, __UNUSED__ void *event_info)
{ {
Edje *ed; Edje *ed;
Edje_Real_Part *rp; Edje_Real_Part *rp;
@ -40,7 +40,7 @@ _edje_focus_in_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event_in
} }
static void static void
_edje_focus_out_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event_info) _edje_focus_out_signal_cb(void *data, Evas * e, Evas_Object * obj, __UNUSED__ void *event_info)
{ {
Edje *ed; Edje *ed;
Edje_Real_Part *rp; Edje_Real_Part *rp;
@ -375,8 +375,8 @@ _edje_mouse_wheel_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event
e = NULL; e = NULL;
} }
int Eina_Bool
_edje_timer_cb(void *data) _edje_timer_cb(__UNUSED__ void *data)
{ {
double t; double t;
Eina_List *l; Eina_List *l;
@ -445,13 +445,12 @@ _edje_timer_cb(void *data)
_edje_thaw(ed); _edje_thaw(ed);
_edje_unref(ed); _edje_unref(ed);
} }
if (_edje_anim_count > 0) return 1; if (_edje_anim_count > 0) return ECORE_CALLBACK_RENEW;
_edje_timer = NULL; _edje_timer = NULL;
return 0; return ECORE_CALLBACK_CANCEL;
data = NULL;
} }
int Eina_Bool
_edje_pending_timer_cb(void *data) _edje_pending_timer_cb(void *data)
{ {
Edje_Pending_Program *pp; Edje_Pending_Program *pp;
@ -460,7 +459,7 @@ _edje_pending_timer_cb(void *data)
pp->edje->pending_actions = eina_list_remove(pp->edje->pending_actions, pp); pp->edje->pending_actions = eina_list_remove(pp->edje->pending_actions, pp);
_edje_program_run(pp->edje, pp->program, 1, "", ""); _edje_program_run(pp->edje, pp->program, 1, "", "");
free(pp); free(pp);
return 0; return ECORE_CALLBACK_CANCEL;
} }
void void

View File

@ -5075,7 +5075,7 @@ edje_edit_spectra_stop_num_set(Evas_Object *obj, const char* spectra, int num)
s = _edje_edit_spectrum_entry_get(ed, spectra); s = _edje_edit_spectrum_entry_get(ed, spectra);
if (!s) return EINA_FALSE; if (!s) return EINA_FALSE;
if (num == eina_list_count(s->color_list)) return EINA_TRUE; if (num == (int) eina_list_count(s->color_list)) return EINA_TRUE;
//destroy all colors //destroy all colors
while (s->color_list) while (s->color_list)

View File

@ -291,7 +291,7 @@ _edje_embryo_fn_get_str(Embryo_Program *ep, Embryo_Cell *params)
s = (char *)_edje_var_str_get(ed, (int)params[1]); s = (char *)_edje_var_str_get(ed, (int)params[1]);
if (s) if (s)
{ {
if (strlen(s) < params[3]) if ((int) strlen(s) < params[3])
{ {
SETSTR(s, params[2]); SETSTR(s, params[2]);
} }
@ -514,7 +514,7 @@ _edje_embryo_fn_fetch_str(Embryo_Program *ep, Embryo_Cell *params)
(int) params[2]); (int) params[2]);
if (s) if (s)
{ {
if (strlen(s) < params[4]) if ((int) strlen(s) < params[4])
{ {
SETSTR(s, params[3]); SETSTR(s, params[3]);
} }
@ -875,7 +875,7 @@ _edje_embryo_fn_get_state(Embryo_Program *ep, Embryo_Cell *params)
s = rp->chosen_description->state.name; s = rp->chosen_description->state.name;
if (s) if (s)
{ {
if (strlen(s) < params[3]) if ((int) strlen(s) < params[3])
{ {
SETSTR(s, params[2]); SETSTR(s, params[2]);
} }
@ -1091,7 +1091,7 @@ _edje_embryo_fn_get_text(Embryo_Program *ep, Embryo_Cell *params)
s = (char *)edje_object_part_text_get(ed->obj, rp->part->name); s = (char *)edje_object_part_text_get(ed->obj, rp->part->name);
if (s) if (s)
{ {
if (strlen(s) < params[3]) if ((int) strlen(s) < params[3])
{ {
SETSTR(s, params[2]); SETSTR(s, params[2]);
} }
@ -1330,7 +1330,7 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
int id, i, n; int id, i, n;
Embryo_Cell *ptr; Embryo_Cell *ptr;
if (params[0] < (sizeof(Embryo_Cell) * (2))) return 0; if (params[0] < (int) (sizeof(Embryo_Cell) * (2))) return 0;
ed = embryo_program_data_get(ep); ed = embryo_program_data_get(ep);
type = params[1]; type = params[1];
id = params[2]; id = params[2];
@ -1641,7 +1641,7 @@ _edje_embryo_fn_set_state_val(Embryo_Program *ep, Embryo_Cell *params)
char *s; char *s;
/* we need at least 3 arguments */ /* we need at least 3 arguments */
if (params[0] < (sizeof(Embryo_Cell) * 3)) if (params[0] < (int) (sizeof(Embryo_Cell) * 3))
return 0; return 0;
if (params[1] < 0) if (params[1] < 0)
@ -1998,7 +1998,7 @@ _edje_embryo_fn_get_state_val(Embryo_Program *ep, Embryo_Cell *params)
char *s; char *s;
/* we need at least 3 arguments */ /* we need at least 3 arguments */
if (params[0] < (sizeof(Embryo_Cell) * 3)) if (params[0] < (int) (sizeof(Embryo_Cell) * 3))
return 0; return 0;
if (params[1] < 0) if (params[1] < 0)

View File

@ -29,9 +29,9 @@ void *alloca (size_t);
#ifdef HAVE_ECORE_IMF #ifdef HAVE_ECORE_IMF
static int _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos); static int _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
static int _edje_entry_imf_event_commit_cb(void *data, int type, void *event); static Eina_Bool _edje_entry_imf_event_commit_cb(void *data, int type, void *event);
static int _edje_entry_imf_event_changed_cb(void *data, int type, void *event); static Eina_Bool _edje_entry_imf_event_changed_cb(void *data, int type, void *event);
static int _edje_entry_imf_event_delete_surrounding_cb(void *data, int type, void *event); static Eina_Bool _edje_entry_imf_event_delete_surrounding_cb(void *data, int type, void *event);
#endif #endif
typedef struct _Entry Entry; typedef struct _Entry Entry;
@ -1814,7 +1814,7 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
} }
static void static void
_evas_focus_in_cb(void *data, Evas *e, void *event_info) _evas_focus_in_cb(void *data, Evas *e, __UNUSED__ void *event_info)
{ {
Edje *ed = (Edje *)data; Edje *ed = (Edje *)data;
@ -1824,7 +1824,7 @@ _evas_focus_in_cb(void *data, Evas *e, void *event_info)
} }
static void static void
_evas_focus_out_cb(void *data, Evas *e, void *event_info) _evas_focus_out_cb(void *data, Evas *e, __UNUSED__ void *event_info)
{ {
Edje *ed = (Edje *)data; Edje *ed = (Edje *)data;
@ -2680,7 +2680,7 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNU
return 1; return 1;
} }
static int static Eina_Bool
_edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event)
{ {
Edje* ed = data; Edje* ed = data;
@ -2688,15 +2688,15 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event)
Entry *en; Entry *en;
Ecore_IMF_Event_Commit *ev = event; Ecore_IMF_Event_Commit *ev = event;
int i; int i;
if (!rp) return 1; if (!rp) return ECORE_CALLBACK_PASS_ON;
en = rp->entry_data; en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
return 1; return ECORE_CALLBACK_PASS_ON;
if (en->imf_context != ev->ctx) return 1; if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
if (en->have_composition) if (en->have_composition)
{ {
@ -2713,11 +2713,11 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event)
_anchors_get(en->cursor, rp->object, en); _anchors_get(en->cursor, rp->object, en);
_edje_emit(rp->edje, "entry,changed", rp->part->name); _edje_emit(rp->edje, "entry,changed", rp->part->name);
_edje_emit(ed, "cursor,changed", rp->part->name); _edje_emit(ed, "cursor,changed", rp->part->name);
return 0; return ECORE_CALLBACK_DONE;
} }
static int static Eina_Bool
_edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event) _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event)
{ {
Edje* ed = data; Edje* ed = data;
@ -2728,23 +2728,23 @@ _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event)
int i; int i;
char *preedit_string; char *preedit_string;
if (!rp) return 1; if (!rp) return ECORE_CALLBACK_PASS_ON;
en = rp->entry_data; en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
return 1; return ECORE_CALLBACK_PASS_ON;
if (!en->imf_context) return 1; if (!en->imf_context) return ECORE_CALLBACK_PASS_ON;
if (en->imf_context != ev->ctx) return 1; if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &length); ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &length);
// FIXME : check the maximum length of evas_textblock // FIXME : check the maximum length of evas_textblock
if ( 0 /* check the maximum length of evas_textblock */ ) if ( 0 /* check the maximum length of evas_textblock */ )
return 1; return ECORE_CALLBACK_PASS_ON;
if (en->have_composition) if (en->have_composition)
{ {
// delete the composing characters // delete the composing characters
@ -2762,33 +2762,33 @@ _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event)
//xx //xx
evas_object_textblock_text_markup_prepend(en->cursor, preedit_string); evas_object_textblock_text_markup_prepend(en->cursor, preedit_string);
_sel_extend(en->cursor, rp->object, en); _sel_extend(en->cursor, rp->object, en);
_curs_update_from_curs(en->cursor, rp->object, en); _curs_update_from_curs(en->cursor, rp->object, en);
_anchors_get(en->cursor, rp->object, en); _anchors_get(en->cursor, rp->object, en);
_edje_emit(rp->edje, "entry,changed", rp->part->name); _edje_emit(rp->edje, "entry,changed", rp->part->name);
_edje_emit(ed, "cursor,changed", rp->part->name); _edje_emit(ed, "cursor,changed", rp->part->name);
return 0; return ECORE_CALLBACK_DONE;
} }
static int static Eina_Bool
_edje_entry_imf_event_delete_surrounding_cb(void *data, int type __UNUSED__, void *event) _edje_entry_imf_event_delete_surrounding_cb(void *data, int type __UNUSED__, void *event)
{ {
Edje *ed = data; Edje *ed = data;
Edje_Real_Part *rp = ed->focused_part; Edje_Real_Part *rp = ed->focused_part;
Entry *en; Entry *en;
Ecore_IMF_Event_Delete_Surrounding *ev = event; Ecore_IMF_Event_Delete_Surrounding *ev = event;
if (!rp) return 1; if (!rp) return ECORE_CALLBACK_PASS_ON;
en = rp->entry_data; en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
return 1; return ECORE_CALLBACK_PASS_ON;
if (en->imf_context != ev->ctx) return 1; if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
return 0; return ECORE_CALLBACK_DONE;
} }
#endif #endif

View File

@ -619,8 +619,8 @@ _edje_external_params_free(Eina_List *external_params, Eina_Bool free_strings)
void void
_edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep, _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep,
Edje_Calc_Params *params, Edje_Calc_Params *params,
Edje_Part_Description *chosen_desc) Edje_Part_Description *chosen_desc)
{ {
Edje_External_Type *type; Edje_External_Type *type;
void *params1, *params2 = NULL; void *params1, *params2 = NULL;

View File

@ -231,7 +231,7 @@ struct _Edje_Lua_Edje_Part_Description
jmp_buf _edje_lua_panic_jmp; jmp_buf _edje_lua_panic_jmp;
static int static int
_edje_lua_custom_panic(lua_State *L) _edje_lua_custom_panic(__UNUSED__ lua_State *L)
{ {
printf("PANIC\n"); printf("PANIC\n");
longjmp(_edje_lua_panic_jmp, 1); longjmp(_edje_lua_panic_jmp, 1);
@ -846,13 +846,13 @@ const Edje_Lua_Reg *cTimer[] = {
NULL // sentinel NULL // sentinel
}; };
static int static Eina_Bool
_edje_lua_timer_cb(void *data) _edje_lua_timer_cb(void *data)
{ {
Edje_Lua_Timer *obj = data; Edje_Lua_Timer *obj = data;
lua_State *L = obj->L; lua_State *L = obj->L;
int err_code; int err_code;
int res; Eina_Bool res;
_edje_lua_get_ref(L, obj->cb); // callback function _edje_lua_get_ref(L, obj->cb); // callback function
_edje_lua_get_reg(L, obj); _edje_lua_get_reg(L, obj);
@ -860,7 +860,7 @@ _edje_lua_timer_cb(void *data)
if ((err_code = lua_pcall(L, 1, 1, 0))) if ((err_code = lua_pcall(L, 1, 1, 0)))
{ {
_edje_lua_error(L, err_code); _edje_lua_error(L, err_code);
return 0; return ECORE_CALLBACK_CANCEL;
} }
res = luaL_optint(L, -1, ECORE_CALLBACK_CANCEL); res = luaL_optint(L, -1, ECORE_CALLBACK_CANCEL);
@ -1042,10 +1042,11 @@ const Edje_Lua_Reg *cAnimator[] = {
NULL // sentinel NULL // sentinel
}; };
static int static Eina_Bool
_edje_lua_animator_cb(void *data) _edje_lua_animator_cb(void *data)
{ {
int err, res; Eina_Bool res;
int err;
Edje_Lua_Animator *obj = data; Edje_Lua_Animator *obj = data;
lua_State *L = obj->L; lua_State *L = obj->L;
@ -1055,7 +1056,7 @@ _edje_lua_animator_cb(void *data)
if ((err = lua_pcall(L, 1, 1, 0))) if ((err = lua_pcall(L, 1, 1, 0)))
{ {
_edje_lua_error(L, err); _edje_lua_error(L, err);
return 0; return ECORE_CALLBACK_CANCEL;
} }
res = luaL_checkint(L, -1); res = luaL_checkint(L, -1);
@ -1150,10 +1151,11 @@ const Edje_Lua_Reg *cPoller[] = {
NULL // sentinel NULL // sentinel
}; };
static int static Eina_Bool
_edje_lua_poller_cb(void *data) _edje_lua_poller_cb(void *data)
{ {
int err, res; Eina_Bool res;
int err;
Edje_Lua_Poller *obj = data; Edje_Lua_Poller *obj = data;
lua_State *L = obj->L; lua_State *L = obj->L;
@ -1163,7 +1165,7 @@ _edje_lua_poller_cb(void *data)
if ((err = lua_pcall(L, 1, 1, 0))) if ((err = lua_pcall(L, 1, 1, 0)))
{ {
_edje_lua_error(L, err); _edje_lua_error(L, err);
return 0; return ECORE_CALLBACK_CANCEL;
} }
res = luaL_checkint(L, -1); res = luaL_checkint(L, -1);
@ -1456,8 +1458,7 @@ const Edje_Lua_Reg mObject = {
}; };
static void static void
_edje_lua_object_del_cb(void *data, Evas * e, Evas_Object * obj, _edje_lua_object_del_cb(void *data, __UNUSED__ Evas * e, Evas_Object * obj, __UNUSED__ void *event_info)
void *event_info)
{ {
//printf("_edje_lua_object_delete_cb\n"); //printf("_edje_lua_object_delete_cb\n");
lua_State *L = data; lua_State *L = data;
@ -2206,7 +2207,7 @@ _edje_lua_object_set_precise_is_inside(lua_State *L)
lua_insert(L, -2); lua_insert(L, -2);
static void static void
_edje_lua_object_cb_mouse_in(void *data, Evas * e, Evas_Object * obj, _edje_lua_object_cb_mouse_in(void *data, __UNUSED__ Evas * e, Evas_Object * obj,
void *event_info) void *event_info)
{ {
OBJECT_CB_MACRO("mouse_in"); OBJECT_CB_MACRO("mouse_in");
@ -2223,7 +2224,7 @@ _edje_lua_object_cb_mouse_in(void *data, Evas * e, Evas_Object * obj,
} }
static void static void
_edje_lua_object_cb_mouse_out(void *data, Evas * e, Evas_Object * obj, _edje_lua_object_cb_mouse_out(void *data, __UNUSED__ Evas * e, Evas_Object * obj,
void *event_info) void *event_info)
{ {
OBJECT_CB_MACRO("mouse_out"); OBJECT_CB_MACRO("mouse_out");
@ -2240,7 +2241,7 @@ _edje_lua_object_cb_mouse_out(void *data, Evas * e, Evas_Object * obj,
} }
static void static void
_edje_lua_object_cb_mouse_down(void *data, Evas * e, Evas_Object * obj, _edje_lua_object_cb_mouse_down(void *data, __UNUSED__ Evas * e, Evas_Object * obj,
void *event_info) void *event_info)
{ {
OBJECT_CB_MACRO("mouse_down"); OBJECT_CB_MACRO("mouse_down");
@ -2258,7 +2259,7 @@ _edje_lua_object_cb_mouse_down(void *data, Evas * e, Evas_Object * obj,
} }
static void static void
_edje_lua_object_cb_mouse_up(void *data, Evas * e, Evas_Object * obj, _edje_lua_object_cb_mouse_up(void *data, __UNUSED__ Evas * e, Evas_Object * obj,
void *event_info) void *event_info)
{ {
OBJECT_CB_MACRO("mouse_up"); OBJECT_CB_MACRO("mouse_up");
@ -2276,7 +2277,7 @@ _edje_lua_object_cb_mouse_up(void *data, Evas * e, Evas_Object * obj,
} }
static void static void
_edje_lua_object_cb_mouse_move(void *data, Evas * e, Evas_Object * obj, _edje_lua_object_cb_mouse_move(void *data, __UNUSED__ Evas * e, Evas_Object * obj,
void *event_info) void *event_info)
{ {
OBJECT_CB_MACRO("mouse_move"); OBJECT_CB_MACRO("mouse_move");
@ -2294,7 +2295,7 @@ _edje_lua_object_cb_mouse_move(void *data, Evas * e, Evas_Object * obj,
} }
static void static void
_edje_lua_object_cb_mouse_wheel(void *data, Evas * e, Evas_Object * obj, _edje_lua_object_cb_mouse_wheel(void *data, __UNUSED__ Evas * e, Evas_Object * obj,
void *event_info) void *event_info)
{ {
OBJECT_CB_MACRO("mouse_wheel"); OBJECT_CB_MACRO("mouse_wheel");
@ -3936,8 +3937,8 @@ const Edje_Lua_Reg mPart = {
}; };
static void static void
_edje_lua_edje_part_del_cb(void *data, Evas * e, Evas_Object * obj, _edje_lua_edje_part_del_cb(void *data, __UNUSED__ Evas * e, Evas_Object * obj,
void *event_info) __UNUSED__ void *event_info)
{ {
//printf("_edje_lua_object_delete_cb\n"); //printf("_edje_lua_object_delete_cb\n");
lua_State *L = data; lua_State *L = data;
@ -5018,8 +5019,8 @@ _edje_lua_group_fn_poller(lua_State *L)
} }
// Only 1 type of poller currently implemented in ecore // Only 1 type of poller currently implemented in ecore
tar->ep = ecore_poller_add(ECORE_POLLER_CORE, interval, tar->ep = ecore_poller_add(ECORE_POLLER_CORE, interval,
_edje_lua_poller_cb, tar); _edje_lua_poller_cb, tar);
tar->L = L; tar->L = L;
_edje_lua_new_reg(L, -1, tar); // freed in _edje_lua_poller_cb/del _edje_lua_new_reg(L, -1, tar); // freed in _edje_lua_poller_cb/del
tar->cb = _edje_lua_new_ref(L, 3); // freed in _edje_lua_poller_cb/del tar->cb = _edje_lua_new_ref(L, 3); // freed in _edje_lua_poller_cb/del

View File

@ -156,10 +156,10 @@ edje_message_signal_process(void)
} }
static int static Eina_Bool
_edje_dummy_timer(void *data __UNUSED__) _edje_dummy_timer(void *data __UNUSED__)
{ {
return 0; return ECORE_CALLBACK_CANCEL;
} }
static void static void
@ -176,7 +176,7 @@ _edje_job(void *data __UNUSED__)
_injob--; _injob--;
} }
static int static Eina_Bool
_edje_job_loss_timer(void *data __UNUSED__) _edje_job_loss_timer(void *data __UNUSED__)
{ {
_job_loss_timer = NULL; _job_loss_timer = NULL;
@ -184,7 +184,7 @@ _edje_job_loss_timer(void *data __UNUSED__)
{ {
_job = ecore_job_add(_edje_job, NULL); _job = ecore_job_add(_edje_job, NULL);
} }
return 0; return ECORE_CALLBACK_CANCEL;
} }
void void

View File

@ -1310,8 +1310,8 @@ void _edje_part_recalc_1(Edje *ed, Edje_Real_Part *ep);
int _edje_part_dragable_calc(Edje *ed, Edje_Real_Part *ep, FLOAT_T *x, FLOAT_T *y); int _edje_part_dragable_calc(Edje *ed, Edje_Real_Part *ep, FLOAT_T *x, FLOAT_T *y);
void _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y); void _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y);
int _edje_timer_cb(void *data); Eina_Bool _edje_timer_cb(void *data);
int _edje_pending_timer_cb(void *data); Eina_Bool _edje_pending_timer_cb(void *data);
void _edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp); void _edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
void _edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp); void _edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
void _edje_callbacks_del(Evas_Object *obj, Edje *ed); void _edje_callbacks_del(Evas_Object *obj, Edje *ed);
@ -1520,18 +1520,20 @@ void _edje_embryo_globals_init(Edje *ed);
Embryo_Cell *___cptr; \ Embryo_Cell *___cptr; \
if ((___cptr = embryo_data_address_get(ep, (par)))) { \ if ((___cptr = embryo_data_address_get(ep, (par)))) { \
embryo_data_string_set(ep, str, ___cptr); } } embryo_data_string_set(ep, str, ___cptr); } }
#define SETSTRALLOCATE(s) { \ #define SETSTRALLOCATE(s) \
if (s) { \ { \
if (strlen((s)) < params[4]) { \ if (s) { \
SETSTR((s), params[3]); } \ if ((int) strlen((s)) < params[4]) { \
else { \ SETSTR((s), params[3]); } \
char *ss; \ else { \
ss = alloca(strlen((s)) + 1); \ char *ss; \
strcpy(ss, (s)); \ ss = alloca(strlen((s)) + 1); \
ss[params[4] - 2] = 0; \ strcpy(ss, (s)); \
SETSTR(ss, params[3]); } } \ ss[params[4] - 2] = 0; \
else \ SETSTR(ss, params[3]); } } \
SETSTR("", params[3]); } else \
SETSTR("", params[3]); \
}
#define SETFLOAT(val, par) { \ #define SETFLOAT(val, par) { \
float *___cptr; \ float *___cptr; \
if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \ if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \

View File

@ -1071,11 +1071,7 @@ _edje_emit(Edje *ed, const char *sig, const char *src)
{ {
const char *partid; const char *partid;
Evas_Object *child; Evas_Object *child;
Eina_List *l;
Edje *ed2 = NULL; Edje *ed2 = NULL;
Eina_Bool number = EINA_TRUE;
unsigned int i;
int id;
idx = strchr(newsig, EDJE_PART_PATH_SEPARATOR_INDEXR); idx = strchr(newsig, EDJE_PART_PATH_SEPARATOR_INDEXR);

View File

@ -118,7 +118,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
sc = ed->scale; sc = ed->scale;
if (sc == ZERO) sc = _edje_scale; if (sc == ZERO) sc = _edje_scale;
*free_text = 0; *free_text = 0;
if (sw <= 1) return ""; if (sw <= 1) return "";
@ -161,7 +161,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
* FIXME: we might want to set a max string length somewhere... * FIXME: we might want to set a max string length somewhere...
*/ */
extra = 1 + 3 + 3; /* terminator, leading and trailing ellipsis */ extra = 1 + 3 + 3; /* terminator, leading and trailing ellipsis */
orig_len = MIN(orig_len, 8192 - extra); orig_len = MIN(orig_len, ((size_t) 8192 - extra));
if (!(buf = malloc(orig_len + extra))) if (!(buf = malloc(orig_len + extra)))
return text; return text;
@ -216,7 +216,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
break; break;
} }
} }
else if ((c1 > 0 && c1 >= orig_len) || c2 == 0) else if ((c1 > 0 && (size_t) c1 >= orig_len) || c2 == 0)
{ {
buf[0] = 0; buf[0] = 0;
break; break;
@ -256,7 +256,7 @@ _edje_text_font_get(const char *base, const char *new, char **free_later)
font_len = strlen(new); font_len = strlen(new);
aux = strchr(base_style, ','); aux = strchr(base_style, ',');
style_len = (aux) ? (aux - base_style) : strlen(base_style); style_len = (aux) ? (aux - base_style) : (int) strlen(base_style);
*free_later = malloc(font_len + style_len + 1); *free_later = malloc(font_len + style_len + 1);
memcpy(*free_later, new, font_len); memcpy(*free_later, new, font_len);

View File

@ -3936,15 +3936,15 @@ edje_object_part_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear
} }
static void static void
_edje_perspective_obj_del(void *data, Evas *e, Evas_Object *obj, void *event_info) _edje_perspective_obj_del(void *data, __UNUSED__ Evas *e, __UNUSED__ Evas_Object *obj, __UNUSED__ void *event_info)
{ {
Edje_Perspective *ps = data; Edje_Perspective *ps = data;
Evas_Object *o; Evas_Object *o;
EINA_LIST_FREE(ps->users, o) EINA_LIST_FREE(ps->users, o)
{ {
Edje *ed; Edje *ed;
ed = evas_object_smart_data_get(o); ed = evas_object_smart_data_get(o);
if (!ed) continue; if (!ed) continue;
ed->persp = NULL; ed->persp = NULL;
@ -4693,17 +4693,15 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp)
} }
void void
_edje_object_part_swallow_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) _edje_object_part_swallow_changed_hints_cb(void *data, __UNUSED__ Evas *e, __UNUSED__ Evas_Object *obj, __UNUSED__ void *event_info)
{ {
Edje_Real_Part *rp; Edje_Real_Part *rp;
rp = data; rp = data;
_edje_real_part_swallow_hints_update(rp); _edje_real_part_swallow_hints_update(rp);
rp->edje->dirty = 1; rp->edje->dirty = 1;
_edje_recalc(rp->edje); _edje_recalc(rp->edje);
return; return;
e = NULL;
event_info = NULL;
} }
void void
@ -4734,17 +4732,17 @@ _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow)
evas_object_clip_set(rp->swallowed_object, rp->clip_to->object); evas_object_clip_set(rp->swallowed_object, rp->clip_to->object);
else evas_object_clip_set(rp->swallowed_object, rp->edje->clipper); else evas_object_clip_set(rp->swallowed_object, rp->edje->clipper);
evas_object_stack_above(rp->swallowed_object, rp->object); evas_object_stack_above(rp->swallowed_object, rp->object);
evas_object_event_callback_add(rp->swallowed_object, evas_object_event_callback_add(rp->swallowed_object,
EVAS_CALLBACK_FREE, EVAS_CALLBACK_FREE,
_edje_object_part_swallow_free_cb, _edje_object_part_swallow_free_cb,
rp->edje->obj); rp->edje->obj);
evas_object_event_callback_add(rp->swallowed_object, evas_object_event_callback_add(rp->swallowed_object,
EVAS_CALLBACK_CHANGED_SIZE_HINTS, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_edje_object_part_swallow_changed_hints_cb, _edje_object_part_swallow_changed_hints_cb,
rp); rp);
_edje_real_part_swallow_hints_update(rp); _edje_real_part_swallow_hints_update(rp);
if (rp->part->mouse_events) if (rp->part->mouse_events)
{ {
_edje_callbacks_add(obj_swallow, rp->edje, rp); _edje_callbacks_add(obj_swallow, rp->edje, rp);
@ -4793,7 +4791,7 @@ _edje_object_preload(Edje *ed)
} }
static void static void
_edje_object_image_preload_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) _edje_object_image_preload_cb(void *data, __UNUSED__ Evas *e, Evas_Object *obj, __UNUSED__ void *event_info)
{ {
Edje *ed = data; Edje *ed = data;
@ -4802,7 +4800,7 @@ _edje_object_image_preload_cb(void *data, Evas *e, Evas_Object *obj, void *event
} }
static void static void
_edje_object_signal_preload_cb(void *data, Evas_Object *obj, const char *emission, const char *source) _edje_object_signal_preload_cb(void *data, Evas_Object *obj, __UNUSED__ const char *emission, __UNUSED__ const char *source)
{ {
Edje *ed = data; Edje *ed = data;

View File

@ -6,13 +6,13 @@
#include "edje_private.h" #include "edje_private.h"
static int _edje_var_timer_cb(void *data); static Eina_Bool _edje_var_timer_cb(void *data);
static int _edje_var_anim_cb(void *data); static Eina_Bool _edje_var_anim_cb(void *data);
static Ecore_Animator *_edje_animator = NULL; static Ecore_Animator *_edje_animator = NULL;
static Eina_List *_edje_anim_list = NULL; static Eina_List *_edje_anim_list = NULL;
static int static Eina_Bool
_edje_var_timer_cb(void *data) _edje_var_timer_cb(void *data)
{ {
Edje_Var_Timer *et; Edje_Var_Timer *et;
@ -20,7 +20,7 @@ _edje_var_timer_cb(void *data)
Embryo_Function fn; Embryo_Function fn;
et = data; et = data;
if (!et) return 0; if (!et) return ECORE_CALLBACK_CANCEL;
ed = et->edje; ed = et->edje;
// _edje_embryo_script_reset(ed); // _edje_embryo_script_reset(ed);
embryo_program_vm_push(ed->collection->script); embryo_program_vm_push(ed->collection->script);
@ -40,10 +40,10 @@ _edje_var_timer_cb(void *data)
embryo_program_vm_pop(ed->collection->script); embryo_program_vm_pop(ed->collection->script);
_edje_recalc(ed); _edje_recalc(ed);
} }
return 0; return ECORE_CALLBACK_CANCEL;
} }
static int static Eina_Bool
_edje_var_anim_cb(void *data __UNUSED__) _edje_var_anim_cb(void *data __UNUSED__)
{ {
Eina_List *l, *tl = NULL; Eina_List *l, *tl = NULL;