[libchamplain] camplain_view_get_coords_at, champlain_view_coords_from_event are now covered by python binding
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] camplain_view_get_coords_at, champlain_view_coords_from_event are now covered by python binding
- Date: Sat, 25 Jul 2009 00:20:37 +0000 (UTC)
commit 9ae0fca4aa9cee8520e50b9032fb2bae6b0919f3
Author: Victor Godoy Poluceno <victorpoluceno gmail com>
Date: Mon Jul 20 14:57:07 2009 -0300
camplain_view_get_coords_at, champlain_view_coords_from_event are now covered by python binding
bindings/python/champlain/pychamplain.override | 29 ++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
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);
+}
+%%
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]