Jacek Caban : mshtml: Added IDOMKeyboardEvent key state getters implementation.
Alexandre Julliard
julliard at winehq.org
Tue Feb 6 15:55:49 CST 2018
Module: wine
Branch: master
Commit: 4947c70fe27f343432ff017f21415ceb69426161
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4947c70fe27f343432ff017f21415ceb69426161
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Feb 6 00:10:19 2018 +0100
mshtml: Added IDOMKeyboardEvent key state getters implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlevent.c | 65 +++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 55 insertions(+), 10 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 14ab00d..c11f6d1 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -1715,36 +1715,81 @@ static HRESULT WINAPI DOMKeyboardEvent_get_location(IDOMKeyboardEvent *iface, UL
static HRESULT WINAPI DOMKeyboardEvent_get_ctrlKey(IDOMKeyboardEvent *iface, VARIANT_BOOL *p)
{
DOMEvent *This = impl_from_IDOMKeyboardEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ cpp_bool r;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMKeyEvent_GetCtrlKey(This->keyboard_event, &r);
+ if(NS_FAILED(nsres))
+ return E_FAIL;
+
+ *p = variant_bool(r);
+ return S_OK;
}
static HRESULT WINAPI DOMKeyboardEvent_get_shiftKey(IDOMKeyboardEvent *iface, VARIANT_BOOL *p)
{
DOMEvent *This = impl_from_IDOMKeyboardEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ cpp_bool r;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMKeyEvent_GetShiftKey(This->keyboard_event, &r);
+ if(NS_FAILED(nsres))
+ return E_FAIL;
+
+ *p = variant_bool(r);
+ return S_OK;
}
static HRESULT WINAPI DOMKeyboardEvent_get_altKey(IDOMKeyboardEvent *iface, VARIANT_BOOL *p)
{
DOMEvent *This = impl_from_IDOMKeyboardEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ cpp_bool r;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMKeyEvent_GetAltKey(This->keyboard_event, &r);
+ if(NS_FAILED(nsres))
+ return E_FAIL;
+
+ *p = variant_bool(r);
+ return S_OK;
}
static HRESULT WINAPI DOMKeyboardEvent_get_metaKey(IDOMKeyboardEvent *iface, VARIANT_BOOL *p)
{
DOMEvent *This = impl_from_IDOMKeyboardEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ cpp_bool r;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMKeyEvent_GetMetaKey(This->keyboard_event, &r);
+ if(NS_FAILED(nsres))
+ return E_FAIL;
+
+ *p = variant_bool(r);
+ return S_OK;
}
static HRESULT WINAPI DOMKeyboardEvent_get_repeat(IDOMKeyboardEvent *iface, VARIANT_BOOL *p)
{
DOMEvent *This = impl_from_IDOMKeyboardEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ cpp_bool r;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMKeyEvent_GetRepeat(This->keyboard_event, &r);
+ if(NS_FAILED(nsres))
+ return E_FAIL;
+
+ *p = variant_bool(r);
+ return S_OK;
}
static HRESULT WINAPI DOMKeyboardEvent_getModifierState(IDOMKeyboardEvent *iface, BSTR key,
More information about the wine-cvs
mailing list