Edje now uses Eina_Bool where it should.

SVN revision: 46646
This commit is contained in:
Gustavo Sverzut Barbieri 2010-02-28 15:57:17 +00:00
parent a8180883bb
commit fcb71a4b3b
8 changed files with 55 additions and 55 deletions

View File

@ -431,10 +431,10 @@ extern "C" {
EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
EAPI void *edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func);
EAPI void edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source);
EAPI void edje_object_play_set (Evas_Object *obj, int play);
EAPI int edje_object_play_get (const Evas_Object *obj);
EAPI void edje_object_animation_set (Evas_Object *obj, int on);
EAPI int edje_object_animation_get (const Evas_Object *obj);
EAPI void edje_object_play_set (Evas_Object *obj, Eina_Bool play);
EAPI Eina_Bool edje_object_play_get (const Evas_Object *obj);
EAPI void edje_object_animation_set (Evas_Object *obj, Eina_Bool on);
EAPI Eina_Bool edje_object_animation_get (const Evas_Object *obj);
/* edje_util.c */
EAPI int edje_object_freeze (Evas_Object *obj);

View File

@ -309,7 +309,7 @@ _edje_external_signal_emit(Evas_Object *obj, const char *emission, const char *s
}
void
_edje_external_params_free(Eina_List *external_params, unsigned int free_strings)
_edje_external_params_free(Eina_List *external_params, Eina_Bool free_strings)
{
Edje_External_Param *param;

View File

@ -6,7 +6,6 @@
#include "edje_private.h"
void _edje_collection_free_part_description_free(Edje_Part_Description *desc, unsigned int free_strings);
static Eina_Bool _edje_file_collection_hash_foreach(const Eina_Hash *hash, const void *key, void *data, void *fdata);
#ifdef EDJE_PROGRAM_CACHE
static Eina_Bool _edje_collection_free_prog_cache_matches_free_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata);
@ -1165,7 +1164,7 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
}
void
_edje_collection_free_part_description_free(Edje_Part_Description *desc, unsigned int free_strings)
_edje_collection_free_part_description_free(Edje_Part_Description *desc, Eina_Bool free_strings)
{
Edje_Part_Image_Id *pi;

View File

@ -25,13 +25,13 @@ void *alloca(size_t);
#include "edje_private.h"
int
Eina_Bool
_edje_lua_script_only(Edje * ed)
{
if ((ed->collection) && (ed->collection->L) &&
(ed->collection->lua_script_only))
return 1;
return 0;
return EINA_TRUE;
return EINA_FALSE;
}
void

View File

@ -326,7 +326,7 @@ EDJE_MATCH_INIT(edje_match_callback_source_init,
Edje_Signal_Callback,
source, 0);
static int
static Eina_Bool
_edje_match_collection_dir_exec_finals(const size_t *finals,
const Edje_States *states)
{
@ -334,17 +334,17 @@ _edje_match_collection_dir_exec_finals(const size_t *finals,
for (i = 0; i < states->size; ++i)
if (states->states[i].pos >= finals[states->states[i].idx])
return 1;
return 0;
return EINA_TRUE;
return EINA_FALSE;
}
static int
static Eina_Bool
edje_match_programs_exec_check_finals(const size_t *signal_finals,
const size_t *source_finals,
const Edje_States *signal_states,
const Edje_States *source_states,
Eina_List *programs,
int (*func)(Edje_Program *pr, void *data),
Eina_Bool (*func)(Edje_Program *pr, void *data),
void *data)
{
size_t i;
@ -362,11 +362,11 @@ edje_match_programs_exec_check_finals(const size_t *signal_finals,
if (pr)
{
if (func(pr, data))
return 0;
return EINA_FALSE;
}
}
return 1;
return EINA_TRUE;
}
static int
@ -459,12 +459,12 @@ _edje_match_fn(const Edje_Patterns *ppat,
return states;
}
int
Eina_Bool
edje_match_collection_dir_exec(const Edje_Patterns *ppat,
const char *string)
{
Edje_States *result;
int r = 0;
Eina_Bool r = EINA_FALSE;
_edje_match_patterns_exec_init_states(ppat->states, ppat->patterns_size, ppat->max_length);
@ -476,18 +476,18 @@ edje_match_collection_dir_exec(const Edje_Patterns *ppat,
return r;
}
int
Eina_Bool
edje_match_programs_exec(const Edje_Patterns *ppat_signal,
const Edje_Patterns *ppat_source,
const char *signal,
const char *source,
Eina_List *programs,
int (*func)(Edje_Program *pr, void *data),
Eina_Bool (*func)(Edje_Program *pr, void *data),
void *data)
{
Edje_States *signal_result;
Edje_States *source_result;
int r = 0;
Eina_Bool r = EINA_FALSE;
_edje_match_patterns_exec_init_states(ppat_signal->states,
ppat_signal->patterns_size,

View File

@ -1153,14 +1153,14 @@ Edje_Patterns *edje_match_programs_source_init(Eina_List *lst);
Edje_Patterns *edje_match_callback_signal_init(Eina_List *lst);
Edje_Patterns *edje_match_callback_source_init(Eina_List *lst);
int edje_match_collection_dir_exec(const Edje_Patterns *ppat,
Eina_Bool edje_match_collection_dir_exec(const Edje_Patterns *ppat,
const char *string);
int edje_match_programs_exec(const Edje_Patterns *ppat_signal,
Eina_Bool edje_match_programs_exec(const Edje_Patterns *ppat_signal,
const Edje_Patterns *ppat_source,
const char *signal,
const char *source,
Eina_List *programs,
int (*func)(Edje_Program *pr, void *data),
Eina_Bool (*func)(Edje_Program *pr, void *data),
void *data);
int edje_match_callback_exec(const Edje_Patterns *ppat_signal,
const Edje_Patterns *ppat_source,
@ -1238,7 +1238,7 @@ void _edje_file_del(Edje *ed);
void _edje_file_free(Edje_File *edf);
void _edje_file_cache_shutdown(void);
void _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec);
void _edje_collection_free_part_description_free(Edje_Part_Description *desc, unsigned int free_strings);
void _edje_collection_free_part_description_free(Edje_Part_Description *desc, Eina_Bool free_strings);
Edje *_edje_add(Evas_Object *obj);
@ -1249,9 +1249,9 @@ void _edje_clean_objects(Edje *ed);
void _edje_ref(Edje *ed);
void _edje_unref(Edje *ed);
int _edje_program_run_iterate(Edje_Running_Program *runp, double tim);
Eina_Bool _edje_program_run_iterate(Edje_Running_Program *runp, double tim);
void _edje_program_end(Edje *ed, Edje_Running_Program *runp);
void _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const char *ssrc);
void _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig, const char *ssrc);
void _edje_programs_patterns_clean(Edje *ed);
void _edje_programs_patterns_init(Edje *ed);
void _edje_emit(Edje *ed, const char *sig, const char *src);
@ -1454,7 +1454,7 @@ void _edje_embryo_globals_init(Edje *ed);
if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
*___cptr = (int)val; } }
int _edje_script_only(Edje *ed);
Eina_Bool _edje_script_only(Edje *ed);
void _edje_script_only_init(Edje *ed);
void _edje_script_only_shutdown(Edje *ed);
void _edje_script_only_show(Edje *ed);
@ -1478,7 +1478,7 @@ void __edje_lua_error(const char *file, const char *fnc, int line, lua_State *L,
#define _edje_lua_error(L, err_code) \
__edje_lua_error(__FILE__, __FUNCTION__, __LINE__, L, err_code)
int _edje_lua_script_only(Edje *ed);
Eina_Bool _edje_lua_script_only(Edje *ed);
void _edje_lua_script_only_init(Edje *ed);
void _edje_lua_script_only_shutdown(Edje *ed);
void _edje_lua_script_only_show(Edje *ed);
@ -1523,7 +1523,7 @@ void _edje_external_init();
void _edje_external_shutdown();
Evas_Object *_edje_external_type_add(const char *type_name, Evas *evas, Evas_Object *parent, const Eina_List *params);
void _edje_external_signal_emit(Evas_Object *obj, const char *emission, const char *source);
void _edje_external_params_free(Eina_List *params, unsigned int free_strings);
void _edje_external_params_free(Eina_List *params, Eina_Bool free_strings);
void _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *params, Edje_Part_Description *chosen_desc);
void *_edje_external_params_parse(Evas_Object *obj, const Eina_List *params);
void _edje_external_parsed_params_free(Evas_Object *obj, void *params);

View File

@ -278,7 +278,7 @@ edje_object_signal_emit(Evas_Object *obj, const char *emission, const char *sour
*
*/
EAPI void
edje_object_play_set(Evas_Object *obj, int play)
edje_object_play_set(Evas_Object *obj, Eina_Bool play)
{
Edje *ed;
double t;
@ -300,7 +300,7 @@ edje_object_play_set(Evas_Object *obj, int play)
else
{
if (ed->paused) return;
ed->paused = 1;
ed->paused = EINA_TRUE;
ed->paused_at = ecore_time_get();
}
@ -317,8 +317,8 @@ edje_object_play_set(Evas_Object *obj, int play)
* @brief Get the edje object's play/pause state.
*
* @param obj A valid Evas_Object handle.
* @return @c 0 if the object is not connected, its @c delete_me flag
* is set, or it is at paused state; @c 1 if the object is at playing
* @return @c EINA_FALSE if the object is not connected, its @c delete_me flag
* is set, or it is at paused state; @c EINA_TRUE if the object is at playing
* state.
*
* This function tells if an edje object is playing or not. This state
@ -327,16 +327,16 @@ edje_object_play_set(Evas_Object *obj, int play)
* @see edje_object_play_set().
*
*/
EAPI int
EAPI Eina_Bool
edje_object_play_get(const Evas_Object *obj)
{
Edje *ed;
ed = _edje_fetch(obj);
if (!ed) return 0;
if (ed->delete_me) return 0;
if (ed->paused) return 0;
return 1;
if (!ed) return EINA_FALSE;
if (ed->delete_me) return EINA_FALSE;
if (ed->paused) return EINA_FALSE;
return EINA_TRUE;
}
/* FIXDOC: Verify/Expand */
@ -354,7 +354,7 @@ edje_object_play_get(const Evas_Object *obj)
*
*/
EAPI void
edje_object_animation_set(Evas_Object *obj, int on)
edje_object_animation_set(Evas_Object *obj, Eina_Bool on)
{
Edje *ed;
Eina_List *l;
@ -414,7 +414,8 @@ edje_object_animation_set(Evas_Object *obj, int on)
* @brief Get the edje object's animation state.
*
* @param obj A valid Evas_Object handle.
* @return @c 0 on error or if object is not animated; @c 1 if animated.
* @return @c EINA_FALSE on error or if object is not animated;
* @c EINA_TRUE if animated.
*
* This function returns if the animation is playing or not. The
* animation state is set by edje_object_play_set().
@ -423,21 +424,21 @@ edje_object_animation_set(Evas_Object *obj, int on)
*
*/
EAPI int
EAPI Eina_Bool
edje_object_animation_get(const Evas_Object *obj)
{
Edje *ed;
ed = _edje_fetch(obj);
if (!ed) return 0;
if (ed->delete_me) return 0;
if (ed->no_anim) return 0;
return 1;
if (!ed) return EINA_FALSE;
if (ed->delete_me) return EINA_FALSE;
if (ed->no_anim) return EINA_FALSE;
return EINA_TRUE;
}
/* Private Routines */
int
Eina_Bool
_edje_program_run_iterate(Edje_Running_Program *runp, double tim)
{
FLOAT_T t, total;
@ -581,7 +582,7 @@ _edje_program_end(Edje *ed, Edje_Running_Program *runp)
}
void
_edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const char *ssrc)
_edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig, const char *ssrc)
{
Eina_List *l;
Edje_Real_Part *rp;
@ -1051,7 +1052,7 @@ struct _Edje_Program_Data
const char *source;
};
static int _edje_glob_callback(Edje_Program *pr, void *dt)
static Eina_Bool _edje_glob_callback(Edje_Program *pr, void *dt)
{
struct _Edje_Program_Data *data = dt;
Edje_Real_Part *rp = NULL;
@ -1077,14 +1078,14 @@ static int _edje_glob_callback(Edje_Program *pr, void *dt)
eina_list_free(data->matches);
data->matches = NULL;
#endif
return 1;
return EINA_TRUE;
}
#ifdef EDJE_PROGRAM_CACHE
data->matches = eina_list_append(data->matches, pr);
#endif
return 0;
return EINA_FALSE;
}

View File

@ -442,13 +442,13 @@ _exp_e_signal_emit(Embryo_Program * ep, Embryo_Cell * params)
/**********/
int
Eina_Bool
_edje_script_only(Edje * ed)
{
if ((ed->collection) && (ed->collection->script) &&
(ed->collection->script_only))
return 1;
return 0;
return EINA_TRUE;
return EINA_FALSE;
}
void