aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-01-16 02:08:26 +0800
committerChristian Persch <chpe@src.gnome.org>2004-01-16 02:08:26 +0800
commit216c6fa203c77b1ea3aa21dd822c3688783cac42 (patch)
tree4fcc01185a3bc213497bfcf90fbdc47b6044becf /embed/mozilla/mozilla-embed.cpp
parent5e2c715ab1b0ae755542a02914b2377fd0878d99 (diff)
downloadgsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.tar
gsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.tar.gz
gsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.tar.bz2
gsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.tar.lz
gsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.tar.xz
gsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.tar.zst
gsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.zip
Make EphyEmbedEvent abstract, implemented by MozillaEmbedEvent. Port
2004-01-15 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-embed-event.c: (ephy_embed_event_get_type), (ephy_embed_event_base_init), (ephy_embed_event_get_event_type), (ephy_embed_event_get_context), (ephy_embed_event_get_modifier), (ephy_embed_event_get_coords), (ephy_embed_event_get_property), (ephy_embed_event_has_property), (ephy_embed_event_get_dom_event): * embed/ephy-embed-event.h: * embed/mozilla/EventContext.cpp: * embed/mozilla/EventContext.h: * embed/mozilla/Makefile.am: * embed/mozilla/mozilla-embed-event.cpp: * embed/mozilla/mozilla-embed-event.h: * embed/mozilla/mozilla-embed.cpp: * src/ephy-window.c: (popup_menu_at_coords): * src/popup-commands.c: (popup_cmd_copy_link_address): Make EphyEmbedEvent abstract, implemented by MozillaEmbedEvent. Port callers to the new api. Fix some callers in src/ which were using private fields of EphyEmbedEvent struct.
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r--embed/mozilla/mozilla-embed.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 15b88938b..65d28a5d8 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -19,6 +19,7 @@
*/
#include "mozilla-embed.h"
+#include "mozilla-embed-event.h"
#include "ephy-embed-shell.h"
#include "ephy-command-manager.h"
#include "ephy-string.h"
@@ -29,7 +30,6 @@
#include "EventContext.h"
#include <gtkmozembed.h>
-#include <gtkmozembed_internal.h>
#include <nsIWindowWatcher.h>
#include <nsIURI.h>
#include <nsIURL.h>
@@ -864,8 +864,8 @@ mozilla_embed_dom_key_down_cb (GtkMozEmbed *embed, gpointer dom_event,
return FALSE;
}
- EphyEmbedEvent *info;
- info = ephy_embed_event_new ();
+ MozillaEmbedEvent *info;
+ info = mozilla_embed_event_new (dom_event);
gboolean ret = FALSE;
@@ -913,7 +913,7 @@ static gint
mozilla_embed_dom_mouse_click_cb (GtkMozEmbed *embed, gpointer dom_event,
MozillaEmbed *membed)
{
- EphyEmbedEvent *info;
+ MozillaEmbedEvent *info;
EventContext event_context;
gint return_value = FALSE;
nsresult result;
@@ -925,10 +925,12 @@ mozilla_embed_dom_mouse_click_cb (GtkMozEmbed *embed, gpointer dom_event,
return FALSE;
}
- info = ephy_embed_event_new ();
+ info = mozilla_embed_event_new (dom_event);
event_context.Init (mpriv->browser);
- result = event_context.GetMouseEventInfo (static_cast<nsIDOMMouseEvent*>(dom_event), info);
+ result = event_context.GetMouseEventInfo
+ (static_cast<nsIDOMMouseEvent*>(dom_event),
+ MOZILLA_EMBED_EVENT (info));
if (NS_SUCCEEDED(result))
{
@@ -956,7 +958,7 @@ static gint
mozilla_embed_dom_mouse_down_cb (GtkMozEmbed *embed, gpointer dom_event,
MozillaEmbed *membed)
{
- EphyEmbedEvent *info;
+ MozillaEmbedEvent *info;
EventContext event_context;
gint return_value = FALSE;
nsresult result;
@@ -969,13 +971,15 @@ mozilla_embed_dom_mouse_down_cb (GtkMozEmbed *embed, gpointer dom_event,
return FALSE;
}
- info = ephy_embed_event_new ();
+ info = mozilla_embed_event_new (dom_event);
event_context.Init (mpriv->browser);
- result = event_context.GetMouseEventInfo (static_cast<nsIDOMMouseEvent*>(dom_event), info);
+ result = event_context.GetMouseEventInfo
+ (static_cast<nsIDOMMouseEvent*>(dom_event),
+ MOZILLA_EMBED_EVENT (info));
if (NS_FAILED (result)) return FALSE;
- type = ephy_embed_event_get_event_type (info);
+ type = ephy_embed_event_get_event_type ((EphyEmbedEvent *) info);
nsCOMPtr<nsIDOMDocument> domDoc;
result = event_context.GetTargetDocument (getter_AddRefs(domDoc));