diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index 2a2f5e1bc2..917dd79e94 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -946,7 +946,7 @@ EAPI Eina_Bool edje_edit_part_selected_state_set(Evas_Object *obj, const char *p * @param obj Object being edited. * @param part Part to get if the mouse events is accepted. * - * @return EINA_TRUE if successful, EINA_FALSE otherwise. + * @return EINA_TRUE if part will accept mouse events, EINA_FALSE otherwise. */ EAPI Eina_Bool edje_edit_part_mouse_events_get(Evas_Object *obj, const char *part); @@ -955,15 +955,17 @@ EAPI Eina_Bool edje_edit_part_mouse_events_get(Evas_Object *obj, const char *par * @param obj Object being edited. * @param part The part to set if the mouse events is accepted. * @param mouse_events EINA_TRUE if part will accept mouse events, EINA_FALSE otherwise. + * + * @return EINA_TRUE if successful, EINA_FALSE otherwise. */ -EAPI void edje_edit_part_mouse_events_set(Evas_Object *obj, const char *part, Eina_Bool mouse_events); +EAPI Eina_Bool edje_edit_part_mouse_events_set(Evas_Object *obj, const char *part, Eina_Bool mouse_events); /** Get repeat_events for part. * * @param obj Object being edited. - * @param part Part to set if will pass all events to the other parts. + * @param part Part to get if it will pass all events to the other parts. * - * @return EINA_TRUE if successful, EINA_FALSE otherwise. + * @return EINA_TRUE if the events received will propagate to other parts, EINA_FALSE otherwise */ EAPI Eina_Bool edje_edit_part_repeat_events_get(Evas_Object *obj, const char *part); @@ -972,8 +974,10 @@ EAPI Eina_Bool edje_edit_part_repeat_events_get(Evas_Object *obj, const char *pa * @param obj Object being edited. * @param part Part to set if will repeat all the received mouse events to other parts. * @param repeat_events EINA_TRUE if the events received will propagate to other parts, EINA_FALSE otherwise + * + * @return EINA_TRUE if successful, EINA_FALSE otherwise. */ -EAPI void edje_edit_part_repeat_events_set(Evas_Object *obj, const char *part, Eina_Bool repeat_events); +EAPI Eina_Bool edje_edit_part_repeat_events_set(Evas_Object *obj, const char *part, Eina_Bool repeat_events); /** Get ignore_flags for part. * @@ -989,8 +993,10 @@ EAPI Evas_Event_Flags edje_edit_part_ignore_flags_get(Evas_Object *obj, const ch * @param obj Object being edited. * @param part Part to set which event flags will be ignored. * @param ignore_flags The Event flags to be ignored by the part. + * + * @return EINA_TRUE if successful, EINA_FALSE otherwise. */ -EAPI void edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Evas_Event_Flags ignore_flags); +EAPI Eina_Bool edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Evas_Event_Flags ignore_flags); /** Set scale property for the part. * @@ -1000,8 +1006,10 @@ EAPI void edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Ev * @param obj Object being edited. * @param part Part to set scale for. * @param scale Scale value to set. + * + * @return EINA_TRUE if successful, EINA_FALSE otherwise. */ -EAPI void edje_edit_part_scale_set(Evas_Object *obj, const char *part, Eina_Bool scale); +EAPI Eina_Bool edje_edit_part_scale_set(Evas_Object *obj, const char *part, Eina_Bool scale); /** Get scale for the part. * diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index d75b55f707..038414d9d2 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -2371,50 +2371,44 @@ EAPI Eina_Bool edje_edit_part_mouse_events_get(Evas_Object *obj, const char *part) { GET_RP_OR_RETURN(EINA_FALSE); - //printf("Get mouse_events for part: %s [%d]\n", part, rp->part->mouse_events); return rp->part->mouse_events; } -EAPI void +EAPI Eina_Bool edje_edit_part_mouse_events_set(Evas_Object *obj, const char *part, Eina_Bool mouse_events) { - GET_RP_OR_RETURN(); + GET_RP_OR_RETURN(EINA_FALSE); - if (!rp->object) return; - - //printf("Set mouse_events for part: %s [%d]\n", part, mouse_events); + if (!rp->object) return EINA_FALSE; rp->part->mouse_events = mouse_events ? 1 : 0; if (mouse_events) { - evas_object_pass_events_set(rp->object, 0); - _edje_callbacks_add(rp->object, ed, rp); + evas_object_pass_events_set(rp->object, 0); + _edje_callbacks_add(rp->object, ed, rp); } else { - evas_object_pass_events_set(rp->object, 1); - _edje_callbacks_del(rp->object, ed); + evas_object_pass_events_set(rp->object, 1); + _edje_callbacks_del(rp->object, ed); } + return EINA_TRUE; } EAPI Eina_Bool edje_edit_part_repeat_events_get(Evas_Object *obj, const char *part) { GET_RP_OR_RETURN(EINA_FALSE); - - //printf("Get repeat_events for part: %s [%d]\n", part, rp->part->repeat_events); return rp->part->repeat_events; } -EAPI void +EAPI Eina_Bool edje_edit_part_repeat_events_set(Evas_Object *obj, const char *part, Eina_Bool repeat_events) { - GET_RP_OR_RETURN(); + GET_RP_OR_RETURN(EINA_FALSE); - if (!rp->object) return; - - //printf("Set repeat_events for part: %s [%d]\n", part, repeat_events); + if (!rp->object) return EINA_FALSE; rp->part->repeat_events = repeat_events ? 1 : 0; @@ -2422,6 +2416,8 @@ edje_edit_part_repeat_events_set(Evas_Object *obj, const char *part, Eina_Bool r evas_object_repeat_events_set(rp->object, 1); else evas_object_repeat_events_set(rp->object, 0); + + return EINA_TRUE; } EAPI Evas_Event_Flags @@ -2432,24 +2428,25 @@ edje_edit_part_ignore_flags_get(Evas_Object *obj, const char *part) return rp->part->ignore_flags; } -EAPI void +EAPI Eina_Bool edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Evas_Event_Flags ignore_flags) { - GET_RP_OR_RETURN(); + GET_RP_OR_RETURN(EINA_FALSE); - if (!rp->object) return; - //printf("Set ignore_flags for part: %s [%#x]\n", part, ignore_flags); + if (!rp->object) return EINA_FALSE; rp->part->ignore_flags = ignore_flags; + return EINA_TRUE; } -EAPI void +EAPI Eina_Bool edje_edit_part_scale_set(Evas_Object *obj, const char *part, Eina_Bool scale) { - GET_RP_OR_RETURN(); + GET_RP_OR_RETURN(EINA_FALSE); - rp->part->scale = scale; + rp->part->scale = scale ? 1 : 0; edje_object_calc_force(obj); + return EINA_TRUE; } EAPI Eina_Bool