redirect,changed : Efl.Ui.Focus.Manager; [[Emitted when the redirect object has changed, the old manager is passed as event info]]
pre,flush; [[Emitted once the graph calculationg will be performed]]
coords,dirty; [[Emitted once the graph is dirty, this means there are potential changes in border_elements you want to know about]]
+ focused : Efl.Ui.Focus.Object; [[Emitted if the manager has focused a object]]
}
}
\ No newline at end of file
EAPI void elm_pan_gravity_set(Elm_Pan *obj EINA_UNUSED, double x EINA_UNUSED, double y EINA_UNUSED) {}
EAPI void elm_pan_gravity_get(const Elm_Pan *obj EINA_UNUSED, double *x EINA_UNUSED, double *y EINA_UNUSED) {}
+static void
+_focused_element(void *data, const Efl_Event *event)
+{
+ Eina_Rectangle geom;
+ Eina_Rectangle obj_geom;
+ Efl_Ui_Focus_Object *obj = data;
+ Efl_Ui_Focus_Object *focus = event->info;
+ Elm_Scrollable_Smart_Interface_Data *pd;
+
+ pd = efl_data_scope_get(obj, MY_SCROLLABLE_INTERFACE);
+
+ if (!focus) return;
+
+ evas_object_geometry_get(focus, &geom.x, &geom.y, &geom.w, &geom.h);
+ evas_object_geometry_get(pd->content, &obj_geom.x, &obj_geom.y, &obj_geom.w, &obj_geom.h);
+
+ geom.x = geom.x - obj_geom.x;
+ geom.y = geom.y - obj_geom.y;
+
+ elm_interface_scrollable_region_bring_in(obj, geom.x, geom.y, geom.w, geom.h);
+}
+
EOLIAN static Efl_Object*
_elm_interface_scrollable_efl_object_constructor(Eo *obj, Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED)
{
efl_composite_attach(obj, pd->manager);
+ efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, obj);
+ efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH , obj);
+ efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_COORDS_DIRTY , obj);
+ efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED, obj);
+ efl_event_callback_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED, _focused_element, obj);
+
return efl_constructor(efl_super(obj, MY_SCROLLABLE_INTERFACE));
}