Jacek Caban : mshtml: Added IHTMLEventObj::get_button implementation.
Module: wine Branch: master Commit: 3ffef98dca4b2150b6d8238991149fc83146dc83 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3ffef98dca4b2150b6d8238991... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Sep 6 18:56:28 2009 +0200 mshtml: Added IHTMLEventObj::get_button 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 96be69e..6ef1d2f 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -396,8 +396,23 @@ static HRESULT WINAPI HTMLEventObj_get_keyCode(IHTMLEventObj *iface, LONG *p) static HRESULT WINAPI HTMLEventObj_get_button(IHTMLEventObj *iface, LONG *p) { HTMLEventObj *This = HTMLEVENTOBJ_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + PRUint16 button = 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_GetButton(mouse_event, &button); + nsIDOMMouseEvent_Release(mouse_event); + } + } + + *p = button; + return S_OK; } static HRESULT WINAPI HTMLEventObj_get_type(IHTMLEventObj *iface, BSTR *p)
participants (1)
-
Alexandre Julliard