make rect a proper pyobject. use "typesafety"
[mikachu/openbox.git] / otk_c / init.c
1 // -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 #include "../config.h"
4 #include "display.h"
5 #include "screeninfo.h"
6 #include "color.h"
7 #include "gccache.h"
8
9 #include <X11/Xlib.h>
10 #include <Python.h>
11
12 static PyMethodDef otk_methods[] = {
13 //  {"new_noddy", noddy_new_noddy, METH_VARARGS,
14 //   "Create a new Noddy object."},
15
16   {NULL, NULL, 0, NULL}
17 };
18
19 void initotk(char *display)
20 {
21   OtkDisplay_Type.ob_type = &PyType_Type;
22   OtkScreenInfo_Type.ob_type = &PyType_Type;
23   OtkColor_Type.ob_type = &PyType_Type;
24
25   Py_InitModule("otk", otk_methods);
26
27   OtkDisplay_Initialize(display);
28   assert(OBDisplay);
29   OtkGCCache_Initialize();
30 }