gcal-view: modified mark_current_unit API

Added x,y return values, positions of the current unit
This commit is contained in:
Erick Pérez Castellanos
2014-12-04 17:10:29 -05:00
parent 8cbac83723
commit a24eca0386
3 changed files with 42 additions and 10 deletions
+9 -4
View File
@@ -159,17 +159,22 @@ gcal_view_get_final_date (GcalView *view)
/**
* gcal_view_mark_current_unit:
* @view: a #GcalView
* @view: a #GcalView implementation
* @x: the x position of the current unit. Returned by the view
* @y: the y position of the current unit. Returned by the view
*
* Mark the current unit in the view as marked for event creation
* Mark the current unit in the view as marked for event creation.
* The (x, y) pair returned is the center of the cell
**/
void
gcal_view_mark_current_unit (GcalView *view)
gcal_view_mark_current_unit (GcalView *view,
gint *x,
gint *y)
{
g_return_if_fail (GCAL_IS_VIEW (view));
g_return_if_fail (GCAL_VIEW_GET_INTERFACE (view)->mark_current_unit);
GCAL_VIEW_GET_INTERFACE (view)->mark_current_unit (view);
GCAL_VIEW_GET_INTERFACE (view)->mark_current_unit (view, x, y);
}
/**