summaryrefslogtreecommitdiffstats
path: root/gio/unixmodule.c
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-01-19 12:49:29 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-01-19 12:49:29 +0000
commit9c43da820eb2bd872e58ad12d65ed6c89d556893 (patch)
treee4f897f87a5cc9585495b7e41170bf770ebb56a2 /gio/unixmodule.c
parent23df5efb74f6b9b6c5da7a8db89ccd612533327d (diff)
downloadpygobject-9c43da820eb2bd872e58ad12d65ed6c89d556893.tar.gz
pygobject-9c43da820eb2bd872e58ad12d65ed6c89d556893.tar.xz
pygobject-9c43da820eb2bd872e58ad12d65ed6c89d556893.zip
Import codegen from pygtk. Add initial gio and gio.unix bindings.
2008-01-19 Johan Dahlin <johan@gnome.org> * 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
Diffstat (limited to 'gio/unixmodule.c')
-rw-r--r--gio/unixmodule.c52
1 files changed, 52 insertions, 0 deletions
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 <Python.h>
+#include "pygobject.h"
+
+#include <gio/gio.h>
+
+/* 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);
+
+}
+