[kazehakase-svn] [3213] * module/embed/gtk-webcore/kz-gtk-webcore.cpp: Remove the code related

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
Thu Apr 26 12:17:31 JST 2007


Revision: 3213
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3213
Author:   ikezoe
Date:     2007-04-26 12:17:30 +0900 (Thu, 26 Apr 2007)

Log Message:
-----------
* module/embed/gtk-webcore/kz-gtk-webcore.cpp: Remove the code related
to WebiMouseDelegate.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2007-04-26 03:14:28 UTC (rev 3212)
+++ kazehakase/trunk/ChangeLog	2007-04-26 03:17:30 UTC (rev 3213)
@@ -3,6 +3,8 @@
 	* configure.ac: Check GTK+ WebCore has webkit.h.
 	* module/embed/gtk-webcore/Makefile.am: Use HAVE_WEBKIT_GTK_WEBKIT.H
 	flag.
+	* module/embed/gtk-webcore/kz-gtk-webcore.cpp: Remove the code related
+	to WebiMouseDelegate.
 
 2007-04-25  Hiroyuki Ikezoe  <poinc****@ikezo*****>
 

Modified: kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp
===================================================================
--- kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp	2007-04-26 03:14:28 UTC (rev 3212)
+++ kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp	2007-04-26 03:17:30 UTC (rev 3213)
@@ -26,7 +26,6 @@
 
 #include <glib/gi18n.h>
 #include <math.h>
-#include <webi-mouse-delegate.h>
 
 #include "kazehakase.h"
 #include "kz-gtk-webcore.h"
@@ -145,15 +144,6 @@
 static gboolean	    kz_gtk_webcore_get_allow_images      (KzEmbed      *kzembed);
 static void	    kz_gtk_webcore_set_allow_images      (KzEmbed      *kzembed,
 							  gboolean      allow);
-/* WebiMouseDelegate interfaces */
-static void          kz_gtk_webcore_mouse_iface_init      (WebiMouseDelegateInterface *iface);
-static void	     kz_gtk_webcore_mouse_over		  (WebiMouseDelegate *webi,
-							   WebiEventInfo     *event_info);
-static gboolean	     kz_gtk_webcore_mouse_down		  (WebiMouseDelegate *webi,
-							   WebiEventInfo     *event_info);
-static gboolean	     kz_gtk_webcore_mouse_up		  (WebiMouseDelegate *webi,
-							   WebiEventInfo     *event_info);
-
 /* KzEmbedPrefs interfaces */
 static void          kz_gtk_webcore_prefs_iface_init      (KzEmbedPrefsIFace *iface);
 #if 0
@@ -199,13 +189,6 @@
 		NULL
 	};
 
-	const GInterfaceInfo webi_mouse_delegate_info =
-	{
-		(GInterfaceInitFunc) kz_gtk_webcore_mouse_iface_init,
-		NULL,
-		NULL
-	};
-
 	kz_type_gtk_webcore = g_type_module_register_type(module,
 						    WEBI_TYPE_WEBI,
 						    "KzGtkWebcore",
@@ -221,11 +204,6 @@
 				    KZ_TYPE_GTK_WEBCORE,
 				    KZ_TYPE_EMBED_PREFS,
 				    &kz_embed_prefs_info);
-	
-	g_type_module_add_interface(module,
-				    KZ_TYPE_GTK_WEBCORE,
-				    WEBI_TYPE_MOUSE_DELEGATE,
-				    &webi_mouse_delegate_info);
 }
 
 GType
@@ -378,17 +356,6 @@
 }
 
 static void
-kz_gtk_webcore_mouse_iface_init (WebiMouseDelegateInterface *iface)
-{
-	iface->click  = NULL;
-	iface->down   = kz_gtk_webcore_mouse_down;
-	iface->up     = kz_gtk_webcore_mouse_up;
-	iface->over   = kz_gtk_webcore_mouse_over;
-	iface->move   = NULL;
-	iface->out    = NULL;
-}
-
-static void
 set_font_preferences (KzProfile *profile, KzGtkWebcore *gtk_webcore)
 {
 	WebiSettings *settings = KZ_GTK_WEBCORE_GET_PRIVATE(gtk_webcore)->settings;
@@ -659,7 +626,6 @@
 	set_default_preferences(gtk_webcore);
 	webi_set_emit_internal_status(WEBI(gtk_webcore), TRUE);
 
-	webi_set_default_mouse_delegate(WEBI(gtk_webcore), WEBI_MOUSE_DELEGATE(gtk_webcore));
 	gtk_widget_show(GTK_WIDGET(gtk_webcore));
 }
 
@@ -852,142 +818,7 @@
 	gtk_widget_destroy(GTK_WIDGET(webi));
 }
 
