From: Victor Godoy Poluceno Date: Mon, 20 Jul 2009 17:57:07 +0000 (-0300) Subject: camplain_view_get_coords_at, champlain_view_coords_from_event are now covered by... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ae0fca4aa9cee8520e50b9032fb2bae6b0919f3;p=libchamplain camplain_view_get_coords_at, champlain_view_coords_from_event are now covered by python binding --- diff --git a/bindings/python/champlain/pychamplain.override b/bindings/python/champlain/pychamplain.override index b8e25f0..824821f 100644 --- a/bindings/python/champlain/pychamplain.override +++ b/bindings/python/champlain/pychamplain.override @@ -159,3 +159,32 @@ _wrap_champlain_polygon_get_points(PyGObject *self, PyObject *args) return ret; } %% +override champlain_view_get_coords_from_event kwargs +static PyObject * +_wrap_champlain_view_get_coords_from_event(PyGObject *self, PyObject *args) +{ + double lat, lon; + PyObject *pyevent; + + if (!PyArg_ParseTuple(args, "O:ChamplainView.get_coords_from_event", &pyevent)) + return NULL; + + ClutterEvent *event = pyg_boxed_get (pyevent, ClutterEvent); + champlain_view_get_coords_from_event(CHAMPLAIN_VIEW(self->obj), event, &lat, &lon); + return Py_BuildValue("(dd)", lat, lon); +} +%% +override champlain_view_get_coords_at kwargs +static PyObject * +_wrap_champlain_view_get_coords_at(PyGObject *self, PyObject *args) +{ + guint x, y; + double lat, lon; + + if (!PyArg_ParseTuple(args, "ii:ChamplainView.get_coords_at", &x, &y)) + return NULL; + + champlain_view_get_coords_at(CHAMPLAIN_VIEW(self->obj), x, y, &lat, &lon); + return Py_BuildValue("(dd)", lat, lon); +} +%%