[kazehakase-svn] [3375] * configure.ac, module/embed/webkit-gtk/*: Added WebKitGtk support.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Thu Feb 21 13:21:43 JST 2008


Revision: 3375
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3375
Author:   ikezoe
Date:     2008-02-21 13:21:42 +0900 (Thu, 21 Feb 2008)

Log Message:
-----------
	* configure.ac, module/embed/webkit-gtk/*: Added WebKitGtk support.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/module/embed/Makefile.am

Added Paths:
-----------
    kazehakase/trunk/module/embed/webkit-gtk/
    kazehakase/trunk/module/embed/webkit-gtk/Makefile.am
    kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk-module.c
    kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c
    kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.h

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2008-02-21 01:27:19 UTC (rev 3374)
+++ kazehakase/trunk/ChangeLog	2008-02-21 04:21:42 UTC (rev 3375)
@@ -9,6 +9,7 @@
 	* module/embed/gecko/mozilla.cpp: Invoke GTKEmbedGlueStartupInternal().
 	* module/embed/gecko/kz-gecko-embed-module.cpp: Do not invoke
 	gtk_moz_embed_set_comp_path() if XPCOM_GLUE is defined.
+	* configure.ac, module/embed/webkit-gtk/*: Added WebKitGtk support.
 
 2008-02-20  Hiroyuki Ikezoe  <poinc****@ikezo*****>
 

Modified: kazehakase/trunk/module/embed/Makefile.am
===================================================================
--- kazehakase/trunk/module/embed/Makefile.am	2008-02-21 01:27:19 UTC (rev 3374)
+++ kazehakase/trunk/module/embed/Makefile.am	2008-02-21 04:21:42 UTC (rev 3375)
@@ -11,3 +11,7 @@
 if WITH_GTK_IE_EMBED
 SUBDIRS += ie
 endif
+
+if WITH_WEBKIT_GTK
+SUBDIRS += webkit-gtk
+endif


Property changes on: kazehakase/trunk/module/embed/webkit-gtk
___________________________________________________________________
Name: svn:ignore
   + Makefile
Makefile.in
.deps
.libs


Added: kazehakase/trunk/module/embed/webkit-gtk/Makefile.am
===================================================================
--- kazehakase/trunk/module/embed/webkit-gtk/Makefile.am	2008-02-21 01:27:19 UTC (rev 3374)
+++ kazehakase/trunk/module/embed/webkit-gtk/Makefile.am	2008-02-21 04:21:42 UTC (rev 3375)
@@ -0,0 +1,34 @@
+# -*- Mode: Makefile; tab-width: 8; indent-tabs-mode: t; -*-
+CLEANFILES = *~ *.bak
+
+ENGINE_ID_FOR_GETTEXT = N_("WebKitGtk")
+embed_LTLIBRARIES = webkit_gtk.la
+
+INCLUDES =						\
+	$(WEBKITGTK_CFLAGS)				\
+	-I$(top_srcdir)/src				\
+	-I$(top_srcdir)/src/bookmarks			\
+	-I$(top_srcdir)/src/dialogs 			\
+	-I$(top_srcdir)/src/net 			\
+	-I$(top_srcdir)/src/libegg/pixbufthumbnail	\
+	-I$(top_srcdir)/src/utils
+
+webkit_gtk_la_CPPFLAGS=				\
+	-DGTK_DISABLE_DEPRECATED=1		\
+	-DGDK_DISABLE_DEPRECATED=1		\
+	-DG_DISABLE_DEPRECATED=1		\
+	-DG_LOG_DOMAIN=\"Kazehakase-WebKitGtk\"
+
+webkit_gtk_la_LDFLAGS =			\
+	-avoid-version			\
+	-module				\
+	-export-dynamic $(no_undefined)	\
+	 $(LIBTOOL_EXPORT_OPTIONS)
+
+webkit_gtk_la_SOURCES =			\
+	kz-webkit-gtk-module.c		\
+	kz-webkit-gtk.c
+
+webkit_gtk_la_LIBADD = 			\
+	$(GTK_LIBS) 			\
+	$(WEBKITGTK_LIBS)

Added: kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk-module.c
===================================================================
--- kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk-module.c	2008-02-21 01:27:19 UTC (rev 3374)
+++ kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk-module.c	2008-02-21 04:21:42 UTC (rev 3375)
@@ -0,0 +1,49 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  Copyright (C) 2008  g新部 Hiroyuki Ikezoe
+ *
+ *  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.
+ *
+ */
+
+#include <glib/gi18n.h>
+
+#include "kz-module-impl.h"
+#include "kz-webkit-gtk.h"
+
+G_MODULE_EXPORT void
+KZ_MODULE_IMPL_INIT (GTypeModule *module)
+{
+	kz_webkit_gtk_register_type(module);
+}
+
+G_MODULE_EXPORT void
+KZ_MODULE_IMPL_EXIT (void)
+{
+}
+
+G_MODULE_EXPORT GObject *
+KZ_MODULE_IMPL_INSTANTIATE (const gchar *first_property,
+			    va_list      var_args)
+{
+	return g_object_new_valist(KZ_TYPE_WEBKIT_GTK, first_property, var_args);
+}
+
+G_MODULE_EXPORT const gchar *
+KZ_MODULE_IMPL_GET_NAME (void)
+{
+	return "WebKitGtk"; 
+}