-static void
-get_mouse_event_info(KzEmbedEventMouse **kzevent)
-{
-	GdkModifierType state = (GdkModifierType)0;
-	gint x, y;
-	KzEmbedEventMouse *ret;
-	KzEmbedEvent *info;
-
-	gdk_window_get_pointer(NULL, &x, &y, &state);
-	ret = (KzEmbedEventMouse *) kz_embed_event_new(KZ_EMBED_EVENT_MOUSE);
-
-	info = (KzEmbedEvent *) ret;
-	info->context = KZ_CONTEXT_NONE;
-
-	ret->x = x;
-	ret->y = y;
-	if (state & GDK_SHIFT_MASK)
-        	ret->modifier |= KZ_SHIFT_KEY;
-	if (state & GDK_CONTROL_MASK)
-        	ret->modifier |= KZ_CTRL_KEY;
-	if (state & GDK_MOD1_MASK)
-        	ret->modifier |= KZ_ALT_KEY;
-	if (state & GDK_META_MASK)
-        	ret->modifier |= KZ_META_KEY;
-	
-	*kzevent = ret;
-}
-
-static void
-kz_gtk_webcore_mouse_over (WebiMouseDelegate *webi, WebiEventInfo *event_info)
-{
-	KzEmbedEventMouse *kzevent;
-	gint ret = FALSE;
-	KzGtkWebcorePrivate *priv;
-	g_return_if_fail(KZ_IS_GTK_WEBCORE(webi));
-
-	priv = KZ_GTK_WEBCORE_GET_PRIVATE(webi);
-	get_mouse_event_info(&kzevent);
-
-	const gchar *link_url = webi_event_info_get_link_url((WebiEventInfo*)event_info);
-	if (!link_url)
-	{
-		if (priv->link_message)
-		{
-			g_free(priv->link_message);
-			priv->link_message = NULL;
-			g_signal_emit_by_name(webi, "kz-link-message");
-		}
-	}
-	else	
-	{
-		KzEmbedEvent *info = (KzEmbedEvent *) kzevent;
-		info->context |= KZ_CONTEXT_LINK;
-		info->link = g_strdup(link_url);
-		info->linktext = g_strdup(webi_event_info_get_link_label((WebiEventInfo*)event_info));
-
-		if (priv->link_message)
-			g_free(priv->link_message);
-
-		priv->link_message = g_strdup(link_url);
-
-		g_signal_emit_by_name(webi, "kz-link-message");
-	}
-
-	g_signal_emit_by_name(webi, "kz-dom-mouse-over",
-			      kzevent, &ret);
-	kz_embed_event_free((KzEmbedEvent *) kzevent);
-}
-
-gboolean
-kz_gtk_webcore_mouse_down (WebiMouseDelegate *webi, WebiEventInfo *event_info)
-{
-	KzEmbedEventMouse *kzevent;
-	gint ret = FALSE;
-	KzGtkWebcorePrivate *priv;
-	g_return_val_if_fail(KZ_IS_GTK_WEBCORE(webi), FALSE);
-
-	priv = KZ_GTK_WEBCORE_GET_PRIVATE(webi);
-	priv->button_press_time = GDK_CURRENT_TIME;
-
-	get_mouse_event_info(&kzevent);
-	kzevent->button = webi_event_info_get_button((WebiEventInfo*)event_info);
-
-	((KzEmbedEvent *)kzevent)->context |= KZ_CONTEXT_DOCUMENT;
-	const gchar *link_url = webi_event_info_get_link_url((WebiEventInfo*)event_info);
-	if (link_url)
-	{
-		((KzEmbedEvent *)kzevent)->context |= KZ_CONTEXT_LINK;
-		((KzEmbedEvent *)kzevent)->link = g_strdup(link_url);
-	}
-
-	g_signal_emit_by_name(webi, "kz-dom-mouse-down",
-			      kzevent, &ret);
-	kz_embed_event_free((KzEmbedEvent *) kzevent);
-
-	return ret;
-}
-
 static gboolean
-kz_gtk_webcore_mouse_up (WebiMouseDelegate *webi, WebiEventInfo *event_info)
-{
-	KzEmbedEventMouse *kzevent;
-	gint ret = FALSE;
-	KzGtkWebcorePrivate *priv;
-	g_return_val_if_fail(KZ_IS_GTK_WEBCORE(webi), FALSE);
-
-	priv = KZ_GTK_WEBCORE_GET_PRIVATE(webi);
-
-	get_mouse_event_info(&kzevent);
-	kzevent->button = webi_event_info_get_button((WebiEventInfo*)event_info);
-
-	((KzEmbedEvent *)kzevent)->context |= KZ_CONTEXT_DOCUMENT;
-
-	g_signal_emit_by_name(webi, "kz-dom-mouse-up",
-			      kzevent, &ret);
-
-	if (!ret && GDK_CURRENT_TIME < priv->button_press_time + 1000)
-	{
-		const gchar *link_url = webi_event_info_get_link_url((WebiEventInfo*)event_info);
-		if (link_url)
-		{
-			((KzEmbedEvent *)kzevent)->context |= KZ_CONTEXT_LINK;
-			((KzEmbedEvent *)kzevent)->link = g_strdup(link_url);
-		}
-
-		g_signal_emit_by_name(webi, "kz-dom-mouse-click",
-				      kzevent, &ret);
-	}
-	priv->button_press_time = 0;
-
-	kz_embed_event_free((KzEmbedEvent *) kzevent);
-
-	return ret;
-}
-
-static gboolean
 kz_gtk_webcore_set_cookie (Webi *webi, const gchar *url, WebiCookie *cookie)
 {
 	g_return_val_if_fail(KZ_IS_GTK_WEBCORE(webi), FALSE);




More information about the Kazehakase-cvs mailing list
アーカイブの一覧に戻る