"Initial commit to Gerrit"
[profile/ivi/libgsf.git] / python / gsfgnomemodule.c
1 /*
2  * gsfmodule.c
3  *
4  * Copyright (C) 2002-2003 Jon K Hellan (hellan@acm.org)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of version 2.1 of the GNU Lesser General Public
8  * License as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
18  * USA
19  */
20
21 /* 
22  * Python bindings for gnome extensions to libgsf.
23  */
24
25 #include <pygobject.h>
26
27 extern PyMethodDef pygsfgnome_functions[];
28 extern DL_EXPORT(void) initgnome (void);
29
30 extern void pygsfgnome_register_classes(PyObject *d);
31
32 DL_EXPORT(void)
33 initgnome (void)
34 {
35         PyObject *m, *d;
36
37         init_pygobject ();
38
39         m = Py_InitModule ((char *) "gsf.gnome", pygsfgnome_functions);
40         d = PyModule_GetDict (m);
41
42         pygsfgnome_register_classes (d);
43         
44         if (PyErr_Occurred ()) {
45                 Py_FatalError ((char *) "can't initialise module gsf.gnome");
46         }
47 }