/* automatically generated by Generate/mkgc.py */ /* Methods for PaxGC objects */ #define checkshortlist pax_checkshortlist static PyObject * PaxGC_DrawArc(PaxGCObject * self, PyObject *args) { int arg1; int arg2; unsigned int arg3; unsigned int arg4; int arg5; int arg6; if (!PyArg_ParseTuple(args, "iiiiii", &arg1, &arg2, &arg3, &arg4, &arg5, &arg6)) return NULL; XDrawArc(self->display, self->drawable, self->gc, arg1, arg2, arg3, arg4, arg5, arg6); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawArcs(PaxGCObject * self, PyObject *args) { PyObject *arg1; XArc *arcs_arg1; int narcs_arg1; if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!checkshortlist(6, arg1, (short**)&arcs_arg1, &narcs_arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XArc[]"); return NULL; } XDrawArcs(self->display, self->drawable, self->gc, arcs_arg1, narcs_arg1); PyMem_DEL(arcs_arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawImageString(PaxGCObject * self, PyObject *args) { int arg1; int arg2; PyObject *arg3; int nchars; if (!PyArg_ParseTuple(args, "iiS", &arg1, &arg2, &arg3)) return NULL; if (!(nchars = PyString_Size(arg3), 1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg3 should be char[]"); return NULL; } XDrawImageString(self->display, self->drawable, self->gc, arg1, arg2, PyString_AsString(arg3), nchars); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawLine(PaxGCObject * self, PyObject *args) { int arg1; int arg2; int arg3; int arg4; if (!PyArg_ParseTuple(args, "iiii", &arg1, &arg2, &arg3, &arg4)) return NULL; XDrawLine(self->display, self->drawable, self->gc, arg1, arg2, arg3, arg4); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawLines(PaxGCObject * self, PyObject *args) { PyObject *arg1; XPoint *pts_arg1; int npts_arg1; int arg2; if (!PyArg_ParseTuple(args, "Oi", &arg1, &arg2)) return NULL; if (!checkshortlist(2, arg1, (short**)&pts_arg1, &npts_arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XPoint[]"); return NULL; } XDrawLines(self->display, self->drawable, self->gc, pts_arg1, npts_arg1, arg2); PyMem_DEL(pts_arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawPoint(PaxGCObject * self, PyObject *args) { int arg1; int arg2; if (!PyArg_ParseTuple(args, "ii", &arg1, &arg2)) return NULL; XDrawPoint(self->display, self->drawable, self->gc, arg1, arg2); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawPoints(PaxGCObject * self, PyObject *args) { PyObject *arg1; XPoint *pts_arg1; int npts_arg1; int arg2; if (!PyArg_ParseTuple(args, "Oi", &arg1, &arg2)) return NULL; if (!checkshortlist(2, arg1, (short**)&pts_arg1, &npts_arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XPoint[]"); return NULL; } XDrawPoints(self->display, self->drawable, self->gc, pts_arg1, npts_arg1, arg2); PyMem_DEL(pts_arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawRectangle(PaxGCObject * self, PyObject *args) { int arg1; int arg2; unsigned int arg3; unsigned int arg4; if (!PyArg_ParseTuple(args, "iiii", &arg1, &arg2, &arg3, &arg4)) return NULL; XDrawRectangle(self->display, self->drawable, self->gc, arg1, arg2, arg3, arg4); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawRectangles(PaxGCObject * self, PyObject *args) { PyObject *arg1; XRectangle *rects_arg1; int nrects_arg1; if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!checkshortlist(4, arg1, (short**)&rects_arg1, &nrects_arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XRectangle[]"); return NULL; } XDrawRectangles(self->display, self->drawable, self->gc, rects_arg1, nrects_arg1); PyMem_DEL(rects_arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawSegments(PaxGCObject * self, PyObject *args) { PyObject *arg1; XSegment *segs_arg1; int nsegs_arg1; if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!checkshortlist(4, arg1, (short**)&segs_arg1, &nsegs_arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XSegment[]"); return NULL; } XDrawSegments(self->display, self->drawable, self->gc, segs_arg1, nsegs_arg1); PyMem_DEL(segs_arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_DrawString(PaxGCObject * self, PyObject *args) { int arg1; int arg2; PyObject *arg3; int nchars; if (!PyArg_ParseTuple(args, "iiS", &arg1, &arg2, &arg3)) return NULL; if (!(nchars = PyString_Size(arg3), 1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg3 should be char[]"); return NULL; } XDrawString(self->display, self->drawable, self->gc, arg1, arg2, PyString_AsString(arg3), nchars); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_FillArc(PaxGCObject * self, PyObject *args) { int arg1; int arg2; unsigned int arg3; unsigned int arg4; int arg5; int arg6; if (!PyArg_ParseTuple(args, "iiiiii", &arg1, &arg2, &arg3, &arg4, &arg5, &arg6)) return NULL; XFillArc(self->display, self->drawable, self->gc, arg1, arg2, arg3, arg4, arg5, arg6); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_FillArcs(PaxGCObject * self, PyObject *args) { PyObject *arg1; XArc *arcs_arg1; int narcs_arg1; if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!checkshortlist(6, arg1, (short**)&arcs_arg1, &narcs_arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XArc[]"); return NULL; } XFillArcs(self->display, self->drawable, self->gc, arcs_arg1, narcs_arg1); PyMem_DEL(arcs_arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_FillPolygon(PaxGCObject * self, PyObject *args) { PyObject *arg1; XPoint *pts_arg1; int npts_arg1; int arg2; int arg3; if (!PyArg_ParseTuple(args, "Oii", &arg1, &arg2, &arg3)) return NULL; if (!checkshortlist(2, arg1, (short**)&pts_arg1, &npts_arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XPoint[]"); return NULL; } XFillPolygon(self->display, self->drawable, self->gc, pts_arg1, npts_arg1, arg2, arg3); PyMem_DEL(pts_arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_FillRectangle(PaxGCObject * self, PyObject *args) { int arg1; int arg2; unsigned int arg3; unsigned int arg4; if (!PyArg_ParseTuple(args, "iiii", &arg1, &arg2, &arg3, &arg4)) return NULL; XFillRectangle(self->display, self->drawable, self->gc, arg1, arg2, arg3, arg4); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_FillRectangles(PaxGCObject * self, PyObject *args) { PyObject *arg1; XRectangle *rects_arg1; int nrects_arg1; if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!checkshortlist(4, arg1, (short**)&rects_arg1, &nrects_arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XRectangle[]"); return NULL; } XFillRectangles(self->display, self->drawable, self->gc, rects_arg1, nrects_arg1); PyMem_DEL(rects_arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_PutImage(PaxGCObject * self, PyObject *args) { PyObject *arg1; int arg2; int arg3; int arg4; int arg5; int arg6; int arg7; if (!PyArg_ParseTuple(args, "Oiiiiii", &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7)) return NULL; if (!PaxImage_Check(arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XImage"); return NULL; } XPutImage(self->display, self->drawable, self->gc, PaxImage_AsImage(arg1), arg2, arg3, arg4, arg5, arg6, arg7); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_ChangeGC(PaxGCObject *self, PyObject*args) { PyObject *arg1; unsigned long mask; XGCValues values; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!PaxGC_MakeValues(arg1, &mask, &values)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be XGCValues#"); return NULL; } XChangeGC(self->display, self->gc, mask, &values); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetArcMode(PaxGCObject *self, PyObject*args) { int arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "i", &arg1)) return NULL; XSetArcMode(self->display, self->gc, arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetBackground(PaxGCObject *self, PyObject*args) { unsigned long arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "l", &arg1)) return NULL; XSetBackground(self->display, self->gc, arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetClipOrigin(PaxGCObject *self, PyObject*args) { int arg1; int arg2; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "ii", &arg1, &arg2)) return NULL; XSetClipOrigin(self->display, self->gc, arg1, arg2); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetClipRectangles(PaxGCObject *self, PyObject*args) { int arg1; int arg2; PyObject *arg3; XRectangle *rects_arg3; int nrects_arg3; int arg4; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "iiOi", &arg1, &arg2, &arg3, &arg4)) return NULL; if (!checkshortlist(4, arg3, (short**)&rects_arg3, &nrects_arg3)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg3 should be XRectangle[]"); return NULL; } XSetClipRectangles(self->display, self->gc, arg1, arg2, rects_arg3, nrects_arg3, arg4); PyMem_DEL(rects_arg3); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetFillRule(PaxGCObject *self, PyObject*args) { int arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "i", &arg1)) return NULL; XSetFillRule(self->display, self->gc, arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetFillStyle(PaxGCObject *self, PyObject*args) { int arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "i", &arg1)) return NULL; XSetFillStyle(self->display, self->gc, arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetFont(PaxGCObject *self, PyObject*args) { PyObject *arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!PaxFont_Check(arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be Font"); return NULL; } XSetFont(self->display, self->gc, PaxFont_AsFont(arg1)); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetForeground(PaxGCObject *self, PyObject*args) { unsigned long arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "l", &arg1)) return NULL; XSetForeground(self->display, self->gc, arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetFunction(PaxGCObject *self, PyObject*args) { int arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "i", &arg1)) return NULL; XSetFunction(self->display, self->gc, arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetGraphicsExposures(PaxGCObject *self, PyObject*args) { int arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "i", &arg1)) return NULL; XSetGraphicsExposures(self->display, self->gc, (Bool)arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetLineAttributes(PaxGCObject *self, PyObject*args) { unsigned int arg1; int arg2; int arg3; int arg4; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "iiii", &arg1, &arg2, &arg3, &arg4)) return NULL; XSetLineAttributes(self->display, self->gc, arg1, arg2, arg3, arg4); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetPlaneMask(PaxGCObject *self, PyObject*args) { unsigned long arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "l", &arg1)) return NULL; XSetPlaneMask(self->display, self->gc, arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetRegion(PaxGCObject *self, PyObject*args) { PyObject *arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!PaxRegion_Check(arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be Region"); return NULL; } XSetRegion(self->display, self->gc, PaxRegion_AsRegion(arg1)); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetState(PaxGCObject *self, PyObject*args) { unsigned long arg1; unsigned long arg2; int arg3; unsigned long arg4; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "llil", &arg1, &arg2, &arg3, &arg4)) return NULL; XSetState(self->display, self->gc, arg1, arg2, arg3, arg4); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetStipple(PaxGCObject *self, PyObject*args) { PyObject *arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!PaxPixmap_Check(arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be Pixmap"); return NULL; } XSetStipple(self->display, self->gc, PaxPixmap_AsPixmap(arg1)); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetSubwindowMode(PaxGCObject *self, PyObject*args) { int arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "i", &arg1)) return NULL; XSetSubwindowMode(self->display, self->gc, arg1); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetTSOrigin(PaxGCObject *self, PyObject*args) { int arg1; int arg2; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "ii", &arg1, &arg2)) return NULL; XSetTSOrigin(self->display, self->gc, arg1, arg2); Py_INCREF(Py_None); return Py_None; } static PyObject * PaxGC_SetTile(PaxGCObject *self, PyObject*args) { PyObject *arg1; if (self->shared) { PyErr_SetString(PyExc_TypeError, "can't modify shared GC"); return NULL; } if (!PyArg_ParseTuple(args, "O", &arg1)) return NULL; if (!PaxPixmap_Check(arg1)) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "arg1 should be Pixmap"); return NULL; } XSetTile(self->display, self->gc, PaxPixmap_AsPixmap(arg1)); Py_INCREF(Py_None); return Py_None; } static PyMethodDef PaxGC_methods[] = { {"ChangeGC", (PyCFunction)PaxGC_ChangeGC, 1}, {"DrawArc", (PyCFunction)PaxGC_DrawArc, 1}, {"DrawArcs", (PyCFunction)PaxGC_DrawArcs, 1}, {"DrawImageString", (PyCFunction)PaxGC_DrawImageString, 1}, {"DrawLine", (PyCFunction)PaxGC_DrawLine, 1}, {"DrawLines", (PyCFunction)PaxGC_DrawLines, 1}, {"DrawPoint", (PyCFunction)PaxGC_DrawPoint, 1}, {"DrawPoints", (PyCFunction)PaxGC_DrawPoints, 1}, {"DrawRectangle", (PyCFunction)PaxGC_DrawRectangle, 1}, {"DrawRectangles", (PyCFunction)PaxGC_DrawRectangles, 1}, {"DrawSegments", (PyCFunction)PaxGC_DrawSegments, 1}, {"DrawString", (PyCFunction)PaxGC_DrawString, 1}, {"FillArc", (PyCFunction)PaxGC_FillArc, 1}, {"FillArcs", (PyCFunction)PaxGC_FillArcs, 1}, {"FillPolygon", (PyCFunction)PaxGC_FillPolygon, 1}, {"FillRectangle", (PyCFunction)PaxGC_FillRectangle, 1}, {"FillRectangles", (PyCFunction)PaxGC_FillRectangles, 1}, {"PutImage", (PyCFunction)PaxGC_PutImage, 1}, {"SetArcMode", (PyCFunction)PaxGC_SetArcMode, 1}, {"SetBackground", (PyCFunction)PaxGC_SetBackground, 1}, {"SetClipMask", (PyCFunction)PaxGC_SetClipMask, 1}, {"SetClipOrigin", (PyCFunction)PaxGC_SetClipOrigin, 1}, {"SetClipRectangles", (PyCFunction)PaxGC_SetClipRectangles, 1}, {"SetDashes", (PyCFunction)PaxGC_SetDashes, 1}, {"SetDrawable", (PyCFunction)PaxGC_SetDrawable, 1}, {"SetFillRule", (PyCFunction)PaxGC_SetFillRule, 1}, {"SetFillStyle", (PyCFunction)PaxGC_SetFillStyle, 1}, {"SetFont", (PyCFunction)PaxGC_SetFont, 1}, {"SetForeground", (PyCFunction)PaxGC_SetForeground, 1}, {"SetForegroundAndFill", (PyCFunction)PaxGC_SetForegroundAndFill, 1}, {"SetFunction", (PyCFunction)PaxGC_SetFunction, 1}, {"SetGraphicsExposures", (PyCFunction)PaxGC_SetGraphicsExposures, 1}, {"SetLineAttributes", (PyCFunction)PaxGC_SetLineAttributes, 1}, {"SetPlaneMask", (PyCFunction)PaxGC_SetPlaneMask, 1}, {"SetRegion", (PyCFunction)PaxGC_SetRegion, 1}, {"SetState", (PyCFunction)PaxGC_SetState, 1}, {"SetStipple", (PyCFunction)PaxGC_SetStipple, 1}, {"SetSubwindowMode", (PyCFunction)PaxGC_SetSubwindowMode, 1}, {"SetTSOrigin", (PyCFunction)PaxGC_SetTSOrigin, 1}, {"SetTile", (PyCFunction)PaxGC_SetTile, 1}, {"ShmPutImage", (PyCFunction)PaxGC_ShmPutImage, 1}, {0, 0} /* Sentinel */ };