mshtml: Added IDispatchEx support to HTMLEventObj.
This commit is contained in:
parent
1a3e1de222
commit
70bb5b0749
|
@ -65,6 +65,7 @@ static struct list dispex_data_list = LIST_INIT(dispex_data_list);
|
|||
|
||||
static REFIID tid_ids[] = {
|
||||
&IID_NULL,
|
||||
&DIID_DispCEventObj,
|
||||
&DIID_DispDOMChildrenCollection,
|
||||
&DIID_DispHTMLBody,
|
||||
&DIID_DispHTMLCommentElement,
|
||||
|
@ -100,6 +101,7 @@ static REFIID tid_ids[] = {
|
|||
&IID_IHTMLElement3,
|
||||
&IID_IHTMLElement4,
|
||||
&IID_IHTMLElementCollection,
|
||||
&IID_IHTMLEventObj,
|
||||
&IID_IHTMLFrameBase2,
|
||||
&IID_IHTMLGenericElement,
|
||||
&IID_IHTMLImgElement,
|
||||
|
|
|
@ -76,6 +76,7 @@ eventid_t str_to_eid(LPCWSTR str)
|
|||
}
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
const IHTMLEventObjVtbl *lpIHTMLEventObjVtbl;
|
||||
LONG ref;
|
||||
} HTMLEventObj;
|
||||
|
@ -93,12 +94,11 @@ static HRESULT WINAPI HTMLEventObj_QueryInterface(IHTMLEventObj *iface, REFIID r
|
|||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = HTMLEVENTOBJ(This);
|
||||
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
||||
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
||||
*ppv = HTMLEVENTOBJ(This);
|
||||
}else if(IsEqualGUID(&IID_IHTMLEventObj, riid)) {
|
||||
TRACE("(%p)->(IID_IHTMLEventObj %p)\n", This, ppv);
|
||||
*ppv = HTMLEVENTOBJ(This);
|
||||
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
||||
return *ppv ? S_OK : E_NOINTERFACE;
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
|
@ -380,6 +380,18 @@ static const IHTMLEventObjVtbl HTMLEventObjVtbl = {
|
|||
HTMLEventObj_get_srcFilter
|
||||
};
|
||||
|
||||
static const tid_t HTMLEventObj_iface_tids[] = {
|
||||
IHTMLEventObj_tid,
|
||||
0
|
||||
};
|
||||
|
||||
static dispex_static_data_t HTMLEventObj_dispex = {
|
||||
NULL,
|
||||
DispCEventObj_tid,
|
||||
NULL,
|
||||
HTMLEventObj_iface_tids
|
||||
};
|
||||
|
||||
static IHTMLEventObj *create_event(void)
|
||||
{
|
||||
HTMLEventObj *ret;
|
||||
|
@ -388,6 +400,8 @@ static IHTMLEventObj *create_event(void)
|
|||
ret->lpIHTMLEventObjVtbl = &HTMLEventObjVtbl;
|
||||
ret->ref = 1;
|
||||
|
||||
init_dispex(&ret->dispex, (IUnknown*)HTMLEVENTOBJ(ret), &HTMLEventObj_dispex);
|
||||
|
||||
return HTMLEVENTOBJ(ret);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ typedef struct event_target_t event_target_t;
|
|||
/* NOTE: make sure to keep in sync with dispex.c */
|
||||
typedef enum {
|
||||
NULL_tid,
|
||||
DispCEventObj_tid,
|
||||
DispDOMChildrenCollection_tid,
|
||||
DispHTMLBody_tid,
|
||||
DispHTMLCommentElement_tid,
|
||||
|
@ -96,6 +97,7 @@ typedef enum {
|
|||
IHTMLElement3_tid,
|
||||
IHTMLElement4_tid,
|
||||
IHTMLElementCollection_tid,
|
||||
IHTMLEventObj_tid,
|
||||
IHTMLFrameBase2_tid,
|
||||
IHTMLGenericElement_tid,
|
||||
IHTMLImgElement_tid,
|
||||
|
|
Loading…
Reference in New Issue