summaryrefslogtreecommitdiff
path: root/otk_c/rect.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-17 06:40:00 +0000
committerDana Jansens <danakj@orodu.net>2003-01-17 06:40:00 +0000
commit6188650ce975e287c7c8644927cd5d01e7cc7baa (patch)
tree6396de81dbb9ef56f39c24a062b93e4c896a5773 /otk_c/rect.c
parent58ff3f35c2b712ec92b093ffd8b96331615f546a (diff)
rm my lucid experiment
Diffstat (limited to 'otk_c/rect.c')
-rw-r--r--otk_c/rect.c90
1 files changed, 0 insertions, 90 deletions
diff --git a/otk_c/rect.c b/otk_c/rect.c
deleted file mode 100644
index 086e46a7..00000000
--- a/otk_c/rect.c
+++ /dev/null
@@ -1,90 +0,0 @@
-// -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-
-#include "../config.h"
-#include "rect.h"
-
-PyObject *OtkRect_New(int x, int y, int width, int height)
-{
- OtkRect* self = PyObject_New(OtkRect, &OtkRect_Type);
-
- self->x = x;
- self->y = y;
- self->width = width;
- self->height = height;
-
- return (PyObject*)self;
-}
-
-
-
-static PyObject *otkrect_getx(OtkRect *self, PyObject *args)
-{
- if (!PyArg_ParseTuple(args, ":getX"))
- return NULL;
- return PyInt_FromLong(self->x);
-}
-
-static PyObject *otkrect_gety(OtkRect *self, PyObject *args)
-{
- if (!PyArg_ParseTuple(args, ":getY"))
- return NULL;
- return PyInt_FromLong(self->y);
-}
-
-static PyObject *otkrect_getwidth(OtkRect *self, PyObject *args)
-{
- if (!PyArg_ParseTuple(args, ":getWidth"))
- return NULL;
- return PyInt_FromLong(self->width);
-}
-
-static PyObject *otkrect_getheight(OtkRect *self, PyObject *args)
-{
- if (!PyArg_ParseTuple(args, ":getHeight"))
- return NULL;
- return PyInt_FromLong(self->height);
-}
-
-
-static PyMethodDef get_methods[] = {
- {"getX", (PyCFunction)otkrect_getx, METH_VARARGS,
- "Get the X coordinate."},
- {"getY", (PyCFunction)otkrect_gety, METH_VARARGS,
- "Get the Y coordinate."},
- {"getWidth", (PyCFunction)otkrect_getwidth, METH_VARARGS,
- "Get the width."},
- {"getHeight", (PyCFunction)otkrect_getheight, METH_VARARGS,
- "Get the height."},
- {NULL, NULL, 0, NULL}
-};
-
-
-
-static void otkrect_dealloc(PyObject *self)
-{
- PyObject_Del(self);
-}
-
-static PyObject *otkrect_getattr(PyObject *obj, char *name)
-{
- return Py_FindMethod(get_methods, obj, name);
-}
-
-
-PyTypeObject OtkRect_Type = {
- PyObject_HEAD_INIT(NULL)
- 0,
- "OtkRect",
- sizeof(OtkRect),
- 0,
- otkrect_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- otkrect_getattr, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare*/
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash */
-};