Commit 364b1260 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added get_onmouseover implementations.

parent 3cae9a77
...@@ -1081,8 +1081,10 @@ static HRESULT WINAPI HTMLDocument_put_onmouseover(IHTMLDocument2 *iface, VARIAN ...@@ -1081,8 +1081,10 @@ static HRESULT WINAPI HTMLDocument_put_onmouseover(IHTMLDocument2 *iface, VARIAN
static HRESULT WINAPI HTMLDocument_get_onmouseover(IHTMLDocument2 *iface, VARIANT *p) static HRESULT WINAPI HTMLDocument_get_onmouseover(IHTMLDocument2 *iface, VARIANT *p)
{ {
HTMLDocument *This = HTMLDOC_THIS(iface); HTMLDocument *This = HTMLDOC_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_MOUSEOVER, p);
} }
static HRESULT WINAPI HTMLDocument_put_onreadystatechange(IHTMLDocument2 *iface, VARIANT v) static HRESULT WINAPI HTMLDocument_put_onreadystatechange(IHTMLDocument2 *iface, VARIANT v)
......
...@@ -510,8 +510,10 @@ static HRESULT WINAPI HTMLElement_put_onmouseover(IHTMLElement *iface, VARIANT v ...@@ -510,8 +510,10 @@ static HRESULT WINAPI HTMLElement_put_onmouseover(IHTMLElement *iface, VARIANT v
static HRESULT WINAPI HTMLElement_get_onmouseover(IHTMLElement *iface, VARIANT *p) static HRESULT WINAPI HTMLElement_get_onmouseover(IHTMLElement *iface, VARIANT *p)
{ {
HTMLElement *This = HTMLELEM_THIS(iface); 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_MOUSEOVER, p);
} }
static HRESULT WINAPI HTMLElement_put_onmousemove(IHTMLElement *iface, VARIANT v) static HRESULT WINAPI HTMLElement_put_onmousemove(IHTMLElement *iface, VARIANT v)
......
...@@ -471,6 +471,19 @@ HRESULT set_event_handler(event_target_t **event_target, HTMLDocument *doc, even ...@@ -471,6 +471,19 @@ HRESULT set_event_handler(event_target_t **event_target, HTMLDocument *doc, even
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT get_event_handler(event_target_t **event_target, eventid_t eid, VARIANT *var)
{
if(*event_target && (*event_target)->event_table[eid]) {
V_VT(var) = VT_DISPATCH;
V_DISPATCH(var) = (*event_target)->event_table[eid];
IDispatch_AddRef(V_DISPATCH(var));
}else {
V_VT(var) = VT_NULL;
}
return S_OK;
}
void check_event_attr(HTMLDocument *doc, nsIDOMElement *nselem) void check_event_attr(HTMLDocument *doc, nsIDOMElement *nselem)
{ {
const PRUnichar *attr_value; const PRUnichar *attr_value;
......
...@@ -30,13 +30,24 @@ void check_event_attr(HTMLDocument*,nsIDOMElement*); ...@@ -30,13 +30,24 @@ void check_event_attr(HTMLDocument*,nsIDOMElement*);
void release_event_target(event_target_t*); void release_event_target(event_target_t*);
void fire_event(HTMLDocument*,eventid_t,nsIDOMNode*); void fire_event(HTMLDocument*,eventid_t,nsIDOMNode*);
HRESULT set_event_handler(event_target_t**,HTMLDocument*,eventid_t,VARIANT*); HRESULT set_event_handler(event_target_t**,HTMLDocument*,eventid_t,VARIANT*);
HRESULT get_event_handler(event_target_t**,eventid_t,VARIANT*);
static inline HRESULT set_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var) static inline HRESULT set_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
{ {
return set_event_handler(&node->event_target, node->doc, eid, var); return set_event_handler(&node->event_target, node->doc, eid, var);
} }
static inline HRESULT get_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
{
return get_event_handler(&node->event_target, eid, var);
}
static inline HRESULT set_doc_event(HTMLDocument *doc, eventid_t eid, VARIANT *var) static inline HRESULT set_doc_event(HTMLDocument *doc, eventid_t eid, VARIANT *var)
{ {
return set_event_handler(&doc->event_target, doc, eid, var); return set_event_handler(&doc->event_target, doc, eid, var);
} }
static inline HRESULT get_doc_event(HTMLDocument *doc, eventid_t eid, VARIANT *var)
{
return get_event_handler(&doc->event_target, eid, var);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment