From 9c43da820eb2bd872e58ad12d65ed6c89d556893 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Sat, 19 Jan 2008 12:49:29 +0000 Subject: Import codegen from pygtk. Add initial gio and gio.unix bindings. 2008-01-19 Johan Dahlin * Makefile.am: * codegen/Makefile.am: * codegen/README.defs: * codegen/__init__.py: * codegen/argtypes.py: * codegen/code-coverage.py: * codegen/codegen.py: * codegen/createdefs.py: * codegen/definitions.py: * codegen/defsconvert.py: * codegen/defsgen.py: * codegen/defsparser.py: * codegen/docextract.py: * codegen/docextract_to_xml.py: * codegen/docgen.py: * codegen/h2def.py: * codegen/mergedefs.py: * codegen/missingdefs.py: * codegen/mkskel.py: * codegen/override.py: * codegen/pygtk-codegen-2.0.in: * codegen/reversewrapper.py: * codegen/scanvirtuals.py: * codegen/scmexpr.py: * configure.ac: * gio/Makefile.am: * gio/__init__.py: * gio/gio-types.defs: * gio/gio.defs: * gio/gio.override: * gio/giomodule.c: (init_gio): * gio/unix-types.defs: * gio/unix.defs: * gio/unix.override: * gio/unixmodule.c: (initunix): Import codegen from pygtk. Add initial gio and gio.unix bindings. svn path=/trunk/; revision=730 --- gio/unixmodule.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 gio/unixmodule.c (limited to 'gio/unixmodule.c') diff --git a/gio/unixmodule.c b/gio/unixmodule.c new file mode 100644 index 0000000..6d68d27 --- /dev/null +++ b/gio/unixmodule.c @@ -0,0 +1,52 @@ +/* -*- Mode: C; c-basic-offset: 4 -*- + * pygtk- Python bindings for the GTK toolkit. + * Copyright (C) 2008 Johan Dahlin + * + * giomodule.c: module wrapping the GIO library + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif +#include +#include "pygobject.h" + +#include + +/* include any extra headers needed here */ + +void pyunix_register_classes(PyObject *d); +void pyunix_add_constants(PyObject *module, const gchar *strip_prefix); + +extern PyMethodDef pyunix_functions[]; + +DL_EXPORT(void) +initunix(void) +{ + PyObject *m, *d; + + /* perform any initialisation required by the library here */ + + m = Py_InitModule("gio.unix", pyunix_functions); + d = PyModule_GetDict(m); + + init_pygobject(); + + pyunix_register_classes(d); + +} + -- cgit