diff options
author | James Henstridge <james@daa.com.au> | 2001-07-01 16:23:02 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2001-07-01 16:23:02 +0000 |
commit | ad78644778f2995b323bbd59c3537d9ed8c6b4a2 (patch) | |
tree | 2e5096b8ad6ebe04272229bf366f4a03db82fc61 /pangomodule.c | |
parent | 8084a9834a535f658e691e09dd3a1e2a3905e056 (diff) | |
download | pygtk-ad78644778f2995b323bbd59c3537d9ed8c6b4a2.tar.gz |
add rules to build pango module.
2001-07-02 James Henstridge <james@daa.com.au>
* Makefile.am (pangomodule_la_SOURCES): add rules to build pango
module.
* pango.defs:
* pango.override:
* pangomodule.c: new files for the pango wrapper module.
Diffstat (limited to 'pangomodule.c')
-rw-r--r-- | pangomodule.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pangomodule.c b/pangomodule.c new file mode 100644 index 00000000..38e9895e --- /dev/null +++ b/pangomodule.c @@ -0,0 +1,31 @@ +/* -*- Mode: C; c-basic-offset: 4 -*- */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif +#include <Python.h> +#include <pygobject.h> + +/* include any extra headers needed here */ + +void pypango_register_classes(PyObject *d); +extern PyMethodDef pypango_functions[]; + +DL_EXPORT(void) +initpango(void) +{ + PyObject *m, *d; + + /* perform any initialisation required by the library here */ + + m = Py_InitModule("pango", pypango_functions); + d = PyModule_GetDict(m); + + init_pygobject(); + + pypango_register_classes(d); + + /* add anything else to the module dictionary (such as constants) */ + + if (PyErr_Occurred()) + Py_FatalError("could not initialise module pango"); +} |