From cca7a6762d273815947bd5c7cc58ab6713693e8e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 21 Dec 2002 12:27:05 +0000 Subject: shit to init the module --- otk_c/init.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 otk_c/init.c (limited to 'otk_c/init.c') 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 +#include + +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(); +} -- cgit v1.2.3