From: Fabiano Fidêncio <fidencio@profusion.mobi>

Changing return of Eina_Bool functions that were not EINA_TRUE or
EINA_FALSE in Edje.



SVN revision: 49469
This commit is contained in:
Fabiano Fidêncio 2010-06-05 13:07:08 +00:00 committed by Carsten Haitzler
parent 7851a9cc0e
commit 40563f8aef
6 changed files with 286 additions and 286 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2250,17 +2250,17 @@ _edje_entry_item_geometry_get(Edje_Real_Part *rp, const char *item, Evas_Coord *
Eina_List *l;
Anchor *an;
if (!en) return 0;
if (!en) return EINA_FALSE;
EINA_LIST_FOREACH(en->anchors, l, an)
{
if (an->item) continue;
if (!strcmp(item, an->name))
{
evas_textblock_cursor_format_item_geometry_get(an->start, cx, cy, cw, ch);
return 1;
return EINA_TRUE;
}
}
return 0;
return EINA_FALSE;
}
const Eina_List *
@ -2368,12 +2368,12 @@ _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur)
{
Entry *en = rp->entry_data;
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
if (!c) return 0;
if (!c) return EINA_FALSE;
if (!evas_textblock_cursor_char_next(c))
{
evas_textblock_cursor_eol_set(c, 0);
if (evas_textblock_cursor_node_next(c)) goto ok;
else return 0;
else return EINA_FALSE;
}
ok:
_curs_update_from_curs(c, rp->object, rp->entry_data);
@ -2390,7 +2390,7 @@ _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur)
_edje_emit(rp->edje, "cursor,changed", rp->part->name);
_edje_entry_real_part_configure(rp);
return 1;
return EINA_TRUE;
}
Eina_Bool
@ -2398,11 +2398,11 @@ _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur)
{
Entry *en = rp->entry_data;
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
if (!c) return 0;
if (!c) return EINA_FALSE;
if (!evas_textblock_cursor_char_prev(c))
{
if (evas_textblock_cursor_node_prev(c)) goto ok;
else return 0;
else return EINA_FALSE;
}
ok:
_curs_update_from_curs(c, rp->object, rp->entry_data);
@ -2419,7 +2419,7 @@ _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur)
_edje_emit(rp->edje, "cursor,changed", rp->part->name);
_edje_entry_real_part_configure(rp);
return 1;
return EINA_TRUE;
}
Eina_Bool
@ -2429,13 +2429,13 @@ _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur)
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch;
int ln;
if (!c) return 0;
if (!c) return EINA_FALSE;
ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL);
ln--;
if (ln < 0) return 0;
if (ln < 0) return EINA_FALSE;
if (!evas_object_textblock_line_number_geometry_get(rp->object, ln,
&lx, &ly, &lw, &lh))
return 0;
return EINA_FALSE;
evas_textblock_cursor_char_geometry_get(c, &cx, &cy, &cw, &ch);
if (!evas_textblock_cursor_char_coord_set(c, cx, ly + (lh / 2)))
{
@ -2458,7 +2458,7 @@ _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur)
_edje_emit(rp->edje, "cursor,changed", rp->part->name);
_edje_entry_real_part_configure(rp);
return 1;
return EINA_TRUE;
}
Eina_Bool
@ -2468,12 +2468,12 @@ _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur)
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch;
int ln;
if (!c) return 0;
if (!c) return EINA_FALSE;
ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL);
ln++;
if (!evas_object_textblock_line_number_geometry_get(rp->object, ln,
&lx, &ly, &lw, &lh))
return 0;
return EINA_FALSE;
evas_textblock_cursor_char_geometry_get(c, &cx, &cy, &cw, &ch);
if (!evas_textblock_cursor_char_coord_set(c, cx, ly + (lh / 2)))
{
@ -2496,7 +2496,7 @@ _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur)
_edje_emit(rp->edje, "cursor,changed", rp->part->name);
_edje_entry_real_part_configure(rp);
return 1;
return EINA_TRUE;
}
void
@ -2619,16 +2619,16 @@ Eina_Bool
_edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur)
{
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
if (!c) return 0;
if (evas_textblock_cursor_node_format_get(c)) return 1;
return 0;
if (!c) return EINA_FALSE;
if (evas_textblock_cursor_node_format_get(c)) return EINA_TRUE;
return EINA_FALSE;
}
Eina_Bool
_edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur)
{
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
if (!c) return 0;
if (!c) return EINA_FALSE;
return evas_textblock_cursor_node_format_is_visible_get(c);
}

View File

