{NULL, NULL}
};
-static int
+static Eina_Bool
_slave_mode(void *data, Ecore_Fd_Handler *fd_handler)
{
Evas_Object *edje = data;
{
fputs("ERROR: error on stdin! Exit.\n", stderr);
ecore_main_loop_quit();
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
if (!ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_READ))
- return 1;
+ return ECORE_CALLBACK_RENEW;
if (!fgets(buf, sizeof(buf), stdin))
{
fputs("ERROR: end of stdin! Exit.\n", stderr);
ecore_main_loop_quit();
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
len = strlen(buf);
if (len < 1)
{
fputs("ERROR: no input! Try: help\n", stderr);
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
if (buf[len - 1] == '\n')
{
}
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static void
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;
return 1;
}
-static void _cb_delete (Ecore_Evas *ee)
+static void _cb_delete(__UNUSED__ Ecore_Evas *ee)
{
ecore_main_loop_quit();
}
ecore_evas_show(win);
ecore_main_loop_begin();
- end_win:
ecore_evas_free(win);
end:
edje_shutdown();
}
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_Real_Part *rp;
}
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_Real_Part *rp;
e = NULL;
}
-int
-_edje_timer_cb(void *data)
+Eina_Bool
+_edje_timer_cb(__UNUSED__ void *data)
{
double t;
Eina_List *l;
_edje_thaw(ed);
_edje_unref(ed);
}
- if (_edje_anim_count > 0) return 1;
+ if (_edje_anim_count > 0) return ECORE_CALLBACK_RENEW;
_edje_timer = NULL;
- return 0;
- data = NULL;
+ return ECORE_CALLBACK_CANCEL;
}
-int
+Eina_Bool
_edje_pending_timer_cb(void *data)
{
Edje_Pending_Program *pp;
pp->edje->pending_actions = eina_list_remove(pp->edje->pending_actions, pp);
_edje_program_run(pp->edje, pp->program, 1, "", "");
free(pp);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
void
s = _edje_edit_spectrum_entry_get(ed, spectra);
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
while (s->color_list)
s = (char *)_edje_var_str_get(ed, (int)params[1]);
if (s)
{
- if (strlen(s) < params[3])
+ if ((int) strlen(s) < params[3])
{
SETSTR(s, params[2]);
}
(int) params[2]);
if (s)
{
- if (strlen(s) < params[4])
+ if ((int) strlen(s) < params[4])
{
SETSTR(s, params[3]);
}
s = rp->chosen_description->state.name;
if (s)
{
- if (strlen(s) < params[3])
+ if ((int) strlen(s) < params[3])
{
SETSTR(s, params[2]);
}
s = (char *)edje_object_part_text_get(ed->obj, rp->part->name);
if (s)
{
- if (strlen(s) < params[3])
+ if ((int) strlen(s) < params[3])
{
SETSTR(s, params[2]);
}
int id, i, n;
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);
type = params[1];
id = params[2];
char *s;
/* we need at least 3 arguments */
- if (params[0] < (sizeof(Embryo_Cell) * 3))
+ if (params[0] < (int) (sizeof(Embryo_Cell) * 3))
return 0;
if (params[1] < 0)
char *s;
/* we need at least 3 arguments */
- if (params[0] < (sizeof(Embryo_Cell) * 3))
+ if (params[0] < (int) (sizeof(Embryo_Cell) * 3))
return 0;
if (params[1] < 0)
#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_event_commit_cb(void *data, int type, void *event);
-static int _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_commit_cb(void *data, int type, void *event);
+static Eina_Bool _edje_entry_imf_event_changed_cb(void *data, int type, void *event);
+static Eina_Bool _edje_entry_imf_event_delete_surrounding_cb(void *data, int type, void *event);
#endif
typedef struct _Entry Entry;
}
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;
}
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;
return 1;
}
-static int
+static Eina_Bool
_edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event)
{
Edje* ed = data;
Entry *en;
Ecore_IMF_Event_Commit *ev = event;
int i;
-
- if (!rp) return 1;
-
+
+ if (!rp) return ECORE_CALLBACK_PASS_ON;
+
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return 1;
-
- if (en->imf_context != ev->ctx) return 1;
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
if (en->have_composition)
{
_anchors_get(en->cursor, rp->object, en);
_edje_emit(rp->edje, "entry,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* ed = data;
int i;
char *preedit_string;
- if (!rp) return 1;
+ if (!rp) return ECORE_CALLBACK_PASS_ON;
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return 1;
-
- if (!en->imf_context) return 1;
-
- if (en->imf_context != ev->ctx) return 1;
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (!en->imf_context) return ECORE_CALLBACK_PASS_ON;
+
+ if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &length);
// FIXME : 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)
{
// delete the composing characters
//xx
evas_object_textblock_text_markup_prepend(en->cursor, preedit_string);
-
+
_sel_extend(en->cursor, rp->object, en);
_curs_update_from_curs(en->cursor, rp->object, en);
_anchors_get(en->cursor, rp->object, en);
_edje_emit(rp->edje, "entry,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 *ed = data;
Edje_Real_Part *rp = ed->focused_part;
Entry *en;
Ecore_IMF_Event_Delete_Surrounding *ev = event;
-
- if (!rp) return 1;
+
+ if (!rp) return ECORE_CALLBACK_PASS_ON;
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return 1;
-
- if (en->imf_context != ev->ctx) return 1;
-
- return 0;
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
+
+ return ECORE_CALLBACK_DONE;
}
#endif
void
_edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep,
- Edje_Calc_Params *params,
- Edje_Part_Description *chosen_desc)
+ Edje_Calc_Params *params,
+ Edje_Part_Description *chosen_desc)
{
Edje_External_Type *type;
void *params1, *params2 = NULL;
jmp_buf _edje_lua_panic_jmp;
static int
-_edje_lua_custom_panic(lua_State *L)
+_edje_lua_custom_panic(__UNUSED__ lua_State *L)
{
printf("PANIC\n");
longjmp(_edje_lua_panic_jmp, 1);
NULL // sentinel
};
-static int
+static Eina_Bool
_edje_lua_timer_cb(void *data)
{
Edje_Lua_Timer *obj = data;
lua_State *L = obj->L;
int err_code;
- int res;
+ Eina_Bool res;
_edje_lua_get_ref(L, obj->cb); // callback function
_edje_lua_get_reg(L, obj);
if ((err_code = lua_pcall(L, 1, 1, 0)))
{
_edje_lua_error(L, err_code);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
res = luaL_optint(L, -1, ECORE_CALLBACK_CANCEL);
NULL // sentinel
};
-static int
+static Eina_Bool
_edje_lua_animator_cb(void *data)
{
- int err, res;
+ Eina_Bool res;
+ int err;
Edje_Lua_Animator *obj = data;
lua_State *L = obj->L;
if ((err = lua_pcall(L, 1, 1, 0)))
{
_edje_lua_error(L, err);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
res = luaL_checkint(L, -1);
NULL // sentinel
};
-static int
+static Eina_Bool
_edje_lua_poller_cb(void *data)
{
- int err, res;
+ Eina_Bool res;
+ int err;
Edje_Lua_Poller *obj = data;
lua_State *L = obj->L;
if ((err = lua_pcall(L, 1, 1, 0)))
{
_edje_lua_error(L, err);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
res = luaL_checkint(L, -1);
};
static void
-_edje_lua_object_del_cb(void *data, Evas * e, Evas_Object * obj,
- void *event_info)
+_edje_lua_object_del_cb(void *data, __UNUSED__ Evas * e, Evas_Object * obj, __UNUSED__ void *event_info)
{
//printf("_edje_lua_object_delete_cb\n");
lua_State *L = data;
lua_insert(L, -2);
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)
{
OBJECT_CB_MACRO("mouse_in");
}
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)
{
OBJECT_CB_MACRO("mouse_out");
}
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)
{
OBJECT_CB_MACRO("mouse_down");
}
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)
{
OBJECT_CB_MACRO("mouse_up");
}
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)
{
OBJECT_CB_MACRO("mouse_move");
}
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)
{
OBJECT_CB_MACRO("mouse_wheel");
};
static void
-_edje_lua_edje_part_del_cb(void *data, Evas * e, Evas_Object * obj,
- void *event_info)
+_edje_lua_edje_part_del_cb(void *data, __UNUSED__ Evas * e, Evas_Object * obj,
+ __UNUSED__ void *event_info)
{
//printf("_edje_lua_object_delete_cb\n");
lua_State *L = data;
}
// Only 1 type of poller currently implemented in ecore
- tar->ep = ecore_poller_add(ECORE_POLLER_CORE, interval,
- _edje_lua_poller_cb, tar);
+ tar->ep = ecore_poller_add(ECORE_POLLER_CORE, interval,
+ _edje_lua_poller_cb, tar);
tar->L = L;
_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
}
-static int
+static Eina_Bool
_edje_dummy_timer(void *data __UNUSED__)
{
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
_injob--;
}
-static int
+static Eina_Bool
_edje_job_loss_timer(void *data __UNUSED__)
{
_job_loss_timer = NULL;
{
_job = ecore_job_add(_edje_job, NULL);
}
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
void
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);
-int _edje_timer_cb(void *data);
-int _edje_pending_timer_cb(void *data);
+Eina_Bool _edje_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_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
void _edje_callbacks_del(Evas_Object *obj, Edje *ed);
Embryo_Cell *___cptr; \
if ((___cptr = embryo_data_address_get(ep, (par)))) { \
embryo_data_string_set(ep, str, ___cptr); } }
-#define SETSTRALLOCATE(s) { \
- if (s) { \
- if (strlen((s)) < params[4]) { \
- SETSTR((s), params[3]); } \
- else { \
- char *ss; \
- ss = alloca(strlen((s)) + 1); \
- strcpy(ss, (s)); \
- ss[params[4] - 2] = 0; \
- SETSTR(ss, params[3]); } } \
- else \
- SETSTR("", params[3]); }
+#define SETSTRALLOCATE(s) \
+ { \
+ if (s) { \
+ if ((int) strlen((s)) < params[4]) { \
+ SETSTR((s), params[3]); } \
+ else { \
+ char *ss; \
+ ss = alloca(strlen((s)) + 1); \
+ strcpy(ss, (s)); \
+ ss[params[4] - 2] = 0; \
+ SETSTR(ss, params[3]); } } \
+ else \
+ SETSTR("", params[3]); \
+ }
#define SETFLOAT(val, par) { \
float *___cptr; \
if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
{
const char *partid;
Evas_Object *child;
- Eina_List *l;
Edje *ed2 = NULL;
- Eina_Bool number = EINA_TRUE;
- unsigned int i;
- int id;
idx = strchr(newsig, EDJE_PART_PATH_SEPARATOR_INDEXR);
sc = ed->scale;
if (sc == ZERO) sc = _edje_scale;
-
+
*free_text = 0;
if (sw <= 1) return "";
* FIXME: we might want to set a max string length somewhere...
*/
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)))
return text;
break;
}
}
- else if ((c1 > 0 && c1 >= orig_len) || c2 == 0)
+ else if ((c1 > 0 && (size_t) c1 >= orig_len) || c2 == 0)
{
buf[0] = 0;
break;
font_len = strlen(new);
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);
memcpy(*free_later, new, font_len);
}
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;
-
+
EINA_LIST_FREE(ps->users, o)
{
Edje *ed;
-
+
ed = evas_object_smart_data_get(o);
if (!ed) continue;
ed->persp = NULL;
}
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;
-
+
rp = data;
_edje_real_part_swallow_hints_update(rp);
rp->edje->dirty = 1;
_edje_recalc(rp->edje);
return;
- e = NULL;
- event_info = NULL;
}
void
evas_object_clip_set(rp->swallowed_object, rp->clip_to->object);
else evas_object_clip_set(rp->swallowed_object, rp->edje->clipper);
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,
_edje_object_part_swallow_free_cb,
rp->edje->obj);
- evas_object_event_callback_add(rp->swallowed_object,
+ evas_object_event_callback_add(rp->swallowed_object,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_edje_object_part_swallow_changed_hints_cb,
rp);
-
+
_edje_real_part_swallow_hints_update(rp);
-
+
if (rp->part->mouse_events)
{
_edje_callbacks_add(obj_swallow, rp->edje, rp);
}
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;
}
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;
#include "edje_private.h"
-static int _edje_var_timer_cb(void *data);
-static int _edje_var_anim_cb(void *data);
+static Eina_Bool _edje_var_timer_cb(void *data);
+static Eina_Bool _edje_var_anim_cb(void *data);
static Ecore_Animator *_edje_animator = NULL;
static Eina_List *_edje_anim_list = NULL;
-static int
+static Eina_Bool
_edje_var_timer_cb(void *data)
{
Edje_Var_Timer *et;
Embryo_Function fn;
et = data;
- if (!et) return 0;
+ if (!et) return ECORE_CALLBACK_CANCEL;
ed = et->edje;
// _edje_embryo_script_reset(ed);
embryo_program_vm_push(ed->collection->script);
embryo_program_vm_pop(ed->collection->script);
_edje_recalc(ed);
}
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
-static int
+static Eina_Bool
_edje_var_anim_cb(void *data __UNUSED__)
{
Eina_List *l, *tl = NULL;