Added: kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c
===================================================================
--- kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c	2008-02-21 01:27:19 UTC (rev 3374)
+++ kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c	2008-02-21 04:21:42 UTC (rev 3375)
@@ -0,0 +1,222 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  Copyright (C) 2008  g新部 Hiroyuki Ikezoe
+ *
+ *  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 implwebkit_gtkd 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.
+ *
+ */
+
+#include <glib/gi18n.h>
+
+#include "kz-webkit-gtk.h"
+
+#include "kz-embed.h"
+
+static GType           kz_type_webkit_gtk = 0;
+static WebKitWebViewClass *kz_webkit_gtk_parent_class;
+
+GtkWidget  *kz_webkit_gtk_new          (void);
+static void kz_webkit_gtk_class_init   (KzWebKitGtkClass *klass);
+static void kz_webkit_gtk_iface_init   (KzEmbedIFace     *iface);
+static void kz_webkit_gtk_init         (KzWebKitGtk      *webkit_gtk);
+static void kz_webkit_gtk_dispose      (GObject          *object);
+
+static void load_url         (KzEmbed      *kzembed,
+			      const gchar  *url);
+void
+kz_webkit_gtk_register_type (GTypeModule *module)
+{
+	static const GTypeInfo kz_webkit_gtk_info =
+	{
+		sizeof (KzWebKitGtkClass),
+		NULL,		/* base_init */
+		NULL,		/* base_finalize */
+		(GClassInitFunc) kz_webkit_gtk_class_init,
+		NULL,		/* class_finalize */
+		NULL,		/* class_data */
+		sizeof (KzWebKitGtk),
+		0,		/* n_preallocs */
+		(GInstanceInitFunc) kz_webkit_gtk_init,
+	};
+
+	const GInterfaceInfo kz_embed_info =
+	{
+		(GInterfaceInitFunc) kz_webkit_gtk_iface_init,
+		NULL,
+		NULL
+	};
+
+	kz_type_webkit_gtk = g_type_module_register_type(module,
+						 WEBKIT_TYPE_WEB_VIEW,
+						 "KzWebKitGtk",
+						 &kz_webkit_gtk_info,
+						 (GTypeFlags)0);
+
+	g_type_module_add_interface(module,
+				    KZ_TYPE_WEBKIT_GTK,
+				    KZ_TYPE_EMBED,
+				    &kz_embed_info);
+}
+
+GType
+kz_webkit_gtk_get_type (void)
+{
+       return kz_type_webkit_gtk;
+}
+
+static void
+kz_webkit_gtk_class_init (KzWebKitGtkClass *klass)
+{
+	GObjectClass *object_class;
+	GtkWidgetClass *widget_class;
+
+	kz_webkit_gtk_parent_class = WEBKIT_WEB_VIEW_CLASS(g_type_class_peek_parent(klass));
+	object_class = G_OBJECT_CLASS(klass);
+	widget_class = GTK_WIDGET_CLASS(klass);
+
+	object_class->dispose = kz_webkit_gtk_dispose;
+}
+
+
+static void
+kz_webkit_gtk_iface_init (KzEmbedIFace *iface)
+{
+	iface->load_url               = load_url;
+	iface->view_source            = NULL;
+	iface->is_loading             = NULL;
+	iface->get_title              = NULL;
+	iface->get_location           = NULL;
+	iface->ensure_title           = NULL;
+	iface->get_link_message       = NULL;
+	iface->get_progress           = NULL;
+	iface->can_cut_selection      = NULL;
+	iface->can_copy_selection     = NULL;
+	iface->can_paste              = NULL;
+	iface->cut_selection          = NULL;
+	iface->copy_selection         = NULL;
+	iface->paste                  = NULL;
+	iface->select_all             = NULL;
+	iface->get_selection_string   = NULL;
+	iface->find                   = NULL;
+	iface->incremental_search     = NULL;
+	iface->selection_is_collapsed = NULL;
+	iface->get_links              = NULL;
+	iface->copy_page              = NULL;
+	iface->shistory_copy          = NULL;
+	iface->shistory_get_pos       = NULL;
+	iface->shistory_get_nth       = NULL;
+	iface->reload                 = NULL;
+	iface->stop_load              = NULL;
+	iface->go_back                = NULL;
+	iface->go_forward             = NULL;
+	iface->can_go_back            = NULL;
+	iface->can_go_forward         = NULL;
+	iface->can_go_nav_link        = NULL;
+	iface->go_nav_link            = NULL;
+	iface->append_nav_link        = NULL;
+	iface->set_nav_link           = NULL;
+	iface->set_nth_nav_link       = NULL;
+	iface->get_nav_link           = NULL;
+	iface->get_nth_nav_link       = NULL;
+	iface->get_nav_links          = NULL;
+	iface->go_history_index       = NULL;
+	iface->do_command             = NULL;
+	iface->can_do_command         = NULL;
+	iface->get_lock               = NULL;
+	iface->set_lock               = NULL;
+	iface->get_body_text          = NULL;
+#if 0
+	iface->get_selection_source   = NULL;
+#endif
+	iface->set_encoding           = NULL;
+	iface->get_encoding           = NULL;
+	iface->print                  = NULL;
+	iface->print_preview          = NULL;
+	iface->get_printer_list       = NULL;
+	iface->create_thumbnail       = NULL;
+	iface->save_with_content      = NULL;
+	iface->set_text_into_textarea = NULL;
+	iface->get_text_from_textarea = NULL;
+	iface->zoom_set               = NULL;
+	iface->zoom_get               = NULL;
+	iface->set_text_size          = NULL;
+	iface->get_text_size          = NULL;
+	iface->get_html_with_contents = NULL;
+	iface->set_history            = NULL;
+	iface->get_history            = NULL;
+	iface->get_last_modified      = NULL;
+	iface->fine_scroll            = NULL;
+	iface->page_up                = NULL;
+	iface->page_down              = NULL; 
+	iface->get_allow_javascript   = NULL;
+	iface->set_allow_javascript   = NULL; 
+	iface->get_allow_images       = NULL;
+	iface->set_allow_images       = NULL;
+#if 0
+	iface->set_edit_mode          = NULL;
+	iface->set_vwebkit_gtkw_mode          = NULL;
+#endif
+
+	iface->link_message           = NULL;
+	iface->js_status              = NULL;
+	iface->location               = NULL;
+	iface->title                  = NULL;
+	iface->progress               = NULL;
+	iface->net_start              = NULL;
+	iface->net_stop               = NULL;
+	iface->new_window             = NULL;
+	iface->open_uri               = NULL;
+	iface->size_to                = NULL;
+	iface->dom_key_down           = NULL;
+	iface->dom_key_press          = NULL;
+	iface->dom_key_up             = NULL;
+	iface->dom_mouse_down         = NULL;
+	iface->dom_mouse_up           = NULL;
+	iface->dom_mouse_click        = NULL;
+	iface->dom_mouse_dbl_click    = NULL;
+	iface->dom_mouse_over         = NULL;
+	iface->dom_mouse_out          = NULL;
+	iface->security_change        = NULL;
+	iface->status_change          = NULL;
+}
+
+static void
+kz_webkit_gtk_init (KzWebKitGtk *webkit)
+{
+}
+
+static void
+kz_webkit_gtk_dispose (GObject *object)
+{
+	if (G_OBJECT_CLASS(kz_webkit_gtk_parent_class)->dispose)
+		G_OBJECT_CLASS(kz_webkit_gtk_parent_class)->dispose(object);
+}
+
+GtkWidget *
+kz_webkit_gtk_new (void)
+{
+	return GTK_WIDGET(g_object_new(KZ_TYPE_WEBKIT_GTK,
+				       NULL));
+}
+
+static void
+load_url (KzEmbed *kzembed, const gchar  *url)
+{
+	g_return_if_fail(KZ_IS_WEBKIT_GTK(kzembed));
+
+	webkit_web_view_open(WEBKIT_WEB_VIEW(kzembed), url);
+}
+

