openbox/otk_c/init.c

42 lines
970 B
C
Raw Normal View History

2002-12-21 12:27:05 +00:00
// -*- 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"
2002-12-21 13:49:57 +00:00
#include "font.h"
#include "rect.h"
#include "timer.h"
#include "timerqueue.h"
#include "imagecontrol.h"
2002-12-21 12:27:05 +00:00
#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)
{
2002-12-21 14:57:45 +00:00
OtkRect_Type.ob_type = &PyType_Type;
2002-12-21 12:27:05 +00:00
OtkDisplay_Type.ob_type = &PyType_Type;
OtkScreenInfo_Type.ob_type = &PyType_Type;
OtkColor_Type.ob_type = &PyType_Type;
2002-12-21 13:49:57 +00:00
OtkFont_Type.ob_type = &PyType_Type;
OtkTimer_Type.ob_type = &PyType_Type;
OtkImageControl_Type.ob_type = &PyType_Type;
2002-12-21 12:27:05 +00:00
Py_InitModule("otk", otk_methods);
OtkTimerQueue_Initialize();
2002-12-21 12:27:05 +00:00
OtkDisplay_Initialize(display);
assert(OBDisplay);
OtkGCCache_Initialize();
2002-12-21 13:49:57 +00:00
OtkFont_Initialize();
2002-12-21 12:27:05 +00:00
}