Jacek Caban : mshtml: Added IHTMLEventObj::get_client[XY] implementation.

Alexandre Julliard julliard at winehq.org
Tue Sep 8 08:55:16 CDT 2009


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sun Sep  6 18:56:46 2009 +0200

mshtml: Added IHTMLEventObj::get_client[XY] implementation.

---

 dlls/mshtml/htmlevent.c |   38 ++++++++++++++++++++++++++++++++++----
 1 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 6ef1d2f..8479015 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -456,15 +456,45 @@ static HRESULT WINAPI HTMLEventObj_get_y(IHTMLEventObj *iface, LONG *p)
 static HRESULT WINAPI HTMLEventObj_get_clientX(IHTMLEventObj *iface, LONG *p)
 {
     HTMLEventObj *This = HTMLEVENTOBJ_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    PRInt32 x = 0;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    if(This->nsevent) {
+        nsIDOMMouseEvent *mouse_event;
+        nsresult nsres;
+
+        nsres = nsIDOMEvent_QueryInterface(This->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event);
+        if(NS_SUCCEEDED(nsres)) {
+            nsIDOMMouseEvent_GetClientX(mouse_event, &x);
+            nsIDOMMouseEvent_Release(mouse_event);
+        }
+    }
+
+    *p = x;
+    return S_OK;
 }
 
 static HRESULT WINAPI HTMLEventObj_get_clientY(IHTMLEventObj *iface, LONG *p)
 {
     HTMLEventObj *This = HTMLEVENTOBJ_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    PRInt32 y = 0;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    if(This->nsevent) {
+        nsIDOMMouseEvent *mouse_event;
+        nsresult nsres;
+
+        nsres = nsIDOMEvent_QueryInterface(This->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event);
+        if(NS_SUCCEEDED(nsres)) {
+            nsIDOMMouseEvent_GetClientY(mouse_event, &y);
+            nsIDOMMouseEvent_Release(mouse_event);
+        }
+    }
+
+    *p = y;
+    return S_OK;
 }
 
 static HRESULT WINAPI HTMLEventObj_get_offsetX(IHTMLEventObj *iface, LONG *p)




More information about the wine-cvs mailing list