diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-06-16 07:47:33 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-06-16 07:47:33 +0800 |
commit | 3241ea896ff4f8939c038ab65f03948d026ed520 (patch) | |
tree | 4cf5adff6fe56404f7cbb49f0e86bf4b9720965a /embed/mozilla/EventContext.cpp | |
parent | d5b5f70b1cca8ea489ca5be9900d0b47275b5a23 (diff) | |
download | gsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.tar gsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.tar.gz gsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.tar.bz2 gsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.tar.lz gsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.tar.xz gsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.tar.zst gsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.zip |
Remove some obsolete entries.
2003-06-16 Marco Pesenti Gritti <marco@it.gnome.org>
* data/ui/nautilus-epiphany-view.xml.in:
Remove some obsolete entries.
* embed/Makefile.am:
* embed/ephy-embed-event.c: (ephy_embed_event_init),
(ephy_embed_event_get_event_type):
* embed/ephy-embed-event.h:
Make more generic and allow to make distinction
between mouse and key events.
* embed/ephy-embed-popup-bw.c:
* embed/ephy-embed-popup-bw.h:
Remove, unused.
* embed/ephy-embed.c: (ephy_embed_base_init):
* embed/ephy-embed.h:
* embed/mozilla/mozilla-embed.cpp:
Emit context signals only when necessary,
get rid of unused mouse_down signal.
* embed/ephy-embed-popup-control.c:
(ephy_embed_popup_control_show_impl):
* embed/mozilla/EventContext.cpp:
* src/ephy-nautilus-view.c: (ephy_nautilus_view_instance_init),
(gnv_embed_dom_mouse_click_cb), (gnv_embed_context_menu_cb):
* src/ephy-tab.c: (ephy_tab_dom_mouse_click_cb),
(ephy_tab_context_menu_cb):
Use new event api.
Diffstat (limited to 'embed/mozilla/EventContext.cpp')
-rw-r--r-- | embed/mozilla/EventContext.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp index 229f8d3be..5d8e30075 100644 --- a/embed/mozilla/EventContext.cpp +++ b/embed/mozilla/EventContext.cpp @@ -525,7 +525,22 @@ nsresult EventContext::GetMouseEventInfo (nsIDOMMouseEvent *aMouseEvent, EphyEmb /* casting 32-bit guint* to PRUint16* below will break on big-endian */ PRUint16 btn; aMouseEvent->GetButton (&btn); - info->mouse_button = (guint)btn; + + switch (btn) + { + case 0: + info->type = EPHY_EMBED_EVENT_MOUSE_BUTTON1; + break; + case 1: + info->type = EPHY_EMBED_EVENT_MOUSE_BUTTON2; + break; + case 2: + info->type = EPHY_EMBED_EVENT_MOUSE_BUTTON3; + break; + + default: + g_warning ("Unknown mouse button"); + } /* OTOH, casting only between (un)signedness is safe */ aMouseEvent->GetScreenX ((PRInt32*)&info->x); @@ -590,6 +605,8 @@ nsresult EventContext::GetKeyEventInfo (nsIDOMKeyEvent *aKeyEvent, EphyEmbedEven { nsresult rv; + info->type = EPHY_EMBED_EVENT_KEY; + PRUint32 keyCode; rv = aKeyEvent->GetKeyCode(&keyCode); if (NS_FAILED(rv)) return rv; |