From 46434faca3c0163dfa797a59854c70870b3d983d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 10 Oct 2008 15:49:33 -0500 Subject: [PATCH] mshtml: Added element mouseout and selectstart event implementation. --- dlls/mshtml/htmlelem.c | 30 ++++++++++++++++++++---------- dlls/mshtml/htmlevent.c | 4 ++++ dlls/mshtml/htmlevent.h | 1 + 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 1335d14ada9..a8c0786bea2 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -422,8 +422,10 @@ static HRESULT WINAPI HTMLElement_put_onclick(IHTMLElement *iface, VARIANT v) static HRESULT WINAPI HTMLElement_get_onclick(IHTMLElement *iface, VARIANT *p) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_node_event(&This->node, EVENTID_CLICK, p); } static HRESULT WINAPI HTMLElement_put_ondblclick(IHTMLElement *iface, VARIANT v) @@ -491,15 +493,19 @@ static HRESULT WINAPI HTMLElement_get_onkeypress(IHTMLElement *iface, VARIANT *p static HRESULT WINAPI HTMLElement_put_onmouseout(IHTMLElement *iface, VARIANT v) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + return set_node_event(&This->node, EVENTID_MOUSEOUT, &v); } static HRESULT WINAPI HTMLElement_get_onmouseout(IHTMLElement *iface, VARIANT *p) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_node_event(&This->node, EVENTID_MOUSEOUT, p); } static HRESULT WINAPI HTMLElement_put_onmouseover(IHTMLElement *iface, VARIANT v) @@ -634,15 +640,19 @@ static HRESULT WINAPI HTMLElement_get_language(IHTMLElement *iface, BSTR *p) static HRESULT WINAPI HTMLElement_put_onselectstart(IHTMLElement *iface, VARIANT v) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + return set_node_event(&This->node, EVENTID_SELECTSTART, &v); } static HRESULT WINAPI HTMLElement_get_onselectstart(IHTMLElement *iface, VARIANT *p) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_node_event(&This->node, EVENTID_SELECTSTART, p); } static HRESULT WINAPI HTMLElement_scrollIntoView(IHTMLElement *iface, VARIANT varargStart) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index c12bc89f414..aaf7541876c 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -66,6 +66,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 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}; + static const WCHAR mouseoverW[] = {'m','o','u','s','e','o','v','e','r',0}; static const WCHAR onmouseoverW[] = {'o','n','m','o','u','s','e','o','v','e','r',0}; @@ -98,6 +101,7 @@ static const event_info_t event_info[] = { {keyupW, onkeyupW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, {loadW, onloadW, 0}, {mousedownW, onmousedownW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {mouseoutW, onmouseoutW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, {mouseoverW, onmouseoverW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, {mouseupW, onmouseupW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, {pasteW, onpasteW, 0}, diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index 9b9be588dd0..230450bbd32 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -27,6 +27,7 @@ typedef enum { EVENTID_KEYUP, EVENTID_LOAD, EVENTID_MOUSEDOWN, + EVENTID_MOUSEOUT, EVENTID_MOUSEOVER, EVENTID_MOUSEUP, EVENTID_PASTE,