[kazehakase-svn] [3295] * module/embed/ie/kz-ie.cpp: Emit " kz-dom-mouse-click".

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Wed Oct 17 18:54:05 JST 2007


Revision: 3295
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3295
Author:   ikezoe
Date:     2007-10-17 18:54:04 +0900 (Wed, 17 Oct 2007)

Log Message:
-----------
* module/embed/ie/kz-ie.cpp: Emit "kz-dom-mouse-click".

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

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2007-10-17 07:23:41 UTC (rev 3294)
+++ kazehakase/trunk/ChangeLog	2007-10-17 09:54:04 UTC (rev 3295)
@@ -4,6 +4,7 @@
 	* module/embed/ie/kz-ie.cpp: Fix horrible mistake.
 	* module/embed/ie/kz-ie.cpp: more.
 	* module/embed/ie/kz-ie.cpp: Emit mouse event.
+	* module/embed/ie/kz-ie.cpp: Emit "kz-dom-mouse-click".
 
 2007-10-16  Hiroyuki Ikezoe  <poinc****@ikezo*****>
 

Modified: kazehakase/trunk/module/embed/ie/kz-ie.cpp
===================================================================
--- kazehakase/trunk/module/embed/ie/kz-ie.cpp	2007-10-17 07:23:41 UTC (rev 3294)
+++ kazehakase/trunk/module/embed/ie/kz-ie.cpp	2007-10-17 09:54:04 UTC (rev 3295)
@@ -65,6 +65,8 @@
 						  GtkIEEmbedDOMMouseEvent *event);
 static gboolean	    kz_ie_embed_dom_mouse_move   (GtkIEEmbed   *embed,
 						  GtkIEEmbedDOMMouseEvent *event);
+static gboolean	    kz_ie_embed_dom_mouse_click  (GtkIEEmbed   *embed,
+						  GtkIEEmbedDOMMouseEvent *event);
 
 /* embed iface */
 static void         kz_ie_load_url         (KzEmbed      *kzembed,
@@ -177,14 +179,15 @@
 
 	object_class->dispose = kz_ie_dispose;
 
-	ie_class->location       = kz_ie_embed_location;
-	ie_class->title          = kz_ie_embed_title;
-	ie_class->net_start      = kz_ie_embed_net_start;
-	ie_class->net_stop       = kz_ie_embed_net_stop;
-	ie_class->progress       = kz_ie_embed_progress;
-	ie_class->dom_mouse_down = kz_ie_embed_dom_mouse_down;
-	ie_class->dom_mouse_move = kz_ie_embed_dom_mouse_move;
-	ie_class->dom_mouse_up   = kz_ie_embed_dom_mouse_up;
+	ie_class->location        = kz_ie_embed_location;
+	ie_class->title           = kz_ie_embed_title;
+	ie_class->net_start       = kz_ie_embed_net_start;
+	ie_class->net_stop        = kz_ie_embed_net_stop;
+	ie_class->progress        = kz_ie_embed_progress;
+	ie_class->dom_mouse_down  = kz_ie_embed_dom_mouse_down;
+	ie_class->dom_mouse_move  = kz_ie_embed_dom_mouse_move;
+	ie_class->dom_mouse_up    = kz_ie_embed_dom_mouse_up;
+	ie_class->dom_mouse_click = kz_ie_embed_dom_mouse_click;
 
 	g_type_class_add_private(object_class, sizeof(KzIEPrivate));
 }
@@ -405,45 +408,41 @@
 }
 
 static gboolean
-kz_ie_embed_dom_mouse_down (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event)
+emit_mouse_signal (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event,
+		   const gchar *signal_name)
 {
 	KzEmbedEventMouse *kzevent;
 	gint ret = FALSE;
 
 	kzevent = create_kz_embed_event_mouse(event);
-	g_signal_emit_by_name(embed, "kz-dom-mouse-down",
-			      kzevent, &ret);
+	g_signal_emit_by_name(embed, signal_name, kzevent, &ret);
 	kz_embed_event_free((KzEmbedEvent *) kzevent);
 
 	return ret;
 }
 
 static gboolean
-kz_ie_embed_dom_mouse_up (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event)
+kz_ie_embed_dom_mouse_down (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event)
 {
-	KzEmbedEventMouse *kzevent;
-	gint ret = FALSE;
+	return emit_mouse_signal (embed, event, "kz-dom-mouse-down");
+}
 
-	kzevent = create_kz_embed_event_mouse(event);
-	g_signal_emit_by_name(embed, "kz-dom-mouse-up",
-			      kzevent, &ret);
-	kz_embed_event_free((KzEmbedEvent *) kzevent);
-
-	return ret;
+static gboolean
+kz_ie_embed_dom_mouse_up (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event)
+{
+	return emit_mouse_signal (embed, event, "kz-dom-mouse-up");
 }
 
 static gboolean
 kz_ie_embed_dom_mouse_move (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event)
 {
-	KzEmbedEventMouse *kzevent;
-	gint ret = FALSE;
+	return emit_mouse_signal (embed, event, "kz-dom-mouse-move");
+}
 
-	kzevent = create_kz_embed_event_mouse(event);
-	g_signal_emit_by_name(embed, "kz-dom-mouse-over",
-			      kzevent, &ret);
-	kz_embed_event_free((KzEmbedEvent *) kzevent);
-
-	return ret;
+static gboolean
+kz_ie_embed_dom_mouse_click (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event)
+{
+	return emit_mouse_signal (embed, event, "kz-dom-mouse-click");
 }
 
 static void




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