Alistair Leslie-Hughes : mshtml: Add support for get/put mousemove event.

Alexandre Julliard julliard at winehq.org
Mon Feb 21 10:56:59 CST 2011


Module: wine
Branch: master
Commit: 62c8c143c46c4b8cd8a1c0042a859832b2bd43f9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=62c8c143c46c4b8cd8a1c0042a859832b2bd43f9

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Mon Feb 21 20:23:48 2011 +1100

mshtml: Add support for get/put mousemove event.

---

 dlls/mshtml/htmldoc.c   |   12 ++++++++----
 dlls/mshtml/htmlelem.c  |   12 ++++++++----
 dlls/mshtml/htmlevent.c |    5 +++++
 dlls/mshtml/htmlevent.h |    1 +
 4 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 2b05ab9..0d42d4f 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -1146,15 +1146,19 @@ static HRESULT WINAPI HTMLDocument_get_onmousedown(IHTMLDocument2 *iface, VARIAN
 static HRESULT WINAPI HTMLDocument_put_onmousemove(IHTMLDocument2 *iface, VARIANT v)
 {
     HTMLDocument *This = impl_from_IHTMLDocument2(iface);
-    FIXME("(%p)\n", This);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->()\n", This);
+
+    return set_doc_event(This, EVENTID_MOUSEMOVE, &v);
 }
 
 static HRESULT WINAPI HTMLDocument_get_onmousemove(IHTMLDocument2 *iface, VARIANT *p)
 {
     HTMLDocument *This = impl_from_IHTMLDocument2(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    return get_doc_event(This, EVENTID_MOUSEMOVE, p);
 }
 
 static HRESULT WINAPI HTMLDocument_put_onmouseout(IHTMLDocument2 *iface, VARIANT v)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index d1df6f4..6d05a4e 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -592,15 +592,19 @@ static HRESULT WINAPI HTMLElement_get_onmouseover(IHTMLElement *iface, VARIANT *
 static HRESULT WINAPI HTMLElement_put_onmousemove(IHTMLElement *iface, VARIANT v)
 {
     HTMLElement *This = impl_from_IHTMLElement(iface);
-    FIXME("(%p)->()\n", This);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->()\n", This);
+
+    return set_node_event(&This->node, EVENTID_MOUSEMOVE, &v);
 }
 
 static HRESULT WINAPI HTMLElement_get_onmousemove(IHTMLElement *iface, VARIANT *p)
 {
     HTMLElement *This = impl_from_IHTMLElement(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    return get_node_event(&This->node, EVENTID_MOUSEMOVE, p);
 }
 
 static HRESULT WINAPI HTMLElement_put_onmousedown(IHTMLElement *iface, VARIANT v)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 59ca9ff..19a6013 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -83,6 +83,9 @@ static const WCHAR onloadW[] = {'o','n','l','o','a','d',0};
 static const WCHAR mousedownW[] = {'m','o','u','s','e','d','o','w','n',0};
 static const WCHAR onmousedownW[] = {'o','n','m','o','u','s','e','d','o','w','n',0};
 
+static const WCHAR mousemoveW[] = {'m','o','u','s','e','m','o','v','e',0};
+static const WCHAR onmousemoveW[] = {'o','n','m','o','u','s','e','m','o','v','e',0};
+
 static const WCHAR mouseoutW[] = {'m','o','u','s','e','o','u','t',0};
 static const WCHAR onmouseoutW[] = {'o','n','m','o','u','s','e','o','u','t',0};
 
@@ -162,6 +165,8 @@ static const event_info_t event_info[] = {
         EVENT_NODEHANDLER},
     {mousedownW,         onmousedownW,         EVENTT_MOUSE,  DISPID_EVMETH_ONMOUSEDOWN,
         EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
+    {mousemoveW,         onmousemoveW,         EVENTT_MOUSE,  DISPID_EVMETH_ONMOUSEMOVE,
+        EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
     {mouseoutW,          onmouseoutW,          EVENTT_MOUSE,  DISPID_EVMETH_ONMOUSEOUT,
         EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
     {mouseoverW,         onmouseoverW,         EVENTT_MOUSE,  DISPID_EVMETH_ONMOUSEOVER,
diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h
index 3a8619a..6089504 100644
--- a/dlls/mshtml/htmlevent.h
+++ b/dlls/mshtml/htmlevent.h
@@ -30,6 +30,7 @@ typedef enum {
     EVENTID_KEYUP,
     EVENTID_LOAD,
     EVENTID_MOUSEDOWN,
+    EVENTID_MOUSEMOVE,
     EVENTID_MOUSEOUT,
     EVENTID_MOUSEOVER,
     EVENTID_MOUSEUP,




More information about the wine-cvs mailing list