Added: kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.h
===================================================================
--- kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.h	2008-02-21 01:27:19 UTC (rev 3374)
+++ kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.h	2008-02-21 04:21:42 UTC (rev 3375)
@@ -0,0 +1,55 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  Copyright (C) 2008  g新部 Hiroyuki Ikezoe
+ *
+ *  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.
+ *
+ */
+
+#ifndef __KZ_WEBKIT_GTK_H__
+#define __KZ_WEBKIT_GTK_H__
+
+#include <webkit/webkit.h>
+
+G_BEGIN_DECLS
+
+#define KZ_TYPE_WEBKIT_GTK		(kz_webkit_gtk_get_type ())
+#define KZ_WEBKIT_GTK(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), KZ_TYPE_WEBKIT_GTK, KzGtkWebcore))
+#define KZ_WEBKIT_GTK_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), KZ_TYPE_WEBKIT_GTK, KzWebKitGtkClass))
+#define KZ_IS_WEBKIT_GTK(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), KZ_TYPE_WEBKIT_GTK))
+#define KZ_IS_WEBKIT_GTK_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), KZ_TYPE_WEBKIT_GTK))
+#define KZ_WEBKIT_GTK_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), KZ_TYPE_WEBKIT_GTK, KzWebKitGtkClass))
+
+typedef struct _KzWebKitGtk		KzWebKitGtk;
+typedef struct _KzWebKitGtkClass	KzWebKitGtkClass;
+
+struct _KzWebKitGtk
+{
+	WebKitWebView parent;
+};
+
+struct _KzWebKitGtkClass
+{
+	WebKitWebViewClass parent_class;
+};
+
+
+GType        kz_webkit_gtk_get_type              (void) G_GNUC_CONST;
+void         kz_webkit_gtk_register_type         (GTypeModule *module);
+
+G_END_DECLS
+
+#endif /* __KZ_WEBKIT_GTK_H__ */




More information about the Kazehakase-cvs mailing list
Back to archive index