}
static void
-_pan_position_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
+_pan_position_changed_cb(void *data, const Efl_Event *ev)
{
MY_DATA_GET(data, pd);
- Eina_Position2D pos = efl_ui_pan_position_get(pd->pan);
+ Eina_Position2D *pos = ev->info;
Eina_Position2D max = efl_ui_pan_position_max_get(pd->pan);
Eina_Vector2 rpos = {0.0, 0.0};
if (max.x > 0.0)
- rpos.x = (double)pos.x/(double)max.x;
+ rpos.x = (double)pos->x/(double)max.x;
if (max.y > 0.0)
- rpos.y = (double)pos.y/(double)max.y;
+ rpos.y = (double)pos->y/(double)max.y;
efl_ui_position_manager_entity_scroll_position_set(pd->pos_man, rpos.x, rpos.y);
}
psd->wsd->pan_y = pos.y;
evas_object_smart_changed(obj);
- efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_CONTENT_POSITION_CHANGED, NULL);
+ efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_CONTENT_POSITION_CHANGED, &pos);
}
EOLIAN static Eina_Position2D
psd->gmt.x = pos.x;
psd->gmt.y = pos.y;
- efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_CONTENT_POSITION_CHANGED, NULL);
+ efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_CONTENT_POSITION_CHANGED, &pos);
evas_object_smart_changed(psd->wobj);
}
psd->py = pos.y;
evas_object_smart_changed(obj);
- efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_CONTENT_POSITION_CHANGED, NULL);
+ efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_CONTENT_POSITION_CHANGED, &pos);
}
EOLIAN static Eina_Position2D
}
events {
pan,viewport,changed: void; [[This widget's position or size has changed.]]
- pan,content_position,changed: void; [[The content's position has changed.]]
+ pan,content_position,changed: Eina.Position2D; [[The content's position has changed, its position in the event is the new position.]]
pan,content_size,changed: Eina.Size2D; [[The content's size has changed, its size in the event is the new size]]
}
}