1
/* -- THIS FILE IS GENERATED - DO NOT EDIT *//* -*- Mode: C; c-basic-offset: 4 -*- */
7
#line 3 "pychamplain.override"
10
#include <champlain/champlain.h>
11
#include <clutter/clutter.h>
12
#include "pychamplain.h"
14
#line 15 "pychamplain.c"
17
/* ---------- types from other modules ---------- */
18
static PyTypeObject *_PyGObject_Type;
19
#define PyGObject_Type (*_PyGObject_Type)
20
static PyTypeObject *_PyClutterActor_Type;
21
#define PyClutterActor_Type (*_PyClutterActor_Type)
22
static PyTypeObject *_PyClutterGroup_Type;
23
#define PyClutterGroup_Type (*_PyClutterGroup_Type)
24
static PyTypeObject *_PyClutterColor_Type;
25
#define PyClutterColor_Type (*_PyClutterColor_Type)
28
/* ---------- forward type declarations ---------- */
29
PyTypeObject G_GNUC_INTERNAL PyChamplainPoint_Type;
30
PyTypeObject G_GNUC_INTERNAL PyChamplainMapSourceDesc_Type;
31
PyTypeObject G_GNUC_INTERNAL PyChamplainBaseMarker_Type;
32
PyTypeObject G_GNUC_INTERNAL PyChamplainCache_Type;
33
PyTypeObject G_GNUC_INTERNAL PyChamplainLayer_Type;
34
PyTypeObject G_GNUC_INTERNAL PyChamplainMapSource_Type;
35
PyTypeObject G_GNUC_INTERNAL PyChamplainMapSourceFactory_Type;
36
PyTypeObject G_GNUC_INTERNAL PyChamplainMarker_Type;
37
PyTypeObject G_GNUC_INTERNAL PyChamplainNetworkMapSource_Type;
38
PyTypeObject G_GNUC_INTERNAL PyChamplainPolygon_Type;
39
PyTypeObject G_GNUC_INTERNAL PyChamplainTile_Type;
40
PyTypeObject G_GNUC_INTERNAL PyChamplainView_Type;
41
PyTypeObject G_GNUC_INTERNAL PyChamplainZoomLevel_Type;
43
#line 44 "pychamplain.c"
47
/* ----------- ChamplainPoint ----------- */
50
_wrap_champlain_point_new(PyGBoxed *self, PyObject *args, PyObject *kwargs)
52
static char *kwlist[] = { "lat", "lon", NULL };
55
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"dd:ChamplainPoint.__init__", kwlist, &lat, &lon))
57
self->gtype = CHAMPLAIN_TYPE_POINT;
58
self->free_on_dealloc = FALSE;
59
self->boxed = champlain_point_new(lat, lon);
62
PyErr_SetString(PyExc_RuntimeError, "could not create ChamplainPoint object");
65
self->free_on_dealloc = TRUE;
70
_wrap_champlain_point_copy(PyObject *self)
75
ret = champlain_point_copy(pyg_boxed_get(self, ChamplainPoint));
77
/* pyg_boxed_new handles NULL checking */
78
return pyg_boxed_new(CHAMPLAIN_TYPE_POINT, ret, TRUE, TRUE);
82
_wrap_champlain_point_free(PyObject *self)
85
champlain_point_free(pyg_boxed_get(self, ChamplainPoint));
91
static const PyMethodDef _PyChamplainPoint_methods[] = {
92
{ "copy", (PyCFunction)_wrap_champlain_point_copy, METH_NOARGS,
94
{ "free", (PyCFunction)_wrap_champlain_point_free, METH_NOARGS,
96
{ NULL, NULL, 0, NULL }
100
_wrap_champlain_point__get_lat(PyObject *self, void *closure)
104
ret = pyg_boxed_get(self, ChamplainPoint)->lat;
105
return PyFloat_FromDouble(ret);
109
_wrap_champlain_point__get_lon(PyObject *self, void *closure)
113
ret = pyg_boxed_get(self, ChamplainPoint)->lon;
114
return PyFloat_FromDouble(ret);
117
static const PyGetSetDef champlain_point_getsets[] = {
118
{ "lat", (getter)_wrap_champlain_point__get_lat, (setter)0 },
119
{ "lon", (getter)_wrap_champlain_point__get_lon, (setter)0 },
120
{ NULL, (getter)0, (setter)0 },
123
PyTypeObject G_GNUC_INTERNAL PyChamplainPoint_Type = {
124
PyObject_HEAD_INIT(NULL)
126
"champlain.Point", /* tp_name */
127
sizeof(PyGBoxed), /* tp_basicsize */
130
(destructor)0, /* tp_dealloc */
131
(printfunc)0, /* tp_print */
132
(getattrfunc)0, /* tp_getattr */
133
(setattrfunc)0, /* tp_setattr */
134
(cmpfunc)0, /* tp_compare */
135
(reprfunc)0, /* tp_repr */
136
(PyNumberMethods*)0, /* tp_as_number */
137
(PySequenceMethods*)0, /* tp_as_sequence */
138
(PyMappingMethods*)0, /* tp_as_mapping */
139
(hashfunc)0, /* tp_hash */
140
(ternaryfunc)0, /* tp_call */
141
(reprfunc)0, /* tp_str */
142
(getattrofunc)0, /* tp_getattro */
143
(setattrofunc)0, /* tp_setattro */
144
(PyBufferProcs*)0, /* tp_as_buffer */
145
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
146
NULL, /* Documentation string */
147
(traverseproc)0, /* tp_traverse */
148
(inquiry)0, /* tp_clear */
149
(richcmpfunc)0, /* tp_richcompare */
150
0, /* tp_weaklistoffset */
151
(getiterfunc)0, /* tp_iter */
152
(iternextfunc)0, /* tp_iternext */
153
(struct PyMethodDef*)_PyChamplainPoint_methods, /* tp_methods */
154
(struct PyMemberDef*)0, /* tp_members */
155
(struct PyGetSetDef*)champlain_point_getsets, /* tp_getset */
158
(descrgetfunc)0, /* tp_descr_get */
159
(descrsetfunc)0, /* tp_descr_set */
160
0, /* tp_dictoffset */
161
(initproc)_wrap_champlain_point_new, /* tp_init */
162
(allocfunc)0, /* tp_alloc */
163
(newfunc)0, /* tp_new */
164
(freefunc)0, /* tp_free */
165
(inquiry)0 /* tp_is_gc */
170
/* ----------- ChamplainMapSourceDesc ----------- */
172
#line 378 "pychamplain.override"
174
_wrap_champlain_map_source_desc_new(PyGBoxed *self, PyObject *args, PyObject *kwargs)
176
static char *kwlist[] = {"id", "name", "license", "license_uri",
177
"min_zoom_level", "max_zoom_level", "projection", "uri_format", NULL };
178
ChamplainMapSourceDesc *desc = champlain_map_source_desc_new();
179
PyObject *py_projection;
181
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"ssssddOs:ChamplainMapSourceDesc.__init__", kwlist,
182
&desc->id, &desc->name, &desc->license, &desc->license_uri, &desc->min_zoom_level,
183
&desc->max_zoom_level, &py_projection, &desc->uri_format))
186
if (pyg_enum_get_value(CHAMPLAIN_TYPE_MAP_PROJECTION, py_projection, (gpointer)&desc->projection) != 0)
189
self->gtype = CHAMPLAIN_TYPE_MAP_SOURCE_DESC;
190
self->free_on_dealloc = FALSE;
194
PyErr_SetString(PyExc_RuntimeError, "could not create ChamplainMapSourceDesc object");
197
self->free_on_dealloc = TRUE;
200
#line 201 "pychamplain.c"
204
_wrap_champlain_map_source_desc_copy(PyObject *self)
206
ChamplainMapSourceDesc *ret;
209
ret = champlain_map_source_desc_copy(pyg_boxed_get(self, ChamplainMapSourceDesc));
211
/* pyg_boxed_new handles NULL checking */
212
return pyg_boxed_new(CHAMPLAIN_TYPE_MAP_SOURCE_DESC, ret, TRUE, TRUE);
216
_wrap_champlain_map_source_desc_free(PyObject *self)
219
champlain_map_source_desc_free(pyg_boxed_get(self, ChamplainMapSourceDesc));
225
static const PyMethodDef _PyChamplainMapSourceDesc_methods[] = {
226
{ "copy", (PyCFunction)_wrap_champlain_map_source_desc_copy, METH_NOARGS,
228
{ "free", (PyCFunction)_wrap_champlain_map_source_desc_free, METH_NOARGS,
230
{ NULL, NULL, 0, NULL }
233
#line 234 "pychamplain.override"
235
_wrap_champlain_map_source_desc__set_id (PyGBoxed *self, PyObject *value, void *closure)
239
val = PyString_AsString (value);
240
if (PyErr_Occurred ())
243
pyg_boxed_get (self, ChamplainMapSourceDesc)->id = val;
247
_wrap_champlain_map_source_desc__get_id (PyGBoxed *self, void *closure)
249
gchar *id = pyg_boxed_get(self, ChamplainMapSourceDesc)->id;
250
return PyString_FromString (id);
252
#line 253 "pychamplain.c"
255
#line 255 "pychamplain.override"
257
_wrap_champlain_map_source_desc__set_name (PyGBoxed *self, PyObject *value, void *closure)
261
val = PyString_AsString (value);
262
if (PyErr_Occurred ())
265
pyg_boxed_get (self, ChamplainMapSourceDesc)->name = val;
269
_wrap_champlain_map_source_desc__get_name (PyGBoxed *self, void *closure)
271
gchar *name = pyg_boxed_get(self, ChamplainMapSourceDesc)->name;
272
return PyString_FromString (name);
274
#line 275 "pychamplain.c"
277
#line 276 "pychamplain.override"
279
_wrap_champlain_map_source_desc__set_license (PyGBoxed *self, PyObject *value, void *closure)
283
val = PyString_AsString (value);
284
if (PyErr_Occurred ())
287
pyg_boxed_get (self, ChamplainMapSourceDesc)->license = val;
291
_wrap_champlain_map_source_desc__get_license (PyGBoxed *self, void *closure)
293
gchar *license = pyg_boxed_get(self, ChamplainMapSourceDesc)->license;
294
return PyString_FromString (license);
296
#line 297 "pychamplain.c"
299
#line 296 "pychamplain.override"
301
_wrap_champlain_map_source_desc__set_license_uri (PyGBoxed *self, PyObject *value, void *closure)
305
val = PyString_AsString (value);
306
if (PyErr_Occurred ())
309
pyg_boxed_get (self, ChamplainMapSourceDesc)->license_uri = val;
313
_wrap_champlain_map_source_desc__get_license_uri (PyGBoxed *self, void *closure)
315
gchar *license_uri = pyg_boxed_get(self, ChamplainMapSourceDesc)->license_uri;
316
return PyString_FromString (license_uri);
318
#line 319 "pychamplain.c"
321
#line 351 "pychamplain.override"
323
_wrap_champlain_map_source_desc__set_min_zoom_level (PyGBoxed *self, PyObject *value, void *closure)
327
val = PyLong_AsLong (value);
328
if (PyErr_Occurred ())
331
pyg_boxed_get (self, ChamplainMapSourceDesc)->min_zoom_level = val;
334
#line 335 "pychamplain.c"
338
_wrap_champlain_map_source_desc__get_min_zoom_level(PyObject *self, void *closure)
342
ret = pyg_boxed_get(self, ChamplainMapSourceDesc)->min_zoom_level;
343
return PyInt_FromLong(ret);
346
#line 337 "pychamplain.override"
348
_wrap_champlain_map_source_desc__set_max_zoom_level (PyGBoxed *self, PyObject *value, void *closure)
352
val = PyLong_AsLong (value);
353
if (PyErr_Occurred ())
356
pyg_boxed_get (self, ChamplainMapSourceDesc)->max_zoom_level = val;
359
#line 360 "pychamplain.c"
363
_wrap_champlain_map_source_desc__get_max_zoom_level(PyObject *self, void *closure)
367
ret = pyg_boxed_get(self, ChamplainMapSourceDesc)->max_zoom_level;
368
return PyInt_FromLong(ret);
371
#line 365 "pychamplain.override"
373
_wrap_champlain_map_source_desc__set_projection (PyGBoxed *self, PyObject *value, void *closure)
375
ChamplainMapProjection val;
377
if (pyg_enum_get_value(CHAMPLAIN_TYPE_MAP_PROJECTION, value, (gpointer)&val) != 0)
380
pyg_boxed_get (self, ChamplainMapSourceDesc)->projection = val;
383
#line 384 "pychamplain.c"
387
_wrap_champlain_map_source_desc__get_projection(PyObject *self, void *closure)
391
ret = pyg_boxed_get(self, ChamplainMapSourceDesc)->projection;
392
return pyg_enum_from_gtype(CHAMPLAIN_TYPE_MAP_PROJECTION, ret);
395
#line 317 "pychamplain.override"
397
_wrap_champlain_map_source_desc__set_uri_format (PyGBoxed *self, PyObject *value, void *closure)
401
val = PyString_AsString (value);
402
if (PyErr_Occurred ())
405
pyg_boxed_get (self, ChamplainMapSourceDesc)->uri_format = val;
409
_wrap_champlain_map_source_desc__get_uri_format (PyGBoxed *self, void *closure)
411
gchar *uri_format = pyg_boxed_get(self, ChamplainMapSourceDesc)->uri_format;
412
return PyString_FromString (uri_format);
414
#line 415 "pychamplain.c"
417
static const PyGetSetDef champlain_map_source_desc_getsets[] = {
418
{ "id", (getter)_wrap_champlain_map_source_desc__get_id, (setter)_wrap_champlain_map_source_desc__set_id },
419
{ "name", (getter)_wrap_champlain_map_source_desc__get_name, (setter)_wrap_champlain_map_source_desc__set_name },
420
{ "license", (getter)_wrap_champlain_map_source_desc__get_license, (setter)_wrap_champlain_map_source_desc__set_license },
421
{ "license_uri", (getter)_wrap_champlain_map_source_desc__get_license_uri, (setter)_wrap_champlain_map_source_desc__set_license_uri },
422
{ "min_zoom_level", (getter)_wrap_champlain_map_source_desc__get_min_zoom_level, (setter)_wrap_champlain_map_source_desc__set_min_zoom_level },
423
{ "max_zoom_level", (getter)_wrap_champlain_map_source_desc__get_max_zoom_level, (setter)_wrap_champlain_map_source_desc__set_max_zoom_level },
424
{ "projection", (getter)_wrap_champlain_map_source_desc__get_projection, (setter)_wrap_champlain_map_source_desc__set_projection },
425
{ "uri_format", (getter)_wrap_champlain_map_source_desc__get_uri_format, (setter)_wrap_champlain_map_source_desc__set_uri_format },
426
{ NULL, (getter)0, (setter)0 },
429
PyTypeObject G_GNUC_INTERNAL PyChamplainMapSourceDesc_Type = {
430
PyObject_HEAD_INIT(NULL)
432
"champlain.MapSourceDesc", /* tp_name */
433
sizeof(PyGBoxed), /* tp_basicsize */
436
(destructor)0, /* tp_dealloc */
437
(printfunc)0, /* tp_print */
438
(getattrfunc)0, /* tp_getattr */
439
(setattrfunc)0, /* tp_setattr */
440
(cmpfunc)0, /* tp_compare */
441
(reprfunc)0, /* tp_repr */
442
(PyNumberMethods*)0, /* tp_as_number */
443
(PySequenceMethods*)0, /* tp_as_sequence */
444
(PyMappingMethods*)0, /* tp_as_mapping */
445
(hashfunc)0, /* tp_hash */
446
(ternaryfunc)0, /* tp_call */
447
(reprfunc)0, /* tp_str */
448
(getattrofunc)0, /* tp_getattro */
449
(setattrofunc)0, /* tp_setattro */
450
(PyBufferProcs*)0, /* tp_as_buffer */
451
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
452
NULL, /* Documentation string */
453
(traverseproc)0, /* tp_traverse */
454
(inquiry)0, /* tp_clear */
455
(richcmpfunc)0, /* tp_richcompare */
456
0, /* tp_weaklistoffset */
457
(getiterfunc)0, /* tp_iter */
458
(iternextfunc)0, /* tp_iternext */
459
(struct PyMethodDef*)_PyChamplainMapSourceDesc_methods, /* tp_methods */
460
(struct PyMemberDef*)0, /* tp_members */
461
(struct PyGetSetDef*)champlain_map_source_desc_getsets, /* tp_getset */
464
(descrgetfunc)0, /* tp_descr_get */
465
(descrsetfunc)0, /* tp_descr_set */
466
0, /* tp_dictoffset */
467
(initproc)_wrap_champlain_map_source_desc_new, /* tp_init */
468
(allocfunc)0, /* tp_alloc */
469
(newfunc)0, /* tp_new */
470
(freefunc)0, /* tp_free */
471
(inquiry)0 /* tp_is_gc */
476
/* ----------- ChamplainBaseMarker ----------- */
479
_wrap_champlain_base_marker_new(PyGObject *self, PyObject *args, PyObject *kwargs)
481
static char* kwlist[] = { NULL };
483
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
484
":champlain.BaseMarker.__init__",
488
pygobject_constructv(self, 0, NULL);
492
"could not create champlain.BaseMarker object");
499
_wrap_champlain_base_marker_set_position(PyGObject *self, PyObject *args, PyObject *kwargs)
501
static char *kwlist[] = { "longitude", "latitude", NULL };
502
double longitude, latitude;
504
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"dd:ChamplainBaseMarker.set_position", kwlist, &longitude, &latitude))
507
champlain_base_marker_set_position(CHAMPLAIN_BASE_MARKER(self->obj), longitude, latitude);
514
_wrap_champlain_base_marker_set_highlighted(PyGObject *self, PyObject *args, PyObject *kwargs)
516
static char *kwlist[] = { "value", NULL };
519
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainBaseMarker.set_highlighted", kwlist, &value))
522
champlain_base_marker_set_highlighted(CHAMPLAIN_BASE_MARKER(self->obj), value);
529
_wrap_champlain_base_marker_get_highlighted(PyGObject *self)
534
ret = champlain_base_marker_get_highlighted(CHAMPLAIN_BASE_MARKER(self->obj));
536
return PyBool_FromLong(ret);
541
_wrap_champlain_base_marker_animate_in(PyGObject *self)
544
champlain_base_marker_animate_in(CHAMPLAIN_BASE_MARKER(self->obj));
551
_wrap_champlain_base_marker_animate_in_with_delay(PyGObject *self, PyObject *args, PyObject *kwargs)
553
static char *kwlist[] = { "delay", NULL };
554
PyObject *py_delay = NULL;
557
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainBaseMarker.animate_in_with_delay", kwlist, &py_delay))
560
if (PyLong_Check(py_delay))
561
delay = PyLong_AsUnsignedLong(py_delay);
562
else if (PyInt_Check(py_delay))
563
delay = PyInt_AsLong(py_delay);
565
PyErr_SetString(PyExc_TypeError, "Parameter 'delay' must be an int or a long");
566
if (PyErr_Occurred())
570
champlain_base_marker_animate_in_with_delay(CHAMPLAIN_BASE_MARKER(self->obj), delay);
577
_wrap_champlain_base_marker_animate_out(PyGObject *self)
580
champlain_base_marker_animate_out(CHAMPLAIN_BASE_MARKER(self->obj));
587
_wrap_champlain_base_marker_animate_out_with_delay(PyGObject *self, PyObject *args, PyObject *kwargs)
589
static char *kwlist[] = { "delay", NULL };
590
PyObject *py_delay = NULL;
593
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainBaseMarker.animate_out_with_delay", kwlist, &py_delay))
596
if (PyLong_Check(py_delay))
597
delay = PyLong_AsUnsignedLong(py_delay);
598
else if (PyInt_Check(py_delay))
599
delay = PyInt_AsLong(py_delay);
601
PyErr_SetString(PyExc_TypeError, "Parameter 'delay' must be an int or a long");
602
if (PyErr_Occurred())
606
champlain_base_marker_animate_out_with_delay(CHAMPLAIN_BASE_MARKER(self->obj), delay);
612
static const PyMethodDef _PyChamplainBaseMarker_methods[] = {
613
{ "set_position", (PyCFunction)_wrap_champlain_base_marker_set_position, METH_VARARGS|METH_KEYWORDS,
615
{ "set_highlighted", (PyCFunction)_wrap_champlain_base_marker_set_highlighted, METH_VARARGS|METH_KEYWORDS,
617
{ "get_highlighted", (PyCFunction)_wrap_champlain_base_marker_get_highlighted, METH_NOARGS,
619
{ "animate_in", (PyCFunction)_wrap_champlain_base_marker_animate_in, METH_NOARGS,
621
{ "animate_in_with_delay", (PyCFunction)_wrap_champlain_base_marker_animate_in_with_delay, METH_VARARGS|METH_KEYWORDS,
623
{ "animate_out", (PyCFunction)_wrap_champlain_base_marker_animate_out, METH_NOARGS,
625
{ "animate_out_with_delay", (PyCFunction)_wrap_champlain_base_marker_animate_out_with_delay, METH_VARARGS|METH_KEYWORDS,
627
{ NULL, NULL, 0, NULL }
630
PyTypeObject G_GNUC_INTERNAL PyChamplainBaseMarker_Type = {
631
PyObject_HEAD_INIT(NULL)
633
"champlain.BaseMarker", /* tp_name */
634
sizeof(PyGObject), /* tp_basicsize */
637
(destructor)0, /* tp_dealloc */
638
(printfunc)0, /* tp_print */
639
(getattrfunc)0, /* tp_getattr */
640
(setattrfunc)0, /* tp_setattr */
641
(cmpfunc)0, /* tp_compare */
642
(reprfunc)0, /* tp_repr */
643
(PyNumberMethods*)0, /* tp_as_number */
644
(PySequenceMethods*)0, /* tp_as_sequence */
645
(PyMappingMethods*)0, /* tp_as_mapping */
646
(hashfunc)0, /* tp_hash */
647
(ternaryfunc)0, /* tp_call */
648
(reprfunc)0, /* tp_str */
649
(getattrofunc)0, /* tp_getattro */
650
(setattrofunc)0, /* tp_setattro */
651
(PyBufferProcs*)0, /* tp_as_buffer */
652
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
653
NULL, /* Documentation string */
654
(traverseproc)0, /* tp_traverse */
655
(inquiry)0, /* tp_clear */
656
(richcmpfunc)0, /* tp_richcompare */
657
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
658
(getiterfunc)0, /* tp_iter */
659
(iternextfunc)0, /* tp_iternext */
660
(struct PyMethodDef*)_PyChamplainBaseMarker_methods, /* tp_methods */
661
(struct PyMemberDef*)0, /* tp_members */
662
(struct PyGetSetDef*)0, /* tp_getset */
665
(descrgetfunc)0, /* tp_descr_get */
666
(descrsetfunc)0, /* tp_descr_set */
667
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
668
(initproc)_wrap_champlain_base_marker_new, /* tp_init */
669
(allocfunc)0, /* tp_alloc */
670
(newfunc)0, /* tp_new */
671
(freefunc)0, /* tp_free */
672
(inquiry)0 /* tp_is_gc */
677
/* ----------- ChamplainCache ----------- */
680
_wrap_champlain_cache_update_tile(PyGObject *self, PyObject *args, PyObject *kwargs)
682
static char *kwlist[] = { "tile", "filesize", NULL };
684
PyObject *py_filesize = NULL;
687
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!O:ChamplainCache.update_tile", kwlist, &PyChamplainTile_Type, &tile, &py_filesize))
690
if (PyLong_Check(py_filesize))
691
filesize = PyLong_AsUnsignedLong(py_filesize);
692
else if (PyInt_Check(py_filesize))
693
filesize = PyInt_AsLong(py_filesize);
695
PyErr_SetString(PyExc_TypeError, "Parameter 'filesize' must be an int or a long");
696
if (PyErr_Occurred())
700
champlain_cache_update_tile(CHAMPLAIN_CACHE(self->obj), CHAMPLAIN_TILE(tile->obj), filesize);
707
_wrap_champlain_cache_fill_tile(PyGObject *self, PyObject *args, PyObject *kwargs)
709
static char *kwlist[] = { "tile", NULL };
713
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainCache.fill_tile", kwlist, &PyChamplainTile_Type, &tile))
716
ret = champlain_cache_fill_tile(CHAMPLAIN_CACHE(self->obj), CHAMPLAIN_TILE(tile->obj));
718
return PyBool_FromLong(ret);
723
_wrap_champlain_cache_tile_is_expired(PyGObject *self, PyObject *args, PyObject *kwargs)
725
static char *kwlist[] = { "tile", NULL };
729
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainCache.tile_is_expired", kwlist, &PyChamplainTile_Type, &tile))
732
ret = champlain_cache_tile_is_expired(CHAMPLAIN_CACHE(self->obj), CHAMPLAIN_TILE(tile->obj));
734
return PyBool_FromLong(ret);
739
_wrap_champlain_cache_set_size_limit(PyGObject *self, PyObject *args, PyObject *kwargs)
741
static char *kwlist[] = { "size_limit", NULL };
742
PyObject *py_size_limit = NULL;
743
guint size_limit = 0;
745
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainCache.set_size_limit", kwlist, &py_size_limit))
748
if (PyLong_Check(py_size_limit))
749
size_limit = PyLong_AsUnsignedLong(py_size_limit);
750
else if (PyInt_Check(py_size_limit))
751
size_limit = PyInt_AsLong(py_size_limit);
753
PyErr_SetString(PyExc_TypeError, "Parameter 'size_limit' must be an int or a long");
754
if (PyErr_Occurred())
758
champlain_cache_set_size_limit(CHAMPLAIN_CACHE(self->obj), size_limit);
765
_wrap_champlain_cache_get_size_limit(PyGObject *self)
770
ret = champlain_cache_get_size_limit(CHAMPLAIN_CACHE(self->obj));
772
return PyLong_FromUnsignedLong(ret);
776
_wrap_champlain_cache_purge(PyGObject *self)
779
champlain_cache_purge(CHAMPLAIN_CACHE(self->obj));
786
_wrap_champlain_cache_purge_on_idle(PyGObject *self)
789
champlain_cache_purge_on_idle(CHAMPLAIN_CACHE(self->obj));
795
static const PyMethodDef _PyChamplainCache_methods[] = {
796
{ "update_tile", (PyCFunction)_wrap_champlain_cache_update_tile, METH_VARARGS|METH_KEYWORDS,
798
{ "fill_tile", (PyCFunction)_wrap_champlain_cache_fill_tile, METH_VARARGS|METH_KEYWORDS,
800
{ "tile_is_expired", (PyCFunction)_wrap_champlain_cache_tile_is_expired, METH_VARARGS|METH_KEYWORDS,
802
{ "set_size_limit", (PyCFunction)_wrap_champlain_cache_set_size_limit, METH_VARARGS|METH_KEYWORDS,
804
{ "get_size_limit", (PyCFunction)_wrap_champlain_cache_get_size_limit, METH_NOARGS,
806
{ "purge", (PyCFunction)_wrap_champlain_cache_purge, METH_NOARGS,
808
{ "purge_on_idle", (PyCFunction)_wrap_champlain_cache_purge_on_idle, METH_NOARGS,
810
{ NULL, NULL, 0, NULL }
813
PyTypeObject G_GNUC_INTERNAL PyChamplainCache_Type = {
814
PyObject_HEAD_INIT(NULL)
816
"champlain.Cache", /* tp_name */
817
sizeof(PyGObject), /* tp_basicsize */
820
(destructor)0, /* tp_dealloc */
821
(printfunc)0, /* tp_print */
822
(getattrfunc)0, /* tp_getattr */
823
(setattrfunc)0, /* tp_setattr */
824
(cmpfunc)0, /* tp_compare */
825
(reprfunc)0, /* tp_repr */
826
(PyNumberMethods*)0, /* tp_as_number */
827
(PySequenceMethods*)0, /* tp_as_sequence */
828
(PyMappingMethods*)0, /* tp_as_mapping */
829
(hashfunc)0, /* tp_hash */
830
(ternaryfunc)0, /* tp_call */
831
(reprfunc)0, /* tp_str */
832
(getattrofunc)0, /* tp_getattro */
833
(setattrofunc)0, /* tp_setattro */
834
(PyBufferProcs*)0, /* tp_as_buffer */
835
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
836
NULL, /* Documentation string */
837
(traverseproc)0, /* tp_traverse */
838
(inquiry)0, /* tp_clear */
839
(richcmpfunc)0, /* tp_richcompare */
840
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
841
(getiterfunc)0, /* tp_iter */
842
(iternextfunc)0, /* tp_iternext */
843
(struct PyMethodDef*)_PyChamplainCache_methods, /* tp_methods */
844
(struct PyMemberDef*)0, /* tp_members */
845
(struct PyGetSetDef*)0, /* tp_getset */
848
(descrgetfunc)0, /* tp_descr_get */
849
(descrsetfunc)0, /* tp_descr_set */
850
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
851
(initproc)0, /* tp_init */
852
(allocfunc)0, /* tp_alloc */
853
(newfunc)0, /* tp_new */
854
(freefunc)0, /* tp_free */
855
(inquiry)0 /* tp_is_gc */
860
/* ----------- ChamplainLayer ----------- */
863
_wrap_champlain_layer_new(PyGObject *self, PyObject *args, PyObject *kwargs)
865
static char* kwlist[] = { NULL };
867
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
868
":champlain.Layer.__init__",
872
pygobject_constructv(self, 0, NULL);
876
"could not create champlain.Layer object");
883
_wrap_champlain_layer_show(PyGObject *self)
886
champlain_layer_show(CHAMPLAIN_LAYER(self->obj));
893
_wrap_champlain_layer_hide(PyGObject *self)
896
champlain_layer_hide(CHAMPLAIN_LAYER(self->obj));
903
_wrap_champlain_layer_add_marker(PyGObject *self, PyObject *args, PyObject *kwargs)
905
static char *kwlist[] = { "marker", NULL };
908
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainLayer.add_marker", kwlist, &PyChamplainBaseMarker_Type, &marker))
911
champlain_layer_add_marker(CHAMPLAIN_LAYER(self->obj), CHAMPLAIN_BASE_MARKER(marker->obj));
918
_wrap_champlain_layer_remove_marker(PyGObject *self, PyObject *args, PyObject *kwargs)
920
static char *kwlist[] = { "marker", NULL };
923
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainLayer.remove_marker", kwlist, &PyChamplainBaseMarker_Type, &marker))
926
champlain_layer_remove_marker(CHAMPLAIN_LAYER(self->obj), CHAMPLAIN_BASE_MARKER(marker->obj));
933
_wrap_champlain_layer_animate_in_all_markers(PyGObject *self)
936
champlain_layer_animate_in_all_markers(CHAMPLAIN_LAYER(self->obj));
943
_wrap_champlain_layer_animate_out_all_markers(PyGObject *self)
946
champlain_layer_animate_out_all_markers(CHAMPLAIN_LAYER(self->obj));
953
_wrap_champlain_layer_show_all_markers(PyGObject *self)
956
champlain_layer_show_all_markers(CHAMPLAIN_LAYER(self->obj));
963
_wrap_champlain_layer_hide_all_markers(PyGObject *self)
966
champlain_layer_hide_all_markers(CHAMPLAIN_LAYER(self->obj));
972
static const PyMethodDef _PyChamplainLayer_methods[] = {
973
{ "show", (PyCFunction)_wrap_champlain_layer_show, METH_NOARGS,
975
{ "hide", (PyCFunction)_wrap_champlain_layer_hide, METH_NOARGS,
977
{ "add_marker", (PyCFunction)_wrap_champlain_layer_add_marker, METH_VARARGS|METH_KEYWORDS,
979
{ "remove_marker", (PyCFunction)_wrap_champlain_layer_remove_marker, METH_VARARGS|METH_KEYWORDS,
981
{ "animate_in_all_markers", (PyCFunction)_wrap_champlain_layer_animate_in_all_markers, METH_NOARGS,
983
{ "animate_out_all_markers", (PyCFunction)_wrap_champlain_layer_animate_out_all_markers, METH_NOARGS,
985
{ "show_all_markers", (PyCFunction)_wrap_champlain_layer_show_all_markers, METH_NOARGS,
987
{ "hide_all_markers", (PyCFunction)_wrap_champlain_layer_hide_all_markers, METH_NOARGS,
989
{ NULL, NULL, 0, NULL }
992
PyTypeObject G_GNUC_INTERNAL PyChamplainLayer_Type = {
993
PyObject_HEAD_INIT(NULL)
995
"champlain.Layer", /* tp_name */
996
sizeof(PyGObject), /* tp_basicsize */
999
(destructor)0, /* tp_dealloc */
1000
(printfunc)0, /* tp_print */
1001
(getattrfunc)0, /* tp_getattr */
1002
(setattrfunc)0, /* tp_setattr */
1003
(cmpfunc)0, /* tp_compare */
1004
(reprfunc)0, /* tp_repr */
1005
(PyNumberMethods*)0, /* tp_as_number */
1006
(PySequenceMethods*)0, /* tp_as_sequence */
1007
(PyMappingMethods*)0, /* tp_as_mapping */
1008
(hashfunc)0, /* tp_hash */
1009
(ternaryfunc)0, /* tp_call */
1010
(reprfunc)0, /* tp_str */
1011
(getattrofunc)0, /* tp_getattro */
1012
(setattrofunc)0, /* tp_setattro */
1013
(PyBufferProcs*)0, /* tp_as_buffer */
1014
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
1015
NULL, /* Documentation string */
1016
(traverseproc)0, /* tp_traverse */
1017
(inquiry)0, /* tp_clear */
1018
(richcmpfunc)0, /* tp_richcompare */
1019
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
1020
(getiterfunc)0, /* tp_iter */
1021
(iternextfunc)0, /* tp_iternext */
1022
(struct PyMethodDef*)_PyChamplainLayer_methods, /* tp_methods */
1023
(struct PyMemberDef*)0, /* tp_members */
1024
(struct PyGetSetDef*)0, /* tp_getset */
1027
(descrgetfunc)0, /* tp_descr_get */
1028
(descrsetfunc)0, /* tp_descr_set */
1029
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
1030
(initproc)_wrap_champlain_layer_new, /* tp_init */
1031
(allocfunc)0, /* tp_alloc */
1032
(newfunc)0, /* tp_new */
1033
(freefunc)0, /* tp_free */
1034
(inquiry)0 /* tp_is_gc */
1039
/* ----------- ChamplainMapSource ----------- */
1042
_wrap_champlain_map_source_get_min_zoom_level(PyGObject *self)
1047
ret = champlain_map_source_get_min_zoom_level(CHAMPLAIN_MAP_SOURCE(self->obj));
1049
return PyInt_FromLong(ret);
1053
_wrap_champlain_map_source_get_max_zoom_level(PyGObject *self)
1058
ret = champlain_map_source_get_max_zoom_level(CHAMPLAIN_MAP_SOURCE(self->obj));
1060
return PyInt_FromLong(ret);
1064
_wrap_champlain_map_source_get_tile_size(PyGObject *self)
1069
ret = champlain_map_source_get_tile_size(CHAMPLAIN_MAP_SOURCE(self->obj));
1071
return PyLong_FromUnsignedLong(ret);
1075
_wrap_champlain_map_source_get_x(PyGObject *self, PyObject *args, PyObject *kwargs)
1077
static char *kwlist[] = { "zoom_level", "longitude", NULL };
1082
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"id:ChamplainMapSource.get_x", kwlist, &zoom_level, &longitude))
1085
ret = champlain_map_source_get_x(CHAMPLAIN_MAP_SOURCE(self->obj), zoom_level, longitude);
1087
return PyLong_FromUnsignedLong(ret);
1091
_wrap_champlain_map_source_get_y(PyGObject *self, PyObject *args, PyObject *kwargs)
1093
static char *kwlist[] = { "zoom_level", "latitude", NULL };
1098
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"id:ChamplainMapSource.get_y", kwlist, &zoom_level, &latitude))
1101
ret = champlain_map_source_get_y(CHAMPLAIN_MAP_SOURCE(self->obj), zoom_level, latitude);
1103
return PyLong_FromUnsignedLong(ret);
1107
_wrap_champlain_map_source_get_longitude(PyGObject *self, PyObject *args, PyObject *kwargs)
1109
static char *kwlist[] = { "zoom_level", "x", NULL };
1111
PyObject *py_x = NULL;
1115
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"iO:ChamplainMapSource.get_longitude", kwlist, &zoom_level, &py_x))
1118
if (PyLong_Check(py_x))
1119
x = PyLong_AsUnsignedLong(py_x);
1120
else if (PyInt_Check(py_x))
1121
x = PyInt_AsLong(py_x);
1123
PyErr_SetString(PyExc_TypeError, "Parameter 'x' must be an int or a long");
1124
if (PyErr_Occurred())
1128
ret = champlain_map_source_get_longitude(CHAMPLAIN_MAP_SOURCE(self->obj), zoom_level, x);
1130
return PyFloat_FromDouble(ret);
1134
_wrap_champlain_map_source_get_latitude(PyGObject *self, PyObject *args, PyObject *kwargs)
1136
static char *kwlist[] = { "zoom_level", "y", NULL };
1138
PyObject *py_y = NULL;
1142
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"iO:ChamplainMapSource.get_latitude", kwlist, &zoom_level, &py_y))
1145
if (PyLong_Check(py_y))
1146
y = PyLong_AsUnsignedLong(py_y);
1147
else if (PyInt_Check(py_y))
1148
y = PyInt_AsLong(py_y);
1150
PyErr_SetString(PyExc_TypeError, "Parameter 'y' must be an int or a long");
1151
if (PyErr_Occurred())
1155
ret = champlain_map_source_get_latitude(CHAMPLAIN_MAP_SOURCE(self->obj), zoom_level, y);
1157
return PyFloat_FromDouble(ret);
1161
_wrap_champlain_map_source_get_row_count(PyGObject *self, PyObject *args, PyObject *kwargs)
1163
static char *kwlist[] = { "zoom_level", NULL };
1167
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainMapSource.get_row_count", kwlist, &zoom_level))
1170
ret = champlain_map_source_get_row_count(CHAMPLAIN_MAP_SOURCE(self->obj), zoom_level);
1172
return PyLong_FromUnsignedLong(ret);
1176
_wrap_champlain_map_source_get_column_count(PyGObject *self, PyObject *args, PyObject *kwargs)
1178
static char *kwlist[] = { "zoom_level", NULL };
1182
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainMapSource.get_column_count", kwlist, &zoom_level))
1185
ret = champlain_map_source_get_column_count(CHAMPLAIN_MAP_SOURCE(self->obj), zoom_level);
1187
return PyLong_FromUnsignedLong(ret);
1191
_wrap_champlain_map_source_fill_tile(PyGObject *self, PyObject *args, PyObject *kwargs)
1193
static char *kwlist[] = { "tile", NULL };
1196
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainMapSource.fill_tile", kwlist, &PyChamplainTile_Type, &tile))
1199
champlain_map_source_fill_tile(CHAMPLAIN_MAP_SOURCE(self->obj), CHAMPLAIN_TILE(tile->obj));
1206
_wrap_champlain_map_source_set_id(PyGObject *self, PyObject *args, PyObject *kwargs)
1208
static char *kwlist[] = { "id", NULL };
1211
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainMapSource.set_id", kwlist, &id))
1214
champlain_map_source_set_id(CHAMPLAIN_MAP_SOURCE(self->obj), id);
1221
_wrap_champlain_map_source_get_id(PyGObject *self)
1226
ret = champlain_map_source_get_id(CHAMPLAIN_MAP_SOURCE(self->obj));
1229
return PyString_FromString(ret);
1235
_wrap_champlain_map_source_set_name(PyGObject *self, PyObject *args, PyObject *kwargs)
1237
static char *kwlist[] = { "name", NULL };
1240
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainMapSource.set_name", kwlist, &name))
1243
champlain_map_source_set_name(CHAMPLAIN_MAP_SOURCE(self->obj), name);
1250
_wrap_champlain_map_source_get_name(PyGObject *self)
1255
ret = champlain_map_source_get_name(CHAMPLAIN_MAP_SOURCE(self->obj));
1258
return PyString_FromString(ret);
1264
_wrap_champlain_map_source_set_license(PyGObject *self, PyObject *args, PyObject *kwargs)
1266
static char *kwlist[] = { "license", NULL };
1269
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainMapSource.set_license", kwlist, &license))
1272
champlain_map_source_set_license(CHAMPLAIN_MAP_SOURCE(self->obj), license);
1279
_wrap_champlain_map_source_get_license(PyGObject *self)
1284
ret = champlain_map_source_get_license(CHAMPLAIN_MAP_SOURCE(self->obj));
1287
return PyString_FromString(ret);
1293
_wrap_champlain_map_source_set_license_uri(PyGObject *self, PyObject *args, PyObject *kwargs)
1295
static char *kwlist[] = { "license_uri", NULL };
1298
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainMapSource.set_license_uri", kwlist, &license_uri))
1301
champlain_map_source_set_license_uri(CHAMPLAIN_MAP_SOURCE(self->obj), license_uri);
1308
_wrap_champlain_map_source_get_license_uri(PyGObject *self)
1313
ret = champlain_map_source_get_license_uri(CHAMPLAIN_MAP_SOURCE(self->obj));
1316
return PyString_FromString(ret);
1322
_wrap_champlain_map_source_set_projection(PyGObject *self, PyObject *args, PyObject *kwargs)
1324
static char *kwlist[] = { "projection", NULL };
1325
PyObject *py_projection = NULL;
1326
ChamplainMapProjection projection;
1328
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainMapSource.set_projection", kwlist, &py_projection))
1330
if (pyg_enum_get_value(CHAMPLAIN_TYPE_MAP_PROJECTION, py_projection, (gpointer)&projection))
1333
champlain_map_source_set_projection(CHAMPLAIN_MAP_SOURCE(self->obj), projection);
1340
_wrap_champlain_map_source_get_projection(PyGObject *self)
1345
ret = champlain_map_source_get_projection(CHAMPLAIN_MAP_SOURCE(self->obj));
1347
return pyg_enum_from_gtype(CHAMPLAIN_TYPE_MAP_PROJECTION, ret);
1350
static const PyMethodDef _PyChamplainMapSource_methods[] = {
1351
{ "get_min_zoom_level", (PyCFunction)_wrap_champlain_map_source_get_min_zoom_level, METH_NOARGS,
1353
{ "get_max_zoom_level", (PyCFunction)_wrap_champlain_map_source_get_max_zoom_level, METH_NOARGS,
1355
{ "get_tile_size", (PyCFunction)_wrap_champlain_map_source_get_tile_size, METH_NOARGS,
1357
{ "get_x", (PyCFunction)_wrap_champlain_map_source_get_x, METH_VARARGS|METH_KEYWORDS,
1359
{ "get_y", (PyCFunction)_wrap_champlain_map_source_get_y, METH_VARARGS|METH_KEYWORDS,
1361
{ "get_longitude", (PyCFunction)_wrap_champlain_map_source_get_longitude, METH_VARARGS|METH_KEYWORDS,
1363
{ "get_latitude", (PyCFunction)_wrap_champlain_map_source_get_latitude, METH_VARARGS|METH_KEYWORDS,
1365
{ "get_row_count", (PyCFunction)_wrap_champlain_map_source_get_row_count, METH_VARARGS|METH_KEYWORDS,
1367
{ "get_column_count", (PyCFunction)_wrap_champlain_map_source_get_column_count, METH_VARARGS|METH_KEYWORDS,
1369
{ "fill_tile", (PyCFunction)_wrap_champlain_map_source_fill_tile, METH_VARARGS|METH_KEYWORDS,
1371
{ "set_id", (PyCFunction)_wrap_champlain_map_source_set_id, METH_VARARGS|METH_KEYWORDS,
1373
{ "get_id", (PyCFunction)_wrap_champlain_map_source_get_id, METH_NOARGS,
1375
{ "set_name", (PyCFunction)_wrap_champlain_map_source_set_name, METH_VARARGS|METH_KEYWORDS,
1377
{ "get_name", (PyCFunction)_wrap_champlain_map_source_get_name, METH_NOARGS,
1379
{ "set_license", (PyCFunction)_wrap_champlain_map_source_set_license, METH_VARARGS|METH_KEYWORDS,
1381
{ "get_license", (PyCFunction)_wrap_champlain_map_source_get_license, METH_NOARGS,
1383
{ "set_license_uri", (PyCFunction)_wrap_champlain_map_source_set_license_uri, METH_VARARGS|METH_KEYWORDS,
1385
{ "get_license_uri", (PyCFunction)_wrap_champlain_map_source_get_license_uri, METH_NOARGS,
1387
{ "set_projection", (PyCFunction)_wrap_champlain_map_source_set_projection, METH_VARARGS|METH_KEYWORDS,
1389
{ "get_projection", (PyCFunction)_wrap_champlain_map_source_get_projection, METH_NOARGS,
1391
{ NULL, NULL, 0, NULL }
1394
PyTypeObject G_GNUC_INTERNAL PyChamplainMapSource_Type = {
1395
PyObject_HEAD_INIT(NULL)
1397
"champlain.MapSource", /* tp_name */
1398
sizeof(PyGObject), /* tp_basicsize */
1399
0, /* tp_itemsize */
1401
(destructor)0, /* tp_dealloc */
1402
(printfunc)0, /* tp_print */
1403
(getattrfunc)0, /* tp_getattr */
1404
(setattrfunc)0, /* tp_setattr */
1405
(cmpfunc)0, /* tp_compare */
1406
(reprfunc)0, /* tp_repr */
1407
(PyNumberMethods*)0, /* tp_as_number */
1408
(PySequenceMethods*)0, /* tp_as_sequence */
1409
(PyMappingMethods*)0, /* tp_as_mapping */
1410
(hashfunc)0, /* tp_hash */
1411
(ternaryfunc)0, /* tp_call */
1412
(reprfunc)0, /* tp_str */
1413
(getattrofunc)0, /* tp_getattro */
1414
(setattrofunc)0, /* tp_setattro */
1415
(PyBufferProcs*)0, /* tp_as_buffer */
1416
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
1417
NULL, /* Documentation string */
1418
(traverseproc)0, /* tp_traverse */
1419
(inquiry)0, /* tp_clear */
1420
(richcmpfunc)0, /* tp_richcompare */
1421
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
1422
(getiterfunc)0, /* tp_iter */
1423
(iternextfunc)0, /* tp_iternext */
1424
(struct PyMethodDef*)_PyChamplainMapSource_methods, /* tp_methods */
1425
(struct PyMemberDef*)0, /* tp_members */
1426
(struct PyGetSetDef*)0, /* tp_getset */
1429
(descrgetfunc)0, /* tp_descr_get */
1430
(descrsetfunc)0, /* tp_descr_set */
1431
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
1432
(initproc)0, /* tp_init */
1433
(allocfunc)0, /* tp_alloc */
1434
(newfunc)0, /* tp_new */
1435
(freefunc)0, /* tp_free */
1436
(inquiry)0 /* tp_is_gc */
1441
/* ----------- ChamplainMapSourceFactory ----------- */
1443
#line 30 "pychamplain.override"
1445
_wrap_champlain_map_source_factory_dup_list(PyGObject *self) {
1446
GSList *iter, *list;
1450
list = champlain_map_source_factory_dup_list(CHAMPLAIN_MAP_SOURCE_FACTORY(self->obj));
1452
ret = PyList_New(0);
1453
for(iter = list; iter != NULL; iter = iter->next) {
1454
ChamplainMapSourceDesc *desc = (ChamplainMapSourceDesc *) iter->data;
1455
pydesc = pyg_boxed_new(CHAMPLAIN_TYPE_MAP_SOURCE_DESC, desc, TRUE, TRUE);
1456
PyList_Append(ret, pydesc);
1464
#line 1465 "pychamplain.c"
1468
_wrap_champlain_map_source_factory_create(PyGObject *self, PyObject *args, PyObject *kwargs)
1470
static char *kwlist[] = { "id", NULL };
1472
ChamplainMapSource *ret;
1474
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainMapSourceFactory.create", kwlist, &id))
1477
ret = champlain_map_source_factory_create(CHAMPLAIN_MAP_SOURCE_FACTORY(self->obj), id);
1479
/* pygobject_new handles NULL checking */
1480
return pygobject_new((GObject *)ret);
1483
#line 52 "pychamplain.override"
1484
static PyObject *_pycallback = NULL;
1486
static ChamplainMapSource *
1487
champlain_map_source_constructor (ChamplainMapSourceDesc *desc, gpointer data)
1489
PyObject *pymap_source = NULL;
1492
pydesc = pyg_boxed_new(CHAMPLAIN_TYPE_MAP_SOURCE_DESC, desc, TRUE, TRUE);
1493
pymap_source = PyObject_CallFunction(_pycallback, "(OO)", pydesc, data);
1496
return CHAMPLAIN_MAP_SOURCE(((PyGObject *)pymap_source)->obj);
1500
_wrap_champlain_map_source_factory_register(PyGObject *self, PyObject *args, PyObject *kargs)
1502
ChamplainMapSourceDesc *desc;
1503
PyObject *pydesc = NULL, *pyconstructor = NULL, *pyuser_data = NULL;
1504
static char *kwlist[] = {"desc", "constructor", "user_data", NULL};
1506
if (!PyArg_ParseTupleAndKeywords(args, kargs, "OO|O:ChamplainMapSourceFactory.register",
1507
kwlist, &pydesc, &pyconstructor, &pyuser_data))
1510
if (pyg_boxed_check(pydesc, CHAMPLAIN_TYPE_MAP_SOURCE_DESC))
1511
desc = pyg_boxed_get(pydesc, ChamplainMapSourceDesc);
1513
PyErr_SetString(PyExc_TypeError, "desc must be a MapSourceDesc");
1517
if (!pyconstructor || !PyCallable_Check(pyconstructor)) {
1518
PyErr_SetString(PyExc_TypeError, "constructor parameter must be callable");
1521
Py_XINCREF(pyconstructor); /* Add a reference to new callback */
1522
Py_XDECREF(_pycallback); /* Dispose of previous callback */
1523
_pycallback = pyconstructor;
1524
return PyBool_FromLong(champlain_map_source_factory_register(
1525
CHAMPLAIN_MAP_SOURCE_FACTORY(self->obj), desc, champlain_map_source_constructor,
1526
(gpointer)pyuser_data));
1528
#line 1529 "pychamplain.c"
1531
static const PyMethodDef _PyChamplainMapSourceFactory_methods[] = {
1532
{ "dup_list", (PyCFunction)_wrap_champlain_map_source_factory_dup_list, METH_VARARGS|METH_KEYWORDS,
1534
{ "create", (PyCFunction)_wrap_champlain_map_source_factory_create, METH_VARARGS|METH_KEYWORDS,
1536
{ "register", (PyCFunction)_wrap_champlain_map_source_factory_register, METH_VARARGS|METH_KEYWORDS,
1538
{ NULL, NULL, 0, NULL }
1541
PyTypeObject G_GNUC_INTERNAL PyChamplainMapSourceFactory_Type = {
1542
PyObject_HEAD_INIT(NULL)
1544
"champlain.MapSourceFactory", /* tp_name */
1545
sizeof(PyGObject), /* tp_basicsize */
1546
0, /* tp_itemsize */
1548
(destructor)0, /* tp_dealloc */
1549
(printfunc)0, /* tp_print */
1550
(getattrfunc)0, /* tp_getattr */
1551
(setattrfunc)0, /* tp_setattr */
1552
(cmpfunc)0, /* tp_compare */
1553
(reprfunc)0, /* tp_repr */
1554
(PyNumberMethods*)0, /* tp_as_number */
1555
(PySequenceMethods*)0, /* tp_as_sequence */
1556
(PyMappingMethods*)0, /* tp_as_mapping */
1557
(hashfunc)0, /* tp_hash */
1558
(ternaryfunc)0, /* tp_call */
1559
(reprfunc)0, /* tp_str */
1560
(getattrofunc)0, /* tp_getattro */
1561
(setattrofunc)0, /* tp_setattro */
1562
(PyBufferProcs*)0, /* tp_as_buffer */
1563
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
1564
NULL, /* Documentation string */
1565
(traverseproc)0, /* tp_traverse */
1566
(inquiry)0, /* tp_clear */
1567
(richcmpfunc)0, /* tp_richcompare */
1568
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
1569
(getiterfunc)0, /* tp_iter */
1570
(iternextfunc)0, /* tp_iternext */
1571
(struct PyMethodDef*)_PyChamplainMapSourceFactory_methods, /* tp_methods */
1572
(struct PyMemberDef*)0, /* tp_members */
1573
(struct PyGetSetDef*)0, /* tp_getset */
1576
(descrgetfunc)0, /* tp_descr_get */
1577
(descrsetfunc)0, /* tp_descr_set */
1578
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
1579
(initproc)0, /* tp_init */
1580
(allocfunc)0, /* tp_alloc */
1581
(newfunc)0, /* tp_new */
1582
(freefunc)0, /* tp_free */
1583
(inquiry)0 /* tp_is_gc */
1588
/* ----------- ChamplainMarker ----------- */
1591
_wrap_champlain_marker_new(PyGObject *self, PyObject *args, PyObject *kwargs)
1593
static char* kwlist[] = { NULL };
1595
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
1596
":champlain.Marker.__init__",
1600
pygobject_constructv(self, 0, NULL);
1604
"could not create champlain.Marker object");
1611
_wrap_champlain_marker_set_text(PyGObject *self, PyObject *args, PyObject *kwargs)
1613
static char *kwlist[] = { "text", NULL };
1616
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainMarker.set_text", kwlist, &text))
1619
champlain_marker_set_text(CHAMPLAIN_MARKER(self->obj), text);
1626
_wrap_champlain_marker_set_image(PyGObject *self, PyObject *args, PyObject *kwargs)
1628
static char *kwlist[] = { "image", NULL };
1631
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainMarker.set_image", kwlist, &PyClutterActor_Type, &image))
1634
champlain_marker_set_image(CHAMPLAIN_MARKER(self->obj), CLUTTER_ACTOR(image->obj));
1641
_wrap_champlain_marker_set_use_markup(PyGObject *self, PyObject *args, PyObject *kwargs)
1643
static char *kwlist[] = { "use_markup", NULL };
1646
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainMarker.set_use_markup", kwlist, &use_markup))
1649
champlain_marker_set_use_markup(CHAMPLAIN_MARKER(self->obj), use_markup);
1656
_wrap_champlain_marker_set_alignment(PyGObject *self, PyObject *args, PyObject *kwargs)
1658
static char *kwlist[] = { "alignment", NULL };
1659
PyObject *py_alignment = NULL;
1660
PangoAlignment alignment;
1662
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainMarker.set_alignment", kwlist, &py_alignment))
1664
if (pyg_enum_get_value(PANGO_TYPE_ALIGNMENT, py_alignment, (gpointer)&alignment))
1667
champlain_marker_set_alignment(CHAMPLAIN_MARKER(self->obj), alignment);
1674
_wrap_champlain_marker_set_color(PyGObject *self, PyObject *args, PyObject *kwargs)
1676
static char *kwlist[] = { "color", NULL };
1677
ClutterColor *color = NULL;
1680
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainMarker.set_color", kwlist, &py_color))
1682
if (pyg_boxed_check(py_color, CLUTTER_TYPE_COLOR))
1683
color = pyg_boxed_get(py_color, ClutterColor);
1685
PyErr_SetString(PyExc_TypeError, "color should be a ClutterColor");
1689
champlain_marker_set_color(CHAMPLAIN_MARKER(self->obj), color);
1696
_wrap_champlain_marker_set_text_color(PyGObject *self, PyObject *args, PyObject *kwargs)
1698
static char *kwlist[] = { "color", NULL };
1699
ClutterColor *color = NULL;
1702
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainMarker.set_text_color", kwlist, &py_color))
1704
if (pyg_boxed_check(py_color, CLUTTER_TYPE_COLOR))
1705
color = pyg_boxed_get(py_color, ClutterColor);
1707
PyErr_SetString(PyExc_TypeError, "color should be a ClutterColor");
1711
champlain_marker_set_text_color(CHAMPLAIN_MARKER(self->obj), color);
1718
_wrap_champlain_marker_set_font_name(PyGObject *self, PyObject *args, PyObject *kwargs)
1720
static char *kwlist[] = { "font_name", NULL };
1723
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainMarker.set_font_name", kwlist, &font_name))
1726
champlain_marker_set_font_name(CHAMPLAIN_MARKER(self->obj), font_name);
1733
_wrap_champlain_marker_set_wrap(PyGObject *self, PyObject *args, PyObject *kwargs)
1735
static char *kwlist[] = { "wrap", NULL };
1738
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainMarker.set_wrap", kwlist, &wrap))
1741
champlain_marker_set_wrap(CHAMPLAIN_MARKER(self->obj), wrap);
1748
_wrap_champlain_marker_set_wrap_mode(PyGObject *self, PyObject *args, PyObject *kwargs)
1750
static char *kwlist[] = { "wrap_mode", NULL };
1751
PyObject *py_wrap_mode = NULL;
1752
PangoWrapMode wrap_mode;
1754
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainMarker.set_wrap_mode", kwlist, &py_wrap_mode))
1756
if (pyg_enum_get_value(PANGO_TYPE_WRAP_MODE, py_wrap_mode, (gpointer)&wrap_mode))
1759
champlain_marker_set_wrap_mode(CHAMPLAIN_MARKER(self->obj), wrap_mode);
1766
_wrap_champlain_marker_set_attributes(PyGObject *self, PyObject *args, PyObject *kwargs)
1768
static char *kwlist[] = { "list", NULL };
1770
PangoAttrList *list = NULL;
1772
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainMarker.set_attributes", kwlist, &py_list))
1774
if (pyg_boxed_check(py_list, PANGO_TYPE_ATTR_LIST))
1775
list = pyg_boxed_get(py_list, PangoAttrList);
1777
PyErr_SetString(PyExc_TypeError, "list should be a PangoAttrList");
1781
champlain_marker_set_attributes(CHAMPLAIN_MARKER(self->obj), list);
1788
_wrap_champlain_marker_set_single_line_mode(PyGObject *self, PyObject *args, PyObject *kwargs)
1790
static char *kwlist[] = { "mode", NULL };
1793
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainMarker.set_single_line_mode", kwlist, &mode))
1796
champlain_marker_set_single_line_mode(CHAMPLAIN_MARKER(self->obj), mode);
1803
_wrap_champlain_marker_set_ellipsize(PyGObject *self, PyObject *args, PyObject *kwargs)
1805
static char *kwlist[] = { "mode", NULL };
1806
PyObject *py_mode = NULL;
1807
PangoEllipsizeMode mode;
1809
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainMarker.set_ellipsize", kwlist, &py_mode))
1811
if (pyg_enum_get_value(PANGO_TYPE_ELLIPSIZE_MODE, py_mode, (gpointer)&mode))
1814
champlain_marker_set_ellipsize(CHAMPLAIN_MARKER(self->obj), mode);
1821
_wrap_champlain_marker_set_draw_background(PyGObject *self, PyObject *args, PyObject *kwargs)
1823
static char *kwlist[] = { "background", NULL };
1826
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainMarker.set_draw_background", kwlist, &background))
1829
champlain_marker_set_draw_background(CHAMPLAIN_MARKER(self->obj), background);
1836
_wrap_champlain_marker_get_use_markup(PyGObject *self)
1841
ret = champlain_marker_get_use_markup(CHAMPLAIN_MARKER(self->obj));
1843
return PyBool_FromLong(ret);
1848
_wrap_champlain_marker_get_text(PyGObject *self)
1853
ret = champlain_marker_get_text(CHAMPLAIN_MARKER(self->obj));
1856
return PyString_FromString(ret);
1862
_wrap_champlain_marker_get_image(PyGObject *self)
1867
ret = champlain_marker_get_image(CHAMPLAIN_MARKER(self->obj));
1869
/* pygobject_new handles NULL checking */
1870
return pygobject_new((GObject *)ret);
1874
_wrap_champlain_marker_get_alignment(PyGObject *self)
1879
ret = champlain_marker_get_alignment(CHAMPLAIN_MARKER(self->obj));
1881
return pyg_enum_from_gtype(PANGO_TYPE_ALIGNMENT, ret);
1885
_wrap_champlain_marker_get_color(PyGObject *self)
1890
ret = champlain_marker_get_color(CHAMPLAIN_MARKER(self->obj));
1892
/* pyg_boxed_new handles NULL checking */
1893
return pyg_boxed_new(CLUTTER_TYPE_COLOR, ret, TRUE, TRUE);
1897
_wrap_champlain_marker_get_text_color(PyGObject *self)
1902
ret = champlain_marker_get_text_color(CHAMPLAIN_MARKER(self->obj));
1904
/* pyg_boxed_new handles NULL checking */
1905
return pyg_boxed_new(CLUTTER_TYPE_COLOR, ret, TRUE, TRUE);
1909
_wrap_champlain_marker_get_font_name(PyGObject *self)
1914
ret = champlain_marker_get_font_name(CHAMPLAIN_MARKER(self->obj));
1917
return PyString_FromString(ret);
1923
_wrap_champlain_marker_get_wrap(PyGObject *self)
1928
ret = champlain_marker_get_wrap(CHAMPLAIN_MARKER(self->obj));
1930
return PyBool_FromLong(ret);
1935
_wrap_champlain_marker_get_wrap_mode(PyGObject *self)
1940
ret = champlain_marker_get_wrap_mode(CHAMPLAIN_MARKER(self->obj));
1942
return pyg_enum_from_gtype(PANGO_TYPE_WRAP_MODE, ret);
1946
_wrap_champlain_marker_get_ellipsize(PyGObject *self)
1951
ret = champlain_marker_get_ellipsize(CHAMPLAIN_MARKER(self->obj));
1953
return pyg_enum_from_gtype(PANGO_TYPE_ELLIPSIZE_MODE, ret);
1957
_wrap_champlain_marker_get_single_line_mode(PyGObject *self)
1962
ret = champlain_marker_get_single_line_mode(CHAMPLAIN_MARKER(self->obj));
1964
return PyBool_FromLong(ret);
1969
_wrap_champlain_marker_get_draw_background(PyGObject *self)
1974
ret = champlain_marker_get_draw_background(CHAMPLAIN_MARKER(self->obj));
1976
return PyBool_FromLong(ret);
1980
static const PyMethodDef _PyChamplainMarker_methods[] = {
1981
{ "set_text", (PyCFunction)_wrap_champlain_marker_set_text, METH_VARARGS|METH_KEYWORDS,
1983
{ "set_image", (PyCFunction)_wrap_champlain_marker_set_image, METH_VARARGS|METH_KEYWORDS,
1985
{ "set_use_markup", (PyCFunction)_wrap_champlain_marker_set_use_markup, METH_VARARGS|METH_KEYWORDS,
1987
{ "set_alignment", (PyCFunction)_wrap_champlain_marker_set_alignment, METH_VARARGS|METH_KEYWORDS,
1989
{ "set_color", (PyCFunction)_wrap_champlain_marker_set_color, METH_VARARGS|METH_KEYWORDS,
1991
{ "set_text_color", (PyCFunction)_wrap_champlain_marker_set_text_color, METH_VARARGS|METH_KEYWORDS,
1993
{ "set_font_name", (PyCFunction)_wrap_champlain_marker_set_font_name, METH_VARARGS|METH_KEYWORDS,
1995
{ "set_wrap", (PyCFunction)_wrap_champlain_marker_set_wrap, METH_VARARGS|METH_KEYWORDS,
1997
{ "set_wrap_mode", (PyCFunction)_wrap_champlain_marker_set_wrap_mode, METH_VARARGS|METH_KEYWORDS,
1999
{ "set_attributes", (PyCFunction)_wrap_champlain_marker_set_attributes, METH_VARARGS|METH_KEYWORDS,
2001
{ "set_single_line_mode", (PyCFunction)_wrap_champlain_marker_set_single_line_mode, METH_VARARGS|METH_KEYWORDS,
2003
{ "set_ellipsize", (PyCFunction)_wrap_champlain_marker_set_ellipsize, METH_VARARGS|METH_KEYWORDS,
2005
{ "set_draw_background", (PyCFunction)_wrap_champlain_marker_set_draw_background, METH_VARARGS|METH_KEYWORDS,
2007
{ "get_use_markup", (PyCFunction)_wrap_champlain_marker_get_use_markup, METH_NOARGS,
2009
{ "get_text", (PyCFunction)_wrap_champlain_marker_get_text, METH_NOARGS,
2011
{ "get_image", (PyCFunction)_wrap_champlain_marker_get_image, METH_NOARGS,
2013
{ "get_alignment", (PyCFunction)_wrap_champlain_marker_get_alignment, METH_NOARGS,
2015
{ "get_color", (PyCFunction)_wrap_champlain_marker_get_color, METH_NOARGS,
2017
{ "get_text_color", (PyCFunction)_wrap_champlain_marker_get_text_color, METH_NOARGS,
2019
{ "get_font_name", (PyCFunction)_wrap_champlain_marker_get_font_name, METH_NOARGS,
2021
{ "get_wrap", (PyCFunction)_wrap_champlain_marker_get_wrap, METH_NOARGS,
2023
{ "get_wrap_mode", (PyCFunction)_wrap_champlain_marker_get_wrap_mode, METH_NOARGS,
2025
{ "get_ellipsize", (PyCFunction)_wrap_champlain_marker_get_ellipsize, METH_NOARGS,
2027
{ "get_single_line_mode", (PyCFunction)_wrap_champlain_marker_get_single_line_mode, METH_NOARGS,
2029
{ "get_draw_background", (PyCFunction)_wrap_champlain_marker_get_draw_background, METH_NOARGS,
2031
{ NULL, NULL, 0, NULL }
2034
PyTypeObject G_GNUC_INTERNAL PyChamplainMarker_Type = {
2035
PyObject_HEAD_INIT(NULL)
2037
"champlain.Marker", /* tp_name */
2038
sizeof(PyGObject), /* tp_basicsize */
2039
0, /* tp_itemsize */
2041
(destructor)0, /* tp_dealloc */
2042
(printfunc)0, /* tp_print */
2043
(getattrfunc)0, /* tp_getattr */
2044
(setattrfunc)0, /* tp_setattr */
2045
(cmpfunc)0, /* tp_compare */
2046
(reprfunc)0, /* tp_repr */
2047
(PyNumberMethods*)0, /* tp_as_number */
2048
(PySequenceMethods*)0, /* tp_as_sequence */
2049
(PyMappingMethods*)0, /* tp_as_mapping */
2050
(hashfunc)0, /* tp_hash */
2051
(ternaryfunc)0, /* tp_call */
2052
(reprfunc)0, /* tp_str */
2053
(getattrofunc)0, /* tp_getattro */
2054
(setattrofunc)0, /* tp_setattro */
2055
(PyBufferProcs*)0, /* tp_as_buffer */
2056
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
2057
NULL, /* Documentation string */
2058
(traverseproc)0, /* tp_traverse */
2059
(inquiry)0, /* tp_clear */
2060
(richcmpfunc)0, /* tp_richcompare */
2061
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
2062
(getiterfunc)0, /* tp_iter */
2063
(iternextfunc)0, /* tp_iternext */
2064
(struct PyMethodDef*)_PyChamplainMarker_methods, /* tp_methods */
2065
(struct PyMemberDef*)0, /* tp_members */
2066
(struct PyGetSetDef*)0, /* tp_getset */
2069
(descrgetfunc)0, /* tp_descr_get */
2070
(descrsetfunc)0, /* tp_descr_set */
2071
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
2072
(initproc)_wrap_champlain_marker_new, /* tp_init */
2073
(allocfunc)0, /* tp_alloc */
2074
(newfunc)0, /* tp_new */
2075
(freefunc)0, /* tp_free */
2076
(inquiry)0 /* tp_is_gc */
2081
/* ----------- ChamplainNetworkMapSource ----------- */
2084
_wrap_champlain_network_map_source_get_tile_uri(PyGObject *self, PyObject *args, PyObject *kwargs)
2086
static char *kwlist[] = { "x", "y", "z", NULL };
2090
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"iii:ChamplainNetworkMapSource.get_tile_uri", kwlist, &x, &y, &z))
2093
ret = champlain_network_map_source_get_tile_uri(CHAMPLAIN_NETWORK_MAP_SOURCE(self->obj), x, y, z);
2096
PyObject *py_ret = PyString_FromString(ret);
2105
_wrap_champlain_network_map_source_set_uri_format(PyGObject *self, PyObject *args, PyObject *kwargs)
2107
static char *kwlist[] = { "uri_format", NULL };
2110
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainNetworkMapSource.set_uri_format", kwlist, &uri_format))
2113
champlain_network_map_source_set_uri_format(CHAMPLAIN_NETWORK_MAP_SOURCE(self->obj), uri_format);
2119
static const PyMethodDef _PyChamplainNetworkMapSource_methods[] = {
2120
{ "get_tile_uri", (PyCFunction)_wrap_champlain_network_map_source_get_tile_uri, METH_VARARGS|METH_KEYWORDS,
2122
{ "set_uri_format", (PyCFunction)_wrap_champlain_network_map_source_set_uri_format, METH_VARARGS|METH_KEYWORDS,
2124
{ NULL, NULL, 0, NULL }
2127
PyTypeObject G_GNUC_INTERNAL PyChamplainNetworkMapSource_Type = {
2128
PyObject_HEAD_INIT(NULL)
2130
"champlain.NetworkMapSource", /* tp_name */
2131
sizeof(PyGObject), /* tp_basicsize */
2132
0, /* tp_itemsize */
2134
(destructor)0, /* tp_dealloc */
2135
(printfunc)0, /* tp_print */
2136
(getattrfunc)0, /* tp_getattr */
2137
(setattrfunc)0, /* tp_setattr */
2138
(cmpfunc)0, /* tp_compare */
2139
(reprfunc)0, /* tp_repr */
2140
(PyNumberMethods*)0, /* tp_as_number */
2141
(PySequenceMethods*)0, /* tp_as_sequence */
2142
(PyMappingMethods*)0, /* tp_as_mapping */
2143
(hashfunc)0, /* tp_hash */
2144
(ternaryfunc)0, /* tp_call */
2145
(reprfunc)0, /* tp_str */
2146
(getattrofunc)0, /* tp_getattro */
2147
(setattrofunc)0, /* tp_setattro */
2148
(PyBufferProcs*)0, /* tp_as_buffer */
2149
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
2150
NULL, /* Documentation string */
2151
(traverseproc)0, /* tp_traverse */
2152
(inquiry)0, /* tp_clear */
2153
(richcmpfunc)0, /* tp_richcompare */
2154
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
2155
(getiterfunc)0, /* tp_iter */
2156
(iternextfunc)0, /* tp_iternext */
2157
(struct PyMethodDef*)_PyChamplainNetworkMapSource_methods, /* tp_methods */
2158
(struct PyMemberDef*)0, /* tp_members */
2159
(struct PyGetSetDef*)0, /* tp_getset */
2162
(descrgetfunc)0, /* tp_descr_get */
2163
(descrsetfunc)0, /* tp_descr_set */
2164
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
2165
(initproc)0, /* tp_init */
2166
(allocfunc)0, /* tp_alloc */
2167
(newfunc)0, /* tp_new */
2168
(freefunc)0, /* tp_free */
2169
(inquiry)0 /* tp_is_gc */
2174
/* ----------- ChamplainPolygon ----------- */
2177
_wrap_champlain_polygon_new(PyGObject *self, PyObject *args, PyObject *kwargs)
2179
static char* kwlist[] = { NULL };
2181
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
2182
":champlain.Polygon.__init__",
2186
pygobject_constructv(self, 0, NULL);
2190
"could not create champlain.Polygon object");
2197
_wrap_champlain_polygon_append_point(PyGObject *self, PyObject *args, PyObject *kwargs)
2199
static char *kwlist[] = { "lat", "lon", NULL };
2201
ChamplainPoint *ret;
2203
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"dd:ChamplainPolygon.append_point", kwlist, &lat, &lon))
2206
ret = champlain_polygon_append_point(CHAMPLAIN_POLYGON(self->obj), lat, lon);
2208
/* pyg_boxed_new handles NULL checking */
2209
return pyg_boxed_new(CHAMPLAIN_TYPE_POINT, ret, TRUE, TRUE);
2213
_wrap_champlain_polygon_insert_point(PyGObject *self, PyObject *args, PyObject *kwargs)
2215
static char *kwlist[] = { "lat", "lon", "pos", NULL };
2218
ChamplainPoint *ret;
2220
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"ddi:ChamplainPolygon.insert_point", kwlist, &lat, &lon, &pos))
2223
ret = champlain_polygon_insert_point(CHAMPLAIN_POLYGON(self->obj), lat, lon, pos);
2225
/* pyg_boxed_new handles NULL checking */
2226
return pyg_boxed_new(CHAMPLAIN_TYPE_POINT, ret, TRUE, TRUE);
2230
_wrap_champlain_polygon_remove_point(PyGObject *self, PyObject *args, PyObject *kwargs)
2232
static char *kwlist[] = { "point", NULL };
2234
ChamplainPoint *point = NULL;
2236
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainPolygon.remove_point", kwlist, &py_point))
2238
if (pyg_boxed_check(py_point, CHAMPLAIN_TYPE_POINT))
2239
point = pyg_boxed_get(py_point, ChamplainPoint);
2241
PyErr_SetString(PyExc_TypeError, "point should be a ChamplainPoint");
2245
champlain_polygon_remove_point(CHAMPLAIN_POLYGON(self->obj), point);
2252
_wrap_champlain_polygon_clear_points(PyGObject *self)
2255
champlain_polygon_clear_points(CHAMPLAIN_POLYGON(self->obj));
2261
#line 98 "pychamplain.override"
2263
_wrap_champlain_polygon_get_points(PyGObject *self, PyObject *args)
2265
GList *iter, *list = champlain_polygon_get_points(CHAMPLAIN_POLYGON(self->obj));
2266
PyObject *ret = PyList_New(0);
2269
for(iter = list; iter != NULL; iter = iter->next) {
2270
ChamplainPoint *point = (ChamplainPoint *) iter->data;
2271
pypoint = pyg_boxed_new(CHAMPLAIN_TYPE_POINT, point, TRUE, TRUE);
2272
PyList_Append(ret, pypoint);
2277
#line 2278 "pychamplain.c"
2281
_wrap_champlain_polygon_set_fill_color(PyGObject *self, PyObject *args, PyObject *kwargs)
2283
static char *kwlist[] = { "color", NULL };
2284
ClutterColor *color = NULL;
2287
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainPolygon.set_fill_color", kwlist, &py_color))
2289
if (pyg_boxed_check(py_color, CLUTTER_TYPE_COLOR))
2290
color = pyg_boxed_get(py_color, ClutterColor);
2292
PyErr_SetString(PyExc_TypeError, "color should be a ClutterColor");
2296
champlain_polygon_set_fill_color(CHAMPLAIN_POLYGON(self->obj), color);
2303
_wrap_champlain_polygon_set_stroke_color(PyGObject *self, PyObject *args, PyObject *kwargs)
2305
static char *kwlist[] = { "color", NULL };
2306
ClutterColor *color = NULL;
2309
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainPolygon.set_stroke_color", kwlist, &py_color))
2311
if (pyg_boxed_check(py_color, CLUTTER_TYPE_COLOR))
2312
color = pyg_boxed_get(py_color, ClutterColor);
2314
PyErr_SetString(PyExc_TypeError, "color should be a ClutterColor");
2318
champlain_polygon_set_stroke_color(CHAMPLAIN_POLYGON(self->obj), color);
2325
_wrap_champlain_polygon_get_fill_color(PyGObject *self)
2330
ret = champlain_polygon_get_fill_color(CHAMPLAIN_POLYGON(self->obj));
2332
/* pyg_boxed_new handles NULL checking */
2333
return pyg_boxed_new(CLUTTER_TYPE_COLOR, ret, TRUE, TRUE);
2337
_wrap_champlain_polygon_get_stroke_color(PyGObject *self)
2342
ret = champlain_polygon_get_stroke_color(CHAMPLAIN_POLYGON(self->obj));
2344
/* pyg_boxed_new handles NULL checking */
2345
return pyg_boxed_new(CLUTTER_TYPE_COLOR, ret, TRUE, TRUE);
2349
_wrap_champlain_polygon_get_fill(PyGObject *self)
2354
ret = champlain_polygon_get_fill(CHAMPLAIN_POLYGON(self->obj));
2356
return PyBool_FromLong(ret);
2361
_wrap_champlain_polygon_set_fill(PyGObject *self, PyObject *args, PyObject *kwargs)
2363
static char *kwlist[] = { "value", NULL };
2366
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainPolygon.set_fill", kwlist, &value))
2369
champlain_polygon_set_fill(CHAMPLAIN_POLYGON(self->obj), value);
2376
_wrap_champlain_polygon_get_stroke(PyGObject *self)
2381
ret = champlain_polygon_get_stroke(CHAMPLAIN_POLYGON(self->obj));
2383
return PyBool_FromLong(ret);
2388
_wrap_champlain_polygon_set_stroke(PyGObject *self, PyObject *args, PyObject *kwargs)
2390
static char *kwlist[] = { "value", NULL };
2393
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainPolygon.set_stroke", kwlist, &value))
2396
champlain_polygon_set_stroke(CHAMPLAIN_POLYGON(self->obj), value);
2403
_wrap_champlain_polygon_set_stroke_width(PyGObject *self, PyObject *args, PyObject *kwargs)
2405
static char *kwlist[] = { "value", NULL };
2408
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"d:ChamplainPolygon.set_stroke_width", kwlist, &value))
2411
champlain_polygon_set_stroke_width(CHAMPLAIN_POLYGON(self->obj), value);
2418
_wrap_champlain_polygon_get_stroke_width(PyGObject *self)
2423
ret = champlain_polygon_get_stroke_width(CHAMPLAIN_POLYGON(self->obj));
2425
return PyFloat_FromDouble(ret);
2429
_wrap_champlain_polygon_show(PyGObject *self)
2432
champlain_polygon_show(CHAMPLAIN_POLYGON(self->obj));
2439
_wrap_champlain_polygon_hide(PyGObject *self)
2442
champlain_polygon_hide(CHAMPLAIN_POLYGON(self->obj));
2448
static const PyMethodDef _PyChamplainPolygon_methods[] = {
2449
{ "append_point", (PyCFunction)_wrap_champlain_polygon_append_point, METH_VARARGS|METH_KEYWORDS,
2451
{ "insert_point", (PyCFunction)_wrap_champlain_polygon_insert_point, METH_VARARGS|METH_KEYWORDS,
2453
{ "remove_point", (PyCFunction)_wrap_champlain_polygon_remove_point, METH_VARARGS|METH_KEYWORDS,
2455
{ "clear_points", (PyCFunction)_wrap_champlain_polygon_clear_points, METH_NOARGS,
2457
{ "get_points", (PyCFunction)_wrap_champlain_polygon_get_points, METH_VARARGS|METH_KEYWORDS,
2459
{ "set_fill_color", (PyCFunction)_wrap_champlain_polygon_set_fill_color, METH_VARARGS|METH_KEYWORDS,
2461
{ "set_stroke_color", (PyCFunction)_wrap_champlain_polygon_set_stroke_color, METH_VARARGS|METH_KEYWORDS,
2463
{ "get_fill_color", (PyCFunction)_wrap_champlain_polygon_get_fill_color, METH_NOARGS,
2465
{ "get_stroke_color", (PyCFunction)_wrap_champlain_polygon_get_stroke_color, METH_NOARGS,
2467
{ "get_fill", (PyCFunction)_wrap_champlain_polygon_get_fill, METH_NOARGS,
2469
{ "set_fill", (PyCFunction)_wrap_champlain_polygon_set_fill, METH_VARARGS|METH_KEYWORDS,
2471
{ "get_stroke", (PyCFunction)_wrap_champlain_polygon_get_stroke, METH_NOARGS,
2473
{ "set_stroke", (PyCFunction)_wrap_champlain_polygon_set_stroke, METH_VARARGS|METH_KEYWORDS,
2475
{ "set_stroke_width", (PyCFunction)_wrap_champlain_polygon_set_stroke_width, METH_VARARGS|METH_KEYWORDS,
2477
{ "get_stroke_width", (PyCFunction)_wrap_champlain_polygon_get_stroke_width, METH_NOARGS,
2479
{ "show", (PyCFunction)_wrap_champlain_polygon_show, METH_NOARGS,
2481
{ "hide", (PyCFunction)_wrap_champlain_polygon_hide, METH_NOARGS,
2483
{ NULL, NULL, 0, NULL }
2486
PyTypeObject G_GNUC_INTERNAL PyChamplainPolygon_Type = {
2487
PyObject_HEAD_INIT(NULL)
2489
"champlain.Polygon", /* tp_name */
2490
sizeof(PyGObject), /* tp_basicsize */
2491
0, /* tp_itemsize */
2493
(destructor)0, /* tp_dealloc */
2494
(printfunc)0, /* tp_print */
2495
(getattrfunc)0, /* tp_getattr */
2496
(setattrfunc)0, /* tp_setattr */
2497
(cmpfunc)0, /* tp_compare */
2498
(reprfunc)0, /* tp_repr */
2499
(PyNumberMethods*)0, /* tp_as_number */
2500
(PySequenceMethods*)0, /* tp_as_sequence */
2501
(PyMappingMethods*)0, /* tp_as_mapping */
2502
(hashfunc)0, /* tp_hash */
2503
(ternaryfunc)0, /* tp_call */
2504
(reprfunc)0, /* tp_str */
2505
(getattrofunc)0, /* tp_getattro */
2506
(setattrofunc)0, /* tp_setattro */
2507
(PyBufferProcs*)0, /* tp_as_buffer */
2508
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
2509
NULL, /* Documentation string */
2510
(traverseproc)0, /* tp_traverse */
2511
(inquiry)0, /* tp_clear */
2512
(richcmpfunc)0, /* tp_richcompare */
2513
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
2514
(getiterfunc)0, /* tp_iter */
2515
(iternextfunc)0, /* tp_iternext */
2516
(struct PyMethodDef*)_PyChamplainPolygon_methods, /* tp_methods */
2517
(struct PyMemberDef*)0, /* tp_members */
2518
(struct PyGetSetDef*)0, /* tp_getset */
2521
(descrgetfunc)0, /* tp_descr_get */
2522
(descrsetfunc)0, /* tp_descr_set */
2523
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
2524
(initproc)_wrap_champlain_polygon_new, /* tp_init */
2525
(allocfunc)0, /* tp_alloc */
2526
(newfunc)0, /* tp_new */
2527
(freefunc)0, /* tp_free */
2528
(inquiry)0 /* tp_is_gc */
2533
/* ----------- ChamplainTile ----------- */
2536
_wrap_champlain_tile_new(PyGObject *self, PyObject *args, PyObject *kwargs)
2538
static char* kwlist[] = { NULL };
2540
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
2541
":champlain.Tile.__init__",
2545
pygobject_constructv(self, 0, NULL);
2549
"could not create champlain.Tile object");
2556
_wrap_champlain_tile_get_x(PyGObject *self)
2561
ret = champlain_tile_get_x(CHAMPLAIN_TILE(self->obj));
2563
return PyInt_FromLong(ret);
2567
_wrap_champlain_tile_get_y(PyGObject *self)
2572
ret = champlain_tile_get_y(CHAMPLAIN_TILE(self->obj));
2574
return PyInt_FromLong(ret);
2578
_wrap_champlain_tile_get_zoom_level(PyGObject *self)
2583
ret = champlain_tile_get_zoom_level(CHAMPLAIN_TILE(self->obj));
2585
return PyInt_FromLong(ret);
2589
_wrap_champlain_tile_get_size(PyGObject *self)
2594
ret = champlain_tile_get_size(CHAMPLAIN_TILE(self->obj));
2596
return PyLong_FromUnsignedLong(ret);
2600
_wrap_champlain_tile_get_state(PyGObject *self)
2605
ret = champlain_tile_get_state(CHAMPLAIN_TILE(self->obj));
2607
return pyg_enum_from_gtype(CHAMPLAIN_TYPE_STATE, ret);
2611
_wrap_champlain_tile_get_uri(PyGObject *self)
2616
ret = champlain_tile_get_uri(CHAMPLAIN_TILE(self->obj));
2619
return PyString_FromString(ret);
2625
_wrap_champlain_tile_get_filename(PyGObject *self)
2630
ret = champlain_tile_get_filename(CHAMPLAIN_TILE(self->obj));
2633
return PyString_FromString(ret);
2639
_wrap_champlain_tile_get_actor(PyGObject *self)
2644
ret = champlain_tile_get_actor(CHAMPLAIN_TILE(self->obj));
2646
/* pygobject_new handles NULL checking */
2647
return pygobject_new((GObject *)ret);
2651
_wrap_champlain_tile_get_content(PyGObject *self)
2656
ret = champlain_tile_get_content(CHAMPLAIN_TILE(self->obj));
2658
/* pygobject_new handles NULL checking */
2659
return pygobject_new((GObject *)ret);
2662
#line 218 "pychamplain.override"
2664
_wrap_champlain_tile_get_modified_time(PyGObject *self, PyObject *args)
2666
const GTimeVal *modified_time = NULL;
2668
modified_time = champlain_tile_get_modified_time(CHAMPLAIN_TILE(self->obj));
2669
if (modified_time == NULL){
2674
return PyFloat_FromDouble((double)modified_time->tv_sec + \
2675
(double)modified_time->tv_usec * 0.000001);
2677
#line 2678 "pychamplain.c"
2681
_wrap_champlain_tile_get_modified_time_string(PyGObject *self)
2686
ret = champlain_tile_get_modified_time_string(CHAMPLAIN_TILE(self->obj));
2689
PyObject *py_ret = PyString_FromString(ret);
2698
_wrap_champlain_tile_get_etag(PyGObject *self)
2703
ret = champlain_tile_get_etag(CHAMPLAIN_TILE(self->obj));
2706
return PyString_FromString(ret);
2712
_wrap_champlain_tile_set_x(PyGObject *self, PyObject *args, PyObject *kwargs)
2714
static char *kwlist[] = { "x", NULL };
2717
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainTile.set_x", kwlist, &x))
2720
champlain_tile_set_x(CHAMPLAIN_TILE(self->obj), x);
2727
_wrap_champlain_tile_set_y(PyGObject *self, PyObject *args, PyObject *kwargs)
2729
static char *kwlist[] = { "y", NULL };
2732
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainTile.set_y", kwlist, &y))
2735
champlain_tile_set_y(CHAMPLAIN_TILE(self->obj), y);
2742
_wrap_champlain_tile_set_zoom_level(PyGObject *self, PyObject *args, PyObject *kwargs)
2744
static char *kwlist[] = { "zoom_level", NULL };
2747
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainTile.set_zoom_level", kwlist, &zoom_level))
2750
champlain_tile_set_zoom_level(CHAMPLAIN_TILE(self->obj), zoom_level);
2757
_wrap_champlain_tile_set_size(PyGObject *self, PyObject *args, PyObject *kwargs)
2759
static char *kwlist[] = { "size", NULL };
2760
PyObject *py_size = NULL;
2763
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainTile.set_size", kwlist, &py_size))
2766
if (PyLong_Check(py_size))
2767
size = PyLong_AsUnsignedLong(py_size);
2768
else if (PyInt_Check(py_size))
2769
size = PyInt_AsLong(py_size);
2771
PyErr_SetString(PyExc_TypeError, "Parameter 'size' must be an int or a long");
2772
if (PyErr_Occurred())
2776
champlain_tile_set_size(CHAMPLAIN_TILE(self->obj), size);
2783
_wrap_champlain_tile_set_state(PyGObject *self, PyObject *args, PyObject *kwargs)
2785
static char *kwlist[] = { "state", NULL };
2786
PyObject *py_state = NULL;
2787
ChamplainState state;
2789
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainTile.set_state", kwlist, &py_state))
2791
if (pyg_enum_get_value(CHAMPLAIN_TYPE_STATE, py_state, (gpointer)&state))
2794
champlain_tile_set_state(CHAMPLAIN_TILE(self->obj), state);
2801
_wrap_champlain_tile_set_uri(PyGObject *self, PyObject *args, PyObject *kwargs)
2803
static char *kwlist[] = { "uri", NULL };
2806
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainTile.set_uri", kwlist, &uri))
2809
champlain_tile_set_uri(CHAMPLAIN_TILE(self->obj), uri);
2816
_wrap_champlain_tile_set_filename(PyGObject *self, PyObject *args, PyObject *kwargs)
2818
static char *kwlist[] = { "filename", NULL };
2821
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainTile.set_filename", kwlist, &filename))
2824
champlain_tile_set_filename(CHAMPLAIN_TILE(self->obj), filename);
2831
_wrap_champlain_tile_set_content(PyGObject *self, PyObject *args, PyObject *kwargs)
2833
static char *kwlist[] = { "actor", "fade_in", NULL };
2837
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!i:ChamplainTile.set_content", kwlist, &PyClutterActor_Type, &actor, &fade_in))
2840
champlain_tile_set_content(CHAMPLAIN_TILE(self->obj), CLUTTER_ACTOR(actor->obj), fade_in);
2847
_wrap_champlain_tile_set_etag(PyGObject *self, PyObject *args, PyObject *kwargs)
2849
static char *kwlist[] = { "etag", NULL };
2852
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:ChamplainTile.set_etag", kwlist, &etag))
2855
champlain_tile_set_etag(CHAMPLAIN_TILE(self->obj), etag);
2861
#line 189 "pychamplain.override"
2863
_wrap_champlain_tile_set_modified_time(PyGObject *self, PyObject *args, PyObject *kwargs)
2865
static char *kwlist[] = {"modified_time", NULL};
2866
double pymodified_time = 0.0;
2867
GTimeVal modified_time = {0,};
2869
if (!PyArg_ParseTupleAndKeywords(
2870
args, kwargs, "d:ChamplainTile.set_modified_time",
2871
kwlist, &pymodified_time))
2874
if (pymodified_time < 0.0) {
2875
PyErr_SetString(PyExc_ValueError, "modified_time must be >= 0.0");
2879
if (pymodified_time > 0.0) {
2880
modified_time.tv_sec = (glong) pymodified_time;
2881
modified_time.tv_usec = (glong)((pymodified_time - modified_time.tv_sec)
2884
champlain_tile_set_modified_time(CHAMPLAIN_TILE(self->obj), &modified_time);
2889
#line 2890 "pychamplain.c"
2892
static const PyMethodDef _PyChamplainTile_methods[] = {
2893
{ "get_x", (PyCFunction)_wrap_champlain_tile_get_x, METH_NOARGS,
2895
{ "get_y", (PyCFunction)_wrap_champlain_tile_get_y, METH_NOARGS,
2897
{ "get_zoom_level", (PyCFunction)_wrap_champlain_tile_get_zoom_level, METH_NOARGS,
2899
{ "get_size", (PyCFunction)_wrap_champlain_tile_get_size, METH_NOARGS,
2901
{ "get_state", (PyCFunction)_wrap_champlain_tile_get_state, METH_NOARGS,
2903
{ "get_uri", (PyCFunction)_wrap_champlain_tile_get_uri, METH_NOARGS,
2905
{ "get_filename", (PyCFunction)_wrap_champlain_tile_get_filename, METH_NOARGS,
2907
{ "get_actor", (PyCFunction)_wrap_champlain_tile_get_actor, METH_NOARGS,
2909
{ "get_content", (PyCFunction)_wrap_champlain_tile_get_content, METH_NOARGS,
2911
{ "get_modified_time", (PyCFunction)_wrap_champlain_tile_get_modified_time, METH_VARARGS|METH_KEYWORDS,
2913
{ "get_modified_time_string", (PyCFunction)_wrap_champlain_tile_get_modified_time_string, METH_NOARGS,
2915
{ "get_etag", (PyCFunction)_wrap_champlain_tile_get_etag, METH_NOARGS,
2917
{ "set_x", (PyCFunction)_wrap_champlain_tile_set_x, METH_VARARGS|METH_KEYWORDS,
2919
{ "set_y", (PyCFunction)_wrap_champlain_tile_set_y, METH_VARARGS|METH_KEYWORDS,
2921
{ "set_zoom_level", (PyCFunction)_wrap_champlain_tile_set_zoom_level, METH_VARARGS|METH_KEYWORDS,
2923
{ "set_size", (PyCFunction)_wrap_champlain_tile_set_size, METH_VARARGS|METH_KEYWORDS,
2925
{ "set_state", (PyCFunction)_wrap_champlain_tile_set_state, METH_VARARGS|METH_KEYWORDS,
2927
{ "set_uri", (PyCFunction)_wrap_champlain_tile_set_uri, METH_VARARGS|METH_KEYWORDS,
2929
{ "set_filename", (PyCFunction)_wrap_champlain_tile_set_filename, METH_VARARGS|METH_KEYWORDS,
2931
{ "set_content", (PyCFunction)_wrap_champlain_tile_set_content, METH_VARARGS|METH_KEYWORDS,
2933
{ "set_etag", (PyCFunction)_wrap_champlain_tile_set_etag, METH_VARARGS|METH_KEYWORDS,
2935
{ "set_modified_time", (PyCFunction)_wrap_champlain_tile_set_modified_time, METH_VARARGS|METH_KEYWORDS,
2937
{ NULL, NULL, 0, NULL }
2940
PyTypeObject G_GNUC_INTERNAL PyChamplainTile_Type = {
2941
PyObject_HEAD_INIT(NULL)
2943
"champlain.Tile", /* tp_name */
2944
sizeof(PyGObject), /* tp_basicsize */
2945
0, /* tp_itemsize */
2947
(destructor)0, /* tp_dealloc */
2948
(printfunc)0, /* tp_print */
2949
(getattrfunc)0, /* tp_getattr */
2950
(setattrfunc)0, /* tp_setattr */
2951
(cmpfunc)0, /* tp_compare */
2952
(reprfunc)0, /* tp_repr */
2953
(PyNumberMethods*)0, /* tp_as_number */
2954
(PySequenceMethods*)0, /* tp_as_sequence */
2955
(PyMappingMethods*)0, /* tp_as_mapping */
2956
(hashfunc)0, /* tp_hash */
2957
(ternaryfunc)0, /* tp_call */
2958
(reprfunc)0, /* tp_str */
2959
(getattrofunc)0, /* tp_getattro */
2960
(setattrofunc)0, /* tp_setattro */
2961
(PyBufferProcs*)0, /* tp_as_buffer */
2962
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
2963
NULL, /* Documentation string */
2964
(traverseproc)0, /* tp_traverse */
2965
(inquiry)0, /* tp_clear */
2966
(richcmpfunc)0, /* tp_richcompare */
2967
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
2968
(getiterfunc)0, /* tp_iter */
2969
(iternextfunc)0, /* tp_iternext */
2970
(struct PyMethodDef*)_PyChamplainTile_methods, /* tp_methods */
2971
(struct PyMemberDef*)0, /* tp_members */
2972
(struct PyGetSetDef*)0, /* tp_getset */
2975
(descrgetfunc)0, /* tp_descr_get */
2976
(descrsetfunc)0, /* tp_descr_set */
2977
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
2978
(initproc)_wrap_champlain_tile_new, /* tp_init */
2979
(allocfunc)0, /* tp_alloc */
2980
(newfunc)0, /* tp_new */
2981
(freefunc)0, /* tp_free */
2982
(inquiry)0 /* tp_is_gc */
2987
/* ----------- ChamplainView ----------- */
2990
_wrap_champlain_view_new(PyGObject *self, PyObject *args, PyObject *kwargs)
2992
static char* kwlist[] = { NULL };
2994
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
2995
":champlain.View.__init__",
2999
pygobject_constructv(self, 0, NULL);
3003
"could not create champlain.View object");
3010
_wrap_champlain_view_center_on(PyGObject *self, PyObject *args, PyObject *kwargs)
3012
static char *kwlist[] = { "latitude", "longitude", NULL };
3013
double latitude, longitude;
3015
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"dd:ChamplainView.center_on", kwlist, &latitude, &longitude))
3018
champlain_view_center_on(CHAMPLAIN_VIEW(self->obj), latitude, longitude);
3025
_wrap_champlain_view_go_to(PyGObject *self, PyObject *args, PyObject *kwargs)
3027
static char *kwlist[] = { "latitude", "longitude", NULL };
3028
double latitude, longitude;
3030
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"dd:ChamplainView.go_to", kwlist, &latitude, &longitude))
3033
champlain_view_go_to(CHAMPLAIN_VIEW(self->obj), latitude, longitude);
3040
_wrap_champlain_view_stop_go_to(PyGObject *self)
3043
champlain_view_stop_go_to(CHAMPLAIN_VIEW(self->obj));
3050
_wrap_champlain_view_zoom_in(PyGObject *self)
3053
champlain_view_zoom_in(CHAMPLAIN_VIEW(self->obj));
3060
_wrap_champlain_view_zoom_out(PyGObject *self)
3063
champlain_view_zoom_out(CHAMPLAIN_VIEW(self->obj));
3070
_wrap_champlain_view_set_zoom_level(PyGObject *self, PyObject *args, PyObject *kwargs)
3072
static char *kwlist[] = { "zoom_level", NULL };
3075
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainView.set_zoom_level", kwlist, &zoom_level))
3078
champlain_view_set_zoom_level(CHAMPLAIN_VIEW(self->obj), zoom_level);
3085
_wrap_champlain_view_set_min_zoom_level(PyGObject *self, PyObject *args, PyObject *kwargs)
3087
static char *kwlist[] = { "zoom_level", NULL };
3090
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainView.set_min_zoom_level", kwlist, &zoom_level))
3093
champlain_view_set_min_zoom_level(CHAMPLAIN_VIEW(self->obj), zoom_level);
3100
_wrap_champlain_view_set_max_zoom_level(PyGObject *self, PyObject *args, PyObject *kwargs)
3102
static char *kwlist[] = { "zoom_level", NULL };
3105
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainView.set_max_zoom_level", kwlist, &zoom_level))
3108
champlain_view_set_max_zoom_level(CHAMPLAIN_VIEW(self->obj), zoom_level);
3115
_wrap_champlain_view_ensure_visible(PyGObject *self, PyObject *args, PyObject *kwargs)
3117
static char *kwlist[] = { "lat1", "lon1", "lat2", "lon2", "animate", NULL };
3119
double lat1, lon1, lat2, lon2;
3121
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"ddddi:ChamplainView.ensure_visible", kwlist, &lat1, &lon1, &lat2, &lon2, &animate))
3124
champlain_view_ensure_visible(CHAMPLAIN_VIEW(self->obj), lat1, lon1, lat2, lon2, animate);
3130
#line 152 "pychamplain.override"
3132
_wrap_champlain_view_ensure_markers_visible(PyGObject *self, PyObject *args)
3134
PyObject *pymarkers, *pyanimate=0;
3135
gboolean animate = 1;
3137
ChamplainBaseMarker **markers = NULL;
3139
if (!PyArg_ParseTuple(args, "O|O:ChamplainView.ensure_markers_visible",
3140
&pymarkers, &pyanimate)){
3144
if (!PySequence_Check(pymarkers)){
3145
PyErr_SetString(PyExc_TypeError, "must be called with a list of markers as first argument");
3150
if (!PyObject_IsTrue(pyanimate))
3154
markers = g_new0(ChamplainBaseMarker*, PyList_Size(pymarkers)+2);
3155
for (i=0; i < PyList_Size(pymarkers); i++){
3156
ChamplainBaseMarker *marker = pyg_boxed_get(PyList_GetItem(pymarkers, i), ChamplainBaseMarker);
3157
markers[i] = marker;
3160
champlain_view_ensure_markers_visible(CHAMPLAIN_VIEW(self->obj), markers, animate);
3166
#line 3167 "pychamplain.c"
3170
_wrap_champlain_view_set_map_source(PyGObject *self, PyObject *args, PyObject *kwargs)
3172
static char *kwlist[] = { "map_source", NULL };
3173
PyGObject *map_source;
3175
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainView.set_map_source", kwlist, &PyChamplainMapSource_Type, &map_source))
3178
champlain_view_set_map_source(CHAMPLAIN_VIEW(self->obj), CHAMPLAIN_MAP_SOURCE(map_source->obj));
3185
_wrap_champlain_view_set_size(PyGObject *self, PyObject *args, PyObject *kwargs)
3187
static char *kwlist[] = { "width", "height", NULL };
3188
PyObject *py_width = NULL, *py_height = NULL;
3189
guint width = 0, height = 0;
3191
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"OO:ChamplainView.set_size", kwlist, &py_width, &py_height))
3194
if (PyLong_Check(py_width))
3195
width = PyLong_AsUnsignedLong(py_width);
3196
else if (PyInt_Check(py_width))
3197
width = PyInt_AsLong(py_width);
3199
PyErr_SetString(PyExc_TypeError, "Parameter 'width' must be an int or a long");
3200
if (PyErr_Occurred())
3204
if (PyLong_Check(py_height))
3205
height = PyLong_AsUnsignedLong(py_height);
3206
else if (PyInt_Check(py_height))
3207
height = PyInt_AsLong(py_height);
3209
PyErr_SetString(PyExc_TypeError, "Parameter 'height' must be an int or a long");
3210
if (PyErr_Occurred())
3214
champlain_view_set_size(CHAMPLAIN_VIEW(self->obj), width, height);
3221
_wrap_champlain_view_set_decel_rate(PyGObject *self, PyObject *args, PyObject *kwargs)
3223
static char *kwlist[] = { "rate", NULL };
3226
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"d:ChamplainView.set_decel_rate", kwlist, &rate))
3229
champlain_view_set_decel_rate(CHAMPLAIN_VIEW(self->obj), rate);
3236
_wrap_champlain_view_set_scroll_mode(PyGObject *self, PyObject *args, PyObject *kwargs)
3238
static char *kwlist[] = { "mode", NULL };
3239
ChamplainScrollMode mode;
3240
PyObject *py_mode = NULL;
3242
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainView.set_scroll_mode", kwlist, &py_mode))
3244
if (pyg_enum_get_value(CHAMPLAIN_TYPE_SCROLL_MODE, py_mode, (gpointer)&mode))
3247
champlain_view_set_scroll_mode(CHAMPLAIN_VIEW(self->obj), mode);
3254
_wrap_champlain_view_set_keep_center_on_resize(PyGObject *self, PyObject *args, PyObject *kwargs)
3256
static char *kwlist[] = { "value", NULL };
3259
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainView.set_keep_center_on_resize", kwlist, &value))
3262
champlain_view_set_keep_center_on_resize(CHAMPLAIN_VIEW(self->obj), value);
3269
_wrap_champlain_view_set_show_license(PyGObject *self, PyObject *args, PyObject *kwargs)
3271
static char *kwlist[] = { "value", NULL };
3274
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainView.set_show_license", kwlist, &value))
3277
champlain_view_set_show_license(CHAMPLAIN_VIEW(self->obj), value);
3284
_wrap_champlain_view_set_zoom_on_double_click(PyGObject *self, PyObject *args, PyObject *kwargs)
3286
static char *kwlist[] = { "value", NULL };
3289
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainView.set_zoom_on_double_click", kwlist, &value))
3292
champlain_view_set_zoom_on_double_click(CHAMPLAIN_VIEW(self->obj), value);
3299
_wrap_champlain_view_add_layer(PyGObject *self, PyObject *args, PyObject *kwargs)
3301
static char *kwlist[] = { "layer", NULL };
3304
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainView.add_layer", kwlist, &PyChamplainLayer_Type, &layer))
3307
champlain_view_add_layer(CHAMPLAIN_VIEW(self->obj), CHAMPLAIN_LAYER(layer->obj));
3313
#line 115 "pychamplain.override"
3315
_wrap_champlain_view_get_coords_from_event(PyGObject *self, PyObject *args, PyObject *kargs)
3317
static char *kwlist[] = {"event", NULL};
3320
ClutterEvent *event;
3322
if (!PyArg_ParseTupleAndKeywords(args, kargs, "O:ChamplainView.get_coords_from_event", kwlist, &pyevent))
3325
if (pyg_boxed_check(pyevent, CLUTTER_TYPE_EVENT))
3326
event = pyg_boxed_get(pyevent, ClutterEvent);
3328
PyErr_SetString(PyExc_TypeError, "event must be a ClutterEvent");
3332
champlain_view_get_coords_from_event(CHAMPLAIN_VIEW(self->obj), event, &lat, &lon);
3333
return Py_BuildValue("(dd)", lat, lon);
3335
#line 3336 "pychamplain.c"
3338
#line 138 "pychamplain.override"
3340
_wrap_champlain_view_get_coords_at(PyGObject *self, PyObject *args)
3345
if (!PyArg_ParseTuple(args, "ii:ChamplainView.get_coords_at", &x, &y))
3348
champlain_view_get_coords_at(CHAMPLAIN_VIEW(self->obj), x, y, &lat, &lon);
3349
return Py_BuildValue("(dd)", lat, lon);
3351
#line 3352 "pychamplain.c"
3355
_wrap_champlain_view_get_zoom_level(PyGObject *self)
3360
ret = champlain_view_get_zoom_level(CHAMPLAIN_VIEW(self->obj));
3362
return PyInt_FromLong(ret);
3366
_wrap_champlain_view_get_min_zoom_level(PyGObject *self)
3371
ret = champlain_view_get_min_zoom_level(CHAMPLAIN_VIEW(self->obj));
3373
return PyInt_FromLong(ret);
3377
_wrap_champlain_view_get_max_zoom_level(PyGObject *self)
3382
ret = champlain_view_get_max_zoom_level(CHAMPLAIN_VIEW(self->obj));
3384
return PyInt_FromLong(ret);
3388
_wrap_champlain_view_get_map_source(PyGObject *self)
3390
ChamplainMapSource *ret;
3393
ret = champlain_view_get_map_source(CHAMPLAIN_VIEW(self->obj));
3395
/* pygobject_new handles NULL checking */
3396
return pygobject_new((GObject *)ret);
3400
_wrap_champlain_view_get_decel_rate(PyGObject *self)
3405
ret = champlain_view_get_decel_rate(CHAMPLAIN_VIEW(self->obj));
3407
return PyFloat_FromDouble(ret);
3411
_wrap_champlain_view_get_scroll_mode(PyGObject *self)
3416
ret = champlain_view_get_scroll_mode(CHAMPLAIN_VIEW(self->obj));
3418
return pyg_enum_from_gtype(CHAMPLAIN_TYPE_SCROLL_MODE, ret);
3422
_wrap_champlain_view_get_keep_center_on_resize(PyGObject *self)
3427
ret = champlain_view_get_keep_center_on_resize(CHAMPLAIN_VIEW(self->obj));
3429
return PyBool_FromLong(ret);
3434
_wrap_champlain_view_get_show_license(PyGObject *self)
3439
ret = champlain_view_get_show_license(CHAMPLAIN_VIEW(self->obj));
3441
return PyBool_FromLong(ret);
3446
_wrap_champlain_view_get_zoom_on_double_click(PyGObject *self)
3451
ret = champlain_view_get_zoom_on_double_click(CHAMPLAIN_VIEW(self->obj));
3453
return PyBool_FromLong(ret);
3458
_wrap_champlain_view_add_polygon(PyGObject *self, PyObject *args, PyObject *kwargs)
3460
static char *kwlist[] = { "polygon", NULL };
3463
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainView.add_polygon", kwlist, &PyChamplainPolygon_Type, &polygon))
3466
champlain_view_add_polygon(CHAMPLAIN_VIEW(self->obj), CHAMPLAIN_POLYGON(polygon->obj));
3473
_wrap_champlain_view_remove_polygon(PyGObject *self, PyObject *args, PyObject *kwargs)
3475
static char *kwlist[] = { "polygon", NULL };
3478
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainView.remove_polygon", kwlist, &PyChamplainPolygon_Type, &polygon))
3481
champlain_view_remove_polygon(CHAMPLAIN_VIEW(self->obj), CHAMPLAIN_POLYGON(polygon->obj));
3487
static const PyMethodDef _PyChamplainView_methods[] = {
3488
{ "center_on", (PyCFunction)_wrap_champlain_view_center_on, METH_VARARGS|METH_KEYWORDS,
3490
{ "go_to", (PyCFunction)_wrap_champlain_view_go_to, METH_VARARGS|METH_KEYWORDS,
3492
{ "stop_go_to", (PyCFunction)_wrap_champlain_view_stop_go_to, METH_NOARGS,
3494
{ "zoom_in", (PyCFunction)_wrap_champlain_view_zoom_in, METH_NOARGS,
3496
{ "zoom_out", (PyCFunction)_wrap_champlain_view_zoom_out, METH_NOARGS,
3498
{ "set_zoom_level", (PyCFunction)_wrap_champlain_view_set_zoom_level, METH_VARARGS|METH_KEYWORDS,
3500
{ "set_min_zoom_level", (PyCFunction)_wrap_champlain_view_set_min_zoom_level, METH_VARARGS|METH_KEYWORDS,
3502
{ "set_max_zoom_level", (PyCFunction)_wrap_champlain_view_set_max_zoom_level, METH_VARARGS|METH_KEYWORDS,
3504
{ "ensure_visible", (PyCFunction)_wrap_champlain_view_ensure_visible, METH_VARARGS|METH_KEYWORDS,
3506
{ "ensure_markers_visible", (PyCFunction)_wrap_champlain_view_ensure_markers_visible, METH_VARARGS|METH_KEYWORDS,
3508
{ "set_map_source", (PyCFunction)_wrap_champlain_view_set_map_source, METH_VARARGS|METH_KEYWORDS,
3510
{ "set_size", (PyCFunction)_wrap_champlain_view_set_size, METH_VARARGS|METH_KEYWORDS,
3512
{ "set_decel_rate", (PyCFunction)_wrap_champlain_view_set_decel_rate, METH_VARARGS|METH_KEYWORDS,
3514
{ "set_scroll_mode", (PyCFunction)_wrap_champlain_view_set_scroll_mode, METH_VARARGS|METH_KEYWORDS,
3516
{ "set_keep_center_on_resize", (PyCFunction)_wrap_champlain_view_set_keep_center_on_resize, METH_VARARGS|METH_KEYWORDS,
3518
{ "set_show_license", (PyCFunction)_wrap_champlain_view_set_show_license, METH_VARARGS|METH_KEYWORDS,
3520
{ "set_zoom_on_double_click", (PyCFunction)_wrap_champlain_view_set_zoom_on_double_click, METH_VARARGS|METH_KEYWORDS,
3522
{ "add_layer", (PyCFunction)_wrap_champlain_view_add_layer, METH_VARARGS|METH_KEYWORDS,
3524
{ "get_coords_from_event", (PyCFunction)_wrap_champlain_view_get_coords_from_event, METH_VARARGS|METH_KEYWORDS,
3526
{ "get_coords_at", (PyCFunction)_wrap_champlain_view_get_coords_at, METH_VARARGS|METH_KEYWORDS,
3528
{ "get_zoom_level", (PyCFunction)_wrap_champlain_view_get_zoom_level, METH_NOARGS,
3530
{ "get_min_zoom_level", (PyCFunction)_wrap_champlain_view_get_min_zoom_level, METH_NOARGS,
3532
{ "get_max_zoom_level", (PyCFunction)_wrap_champlain_view_get_max_zoom_level, METH_NOARGS,
3534
{ "get_map_source", (PyCFunction)_wrap_champlain_view_get_map_source, METH_NOARGS,
3536
{ "get_decel_rate", (PyCFunction)_wrap_champlain_view_get_decel_rate, METH_NOARGS,
3538
{ "get_scroll_mode", (PyCFunction)_wrap_champlain_view_get_scroll_mode, METH_NOARGS,
3540
{ "get_keep_center_on_resize", (PyCFunction)_wrap_champlain_view_get_keep_center_on_resize, METH_NOARGS,
3542
{ "get_show_license", (PyCFunction)_wrap_champlain_view_get_show_license, METH_NOARGS,
3544
{ "get_zoom_on_double_click", (PyCFunction)_wrap_champlain_view_get_zoom_on_double_click, METH_NOARGS,
3546
{ "add_polygon", (PyCFunction)_wrap_champlain_view_add_polygon, METH_VARARGS|METH_KEYWORDS,
3548
{ "remove_polygon", (PyCFunction)_wrap_champlain_view_remove_polygon, METH_VARARGS|METH_KEYWORDS,
3550
{ NULL, NULL, 0, NULL }
3553
PyTypeObject G_GNUC_INTERNAL PyChamplainView_Type = {
3554
PyObject_HEAD_INIT(NULL)
3556
"champlain.View", /* tp_name */
3557
sizeof(PyGObject), /* tp_basicsize */
3558
0, /* tp_itemsize */
3560
(destructor)0, /* tp_dealloc */
3561
(printfunc)0, /* tp_print */
3562
(getattrfunc)0, /* tp_getattr */
3563
(setattrfunc)0, /* tp_setattr */
3564
(cmpfunc)0, /* tp_compare */
3565
(reprfunc)0, /* tp_repr */
3566
(PyNumberMethods*)0, /* tp_as_number */
3567
(PySequenceMethods*)0, /* tp_as_sequence */
3568
(PyMappingMethods*)0, /* tp_as_mapping */
3569
(hashfunc)0, /* tp_hash */
3570
(ternaryfunc)0, /* tp_call */
3571
(reprfunc)0, /* tp_str */
3572
(getattrofunc)0, /* tp_getattro */
3573
(setattrofunc)0, /* tp_setattro */
3574
(PyBufferProcs*)0, /* tp_as_buffer */
3575
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
3576
NULL, /* Documentation string */
3577
(traverseproc)0, /* tp_traverse */
3578
(inquiry)0, /* tp_clear */
3579
(richcmpfunc)0, /* tp_richcompare */
3580
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
3581
(getiterfunc)0, /* tp_iter */
3582
(iternextfunc)0, /* tp_iternext */
3583
(struct PyMethodDef*)_PyChamplainView_methods, /* tp_methods */
3584
(struct PyMemberDef*)0, /* tp_members */
3585
(struct PyGetSetDef*)0, /* tp_getset */
3588
(descrgetfunc)0, /* tp_descr_get */
3589
(descrsetfunc)0, /* tp_descr_set */
3590
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
3591
(initproc)_wrap_champlain_view_new, /* tp_init */
3592
(allocfunc)0, /* tp_alloc */
3593
(newfunc)0, /* tp_new */
3594
(freefunc)0, /* tp_free */
3595
(inquiry)0 /* tp_is_gc */
3600
/* ----------- ChamplainZoomLevel ----------- */
3603
_wrap_champlain_zoom_level_new(PyGObject *self, PyObject *args, PyObject *kwargs)
3605
static char* kwlist[] = { NULL };
3607
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
3608
":champlain.ZoomLevel.__init__",
3612
pygobject_constructv(self, 0, NULL);
3616
"could not create champlain.ZoomLevel object");
3623
_wrap_champlain_zoom_level_get_width(PyGObject *self)
3628
ret = champlain_zoom_level_get_width(CHAMPLAIN_ZOOM_LEVEL(self->obj));
3630
return PyLong_FromUnsignedLong(ret);
3634
_wrap_champlain_zoom_level_get_height(PyGObject *self)
3639
ret = champlain_zoom_level_get_height(CHAMPLAIN_ZOOM_LEVEL(self->obj));
3641
return PyLong_FromUnsignedLong(ret);
3645
_wrap_champlain_zoom_level_get_zoom_level(PyGObject *self)
3650
ret = champlain_zoom_level_get_zoom_level(CHAMPLAIN_ZOOM_LEVEL(self->obj));
3652
return PyInt_FromLong(ret);
3656
_wrap_champlain_zoom_level_get_actor(PyGObject *self)
3661
ret = champlain_zoom_level_get_actor(CHAMPLAIN_ZOOM_LEVEL(self->obj));
3663
/* pygobject_new handles NULL checking */
3664
return pygobject_new((GObject *)ret);
3668
_wrap_champlain_zoom_level_set_width(PyGObject *self, PyObject *args, PyObject *kwargs)
3670
static char *kwlist[] = { "width", NULL };
3671
PyObject *py_width = NULL;
3674
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainZoomLevel.set_width", kwlist, &py_width))
3677
if (PyLong_Check(py_width))
3678
width = PyLong_AsUnsignedLong(py_width);
3679
else if (PyInt_Check(py_width))
3680
width = PyInt_AsLong(py_width);
3682
PyErr_SetString(PyExc_TypeError, "Parameter 'width' must be an int or a long");
3683
if (PyErr_Occurred())
3687
champlain_zoom_level_set_width(CHAMPLAIN_ZOOM_LEVEL(self->obj), width);
3694
_wrap_champlain_zoom_level_set_height(PyGObject *self, PyObject *args, PyObject *kwargs)
3696
static char *kwlist[] = { "height", NULL };
3697
PyObject *py_height = NULL;
3700
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainZoomLevel.set_height", kwlist, &py_height))
3703
if (PyLong_Check(py_height))
3704
height = PyLong_AsUnsignedLong(py_height);
3705
else if (PyInt_Check(py_height))
3706
height = PyInt_AsLong(py_height);
3708
PyErr_SetString(PyExc_TypeError, "Parameter 'height' must be an int or a long");
3709
if (PyErr_Occurred())
3713
champlain_zoom_level_set_height(CHAMPLAIN_ZOOM_LEVEL(self->obj), height);
3720
_wrap_champlain_zoom_level_set_zoom_level(PyGObject *self, PyObject *args, PyObject *kwargs)
3722
static char *kwlist[] = { "zoom_level", NULL };
3725
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:ChamplainZoomLevel.set_zoom_level", kwlist, &zoom_level))
3728
champlain_zoom_level_set_zoom_level(CHAMPLAIN_ZOOM_LEVEL(self->obj), zoom_level);
3735
_wrap_champlain_zoom_level_add_tile(PyGObject *self, PyObject *args, PyObject *kwargs)
3737
static char *kwlist[] = { "tile", NULL };
3740
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainZoomLevel.add_tile", kwlist, &PyChamplainTile_Type, &tile))
3743
champlain_zoom_level_add_tile(CHAMPLAIN_ZOOM_LEVEL(self->obj), CHAMPLAIN_TILE(tile->obj));
3750
_wrap_champlain_zoom_level_remove_tile(PyGObject *self, PyObject *args, PyObject *kwargs)
3752
static char *kwlist[] = { "tile", NULL };
3755
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:ChamplainZoomLevel.remove_tile", kwlist, &PyChamplainTile_Type, &tile))
3758
champlain_zoom_level_remove_tile(CHAMPLAIN_ZOOM_LEVEL(self->obj), CHAMPLAIN_TILE(tile->obj));
3765
_wrap_champlain_zoom_level_tile_count(PyGObject *self)
3770
ret = champlain_zoom_level_tile_count(CHAMPLAIN_ZOOM_LEVEL(self->obj));
3772
return PyLong_FromUnsignedLong(ret);
3776
_wrap_champlain_zoom_level_get_nth_tile(PyGObject *self, PyObject *args, PyObject *kwargs)
3778
static char *kwlist[] = { "index", NULL };
3779
PyObject *py_index = NULL;
3783
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:ChamplainZoomLevel.get_nth_tile", kwlist, &py_index))
3786
if (PyLong_Check(py_index))
3787
index = PyLong_AsUnsignedLong(py_index);
3788
else if (PyInt_Check(py_index))
3789
index = PyInt_AsLong(py_index);
3791
PyErr_SetString(PyExc_TypeError, "Parameter 'index' must be an int or a long");
3792
if (PyErr_Occurred())
3796
ret = champlain_zoom_level_get_nth_tile(CHAMPLAIN_ZOOM_LEVEL(self->obj), index);
3798
/* pygobject_new handles NULL checking */
3799
return pygobject_new((GObject *)ret);
3802
static const PyMethodDef _PyChamplainZoomLevel_methods[] = {
3803
{ "get_width", (PyCFunction)_wrap_champlain_zoom_level_get_width, METH_NOARGS,
3805
{ "get_height", (PyCFunction)_wrap_champlain_zoom_level_get_height, METH_NOARGS,
3807
{ "get_zoom_level", (PyCFunction)_wrap_champlain_zoom_level_get_zoom_level, METH_NOARGS,
3809
{ "get_actor", (PyCFunction)_wrap_champlain_zoom_level_get_actor, METH_NOARGS,
3811
{ "set_width", (PyCFunction)_wrap_champlain_zoom_level_set_width, METH_VARARGS|METH_KEYWORDS,
3813
{ "set_height", (PyCFunction)_wrap_champlain_zoom_level_set_height, METH_VARARGS|METH_KEYWORDS,
3815
{ "set_zoom_level", (PyCFunction)_wrap_champlain_zoom_level_set_zoom_level, METH_VARARGS|METH_KEYWORDS,
3817
{ "add_tile", (PyCFunction)_wrap_champlain_zoom_level_add_tile, METH_VARARGS|METH_KEYWORDS,
3819
{ "remove_tile", (PyCFunction)_wrap_champlain_zoom_level_remove_tile, METH_VARARGS|METH_KEYWORDS,
3821
{ "tile_count", (PyCFunction)_wrap_champlain_zoom_level_tile_count, METH_NOARGS,
3823
{ "get_nth_tile", (PyCFunction)_wrap_champlain_zoom_level_get_nth_tile, METH_VARARGS|METH_KEYWORDS,
3825
{ NULL, NULL, 0, NULL }
3828
PyTypeObject G_GNUC_INTERNAL PyChamplainZoomLevel_Type = {
3829
PyObject_HEAD_INIT(NULL)
3831
"champlain.ZoomLevel", /* tp_name */
3832
sizeof(PyGObject), /* tp_basicsize */
3833
0, /* tp_itemsize */
3835
(destructor)0, /* tp_dealloc */
3836
(printfunc)0, /* tp_print */
3837
(getattrfunc)0, /* tp_getattr */
3838
(setattrfunc)0, /* tp_setattr */
3839
(cmpfunc)0, /* tp_compare */
3840
(reprfunc)0, /* tp_repr */
3841
(PyNumberMethods*)0, /* tp_as_number */
3842
(PySequenceMethods*)0, /* tp_as_sequence */
3843
(PyMappingMethods*)0, /* tp_as_mapping */
3844
(hashfunc)0, /* tp_hash */
3845
(ternaryfunc)0, /* tp_call */
3846
(reprfunc)0, /* tp_str */
3847
(getattrofunc)0, /* tp_getattro */
3848
(setattrofunc)0, /* tp_setattro */
3849
(PyBufferProcs*)0, /* tp_as_buffer */
3850
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
3851
NULL, /* Documentation string */
3852
(traverseproc)0, /* tp_traverse */
3853
(inquiry)0, /* tp_clear */
3854
(richcmpfunc)0, /* tp_richcompare */
3855
offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
3856
(getiterfunc)0, /* tp_iter */
3857
(iternextfunc)0, /* tp_iternext */
3858
(struct PyMethodDef*)_PyChamplainZoomLevel_methods, /* tp_methods */
3859
(struct PyMemberDef*)0, /* tp_members */
3860
(struct PyGetSetDef*)0, /* tp_getset */
3863
(descrgetfunc)0, /* tp_descr_get */
3864
(descrsetfunc)0, /* tp_descr_set */
3865
offsetof(PyGObject, inst_dict), /* tp_dictoffset */
3866
(initproc)_wrap_champlain_zoom_level_new, /* tp_init */
3867
(allocfunc)0, /* tp_alloc */
3868
(newfunc)0, /* tp_new */
3869
(freefunc)0, /* tp_free */
3870
(inquiry)0 /* tp_is_gc */
3875
/* ----------- functions ----------- */
3878
_wrap_champlain_cache_dup_default(PyObject *self)
3880
ChamplainCache *ret;
3883
ret = champlain_cache_dup_default();
3885
/* pygobject_new handles NULL checking */
3886
return pygobject_new((GObject *)ret);
3890
_wrap_champlain_map_source_factory_dup_default(PyObject *self)
3892
ChamplainMapSourceFactory *ret;
3895
ret = champlain_map_source_factory_dup_default();
3897
/* pygobject_new handles NULL checking */
3898
return pygobject_new((GObject *)ret);
3902
_wrap_champlain_network_map_source_new_full(PyObject *self, PyObject *args, PyObject *kwargs)
3904
static char *kwlist[] = { "id", "name", "license", "license_uri", "min_zoom", "max_zoom", "tile_size", "projection", "uri_format", NULL };
3905
char *id, *name, *license, *license_uri, *uri_format;
3906
PyObject *py_min_zoom = NULL, *py_max_zoom = NULL, *py_tile_size = NULL, *py_projection = NULL;
3907
ChamplainNetworkMapSource *ret;
3908
ChamplainMapProjection projection;
3909
guint min_zoom = 0, max_zoom = 0, tile_size = 0;
3911
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"ssssOOOOs:network_map_source_new_full", kwlist, &id, &name, &license, &license_uri, &py_min_zoom, &py_max_zoom, &py_tile_size, &py_projection, &uri_format))
3914
if (PyLong_Check(py_min_zoom))
3915
min_zoom = PyLong_AsUnsignedLong(py_min_zoom);
3916
else if (PyInt_Check(py_min_zoom))
3917
min_zoom = PyInt_AsLong(py_min_zoom);
3919
PyErr_SetString(PyExc_TypeError, "Parameter 'min_zoom' must be an int or a long");
3920
if (PyErr_Occurred())
3924
if (PyLong_Check(py_max_zoom))
3925
max_zoom = PyLong_AsUnsignedLong(py_max_zoom);
3926
else if (PyInt_Check(py_max_zoom))
3927
max_zoom = PyInt_AsLong(py_max_zoom);
3929
PyErr_SetString(PyExc_TypeError, "Parameter 'max_zoom' must be an int or a long");
3930
if (PyErr_Occurred())
3934
if (PyLong_Check(py_tile_size))
3935
tile_size = PyLong_AsUnsignedLong(py_tile_size);
3936
else if (PyInt_Check(py_tile_size))
3937
tile_size = PyInt_AsLong(py_tile_size);
3939
PyErr_SetString(PyExc_TypeError, "Parameter 'tile_size' must be an int or a long");
3940
if (PyErr_Occurred())
3943
if (pyg_enum_get_value(CHAMPLAIN_TYPE_MAP_PROJECTION, py_projection, (gpointer)&projection))
3946
ret = champlain_network_map_source_new_full(id, name, license, license_uri, min_zoom, max_zoom, tile_size, projection, uri_format);
3948
/* pygobject_new handles NULL checking */
3949
return pygobject_new((GObject *)ret);
3953
_wrap_champlain_marker_new_with_text(PyObject *self, PyObject *args, PyObject *kwargs)
3955
static char *kwlist[] = { "text", "font", "text_color", "marker_color", NULL };
3957
ClutterColor *text_color = NULL, *marker_color = NULL;
3959
PyObject *py_text_color, *py_marker_color;
3961
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"ssOO:marker_new_with_text", kwlist, &text, &font, &py_text_color, &py_marker_color))
3963
if (pyg_boxed_check(py_text_color, CLUTTER_TYPE_COLOR))
3964
text_color = pyg_boxed_get(py_text_color, ClutterColor);
3966
PyErr_SetString(PyExc_TypeError, "text_color should be a ClutterColor");
3969
if (pyg_boxed_check(py_marker_color, CLUTTER_TYPE_COLOR))
3970
marker_color = pyg_boxed_get(py_marker_color, ClutterColor);
3972
PyErr_SetString(PyExc_TypeError, "marker_color should be a ClutterColor");
3976
ret = champlain_marker_new_with_text(text, font, text_color, marker_color);
3978
/* pygobject_new handles NULL checking */
3979
return pygobject_new((GObject *)ret);
3983
_wrap_champlain_marker_new_with_image(PyObject *self, PyObject *args, PyObject *kwargs)
3985
static char *kwlist[] = { "actor", NULL };
3989
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:marker_new_with_image", kwlist, &PyClutterActor_Type, &actor))
3992
ret = champlain_marker_new_with_image(CLUTTER_ACTOR(actor->obj));
3994
/* pygobject_new handles NULL checking */
3995
return pygobject_new((GObject *)ret);
3999
_wrap_champlain_marker_new_from_file(PyObject *self, PyObject *args, PyObject *kwargs)
4001
static char *kwlist[] = { "filename", NULL };
4003
GError *error = NULL;
4006
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:marker_new_from_file", kwlist, &filename))
4009
ret = champlain_marker_new_from_file(filename, &error);
4011
if (pyg_error_check(&error))
4013
/* pygobject_new handles NULL checking */
4014
return pygobject_new((GObject *)ret);
4018
_wrap_champlain_marker_new_full(PyObject *self, PyObject *args, PyObject *kwargs)
4020
static char *kwlist[] = { "text", "actor", NULL };
4025
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"sO!:marker_new_full", kwlist, &text, &PyClutterActor_Type, &actor))
4028
ret = champlain_marker_new_full(text, CLUTTER_ACTOR(actor->obj));
4030
/* pygobject_new handles NULL checking */
4031
return pygobject_new((GObject *)ret);
4035
_wrap_champlain_marker_set_highlight_color(PyObject *self, PyObject *args, PyObject *kwargs)
4037
static char *kwlist[] = { "color", NULL };
4038
ClutterColor *color = NULL;
4041
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:marker_set_highlight_color", kwlist, &py_color))
4043
if (pyg_boxed_check(py_color, CLUTTER_TYPE_COLOR))
4044
color = pyg_boxed_get(py_color, ClutterColor);
4046
PyErr_SetString(PyExc_TypeError, "color should be a ClutterColor");
4050
champlain_marker_set_highlight_color(color);
4057
_wrap_champlain_tile_new_full(PyObject *self, PyObject *args, PyObject *kwargs)
4059
static char *kwlist[] = { "x", "y", "size", "zoom_level", NULL };
4060
int x, y, zoom_level;
4061
PyObject *py_size = NULL;
4065
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"iiOi:tile_new_full", kwlist, &x, &y, &py_size, &zoom_level))
4068
if (PyLong_Check(py_size))
4069
size = PyLong_AsUnsignedLong(py_size);
4070
else if (PyInt_Check(py_size))
4071
size = PyInt_AsLong(py_size);
4073
PyErr_SetString(PyExc_TypeError, "Parameter 'size' must be an int or a long");
4074
if (PyErr_Occurred())
4078
ret = champlain_tile_new_full(x, y, size, zoom_level);
4080
/* pygobject_new handles NULL checking */
4081
return pygobject_new((GObject *)ret);
4084
const PyMethodDef champlain_functions[] = {
4085
{ "cache_dup_default", (PyCFunction)_wrap_champlain_cache_dup_default, METH_NOARGS,
4087
{ "map_source_factory_dup_default", (PyCFunction)_wrap_champlain_map_source_factory_dup_default, METH_NOARGS,
4089
{ "network_map_source_new_full", (PyCFunction)_wrap_champlain_network_map_source_new_full, METH_VARARGS|METH_KEYWORDS,
4091
{ "marker_new_with_text", (PyCFunction)_wrap_champlain_marker_new_with_text, METH_VARARGS|METH_KEYWORDS,
4093
{ "marker_new_with_image", (PyCFunction)_wrap_champlain_marker_new_with_image, METH_VARARGS|METH_KEYWORDS,
4095
{ "marker_new_from_file", (PyCFunction)_wrap_champlain_marker_new_from_file, METH_VARARGS|METH_KEYWORDS,
4097
{ "marker_new_full", (PyCFunction)_wrap_champlain_marker_new_full, METH_VARARGS|METH_KEYWORDS,
4099
{ "marker_set_highlight_color", (PyCFunction)_wrap_champlain_marker_set_highlight_color, METH_VARARGS|METH_KEYWORDS,
4101
{ "tile_new_full", (PyCFunction)_wrap_champlain_tile_new_full, METH_VARARGS|METH_KEYWORDS,
4103
{ NULL, NULL, 0, NULL }
4107
/* ----------- enums and flags ----------- */
4110
champlain_add_constants(PyObject *module, const gchar *strip_prefix)
4113
PyModule_AddStringConstant(module, "__version__", VERSION);
4115
pyg_enum_add(module, "ScrollMode", strip_prefix, CHAMPLAIN_TYPE_SCROLL_MODE);
4116
pyg_enum_add(module, "State", strip_prefix, CHAMPLAIN_TYPE_STATE);
4117
pyg_enum_add(module, "MapProjection", strip_prefix, CHAMPLAIN_TYPE_MAP_PROJECTION);
4119
if (PyErr_Occurred())
4123
/* initialise stuff extension classes */
4125
champlain_register_classes(PyObject *d)
4129
if ((module = PyImport_ImportModule("gobject")) != NULL) {
4130
_PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, "GObject");
4131
if (_PyGObject_Type == NULL) {
4132
PyErr_SetString(PyExc_ImportError,
4133
"cannot import name GObject from gobject");
4137
PyErr_SetString(PyExc_ImportError,
4138
"could not import gobject");
4141
if ((module = PyImport_ImportModule("clutter")) != NULL) {
4142
_PyClutterActor_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Actor");
4143
if (_PyClutterActor_Type == NULL) {
4144
PyErr_SetString(PyExc_ImportError,
4145
"cannot import name Actor from clutter");
4148
_PyClutterGroup_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Group");
4149
if (_PyClutterGroup_Type == NULL) {
4150
PyErr_SetString(PyExc_ImportError,
4151
"cannot import name Group from clutter");
4154
_PyClutterColor_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Color");
4155
if (_PyClutterColor_Type == NULL) {
4156
PyErr_SetString(PyExc_ImportError,
4157
"cannot import name Color from clutter");
4161
PyErr_SetString(PyExc_ImportError,
4162
"could not import clutter");
4167
#line 4168 "pychamplain.c"
4168
pyg_register_boxed(d, "Point", CHAMPLAIN_TYPE_POINT, &PyChamplainPoint_Type);
4169
pyg_register_boxed(d, "MapSourceDesc", CHAMPLAIN_TYPE_MAP_SOURCE_DESC, &PyChamplainMapSourceDesc_Type);
4170
pygobject_register_class(d, "ChamplainBaseMarker", CHAMPLAIN_TYPE_BASE_MARKER, &PyChamplainBaseMarker_Type, Py_BuildValue("(O)", &PyClutterGroup_Type));
4171
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_BASE_MARKER);
4172
pygobject_register_class(d, "ChamplainCache", CHAMPLAIN_TYPE_CACHE, &PyChamplainCache_Type, Py_BuildValue("(O)", &PyGObject_Type));
4173
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_CACHE);
4174
pygobject_register_class(d, "ChamplainLayer", CHAMPLAIN_TYPE_LAYER, &PyChamplainLayer_Type, Py_BuildValue("(O)", &PyClutterGroup_Type));
4175
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_LAYER);
4176
pygobject_register_class(d, "ChamplainMapSource", CHAMPLAIN_TYPE_MAP_SOURCE, &PyChamplainMapSource_Type, Py_BuildValue("(O)", &PyGObject_Type));
4177
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_MAP_SOURCE);
4178
pygobject_register_class(d, "ChamplainMapSourceFactory", CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY, &PyChamplainMapSourceFactory_Type, Py_BuildValue("(O)", &PyGObject_Type));
4179
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY);
4180
pygobject_register_class(d, "ChamplainMarker", CHAMPLAIN_TYPE_MARKER, &PyChamplainMarker_Type, Py_BuildValue("(O)", &PyChamplainBaseMarker_Type));
4181
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_MARKER);
4182
pygobject_register_class(d, "ChamplainNetworkMapSource", CHAMPLAIN_TYPE_NETWORK_MAP_SOURCE, &PyChamplainNetworkMapSource_Type, Py_BuildValue("(O)", &PyChamplainMapSource_Type));
4183
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_NETWORK_MAP_SOURCE);
4184
pygobject_register_class(d, "ChamplainPolygon", CHAMPLAIN_TYPE_POLYGON, &PyChamplainPolygon_Type, Py_BuildValue("(O)", &PyGObject_Type));
4185
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_POLYGON);
4186
pygobject_register_class(d, "ChamplainTile", CHAMPLAIN_TYPE_TILE, &PyChamplainTile_Type, Py_BuildValue("(O)", &PyGObject_Type));
4187
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_TILE);
4188
pygobject_register_class(d, "ChamplainView", CHAMPLAIN_TYPE_VIEW, &PyChamplainView_Type, Py_BuildValue("(O)", &PyClutterGroup_Type));
4189
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_VIEW);
4190
pygobject_register_class(d, "ChamplainZoomLevel", CHAMPLAIN_TYPE_ZOOM_LEVEL, &PyChamplainZoomLevel_Type, Py_BuildValue("(O)", &PyGObject_Type));
4191
pyg_set_object_has_new_constructor(CHAMPLAIN_TYPE_ZOOM_LEVEL);