]> err.no Git - libchamplain/commitdiff
camplain_view_get_coords_at, champlain_view_coords_from_event are now covered by...
authorVictor Godoy Poluceno <victorpoluceno@gmail.com>
Mon, 20 Jul 2009 17:57:07 +0000 (14:57 -0300)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sat, 25 Jul 2009 00:18:17 +0000 (20:18 -0400)
bindings/python/champlain/pychamplain.override

index b8e25f054f77b52c11ff5faca2943828b36bebe1..824821f43184a63cb05ede4a234ba0991572739d 100644 (file)
@@ -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);
+}
+%%