2 * Copyright (C) 2006-2007, Red Hat, Inc.
3 * Copyright (C) 2007-2008 Jan Michael Alonzo <jmalonzo@unpluggable.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library 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 GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
25 /* include this first, before NO_IMPORT_PYGOBJECT is defined */
26 #include <pygobject.h>
27 #include <pygtk/pygtk.h>
29 extern PyMethodDef pywebkit_functions
[];
31 void pywebkit_register_classes (PyObject
*d
);
34 extern PyMethodDef pygjs_functions
[];
35 void pygjs_register_classes (PyObject
*d
);
43 if (!pygobject_init(-1, -1, -1)) {
45 Py_FatalError ("can't initialise module gobject");
51 m
= Py_InitModule ("webkit", pywebkit_functions
);
52 d
= PyModule_GetDict (m
);
53 pywebkit_register_classes (d
);
56 /* webkit.gjs module */
57 m
= Py_InitModule ("webkit.gjs", pygjs_functions
);
58 d
= PyModule_GetDict(m
);
59 pygjs_register_classes (d
);
62 if (PyErr_Occurred ()) {
64 Py_FatalError ("can't initialise module webkit.gjs");