forked from enlightenment/efl
fix warnings introduced by external parameter stuff.
Thanks to cedric by spotting those. SVN revision: 44633
This commit is contained in:
parent
b3c373b571
commit
598c9b339c
|
@ -527,7 +527,7 @@ extern "C" {
|
||||||
EAPI Eina_Bool edje_external_param_int_get(const Eina_List *params, const char *key, int *ret);
|
EAPI Eina_Bool edje_external_param_int_get(const Eina_List *params, const char *key, int *ret);
|
||||||
EAPI Eina_Bool edje_external_param_double_get(const Eina_List *params, const char *key, double *ret);
|
EAPI Eina_Bool edje_external_param_double_get(const Eina_List *params, const char *key, double *ret);
|
||||||
EAPI Eina_Bool edje_external_param_string_get(const Eina_List *params, const char *key, const char **ret);
|
EAPI Eina_Bool edje_external_param_string_get(const Eina_List *params, const char *key, const char **ret);
|
||||||
EAPI Eina_Bool edje_external_param_bool_get(const Eina_List *params, const char *key, const char **ret);
|
EAPI Eina_Bool edje_external_param_bool_get(const Eina_List *params, const char *key, Eina_Bool *ret);
|
||||||
EAPI const Edje_External_Param_Info *edje_external_param_info_get(const char *type_name);
|
EAPI const Edje_External_Param_Info *edje_external_param_info_get(const char *type_name);
|
||||||
|
|
||||||
/* edje_module.c */
|
/* edje_module.c */
|
||||||
|
|
|
@ -2467,6 +2467,7 @@ edje_edit_state_add(Evas_Object *obj, const char *part, const char *name)
|
||||||
switch(p->type)
|
switch(p->type)
|
||||||
{
|
{
|
||||||
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
||||||
|
case EDJE_EXTERNAL_PARAM_TYPE_BOOL:
|
||||||
p->i = pi->info.i.def;
|
p->i = pi->info.i.def;
|
||||||
break;
|
break;
|
||||||
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
||||||
|
@ -2476,6 +2477,9 @@ edje_edit_state_add(Evas_Object *obj, const char *part, const char *name)
|
||||||
if (pi->info.s.def)
|
if (pi->info.s.def)
|
||||||
p->s = eina_stringshare_add(pi->info.s.def);
|
p->s = eina_stringshare_add(pi->info.s.def);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
printf("ERROR: unknown external parameter type '%d'\n",
|
||||||
|
p->type);
|
||||||
}
|
}
|
||||||
pd->external_params = eina_list_append(pd->external_params, p);
|
pd->external_params = eina_list_append(pd->external_params, p);
|
||||||
pi++;
|
pi++;
|
||||||
|
@ -3424,6 +3428,7 @@ edje_edit_state_external_param_get(Evas_Object *obj, const char *part, const cha
|
||||||
switch (p->type)
|
switch (p->type)
|
||||||
{
|
{
|
||||||
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
||||||
|
case EDJE_EXTERNAL_PARAM_TYPE_BOOL:
|
||||||
*value = &p->i;
|
*value = &p->i;
|
||||||
break;
|
break;
|
||||||
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
||||||
|
@ -3432,6 +3437,9 @@ edje_edit_state_external_param_get(Evas_Object *obj, const char *part, const cha
|
||||||
case EDJE_EXTERNAL_PARAM_TYPE_STRING:
|
case EDJE_EXTERNAL_PARAM_TYPE_STRING:
|
||||||
*value = (void *)p->s;
|
*value = (void *)p->s;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
printf("ERROR: unknown external parameter type '%d'\n",
|
||||||
|
p->type);
|
||||||
}
|
}
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -3499,6 +3507,13 @@ edje_edit_state_external_param_string_get(Evas_Object *obj, const char *part, co
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Arguments should have proper sized values matching their types:
|
||||||
|
* - EDJE_EXTERNAL_PARAM_TYPE_INT: int
|
||||||
|
* - EDJE_EXTERNAL_PARAM_TYPE_BOOL: int
|
||||||
|
* - EDJE_EXTERNAL_PARAM_TYPE_DOUBLE: double
|
||||||
|
* - EDJE_EXTERNAL_PARAM_TYPE_STRING: char*
|
||||||
|
*/
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
edje_edit_state_external_param_set(Evas_Object *obj, const char *part, const char *state, const char *param, Edje_External_Param_Type type, ...)
|
edje_edit_state_external_param_set(Evas_Object *obj, const char *part, const char *state, const char *param, Edje_External_Param_Type type, ...)
|
||||||
{
|
{
|
||||||
|
@ -3541,6 +3556,7 @@ edje_edit_state_external_param_set(Evas_Object *obj, const char *part, const cha
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
||||||
|
case EDJE_EXTERNAL_PARAM_TYPE_BOOL:
|
||||||
p->i = (int)va_arg(ap, int);
|
p->i = (int)va_arg(ap, int);
|
||||||
break;
|
break;
|
||||||
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
||||||
|
@ -3549,6 +3565,8 @@ edje_edit_state_external_param_set(Evas_Object *obj, const char *part, const cha
|
||||||
case EDJE_EXTERNAL_PARAM_TYPE_STRING:
|
case EDJE_EXTERNAL_PARAM_TYPE_STRING:
|
||||||
p->s = eina_stringshare_add((const char *)va_arg(ap, char *));
|
p->s = eina_stringshare_add((const char *)va_arg(ap, char *));
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
printf("ERROR: unknown external parameter type '%d'\n", type);
|
||||||
}
|
}
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
|
@ -222,7 +222,7 @@ edje_external_param_string_get(const Eina_List *params, const char *key, const c
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
edje_external_param_bool_get(const Eina_List *params, const char *key, const char **ret)
|
edje_external_param_bool_get(const Eina_List *params, const char *key, Eina_Bool *ret)
|
||||||
{
|
{
|
||||||
Edje_External_Param *param;
|
Edje_External_Param *param;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue