summaryrefslogtreecommitdiff
path: root/otk_c/init.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-21 12:27:05 +0000
committerDana Jansens <danakj@orodu.net>2002-12-21 12:27:05 +0000
commitcca7a6762d273815947bd5c7cc58ab6713693e8e (patch)
tree20cc9a6d29ddd54c0dea9bb71b6a8c25a95f6f01 /otk_c/init.c
parent925048fedfa855c5315e4951147d47b717637614 (diff)
shit to init the module
Diffstat (limited to 'otk_c/init.c')
-rw-r--r--otk_c/init.c30
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();
+}