diff options
Diffstat (limited to 'otk_c/init.c')
| -rw-r--r-- | otk_c/init.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/otk_c/init.c b/otk_c/init.c new file mode 100644 index 00000000..5f576ac3 --- /dev/null +++ b/otk_c/init.c @@ -0,0 +1,30 @@ +// -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#include "../config.h" +#include "display.h" +#include "screeninfo.h" +#include "color.h" +#include "gccache.h" + +#include <X11/Xlib.h> +#include <Python.h> + +static PyMethodDef otk_methods[] = { +// {"new_noddy", noddy_new_noddy, METH_VARARGS, +// "Create a new Noddy object."}, + + {NULL, NULL, 0, NULL} +}; + +void initotk(char *display) +{ + OtkDisplay_Type.ob_type = &PyType_Type; + OtkScreenInfo_Type.ob_type = &PyType_Type; + OtkColor_Type.ob_type = &PyType_Type; + + Py_InitModule("otk", otk_methods); + + OtkDisplay_Initialize(display); + assert(OBDisplay); + OtkGCCache_Initialize(); +} |
