transient window support..halfway
[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 #include "font.h"
9 #include "rect.h"
10 #include "timer.h"
11 #include "timerqueue.h"
12 #include "imagecontrol.h"
13
14 #include <X11/Xlib.h>
15 #include <Python.h>
16
17 static PyMethodDef otk_methods[] = {
18 //  {"new_noddy", noddy_new_noddy, METH_VARARGS,
19 //   "Create a new Noddy object."},
20
21   {NULL, NULL, 0, NULL}
22 };
23
24 void initotk(char *display)
25 {
26   OtkRect_Type.ob_type = &PyType_Type;
27   OtkDisplay_Type.ob_type = &PyType_Type;
28   OtkScreenInfo_Type.ob_type = &PyType_Type;
29   OtkColor_Type.ob_type = &PyType_Type;
30   OtkFont_Type.ob_type = &PyType_Type;
31   OtkTimer_Type.ob_type = &PyType_Type;
32   OtkImageControl_Type.ob_type = &PyType_Type;
33
34   Py_InitModule("otk", otk_methods);
35
36   OtkTimerQueue_Initialize();
37   OtkDisplay_Initialize(display);
38   assert(OBDisplay);
39   OtkGCCache_Initialize();
40   OtkFont_Initialize();
41 }