Jacek Caban : mshtml: Added IHTMLEventObj::get_keyCode implementation.

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


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

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

mshtml: Added IHTMLEventObj::get_keyCode implementation.

---

 dlls/mshtml/htmlevent.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index a42098a..96be69e 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -374,8 +374,23 @@ static HRESULT WINAPI HTMLEventObj_put_keyCode(IHTMLEventObj *iface, LONG v)
 static HRESULT WINAPI HTMLEventObj_get_keyCode(IHTMLEventObj *iface, LONG *p)
 {
     HTMLEventObj *This = HTMLEVENTOBJ_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    PRUint32 key_code = 0;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    if(This->nsevent) {
+        nsIDOMKeyEvent *key_event;
+        nsresult nsres;
+
+        nsres = nsIDOMEvent_QueryInterface(This->nsevent, &IID_nsIDOMKeyEvent, (void**)&key_event);
+        if(NS_SUCCEEDED(nsres)) {
+            nsIDOMKeyEvent_GetKeyCode(key_event, &key_code);
+            nsIDOMKeyEvent_Release(key_event);
+        }
+    }
+
+    *p = key_code;
+    return S_OK;
 }
 
 static HRESULT WINAPI HTMLEventObj_get_button(IHTMLEventObj *iface, LONG *p)




More information about the wine-cvs mailing list