@ -186,7 +186,7 @@ edje_file_group_exists(const char *file, const char *glob)
Edje_File *edf;
int error_ret = 0;
if ((!file) || (!*file)) return 0;
if ((!file) || (!*file)) return EINA_FALSE;
edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL);
if (edf != NULL)
{
@ -200,13 +200,13 @@ edje_file_group_exists(const char *file, const char *glob)
{
edje_match_patterns_free(patterns);
_edje_cache_file_unref(edf);
return 1;
return EINA_TRUE;
}
edje_match_patterns_free(patterns);
}
_edje_cache_file_unref(edf);
}
return 0;
return EINA_FALSE;
}
@ -994,7 +994,7 @@ static Eina_Bool data_cache_free(const Eina_Hash *hash __UNUSED__, const void *k
edf = fdata;
if (edf->free_strings) eina_stringshare_del(data);
return 1;
return EINA_TRUE;
}
void
@ -1219,7 +1219,7 @@ _edje_file_collection_hash_foreach(const Eina_Hash *hash __UNUSED__, const void
coll->part, coll->references);
_edje_collection_free(edf, coll);
return 1;
return EINA_TRUE;
}
#ifdef EDJE_PROGRAM_CACHE
@ -1227,7 +1227,7 @@ static Eina_Bool
_edje_collection_free_prog_cache_matches_free_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata)
{
eina_list_free((Eina_List *)data);
return 1;
return EINA_TRUE;
key = NULL;
hash = NULL;
fdata = NULL;

View File

@ -450,7 +450,7 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
Edje_Real_Part *rp;
ed = runp->edje;
if (ed->delete_me) return 0;
if (ed->delete_me) return EINA_FALSE;
_edje_block(ed);
_edje_ref(ed);
_edje_freeze(ed);
@ -523,14 +523,14 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
_edje_unref(ed);
if (!ed->walking_actions) free(runp);
_edje_unblock(ed);
return 0;
return EINA_FALSE;
}
break_prog:
_edje_recalc(ed);
_edje_thaw(ed);
_edje_unref(ed);
_edje_unblock(ed);
return 1;
return EINA_TRUE;
}
void

View File

@ -197,7 +197,7 @@ _oid_freeall_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, vo
evas_object_del(oid->obj);
free(oid);
return 1;
return EINA_TRUE;
}
static void
@ -217,7 +217,7 @@ _oid_moveall_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, vo
Oid *oid = data;
evas_object_move(oid->obj, oid->ed->x + oid->x, oid->ed->y + oid->y);
return 1;
return EINA_TRUE;
}
static void

View File

@ -1100,10 +1100,10 @@ edje_object_part_exists(const Evas_Object *obj, const char *part)
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return 0;
if ((!ed) || (!part)) return EINA_FALSE;
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return 0;
return 1;
if (!rp) return EINA_FALSE;
return EINA_TRUE;
}
/**
@ -1729,12 +1729,12 @@ edje_object_part_text_item_geometry_get(const Evas_Object *obj, const char *part
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return 0;
if ((!ed) || (!part)) return EINA_FALSE;
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return 0;
if (!rp) return EINA_FALSE;
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
return _edje_entry_item_geometry_get(rp, item, cx, cy, cw, ch);
return 0;
return EINA_FALSE;
}
/**
@ -1867,14 +1867,14 @@ edje_object_part_text_cursor_next(const Evas_Object *obj, const char *part, Edje
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return 0;
if ((!ed) || (!part)) return EINA_FALSE;
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return 0;
if (!rp) return EINA_FALSE;
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
{
return _edje_entry_cursor_next(rp, cur);
}
return 0;
return EINA_FALSE;
}
/**
@ -1890,14 +1890,14 @@ edje_object_part_text_cursor_prev(const Evas_Object *obj, const char *part, Edje
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return 0;
if ((!ed) || (!part)) return EINA_FALSE;
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return 0;
if (!rp) return EINA_FALSE;
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
{
return _edje_entry_cursor_prev(rp, cur);
}
return 0;
return EINA_FALSE;
}
/**
@ -1913,14 +1913,14 @@ edje_object_part_text_cursor_up(const Evas_Object *obj, const char *part, Edje_C
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return 0;
if ((!ed) || (!part)) return EINA_FALSE;
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return 0;
if (!rp) return EINA_FALSE;
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
{
return _edje_entry_cursor_up(rp, cur);
}
return 0;
return EINA_FALSE;
}
/**
@ -1936,14 +1936,14 @@ edje_object_part_text_cursor_down(const Evas_Object *obj, const char *part, Edje
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return 0;
if ((!ed) || (!part)) return EINA_FALSE;
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return 0;
if (!rp) return EINA_FALSE;
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
{
return _edje_entry_cursor_down(rp, cur);
}
return 0;
return EINA_FALSE;
}
/**
@ -2069,14 +2069,14 @@ edje_object_part_text_cursor_is_format_get(const Evas_Object *obj, const char *p
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return 0;
if ((!ed) || (!part)) return EINA_FALSE;
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return 0;
if (!rp) return EINA_FALSE;
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
{
return _edje_entry_cursor_is_format_get(rp, cur);
}
return 0;
return EINA_FALSE;
}
/**
@ -4056,7 +4056,7 @@ edje_perspective_global_set(Edje_Perspective *ps, Eina_Bool global)
EAPI Eina_Bool
edje_perspective_global_get(const Edje_Perspective *ps)
{
if (!ps) return 0;
if (!ps) return EINA_FALSE;
return ps->global;
}