No functional change.
}
}
}
+
+static void
+_animator_repeater(void *data, const Eo_Event *event)
+{
+ Evas_Object_Protected_Data *obj = data;
+
+ efl_event_callback_call(obj->object, EFL_EVENT_ANIMATOR_TICK, event->info);
+ DBG("Emitting animator tick on %p.", obj->object);
+}
+
+static void
+_check_event_catcher_add(void *data, const Eo_Event *event)
+{
+ const Efl_Callback_Array_Item *array = event->info;
+ Evas_Object_Protected_Data *obj = data;
+ int i;
+
+ for (i = 0; array[i].desc != NULL; i++)
+ {
+ if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
+ {
+ if (obj->animator_ref++ > 0) break;
+
+ efl_event_callback_add(obj->layer->evas->evas, EFL_EVENT_ANIMATOR_TICK, _animator_repeater, obj);
+ INF("Registering an animator tick on canvas %p for object %p.",
+ obj->layer->evas->evas, obj->object);
+ }
+ else if (array[i].desc == EFL_GFX_EVENT_MOVE)
+ {
+ obj->move_ref++;
+ }
+ }
+}
+
+static void
+_check_event_catcher_del(void *data, const Eo_Event *event)
+{
+ const Efl_Callback_Array_Item *array = event->info;
+ Evas_Object_Protected_Data *obj = data;
+ int i;
+
+ for (i = 0; array[i].desc != NULL; i++)
+ {
+ if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
+ {
+ if ((--obj->animator_ref) > 0) break;
+
+ efl_event_callback_del(obj->layer->evas->evas, EFL_EVENT_ANIMATOR_TICK, _animator_repeater, obj);
+ INF("Unregistering an animator tick on canvas %p for object %p.",
+ obj->layer->evas->evas, obj->object);
+ }
+ else if (array[i].desc == EFL_GFX_EVENT_MOVE)
+ {
+ obj->move_ref--;
+ }
+ }
+}
+
+EFL_CALLBACKS_ARRAY_DEFINE(event_catcher_watch,
+ { EFL_EVENT_CALLBACK_ADD, _check_event_catcher_add },
+ { EFL_EVENT_CALLBACK_DEL, _check_event_catcher_del });
+
+void
+evas_object_callback_init(Efl_Canvas_Object *eo_obj, Evas_Object_Protected_Data *obj)
+{
+ efl_event_callback_array_add(eo_obj, event_catcher_watch(), obj);
+}
return EINA_TRUE;
}
-static void
-_animator_repeater(void *data, const Eo_Event *event)
-{
- Evas_Object_Protected_Data *obj = data;
-
- efl_event_callback_call(obj->object, EFL_EVENT_ANIMATOR_TICK, event->info);
- DBG("Emitting animator tick on %p.", obj->object);
-}
-
-static void
-_check_event_catcher_add(void *data, const Eo_Event *event)
-{
- const Efl_Callback_Array_Item *array = event->info;
- Evas_Object_Protected_Data *obj = data;
- int i;
-
- for (i = 0; array[i].desc != NULL; i++)
- {
- if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
- {
- if (obj->animator_ref++ > 0) break;
-
- efl_event_callback_add(obj->layer->evas->evas, EFL_EVENT_ANIMATOR_TICK, _animator_repeater, obj);
- INF("Registering an animator tick on canvas %p for object %p.",
- obj->layer->evas->evas, obj->object);
- }
- else if (array[i].desc == EFL_GFX_EVENT_MOVE)
- {
- obj->move_ref++;
- }
- }
-}
-
-static void
-_check_event_catcher_del(void *data, const Eo_Event *event)
-{
- const Efl_Callback_Array_Item *array = event->info;
- Evas_Object_Protected_Data *obj = data;
- int i;
-
- for (i = 0; array[i].desc != NULL; i++)
- {
- if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
- {
- if ((--obj->animator_ref) > 0) break;
-
- efl_event_callback_del(obj->layer->evas->evas, EFL_EVENT_ANIMATOR_TICK, _animator_repeater, obj);
- INF("Unregistering an animator tick on canvas %p for object %p.",
- obj->layer->evas->evas, obj->object);
- }
- else if (array[i].desc == EFL_GFX_EVENT_MOVE)
- {
- obj->move_ref--;
- }
- }
-}
-
-EFL_CALLBACKS_ARRAY_DEFINE(event_catcher_watch,
- { EFL_EVENT_CALLBACK_ADD, _check_event_catcher_add },
- { EFL_EVENT_CALLBACK_DEL, _check_event_catcher_del });
-
EOLIAN static Eo *
_efl_canvas_object_efl_object_constructor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
obj->mask = eina_cow_alloc(evas_object_mask_cow);
evas_object_inject(eo_obj, obj, evas);
-
- efl_event_callback_array_add(eo_obj, event_catcher_watch(), obj);
+ evas_object_callback_init(eo_obj, obj);
return eo_obj;
}
void evas_object_clip_across_clippees_check(Evas_Object *obj, Evas_Object_Protected_Data *pd);
void evas_object_mapped_clip_across_mark(Evas_Object *obj, Evas_Object_Protected_Data *pd);
void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info);
+void evas_object_callback_init(Efl_Canvas_Object *eo_obj, Evas_Object_Protected_Data *obj);
void evas_object_event_callback_call(Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Callback_Type type, void *event_info, int event_id, const Efl_Event_Description *efl_event_desc, Efl_Event *efl_event_info);
Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
int evas_mem_free(int mem_required);