Back to index

gcompris  8.2.2
canvas.c
Go to the documentation of this file.
00001 /* -- THIS FILE IS GENERATED - DO NOT EDIT *//* -*- Mode: C; c-basic-offset: 4 -*- */
00002 
00003 #include <Python.h>
00004 
00005 
00006 
00007 #line 4 "canvas.override"
00008 #include <Python.h>
00009 
00010 #define NO_IMPORT_PYGOBJECT
00011 #include "pygobject.h"
00012 #include <libgnomecanvas/libgnomecanvas.h>
00013 #include <libgnomecanvas/gnome-canvas-clipgroup.h>
00014 
00015 static int
00016 gnomecanvasaffine_to_value(PyObject *py_affine, double affine[6])
00017 {
00018     int i;
00019 
00020     if (PySequence_Length(py_affine) != 6) {
00021        PyErr_SetString(PyExc_TypeError, "argument must be a 6 tuple of floats.");
00022        return -1;
00023     }
00024     for (i = 0; i < 6; i++) {
00025        PyObject *sitem = PySequence_GetItem(py_affine, i);
00026        Py_DECREF(sitem);
00027        sitem = PyNumber_Float(sitem);
00028        if (sitem)
00029            affine[i] = PyFloat_AsDouble(sitem);
00030        else {
00031            PyErr_Clear();
00032            PyErr_SetString(PyExc_TypeError, "sequence item not a float");
00033            return -1;
00034        }
00035        Py_DECREF(sitem);
00036     }
00037     return 0;
00038 }
00039 
00040 static PyObject *
00041 gnomecanvasaffine_from_value(const double affine[6])
00042 {
00043     return Py_BuildValue("(dddddd)", affine[0], affine[1], affine[2],
00044                       affine[3], affine[4], affine[5]);
00045 }
00046 
00047 #ifndef GNOME_TYPE_CANVAS_PATH_DEF
00048 
00049 static GType
00050 gnome_canvas_path_def_get_type(void)
00051 {
00052     static GType type = 0;
00053 
00054     if (type == 0)
00055        type = g_boxed_type_register_static
00056            ("GnomeCanvasPathDef",
00057             (GBoxedCopyFunc) gnome_canvas_path_def_ref,
00058             (GBoxedFreeFunc) gnome_canvas_path_def_unref);
00059     return type;
00060 }
00061 
00062 #define GNOME_TYPE_CANVAS_PATH_DEF (gnome_canvas_path_def_get_type())
00063 
00064 #endif
00065 
00066 #line 67 "canvas.c"
00067 
00068 
00069 /* ---------- types from other modules ---------- */
00070 static PyTypeObject *_PyGObject_Type;
00071 #define PyGObject_Type (*_PyGObject_Type)
00072 static PyTypeObject *_PyGtkLayout_Type;
00073 #define PyGtkLayout_Type (*_PyGtkLayout_Type)
00074 static PyTypeObject *_PyGtkObject_Type;
00075 #define PyGtkObject_Type (*_PyGtkObject_Type)
00076 
00077 
00078 /* ---------- forward type declarations ---------- */
00079 PyTypeObject PyGnomeCanvasPathDef_Type;
00080 PyTypeObject PyGnomeCanvas_Type;
00081 PyTypeObject PyGnomeCanvasItem_Type;
00082 PyTypeObject PyGnomeCanvasGroup_Type;
00083 PyTypeObject PyGnomeCanvasClipgroup_Type;
00084 PyTypeObject PyGnomeCanvasLine_Type;
00085 PyTypeObject PyGnomeCanvasPixbuf_Type;
00086 PyTypeObject PyGnomeCanvasRichText_Type;
00087 PyTypeObject PyGnomeCanvasShape_Type;
00088 PyTypeObject PyGnomeCanvasRE_Type;
00089 PyTypeObject PyGnomeCanvasRect_Type;
00090 PyTypeObject PyGnomeCanvasEllipse_Type;
00091 PyTypeObject PyGnomeCanvasPolygon_Type;
00092 PyTypeObject PyGnomeCanvasBpath_Type;
00093 PyTypeObject PyGnomeCanvasText_Type;
00094 PyTypeObject PyGnomeCanvasWidget_Type;
00095 
00096 
00097 /* ----------- GnomeCanvasPathDef ----------- */
00098 
00099 static int
00100 pygobject_no_constructor(PyObject *self, PyObject *args, PyObject *kwargs)
00101 {
00102     gchar buf[512];
00103 
00104     g_snprintf(buf, sizeof(buf), "%s is an abstract widget", self->ob_type->tp_name);
00105     PyErr_SetString(PyExc_NotImplementedError, buf);
00106     return -1;
00107 }
00108 
00109 PyTypeObject PyGnomeCanvasPathDef_Type = {
00110     PyObject_HEAD_INIT(NULL)
00111     0,                             /* ob_size */
00112     "gnome.canvas.CanvasPathDef",                /* tp_name */
00113     sizeof(PyGBoxed),               /* tp_basicsize */
00114     0,                             /* tp_itemsize */
00115     /* methods */
00116     (destructor)0,   /* tp_dealloc */
00117     (printfunc)0,                  /* tp_print */
00118     (getattrfunc)0,  /* tp_getattr */
00119     (setattrfunc)0,  /* tp_setattr */
00120     (cmpfunc)0,             /* tp_compare */
00121     (reprfunc)0,            /* tp_repr */
00122     (PyNumberMethods*)0,     /* tp_as_number */
00123     (PySequenceMethods*)0, /* tp_as_sequence */
00124     (PyMappingMethods*)0,   /* tp_as_mapping */
00125     (hashfunc)0,            /* tp_hash */
00126     (ternaryfunc)0,         /* tp_call */
00127     (reprfunc)0,            /* tp_str */
00128     (getattrofunc)0, /* tp_getattro */
00129     (setattrofunc)0, /* tp_setattro */
00130     (PyBufferProcs*)0,      /* tp_as_buffer */
00131     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
00132     NULL,                          /* Documentation string */
00133     (traverseproc)0, /* tp_traverse */
00134     (inquiry)0,             /* tp_clear */
00135     (richcmpfunc)0,  /* tp_richcompare */
00136     0,             /* tp_weaklistoffset */
00137     (getiterfunc)0,         /* tp_iter */
00138     (iternextfunc)0, /* tp_iternext */
00139     NULL,                   /* tp_methods */
00140     0,                             /* tp_members */
00141     0,                      /* tp_getset */
00142     NULL,                          /* tp_base */
00143     NULL,                          /* tp_dict */
00144     (descrgetfunc)0, /* tp_descr_get */
00145     (descrsetfunc)0, /* tp_descr_set */
00146     0,                 /* tp_dictoffset */
00147     (initproc)pygobject_no_constructor,          /* tp_init */
00148     (allocfunc)0,           /* tp_alloc */
00149     (newfunc)0,               /* tp_new */
00150     (freefunc)0,             /* tp_free */
00151     (inquiry)0              /* tp_is_gc */
00152 };
00153 
00154 
00155 
00156 /* ----------- GnomeCanvas ----------- */
00157 
00158 #line 262 "canvas.override"
00159 static int
00160 _wrap_gnome_canvas_new(PyGObject *self, PyObject *args, PyObject *kwargs)
00161 {
00162     int aa = 0;
00163     static char *kwlist[] = { "aa", NULL };
00164     GType obj_type = pyg_type_from_object((PyObject *) self);
00165 
00166     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:GnomeCanvas.__init__",
00167                                  kwlist, &aa))
00168         return -1;
00169 
00170     self->obj = g_object_new(obj_type, "aa", aa, NULL);
00171 
00172     if (!self->obj) {
00173         PyErr_SetString(PyExc_RuntimeError, "could not create GnomeCanvas object");
00174         return -1;
00175     }
00176     gtk_object_ref(GTK_OBJECT(self->obj));
00177     gtk_object_sink(GTK_OBJECT(self->obj));
00178     pygobject_register_wrapper((PyObject *)self);
00179     return 0;
00180 }
00181 #line 182 "canvas.c"
00182 
00183 
00184 static PyObject *
00185 _wrap_gnome_canvas_root(PyGObject *self)
00186 {
00187     GnomeCanvasGroup *ret;
00188 
00189     ret = gnome_canvas_root(GNOME_CANVAS(self->obj));
00190     /* pygobject_new handles NULL checking */
00191     return pygobject_new((GObject *)ret);
00192 }
00193 
00194 static PyObject *
00195 _wrap_gnome_canvas_set_pixels_per_unit(PyGObject *self, PyObject *args, PyObject *kwargs)
00196 {
00197     static char *kwlist[] = { "n", NULL };
00198     double n;
00199 
00200     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "d:GnomeCanvas.set_pixels_per_unit", kwlist, &n))
00201         return NULL;
00202     gnome_canvas_set_pixels_per_unit(GNOME_CANVAS(self->obj), n);
00203     Py_INCREF(Py_None);
00204     return Py_None;
00205 }
00206 
00207 static PyObject *
00208 _wrap_gnome_canvas_set_scroll_region(PyGObject *self, PyObject *args, PyObject *kwargs)
00209 {
00210     static char *kwlist[] = { "x1", "y1", "x2", "y2", NULL };
00211     double x1, y1, x2, y2;
00212 
00213     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "dddd:GnomeCanvas.set_scroll_region", kwlist, &x1, &y1, &x2, &y2))
00214         return NULL;
00215     gnome_canvas_set_scroll_region(GNOME_CANVAS(self->obj), x1, y1, x2, y2);
00216     Py_INCREF(Py_None);
00217     return Py_None;
00218 }
00219 
00220 #line 237 "canvas.override"
00221 static PyObject *
00222 _wrap_gnome_canvas_get_scroll_region(PyGObject *self, PyObject *args)
00223 {
00224     double x1, y1, x2, y2;
00225 
00226     gnome_canvas_get_scroll_region(GNOME_CANVAS(self->obj),
00227                                &x1, &y1, &x2, &y2);
00228 
00229     return Py_BuildValue("(dddd)", x1, y1, x2, y2);
00230 }
00231 #line 232 "canvas.c"
00232 
00233 
00234 static PyObject *
00235 _wrap_gnome_canvas_get_center_scroll_region(PyGObject *self)
00236 {
00237     int ret;
00238 
00239     ret = gnome_canvas_get_center_scroll_region(GNOME_CANVAS(self->obj));
00240     return PyBool_FromLong(ret);
00241 
00242 }
00243 
00244 static PyObject *
00245 _wrap_gnome_canvas_set_center_scroll_region(PyGObject *self, PyObject *args, PyObject *kwargs)
00246 {
00247     static char *kwlist[] = { "center_scroll_region", NULL };
00248     int center_scroll_region;
00249 
00250     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:GnomeCanvas.set_center_scroll_region", kwlist, &center_scroll_region))
00251         return NULL;
00252     gnome_canvas_set_center_scroll_region(GNOME_CANVAS(self->obj), center_scroll_region);
00253     Py_INCREF(Py_None);
00254     return Py_None;
00255 }
00256 
00257 static PyObject *
00258 _wrap_gnome_canvas_scroll_to(PyGObject *self, PyObject *args, PyObject *kwargs)
00259 {
00260     static char *kwlist[] = { "cx", "cy", NULL };
00261     int cx, cy;
00262 
00263     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GnomeCanvas.scroll_to", kwlist, &cx, &cy))
00264         return NULL;
00265     gnome_canvas_scroll_to(GNOME_CANVAS(self->obj), cx, cy);
00266     Py_INCREF(Py_None);
00267     return Py_None;
00268 }
00269 
00270 #line 249 "canvas.override"
00271 static PyObject *
00272 _wrap_gnome_canvas_get_scroll_offsets(PyGObject *self, PyObject *args)
00273 {
00274     int cx, cy;
00275 
00276     gnome_canvas_get_scroll_offsets(GNOME_CANVAS(self->obj), &cx, &cy);
00277 
00278     return Py_BuildValue("(ii)", cx, cy);
00279 }
00280 #line 281 "canvas.c"
00281 
00282 
00283 static PyObject *
00284 _wrap_gnome_canvas_update_now(PyGObject *self)
00285 {
00286     gnome_canvas_update_now(GNOME_CANVAS(self->obj));
00287     Py_INCREF(Py_None);
00288     return Py_None;
00289 }
00290 
00291 static PyObject *
00292 _wrap_gnome_canvas_get_item_at(PyGObject *self, PyObject *args, PyObject *kwargs)
00293 {
00294     static char *kwlist[] = { "x", "y", NULL };
00295     double x, y;
00296     GnomeCanvasItem *ret;
00297 
00298     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "dd:GnomeCanvas.get_item_at", kwlist, &x, &y))
00299         return NULL;
00300     ret = gnome_canvas_get_item_at(GNOME_CANVAS(self->obj), x, y);
00301     /* pygobject_new handles NULL checking */
00302     return pygobject_new((GObject *)ret);
00303 }
00304 
00305 #line 440 "canvas.override"
00306 static PyObject *
00307 _wrap_gnome_canvas_w2c_affine(PyGObject *self, PyObject *args) {
00308     PyObject *py_affine;
00309     double affine[6];
00310 
00311     if (!PyArg_ParseTuple(args, "O!:GnomeCanvas.w2c_affine",
00312                        &PyTuple_Type, &py_affine))
00313        return NULL;
00314     if ((gnomecanvasaffine_to_value(py_affine, affine)) == -1)
00315        return NULL;
00316     gnome_canvas_w2c_affine(GNOME_CANVAS(self->obj), affine);
00317 
00318     return gnomecanvasaffine_from_value(affine);
00319 }
00320 #line 321 "canvas.c"
00321 
00322 
00323 #line 286 "canvas.override"
00324 static PyObject *
00325 _wrap_gnome_canvas_w2c(PyGObject *self, PyObject *args, PyObject *kwargs)
00326 {
00327     static char *kwlist[] = { "wx", "wy", NULL };
00328     double wx, wy;
00329     int cx, cy;
00330 
00331     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "dd:GnomeCanvas.w2c",
00332                                  kwlist, &wx, &wy))
00333         return NULL;
00334     gnome_canvas_w2c(GNOME_CANVAS(self->obj), wx, wy, &cx, &cy);
00335 
00336     return Py_BuildValue("(ii)", cx, cy);
00337 }
00338 #line 339 "canvas.c"
00339 
00340 
00341 #line 302 "canvas.override"
00342 static PyObject *
00343 _wrap_gnome_canvas_w2c_d(PyGObject *self, PyObject *args, PyObject *kwargs)
00344 {
00345     static char *kwlist[] = { "wx", "wy", NULL };
00346     double wx, wy;
00347     double cx, cy;
00348 
00349     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "dd:GnomeCanvas.w2c_d",
00350                                  kwlist, &wx, &wy))
00351         return NULL;
00352     gnome_canvas_w2c_d(GNOME_CANVAS(self->obj), wx, wy, &cx, &cy);
00353 
00354     return Py_BuildValue("(dd)", cx, cy);
00355 }
00356 #line 357 "canvas.c"
00357 
00358 
00359 #line 318 "canvas.override"
00360 static PyObject *
00361 _wrap_gnome_canvas_c2w(PyGObject *self, PyObject *args, PyObject *kwargs)
00362 {
00363     static char *kwlist[] = { "cx", "cy", NULL };
00364     int cx, cy;
00365     double wx, wy;
00366 
00367     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GnomeCanvas.w2c",
00368                                  kwlist, &cx, &cy))
00369         return NULL;
00370     gnome_canvas_c2w(GNOME_CANVAS(self->obj), cx, cy, &wx, &wy);
00371 
00372     return Py_BuildValue("(dd)", wx, wy);
00373 }
00374 #line 375 "canvas.c"
00375 
00376 
00377 #line 334 "canvas.override"
00378 static PyObject *
00379 _wrap_gnome_canvas_window_to_world(PyGObject *self, PyObject *args,
00380                                PyObject *kwargs)
00381 {
00382     static char *kwlist[] = { "winx", "winy", NULL };
00383     double winx, winy, worldx, worldy;
00384 
00385     if (!PyArg_ParseTupleAndKeywords(args, kwargs,
00386                                  "dd:GnomeCanvas.window_to_world",
00387                                  kwlist, &winx, &winy))
00388         return NULL;
00389     gnome_canvas_window_to_world(GNOME_CANVAS(self->obj), winx, winy,
00390                              &worldx, &worldy);
00391 
00392     return Py_BuildValue("(dd)", worldx, worldy);
00393 }
00394 #line 395 "canvas.c"
00395 
00396 
00397 #line 352 "canvas.override"
00398 static PyObject *
00399 _wrap_gnome_canvas_world_to_window(PyGObject *self, PyObject *args,
00400                                PyObject *kwargs)
00401 {
00402     static char *kwlist[] = { "worldx", "worldy", NULL };
00403     double winx, winy, worldx, worldy;
00404 
00405     if (!PyArg_ParseTupleAndKeywords(args, kwargs,
00406                                  "dd:GnomeCanvas.window_to_world",
00407                                  kwlist, &worldx, &worldy))
00408         return NULL;
00409     gnome_canvas_world_to_window(GNOME_CANVAS(self->obj), worldx, worldy,
00410                              &winx, &winy);
00411 
00412     return Py_BuildValue("(dd)", winx, winy);
00413 }
00414 #line 415 "canvas.c"
00415 
00416 
00417 static PyObject *
00418 _wrap_gnome_canvas_get_color(PyGObject *self, PyObject *args, PyObject *kwargs)
00419 {
00420     static char *kwlist[] = { "spec", "color", NULL };
00421     char *spec;
00422     PyObject *py_color;
00423     int ret;
00424     GdkColor *color = NULL;
00425 
00426     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sO:GnomeCanvas.get_color", kwlist, &spec, &py_color))
00427         return NULL;
00428     if (pyg_boxed_check(py_color, GDK_TYPE_COLOR))
00429         color = pyg_boxed_get(py_color, GdkColor);
00430     else {
00431         PyErr_SetString(PyExc_TypeError, "color should be a GdkColor");
00432         return NULL;
00433     }
00434     ret = gnome_canvas_get_color(GNOME_CANVAS(self->obj), spec, color);
00435     return PyInt_FromLong(ret);
00436 }
00437 
00438 static PyObject *
00439 _wrap_gnome_canvas_get_color_pixel(PyGObject *self, PyObject *args, PyObject *kwargs)
00440 {
00441     static char *kwlist[] = { "rgba", NULL };
00442     gulong ret;
00443     guint rgba;
00444 
00445     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "I:GnomeCanvas.get_color_pixel", kwlist, &rgba))
00446         return NULL;
00447     ret = gnome_canvas_get_color_pixel(GNOME_CANVAS(self->obj), rgba);
00448     return PyLong_FromUnsignedLong(ret);
00449 }
00450 
00451 static PyObject *
00452 _wrap_gnome_canvas_set_dither(PyGObject *self, PyObject *args, PyObject *kwargs)
00453 {
00454     static char *kwlist[] = { "dither", NULL };
00455     PyObject *py_dither = NULL;
00456     GdkRgbDither dither;
00457 
00458     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GnomeCanvas.set_dither", kwlist, &py_dither))
00459         return NULL;
00460     if (pyg_enum_get_value(GDK_TYPE_RGB_DITHER, py_dither, (gint *)&dither))
00461         return NULL;
00462     gnome_canvas_set_dither(GNOME_CANVAS(self->obj), dither);
00463     Py_INCREF(Py_None);
00464     return Py_None;
00465 }
00466 
00467 static PyObject *
00468 _wrap_gnome_canvas_get_dither(PyGObject *self)
00469 {
00470     gint ret;
00471 
00472     ret = gnome_canvas_get_dither(GNOME_CANVAS(self->obj));
00473     return pyg_enum_from_gtype(GDK_TYPE_RGB_DITHER, ret);
00474 }
00475 
00476 static PyMethodDef _PyGnomeCanvas_methods[] = {
00477     { "root", (PyCFunction)_wrap_gnome_canvas_root, METH_NOARGS },
00478     { "set_pixels_per_unit", (PyCFunction)_wrap_gnome_canvas_set_pixels_per_unit, METH_VARARGS|METH_KEYWORDS },
00479     { "set_scroll_region", (PyCFunction)_wrap_gnome_canvas_set_scroll_region, METH_VARARGS|METH_KEYWORDS },
00480     { "get_scroll_region", (PyCFunction)_wrap_gnome_canvas_get_scroll_region, METH_NOARGS },
00481     { "get_center_scroll_region", (PyCFunction)_wrap_gnome_canvas_get_center_scroll_region, METH_NOARGS },
00482     { "set_center_scroll_region", (PyCFunction)_wrap_gnome_canvas_set_center_scroll_region, METH_VARARGS|METH_KEYWORDS },
00483     { "scroll_to", (PyCFunction)_wrap_gnome_canvas_scroll_to, METH_VARARGS|METH_KEYWORDS },
00484     { "get_scroll_offsets", (PyCFunction)_wrap_gnome_canvas_get_scroll_offsets, METH_NOARGS },
00485     { "update_now", (PyCFunction)_wrap_gnome_canvas_update_now, METH_NOARGS },
00486     { "get_item_at", (PyCFunction)_wrap_gnome_canvas_get_item_at, METH_VARARGS|METH_KEYWORDS },
00487     { "w2c_affine", (PyCFunction)_wrap_gnome_canvas_w2c_affine, METH_VARARGS },
00488     { "w2c", (PyCFunction)_wrap_gnome_canvas_w2c, METH_VARARGS|METH_KEYWORDS },
00489     { "w2c_d", (PyCFunction)_wrap_gnome_canvas_w2c_d, METH_VARARGS|METH_KEYWORDS },
00490     { "c2w", (PyCFunction)_wrap_gnome_canvas_c2w, METH_VARARGS|METH_KEYWORDS },
00491     { "window_to_world", (PyCFunction)_wrap_gnome_canvas_window_to_world, METH_VARARGS|METH_KEYWORDS },
00492     { "world_to_window", (PyCFunction)_wrap_gnome_canvas_world_to_window, METH_VARARGS|METH_KEYWORDS },
00493     { "get_color", (PyCFunction)_wrap_gnome_canvas_get_color, METH_VARARGS|METH_KEYWORDS },
00494     { "get_color_pixel", (PyCFunction)_wrap_gnome_canvas_get_color_pixel, METH_VARARGS|METH_KEYWORDS },
00495     { "set_dither", (PyCFunction)_wrap_gnome_canvas_set_dither, METH_VARARGS|METH_KEYWORDS },
00496     { "get_dither", (PyCFunction)_wrap_gnome_canvas_get_dither, METH_NOARGS },
00497     { NULL, NULL, 0 }
00498 };
00499 
00500 PyTypeObject PyGnomeCanvas_Type = {
00501     PyObject_HEAD_INIT(NULL)
00502     0,                             /* ob_size */
00503     "gnome.canvas.Canvas",                /* tp_name */
00504     sizeof(PyGObject),              /* tp_basicsize */
00505     0,                             /* tp_itemsize */
00506     /* methods */
00507     (destructor)0,   /* tp_dealloc */
00508     (printfunc)0,                  /* tp_print */
00509     (getattrfunc)0,  /* tp_getattr */
00510     (setattrfunc)0,  /* tp_setattr */
00511     (cmpfunc)0,             /* tp_compare */
00512     (reprfunc)0,            /* tp_repr */
00513     (PyNumberMethods*)0,     /* tp_as_number */
00514     (PySequenceMethods*)0, /* tp_as_sequence */
00515     (PyMappingMethods*)0,   /* tp_as_mapping */
00516     (hashfunc)0,            /* tp_hash */
00517     (ternaryfunc)0,         /* tp_call */
00518     (reprfunc)0,            /* tp_str */
00519     (getattrofunc)0, /* tp_getattro */
00520     (setattrofunc)0, /* tp_setattro */
00521     (PyBufferProcs*)0,      /* tp_as_buffer */
00522     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
00523     NULL,                          /* Documentation string */
00524     (traverseproc)0, /* tp_traverse */
00525     (inquiry)0,             /* tp_clear */
00526     (richcmpfunc)0,  /* tp_richcompare */
00527     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
00528     (getiterfunc)0,         /* tp_iter */
00529     (iternextfunc)0, /* tp_iternext */
00530     _PyGnomeCanvas_methods,               /* tp_methods */
00531     0,                             /* tp_members */
00532     0,                      /* tp_getset */
00533     NULL,                          /* tp_base */
00534     NULL,                          /* tp_dict */
00535     (descrgetfunc)0, /* tp_descr_get */
00536     (descrsetfunc)0, /* tp_descr_set */
00537     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
00538     (initproc)_wrap_gnome_canvas_new,            /* tp_init */
00539     (allocfunc)0,           /* tp_alloc */
00540     (newfunc)0,               /* tp_new */
00541     (freefunc)0,             /* tp_free */
00542     (inquiry)0              /* tp_is_gc */
00543 };
00544 
00545 
00546 
00547 /* ----------- GnomeCanvasItem ----------- */
00548 
00549 #line 140 "canvas.override"
00550 static PyObject *
00551 _wrap_gnome_canvas_item_set (PyGObject *self, PyObject *args,
00552                           PyObject *kwargs)
00553 {
00554     GType              type;
00555     GnomeCanvasItem   *item;
00556     GObjectClass      *class;
00557     gint              pos = 0;
00558     PyObject          *value;
00559     PyObject          *key;
00560 
00561     item = GNOME_CANVAS_ITEM(self->obj);
00562     type = G_OBJECT_TYPE(item);
00563     class = G_OBJECT_GET_CLASS(item);
00564 
00565     g_object_freeze_notify (G_OBJECT(item));
00566 
00567     while (kwargs && PyDict_Next (kwargs, &pos, &key, &value)) {
00568        gchar *key_str = PyString_AsString (key);
00569        GParamSpec *pspec;
00570        GValue gvalue ={ 0, };
00571 
00572        pspec = g_object_class_find_property (class, key_str);
00573        if (!pspec) {
00574            gchar buf[512];
00575 
00576            g_snprintf(buf, sizeof(buf),
00577                      "canvas item `%s' doesn't support property `%s'",
00578                      g_type_name(type), key_str);
00579            PyErr_SetString(PyExc_TypeError, buf);
00580            g_object_thaw_notify (G_OBJECT(item));
00581            return NULL;
00582        }
00583 
00584        g_value_init(&gvalue, G_PARAM_SPEC_VALUE_TYPE(pspec));
00585        if (pyg_value_from_pyobject(&gvalue, value)) {
00586            gchar buf[512];
00587 
00588            g_snprintf(buf, sizeof(buf),
00589                      "could not convert value for property `%s'", key_str);
00590            PyErr_SetString(PyExc_TypeError, buf);
00591            g_object_thaw_notify (G_OBJECT(item));
00592            return NULL;
00593        }
00594        g_object_set_property(G_OBJECT(item), key_str, &gvalue);
00595        gnome_canvas_item_request_update(item);
00596        g_value_unset(&gvalue);
00597     }
00598     g_object_thaw_notify (G_OBJECT(item));
00599 
00600     Py_INCREF(Py_None);
00601     return Py_None;
00602 }
00603 #line 604 "canvas.c"
00604 
00605 
00606 static PyObject *
00607 _wrap_gnome_canvas_item_move(PyGObject *self, PyObject *args, PyObject *kwargs)
00608 {
00609     static char *kwlist[] = { "dx", "dy", NULL };
00610     double dx, dy;
00611 
00612     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "dd:GnomeCanvasItem.move", kwlist, &dx, &dy))
00613         return NULL;
00614     gnome_canvas_item_move(GNOME_CANVAS_ITEM(self->obj), dx, dy);
00615     Py_INCREF(Py_None);
00616     return Py_None;
00617 }
00618 
00619 #line 389 "canvas.override"
00620 static PyObject *
00621 _wrap_gnome_canvas_item_affine_relative(PyGObject *self, PyObject *args) {
00622     PyObject *py_affine;
00623     double affine[6];
00624 
00625     if (!PyArg_ParseTuple(args, "O!:GnomeCanvasItem.affine_relative",
00626                        &PyTuple_Type, &py_affine))
00627        return NULL;
00628 
00629     if ((gnomecanvasaffine_to_value(py_affine, affine)) == -1)
00630        return NULL;
00631 
00632     gnome_canvas_item_affine_relative(GNOME_CANVAS_ITEM(self->obj), affine);
00633 
00634     Py_INCREF(Py_None);
00635     return Py_None;
00636 }
00637 #line 638 "canvas.c"
00638 
00639 
00640 #line 370 "canvas.override"
00641 static PyObject *
00642 _wrap_gnome_canvas_item_affine_absolute(PyGObject *self, PyObject *args) {
00643     PyObject *py_affine;
00644     double affine[6];
00645 
00646     if (!PyArg_ParseTuple(args, "O!:GnomeCanvasItem.affine_absolute",
00647                        &PyTuple_Type, &py_affine))
00648        return NULL;
00649 
00650     if ((gnomecanvasaffine_to_value(py_affine, affine)) == -1)
00651        return NULL;
00652 
00653     gnome_canvas_item_affine_absolute(GNOME_CANVAS_ITEM(self->obj), affine);
00654 
00655     Py_INCREF(Py_None);
00656     return Py_None;
00657 }
00658 #line 659 "canvas.c"
00659 
00660 
00661 static PyObject *
00662 _wrap_gnome_canvas_item_raise(PyGObject *self, PyObject *args, PyObject *kwargs)
00663 {
00664     static char *kwlist[] = { "positions", NULL };
00665     int positions;
00666 
00667     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:GnomeCanvasItem.raise", kwlist, &positions))
00668         return NULL;
00669     gnome_canvas_item_raise(GNOME_CANVAS_ITEM(self->obj), positions);
00670     Py_INCREF(Py_None);
00671     return Py_None;
00672 }
00673 
00674 static PyObject *
00675 _wrap_gnome_canvas_item_lower(PyGObject *self, PyObject *args, PyObject *kwargs)
00676 {
00677     static char *kwlist[] = { "positions", NULL };
00678     int positions;
00679 
00680     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:GnomeCanvasItem.lower", kwlist, &positions))
00681         return NULL;
00682     gnome_canvas_item_lower(GNOME_CANVAS_ITEM(self->obj), positions);
00683     Py_INCREF(Py_None);
00684     return Py_None;
00685 }
00686 
00687 static PyObject *
00688 _wrap_gnome_canvas_item_raise_to_top(PyGObject *self)
00689 {
00690     gnome_canvas_item_raise_to_top(GNOME_CANVAS_ITEM(self->obj));
00691     Py_INCREF(Py_None);
00692     return Py_None;
00693 }
00694 
00695 static PyObject *
00696 _wrap_gnome_canvas_item_lower_to_bottom(PyGObject *self)
00697 {
00698     gnome_canvas_item_lower_to_bottom(GNOME_CANVAS_ITEM(self->obj));
00699     Py_INCREF(Py_None);
00700     return Py_None;
00701 }
00702 
00703 static PyObject *
00704 _wrap_gnome_canvas_item_show(PyGObject *self)
00705 {
00706     gnome_canvas_item_show(GNOME_CANVAS_ITEM(self->obj));
00707     Py_INCREF(Py_None);
00708     return Py_None;
00709 }
00710 
00711 static PyObject *
00712 _wrap_gnome_canvas_item_hide(PyGObject *self)
00713 {
00714     gnome_canvas_item_hide(GNOME_CANVAS_ITEM(self->obj));
00715     Py_INCREF(Py_None);
00716     return Py_None;
00717 }
00718 
00719 #line 195 "canvas.override"
00720 static PyObject *
00721 _wrap_gnome_canvas_item_w2i(PyGObject *self, PyObject *args,
00722                          PyObject *kwargs)
00723 {
00724     static char *kwlist[] = { "x", "y", NULL };
00725     double x, y;
00726 
00727     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "dd:GnomeCanvasItem.w2i", kwlist, &x, &y))
00728         return NULL;
00729     gnome_canvas_item_w2i(GNOME_CANVAS_ITEM(self->obj), &x, &y);
00730 
00731     return Py_BuildValue("(dd)", x, y);
00732 }
00733 #line 734 "canvas.c"
00734 
00735 
00736 #line 210 "canvas.override"
00737 static PyObject *
00738 _wrap_gnome_canvas_item_i2w(PyGObject *self, PyObject *args,
00739                          PyObject *kwargs)
00740 {
00741     static char *kwlist[] = { "x", "y", NULL };
00742     double x, y;
00743 
00744     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "dd:GnomeCanvasItem.i2w", kwlist, &x, &y))
00745         return NULL;
00746     gnome_canvas_item_i2w(GNOME_CANVAS_ITEM(self->obj), &x, &y);
00747 
00748     return Py_BuildValue("(dd)", x, y);
00749 }
00750 #line 751 "canvas.c"
00751 
00752 
00753 #line 424 "canvas.override"
00754 static PyObject *
00755 _wrap_gnome_canvas_item_i2w_affine(PyGObject *self, PyObject *args) {
00756     PyObject *py_affine;
00757     double affine[6];
00758 
00759     if (!PyArg_ParseTuple(args, "O!:GnomeCanvasItem.i2w_affine",
00760                        &PyTuple_Type, &py_affine))
00761        return NULL;
00762     if ((gnomecanvasaffine_to_value(py_affine, affine)) == -1)
00763        return NULL;
00764     gnome_canvas_item_i2w_affine(GNOME_CANVAS_ITEM(self->obj), affine);
00765 
00766     return gnomecanvasaffine_from_value(affine);
00767 }
00768 #line 769 "canvas.c"
00769 
00770 
00771 #line 408 "canvas.override"
00772 static PyObject *
00773 _wrap_gnome_canvas_item_i2c_affine(PyGObject *self, PyObject *args) {
00774     PyObject *py_affine;
00775     double affine[6];
00776 
00777     if (!PyArg_ParseTuple(args, "O!:GnomeCanvasItem.i2c_affine",
00778                        &PyTuple_Type, &py_affine))
00779        return NULL;
00780     if ((gnomecanvasaffine_to_value(py_affine, affine)) == -1)
00781        return NULL;
00782     gnome_canvas_item_i2c_affine(GNOME_CANVAS_ITEM(self->obj), affine);
00783 
00784     return gnomecanvasaffine_from_value(affine);
00785 }
00786 #line 787 "canvas.c"
00787 
00788 
00789 static PyObject *
00790 _wrap_gnome_canvas_item_reparent(PyGObject *self, PyObject *args, PyObject *kwargs)
00791 {
00792     static char *kwlist[] = { "new_group", NULL };
00793     PyGObject *new_group;
00794 
00795     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:GnomeCanvasItem.reparent", kwlist, &PyGnomeCanvasGroup_Type, &new_group))
00796         return NULL;
00797     gnome_canvas_item_reparent(GNOME_CANVAS_ITEM(self->obj), GNOME_CANVAS_GROUP(new_group->obj));
00798     Py_INCREF(Py_None);
00799     return Py_None;
00800 }
00801 
00802 #line 581 "canvas.override"
00803 static PyObject *
00804 _wrap_gnome_canvas_item_grab(PyGObject *self, PyObject *args,
00805                           PyObject *kwargs)
00806 {
00807     static char *kwlist[] = { "event_mask", "cursor", "etime", NULL };
00808     PyObject *py_event_mask = NULL, *py_cursor = Py_None, *py_time = NULL;
00809     GdkCursor *cursor = NULL;
00810     unsigned int event_mask = 0;
00811     guint32 etime = GDK_CURRENT_TIME;
00812     int retval;
00813 
00814     if (!PyArg_ParseTupleAndKeywords(args, kwargs,
00815                                  "|OOO!:GnomeCanvasItem.grab", kwlist,
00816                                  &py_event_mask,
00817                                  &py_cursor,
00818                                  &PyLong_Type, &py_time))
00819         return NULL;
00820 
00821     if (py_event_mask && pyg_flags_get_value(GDK_TYPE_EVENT_MASK,
00822                                         py_event_mask,
00823                                         (gint *)&event_mask))
00824         return NULL;
00825 
00826     if (pyg_boxed_check(py_cursor, GDK_TYPE_CURSOR))
00827         cursor = pyg_boxed_get(py_cursor, GdkCursor);
00828     else if (py_cursor != Py_None) {
00829         PyErr_SetString(PyExc_TypeError, "cursor should be a GdkCursor or None");
00830         return NULL;
00831     }
00832 
00833     if (py_time)
00834         etime = PyLong_AsUnsignedLong(py_time);
00835 
00836     retval = gnome_canvas_item_grab(GNOME_CANVAS_ITEM(self->obj),
00837                                event_mask, cursor, etime);
00838 
00839     return PyInt_FromLong(retval);
00840 }
00841 #line 842 "canvas.c"
00842 
00843 
00844 static PyObject *
00845 _wrap_gnome_canvas_item_grab_focus(PyGObject *self)
00846 {
00847     gnome_canvas_item_grab_focus(GNOME_CANVAS_ITEM(self->obj));
00848     Py_INCREF(Py_None);
00849     return Py_None;
00850 }
00851 
00852 #line 225 "canvas.override"
00853 static PyObject *
00854 _wrap_gnome_canvas_item_get_bounds(PyGObject *self, PyObject *args)
00855 {
00856     double x1, y1, x2, y2;
00857 
00858     gnome_canvas_item_get_bounds(GNOME_CANVAS_ITEM(self->obj),
00859                              &x1, &y1, &x2, &y2);
00860 
00861     return Py_BuildValue("(dddd)", x1, y1, x2, y2);
00862 }
00863 #line 864 "canvas.c"
00864 
00865 
00866 static PyMethodDef _PyGnomeCanvasItem_methods[] = {
00867     { "set", (PyCFunction)_wrap_gnome_canvas_item_set, METH_VARARGS|METH_KEYWORDS },
00868     { "move", (PyCFunction)_wrap_gnome_canvas_item_move, METH_VARARGS|METH_KEYWORDS },
00869     { "affine_relative", (PyCFunction)_wrap_gnome_canvas_item_affine_relative, METH_VARARGS },
00870     { "affine_absolute", (PyCFunction)_wrap_gnome_canvas_item_affine_absolute, METH_VARARGS },
00871     { "raise_", (PyCFunction)_wrap_gnome_canvas_item_raise, METH_VARARGS|METH_KEYWORDS },
00872     { "lower", (PyCFunction)_wrap_gnome_canvas_item_lower, METH_VARARGS|METH_KEYWORDS },
00873     { "raise_to_top", (PyCFunction)_wrap_gnome_canvas_item_raise_to_top, METH_NOARGS },
00874     { "lower_to_bottom", (PyCFunction)_wrap_gnome_canvas_item_lower_to_bottom, METH_NOARGS },
00875     { "show", (PyCFunction)_wrap_gnome_canvas_item_show, METH_NOARGS },
00876     { "hide", (PyCFunction)_wrap_gnome_canvas_item_hide, METH_NOARGS },
00877     { "w2i", (PyCFunction)_wrap_gnome_canvas_item_w2i, METH_VARARGS|METH_KEYWORDS },
00878     { "i2w", (PyCFunction)_wrap_gnome_canvas_item_i2w, METH_VARARGS|METH_KEYWORDS },
00879     { "i2w_affine", (PyCFunction)_wrap_gnome_canvas_item_i2w_affine, METH_VARARGS },
00880     { "i2c_affine", (PyCFunction)_wrap_gnome_canvas_item_i2c_affine, METH_VARARGS },
00881     { "reparent", (PyCFunction)_wrap_gnome_canvas_item_reparent, METH_VARARGS|METH_KEYWORDS },
00882     { "grab", (PyCFunction)_wrap_gnome_canvas_item_grab, METH_VARARGS|METH_KEYWORDS },
00883     { "grab_focus", (PyCFunction)_wrap_gnome_canvas_item_grab_focus, METH_NOARGS },
00884     { "get_bounds", (PyCFunction)_wrap_gnome_canvas_item_get_bounds, METH_NOARGS },
00885     { NULL, NULL, 0 }
00886 };
00887 
00888 PyTypeObject PyGnomeCanvasItem_Type = {
00889     PyObject_HEAD_INIT(NULL)
00890     0,                             /* ob_size */
00891     "gnome.canvas.CanvasItem",                   /* tp_name */
00892     sizeof(PyGObject),              /* tp_basicsize */
00893     0,                             /* tp_itemsize */
00894     /* methods */
00895     (destructor)0,   /* tp_dealloc */
00896     (printfunc)0,                  /* tp_print */
00897     (getattrfunc)0,  /* tp_getattr */
00898     (setattrfunc)0,  /* tp_setattr */
00899     (cmpfunc)0,             /* tp_compare */
00900     (reprfunc)0,            /* tp_repr */
00901     (PyNumberMethods*)0,     /* tp_as_number */
00902     (PySequenceMethods*)0, /* tp_as_sequence */
00903     (PyMappingMethods*)0,   /* tp_as_mapping */
00904     (hashfunc)0,            /* tp_hash */
00905     (ternaryfunc)0,         /* tp_call */
00906     (reprfunc)0,            /* tp_str */
00907     (getattrofunc)0, /* tp_getattro */
00908     (setattrofunc)0, /* tp_setattro */
00909     (PyBufferProcs*)0,      /* tp_as_buffer */
00910     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
00911     NULL,                          /* Documentation string */
00912     (traverseproc)0, /* tp_traverse */
00913     (inquiry)0,             /* tp_clear */
00914     (richcmpfunc)0,  /* tp_richcompare */
00915     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
00916     (getiterfunc)0,         /* tp_iter */
00917     (iternextfunc)0, /* tp_iternext */
00918     _PyGnomeCanvasItem_methods,                  /* tp_methods */
00919     0,                             /* tp_members */
00920     0,                      /* tp_getset */
00921     NULL,                          /* tp_base */
00922     NULL,                          /* tp_dict */
00923     (descrgetfunc)0, /* tp_descr_get */
00924     (descrsetfunc)0, /* tp_descr_set */
00925     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
00926     (initproc)0,            /* tp_init */
00927     (allocfunc)0,           /* tp_alloc */
00928     (newfunc)0,               /* tp_new */
00929     (freefunc)0,             /* tp_free */
00930     (inquiry)0              /* tp_is_gc */
00931 };
00932 
00933 
00934 
00935 /* ----------- GnomeCanvasGroup ----------- */
00936 
00937 #line 73 "canvas.override"
00938 static PyObject *
00939 _wrap_gnome_canvas_item_new (PyGObject *self, PyObject *args,
00940                           PyObject *kwargs)
00941 
00942 {
00943     PyObject          *pytype;
00944     GType              type;
00945     GnomeCanvasItem   *item;
00946     GObjectClass      *class;
00947     gint              pos;
00948     PyObject          *value;
00949     PyObject          *key;
00950 
00951     if (!PyArg_ParseTuple (args, "O:gnome.canvas.CanvasGroup.add_item",
00952                         &pytype)) {
00953        return NULL;
00954     }
00955 
00956     type = pyg_type_from_object (pytype);
00957     item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (self->obj), type, NULL);
00958     if (!item) {
00959        PyErr_SetString (PyExc_RuntimeError,
00960                       "could not create canvas item object");
00961        return NULL;
00962     }
00963 
00964     class = G_OBJECT_GET_CLASS(item);
00965     g_object_freeze_notify (G_OBJECT(item));
00966     pos = 0;
00967     /* For each keyword ... */
00968     while (kwargs && PyDict_Next (kwargs, &pos, &key, &value)) {
00969        gchar *key_str = PyString_AsString (key);
00970        GParamSpec *pspec;
00971        GValue gvalue ={ 0, };
00972 
00973        pspec = g_object_class_find_property (class, key_str);
00974        if (!pspec) {
00975            gchar buf[512];
00976 
00977            g_snprintf(buf, sizeof(buf),
00978                      "canvas item `%s' doesn't support property `%s'",
00979                      g_type_name(type), key_str);
00980            PyErr_SetString(PyExc_TypeError, buf);
00981            gtk_object_destroy(GTK_OBJECT(item));
00982            return NULL;
00983        }
00984 
00985        g_value_init(&gvalue, G_PARAM_SPEC_VALUE_TYPE(pspec));
00986        if (pyg_value_from_pyobject(&gvalue, value)) {
00987            gchar buf[512];
00988 
00989            g_snprintf(buf, sizeof(buf),
00990                      "could not convert value for property `%s'", key_str);
00991            PyErr_SetString(PyExc_TypeError, buf);
00992            gtk_object_destroy(GTK_OBJECT(item));
00993            return NULL;
00994        }
00995        g_object_set_property(G_OBJECT(item), key_str, &gvalue);
00996        g_value_unset(&gvalue);
00997     }
00998 
00999     g_object_thaw_notify (G_OBJECT(item));
01000 
01001     return pygobject_new ((GObject *)item);
01002 }
01003 #line 1004 "canvas.c"
01004 
01005 
01006 static PyMethodDef _PyGnomeCanvasGroup_methods[] = {
01007     { "add", (PyCFunction)_wrap_gnome_canvas_item_new, METH_VARARGS|METH_KEYWORDS },
01008     { NULL, NULL, 0 }
01009 };
01010 
01011 #line 456 "canvas.override"
01012 static PyObject *
01013 _wrap_gnome_canvas_group__get_item_list(PyGObject *self, void *closure)
01014 {
01015     GnomeCanvasGroup *parent = GNOME_CANVAS_GROUP(self->obj);
01016     PyObject         *list, *item;
01017     GList            *l;
01018 
01019     list = PyList_New(0);
01020     for (l = parent->item_list; l != NULL; l = l->next) {
01021        item = pygobject_new(G_OBJECT(l->data));
01022        PyList_Append(list, item);
01023        Py_DECREF(item);
01024     }
01025     return list;
01026 }
01027 
01028 #line 1029 "canvas.c"
01029 
01030 
01031 static PyGetSetDef gnome_canvas_group_getsets[] = {
01032     { "item_list", (getter)_wrap_gnome_canvas_group__get_item_list, (setter)0 },
01033     { NULL, (getter)0, (setter)0 },
01034 };
01035 
01036 PyTypeObject PyGnomeCanvasGroup_Type = {
01037     PyObject_HEAD_INIT(NULL)
01038     0,                             /* ob_size */
01039     "gnome.canvas.CanvasGroup",                  /* tp_name */
01040     sizeof(PyGObject),              /* tp_basicsize */
01041     0,                             /* tp_itemsize */
01042     /* methods */
01043     (destructor)0,   /* tp_dealloc */
01044     (printfunc)0,                  /* tp_print */
01045     (getattrfunc)0,  /* tp_getattr */
01046     (setattrfunc)0,  /* tp_setattr */
01047     (cmpfunc)0,             /* tp_compare */
01048     (reprfunc)0,            /* tp_repr */
01049     (PyNumberMethods*)0,     /* tp_as_number */
01050     (PySequenceMethods*)0, /* tp_as_sequence */
01051     (PyMappingMethods*)0,   /* tp_as_mapping */
01052     (hashfunc)0,            /* tp_hash */
01053     (ternaryfunc)0,         /* tp_call */
01054     (reprfunc)0,            /* tp_str */
01055     (getattrofunc)0, /* tp_getattro */
01056     (setattrofunc)0, /* tp_setattro */
01057     (PyBufferProcs*)0,      /* tp_as_buffer */
01058     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01059     NULL,                          /* Documentation string */
01060     (traverseproc)0, /* tp_traverse */
01061     (inquiry)0,             /* tp_clear */
01062     (richcmpfunc)0,  /* tp_richcompare */
01063     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01064     (getiterfunc)0,         /* tp_iter */
01065     (iternextfunc)0, /* tp_iternext */
01066     _PyGnomeCanvasGroup_methods,                 /* tp_methods */
01067     0,                             /* tp_members */
01068     gnome_canvas_group_getsets,                         /* tp_getset */
01069     NULL,                          /* tp_base */
01070     NULL,                          /* tp_dict */
01071     (descrgetfunc)0, /* tp_descr_get */
01072     (descrsetfunc)0, /* tp_descr_set */
01073     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01074     (initproc)0,            /* tp_init */
01075     (allocfunc)0,           /* tp_alloc */
01076     (newfunc)0,               /* tp_new */
01077     (freefunc)0,             /* tp_free */
01078     (inquiry)0              /* tp_is_gc */
01079 };
01080 
01081 
01082 
01083 /* ----------- GnomeCanvasClipgroup ----------- */
01084 
01085 PyTypeObject PyGnomeCanvasClipgroup_Type = {
01086     PyObject_HEAD_INIT(NULL)
01087     0,                             /* ob_size */
01088     "gnome.canvas.CanvasClipgroup",                     /* tp_name */
01089     sizeof(PyGObject),              /* tp_basicsize */
01090     0,                             /* tp_itemsize */
01091     /* methods */
01092     (destructor)0,   /* tp_dealloc */
01093     (printfunc)0,                  /* tp_print */
01094     (getattrfunc)0,  /* tp_getattr */
01095     (setattrfunc)0,  /* tp_setattr */
01096     (cmpfunc)0,             /* tp_compare */
01097     (reprfunc)0,            /* tp_repr */
01098     (PyNumberMethods*)0,     /* tp_as_number */
01099     (PySequenceMethods*)0, /* tp_as_sequence */
01100     (PyMappingMethods*)0,   /* tp_as_mapping */
01101     (hashfunc)0,            /* tp_hash */
01102     (ternaryfunc)0,         /* tp_call */
01103     (reprfunc)0,            /* tp_str */
01104     (getattrofunc)0, /* tp_getattro */
01105     (setattrofunc)0, /* tp_setattro */
01106     (PyBufferProcs*)0,      /* tp_as_buffer */
01107     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01108     NULL,                          /* Documentation string */
01109     (traverseproc)0, /* tp_traverse */
01110     (inquiry)0,             /* tp_clear */
01111     (richcmpfunc)0,  /* tp_richcompare */
01112     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01113     (getiterfunc)0,         /* tp_iter */
01114     (iternextfunc)0, /* tp_iternext */
01115     NULL,                   /* tp_methods */
01116     0,                             /* tp_members */
01117     0,                      /* tp_getset */
01118     NULL,                          /* tp_base */
01119     NULL,                          /* tp_dict */
01120     (descrgetfunc)0, /* tp_descr_get */
01121     (descrsetfunc)0, /* tp_descr_set */
01122     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01123     (initproc)0,            /* tp_init */
01124     (allocfunc)0,           /* tp_alloc */
01125     (newfunc)0,               /* tp_new */
01126     (freefunc)0,             /* tp_free */
01127     (inquiry)0              /* tp_is_gc */
01128 };
01129 
01130 
01131 
01132 /* ----------- GnomeCanvasLine ----------- */
01133 
01134 PyTypeObject PyGnomeCanvasLine_Type = {
01135     PyObject_HEAD_INIT(NULL)
01136     0,                             /* ob_size */
01137     "gnome.canvas.CanvasLine",                   /* tp_name */
01138     sizeof(PyGObject),              /* tp_basicsize */
01139     0,                             /* tp_itemsize */
01140     /* methods */
01141     (destructor)0,   /* tp_dealloc */
01142     (printfunc)0,                  /* tp_print */
01143     (getattrfunc)0,  /* tp_getattr */
01144     (setattrfunc)0,  /* tp_setattr */
01145     (cmpfunc)0,             /* tp_compare */
01146     (reprfunc)0,            /* tp_repr */
01147     (PyNumberMethods*)0,     /* tp_as_number */
01148     (PySequenceMethods*)0, /* tp_as_sequence */
01149     (PyMappingMethods*)0,   /* tp_as_mapping */
01150     (hashfunc)0,            /* tp_hash */
01151     (ternaryfunc)0,         /* tp_call */
01152     (reprfunc)0,            /* tp_str */
01153     (getattrofunc)0, /* tp_getattro */
01154     (setattrofunc)0, /* tp_setattro */
01155     (PyBufferProcs*)0,      /* tp_as_buffer */
01156     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01157     NULL,                          /* Documentation string */
01158     (traverseproc)0, /* tp_traverse */
01159     (inquiry)0,             /* tp_clear */
01160     (richcmpfunc)0,  /* tp_richcompare */
01161     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01162     (getiterfunc)0,         /* tp_iter */
01163     (iternextfunc)0, /* tp_iternext */
01164     NULL,                   /* tp_methods */
01165     0,                             /* tp_members */
01166     0,                      /* tp_getset */
01167     NULL,                          /* tp_base */
01168     NULL,                          /* tp_dict */
01169     (descrgetfunc)0, /* tp_descr_get */
01170     (descrsetfunc)0, /* tp_descr_set */
01171     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01172     (initproc)0,            /* tp_init */
01173     (allocfunc)0,           /* tp_alloc */
01174     (newfunc)0,               /* tp_new */
01175     (freefunc)0,             /* tp_free */
01176     (inquiry)0              /* tp_is_gc */
01177 };
01178 
01179 
01180 
01181 /* ----------- GnomeCanvasPixbuf ----------- */
01182 
01183 PyTypeObject PyGnomeCanvasPixbuf_Type = {
01184     PyObject_HEAD_INIT(NULL)
01185     0,                             /* ob_size */
01186     "gnome.canvas.CanvasPixbuf",                 /* tp_name */
01187     sizeof(PyGObject),              /* tp_basicsize */
01188     0,                             /* tp_itemsize */
01189     /* methods */
01190     (destructor)0,   /* tp_dealloc */
01191     (printfunc)0,                  /* tp_print */
01192     (getattrfunc)0,  /* tp_getattr */
01193     (setattrfunc)0,  /* tp_setattr */
01194     (cmpfunc)0,             /* tp_compare */
01195     (reprfunc)0,            /* tp_repr */
01196     (PyNumberMethods*)0,     /* tp_as_number */
01197     (PySequenceMethods*)0, /* tp_as_sequence */
01198     (PyMappingMethods*)0,   /* tp_as_mapping */
01199     (hashfunc)0,            /* tp_hash */
01200     (ternaryfunc)0,         /* tp_call */
01201     (reprfunc)0,            /* tp_str */
01202     (getattrofunc)0, /* tp_getattro */
01203     (setattrofunc)0, /* tp_setattro */
01204     (PyBufferProcs*)0,      /* tp_as_buffer */
01205     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01206     NULL,                          /* Documentation string */
01207     (traverseproc)0, /* tp_traverse */
01208     (inquiry)0,             /* tp_clear */
01209     (richcmpfunc)0,  /* tp_richcompare */
01210     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01211     (getiterfunc)0,         /* tp_iter */
01212     (iternextfunc)0, /* tp_iternext */
01213     NULL,                   /* tp_methods */
01214     0,                             /* tp_members */
01215     0,                      /* tp_getset */
01216     NULL,                          /* tp_base */
01217     NULL,                          /* tp_dict */
01218     (descrgetfunc)0, /* tp_descr_get */
01219     (descrsetfunc)0, /* tp_descr_set */
01220     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01221     (initproc)0,            /* tp_init */
01222     (allocfunc)0,           /* tp_alloc */
01223     (newfunc)0,               /* tp_new */
01224     (freefunc)0,             /* tp_free */
01225     (inquiry)0              /* tp_is_gc */
01226 };
01227 
01228 
01229 
01230 /* ----------- GnomeCanvasRichText ----------- */
01231 
01232 PyTypeObject PyGnomeCanvasRichText_Type = {
01233     PyObject_HEAD_INIT(NULL)
01234     0,                             /* ob_size */
01235     "gnome.canvas.CanvasRichText",               /* tp_name */
01236     sizeof(PyGObject),              /* tp_basicsize */
01237     0,                             /* tp_itemsize */
01238     /* methods */
01239     (destructor)0,   /* tp_dealloc */
01240     (printfunc)0,                  /* tp_print */
01241     (getattrfunc)0,  /* tp_getattr */
01242     (setattrfunc)0,  /* tp_setattr */
01243     (cmpfunc)0,             /* tp_compare */
01244     (reprfunc)0,            /* tp_repr */
01245     (PyNumberMethods*)0,     /* tp_as_number */
01246     (PySequenceMethods*)0, /* tp_as_sequence */
01247     (PyMappingMethods*)0,   /* tp_as_mapping */
01248     (hashfunc)0,            /* tp_hash */
01249     (ternaryfunc)0,         /* tp_call */
01250     (reprfunc)0,            /* tp_str */
01251     (getattrofunc)0, /* tp_getattro */
01252     (setattrofunc)0, /* tp_setattro */
01253     (PyBufferProcs*)0,      /* tp_as_buffer */
01254     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01255     NULL,                          /* Documentation string */
01256     (traverseproc)0, /* tp_traverse */
01257     (inquiry)0,             /* tp_clear */
01258     (richcmpfunc)0,  /* tp_richcompare */
01259     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01260     (getiterfunc)0,         /* tp_iter */
01261     (iternextfunc)0, /* tp_iternext */
01262     NULL,                   /* tp_methods */
01263     0,                             /* tp_members */
01264     0,                      /* tp_getset */
01265     NULL,                          /* tp_base */
01266     NULL,                          /* tp_dict */
01267     (descrgetfunc)0, /* tp_descr_get */
01268     (descrsetfunc)0, /* tp_descr_set */
01269     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01270     (initproc)0,            /* tp_init */
01271     (allocfunc)0,           /* tp_alloc */
01272     (newfunc)0,               /* tp_new */
01273     (freefunc)0,             /* tp_free */
01274     (inquiry)0              /* tp_is_gc */
01275 };
01276 
01277 
01278 
01279 /* ----------- GnomeCanvasShape ----------- */
01280 
01281 PyTypeObject PyGnomeCanvasShape_Type = {
01282     PyObject_HEAD_INIT(NULL)
01283     0,                             /* ob_size */
01284     "gnome.canvas.CanvasShape",                  /* tp_name */
01285     sizeof(PyGObject),              /* tp_basicsize */
01286     0,                             /* tp_itemsize */
01287     /* methods */
01288     (destructor)0,   /* tp_dealloc */
01289     (printfunc)0,                  /* tp_print */
01290     (getattrfunc)0,  /* tp_getattr */
01291     (setattrfunc)0,  /* tp_setattr */
01292     (cmpfunc)0,             /* tp_compare */
01293     (reprfunc)0,            /* tp_repr */
01294     (PyNumberMethods*)0,     /* tp_as_number */
01295     (PySequenceMethods*)0, /* tp_as_sequence */
01296     (PyMappingMethods*)0,   /* tp_as_mapping */
01297     (hashfunc)0,            /* tp_hash */
01298     (ternaryfunc)0,         /* tp_call */
01299     (reprfunc)0,            /* tp_str */
01300     (getattrofunc)0, /* tp_getattro */
01301     (setattrofunc)0, /* tp_setattro */
01302     (PyBufferProcs*)0,      /* tp_as_buffer */
01303     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01304     NULL,                          /* Documentation string */
01305     (traverseproc)0, /* tp_traverse */
01306     (inquiry)0,             /* tp_clear */
01307     (richcmpfunc)0,  /* tp_richcompare */
01308     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01309     (getiterfunc)0,         /* tp_iter */
01310     (iternextfunc)0, /* tp_iternext */
01311     NULL,                   /* tp_methods */
01312     0,                             /* tp_members */
01313     0,                      /* tp_getset */
01314     NULL,                          /* tp_base */
01315     NULL,                          /* tp_dict */
01316     (descrgetfunc)0, /* tp_descr_get */
01317     (descrsetfunc)0, /* tp_descr_set */
01318     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01319     (initproc)0,            /* tp_init */
01320     (allocfunc)0,           /* tp_alloc */
01321     (newfunc)0,               /* tp_new */
01322     (freefunc)0,             /* tp_free */
01323     (inquiry)0              /* tp_is_gc */
01324 };
01325 
01326 
01327 
01328 /* ----------- GnomeCanvasRE ----------- */
01329 
01330 PyTypeObject PyGnomeCanvasRE_Type = {
01331     PyObject_HEAD_INIT(NULL)
01332     0,                             /* ob_size */
01333     "gnome.canvas.CanvasRE",                     /* tp_name */
01334     sizeof(PyGObject),              /* tp_basicsize */
01335     0,                             /* tp_itemsize */
01336     /* methods */
01337     (destructor)0,   /* tp_dealloc */
01338     (printfunc)0,                  /* tp_print */
01339     (getattrfunc)0,  /* tp_getattr */
01340     (setattrfunc)0,  /* tp_setattr */
01341     (cmpfunc)0,             /* tp_compare */
01342     (reprfunc)0,            /* tp_repr */
01343     (PyNumberMethods*)0,     /* tp_as_number */
01344     (PySequenceMethods*)0, /* tp_as_sequence */
01345     (PyMappingMethods*)0,   /* tp_as_mapping */
01346     (hashfunc)0,            /* tp_hash */
01347     (ternaryfunc)0,         /* tp_call */
01348     (reprfunc)0,            /* tp_str */
01349     (getattrofunc)0, /* tp_getattro */
01350     (setattrofunc)0, /* tp_setattro */
01351     (PyBufferProcs*)0,      /* tp_as_buffer */
01352     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01353     NULL,                          /* Documentation string */
01354     (traverseproc)0, /* tp_traverse */
01355     (inquiry)0,             /* tp_clear */
01356     (richcmpfunc)0,  /* tp_richcompare */
01357     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01358     (getiterfunc)0,         /* tp_iter */
01359     (iternextfunc)0, /* tp_iternext */
01360     NULL,                   /* tp_methods */
01361     0,                             /* tp_members */
01362     0,                      /* tp_getset */
01363     NULL,                          /* tp_base */
01364     NULL,                          /* tp_dict */
01365     (descrgetfunc)0, /* tp_descr_get */
01366     (descrsetfunc)0, /* tp_descr_set */
01367     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01368     (initproc)0,            /* tp_init */
01369     (allocfunc)0,           /* tp_alloc */
01370     (newfunc)0,               /* tp_new */
01371     (freefunc)0,             /* tp_free */
01372     (inquiry)0              /* tp_is_gc */
01373 };
01374 
01375 
01376 
01377 /* ----------- GnomeCanvasRect ----------- */
01378 
01379 PyTypeObject PyGnomeCanvasRect_Type = {
01380     PyObject_HEAD_INIT(NULL)
01381     0,                             /* ob_size */
01382     "gnome.canvas.CanvasRect",                   /* tp_name */
01383     sizeof(PyGObject),              /* tp_basicsize */
01384     0,                             /* tp_itemsize */
01385     /* methods */
01386     (destructor)0,   /* tp_dealloc */
01387     (printfunc)0,                  /* tp_print */
01388     (getattrfunc)0,  /* tp_getattr */
01389     (setattrfunc)0,  /* tp_setattr */
01390     (cmpfunc)0,             /* tp_compare */
01391     (reprfunc)0,            /* tp_repr */
01392     (PyNumberMethods*)0,     /* tp_as_number */
01393     (PySequenceMethods*)0, /* tp_as_sequence */
01394     (PyMappingMethods*)0,   /* tp_as_mapping */
01395     (hashfunc)0,            /* tp_hash */
01396     (ternaryfunc)0,         /* tp_call */
01397     (reprfunc)0,            /* tp_str */
01398     (getattrofunc)0, /* tp_getattro */
01399     (setattrofunc)0, /* tp_setattro */
01400     (PyBufferProcs*)0,      /* tp_as_buffer */
01401     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01402     NULL,                          /* Documentation string */
01403     (traverseproc)0, /* tp_traverse */
01404     (inquiry)0,             /* tp_clear */
01405     (richcmpfunc)0,  /* tp_richcompare */
01406     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01407     (getiterfunc)0,         /* tp_iter */
01408     (iternextfunc)0, /* tp_iternext */
01409     NULL,                   /* tp_methods */
01410     0,                             /* tp_members */
01411     0,                      /* tp_getset */
01412     NULL,                          /* tp_base */
01413     NULL,                          /* tp_dict */
01414     (descrgetfunc)0, /* tp_descr_get */
01415     (descrsetfunc)0, /* tp_descr_set */
01416     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01417     (initproc)0,            /* tp_init */
01418     (allocfunc)0,           /* tp_alloc */
01419     (newfunc)0,               /* tp_new */
01420     (freefunc)0,             /* tp_free */
01421     (inquiry)0              /* tp_is_gc */
01422 };
01423 
01424 
01425 
01426 /* ----------- GnomeCanvasEllipse ----------- */
01427 
01428 PyTypeObject PyGnomeCanvasEllipse_Type = {
01429     PyObject_HEAD_INIT(NULL)
01430     0,                             /* ob_size */
01431     "gnome.canvas.CanvasEllipse",                /* tp_name */
01432     sizeof(PyGObject),              /* tp_basicsize */
01433     0,                             /* tp_itemsize */
01434     /* methods */
01435     (destructor)0,   /* tp_dealloc */
01436     (printfunc)0,                  /* tp_print */
01437     (getattrfunc)0,  /* tp_getattr */
01438     (setattrfunc)0,  /* tp_setattr */
01439     (cmpfunc)0,             /* tp_compare */
01440     (reprfunc)0,            /* tp_repr */
01441     (PyNumberMethods*)0,     /* tp_as_number */
01442     (PySequenceMethods*)0, /* tp_as_sequence */
01443     (PyMappingMethods*)0,   /* tp_as_mapping */
01444     (hashfunc)0,            /* tp_hash */
01445     (ternaryfunc)0,         /* tp_call */
01446     (reprfunc)0,            /* tp_str */
01447     (getattrofunc)0, /* tp_getattro */
01448     (setattrofunc)0, /* tp_setattro */
01449     (PyBufferProcs*)0,      /* tp_as_buffer */
01450     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01451     NULL,                          /* Documentation string */
01452     (traverseproc)0, /* tp_traverse */
01453     (inquiry)0,             /* tp_clear */
01454     (richcmpfunc)0,  /* tp_richcompare */
01455     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01456     (getiterfunc)0,         /* tp_iter */
01457     (iternextfunc)0, /* tp_iternext */
01458     NULL,                   /* tp_methods */
01459     0,                             /* tp_members */
01460     0,                      /* tp_getset */
01461     NULL,                          /* tp_base */
01462     NULL,                          /* tp_dict */
01463     (descrgetfunc)0, /* tp_descr_get */
01464     (descrsetfunc)0, /* tp_descr_set */
01465     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01466     (initproc)0,            /* tp_init */
01467     (allocfunc)0,           /* tp_alloc */
01468     (newfunc)0,               /* tp_new */
01469     (freefunc)0,             /* tp_free */
01470     (inquiry)0              /* tp_is_gc */
01471 };
01472 
01473 
01474 
01475 /* ----------- GnomeCanvasPolygon ----------- */
01476 
01477 PyTypeObject PyGnomeCanvasPolygon_Type = {
01478     PyObject_HEAD_INIT(NULL)
01479     0,                             /* ob_size */
01480     "gnome.canvas.CanvasPolygon",                /* tp_name */
01481     sizeof(PyGObject),              /* tp_basicsize */
01482     0,                             /* tp_itemsize */
01483     /* methods */
01484     (destructor)0,   /* tp_dealloc */
01485     (printfunc)0,                  /* tp_print */
01486     (getattrfunc)0,  /* tp_getattr */
01487     (setattrfunc)0,  /* tp_setattr */
01488     (cmpfunc)0,             /* tp_compare */
01489     (reprfunc)0,            /* tp_repr */
01490     (PyNumberMethods*)0,     /* tp_as_number */
01491     (PySequenceMethods*)0, /* tp_as_sequence */
01492     (PyMappingMethods*)0,   /* tp_as_mapping */
01493     (hashfunc)0,            /* tp_hash */
01494     (ternaryfunc)0,         /* tp_call */
01495     (reprfunc)0,            /* tp_str */
01496     (getattrofunc)0, /* tp_getattro */
01497     (setattrofunc)0, /* tp_setattro */
01498     (PyBufferProcs*)0,      /* tp_as_buffer */
01499     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01500     NULL,                          /* Documentation string */
01501     (traverseproc)0, /* tp_traverse */
01502     (inquiry)0,             /* tp_clear */
01503     (richcmpfunc)0,  /* tp_richcompare */
01504     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01505     (getiterfunc)0,         /* tp_iter */
01506     (iternextfunc)0, /* tp_iternext */
01507     NULL,                   /* tp_methods */
01508     0,                             /* tp_members */
01509     0,                      /* tp_getset */
01510     NULL,                          /* tp_base */
01511     NULL,                          /* tp_dict */
01512     (descrgetfunc)0, /* tp_descr_get */
01513     (descrsetfunc)0, /* tp_descr_set */
01514     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01515     (initproc)0,            /* tp_init */
01516     (allocfunc)0,           /* tp_alloc */
01517     (newfunc)0,               /* tp_new */
01518     (freefunc)0,             /* tp_free */
01519     (inquiry)0              /* tp_is_gc */
01520 };
01521 
01522 
01523 
01524 /* ----------- GnomeCanvasBpath ----------- */
01525 
01526 #line 560 "canvas.override"
01527 static PyObject *
01528 _wrap_gnome_canvas_bpath_set_bpath(PyGObject *self, PyObject *args, PyObject *kwargs)
01529 {
01530     static char *kwlist[] = { "bpath", NULL };
01531     PyObject *py_bpath;
01532     GnomeCanvasPathDef *bpath = NULL;
01533 
01534     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GnomeCanvasBpath.set_bpath", kwlist, &py_bpath))
01535         return NULL;
01536     if (pyg_boxed_check(py_bpath, GNOME_TYPE_CANVAS_PATH_DEF))
01537         bpath = pyg_boxed_get(py_bpath, GnomeCanvasPathDef);
01538     else {
01539         PyErr_SetString(PyExc_TypeError, "bpath should be a GnomeCanvasPathDef");
01540         return NULL;
01541     }
01542     g_object_set(self->obj, "bpath", bpath, NULL);
01543     Py_INCREF(Py_None);
01544     return Py_None;
01545 }
01546 #line 1547 "canvas.c"
01547 
01548 
01549 static PyMethodDef _PyGnomeCanvasBpath_methods[] = {
01550     { "set_bpath", (PyCFunction)_wrap_gnome_canvas_bpath_set_bpath, METH_VARARGS|METH_KEYWORDS },
01551     { NULL, NULL, 0 }
01552 };
01553 
01554 PyTypeObject PyGnomeCanvasBpath_Type = {
01555     PyObject_HEAD_INIT(NULL)
01556     0,                             /* ob_size */
01557     "gnome.canvas.CanvasBpath",                  /* tp_name */
01558     sizeof(PyGObject),              /* tp_basicsize */
01559     0,                             /* tp_itemsize */
01560     /* methods */
01561     (destructor)0,   /* tp_dealloc */
01562     (printfunc)0,                  /* tp_print */
01563     (getattrfunc)0,  /* tp_getattr */
01564     (setattrfunc)0,  /* tp_setattr */
01565     (cmpfunc)0,             /* tp_compare */
01566     (reprfunc)0,            /* tp_repr */
01567     (PyNumberMethods*)0,     /* tp_as_number */
01568     (PySequenceMethods*)0, /* tp_as_sequence */
01569     (PyMappingMethods*)0,   /* tp_as_mapping */
01570     (hashfunc)0,            /* tp_hash */
01571     (ternaryfunc)0,         /* tp_call */
01572     (reprfunc)0,            /* tp_str */
01573     (getattrofunc)0, /* tp_getattro */
01574     (setattrofunc)0, /* tp_setattro */
01575     (PyBufferProcs*)0,      /* tp_as_buffer */
01576     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01577     NULL,                          /* Documentation string */
01578     (traverseproc)0, /* tp_traverse */
01579     (inquiry)0,             /* tp_clear */
01580     (richcmpfunc)0,  /* tp_richcompare */
01581     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01582     (getiterfunc)0,         /* tp_iter */
01583     (iternextfunc)0, /* tp_iternext */
01584     _PyGnomeCanvasBpath_methods,                 /* tp_methods */
01585     0,                             /* tp_members */
01586     0,                      /* tp_getset */
01587     NULL,                          /* tp_base */
01588     NULL,                          /* tp_dict */
01589     (descrgetfunc)0, /* tp_descr_get */
01590     (descrsetfunc)0, /* tp_descr_set */
01591     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01592     (initproc)0,            /* tp_init */
01593     (allocfunc)0,           /* tp_alloc */
01594     (newfunc)0,               /* tp_new */
01595     (freefunc)0,             /* tp_free */
01596     (inquiry)0              /* tp_is_gc */
01597 };
01598 
01599 
01600 
01601 /* ----------- GnomeCanvasText ----------- */
01602 
01603 PyTypeObject PyGnomeCanvasText_Type = {
01604     PyObject_HEAD_INIT(NULL)
01605     0,                             /* ob_size */
01606     "gnome.canvas.CanvasText",                   /* tp_name */
01607     sizeof(PyGObject),              /* tp_basicsize */
01608     0,                             /* tp_itemsize */
01609     /* methods */
01610     (destructor)0,   /* tp_dealloc */
01611     (printfunc)0,                  /* tp_print */
01612     (getattrfunc)0,  /* tp_getattr */
01613     (setattrfunc)0,  /* tp_setattr */
01614     (cmpfunc)0,             /* tp_compare */
01615     (reprfunc)0,            /* tp_repr */
01616     (PyNumberMethods*)0,     /* tp_as_number */
01617     (PySequenceMethods*)0, /* tp_as_sequence */
01618     (PyMappingMethods*)0,   /* tp_as_mapping */
01619     (hashfunc)0,            /* tp_hash */
01620     (ternaryfunc)0,         /* tp_call */
01621     (reprfunc)0,            /* tp_str */
01622     (getattrofunc)0, /* tp_getattro */
01623     (setattrofunc)0, /* tp_setattro */
01624     (PyBufferProcs*)0,      /* tp_as_buffer */
01625     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01626     NULL,                          /* Documentation string */
01627     (traverseproc)0, /* tp_traverse */
01628     (inquiry)0,             /* tp_clear */
01629     (richcmpfunc)0,  /* tp_richcompare */
01630     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01631     (getiterfunc)0,         /* tp_iter */
01632     (iternextfunc)0, /* tp_iternext */
01633     NULL,                   /* tp_methods */
01634     0,                             /* tp_members */
01635     0,                      /* tp_getset */
01636     NULL,                          /* tp_base */
01637     NULL,                          /* tp_dict */
01638     (descrgetfunc)0, /* tp_descr_get */
01639     (descrsetfunc)0, /* tp_descr_set */
01640     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01641     (initproc)0,            /* tp_init */
01642     (allocfunc)0,           /* tp_alloc */
01643     (newfunc)0,               /* tp_new */
01644     (freefunc)0,             /* tp_free */
01645     (inquiry)0              /* tp_is_gc */
01646 };
01647 
01648 
01649 
01650 /* ----------- GnomeCanvasWidget ----------- */
01651 
01652 PyTypeObject PyGnomeCanvasWidget_Type = {
01653     PyObject_HEAD_INIT(NULL)
01654     0,                             /* ob_size */
01655     "gnome.canvas.CanvasWidget",                 /* tp_name */
01656     sizeof(PyGObject),              /* tp_basicsize */
01657     0,                             /* tp_itemsize */
01658     /* methods */
01659     (destructor)0,   /* tp_dealloc */
01660     (printfunc)0,                  /* tp_print */
01661     (getattrfunc)0,  /* tp_getattr */
01662     (setattrfunc)0,  /* tp_setattr */
01663     (cmpfunc)0,             /* tp_compare */
01664     (reprfunc)0,            /* tp_repr */
01665     (PyNumberMethods*)0,     /* tp_as_number */
01666     (PySequenceMethods*)0, /* tp_as_sequence */
01667     (PyMappingMethods*)0,   /* tp_as_mapping */
01668     (hashfunc)0,            /* tp_hash */
01669     (ternaryfunc)0,         /* tp_call */
01670     (reprfunc)0,            /* tp_str */
01671     (getattrofunc)0, /* tp_getattro */
01672     (setattrofunc)0, /* tp_setattro */
01673     (PyBufferProcs*)0,      /* tp_as_buffer */
01674     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
01675     NULL,                          /* Documentation string */
01676     (traverseproc)0, /* tp_traverse */
01677     (inquiry)0,             /* tp_clear */
01678     (richcmpfunc)0,  /* tp_richcompare */
01679     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
01680     (getiterfunc)0,         /* tp_iter */
01681     (iternextfunc)0, /* tp_iternext */
01682     NULL,                   /* tp_methods */
01683     0,                             /* tp_members */
01684     0,                      /* tp_getset */
01685     NULL,                          /* tp_base */
01686     NULL,                          /* tp_dict */
01687     (descrgetfunc)0, /* tp_descr_get */
01688     (descrsetfunc)0, /* tp_descr_set */
01689     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
01690     (initproc)0,            /* tp_init */
01691     (allocfunc)0,           /* tp_alloc */
01692     (newfunc)0,               /* tp_new */
01693     (freefunc)0,             /* tp_free */
01694     (inquiry)0              /* tp_is_gc */
01695 };
01696 
01697 
01698 
01699 /* ----------- functions ----------- */
01700 
01701 #line 474 "canvas.override"
01702 static PyObject *
01703 _wrap_gnome_canvas_path_def_new(PyObject *self, PyObject *args)
01704 {
01705     GnomeCanvasPathDef *path;
01706     PyObject *list, *arg;
01707     int i, len, arg_len, code;
01708     double x1, y1, x2, y2, x3, y3;
01709 
01710 
01711     if (!PyArg_ParseTuple(args, "O!:gnome.canvas.path_def_new",
01712                        &PyList_Type, &list))
01713        return NULL;
01714 
01715     len = PyList_Size(list);
01716     path = gnome_canvas_path_def_new();
01717     for (i = 0; i < len; ++i) {
01718        arg = PyList_GET_ITEM(list, i);
01719 
01720        if (!PyTuple_Check(arg)) {
01721            PyErr_SetString(PyExc_TypeError,
01722                          "list items must be (code, x1, x2, ...) tuples");
01723            gnome_canvas_path_def_unref(path);
01724            return NULL;
01725        }
01726        arg_len = PyTuple_Size(arg);
01727        if (arg_len < 1) {
01728            PyErr_SetString(PyExc_ValueError,
01729                          "list items must be (code, x1, x2, ...) tuples");
01730            gnome_canvas_path_def_unref(path);
01731            return NULL;
01732        }
01733        if (!PyInt_Check(PyTuple_GET_ITEM(arg, 0))) {
01734            PyErr_SetString(PyExc_TypeError,
01735                          "list items must be (code, x1, x2, ...) tuples");
01736            gnome_canvas_path_def_unref(path);
01737            return NULL;
01738        }
01739        code = PyInt_AsLong(PyTuple_GET_ITEM(arg, 0));
01740 
01741        switch (code)
01742        {
01743 
01744        case ART_MOVETO:
01745        case ART_MOVETO_OPEN:
01746            if (!PyArg_ParseTuple(arg, "idd:gnome.canvas.path_def_new (list item)",
01747                               &code, &x1, &y1)) {
01748               gnome_canvas_path_def_unref(path);
01749               return NULL;
01750            }
01751            gnome_canvas_path_def_moveto(path, x1, y1);
01752            break;
01753 
01754        case ART_LINETO:
01755            if (!PyArg_ParseTuple(arg, "idd:gnome.canvas.path_def_new (list item)",
01756                               &code, &x1, &y1)) {
01757               gnome_canvas_path_def_unref(path);
01758               return NULL;
01759            }
01760            gnome_canvas_path_def_lineto(path, x1, y1);
01761            break;
01762 
01763        case ART_CURVETO:
01764            if (!PyArg_ParseTuple(arg, "idddddd:gnome.canvas.path_def_new (list item)",
01765                               &code,
01766                               &x1, &y1,
01767                               &x2, &y2,
01768                               &x3, &y3)) {
01769               gnome_canvas_path_def_unref(path);
01770               return NULL;
01771            }
01772            gnome_canvas_path_def_curveto(path, x1, y1, x2, y2, x3, y3);
01773            break;
01774 
01775        case ART_END:
01776        default:
01777            gnome_canvas_path_def_unref(path);
01778            return PyErr_Format(PyExc_ValueError, "invalid path code %i",
01779                             code);
01780        }
01781 
01782     }
01783     return pyg_boxed_new(GNOME_TYPE_CANVAS_PATH_DEF, path, TRUE, TRUE);
01784 }
01785 
01786 #line 1787 "canvas.c"
01787 
01788 
01789 PyMethodDef pycanvas_functions[] = {
01790     { "path_def_new", (PyCFunction)_wrap_gnome_canvas_path_def_new, METH_VARARGS },
01791     { NULL, NULL, 0 }
01792 };
01793 
01794 /* initialise stuff extension classes */
01795 void
01796 pycanvas_register_classes(PyObject *d)
01797 {
01798     PyObject *module;
01799 
01800     if ((module = PyImport_ImportModule("gobject")) != NULL) {
01801         PyObject *moddict = PyModule_GetDict(module);
01802 
01803         _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
01804         if (_PyGObject_Type == NULL) {
01805             PyErr_SetString(PyExc_ImportError,
01806                 "cannot import name GObject from gobject");
01807             return;
01808         }
01809     } else {
01810         PyErr_SetString(PyExc_ImportError,
01811             "could not import gobject");
01812         return;
01813     }
01814     if ((module = PyImport_ImportModule("gtk._gtk")) != NULL) {
01815         PyObject *moddict = PyModule_GetDict(module);
01816 
01817         _PyGtkLayout_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Layout");
01818         if (_PyGtkLayout_Type == NULL) {
01819             PyErr_SetString(PyExc_ImportError,
01820                 "cannot import name Layout from gtk._gtk");
01821             return;
01822         }
01823         _PyGtkObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Object");
01824         if (_PyGtkObject_Type == NULL) {
01825             PyErr_SetString(PyExc_ImportError,
01826                 "cannot import name Object from gtk._gtk");
01827             return;
01828         }
01829     } else {
01830         PyErr_SetString(PyExc_ImportError,
01831             "could not import gtk._gtk");
01832         return;
01833     }
01834 
01835 
01836 #line 1837 "canvas.c"
01837     pyg_register_boxed(d, "CanvasPathDef", GNOME_TYPE_CANVAS_PATH_DEF, &PyGnomeCanvasPathDef_Type);
01838     pygobject_register_class(d, "GnomeCanvas", GNOME_TYPE_CANVAS, &PyGnomeCanvas_Type, Py_BuildValue("(O)", &PyGtkLayout_Type));
01839     pygobject_register_class(d, "GnomeCanvasItem", GNOME_TYPE_CANVAS_ITEM, &PyGnomeCanvasItem_Type, Py_BuildValue("(O)", &PyGtkObject_Type));
01840     pygobject_register_class(d, "GnomeCanvasGroup", GNOME_TYPE_CANVAS_GROUP, &PyGnomeCanvasGroup_Type, Py_BuildValue("(O)", &PyGnomeCanvasItem_Type));
01841     pygobject_register_class(d, "GnomeCanvasClipgroup", GNOME_TYPE_CANVAS_CLIPGROUP, &PyGnomeCanvasClipgroup_Type, Py_BuildValue("(O)", &PyGnomeCanvasGroup_Type));
01842     pygobject_register_class(d, "GnomeCanvasLine", GNOME_TYPE_CANVAS_LINE, &PyGnomeCanvasLine_Type, Py_BuildValue("(O)", &PyGnomeCanvasItem_Type));
01843     pygobject_register_class(d, "GnomeCanvasPixbuf", GNOME_TYPE_CANVAS_PIXBUF, &PyGnomeCanvasPixbuf_Type, Py_BuildValue("(O)", &PyGnomeCanvasItem_Type));
01844     pygobject_register_class(d, "GnomeCanvasRichText", GNOME_TYPE_CANVAS_RICH_TEXT, &PyGnomeCanvasRichText_Type, Py_BuildValue("(O)", &PyGnomeCanvasItem_Type));
01845     pygobject_register_class(d, "GnomeCanvasShape", GNOME_TYPE_CANVAS_SHAPE, &PyGnomeCanvasShape_Type, Py_BuildValue("(O)", &PyGnomeCanvasItem_Type));
01846     pygobject_register_class(d, "GnomeCanvasRE", GNOME_TYPE_CANVAS_RE, &PyGnomeCanvasRE_Type, Py_BuildValue("(O)", &PyGnomeCanvasShape_Type));
01847     pygobject_register_class(d, "GnomeCanvasRect", GNOME_TYPE_CANVAS_RECT, &PyGnomeCanvasRect_Type, Py_BuildValue("(O)", &PyGnomeCanvasRE_Type));
01848     pygobject_register_class(d, "GnomeCanvasEllipse", GNOME_TYPE_CANVAS_ELLIPSE, &PyGnomeCanvasEllipse_Type, Py_BuildValue("(O)", &PyGnomeCanvasRE_Type));
01849     pygobject_register_class(d, "GnomeCanvasPolygon", GNOME_TYPE_CANVAS_POLYGON, &PyGnomeCanvasPolygon_Type, Py_BuildValue("(O)", &PyGnomeCanvasShape_Type));
01850     pygobject_register_class(d, "GnomeCanvasBpath", GNOME_TYPE_CANVAS_BPATH, &PyGnomeCanvasBpath_Type, Py_BuildValue("(O)", &PyGnomeCanvasShape_Type));
01851     pygobject_register_class(d, "GnomeCanvasText", GNOME_TYPE_CANVAS_TEXT, &PyGnomeCanvasText_Type, Py_BuildValue("(O)", &PyGnomeCanvasItem_Type));
01852     pygobject_register_class(d, "GnomeCanvasWidget", GNOME_TYPE_CANVAS_WIDGET, &PyGnomeCanvasWidget_Type, Py_BuildValue("(O)", &PyGnomeCanvasItem_Type));
01853 }