edje: make edje_edit_group_*_*_set return Eina_Bool.
Make the following function return Eina_Bool so that the caller can detect errors : edje_edit_group_min_w_set edje_edit_group_min_h_set edje_edit_group_max_w_set edje_edit_group_max_h_set Reviewers: cedric, seoz CC: reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D291 Signed-off-by: Cedric Bail <cedric.bail@free.fr>
This commit is contained in:
parent
6af7368602
commit
919c51de08
|
@ -271,8 +271,10 @@ EAPI int edje_edit_group_min_w_get(Evas_Object *obj);
|
|||
*
|
||||
* @param obj Object being edited.
|
||||
* @param w New minimum width for the group.
|
||||
*
|
||||
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||
*/
|
||||
EAPI void edje_edit_group_min_w_set(Evas_Object *obj, int w);
|
||||
EAPI Eina_Bool edje_edit_group_min_w_set(Evas_Object *obj, int w);
|
||||
|
||||
/** Get the group minimum height.
|
||||
*
|
||||
|
@ -286,8 +288,10 @@ EAPI int edje_edit_group_min_h_get(Evas_Object *obj);
|
|||
*
|
||||
* @param obj Object being edited.
|
||||
* @param h New minimum height for the group.
|
||||
*
|
||||
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||
*/
|
||||
EAPI void edje_edit_group_min_h_set(Evas_Object *obj, int h);
|
||||
EAPI Eina_Bool edje_edit_group_min_h_set(Evas_Object *obj, int h);
|
||||
|
||||
/** Get the group maximum width.
|
||||
*
|
||||
|
@ -301,8 +305,10 @@ EAPI int edje_edit_group_max_w_get(Evas_Object *obj);
|
|||
*
|
||||
* @param obj Object being edited.
|
||||
* @param w New maximum width for the group.
|
||||
*
|
||||
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||
*/
|
||||
EAPI void edje_edit_group_max_w_set(Evas_Object *obj, int w);
|
||||
EAPI Eina_Bool edje_edit_group_max_w_set(Evas_Object *obj, int w);
|
||||
|
||||
/** Get the group maximum height.
|
||||
*
|
||||
|
@ -316,8 +322,10 @@ EAPI int edje_edit_group_max_h_get(Evas_Object *obj);
|
|||
*
|
||||
* @param obj Object being edited.
|
||||
* @param h New maximum height for the group.
|
||||
*
|
||||
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||
*/
|
||||
EAPI void edje_edit_group_max_h_set(Evas_Object *obj, int h);
|
||||
EAPI Eina_Bool edje_edit_group_max_h_set(Evas_Object *obj, int h);
|
||||
|
||||
|
||||
//@}
|
||||
|
|
|
@ -1115,19 +1115,22 @@ edje_edit_group_name_set(Evas_Object *obj, const char *new_name)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
#define FUNC_GROUP_ACCESSOR(Class, Value) \
|
||||
EAPI int \
|
||||
edje_edit_group_##Class##_##Value##_get(Evas_Object *obj) \
|
||||
{ \
|
||||
GET_ED_OR_RETURN(-1); \
|
||||
if (!ed->collection) return -1; \
|
||||
return ed->collection->prop.Class.Value; \
|
||||
} \
|
||||
EAPI void \
|
||||
edje_edit_group_##Class##_##Value##_set(Evas_Object *obj, int v) \
|
||||
{ \
|
||||
GET_ED_OR_RETURN(); \
|
||||
ed->collection->prop.Class.Value = v; \
|
||||
#define FUNC_GROUP_ACCESSOR(Class, Value) \
|
||||
EAPI int \
|
||||
edje_edit_group_##Class##_##Value##_get(Evas_Object *obj) \
|
||||
{ \
|
||||
GET_ED_OR_RETURN(-1); \
|
||||
if (!ed->collection) return -1; \
|
||||
return ed->collection->prop.Class.Value; \
|
||||
} \
|
||||
EAPI Eina_Bool \
|
||||
edje_edit_group_##Class##_##Value##_set(Evas_Object *obj, int v) \
|
||||
{ \
|
||||
GET_ED_OR_RETURN(EINA_FALSE); \
|
||||
if (!ed->collection) return EINA_FALSE; \
|
||||
if (v < 0) return EINA_FALSE; \
|
||||
ed->collection->prop.Class.Value = v; \
|
||||
return EINA_TRUE; \
|
||||
}
|
||||
|
||||
FUNC_GROUP_ACCESSOR(min, w);
|
||||
|
|
Loading…
Reference in New Issue