aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS3
-rw-r--r--ChangeLog20
-rw-r--r--Makefile.am4
-rw-r--r--README.Python26
-rw-r--r--configure.ac124
-rw-r--r--m4/.cvsignore2
-rw-r--r--m4/python.m462
-rw-r--r--src/Makefile.am91
-rw-r--r--src/ephy-extensions-manager.c18
-rw-r--r--src/ephy-python-extension.c370
-rw-r--r--src/ephy-python-extension.h59
-rw-r--r--src/ephy-python-loader.c143
-rw-r--r--src/ephy-python-loader.h59
-rw-r--r--src/ephy-python.c57
-rw-r--r--src/ephy-python.h32
-rw-r--r--src/epiphany.defs3044
-rw-r--r--src/epiphany.override392
17 files changed, 4498 insertions, 8 deletions
diff --git a/AUTHORS b/AUTHORS
index 085adc7c5..f033be37a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,4 +1,7 @@
Marco Pesenti Gritti <marco@gnome.org>
Xan Lopez <xan@gnome.org>
Christian Persch <chpe@gnome.org>
+Adam Hooper <adamh@cvs.gnome.org>
+Jean-François Rameau <jframeau@cvs.gnome.org>
+Crispin Flowerday <crispin@flowerday.cx>
diff --git a/ChangeLog b/ChangeLog
index a5a53b1e7..199fd4291 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2005-05-21 Christian Persch <chpe@cvs.gnome.org>
+
+ * Makefile.am:
+ * configure.ac:
+ A README.Python
+ A m4/.cvsignore:
+ A m4/python.m4:
+ * src/Makefile.am:
+ * src/ephy-extensions-manager.c: (get_loader_for_type):
+ A src/ephy-python-extension.c:
+ A src/ephy-python-extension.h:
+ A src/ephy-python-loader.c:
+ A src/ephy-python-loader.h:
+ A src/ephy-python.c:
+ A src/ephy-python.h:
+ A src/epiphany.defs:
+ A src/epiphany.override:
+
+ Merge Pyphany.
+
2005-05-15 Jean-François Rameau <jframeau@cvs.gnome.org>
* data/check-mime.py:
diff --git a/Makefile.am b/Makefile.am
index 6dd4969a2..3075eca18 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
-## Process this file with automake to produce Makefile.in
-
SUBDIRS = lib embed idl src data po help doc
+ACLOCAL_AMFLAGS = -I m4
+
distcleancheck_listfiles = find . -type f -print | grep -v 'omf\.out'
distuninstallcheck_listfiles = find . -type f -print | grep -v '/var/scrollkeeper'
diff --git a/README.Python b/README.Python
new file mode 100644
index 000000000..47ee9e13f
--- /dev/null
+++ b/README.Python
@@ -0,0 +1,26 @@
+Updating the epiphany.defs file
+-------------------------------
+
+Pygtk wraps most functions itself automatically, it uses the
+epiphany.defs file, this must be kept in-sync with the epiphany includes.
+To update the file:
+
+ - Install gnome-python so that you have the "h2def.py" script
+
+ - Ensure that the installed epiphany include directory is uptodate
+ (i.e. it doesn't contain any stale ephy header)
+
+ - Run "python /path/to/h2def.py /path/to/include/epiphany-1.5/epiphany/* > epiphany.defs
+
+ - You MUST now compare to see what has changed, e.g. the above command has the
+ following problems:
+ - It misses boxed types
+ - It doesn't mark interfaces correctly
+ - You need to ensure that no is-constructor-of lines have been lost
+
+ - Basically, just do a cvs diff and fix things up as appropriate.
+
+ - Finally ensure it compiles, but that's obvious, right? :-)
+
+You could also make all the changes manually, but it's easier to use
+the above process.
diff --git a/configure.ac b/configure.ac
index c20629b9c..73aaed8d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,7 @@ GNOME_COMMON_INIT
AC_PREREQ([2.59])
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([configure.ac])
@@ -29,9 +30,6 @@ AC_SUBST([EPIPHANY_MAJOR])
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip check-news])
-dnl AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"])
-AC_SUBST([ACLOCAL_AMFLAGS], ["\${ACLOCAL_FLAGS}"])
-
AM_MAINTAINER_MODE
if test "x$enable_maintainer_mode" = "xyes"; then
AC_DEFINE([MAINTAINER_MODE],[1],[Define to enable 'maintainer-only' behaviour])
@@ -439,13 +437,131 @@ DBUS_REQUIRED=0.22
DBUS_GLIB_REQUIRED=0.22
if test "x$enable_dbus" = "xyes" ; then
- AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled (default=disabled)])
+ AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled])
PKG_CHECK_MODULES([DBUS], [dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED])
fi
AM_CONDITIONAL([ENABLE_DBUS], [test "x$enable_dbus" = "xyes"])
+dnl ******
+dnl Python
+dnl ******
+
+AC_MSG_CHECKING([whether python support is requested])
+
+AC_ARG_ENABLE([python],
+ AS_HELP_STRING([--enable-python],[Enable python support]),
+ [enable_python=$enableval have_python=$enableval],
+ [enable_python=autodetect have_python=yes])
+
+AC_MSG_RESULT([$enable_python])
+
+if test "x$have_python" != "xno"; then
+ AM_PATH_PYTHON([2.3],[],[no])
+
+ if test "x$PYTHON" = "x:"; then
+ have_python=no
+ fi
+fi
+
+if test "x$have_python" != "xno"; then
+ AM_CHECK_PYTHON_HEADERS([],[have_python=no])
+fi
+
+if test "x$have_python" != "xno"; then
+ PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
+ PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
+ PYTHON_LIBS="-lpython$PYTHON_VERSION"
+ PYTHON_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config"
+ PYTHON_CFLAGS="-I$PY_PREFIX/include/python$PYTHON_VERSION"
+ PYTHON_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/Makefile"
+ PYTHON_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
+ PYTHON_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
+ PYTHON_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
+ PYTHON_EXTRA_LIBS="$PYTHON_LOCALMODLIBS $PYTHON_BASEMODLIBS $PYTHON_OTHER_LIBS"
+ AC_SUBST([PYTHON_LIBS])
+ AC_SUBST([PYTHON_LIB_LOC])
+ AC_SUBST([PYTHON_CFLAGS])
+ AC_SUBST([PYTHON_EXTRA_LIBS])
+
+ dnl FIXME: do we really need this test?
+ AC_MSG_CHECKING([whether we can build a shared library depending on libpython])
+ rm -rf testpython
+ mkdir testpython
+ cd testpython
+ cat > testpython.c <<EOF
+#include <Python.h>
+int testpython (void)
+{
+Py_Exit (0);
+}
+EOF
+
+ if /bin/sh ../libtool --mode=compile ${CC} $PYTHON_CFLAGS -c testpython.c >/dev/null 2>&1 && \
+ /bin/sh ../libtool --mode=link ${CC} -o testpython.la -rpath `pwd` -module -avoid-version $PYTHON_LIB_LOC testpython.lo $PYTHON_LIBS $PYTHON_EXTRA_LIBS >/dev/null 2>&1 && \
+ grep 'dlname.*testpython' testpython.la >/dev/null 2>&1; then
+ result=yes
+ else
+ result=no
+ have_python=no
+ fi
+ cd ..
+ rm -rf testpython
+ AC_MSG_RESULT([$result])
+fi
+
+if test "x$have_python" != "xno"; then
+ PYGTK_REQUIRED=2.6.0
+ GNOME_PYTHON_REQUIRED=2.6.0
+
+ PKG_CHECK_MODULES([PYGTK], [pygtk-2.0 >= $PYGTK_REQUIRED gnome-python-2.0 >= $GNOME_PYTHON_REQUIRED],
+ [],[have_python=no])
+
+ AC_SUBST([PYGTK_CFLAGS])
+ AC_SUBST([PYGTK_LIBS])
+fi
+
+if test "x$have_python" != "xno"; then
+ AC_MSG_CHECKING([for pygtk defs])
+ PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
+ AC_MSG_RESULT([$PYGTK_DEFSDIR])
+
+ AC_MSG_CHECKING([for pygtk codegen])
+ PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
+ AC_MSG_RESULT([$PYGTK_CODEGEN])
+
+ AC_SUBST([PYGTK_DEFSDIR])
+ AC_SUBST([PYGTK_CODEGEN])
+
+ dnl Check for -fno-strict-aliasing
+ FLAGS="-fno-strict-aliasing"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $FLAGS"
+ AC_MSG_CHECKING([whether [$]CC understands $FLAGS])
+ AC_TRY_COMPILE([], [], [compiler_has_option=yes], [compiler_has_option=no])
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT($compiler_has_option)
+ if test $compiler_has_option = yes; then
+ NO_STRICT_ALIASING_CFLAGS="$FLAGS"
+ fi
+ AC_SUBST([NO_STRICT_ALIASING_CFLAGS])
+fi
+
+if test "x$have_python" != "xyes"; then
+ if test "x$enable_python" = "xyes"; then
+ AC_MSG_ERROR([Python not found])
+ elif test "x$enable_python" = "xautodetect"; then
+ enable_python=no
+ AC_MSG_WARN([Python not found, disabling python support])
+ fi
+elif test "x$enable_python" != "xno"; then
+ enable_python=yes
+ AC_DEFINE([ENABLE_PYTHON],[1],[Define to compile with python support])
+fi
+
+AM_CONDITIONAL([ENABLE_PYTHON],[test "x$enable_python" = "xyes"])
+
dnl *******************************
dnl Add warning flags
dnl *******************************
diff --git a/m4/.cvsignore b/m4/.cvsignore
new file mode 100644
index 000000000..e429342b9
--- /dev/null
+++ b/m4/.cvsignore
@@ -0,0 +1,2 @@
+gtk-doc.m4
+intltool.m4
diff --git a/m4/python.m4 b/m4/python.m4
new file mode 100644
index 000000000..a1396df76
--- /dev/null
+++ b/m4/python.m4
@@ -0,0 +1,62 @@
+## this one is commonly used with AM_PATH_PYTHONDIR ...
+dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl Check if a module containing a given symbol is visible to python.
+AC_DEFUN(AM_CHECK_PYMOD,
+[AC_REQUIRE([AM_PATH_PYTHON])
+py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
+ifelse([$2],[], [prog="
+import sys
+try:
+ import $1
+except ImportError:
+ sys.exit(1)
+except:
+ sys.exit(0)
+sys.exit(0)"], [prog="
+import $1
+$1.$2"])
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+ then
+ eval "py_cv_mod_$py_mod_var=yes"
+ else
+ eval "py_cv_mod_$py_mod_var=no"
+ fi
+])
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+ AC_MSG_RESULT(yes)
+ ifelse([$3], [],, [$3
+])dnl
+else
+ AC_MSG_RESULT(no)
+ ifelse([$4], [],, [$4
+])dnl
+fi
+])
+
+dnl a macro to check for ability to create python extensions
+dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
diff --git a/src/Makefile.am b/src/Makefile.am
index a2e21dad5..71f511843 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,6 +2,10 @@ SUBDIRS = bookmarks
noinst_LTLIBRARIES = libephymain.la
+if ENABLE_PYTHON
+noinst_LTLIBRARIES += libpyphany.la
+endif
+
bin_PROGRAMS = epiphany
CXXLD = $(CXX)
@@ -61,7 +65,8 @@ INST_H_FILES = \
ephy-window.h
libephymain_la_SOURCES = \
- $(BUILT_SOURCES) \
+ $(CORBA_SOURCE) \
+ $(TYPES_SOURCE) \
ephy-action-helper.c \
ephy-automation.c \
ephy-completion-model.c \
@@ -120,6 +125,61 @@ if ENABLE_DBUS
libephymain_la_CFLAGS += $(DBUS_CFLAGS)
endif
+if ENABLE_PYTHON
+NOINST_H_FILES += \
+ ephy-python.h \
+ ephy-python-extension.h \
+ ephy-python-loader.h
+
+PYPHANY_SOURCE = epiphany.c
+
+libpyphany_la_SOURCES = \
+ ephy-python.c \
+ ephy-python.h \
+ ephy-python-extension.c \
+ ephy-python-extension.h \
+ ephy-python-loader.c \
+ ephy-python-loader.h \
+ $(PYPHANY_SOURCE) \
+ $(TYPES_SOURCE)
+
+libpyphany_la_CPPFLAGS = \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/lib/widgets \
+ -I$(top_srcdir)/lib/egg \
+ -I$(top_srcdir)/embed \
+ -I$(top_srcdir)/embed/mozilla \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/bookmarks \
+ -I$(top_builddir)/lib \
+ -I$(top_builddir)/lib/widgets \
+ -I$(top_builddir)/lib/egg \
+ -I$(top_builddir)/embed \
+ -I$(top_builddir)/embed/mozilla \
+ -I$(top_builddir)/src \
+ -I$(top_builddir)/src/bookmarks \
+ $(PYTHON_INCLUDES) \
+ -DEXTENSIONS_DIR=\""$(libdir)/epiphany/$(EPIPHANY_MAJOR)/extensions"\" \
+ -DLOADER_DIR=\""$(libdir)/epiphany/$(EPIPHANY_MAJOR)/loaders"\" \
+ -DDATADIR=\""$(datadir)"\" \
+ $(AM_CPPFLAGS)
+
+libpyphany_la_CFLAGS = \
+ $(EPIPHANY_DEPENDENCY_CFLAGS) \
+ $(NO_STRICT_ALIASING_CFLAGS) \
+ $(PYGTK_CFLAGS) \
+ $(AM_CFLAGS)
+
+libpyphany_la_LDFLAGS = \
+ -export-symbols-regex ephy_python_init
+
+libpyphany_la_LIBADD = \
+ $(EPIPHANY_DEPENDENCY_LIBS) \
+ $(PYTHON_LIB_LOC) $(PYTHON_LIBS) \
+ $(PYTHON_EXTRA_LIBS) \
+ $(PYGTK_LIBS)
+endif
+
epiphany_SOURCES = ephy-main.c
epiphany_CPPFLAGS = \
@@ -153,9 +213,26 @@ if ENABLE_DBUS
epiphany_LDADD += $(DBUS_LIBS)
endif
+if ENABLE_PYTHON
+epiphany_LDADD += \
+ libpyphany.la \
+ $(PYTHON_LIB_LOC) $(PYTHON_LIBS) \
+ $(PYTHON_EXTRA_LIBS) \
+ $(PYGTK_LIBS)
+endif
+
+if ENABLE_PYTHON
+pydefsdir = $(datadir)/pygtk/2.0/defs
+pydefs_DATA = epiphany.defs
+
+EXTRA_DIST = \
+ $(pydefs_DATA)
+endif
+
BUILT_SOURCES = \
$(CORBA_SOURCE) \
- $(TYPES_SOURCE)
+ $(TYPES_SOURCE) \
+ $(PYPHANY_SOURCE)
TYPES_SOURCE = \
ephy-type-builtins.c \
@@ -203,6 +280,16 @@ stamp-ephy-type-builtins.h: $(INST_H_FILES) $(NOINST_H_FILES)
&& rm -f xgen-$(@F) \
&& echo timestamp > $(@F)
+epiphany.c: epiphany.defs epiphany.override
+ ( cd $(srcdir) && $(PYGTK_CODEGEN) \
+ --register $(PYGTK_DEFSDIR)/pango-types.defs \
+ --register $(PYGTK_DEFSDIR)/gdk-types.defs \
+ --register $(PYGTK_DEFSDIR)/gtk-types.defs \
+ --override $*.override \
+ --prefix py$* $(<F) ) > gen-$@ \
+ && ( cmp -s gen-$@ $@ || cp gen-$@ $@ ) \
+ && rm -f gen-$@
+
CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
DISTCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
MAINTAINERCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
diff --git a/src/ephy-extensions-manager.c b/src/ephy-extensions-manager.c
index 927d72fd8..f38a6ad43 100644
--- a/src/ephy-extensions-manager.c
+++ b/src/ephy-extensions-manager.c
@@ -52,6 +52,11 @@
#include <libxml/xmlschemas.h>
#endif
+#ifdef ENABLE_PYTHON
+#include "ephy-python-extension.h"
+#include "ephy-python-loader.h"
+#endif
+
#define CONF_LOADED_EXTENSIONS "/apps/epiphany/general/active_extensions"
#define SCHEMA_FILE "/epiphany-extension.xsd"
@@ -753,6 +758,19 @@ get_loader_for_type (EphyExtensionsManager *manager,
return g_object_ref (info->loader);
}
+#ifdef ENABLE_PYTHON
+ if (strcmp (type, "python") == 0)
+ {
+ info = g_new (LoaderInfo, 1);
+ info->type = g_strdup (type);
+ info->loader = g_object_new (EPHY_TYPE_PYTHON_LOADER, NULL);
+
+ manager->priv->factories =
+ g_list_append (manager->priv->factories, info);
+
+ return g_object_ref (info->loader);
+ }
+#endif
stype = sanitise_type (type);
name = g_strconcat ("lib", stype, "loader.", G_MODULE_SUFFIX, NULL);
diff --git a/src/ephy-python-extension.c b/src/ephy-python-extension.c
new file mode 100644
index 000000000..190327f73
--- /dev/null
+++ b/src/ephy-python-extension.c
@@ -0,0 +1,370 @@
+/*
+ * Copyright (C) 2003 Marco Pesenti Gritti
+ * Copyright (C) 2003 Christian Persch
+ * Copyright (C) 2004, 2005 Adam Hooper
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ */
+
+#include "Python.h"
+
+#include "config.h"
+
+#include "ephy-python-extension.h"
+
+#include <pygobject.h>
+
+#include "ephy-extension.h"
+#include "ephy-window.h"
+#include "ephy-tab.h"
+#include "ephy-file-helpers.h"
+#include "ephy-debug.h"
+
+#define EPHY_PYTHON_EXTENSION_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_PYTHON_EXTENSION, EphyPythonExtensionPrivate))
+
+struct _EphyPythonExtensionPrivate
+{
+ char *filename;
+ PyObject *module;
+};
+
+enum
+{
+ PROP_0,
+ PROP_FILENAME
+};
+
+static GObjectClass *parent_class = NULL;
+
+static int
+set_python_search_path (const char *filename)
+{
+ char *dirname;
+ char *dot_dir;
+ int ret = 2;
+ PyObject *sys_path;
+ PyObject *pValue;
+
+ sys_path = PySys_GetObject ("path");
+
+ /* Systems extensions dir */
+ pValue = PyString_FromString (EXTENSIONS_DIR);
+ PyList_Insert (sys_path, 0, pValue);
+ Py_DECREF (pValue);
+
+ /* Home dir */
+ dot_dir = g_strconcat (ephy_dot_dir (), "/extensions", NULL);
+ pValue = PyString_FromString (dot_dir);
+ PyList_Insert (sys_path, 0, pValue);
+ Py_DECREF (pValue);
+ g_free (dot_dir);
+
+ /* Absolute path specified in .xml file */
+ dirname = g_path_get_dirname (filename);
+ if (g_path_is_absolute (dirname))
+ {
+ pValue = PyString_FromString (dirname);
+ PyList_Insert (sys_path, 0, pValue);
+ Py_DECREF (pValue);
+ ret++;
+ }
+ g_free (dirname);
+
+ return ret;
+}
+
+static void
+unset_python_search_path (int num_dirs)
+{
+ PyObject *sys_path = PySys_GetObject ("path");
+
+ PySequence_DelSlice (sys_path, 0, num_dirs);
+}
+
+static void
+ephy_python_extension_init (EphyPythonExtension *extension)
+{
+ LOG ("EphyPythonExtension initialising");
+
+ extension->priv = EPHY_PYTHON_EXTENSION_GET_PRIVATE (extension);
+}
+
+static GObject *
+ephy_python_extension_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params)
+{
+ GObject *object;
+ EphyPythonExtension *ext;
+ char *module_name; /* filename minus optional ".py" */
+ /* Note: could equally be a directory */
+ PyObject *pModules, *pModule, *pReload;
+
+ int num_temp_paths;
+
+ object = parent_class->constructor (type, n_construct_properties,
+ construct_params);
+
+ ext = EPHY_PYTHON_EXTENSION (object);
+
+ module_name = g_path_get_basename (ext->priv->filename);
+
+ num_temp_paths = set_python_search_path (ext->priv->filename);
+
+ pModules = PySys_GetObject ("modules");
+ g_assert (pModules != NULL);
+
+ pModule = PyDict_GetItemString (pModules, module_name);
+
+ if (pModule == NULL)
+ {
+ pModule = PyImport_ImportModule (module_name);
+
+ if (pModule == NULL)
+ {
+ PyErr_Print ();
+ PyErr_Clear ();
+ g_warning ("Could not initialize Python module '%s'",
+ module_name);
+ }
+ }
+ else
+ {
+ pReload = PyImport_ReloadModule (pModule);
+
+ if (pReload == NULL)
+ {
+ PyErr_Print ();
+ PyErr_Clear ();
+ g_warning ("Could not reload Python module '%s'\n"
+ "Falling back to previous version",
+ module_name);
+ }
+ else
+ {
+ Py_DECREF (pReload);
+ }
+ }
+
+ unset_python_search_path (num_temp_paths);
+
+ ext->priv->module = pModule;
+
+ g_free (module_name);
+
+ return object;
+}
+
+static void
+ephy_python_extension_finalize (GObject *object)
+{
+ EphyPythonExtension *extension =
+ EPHY_PYTHON_EXTENSION (object);
+
+ LOG ("EphyPythonExtension finalizing");
+
+ g_free (extension->priv->filename);
+ Py_XDECREF (extension->priv->module);
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+call_python_func (EphyExtension *extension,
+ const char *func_name,
+ EphyWindow *window,
+ EphyTab *tab) /* HACK: tab may be NULL */
+{
+ PyObject *pDict, *pFunc;
+ PyObject *pArgs, *pValue, *pTab = NULL, *pWindow;
+ EphyPythonExtension *py_ext;
+
+ py_ext = EPHY_PYTHON_EXTENSION (extension);
+
+ /* Happens if the module load fails, e.g. python couldn't
+ * parse it, so be quiet about it, we will have already warned */
+ if (py_ext->priv->module == NULL)
+ {
+ return;
+ }
+
+ pDict = PyModule_GetDict (py_ext->priv->module);
+ pFunc = PyDict_GetItemString (pDict, func_name);
+
+ if (pFunc && PyCallable_Check (pFunc))
+ {
+ pArgs = PyTuple_New (tab == NULL ? 1 : 2);
+
+ pWindow = pygobject_new (G_OBJECT (window));
+ PyTuple_SetItem (pArgs, 0, pWindow);
+
+ if (tab != NULL)
+ {
+ pTab = pygobject_new (G_OBJECT (tab));
+ PyTuple_SetItem (pArgs, 1, pTab);
+ }
+
+ pValue = PyObject_CallObject (pFunc, pArgs);
+ if (pValue == NULL)
+ {
+ PyErr_Print ();
+ PyErr_Clear ();
+ g_warning ("Python code for '%s' failed to execute",
+ func_name);
+ }
+ Py_XDECREF (pValue);
+ Py_DECREF (pArgs);
+ }
+ else
+ {
+ if (PyErr_Occurred ())
+ {
+ PyErr_Print ();
+ PyErr_Clear ();
+ }
+ }
+}
+
+static void
+impl_attach_tab (EphyExtension *extension,
+ EphyWindow *window,
+ EphyTab *tab)
+{
+ call_python_func (extension, "attach_tab", window, tab);
+}
+
+static void
+impl_detach_tab (EphyExtension *extension,
+ EphyWindow *window,
+ EphyTab *tab)
+{
+ call_python_func (extension, "detach_tab", window, tab);
+
+ g_idle_add ((GSourceFunc) PyGC_Collect, NULL);
+}
+
+static void
+impl_attach_window (EphyExtension *extension,
+ EphyWindow *window)
+{
+ call_python_func (extension, "attach_window", window, NULL);
+}
+
+static void
+impl_detach_window (EphyExtension *extension,
+ EphyWindow *window)
+{
+ call_python_func (extension, "detach_window", window, NULL);
+
+ g_idle_add ((GSourceFunc) PyGC_Collect, NULL);
+}
+
+static void
+ephy_python_extension_iface_init (EphyExtensionIface *iface)
+{
+ iface->attach_tab = impl_attach_tab;
+ iface->detach_tab = impl_detach_tab;
+ iface->attach_window = impl_attach_window;
+ iface->detach_window = impl_detach_window;
+}
+
+static void
+ephy_python_extension_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ /* no readable properties */
+ g_return_if_reached ();
+}
+
+static void
+ephy_python_extension_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ EphyPythonExtension *ext = EPHY_PYTHON_EXTENSION (object);
+
+ switch (prop_id)
+ {
+ case PROP_FILENAME:
+ ext->priv->filename = g_value_dup_string (value);
+ break;
+ default:
+ g_return_if_reached ();
+ }
+}
+
+static void
+ephy_python_extension_class_init (EphyPythonExtensionClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ object_class->finalize = ephy_python_extension_finalize;
+ object_class->constructor = ephy_python_extension_constructor;
+ object_class->get_property = ephy_python_extension_get_property;
+ object_class->set_property = ephy_python_extension_set_property;
+
+ g_object_class_install_property
+ (object_class,
+ PROP_FILENAME,
+ g_param_spec_string ("filename",
+ "Filename",
+ "Filename",
+ NULL,
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_type_class_add_private (object_class, sizeof (EphyPythonExtensionPrivate));
+}
+
+GType
+ephy_python_extension_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ {
+ static const GTypeInfo our_info =
+ {
+ sizeof (EphyPythonExtensionClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) ephy_python_extension_class_init,
+ NULL,
+ NULL, /* class_data */
+ sizeof (EphyPythonExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) ephy_python_extension_init
+ };
+ static const GInterfaceInfo extension_info =
+ {
+ (GInterfaceInitFunc) ephy_python_extension_iface_init,
+ NULL,
+ NULL
+ };
+
+ type = g_type_register_static (G_TYPE_OBJECT, "EphyPythonExtension",
+ &our_info, 0);
+
+ g_type_add_interface_static (type, EPHY_TYPE_EXTENSION, &extension_info);
+ }
+
+ return type;
+}
diff --git a/src/ephy-python-extension.h b/src/ephy-python-extension.h
new file mode 100644
index 000000000..76cdc30a0
--- /dev/null
+++ b/src/ephy-python-extension.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2003 Marco Pesenti Gritti
+ * Copyright (C) 2003 Christian Persch
+ * Copyright (C) 2004, 2005 Adam Hooper
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ */
+
+#ifndef EPHY_PYTHON_EXTENSION_H
+#define EPHY_PYTHON_EXTENSION_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EPHY_TYPE_PYTHON_EXTENSION (ephy_python_extension_get_type ())
+#define EPHY_PYTHON_EXTENSION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_PYTHON_EXTENSION, EphyPythonExtension))
+#define EPHY_PYTHON_EXTENSION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_PYTHON_EXTENSION, EphyPythonExtensionClass))
+#define EPHY_IS_PYTHON_EXTENSION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_PYTHON_EXTENSION))
+#define EPHY_IS_PYTHON_EXTENSION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_PYTHON_EXTENSION))
+#define EPHY_PYTHON_EXTENSION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_PYTHON_EXTENSION, EphyPythonExtensionClass))
+
+typedef struct _EphyPythonExtension EphyPythonExtension;
+typedef struct _EphyPythonExtensionClass EphyPythonExtensionClass;
+typedef struct _EphyPythonExtensionPrivate EphyPythonExtensionPrivate;
+
+struct _EphyPythonExtensionClass
+{
+ GObjectClass parent_class;
+};
+
+struct _EphyPythonExtension
+{
+ GObject parent_instance;
+
+ /*< private >*/
+ EphyPythonExtensionPrivate *priv;
+};
+
+GType ephy_python_extension_get_type (void);
+
+G_END_DECLS
+
+#endif
diff --git a/src/ephy-python-loader.c b/src/ephy-python-loader.c
new file mode 100644
index 000000000..d376c39c5
--- /dev/null
+++ b/src/ephy-python-loader.c
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2003 Marco Pesenti Gritti
+ * Copyright (C) 2003, 2004, 2005 Christian Persch
+ * Copyright (C) 2004, 2005 Jean-François Rameau
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ */
+
+#include "config.h"
+
+#include "ephy-python-loader.h"
+#include "ephy-loader.h"
+#include "ephy-python.h"
+#include "ephy-python-extension.h"
+#include "ephy-debug.h"
+
+#define EPHY_PYTHON_LOADER_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_PYTHON_LOADER, EphyPythonLoaderPrivate))
+
+struct _EphyPythonLoaderPrivate
+{
+ gpointer dummy;
+};
+
+static GObjectClass *parent_class = NULL;
+
+static GObject *
+impl_get_object (EphyLoader *eloader,
+ GData **attributes)
+{
+ char *filename;
+ GObject *object;
+
+ filename = g_datalist_get_data (attributes, "module");
+ if (filename == NULL)
+ {
+ g_warning ("NULL module name!\n");
+ return NULL;
+ }
+
+ object = g_object_new (EPHY_TYPE_PYTHON_EXTENSION,
+ "filename", filename,
+ NULL);
+
+ /* we own one ref */
+ return g_object_ref (object);
+}
+
+static void
+impl_release_object (EphyLoader *eloader,
+ GObject *object)
+{
+ g_return_if_fail (object != NULL);
+
+ g_object_unref (object);
+}
+
+static void
+ephy_python_loader_iface_init (EphyLoaderIface *iface)
+{
+ iface->type = "python";
+ iface->get_object = impl_get_object;
+ iface->release_object = impl_release_object;
+}
+
+static void
+ephy_python_loader_init (EphyPythonLoader *loader)
+{
+ loader->priv = EPHY_PYTHON_LOADER_GET_PRIVATE (loader);
+
+ LOG ("EphyPythonLoader initialising");
+
+ /* Initialize Python engine */
+ ephy_python_init ();
+}
+
+static void
+ephy_python_loader_finalize (GObject *object)
+{
+ LOG ("EphyPythonLoader finalising");
+
+ parent_class->finalize (object);
+}
+
+static void
+ephy_python_loader_class_init (EphyPythonLoaderClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ object_class->finalize = ephy_python_loader_finalize;
+
+ g_type_class_add_private (object_class, sizeof (EphyPythonLoaderPrivate));
+}
+
+GType
+ephy_python_loader_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ {
+ static const GTypeInfo our_info =
+ {
+ sizeof (EphyPythonLoaderClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) ephy_python_loader_class_init,
+ NULL,
+ NULL, /* class_data */
+ sizeof (EphyPythonLoader),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) ephy_python_loader_init
+ };
+ static const GInterfaceInfo loader_info =
+ {
+ (GInterfaceInitFunc) ephy_python_loader_iface_init,
+ NULL,
+ NULL
+ };
+
+ type = g_type_register_static (G_TYPE_OBJECT, "EphyPythonLoader",
+ &our_info, 0);
+
+ g_type_add_interface_static (type, EPHY_TYPE_LOADER, &loader_info);
+ }
+
+ return type;
+}
diff --git a/src/ephy-python-loader.h b/src/ephy-python-loader.h
new file mode 100644
index 000000000..48e288f47
--- /dev/null
+++ b/src/ephy-python-loader.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2003 Marco Pesenti Gritti
+ * Copyright (C) 2003, 2004, 2005 Christian Persch
+ * Copyright (C) 2004, 2005 Jean-François Rameau
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ */
+
+#ifndef EPHY_PYTHON_LOADER_H
+#define EPHY_PYTHON_LOADER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EPHY_TYPE_PYTHON_LOADER (ephy_python_loader_get_type ())
+#define EPHY_PYTHON_LOADER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_PYTHON_LOADER, EphyPythonLoader))
+#define EPHY_PYTHON_LOADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_PYTHON_LOADER, EphyPythonLoaderClass))
+#define EPHY_IS_PYTHON_LOADER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_PYTHON_LOADER))
+#define EPHY_IS_PYTHON_LOADER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_PYTHON_LOADER))
+#define EPHY_PYTHON_LOADER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_PYTHON_LOADER, EphyPythonLoaderClass))
+
+typedef struct _EphyPythonLoader EphyPythonLoader;
+typedef struct _EphyPythonLoaderClass EphyPythonLoaderClass;
+typedef struct _EphyPythonLoaderPrivate EphyPythonLoaderPrivate;
+
+struct _EphyPythonLoaderClass
+{
+ GObjectClass parent_class;
+};
+
+struct _EphyPythonLoader
+{
+ GObject parent_instance;
+
+ /*< private >*/
+ EphyPythonLoaderPrivate *priv;
+};
+
+GType ephy_python_loader_get_type (void);
+
+G_END_DECLS
+
+#endif /* !EPHY_PYTHON_LOADER_H */
diff --git a/src/ephy-python.c b/src/ephy-python.c
new file mode 100644
index 000000000..242d19330
--- /dev/null
+++ b/src/ephy-python.c
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2004, 2005 Jean-François Rameau
+ * Copyright (C) 2004, 2005 Adam Hooper
+ * Copyright (C) 2004, 2005 Crispin Flowerday
+ * Copyright (C) 2004, 2005 Christian Persch
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ */
+
+#include <Python.h>
+
+#include "config.h"
+
+#include "ephy-python.h"
+
+#include <pygobject.h>
+#include <pygtk/pygtk.h>
+
+void pyepiphany_register_classes (PyObject *d);
+void pyepiphany_add_constants (PyObject *module, const gchar *strip_prefix);
+
+extern PyMethodDef pyepiphany_functions[];
+
+void
+ephy_python_init (void)
+{
+ char *argv[1];
+ PyObject *m, *d;
+
+ Py_Initialize();
+
+ argv[0] = g_get_prgname ();
+ PySys_SetArgv (1, argv);
+
+ init_pygobject ();
+ init_pygtk ();
+
+ m = Py_InitModule ("epiphany", pyepiphany_functions);
+ d = PyModule_GetDict (m);
+
+ pyepiphany_register_classes (d);
+ pyepiphany_add_constants (m, "EPHY_");
+}
diff --git a/src/ephy-python.h b/src/ephy-python.h
new file mode 100644
index 000000000..48b6e3285
--- /dev/null
+++ b/src/ephy-python.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2005 Christian Persch
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ */
+
+#ifndef EPHY_PYTHON_H
+#define EPHY_PYTHON_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+void ephy_python_init (void);
+
+G_END_DECLS
+
+#endif
diff --git a/src/epiphany.defs b/src/epiphany.defs
new file mode 100644
index 000000000..ea85c97c3
--- /dev/null
+++ b/src/epiphany.defs
@@ -0,0 +1,3044 @@
+;; -*- scheme -*-
+; object definitions ...
+(define-object Bookmarks
+ (in-module "Ephy")
+ (parent "GObject")
+ (c-name "EphyBookmarks")
+ (gtype-id "EPHY_TYPE_BOOKMARKS")
+)
+
+(define-interface CommandManager
+ (in-module "Ephy")
+ (c-name "EphyCommandManager")
+ (gtype-id "EPHY_TYPE_COMMAND_MANAGER")
+)
+
+(define-interface CookieManager
+ (in-module "Ephy")
+ (c-name "EphyCookieManager")
+ (gtype-id "EPHY_TYPE_COOKIE_MANAGER")
+)
+
+(define-object Dialog
+ (in-module "Ephy")
+ (parent "GObject")
+ (c-name "EphyDialog")
+ (gtype-id "EPHY_TYPE_DIALOG")
+)
+
+(define-interface Embed
+ (in-module "Ephy")
+ (c-name "EphyEmbed")
+ (gtype-id "EPHY_TYPE_EMBED")
+)
+
+(define-interface EmbedEvent
+ (in-module "Ephy")
+ (c-name "EphyEmbedEvent")
+ (gtype-id "EPHY_TYPE_EMBED_EVENT")
+)
+
+(define-object EmbedPersist
+ (in-module "Ephy")
+ (parent "GObject")
+ (c-name "EphyEmbedPersist")
+ (gtype-id "EPHY_TYPE_EMBED_PERSIST")
+)
+
+(define-object EmbedShell
+ (in-module "Ephy")
+ (parent "GObject")
+ (c-name "EphyEmbedShell")
+ (gtype-id "EPHY_TYPE_EMBED_SHELL")
+)
+
+(define-interface EmbedSingle
+ (in-module "Ephy")
+ (c-name "EphyEmbedSingle")
+ (gtype-id "EPHY_TYPE_EMBED_SINGLE")
+)
+
+(define-interface Extension
+ (in-module "Ephy")
+ (c-name "EphyExtension")
+ (gtype-id "EPHY_TYPE_EXTENSION")
+)
+
+(define-object ExtensionsManager
+ (in-module "Ephy")
+ (parent "GObject")
+ (c-name "EphyExtensionsManager")
+ (gtype-id "EPHY_TYPE_EXTENSIONS_MANAGER")
+)
+
+(define-object History
+ (in-module "Ephy")
+ (parent "GObject")
+ (c-name "EphyHistory")
+ (gtype-id "EPHY_TYPE_HISTORY")
+)
+
+(define-object Link
+ (in-module "Ephy")
+ (c-name "EphyLink")
+ (gtype-id "EPHY_TYPE_LINK")
+)
+
+(define-interface Loader
+ (in-module "Ephy")
+ (c-name "EphyLoader")
+ (gtype-id "EPHY_TYPE_LOADER")
+)
+
+(define-object NodeDb
+ (in-module "Ephy")
+ (parent "GObject")
+ (c-name "EphyNodeDb")
+ (gtype-id "EPHY_TYPE_NODE_DB")
+)
+
+(define-object Notebook
+ (in-module "Ephy")
+ (parent "GtkNotebook")
+ (c-name "EphyNotebook")
+ (gtype-id "EPHY_TYPE_NOTEBOOK")
+)
+
+(define-interface PasswordManager
+ (in-module "Ephy")
+ (c-name "EphyPasswordManager")
+ (gtype-id "EPHY_TYPE_PASSWORD_MANAGER")
+)
+
+(define-interface PermissionManager
+ (in-module "Ephy")
+ (c-name "EphyPermissionManager")
+ (gtype-id "EPHY_TYPE_PERMISSION_MANAGER")
+)
+
+(define-object Session
+ (in-module "Ephy")
+ (parent "GObject")
+ (c-name "EphySession")
+ (gtype-id "EPHY_TYPE_SESSION")
+)
+
+(define-object Shell
+ (in-module "Ephy")
+ (parent "EphyEmbedShell")
+ (c-name "EphyShell")
+ (gtype-id "EPHY_TYPE_SHELL")
+)
+
+(define-object Statusbar
+ (in-module "Ephy")
+ (parent "GtkStatusbar")
+ (c-name "EphyStatusbar")
+ (gtype-id "EPHY_TYPE_STATUSBAR")
+ (fields
+ '("GtkTooltips*" "tooltips")
+ )
+)
+
+(define-object Tab
+ (in-module "Ephy")
+ (parent "GtkBin")
+ (c-name "EphyTab")
+ (gtype-id "EPHY_TYPE_TAB")
+)
+
+(define-object Window
+ (in-module "Ephy")
+ (parent "GtkWindow")
+ (c-name "EphyWindow")
+ (gtype-id "EPHY_TYPE_WINDOW")
+)
+
+;; Boxed types ...
+
+(define-boxed Cookie
+ (in-module "Ephy")
+ (c-name "EphyCookie")
+ (gtype-id "EPHY_TYPE_COOKIE")
+ (fields
+ '("char*" "name")
+ '("char*" "value")
+ '("char*" "domain")
+ '("char*" "path")
+ '("gulong" "expires")
+ '("glong" "real_expires")
+ '("guint" "is_secure")
+ '("guint" "is_session")
+ )
+)
+
+(define-boxed PasswordInfo
+ (in-module "Ephy")
+ (c-name "EphyPasswordInfo")
+ (gtype-id "EPHY_TYPE_PASSWORD_INFO")
+ (copy_func "ephy_password_info_copy")
+ (release-func "ephy_password_info_free")
+ (fields
+ '("char*" "host")
+ '("char*" "username")
+ '("char*" "password")
+ )
+)
+
+(define-boxed Node
+ (in-module "Ephy")
+ (c-name "EphyNode")
+ (gtype-id "EPHY_TYPE_NODE")
+)
+
+;; Enumerations and flags ...
+
+(define-enum BookmarkProperty
+ (in-module "Ephy")
+ (c-name "EphyBookmarkProperty")
+ (gtype-id "EPHY_TYPE_BOOKMARK_PROPERTY")
+ (values
+ '("bmk-prop-title" "EPHY_NODE_BMK_PROP_TITLE")
+ '("bmk-prop-location" "EPHY_NODE_BMK_PROP_LOCATION")
+ '("bmk-prop-keywords" "EPHY_NODE_BMK_PROP_KEYWORDS")
+ '("keyword-prop-name" "EPHY_NODE_KEYWORD_PROP_NAME")
+ '("bmk-prop-icon" "EPHY_NODE_BMK_PROP_ICON")
+ '("keyword-prop-priority" "EPHY_NODE_KEYWORD_PROP_PRIORITY")
+ )
+)
+
+;;(define-enum DialogApplyType
+;; (in-module "Ephy")
+;; (c-name "EphyDialogApplyType")
+;; (gtype-id "EPHY_TYPE_DIALOG_APPLY_TYPE")
+;; (values
+;; '("normal" "PT_NORMAL")
+;; '("autoapply" "PT_AUTOAPPLY")
+;; )
+;;)
+
+(define-flags EmbedEventContext
+ (in-module "Ephy")
+ (c-name "EphyEmbedEventContext")
+ (gtype-id "EPHY_TYPE_EMBED_EVENT_CONTEXT")
+ (values
+ '("none" "EPHY_EMBED_CONTEXT_NONE")
+ '("default" "EPHY_EMBED_CONTEXT_DEFAULT")
+ '("link" "EPHY_EMBED_CONTEXT_LINK")
+ '("image" "EPHY_EMBED_CONTEXT_IMAGE")
+ '("document" "EPHY_EMBED_CONTEXT_DOCUMENT")
+ '("input" "EPHY_EMBED_CONTEXT_INPUT")
+ '("input-password" "EPHY_EMBED_CONTEXT_INPUT_PASSWORD")
+ '("xul" "EPHY_EMBED_CONTEXT_XUL")
+ '("email-link" "EPHY_EMBED_CONTEXT_EMAIL_LINK")
+ )
+)
+
+(define-flags EmbedNetState
+ (in-module "Ephy")
+ (c-name "EphyEmbedNetState")
+ (gtype-id "EPHY_TYPE_EMBED_NET_STATE")
+ (values
+ '("unknown" "EPHY_EMBED_STATE_UNKNOWN")
+ '("start" "EPHY_EMBED_STATE_START")
+ '("redirecting" "EPHY_EMBED_STATE_REDIRECTING")
+ '("transferring" "EPHY_EMBED_STATE_TRANSFERRING")
+ '("negotiating" "EPHY_EMBED_STATE_NEGOTIATING")
+ '("stop" "EPHY_EMBED_STATE_STOP")
+ '("is-request" "EPHY_EMBED_STATE_IS_REQUEST")
+ '("is-document" "EPHY_EMBED_STATE_IS_DOCUMENT")
+ '("is-network" "EPHY_EMBED_STATE_IS_NETWORK")
+ '("is-window" "EPHY_EMBED_STATE_IS_WINDOW")
+ )
+)
+
+(define-flags EmbedChrome
+ (in-module "Ephy")
+ (c-name "EphyEmbedChrome")
+ (gtype-id "EPHY_TYPE_EMBED_CHROME")
+ (values
+ '("menubar" "EPHY_EMBED_CHROME_MENUBAR")
+ '("toolbar" "EPHY_EMBED_CHROME_TOOLBAR")
+ '("statusbar" "EPHY_EMBED_CHROME_STATUSBAR")
+ '("bookmarksbar" "EPHY_EMBED_CHROME_BOOKMARKSBAR")
+ )
+)
+
+(define-enum EmbedPrintPreviewNavType
+ (in-module "Ephy")
+ (c-name "EphyEmbedPrintPreviewNavType")
+ (gtype-id "EPHY_TYPE_EMBED_PRINT_PREVIEW_NAV_TYPE")
+ (values
+ '("goto-pagenum" "EPHY_EMBED_PRINTPREVIEW_GOTO_PAGENUM")
+ '("prev-page" "EPHY_EMBED_PRINTPREVIEW_PREV_PAGE")
+ '("next-page" "EPHY_EMBED_PRINTPREVIEW_NEXT_PAGE")
+ '("home" "EPHY_EMBED_PRINTPREVIEW_HOME")
+ '("end" "EPHY_EMBED_PRINTPREVIEW_END")
+ )
+)
+
+(define-enum EmbedSecurityLevel
+ (in-module "Ephy")
+ (c-name "EphyEmbedSecurityLevel")
+ (gtype-id "EPHY_TYPE_EMBED_SECURITY_LEVEL")
+ (values
+ '("unknown" "EPHY_EMBED_STATE_IS_UNKNOWN")
+ '("insecure" "EPHY_EMBED_STATE_IS_INSECURE")
+ '("broken" "EPHY_EMBED_STATE_IS_BROKEN")
+ '("secure-low" "EPHY_EMBED_STATE_IS_SECURE_LOW")
+ '("secure-med" "EPHY_EMBED_STATE_IS_SECURE_MED")
+ '("secure-high" "EPHY_EMBED_STATE_IS_SECURE_HIGH")
+ )
+)
+
+(define-enum EmbedDocumentType
+ (in-module "Ephy")
+ (c-name "EphyEmbedDocumentType")
+ (gtype-id "EPHY_TYPE_EMBED_DOCUMENT_TYPE")
+ (values
+ '("html" "EPHY_EMBED_DOCUMENT_HTML")
+ '("xml" "EPHY_EMBED_DOCUMENT_XML")
+ '("image" "EPHY_EMBED_DOCUMENT_IMAGE")
+ '("other" "EPHY_EMBED_DOCUMENT_OTHER")
+ )
+)
+
+(define-flags EmbedPersistFlags
+ (in-module "Ephy")
+ (c-name "EphyEmbedPersistFlags")
+ (gtype-id "EPHY_TYPE_EMBED_PERSIST_FLAGS")
+ (values
+ '("copy-page" "EPHY_EMBED_PERSIST_COPY_PAGE")
+ '("maindoc" "EPHY_EMBED_PERSIST_MAINDOC")
+ '("no-view" "EPHY_EMBED_PERSIST_NO_VIEW")
+ '("ask-destination" "EPHY_EMBED_PERSIST_ASK_DESTINATION")
+ '("do-conversion" "EPHY_EMBED_PERSIST_DO_CONVERSION")
+ )
+)
+
+(define-enum ContentCheckType
+ (in-module "Ephy")
+ (c-name "EphyContentCheckType")
+ (gtype-id "EPHY_TYPE_CONTENT_CHECK_TYPE")
+ (values
+ '("other" "EPHY_CONTENT_CHECK_TYPE_OTHER")
+ '("script" "EPHY_CONTENT_CHECK_TYPE_SCRIPT")
+ '("image" "EPHY_CONTENT_CHECK_TYPE_IMAGE")
+ '("stylesheet" "EPHY_CONTENT_CHECK_TYPE_STYLESHEET")
+ '("object" "EPHY_CONTENT_CHECK_TYPE_OBJECT")
+ '("document" "EPHY_CONTENT_CHECK_TYPE_DOCUMENT")
+ '("subdocument" "EPHY_CONTENT_CHECK_TYPE_SUBDOCUMENT")
+ '("refresh" "EPHY_CONTENT_CHECK_TYPE_REFRESH")
+ )
+)
+
+(define-flags LinkFlags
+ (in-module "Ephy")
+ (c-name "EphyLinkFlags")
+ (gtype-id "EPHY_TYPE_LINK_FLAGS")
+ (values
+ '("new-window" "EPHY_LINK_NEW_WINDOW")
+ '("new-tab" "EPHY_LINK_NEW_TAB")
+ '("jump-to" "EPHY_LINK_JUMP_TO")
+ )
+)
+
+(define-enum NodeSignalType
+ (in-module "Ephy")
+ (c-name "EphyNodeSignalType")
+ (gtype-id "EPHY_TYPE_NODE_SIGNAL_TYPE")
+ (values
+ '("destroy" "EPHY_NODE_DESTROY")
+ '("restored" "EPHY_NODE_RESTORED")
+ '("changed" "EPHY_NODE_CHANGED")
+ '("child-added" "EPHY_NODE_CHILD_ADDED")
+ '("child-changed" "EPHY_NODE_CHILD_CHANGED")
+ '("child-removed" "EPHY_NODE_CHILD_REMOVED")
+ '("children-reordered" "EPHY_NODE_CHILDREN_REORDERED")
+ )
+)
+
+(define-enum Permission
+ (in-module "Ephy")
+ (c-name "EphyPermission")
+ (gtype-id "EPHY_TYPE_PERMISSION")
+ (values
+ '("allowed" "EPHY_PERMISSION_ALLOWED")
+ '("denied" "EPHY_PERMISSION_DENIED")
+ '("default" "EPHY_PERMISSION_DEFAULT")
+ )
+)
+
+(define-enum ShellError
+ (in-module "Ephy")
+ (c-name "EphyShellError")
+ (gtype-id "EPHY_TYPE_SHELL_ERROR")
+ (values
+ '("missing-server" "EPHY_SHELL_ERROR_MISSING_SERVER")
+ '("object-reg-failed" "EPHY_SHELL_ERROR_OBJECT_REG_FAILED")
+ '("factory-reg-failed" "EPHY_SHELL_ERROR_FACTORY_REG_FAILED")
+ )
+)
+
+(define-flags ShellStartupFlags
+ (in-module "Ephy")
+ (c-name "EphyShellStartupFlags")
+ (gtype-id "EPHY_TYPE_SHELL_STARTUP_FLAGS")
+ (values
+ '("tabs" "EPHY_SHELL_STARTUP_TABS")
+ '("existing-window" "EPHY_SHELL_STARTUP_EXISTING_WINDOW")
+ '("fullscreen" "EPHY_SHELL_STARTUP_FULLSCREEN")
+ '("bookmarks-editor" "EPHY_SHELL_STARTUP_BOOKMARKS_EDITOR")
+ '("session" "EPHY_SHELL_STARTUP_SESSION")
+ '("import-bookmarks" "EPHY_SHELL_STARTUP_IMPORT_BOOKMARKS")
+ '("add-bookmark" "EPHY_SHELL_STARTUP_ADD_BOOKMARK")
+ )
+)
+
+(define-flags NewTabFlags
+ (in-module "Ephy")
+ (c-name "EphyNewTabFlags")
+ (gtype-id "EPHY_TYPE_NEW_TAB_FLAGS")
+ (values
+ '("home-page" "EPHY_NEW_TAB_HOME_PAGE")
+ '("new-page" "EPHY_NEW_TAB_NEW_PAGE")
+ '("open-page" "EPHY_NEW_TAB_OPEN_PAGE")
+ '("fullscreen-mode" "EPHY_NEW_TAB_FULLSCREEN_MODE")
+ '("dont-show-window" "EPHY_NEW_TAB_DONT_SHOW_WINDOW")
+ '("append-last" "EPHY_NEW_TAB_APPEND_LAST")
+ '("append-after" "EPHY_NEW_TAB_APPEND_AFTER")
+ '("jump" "EPHY_NEW_TAB_JUMP")
+ '("in-new-window" "EPHY_NEW_TAB_IN_NEW_WINDOW")
+ '("in-existing-window" "EPHY_NEW_TAB_IN_EXISTING_WINDOW")
+ )
+)
+
+(define-flags StateWindowFlags
+ (in-module "Ephy")
+ (c-name "EphyStateWindowFlags")
+ (gtype-id "EPHY_TYPE_STATE_WINDOW_FLAGS")
+ (values
+ '("none" "EPHY_STATE_WINDOW_SAVE_NONE")
+ '("size" "EPHY_STATE_WINDOW_SAVE_SIZE")
+ '("position" "EPHY_STATE_WINDOW_SAVE_POSITION")
+ )
+)
+
+(define-flags TabNavigationFlags
+ (in-module "Ephy")
+ (c-name "EphyTabNavigationFlags")
+ (gtype-id "EPHY_TYPE_TAB_NAVIGATION_FLAGS")
+ (values
+ '("up" "EPHY_TAB_NAV_UP")
+ '("back" "EPHY_TAB_NAV_BACK")
+ '("forward" "EPHY_TAB_NAV_FORWARD")
+ )
+)
+
+(define-enum TabAddressExpire
+ (in-module "Ephy")
+ (c-name "EphyTabAddressExpire")
+ (gtype-id "EPHY_TYPE_TAB_ADDRESS_EXPIRE")
+ (values
+ '("now" "EPHY_TAB_ADDRESS_EXPIRE_NOW")
+ '("next" "EPHY_TAB_ADDRESS_EXPIRE_NEXT")
+ '("current" "EPHY_TAB_ADDRESS_EXPIRE_CURRENT")
+ )
+)
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-bookmarks.h
+
+(define-function ephy_bookmarks_get_type
+ (c-name "ephy_bookmarks_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_bookmarks_new
+ (c-name "ephy_bookmarks_new")
+ (is-constructor-of "EphyBookmarks")
+ (return-type "EphyBookmarks*")
+)
+
+(define-method get_from_id
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_get_from_id")
+ (return-type "EphyNode*")
+ (parameters
+ '("long" "id")
+ )
+)
+
+(define-method get_toolbars_model
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_get_toolbars_model")
+ (return-type "GObject*")
+)
+
+(define-method add
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_add")
+ (return-type "EphyNode*")
+ (parameters
+ '("const-char*" "title")
+ '("const-char*" "url")
+ )
+)
+
+(define-method find_bookmark
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_find_bookmark")
+ (return-type "EphyNode*")
+ (parameters
+ '("const-char*" "url")
+ )
+)
+
+(define-method set_icon
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_set_icon")
+ (return-type "none")
+ (parameters
+ '("const-char*" "url")
+ '("const-char*" "icon")
+ )
+)
+
+(define-method set_address
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_set_address")
+ (return-type "none")
+ (parameters
+ '("EphyNode*" "bookmark")
+ '("const-char*" "address")
+ )
+)
+
+(define-method solve_smart_url
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_solve_smart_url")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "smart_url")
+ '("const-char*" "content")
+ )
+)
+
+(define-method show_bookmark_properties
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_show_bookmark_properties")
+ (return-type "GtkWidget*")
+ (parameters
+ '("EphyNode*" "bookmark")
+ '("GtkWidget*" "parent_window")
+ )
+)
+
+(define-method add_keyword
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_add_keyword")
+ (return-type "EphyNode*")
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method find_keyword
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_find_keyword")
+ (return-type "EphyNode*")
+ (parameters
+ '("const-char*" "name")
+ '("gboolean" "partial_match")
+ )
+)
+
+(define-method remove_keyword
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_remove_keyword")
+ (return-type "none")
+ (parameters
+ '("EphyNode*" "keyword")
+ )
+)
+
+(define-method has_keyword
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_has_keyword")
+ (return-type "gboolean")
+ (parameters
+ '("EphyNode*" "keyword")
+ '("EphyNode*" "bookmark")
+ )
+)
+
+(define-method set_keyword
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_set_keyword")
+ (return-type "none")
+ (parameters
+ '("EphyNode*" "keyword")
+ '("EphyNode*" "bookmark")
+ )
+)
+
+(define-method unset_keyword
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_unset_keyword")
+ (return-type "none")
+ (parameters
+ '("EphyNode*" "keyword")
+ '("EphyNode*" "bookmark")
+ )
+)
+
+(define-method get_topic_uri
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_get_topic_uri")
+ (return-type "char*")
+ (parameters
+ '("EphyNode*" "node")
+ )
+)
+
+(define-method get_favorites
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_get_favorites")
+ (return-type "EphyNode*")
+)
+
+(define-method get_keywords
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_get_keywords")
+ (return-type "EphyNode*")
+)
+
+(define-method get_bookmarks
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_get_bookmarks")
+ (return-type "EphyNode*")
+)
+
+(define-method get_not_categorized
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_get_not_categorized")
+ (return-type "EphyNode*")
+)
+
+(define-method get_smart_bookmarks
+ (of-object "EphyBookmarks")
+ (c-name "ephy_bookmarks_get_smart_bookmarks")
+ (return-type "EphyNode*")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-bookmarks-type-builtins.h
+
+(define-function ephy_bookmark_property_get_type
+ (c-name "ephy_bookmark_property_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-command-manager.h
+
+(define-function ephy_command_manager_get_type
+ (c-name "ephy_command_manager_get_type")
+ (return-type "GType")
+)
+
+(define-method do_command
+ (of-object "EphyCommandManager")
+ (c-name "ephy_command_manager_do_command")
+ (return-type "none")
+ (parameters
+ '("const-char*" "command")
+ )
+)
+
+(define-method can_do_command
+ (of-object "EphyCommandManager")
+ (c-name "ephy_command_manager_can_do_command")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "command")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-cookie-manager.h
+
+(define-function ephy_cookie_get_type
+ (c-name "ephy_cookie_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_cookie_new
+ (c-name "ephy_cookie_new")
+ (is-constructor-of "EphyCookie")
+ (return-type "EphyCookie*")
+)
+
+(define-method copy
+ (of-object "EphyCookie")
+ (c-name "ephy_cookie_copy")
+ (return-type "EphyCookie*")
+)
+
+(define-method free
+ (of-object "EphyCookie")
+ (c-name "ephy_cookie_free")
+ (return-type "none")
+)
+
+(define-function ephy_cookie_manager_get_type
+ (c-name "ephy_cookie_manager_get_type")
+ (return-type "GType")
+)
+
+(define-method list_cookies
+ (of-object "EphyCookieManager")
+ (c-name "ephy_cookie_manager_list_cookies")
+ (return-type "GList*")
+)
+
+(define-method remove_cookie
+ (of-object "EphyCookieManager")
+ (c-name "ephy_cookie_manager_remove_cookie")
+ (return-type "none")
+ (parameters
+ '("const-EphyCookie*" "cookie")
+ )
+)
+
+(define-method clear
+ (of-object "EphyCookieManager")
+ (c-name "ephy_cookie_manager_clear")
+ (return-type "none")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-dialog.h
+
+(define-function ephy_dialog_get_type
+ (c-name "ephy_dialog_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_dialog_new
+ (c-name "ephy_dialog_new")
+ (is-constructor-of "EphyDialog")
+ (return-type "EphyDialog*")
+)
+
+(define-function ephy_dialog_new_with_parent
+ (c-name "ephy_dialog_new_with_parent")
+ (is-constructor-of "EphyDialog")
+ (return-type "EphyDialog*")
+ (parameters
+ '("GtkWidget*" "parent_window")
+ )
+)
+
+(define-method construct
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_construct")
+ (return-type "none")
+ (parameters
+ '("const-EphyDialogProperty*" "properties")
+ '("const-char*" "file")
+ '("const-char*" "name")
+ '("const-char*" "domain")
+ )
+)
+
+(define-method add_enum
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_add_enum")
+ (return-type "none")
+ (parameters
+ '("const-char*" "id")
+ '("guint" "n_items")
+ '("const-char**" "items")
+ )
+)
+
+(define-method set_data_column
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_set_data_column")
+ (return-type "none")
+ (parameters
+ '("const-char*" "id")
+ '("int" "col")
+ )
+)
+
+(define-method set_size_group
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_set_size_group")
+ (return-type "none")
+ (parameters
+ '("const-char*" "first_id")
+ )
+ (varargs #t)
+)
+
+(define-method run
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_run")
+ (return-type "int")
+)
+
+(define-method show
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_show")
+ (return-type "none")
+)
+
+(define-method hide
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_hide")
+ (return-type "none")
+)
+
+(define-method set_parent
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_set_parent")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "parent")
+ )
+)
+
+(define-method get_parent
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_get_parent")
+ (return-type "GtkWidget*")
+)
+
+(define-method set_modal
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_set_modal")
+ (return-type "none")
+ (parameters
+ '("gboolean" "is_modal")
+ )
+)
+
+(define-method get_control
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_get_control")
+ (return-type "GtkWidget*")
+ (parameters
+ '("const-char*" "property_id")
+ )
+)
+
+(define-method get_controls
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_get_controls")
+ (return-type "none")
+ (parameters
+ '("const-char*" "first_property_id")
+ )
+ (varargs #t)
+)
+
+(define-method get_value
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_get_value")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "property_id")
+ '("GValue*" "value")
+ )
+)
+
+(define-method set_value
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_set_value")
+ (return-type "none")
+ (parameters
+ '("const-char*" "property_id")
+ '("const-GValue*" "value")
+ )
+)
+
+(define-method set_pref
+ (of-object "EphyDialog")
+ (c-name "ephy_dialog_set_pref")
+ (return-type "none")
+ (parameters
+ '("const-char*" "property_id")
+ '("const-char*" "pref")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-embed-event.h
+
+(define-function ephy_embed_event_get_type
+ (c-name "ephy_embed_event_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_event_context_get_type
+ (c-name "ephy_embed_event_context_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_event_type_get_type
+ (c-name "ephy_embed_event_type_get_type")
+ (return-type "GType")
+)
+
+(define-method get_context
+ (of-object "EphyEmbedEvent")
+ (c-name "ephy_embed_event_get_context")
+ (return-type "EphyEmbedEventContext")
+)
+
+(define-method get_button
+ (of-object "EphyEmbedEvent")
+ (c-name "ephy_embed_event_get_button")
+ (return-type "guint")
+)
+
+(define-method get_modifier
+ (of-object "EphyEmbedEvent")
+ (c-name "ephy_embed_event_get_modifier")
+ (return-type "guint")
+)
+
+(define-method get_coords
+ (of-object "EphyEmbedEvent")
+ (c-name "ephy_embed_event_get_coords")
+ (return-type "none")
+ (parameters
+ '("guint*" "x")
+ '("guint*" "y")
+ )
+)
+
+(define-method get_property
+ (of-object "EphyEmbedEvent")
+ (c-name "ephy_embed_event_get_property")
+ (return-type "none")
+ (parameters
+ '("const-char*" "name")
+ '("const-GValue**" "value")
+ )
+)
+
+(define-method has_property
+ (of-object "EphyEmbedEvent")
+ (c-name "ephy_embed_event_has_property")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method get_dom_event
+ (of-object "EphyEmbedEvent")
+ (c-name "ephy_embed_event_get_dom_event")
+ (return-type "gpointer")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-embed-factory.h
+
+(define-function ephy_embed_factory_new_object
+ (c-name "ephy_embed_factory_new_object")
+ (return-type "GObject*")
+ (parameters
+ '("GType" "type")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-embed.h
+
+(define-function ephy_embed_net_state_get_type
+ (c-name "ephy_embed_net_state_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_chrome_get_type
+ (c-name "ephy_embed_chrome_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_ppv_navigation_get_type
+ (c-name "ephy_embed_ppv_navigation_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_security_level_get_type
+ (c-name "ephy_embed_security_level_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_document_type_get_type
+ (c-name "ephy_embed_document_type_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_get_type
+ (c-name "ephy_embed_get_type")
+ (return-type "GType")
+)
+
+(define-method load_url
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_load_url")
+ (return-type "none")
+ (parameters
+ '("const-char*" "url")
+ )
+)
+
+(define-method stop_load
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_stop_load")
+ (return-type "none")
+)
+
+(define-method reload
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_reload")
+ (return-type "none")
+ (parameters
+ '("gboolean" "force")
+ )
+)
+
+(define-method get_title
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_get_title")
+ (return-type "char*")
+)
+
+(define-method get_location
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_get_location")
+ (return-type "char*")
+ (parameters
+ '("gboolean" "toplevel")
+ )
+)
+
+(define-method get_link_message
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_get_link_message")
+ (return-type "char*")
+)
+
+(define-method get_js_status
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_get_js_status")
+ (return-type "char*")
+)
+
+(define-method can_go_back
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_can_go_back")
+ (return-type "gboolean")
+)
+
+(define-method can_go_forward
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_can_go_forward")
+ (return-type "gboolean")
+)
+
+(define-method can_go_up
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_can_go_up")
+ (return-type "gboolean")
+)
+
+(define-method get_go_up_list
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_get_go_up_list")
+ (return-type "GSList*")
+)
+
+(define-method go_back
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_go_back")
+ (return-type "none")
+)
+
+(define-method go_forward
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_go_forward")
+ (return-type "none")
+)
+
+(define-method go_up
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_go_up")
+ (return-type "none")
+)
+
+(define-method shistory_n_items
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_shistory_n_items")
+ (return-type "int")
+)
+
+(define-method shistory_get_nth
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_shistory_get_nth")
+ (return-type "none")
+ (parameters
+ '("int" "nth")
+ '("gboolean" "is_relative")
+ '("char**" "url")
+ '("char**" "title")
+ )
+)
+
+(define-method shistory_get_pos
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_shistory_get_pos")
+ (return-type "int")
+)
+
+(define-method shistory_go_nth
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_shistory_go_nth")
+ (return-type "none")
+ (parameters
+ '("int" "nth")
+ )
+)
+
+(define-method get_security_level
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_get_security_level")
+ (return-type "none")
+ (parameters
+ '("EphyEmbedSecurityLevel*" "level")
+ '("char**" "description")
+ )
+)
+
+(define-method show_page_certificate
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_show_page_certificate")
+ (return-type "none")
+)
+
+(define-method set_zoom
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_set_zoom")
+ (return-type "none")
+ (parameters
+ '("float" "zoom")
+ )
+)
+
+(define-method get_zoom
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_get_zoom")
+ (return-type "float")
+)
+
+(define-method find_set_properties
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_find_set_properties")
+ (return-type "none")
+ (parameters
+ '("const-char*" "search_string")
+ '("gboolean" "case_sensitive")
+ '("gboolean" "wrap_around")
+ )
+)
+
+(define-method find_next
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_find_next")
+ (return-type "gboolean")
+ (parameters
+ '("gboolean" "backwards")
+ )
+)
+
+(define-method get_encoding
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_get_encoding")
+ (return-type "char*")
+)
+
+(define-method has_automatic_encoding
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_has_automatic_encoding")
+ (return-type "gboolean")
+)
+
+(define-method set_encoding
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_set_encoding")
+ (return-type "none")
+ (parameters
+ '("const-char*" "encoding")
+ )
+)
+
+(define-method print
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_print")
+ (return-type "none")
+)
+
+(define-method set_print_preview_mode
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_set_print_preview_mode")
+ (return-type "none")
+ (parameters
+ '("gboolean" "preview_mode")
+ )
+)
+
+(define-method print_preview_n_pages
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_print_preview_n_pages")
+ (return-type "int")
+)
+
+(define-method print_preview_navigate
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_print_preview_navigate")
+ (return-type "none")
+ (parameters
+ '("EphyEmbedPrintPreviewNavType" "type")
+ '("int" "page")
+ )
+)
+
+(define-method activate
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_activate")
+ (return-type "none")
+)
+
+(define-method has_modified_forms
+ (of-object "EphyEmbed")
+ (c-name "ephy_embed_has_modified_forms")
+ (return-type "gboolean")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-embed-persist.h
+
+(define-function ephy_embed_persist_flags_get_type
+ (c-name "ephy_embed_persist_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_persist_get_type
+ (c-name "ephy_embed_persist_get_type")
+ (return-type "GType")
+)
+
+(define-method save
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_save")
+ (return-type "gboolean")
+)
+
+(define-method cancel
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_cancel")
+ (return-type "none")
+)
+
+(define-method set_dest
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_set_dest")
+ (return-type "none")
+ (parameters
+ '("const-char*" "value")
+ )
+)
+
+(define-method set_embed
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_set_embed")
+ (return-type "none")
+ (parameters
+ '("EphyEmbed*" "value")
+ )
+)
+
+(define-method set_fc_title
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_set_fc_title")
+ (return-type "none")
+ (parameters
+ '("const-char*" "value")
+ )
+)
+
+(define-method set_fc_parent
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_set_fc_parent")
+ (return-type "none")
+ (parameters
+ '("GtkWindow*" "value")
+ )
+)
+
+(define-method set_flags
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_set_flags")
+ (return-type "none")
+ (parameters
+ '("EphyEmbedPersistFlags" "value")
+ )
+)
+
+(define-method set_max_size
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_set_max_size")
+ (return-type "none")
+ (parameters
+ '("gint64" "value")
+ )
+)
+
+(define-method set_persist_key
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_set_persist_key")
+ (return-type "none")
+ (parameters
+ '("const-char*" "value")
+ )
+)
+
+(define-method set_source
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_set_source")
+ (return-type "none")
+ (parameters
+ '("const-char*" "value")
+ )
+)
+
+(define-method set_user_time
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_set_user_time")
+ (return-type "none")
+ (parameters
+ '("guint32" "user_time")
+ )
+)
+
+(define-method get_dest
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_get_dest")
+ (return-type "const-char*")
+)
+
+(define-method get_embed
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_get_embed")
+ (return-type "EphyEmbed*")
+)
+
+(define-method get_fc_title
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_get_fc_title")
+ (return-type "const-char*")
+)
+
+(define-method get_fc_parent
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_get_fc_parent")
+ (return-type "GtkWindow*")
+)
+
+(define-method get_flags
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_get_flags")
+ (return-type "EphyEmbedPersistFlags")
+)
+
+(define-method get_max_size
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_get_max_size")
+ (return-type "gint64")
+)
+
+(define-method get_persist_key
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_get_persist_key")
+ (return-type "const-char*")
+)
+
+(define-method get_source
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_get_source")
+ (return-type "const-char*")
+)
+
+(define-method get_user_time
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_get_user_time")
+ (return-type "guint32")
+)
+
+(define-method to_string
+ (of-object "EphyEmbedPersist")
+ (c-name "ephy_embed_persist_to_string")
+ (return-type "char*")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-embed-prefs.h
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-embed-shell.h
+
+(define-function ephy_embed_shell_get_type
+ (c-name "ephy_embed_shell_get_type")
+ (return-type "GType")
+)
+
+(define-method get_favicon_cache
+ (of-object "EphyEmbedShell")
+ (c-name "ephy_embed_shell_get_favicon_cache")
+ (return-type "GObject*")
+)
+
+(define-method get_global_history
+ (of-object "EphyEmbedShell")
+ (c-name "ephy_embed_shell_get_global_history")
+ (return-type "GObject*")
+)
+
+(define-method get_downloader_view
+ (of-object "EphyEmbedShell")
+ (c-name "ephy_embed_shell_get_downloader_view")
+ (return-type "GObject*")
+)
+
+(define-method get_encodings
+ (of-object "EphyEmbedShell")
+ (c-name "ephy_embed_shell_get_encodings")
+ (return-type "GObject*")
+)
+
+(define-method get_embed_single
+ (of-object "EphyEmbedShell")
+ (c-name "ephy_embed_shell_get_embed_single")
+ (return-type "GObject*")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-embed-single.h
+
+(define-function ephy_embed_single_get_type
+ (c-name "ephy_embed_single_get_type")
+ (return-type "GType")
+)
+
+(define-method open_window
+ (of-object "EphyEmbedSingle")
+ (c-name "ephy_embed_single_open_window")
+ (return-type "GtkWidget*")
+ (parameters
+ '("EphyEmbed*" "parent")
+ '("const-char*" "address")
+ '("const-char*" "name")
+ '("const-char*" "features")
+ )
+)
+
+(define-method clear_cache
+ (of-object "EphyEmbedSingle")
+ (c-name "ephy_embed_single_clear_cache")
+ (return-type "none")
+)
+
+(define-method clear_auth_cache
+ (of-object "EphyEmbedSingle")
+ (c-name "ephy_embed_single_clear_auth_cache")
+ (return-type "none")
+)
+
+(define-method set_offline_mode
+ (of-object "EphyEmbedSingle")
+ (c-name "ephy_embed_single_set_offline_mode")
+ (return-type "none")
+ (parameters
+ '("gboolean" "offline")
+ )
+)
+
+(define-method get_offline_mode
+ (of-object "EphyEmbedSingle")
+ (c-name "ephy_embed_single_get_offline_mode")
+ (return-type "gboolean")
+)
+
+(define-method get_font_list
+ (of-object "EphyEmbedSingle")
+ (c-name "ephy_embed_single_get_font_list")
+ (return-type "GList*")
+ (parameters
+ '("const-char*" "lang_group")
+ )
+)
+
+(define-method get_printer_list
+ (of-object "EphyEmbedSingle")
+ (c-name "ephy_embed_single_get_printer_list")
+ (return-type "GList*")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-embed-type-builtins.h
+
+(define-function ephy_embed_net_state_get_type
+ (c-name "ephy_embed_net_state_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_chrome_get_type
+ (c-name "ephy_embed_chrome_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_print_preview_nav_type_get_type
+ (c-name "ephy_embed_print_preview_nav_type_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_security_level_get_type
+ (c-name "ephy_embed_security_level_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_document_type_get_type
+ (c-name "ephy_embed_document_type_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_event_context_get_type
+ (c-name "ephy_embed_event_context_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_embed_persist_flags_get_type
+ (c-name "ephy_embed_persist_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_content_check_type_get_type
+ (c-name "ephy_content_check_type_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_permission_get_type
+ (c-name "ephy_permission_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-extension.h
+
+(define-function ephy_extension_get_type
+ (c-name "ephy_extension_get_type")
+ (return-type "GType")
+)
+
+(define-method attach_window
+ (of-object "EphyExtension")
+ (c-name "ephy_extension_attach_window")
+ (return-type "none")
+ (parameters
+ '("EphyWindow*" "window")
+ )
+)
+
+(define-method detach_window
+ (of-object "EphyExtension")
+ (c-name "ephy_extension_detach_window")
+ (return-type "none")
+ (parameters
+ '("EphyWindow*" "window")
+ )
+)
+
+(define-method attach_tab
+ (of-object "EphyExtension")
+ (c-name "ephy_extension_attach_tab")
+ (return-type "none")
+ (parameters
+ '("EphyWindow*" "window")
+ '("EphyTab*" "tab")
+ )
+)
+
+(define-method detach_tab
+ (of-object "EphyExtension")
+ (c-name "ephy_extension_detach_tab")
+ (return-type "none")
+ (parameters
+ '("EphyWindow*" "window")
+ '("EphyTab*" "tab")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-extensions-manager.h
+
+(define-function ephy_extensions_manager_get_type
+ (c-name "ephy_extensions_manager_get_type")
+ (return-type "GType")
+)
+
+(define-method startup
+ (of-object "EphyExtensionsManager")
+ (c-name "ephy_extensions_manager_startup")
+ (return-type "none")
+)
+
+(define-method load
+ (of-object "EphyExtensionsManager")
+ (c-name "ephy_extensions_manager_load")
+ (return-type "none")
+ (parameters
+ '("const-char*" "identifier")
+ )
+)
+
+(define-method unload
+ (of-object "EphyExtensionsManager")
+ (c-name "ephy_extensions_manager_unload")
+ (return-type "none")
+ (parameters
+ '("const-char*" "identifier")
+ )
+)
+
+(define-method register
+ (of-object "EphyExtensionsManager")
+ (c-name "ephy_extensions_manager_register")
+ (return-type "none")
+ (parameters
+ '("GObject*" "object")
+ )
+)
+
+(define-method get_extensions
+ (of-object "EphyExtensionsManager")
+ (c-name "ephy_extensions_manager_get_extensions")
+ (return-type "GList*")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-history.h
+
+(define-function ephy_history_get_type
+ (c-name "ephy_history_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_history_new
+ (c-name "ephy_history_new")
+ (is-constructor-of "EphyHistory")
+ (return-type "EphyHistory*")
+)
+
+(define-method get_hosts
+ (of-object "EphyHistory")
+ (c-name "ephy_history_get_hosts")
+ (return-type "EphyNode*")
+)
+
+(define-method get_host
+ (of-object "EphyHistory")
+ (c-name "ephy_history_get_host")
+ (return-type "EphyNode*")
+ (parameters
+ '("const-char*" "url")
+ )
+)
+
+(define-method get_pages
+ (of-object "EphyHistory")
+ (c-name "ephy_history_get_pages")
+ (return-type "EphyNode*")
+)
+
+(define-method get_page
+ (of-object "EphyHistory")
+ (c-name "ephy_history_get_page")
+ (return-type "EphyNode*")
+ (parameters
+ '("const-char*" "url")
+ )
+)
+
+(define-method add_page
+ (of-object "EphyHistory")
+ (c-name "ephy_history_add_page")
+ (return-type "none")
+ (parameters
+ '("const-char*" "url")
+ )
+)
+
+(define-method is_page_visited
+ (of-object "EphyHistory")
+ (c-name "ephy_history_is_page_visited")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "url")
+ )
+)
+
+(define-method get_page_visits
+ (of-object "EphyHistory")
+ (c-name "ephy_history_get_page_visits")
+ (return-type "int")
+ (parameters
+ '("const-char*" "url")
+ )
+)
+
+(define-method set_page_title
+ (of-object "EphyHistory")
+ (c-name "ephy_history_set_page_title")
+ (return-type "none")
+ (parameters
+ '("const-char*" "url")
+ '("const-char*" "title")
+ )
+)
+
+(define-method get_last_page
+ (of-object "EphyHistory")
+ (c-name "ephy_history_get_last_page")
+ (return-type "const-char*")
+)
+
+(define-method set_icon
+ (of-object "EphyHistory")
+ (c-name "ephy_history_set_icon")
+ (return-type "none")
+ (parameters
+ '("const-char*" "url")
+ '("const-char*" "icon")
+ )
+)
+
+(define-method get_icon
+ (of-object "EphyHistory")
+ (c-name "ephy_history_get_icon")
+ (return-type "const-char*")
+ (parameters
+ '("const-char*" "url")
+ )
+)
+
+(define-method clear
+ (of-object "EphyHistory")
+ (c-name "ephy_history_clear")
+ (return-type "none")
+)
+
+(define-method is_enabled
+ (of-object "EphyHistory")
+ (c-name "ephy_history_is_enabled")
+ (return-type "gboolean")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-lib-type-builtins.h
+
+(define-function ephy_node_signal_type_get_type
+ (c-name "ephy_node_signal_type_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_state_window_flags_get_type
+ (c-name "ephy_state_window_flags_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-link.h
+
+(define-function ephy_link_flags_get_type
+ (c-name "ephy_link_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_link_get_type
+ (c-name "ephy_link_get_type")
+ (return-type "GType")
+)
+
+(define-method open
+ (of-object "EphyLink")
+ (c-name "ephy_link_open")
+ (return-type "EphyTab*")
+ (parameters
+ '("const-char*" "address")
+ '("EphyTab*" "tab")
+ '("EphyLinkFlags" "flags")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-loader.h
+
+(define-function ephy_loader_get_type
+ (c-name "ephy_loader_get_type")
+ (return-type "GType")
+)
+
+(define-method type
+ (of-object "EphyLoader")
+ (c-name "ephy_loader_type")
+ (return-type "const-char*")
+)
+
+(define-method get_object
+ (of-object "EphyLoader")
+ (c-name "ephy_loader_get_object")
+ (return-type "GObject*")
+ (parameters
+ '("GData**" "attributes")
+ )
+)
+
+(define-method release_object
+ (of-object "EphyLoader")
+ (c-name "ephy_loader_release_object")
+ (return-type "none")
+ (parameters
+ '("GObject*" "object")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-node-db.h
+
+(define-function ephy_node_db_get_type
+ (c-name "ephy_node_db_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_node_db_new
+ (c-name "ephy_node_db_new")
+ (is-constructor-of "EphyNodeDb")
+ (return-type "EphyNodeDb*")
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method load_from_file
+ (of-object "EphyNodeDb")
+ (c-name "ephy_node_db_load_from_file")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "xml_file")
+ '("const-xmlChar*" "xml_root")
+ '("const-xmlChar*" "xml_version")
+ )
+)
+
+(define-method write_to_xml_safe
+ (of-object "EphyNodeDb")
+ (c-name "ephy_node_db_write_to_xml_safe")
+ (return-type "int")
+ (parameters
+ '("const-xmlChar*" "filename")
+ '("const-xmlChar*" "root")
+ '("const-xmlChar*" "version")
+ '("const-xmlChar*" "comment")
+ '("EphyNode*" "node")
+ )
+ (varargs #t)
+)
+
+(define-method get_name
+ (of-object "EphyNodeDb")
+ (c-name "ephy_node_db_get_name")
+ (return-type "const-char*")
+)
+
+(define-method is_immutable
+ (of-object "EphyNodeDb")
+ (c-name "ephy_node_db_is_immutable")
+ (return-type "gboolean")
+)
+
+(define-method set_immutable
+ (of-object "EphyNodeDb")
+ (c-name "ephy_node_db_set_immutable")
+ (return-type "none")
+ (parameters
+ '("gboolean" "immutable")
+ )
+)
+
+(define-method get_node_from_id
+ (of-object "EphyNodeDb")
+ (c-name "ephy_node_db_get_node_from_id")
+ (return-type "EphyNode*")
+ (parameters
+ '("guint" "id")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-node.h
+
+(define-function ephy_node_get_type
+ (c-name "ephy_node_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_node_new
+ (c-name "ephy_node_new")
+ (is-constructor-of "EphyNode")
+ (return-type "EphyNode*")
+ (parameters
+ '("EphyNodeDb*" "db")
+ )
+)
+
+(define-function ephy_node_new_with_id
+ (c-name "ephy_node_new_with_id")
+ (return-type "EphyNode*")
+ (parameters
+ '("EphyNodeDb*" "db")
+ '("guint" "reserved_id")
+ )
+)
+
+(define-method get_db
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_db")
+ (return-type "EphyNodeDb*")
+)
+
+(define-method get_id
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_id")
+ (return-type "guint")
+)
+
+(define-method ref
+ (of-object "EphyNode")
+ (c-name "ephy_node_ref")
+ (return-type "none")
+)
+
+(define-method unref
+ (of-object "EphyNode")
+ (c-name "ephy_node_unref")
+ (return-type "none")
+)
+
+(define-method signal_connect_object
+ (of-object "EphyNode")
+ (c-name "ephy_node_signal_connect_object")
+ (return-type "int")
+ (parameters
+ '("EphyNodeSignalType" "type")
+ '("EphyNodeCallback" "callback")
+ '("GObject*" "object")
+ )
+)
+
+(define-method signal_disconnect_object
+ (of-object "EphyNode")
+ (c-name "ephy_node_signal_disconnect_object")
+ (return-type "guint")
+ (parameters
+ '("EphyNodeSignalType" "type")
+ '("EphyNodeCallback" "callback")
+ '("GObject*" "object")
+ )
+)
+
+(define-method signal_disconnect
+ (of-object "EphyNode")
+ (c-name "ephy_node_signal_disconnect")
+ (return-type "none")
+ (parameters
+ '("int" "signal_id")
+ )
+)
+
+(define-method set_property
+ (of-object "EphyNode")
+ (c-name "ephy_node_set_property")
+ (return-type "none")
+ (parameters
+ '("guint" "property_id")
+ '("const-GValue*" "value")
+ )
+)
+
+(define-method get_property
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_property")
+ (return-type "gboolean")
+ (parameters
+ '("guint" "property_id")
+ '("GValue*" "value")
+ )
+)
+
+(define-method get_property_string
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_property_string")
+ (return-type "const-char*")
+ (parameters
+ '("guint" "property_id")
+ )
+)
+
+(define-method get_property_boolean
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_property_boolean")
+ (return-type "gboolean")
+ (parameters
+ '("guint" "property_id")
+ )
+)
+
+(define-method get_property_long
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_property_long")
+ (return-type "long")
+ (parameters
+ '("guint" "property_id")
+ )
+)
+
+(define-method get_property_int
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_property_int")
+ (return-type "int")
+ (parameters
+ '("guint" "property_id")
+ )
+)
+
+(define-method get_property_double
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_property_double")
+ (return-type "double")
+ (parameters
+ '("guint" "property_id")
+ )
+)
+
+(define-method get_property_float
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_property_float")
+ (return-type "float")
+ (parameters
+ '("guint" "property_id")
+ )
+)
+
+(define-method get_property_node
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_property_node")
+ (return-type "EphyNode*")
+ (parameters
+ '("guint" "property_id")
+ )
+)
+
+(define-method write_to_xml
+ (of-object "EphyNode")
+ (c-name "ephy_node_write_to_xml")
+ (return-type "int")
+ (parameters
+ '("xmlTextWriterPtr" "writer")
+ )
+)
+
+(define-function ephy_node_new_from_xml
+ (c-name "ephy_node_new_from_xml")
+ (return-type "EphyNode*")
+ (parameters
+ '("EphyNodeDb*" "db")
+ '("xmlNodePtr" "xml_node")
+ )
+)
+
+(define-method add_child
+ (of-object "EphyNode")
+ (c-name "ephy_node_add_child")
+ (return-type "none")
+ (parameters
+ '("EphyNode*" "child")
+ )
+)
+
+(define-method remove_child
+ (of-object "EphyNode")
+ (c-name "ephy_node_remove_child")
+ (return-type "none")
+ (parameters
+ '("EphyNode*" "child")
+ )
+)
+
+(define-method sort_children
+ (of-object "EphyNode")
+ (c-name "ephy_node_sort_children")
+ (return-type "none")
+ (parameters
+ '("GCompareFunc" "compare_func")
+ )
+)
+
+(define-method has_child
+ (of-object "EphyNode")
+ (c-name "ephy_node_has_child")
+ (return-type "gboolean")
+ (parameters
+ '("EphyNode*" "child")
+ )
+)
+
+(define-method reorder_children
+ (of-object "EphyNode")
+ (c-name "ephy_node_reorder_children")
+ (return-type "none")
+ (parameters
+ '("int*" "new_order")
+ )
+)
+
+(define-method get_children
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_children")
+ (return-type "GPtrArray*")
+)
+
+(define-method get_n_children
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_n_children")
+ (return-type "int")
+)
+
+(define-method get_nth_child
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_nth_child")
+ (return-type "EphyNode*")
+ (parameters
+ '("guint" "n")
+ )
+)
+
+(define-method get_child_index
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_child_index")
+ (return-type "int")
+ (parameters
+ '("EphyNode*" "child")
+ )
+)
+
+(define-method get_next_child
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_next_child")
+ (return-type "EphyNode*")
+ (parameters
+ '("EphyNode*" "child")
+ )
+)
+
+(define-method get_previous_child
+ (of-object "EphyNode")
+ (c-name "ephy_node_get_previous_child")
+ (return-type "EphyNode*")
+ (parameters
+ '("EphyNode*" "child")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-notebook.h
+
+(define-function ephy_notebook_get_type
+ (c-name "ephy_notebook_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_notebook_new
+ (c-name "ephy_notebook_new")
+ (is-constructor-of "EphyNotebook")
+ (return-type "GtkWidget*")
+)
+
+(define-method add_tab
+ (of-object "EphyNotebook")
+ (c-name "ephy_notebook_add_tab")
+ (return-type "none")
+ (parameters
+ '("EphyTab*" "tab")
+ '("int" "position")
+ '("gboolean" "jump_to")
+ )
+)
+
+(define-method remove_tab
+ (of-object "EphyNotebook")
+ (c-name "ephy_notebook_remove_tab")
+ (return-type "none")
+ (parameters
+ '("EphyTab*" "tab")
+ )
+)
+
+(define-method move_tab
+ (of-object "EphyNotebook")
+ (c-name "ephy_notebook_move_tab")
+ (return-type "none")
+ (parameters
+ '("EphyNotebook*" "dest")
+ '("EphyTab*" "tab")
+ '("int" "dest_position")
+ )
+)
+
+(define-method set_show_tabs
+ (of-object "EphyNotebook")
+ (c-name "ephy_notebook_set_show_tabs")
+ (return-type "none")
+ (parameters
+ '("gboolean" "show_tabs")
+ )
+)
+
+(define-method set_dnd_enabled
+ (of-object "EphyNotebook")
+ (c-name "ephy_notebook_set_dnd_enabled")
+ (return-type "none")
+ (parameters
+ '("gboolean" "enabled")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-password-manager.h
+
+(define-function ephy_password_info_get_type
+ (c-name "ephy_password_info_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_password_info_new
+ (c-name "ephy_password_info_new")
+ (is-constructor-of "EphyPasswordInfo")
+ (return-type "EphyPasswordInfo*")
+ (parameters
+ '("const-char*" "host")
+ '("const-char*" "username")
+ '("const-char*" "password")
+ )
+)
+
+(define-method copy
+ (of-object "EphyPasswordInfo")
+ (c-name "ephy_password_info_copy")
+ (return-type "EphyPasswordInfo*")
+)
+
+(define-method free
+ (of-object "EphyPasswordInfo")
+ (c-name "ephy_password_info_free")
+ (return-type "none")
+)
+
+(define-function ephy_password_manager_get_type
+ (c-name "ephy_password_manager_get_type")
+ (return-type "GType")
+)
+
+(define-method add_password
+ (of-object "EphyPasswordManager")
+ (c-name "ephy_password_manager_add_password")
+ (return-type "none")
+ (parameters
+ '("EphyPasswordInfo*" "info")
+ )
+)
+
+(define-method remove_password
+ (of-object "EphyPasswordManager")
+ (c-name "ephy_password_manager_remove_password")
+ (return-type "none")
+ (parameters
+ '("EphyPasswordInfo*" "info")
+ )
+)
+
+(define-method list_passwords
+ (of-object "EphyPasswordManager")
+ (c-name "ephy_password_manager_list_passwords")
+ (return-type "GList*")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-permission-manager.h
+
+(define-function ephy_permission_get_type
+ (c-name "ephy_permission_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_permission_info_get_type
+ (c-name "ephy_permission_info_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_permission_info_new
+ (c-name "ephy_permission_info_new")
+ (is-constructor-of "EphyPermissionInfo")
+ (return-type "EphyPermissionInfo*")
+ (parameters
+ '("const-char*" "host")
+ '("const-char*" "type")
+ '("EphyPermission" "permission")
+ )
+)
+
+(define-method copy
+ (of-object "EphyPermissionInfo")
+ (c-name "ephy_permission_info_copy")
+ (return-type "EphyPermissionInfo*")
+)
+
+(define-method free
+ (of-object "EphyPermissionInfo")
+ (c-name "ephy_permission_info_free")
+ (return-type "none")
+)
+
+(define-function ephy_permission_manager_get_type
+ (c-name "ephy_permission_manager_get_type")
+ (return-type "GType")
+)
+
+(define-method add
+ (of-object "EphyPermissionManager")
+ (c-name "ephy_permission_manager_add")
+ (return-type "none")
+ (parameters
+ '("const-char*" "host")
+ '("const-char*" "type")
+ '("EphyPermission" "permission")
+ )
+)
+
+(define-method remove
+ (of-object "EphyPermissionManager")
+ (c-name "ephy_permission_manager_remove")
+ (return-type "none")
+ (parameters
+ '("const-char*" "host")
+ '("const-char*" "type")
+ )
+)
+
+(define-method clear
+ (of-object "EphyPermissionManager")
+ (c-name "ephy_permission_manager_clear")
+ (return-type "none")
+)
+
+(define-method test
+ (of-object "EphyPermissionManager")
+ (c-name "ephy_permission_manager_test")
+ (return-type "EphyPermission")
+ (parameters
+ '("const-char*" "host")
+ '("const-char*" "type")
+ )
+)
+
+(define-method list
+ (of-object "EphyPermissionManager")
+ (c-name "ephy_permission_manager_list")
+ (return-type "GList*")
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-session.h
+
+(define-function ephy_session_get_type
+ (c-name "ephy_session_get_type")
+ (return-type "GType")
+)
+
+(define-method get_active_window
+ (of-object "EphySession")
+ (c-name "ephy_session_get_active_window")
+ (return-type "EphyWindow*")
+)
+
+(define-method save
+ (of-object "EphySession")
+ (c-name "ephy_session_save")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "filename")
+ )
+)
+
+(define-method load
+ (of-object "EphySession")
+ (c-name "ephy_session_load")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "filename")
+ '("guint32" "user_time")
+ )
+)
+
+(define-method autoresume
+ (of-object "EphySession")
+ (c-name "ephy_session_autoresume")
+ (return-type "gboolean")
+ (parameters
+ '("guint32" "user_time")
+ )
+)
+
+(define-method close
+ (of-object "EphySession")
+ (c-name "ephy_session_close")
+ (return-type "none")
+)
+
+(define-method get_windows
+ (of-object "EphySession")
+ (c-name "ephy_session_get_windows")
+ (return-type "GList*")
+)
+
+(define-method add_window
+ (of-object "EphySession")
+ (c-name "ephy_session_add_window")
+ (return-type "none")
+ (parameters
+ '("GtkWindow*" "window")
+ )
+)
+
+(define-method remove_window
+ (of-object "EphySession")
+ (c-name "ephy_session_remove_window")
+ (return-type "none")
+ (parameters
+ '("GtkWindow*" "window")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-shell.h
+
+(define-function ephy_shell_error_get_type
+ (c-name "ephy_shell_error_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_shell_startup_flags_get_type
+ (c-name "ephy_shell_startup_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_new_tab_flags_get_type
+ (c-name "ephy_new_tab_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_shell_get_type
+ (c-name "ephy_shell_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_shell_error_quark
+ (c-name "ephy_shell_error_quark")
+ (return-type "GQuark")
+)
+
+(define-function ephy_shell_get_default
+ (c-name "ephy_shell_get_default")
+ (return-type "EphyShell*")
+)
+
+(define-function ephy_shell_new
+ (c-name "ephy_shell_new")
+ (is-constructor-of "EphyShell")
+ (return-type "EphyShell*")
+)
+
+(define-method startup
+ (of-object "EphyShell")
+ (c-name "ephy_shell_startup")
+ (return-type "gboolean")
+ (parameters
+ '("EphyShellStartupFlags" "flags")
+ '("guint32" "user_time")
+ '("const-char**" "args")
+ '("const-char*" "string_arg")
+ '("GError**" "error")
+ )
+)
+
+(define-method new_tab
+ (of-object "EphyShell")
+ (c-name "ephy_shell_new_tab")
+ (return-type "EphyTab*")
+ (parameters
+ '("EphyWindow*" "parent_window")
+ '("EphyTab*" "previous_tab")
+ '("const-char*" "url")
+ '("EphyNewTabFlags" "flags")
+ )
+)
+
+(define-method new_tab_full
+ (of-object "EphyShell")
+ (c-name "ephy_shell_new_tab_full")
+ (return-type "EphyTab*")
+ (parameters
+ '("EphyWindow*" "parent_window")
+ '("EphyTab*" "previous_tab")
+ '("const-char*" "url")
+ '("EphyNewTabFlags" "flags")
+ '("EphyEmbedChrome" "chrome")
+ '("gboolean" "is_popup")
+ '("guint32" "user_time")
+ )
+)
+
+(define-method get_session
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_session")
+ (return-type "GObject*")
+)
+
+(define-method get_bookmarks
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_bookmarks")
+ (return-type "EphyBookmarks*")
+)
+
+(define-method get_toolbars_model
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_toolbars_model")
+ (return-type "GObject*")
+ (parameters
+ '("gboolean" "fullscreen")
+ )
+)
+
+(define-method get_extensions_manager
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_extensions_manager")
+ (return-type "GObject*")
+)
+
+(define-method get_bookmarks_editor
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_bookmarks_editor")
+ (return-type "GtkWidget*")
+)
+
+(define-method get_history_window
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_history_window")
+ (return-type "GtkWidget*")
+)
+
+(define-method get_pdm_dialog
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_pdm_dialog")
+ (return-type "GObject*")
+)
+
+(define-method get_prefs_dialog
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_prefs_dialog")
+ (return-type "GObject*")
+)
+
+(define-method get_print_setup_dialog
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_print_setup_dialog")
+ (return-type "GObject*")
+)
+
+(define-method get_dbus_service
+ (of-object "EphyShell")
+ (c-name "ephy_shell_get_dbus_service")
+ (return-type "GObject*")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-state.h
+
+(define-function ephy_state_add_window
+ (c-name "ephy_state_add_window")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "window")
+ '("const-char*" "name")
+ '("int" "default_width")
+ '("int" "default_heigth")
+ '("gboolean" "maximize")
+ '("EphyStateWindowFlags" "flags")
+ )
+)
+
+(define-function ephy_state_add_paned
+ (c-name "ephy_state_add_paned")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "paned")
+ '("const-char*" "name")
+ '("int" "default_width")
+ )
+)
+
+(define-function ephy_state_add_expander
+ (c-name "ephy_state_add_expander")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "expander")
+ '("const-char*" "name")
+ '("gboolean" "default_state")
+ )
+)
+
+(define-function ephy_state_save
+ (c-name "ephy_state_save")
+ (return-type "none")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-statusbar.h
+
+(define-function ephy_statusbar_get_type
+ (c-name "ephy_statusbar_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_statusbar_new
+ (c-name "ephy_statusbar_new")
+ (is-constructor-of "EphyStatusbar")
+ (return-type "GtkWidget*")
+)
+
+(define-method set_security_state
+ (of-object "EphyStatusbar")
+ (c-name "ephy_statusbar_set_security_state")
+ (return-type "none")
+ (parameters
+ '("const-char*" "stock_id")
+ '("const-char*" "tooltip")
+ )
+)
+
+(define-method set_popups_state
+ (of-object "EphyStatusbar")
+ (c-name "ephy_statusbar_set_popups_state")
+ (return-type "none")
+ (parameters
+ '("gboolean" "hidden")
+ '("const-char*" "tooltip")
+ )
+)
+
+(define-method set_progress
+ (of-object "EphyStatusbar")
+ (c-name "ephy_statusbar_set_progress")
+ (return-type "none")
+ (parameters
+ '("int" "progress")
+ )
+)
+
+(define-method add_widget
+ (of-object "EphyStatusbar")
+ (c-name "ephy_statusbar_add_widget")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "widget")
+ )
+)
+
+(define-method remove_widget
+ (of-object "EphyStatusbar")
+ (c-name "ephy_statusbar_remove_widget")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "widget")
+ )
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-tab.h
+
+(define-function ephy_tab_get_type
+ (c-name "ephy_tab_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_tab_new
+ (c-name "ephy_tab_new")
+ (is-constructor-of "EphyTab")
+ (return-type "EphyTab*")
+)
+
+(define-method get_embed
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_embed")
+ (return-type "EphyEmbed*")
+)
+
+(define-function ephy_tab_for_embed
+ (c-name "ephy_tab_for_embed")
+ (return-type "EphyTab*")
+ (parameters
+ '("EphyEmbed*" "embed")
+ )
+)
+
+(define-method get_document_type
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_document_type")
+ (return-type "EphyEmbedDocumentType")
+)
+
+(define-method get_icon_address
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_icon_address")
+ (return-type "const-char*")
+)
+
+(define-method get_load_status
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_load_status")
+ (return-type "gboolean")
+)
+
+(define-method get_link_message
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_link_message")
+ (return-type "const-char*")
+)
+
+(define-method get_load_percent
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_load_percent")
+ (return-type "int")
+)
+
+(define-method set_location
+ (of-object "EphyTab")
+ (c-name "ephy_tab_set_location")
+ (return-type "none")
+ (parameters
+ '("const-char*" "location")
+ '("EphyTabAddressExpire" "expire")
+ )
+)
+
+(define-method get_location
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_location")
+ (return-type "const-char*")
+)
+
+(define-method get_navigation_flags
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_navigation_flags")
+ (return-type "EphyTabNavigationFlags")
+)
+
+(define-method get_security_level
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_security_level")
+ (return-type "EphyEmbedSecurityLevel")
+)
+
+(define-method get_size
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_size")
+ (return-type "none")
+ (parameters
+ '("int*" "width")
+ '("int*" "height")
+ )
+)
+
+(define-method set_size
+ (of-object "EphyTab")
+ (c-name "ephy_tab_set_size")
+ (return-type "none")
+ (parameters
+ '("int" "width")
+ '("int" "height")
+ )
+)
+(define-method get_status_message
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_status_message")
+ (return-type "const-char*")
+)
+
+(define-method get_title
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_title")
+ (return-type "const-char*")
+)
+
+(define-method get_visibility
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_visibility")
+ (return-type "gboolean")
+)
+
+(define-method get_zoom
+ (of-object "EphyTab")
+ (c-name "ephy_tab_get_zoom")
+ (return-type "float")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-type-builtins.h
+
+(define-function ephy_link_flags_get_type
+ (c-name "ephy_link_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_shell_error_get_type
+ (c-name "ephy_shell_error_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_shell_startup_flags_get_type
+ (c-name "ephy_shell_startup_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_new_tab_flags_get_type
+ (c-name "ephy_new_tab_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_tab_navigation_flags_get_type
+ (c-name "ephy_tab_navigation_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_tab_address_expire_get_type
+ (c-name "ephy_tab_address_expire_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_navigation_direction_get_type
+ (c-name "ephy_navigation_direction_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From /opt/gnome2/include/epiphany-1.5/epiphany/ephy-window.h
+
+(define-function ephy_window_get_type
+ (c-name "ephy_window_get_type")
+ (return-type "GType")
+)
+
+(define-function ephy_window_new
+ (c-name "ephy_window_new")
+ (is-constructor-of "EphyWindow")
+ (return-type "EphyWindow*")
+)
+
+(define-function ephy_window_new_with_chrome
+ (c-name "ephy_window_new_with_chrome")
+ (return-type "EphyWindow*")
+ (parameters
+ '("EphyEmbedChrome" "chrome")
+ '("gboolean" "is_popup")
+ )
+)
+
+(define-method set_print_preview
+ (of-object "EphyWindow")
+ (c-name "ephy_window_set_print_preview")
+ (return-type "none")
+ (parameters
+ '("gboolean" "enabled")
+ )
+)
+
+(define-method get_ui_manager
+ (of-object "EphyWindow")
+ (c-name "ephy_window_get_ui_manager")
+ (return-type "GObject*")
+)
+
+(define-method get_toolbar
+ (of-object "EphyWindow")
+ (c-name "ephy_window_get_toolbar")
+ (return-type "GtkWidget*")
+)
+
+(define-method get_bookmarksbar
+ (of-object "EphyWindow")
+ (c-name "ephy_window_get_bookmarksbar")
+ (return-type "GtkWidget*")
+)
+
+(define-method get_notebook
+ (of-object "EphyWindow")
+ (c-name "ephy_window_get_notebook")
+ (return-type "GtkWidget*")
+)
+
+(define-method get_statusbar
+ (of-object "EphyWindow")
+ (c-name "ephy_window_get_statusbar")
+ (return-type "GtkWidget*")
+)
+
+(define-method add_tab
+ (of-object "EphyWindow")
+ (c-name "ephy_window_add_tab")
+ (return-type "none")
+ (parameters
+ '("EphyTab*" "tab")
+ '("gint" "position")
+ '("gboolean" "jump_to")
+ )
+)
+
+(define-method remove_tab
+ (of-object "EphyWindow")
+ (c-name "ephy_window_remove_tab")
+ (return-type "none")
+ (parameters
+ '("EphyTab*" "tab")
+ )
+)
+
+(define-method jump_to_tab
+ (of-object "EphyWindow")
+ (c-name "ephy_window_jump_to_tab")
+ (return-type "none")
+ (parameters
+ '("EphyTab*" "tab")
+ )
+)
+
+(define-method load_url
+ (of-object "EphyWindow")
+ (c-name "ephy_window_load_url")
+ (return-type "none")
+ (parameters
+ '("const-char*" "url")
+ )
+)
+
+(define-method set_zoom
+ (of-object "EphyWindow")
+ (c-name "ephy_window_set_zoom")
+ (return-type "none")
+ (parameters
+ '("float" "zoom")
+ )
+)
+
+(define-method activate_location
+ (of-object "EphyWindow")
+ (c-name "ephy_window_activate_location")
+ (return-type "none")
+)
+
+(define-method get_active_tab
+ (of-object "EphyWindow")
+ (c-name "ephy_window_get_active_tab")
+ (return-type "EphyTab*")
+)
+
+(define-method get_active_embed
+ (of-object "EphyWindow")
+ (c-name "ephy_window_get_active_embed")
+ (return-type "EphyEmbed*")
+)
+
+(define-method get_tabs
+ (of-object "EphyWindow")
+ (c-name "ephy_window_get_tabs")
+ (return-type "GList*")
+)
+
+(define-method find
+ (of-object "EphyWindow")
+ (c-name "ephy_window_find")
+ (return-type "none")
+)
+
+(define-method get_is_popup
+ (of-object "EphyWindow")
+ (c-name "ephy_window_get_is_popup")
+ (return-type "gboolean")
+)
+
diff --git a/src/epiphany.override b/src/epiphany.override
new file mode 100644
index 000000000..7a0224d0e
--- /dev/null
+++ b/src/epiphany.override
@@ -0,0 +1,392 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * Copyright (C) 2005 Adam Hooper <adamh@cvs.gnome.org>
+ * Copyright (C) 2005 Christian Persch <chpe@cvs.gnome.org>
+ * Copyright (C) 2005 Crispin Flowerday <gnome@flowerday.cx>
+ *
+ * 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
+ */
+%%
+headers
+#include <Python.h>
+#include <pygobject.h>
+#include <pygtk/pygtk.h>
+#include "ephy-bookmarks.h"
+#include "ephy-bookmarks-type-builtins.h"
+#include "ephy-command-manager.h"
+#include "ephy-cookie-manager.h"
+#include "ephy-dialog.h"
+#include "ephy-embed-event.h"
+#include "ephy-embed-factory.h"
+#include "ephy-embed.h"
+#include "ephy-embed-persist.h"
+#include "ephy-embed-prefs.h"
+#include "ephy-embed-shell.h"
+#include "ephy-embed-single.h"
+#include "ephy-embed-type-builtins.h"
+#include "ephy-extension.h"
+#include "ephy-extensions-manager.h"
+#include "ephy-history.h"
+#include "ephy-lib-type-builtins.h"
+#include "ephy-loader.h"
+#include "ephy-node-db.h"
+#include "ephy-node.h"
+#include "ephy-notebook.h"
+#include "ephy-password-manager.h"
+#include "ephy-permission-manager.h"
+#include "ephy-session.h"
+#include "ephy-shell.h"
+#include "ephy-state.h"
+#include "ephy-statusbar.h"
+#include "ephy-tab.h"
+#include "ephy-type-builtins.h"
+#include "ephy-window.h"
+#include "ephy-link.h"
+
+void pyepiphany_register_classes (PyObject *d);
+void pyepiphany_add_constants (PyObject *module, const gchar *strip_prefix);
+
+static PyObject *
+_helper_wrap_string_glist (GList *list)
+{
+ GList *tmp;
+ PyObject *py_list;
+
+ if ((py_list = PyList_New(0)) == NULL) {
+ g_list_foreach(list, (GFunc)g_free, NULL);
+ g_list_free(list);
+ return NULL;
+ }
+ for (tmp = list; tmp != NULL; tmp = tmp->next) {
+ PyObject *str_obj = PyString_FromString ((char*)tmp->data);
+
+ if (str_obj == NULL) {
+ g_list_foreach(list, (GFunc)g_free, NULL);
+ g_list_free(list);
+ Py_DECREF(py_list);
+ return NULL;
+ }
+ PyList_Append(py_list, str_obj);
+ Py_DECREF(str_obj);
+ }
+ g_list_foreach(list, (GFunc)g_free, NULL);
+ g_list_free(list);
+ return py_list;
+}
+
+static PyObject *
+_helper_wrap_gobject_glist (GList *list)
+{
+ PyObject *py_list;
+ GList *tmp;
+
+ if ((py_list = PyList_New(0)) == NULL) {
+ return NULL;
+ }
+ for (tmp = list; tmp != NULL; tmp = tmp->next) {
+ PyObject *py_obj = pygobject_new(G_OBJECT(tmp->data));
+
+ if (py_obj == NULL) {
+ Py_DECREF(py_list);
+ return NULL;
+ }
+ PyList_Append(py_list, py_obj);
+ Py_DECREF(py_obj);
+ }
+ return py_list;
+}
+
+static void
+free_boxed_type (gpointer data, gpointer type)
+{
+ g_boxed_free (GPOINTER_TO_INT(type), data);
+}
+
+
+static PyObject *
+_helper_wrap_boxed_glist (GType type, GList *list)
+{
+ GList *tmp;
+ PyObject *py_list;
+
+ if ((py_list = PyList_New(0)) == NULL) {
+ g_list_foreach(list, free_boxed_type, GINT_TO_POINTER(type));
+ g_list_free(list);
+ return NULL;
+ }
+ for (tmp = list; tmp != NULL; tmp = tmp->next) {
+ PyObject *obj = pyg_boxed_new (type, tmp->data, FALSE, TRUE);
+ PyList_Append(py_list, obj);
+ Py_DECREF(obj);
+ }
+ g_list_free(list);
+ return py_list;
+}
+
+static PyObject *
+_helper_wrap_boxed_gptrarray (GType type, GPtrArray *list, gboolean own_ref, gboolean dealloc)
+{
+ PyObject *py_list;
+ int i;
+
+ if ((py_list = PyList_New(0)) == NULL) {
+ return NULL;
+ }
+ for( i = 0; i < list->len; i++ ) {
+ PyObject *obj = pyg_boxed_new (type, g_ptr_array_index(list,i), FALSE, own_ref);
+ PyList_Append(py_list, obj);
+ Py_DECREF(obj);
+ }
+ if (dealloc) g_ptr_array_free (list, TRUE);
+ return py_list;
+}
+
+%%
+modulename epiphany
+%%
+import gtk.Bin as PyGtkBin_Type
+import gtk.Window as PyGtkWindow_Type
+import gtk.UIManager as PyGtkUIManager_Type
+import gtk.Widget as PyGtkWidget_Type
+import gtk.Statusbar as PyGtkStatusbar_Type
+import gtk.Notebook as PyGtkNotebook_Type
+import gobject.GObject as PyGObject_Type
+%%
+ignore-glob
+ *_get_type
+%%
+ignore
+ ephy_embed_event_get_dom_event
+ ephy_tab_for_embed
+ ephy_shell_error_quark
+ ephy_shell_startup
+ ephy_shell_get_dbus_service
+%%
+override ephy_tab_get_size noargs
+static PyObject *
+_wrap_ephy_tab_get_size(PyGObject *self)
+{
+ gint width;
+ gint height;
+
+ ephy_tab_get_size(EPHY_TAB(self->obj), &width, &height);
+ return Py_BuildValue("(ii)", width, height);
+}
+%%
+override ephy_embed_event_get_coords noargs
+static PyObject *
+_wrap_ephy_embed_event_get_coords(PyGObject *self)
+{
+ gint x, y;
+
+ ephy_embed_event_get_coords (EPHY_EMBED_EVENT(self->obj), &x, &y);
+ return Py_BuildValue("(ii)", x, y);
+}
+%%
+override ephy_window_get_tabs noargs
+static PyObject *
+_wrap_ephy_window_get_tabs(PyGObject *self)
+{
+ GList *list;
+ PyObject *py_list;
+
+ list = ephy_window_get_tabs(EPHY_WINDOW (self->obj));
+
+ py_list = _helper_wrap_gobject_glist (list);
+
+ g_list_free(list);
+
+ return py_list;
+}
+%%
+override ephy_embed_shistory_get_nth kwargs
+static PyObject*
+_wrap_ephy_embed_shistory_get_nth (PyGObject *self,
+ PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = {"nth", "is_relative", NULL};
+ int nth, is_relative;
+ char *url, *title;
+ PyObject *py_url, *py_title;
+ PyObject *py_list;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "ii:EphyEmbed.shistory_get_nth", kwlist,
+ &nth, &is_relative)) {
+ return NULL;
+ }
+
+ ephy_embed_shistory_get_nth (EPHY_EMBED (self->obj), nth, is_relative,
+ &url, &title);
+
+ if (!url || !title) {
+ return Py_None;
+ }
+
+ if ((py_list = PyList_New(0)) == NULL) {
+ g_free (url);
+ g_free (title);
+ return NULL;
+ }
+
+ py_url = PyString_FromString (url);
+ g_free (url);
+ if (!py_url) {
+ g_free (title);
+ Py_DECREF(py_list);
+ return NULL;
+ }
+
+ PyList_Append(py_list, py_url);
+ Py_DECREF(py_url);
+
+ py_title = PyString_FromString (title);
+ g_free (title);
+
+ if (!py_title) {
+ Py_DECREF(py_list);
+ return NULL;
+ }
+
+ PyList_Append(py_list, py_title);
+ Py_DECREF(py_title);
+ return py_list;
+}
+%%
+override ephy_embed_get_go_up_list noargs
+static PyObject*
+_wrap_ephy_embed_get_go_up_list (PyGObject *self)
+{
+ GSList *list, *tmp;
+ PyObject *py_list;
+
+ list = ephy_embed_get_go_up_list (EPHY_EMBED (self->obj));
+
+ if ((py_list = PyList_New(0)) == NULL) {
+ g_slist_foreach(list, (GFunc)g_free, NULL);
+ g_slist_free(list);
+ return NULL;
+ }
+ for (tmp = list; tmp != NULL; tmp = tmp->next) {
+ PyObject *str_obj = PyString_FromString ((char*)tmp->data);
+
+ if (str_obj == NULL) {
+ g_slist_foreach(list, (GFunc)g_free, NULL);
+ g_slist_free(list);
+ Py_DECREF(py_list);
+ return NULL;
+ }
+ PyList_Append(py_list, str_obj);
+ Py_DECREF(str_obj);
+ }
+ g_slist_foreach(list, (GFunc)g_free, NULL);
+ g_slist_free(list);
+ return py_list;
+}
+%%
+override ephy_embed_single_get_printer_list noargs
+static PyObject*
+_wrap_ephy_embed_single_get_printer_list (PyGObject *self)
+{
+ GList *list;
+
+ list = ephy_embed_single_get_printer_list (EPHY_EMBED_SINGLE (self->obj));
+
+ return _helper_wrap_string_glist (list);
+}
+%%
+override ephy_embed_single_get_font_list kwargs
+static PyObject*
+_wrap_ephy_embed_single_get_font_list (PyGObject *self,
+ PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = {"font_group", NULL};
+ char *font_group;
+ GList *list;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s:EphyEmbedSingle.get_font_list", kwlist, &font_group))
+ return NULL;
+
+
+ list = ephy_embed_single_get_font_list (EPHY_EMBED_SINGLE (self->obj), font_group);
+
+ return _helper_wrap_string_glist (list);
+}
+%%
+override ephy_embed_event_get_property kwargs
+static PyObject*
+_wrap_ephy_embed_event_get_property (PyGObject *self,
+ PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = {"property", NULL};
+ char *prop;
+ const GValue *value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s:EphyEmbedEvent.get_property", kwlist, &prop))
+ return NULL;
+
+ ephy_embed_event_get_property (EPHY_EMBED_EVENT (self->obj), prop, &value);
+
+ return pyg_value_as_pyobject(value, TRUE);
+}
+%%
+override ephy_password_manager_list_passwords noargs
+static PyObject*
+_wrap_ephy_password_manager_list_passwords (PyGObject *self)
+{
+ GList *list;
+
+ list = ephy_password_manager_list_passwords (EPHY_PASSWORD_MANAGER (self->obj));
+
+ return _helper_wrap_boxed_glist (EPHY_TYPE_PASSWORD_INFO, list);
+}
+%%
+override ephy_cookie_manager_list_cookies noargs
+static PyObject *
+_wrap_ephy_cookie_manager_list_cookies(PyGObject *self)
+{
+ GList *list;
+
+ list = ephy_cookie_manager_list_cookies(EPHY_COOKIE_MANAGER (self->obj));
+
+ return _helper_wrap_boxed_glist (EPHY_TYPE_COOKIE, list);
+}
+%%
+override ephy_node_get_children noargs
+static PyObject *
+_wrap_ephy_node_get_children (PyGObject *self)
+{
+ GPtrArray *list = ephy_node_get_children ((EphyNode *) (self->obj));
+
+ return _helper_wrap_boxed_gptrarray (EPHY_TYPE_NODE, list, FALSE, FALSE);
+}
+%%
+override ephy_session_get_windows noargs
+static PyObject *
+_wrap_ephy_session_get_windows (PyGObject *self)
+{
+ GList *list;
+ PyObject *py_list;
+
+ list = ephy_session_get_windows (EPHY_SESSION (self->obj));
+
+ py_list = _helper_wrap_gobject_glist (list);
+
+ g_list_free(list);
+
+ return py_list;
+}