1 /*
2 * GTK VNC Widget
3 *
4 * Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.0 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include <config.h>
22
23 #include <pygobject.h>
24
25 void gtkvnc_register_classes (PyObject *d);
26 void gtkvnc_add_constants(PyObject *module, const gchar *strip_prefix);
27 extern PyMethodDef gtkvnc_functions[];
28
29 DL_EXPORT(void) initgtkvnc(void);
30
initgtkvnc(void)31 DL_EXPORT(void) initgtkvnc(void)
32 {
33 PyObject *m, *d;
34
35 init_pygobject ();
36
37 m = Py_InitModule ("gtkvnc", gtkvnc_functions);
38 if (PyErr_Occurred())
39 Py_FatalError("can't init module");
40
41 d = PyModule_GetDict (m);
42 if (PyErr_Occurred())
43 Py_FatalError("can't get dict");
44
45 gtkvnc_add_constants(m, "VNC_DISPLAY_");
46 gtkvnc_register_classes (d);
47
48 if (PyErr_Occurred ()) {
49 Py_FatalError ("can't initialise module vnc");
50 }
51 }
52 /*
53 * Local variables:
54 * c-indent-level: 4
55 * c-basic-offset: 4
56 * indent-tabs-mode: nil
57 * End:
58 */
59