[kazehakase-svn] [3292] * module/embed/ie/kz-ie.cpp: Emit mouse event.

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
Wed Oct 17 16:04:48 JST 2007


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

Log Message:
-----------
* module/embed/ie/kz-ie.cpp: Emit mouse event.

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

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2007-10-17 05:09:16 UTC (rev 3291)
+++ kazehakase/trunk/ChangeLog	2007-10-17 07:04:47 UTC (rev 3292)
@@ -3,6 +3,7 @@
 	* module/embed/ie/Makefile.am: Add some options.
 	* 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.
 
 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 05:09:16 UTC (rev 3291)
+++ kazehakase/trunk/module/embed/ie/kz-ie.cpp	2007-10-17 07:04:47 UTC (rev 3292)
@@ -59,6 +59,12 @@
 						  glong		max_progress);
 static void	    kz_ie_embed_net_start	 (GtkIEEmbed   *ieembed);
 static void	    kz_ie_embed_net_stop	 (GtkIEEmbed   *ieembed);
+static gboolean	    kz_ie_embed_dom_mouse_down   (GtkIEEmbed   *embed,
+						  GtkIEEmbedDOMMouseEvent *event);
+static gboolean	    kz_ie_embed_dom_mouse_up     (GtkIEEmbed   *embed,
+						  GtkIEEmbedDOMMouseEvent *event);
+static gboolean	    kz_ie_embed_dom_mouse_move   (GtkIEEmbed   *embed,
+						  GtkIEEmbedDOMMouseEvent *event);
 
 /* embed iface */
 static void         kz_ie_load_url         (KzEmbed      *kzembed,
@@ -171,12 +177,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->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_down;
+	ie_class->dom_mouse_up   = kz_ie_embed_dom_mouse_up;
+
 	g_type_class_add_private(object_class, sizeof(KzIEPrivate));
 }
 
@@ -208,8 +217,8 @@
 	iface->shistory_copy          = NULL;
 	iface->shistory_get_pos       = NULL;
 	iface->shistory_get_nth       = NULL;
-	iface->reload                 = NULL;
-	iface->stop_load              = NULL;
+	iface->reload                 = kz_ie_reload;
+	iface->stop_load              = kz_ie_stop_load;
 	iface->go_back                = kz_ie_go_back;
 	iface->go_forward             = kz_ie_go_forward;
 	iface->can_go_back            = kz_ie_can_go_back;
@@ -373,6 +382,69 @@
 	g_signal_emit_by_name(ieembed, "kz-net-stop");
 }
 
+static KzEmbedEventMouse *
+create_kz_embed_event_mouse (GtkIEEmbedDOMMouseEvent *event)
+{
+	KzEmbedEventMouse *kzevent;
+
+	kzevent = (KzEmbedEventMouse *) kz_embed_event_new(KZ_EMBED_EVENT_MOUSE);
+	if (event->shift_key)
+		kzevent->modifier |= KZ_SHIFT_KEY;
+	if (event->control_key)
+		kzevent->modifier |= KZ_CTRL_KEY;
+	if (event->alt_key)
+		kzevent->modifier |= KZ_ALT_KEY;
+	if (event->meta_key)
+		kzevent->modifier |= KZ_META_KEY;
+	kzevent->x = event->x;
+	kzevent->y = event->y;
+	kzevent->button = event->button;
+
+	return kzevent;
+}
+
+static gboolean
+kz_ie_embed_dom_mouse_down (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event)
+{
+	KzEmbedEventMouse *kzevent;
+	gint ret = FALSE;
+
+	kzevent = create_kz_embed_event_mouse(event);
+	g_signal_emit_by_name(embed, "kz-dom-mouse-down",
+			      kzevent, &ret);
+	kz_embed_event_free((KzEmbedEvent *) kzevent);
+
+	return ret;
+}
+
+static gboolean
+kz_ie_embed_dom_mouse_up (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event)
+{
+	KzEmbedEventMouse *kzevent;
+	gint ret = FALSE;
+
+	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_move (GtkIEEmbed *embed, GtkIEEmbedDOMMouseEvent *event)
+{
+	KzEmbedEventMouse *kzevent;
+	gint ret = FALSE;
+
+	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 void
 kz_ie_load_url (KzEmbed *kzembed, const gchar  *url)
 {




More information about the Kazehakase-cvs mailing list
Zurück zum Archiv-Index