}
}
events {
- focus,in; [[Called when canvas got focus]]
- focus,out; [[Called when canvas lost focus]]
+ focus,in: Efl.Input.Focus; [[Called when canvas got focus]]
+ focus,out: Efl.Input.Focus; [[Called when canvas lost focus]]
object,focus,in: Efl.Canvas.Object; [[Called when object got focus]]
object,focus,out: Efl.Canvas.Object; [[Called when object lost focus]]
render,pre; [[Called when pre render happens]]
static void
_eo_evas_cb(void *data, const Efl_Event *event)
{
+ void *event_info;
_eo_evas_cb_info *info = data;
- if (info->func) info->func(info->data, event->object, event->info);
+
+ //Keep the legacy behaviour for focus events.
+ if (event->desc == EFL_CANVAS_EVENT_FOCUS_IN ||
+ event->desc == EFL_CANVAS_EVENT_FOCUS_OUT)
+ event_info = NULL;
+ else
+ event_info = event->info;
+
+ if (info->func) info->func(info->data, event->object, event_info);
}
void
{
if (e->focus) return;
e->focus = 1;
- evas_event_callback_call(e->evas, EVAS_CALLBACK_CANVAS_FOCUS_IN, NULL);
+ evas_event_callback_call(e->evas, EVAS_CALLBACK_CANVAS_FOCUS_IN,
+ event->info);
}
else
{
if (!e->focus) return;
e->focus = 0;
- evas_event_callback_call(e->evas, EVAS_CALLBACK_CANVAS_FOCUS_OUT, NULL);
+ evas_event_callback_call(e->evas, EVAS_CALLBACK_CANVAS_FOCUS_OUT,
+ event->info);
}
}