diff --git a/legacy/eobj/examples/composite_objects/main.c b/legacy/eobj/examples/composite_objects/main.c index a1101b7894..0ebddcd2be 100644 --- a/legacy/eobj/examples/composite_objects/main.c +++ b/legacy/eobj/examples/composite_objects/main.c @@ -16,7 +16,7 @@ _a_changed_cb(void *data, Eobj *obj, const Eobj_Event_Description *desc, void *e cb_called = EINA_TRUE; - return EINA_TRUE; + return EOBJ_CALLBACK_CONTINUE; } int diff --git a/legacy/eobj/examples/evas/test.c b/legacy/eobj/examples/evas/test.c index 0145cbb33e..c442e909c2 100644 --- a/legacy/eobj/examples/evas/test.c +++ b/legacy/eobj/examples/evas/test.c @@ -14,7 +14,7 @@ _btn_clicked_cb(void *data, Eobj *obj, const Eobj_Event_Description *desc, void const Eobj_Class *klass = eobj_class_get(obj); printf("%s obj-type:'%s' data:'%s'\n", desc->name, eobj_class_name_get(klass), (const char *) data); - return EINA_TRUE; + return EOBJ_CALLBACK_CONTINUE; } int diff --git a/legacy/eobj/examples/signals/simple.c b/legacy/eobj/examples/signals/simple.c index 5635670e8d..0a23d59ffa 100644 --- a/legacy/eobj/examples/signals/simple.c +++ b/legacy/eobj/examples/signals/simple.c @@ -42,7 +42,7 @@ _cb_added(void *data, Eobj *obj, const Eobj_Event_Description *desc, void *event pd->cb_count++; printf("Added SIG_A_CHANGED callback to %p. Count: %d\n", obj, pd->cb_count); - return EINA_TRUE; + return EOBJ_CALLBACK_CONTINUE; } Eina_Bool @@ -59,7 +59,7 @@ _cb_deled(void *data, Eobj *obj, const Eobj_Event_Description *desc, void *event pd->cb_count--; printf("Removed SIG_A_CHANGED callback from %p. Count: %d\n", obj, pd->cb_count); - return EINA_TRUE; + return EOBJ_CALLBACK_CONTINUE; } static void diff --git a/legacy/eobj/lib/Eobj.h b/legacy/eobj/lib/Eobj.h index 46667ffe5b..076a21a6bc 100644 --- a/legacy/eobj/lib/Eobj.h +++ b/legacy/eobj/lib/Eobj.h @@ -625,6 +625,20 @@ EAPI Eina_Bool eobj_composite_is(Eobj *comp_obj); */ typedef short Eobj_Callback_Priority; +/** + * @def EOBJ_CALLBACK_STOP + * Stop calling callbacks for the even of which the callback was called for. + * @see EOBJ_CALLBACK_CONTINUE + */ +#define EOBJ_CALLBACK_STOP EINA_FALSE + +/** + * @def EOBJ_CALLBACK_CONTINUE + * Continue calling callbacks for the even of which the callback was called for. + * @see EOBJ_CALLBACK_STOP + */ +#define EOBJ_CALLBACK_CONTINUE EINA_TRUE + /** * @typedef Eobj_Event_Cb * @@ -634,7 +648,7 @@ typedef short Eobj_Callback_Priority; * @param obj The object which initiated the event. * @param desc The event's description. * @param event_info additional data passed with the event. - * @return #EINA_FALSE to stop calling additional callbacks for the event, #EINA_TRUE to continue. + * @return #EOBJ_CALLBACK_STOP to stop calling additional callbacks for the event, #EOBJ_CALLBACK_CONTINUE to continue. */ typedef Eina_Bool (*Eobj_Event_Cb)(void *data, Eobj *obj, const Eobj_Event_Description *desc, void *event_info); diff --git a/legacy/eobj/lib/eobj.c b/legacy/eobj/lib/eobj.c index 66e233ecf1..8a29264a8d 100644 --- a/legacy/eobj/lib/eobj.c +++ b/legacy/eobj/lib/eobj.c @@ -1031,7 +1031,7 @@ _eobj_weak_ref_cb(void *data, Eobj *obj EINA_UNUSED, const Eobj_Event_Descriptio Eobj_Weak_Ref *wref = data; wref->obj = NULL; - return EINA_TRUE; + return EOBJ_CALLBACK_CONTINUE; } EAPI Eobj_Weak_Ref *