From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmldoc.c | 499 ++---------------------------------------- 1 file changed, 20 insertions(+), 479 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 8575ff69dcf..9666f7821af 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -355,59 +355,8 @@ static inline HTMLDocumentNode *impl_from_IHTMLDocument2(IHTMLDocument2 *iface) return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument2_iface); }
-static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); - - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLDocument_AddRef(IHTMLDocument2 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); - - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); - - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLDocument_GetTypeInfoCount(IHTMLDocument2 *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); - - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLDocument_GetTypeInfo(IHTMLDocument2 *iface, UINT iTInfo, LCID lcid, - ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); - - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLDocument_GetIDsOfNames(IHTMLDocument2 *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); - - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, - rgDispId); -} - -static HRESULT WINAPI HTMLDocument_Invoke(IHTMLDocument2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, - WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); - - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLDocument, IHTMLDocument2, + impl_from_IHTMLDocument2(iface)->node.event_target.dispex)
static HRESULT WINAPI HTMLDocument_get_Script(IHTMLDocument2 *iface, IDispatch **p) { @@ -2214,51 +2163,8 @@ static inline HTMLDocumentNode *impl_from_IHTMLDocument3(IHTMLDocument3 *iface) return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument3_iface); }
-static HRESULT WINAPI HTMLDocument3_QueryInterface(IHTMLDocument3 *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument3(iface); - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLDocument3_AddRef(IHTMLDocument3 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument3(iface); - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLDocument3_Release(IHTMLDocument3 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument3(iface); - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLDocument3_GetTypeInfoCount(IHTMLDocument3 *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument3(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLDocument3_GetTypeInfo(IHTMLDocument3 *iface, UINT iTInfo, LCID lcid, - ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument3(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLDocument3_GetIDsOfNames(IHTMLDocument3 *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument3(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLDocument3_Invoke(IHTMLDocument3 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, - WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument3(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLDocument3, IHTMLDocument3, + impl_from_IHTMLDocument3(iface)->node.event_target.dispex)
static HRESULT WINAPI HTMLDocument3_releaseCapture(IHTMLDocument3 *iface) { @@ -2834,51 +2740,8 @@ static inline HTMLDocumentNode *impl_from_IHTMLDocument4(IHTMLDocument4 *iface) return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument4_iface); }
-static HRESULT WINAPI HTMLDocument4_QueryInterface(IHTMLDocument4 *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument4(iface); - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLDocument4_AddRef(IHTMLDocument4 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument4(iface); - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLDocument4_Release(IHTMLDocument4 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument4(iface); - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLDocument4_GetTypeInfoCount(IHTMLDocument4 *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument4(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLDocument4_GetTypeInfo(IHTMLDocument4 *iface, UINT iTInfo, LCID lcid, - ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument4(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLDocument4_GetIDsOfNames(IHTMLDocument4 *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument4(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLDocument4_Invoke(IHTMLDocument4 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, - WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument4(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLDocument4, IHTMLDocument4, + impl_from_IHTMLDocument4(iface)->node.event_target.dispex)
static HRESULT WINAPI HTMLDocument4_focus(IHTMLDocument4 *iface) { @@ -3072,51 +2935,8 @@ static inline HTMLDocumentNode *impl_from_IHTMLDocument5(IHTMLDocument5 *iface) return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument5_iface); }
-static HRESULT WINAPI HTMLDocument5_QueryInterface(IHTMLDocument5 *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument5(iface); - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLDocument5_AddRef(IHTMLDocument5 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument5(iface); - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLDocument5_Release(IHTMLDocument5 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument5(iface); - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLDocument5_GetTypeInfoCount(IHTMLDocument5 *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument5(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLDocument5_GetTypeInfo(IHTMLDocument5 *iface, UINT iTInfo, LCID lcid, - ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument5(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLDocument5_GetIDsOfNames(IHTMLDocument5 *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument5(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLDocument5_Invoke(IHTMLDocument5 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, - WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument5(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLDocument5, IHTMLDocument5, + impl_from_IHTMLDocument5(iface)->node.event_target.dispex)
static HRESULT WINAPI HTMLDocument5_put_onmousewheel(IHTMLDocument5 *iface, VARIANT v) { @@ -3373,51 +3193,8 @@ static inline HTMLDocumentNode *impl_from_IHTMLDocument6(IHTMLDocument6 *iface) return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument6_iface); }
-static HRESULT WINAPI HTMLDocument6_QueryInterface(IHTMLDocument6 *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument6(iface); - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLDocument6_AddRef(IHTMLDocument6 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument6(iface); - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLDocument6_Release(IHTMLDocument6 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument6(iface); - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLDocument6_GetTypeInfoCount(IHTMLDocument6 *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument6(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLDocument6_GetTypeInfo(IHTMLDocument6 *iface, UINT iTInfo, LCID lcid, - ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument6(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLDocument6_GetIDsOfNames(IHTMLDocument6 *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument6(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLDocument6_Invoke(IHTMLDocument6 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, - WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument6(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLDocument6, IHTMLDocument6, + impl_from_IHTMLDocument6(iface)->node.event_target.dispex)
static HRESULT WINAPI HTMLDocument6_get_compatible(IHTMLDocument6 *iface, IHTMLDocumentCompatibleInfoCollection **p) @@ -3550,51 +3327,8 @@ static inline HTMLDocumentNode *impl_from_IHTMLDocument7(IHTMLDocument7 *iface) return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument7_iface); }
-static HRESULT WINAPI HTMLDocument7_QueryInterface(IHTMLDocument7 *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument7(iface); - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLDocument7_AddRef(IHTMLDocument7 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument7(iface); - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLDocument7_Release(IHTMLDocument7 *iface) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument7(iface); - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLDocument7_GetTypeInfoCount(IHTMLDocument7 *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument7(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLDocument7_GetTypeInfo(IHTMLDocument7 *iface, UINT iTInfo, LCID lcid, - ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument7(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLDocument7_GetIDsOfNames(IHTMLDocument7 *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument7(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLDocument7_Invoke(IHTMLDocument7 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, - WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IHTMLDocument7(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLDocument7, IHTMLDocument7, + impl_from_IHTMLDocument7(iface)->node.event_target.dispex)
static HRESULT WINAPI HTMLDocument7_get_defaultView(IHTMLDocument7 *iface, IHTMLWindow2 **p) { @@ -4638,52 +4372,8 @@ static inline HTMLDocumentNode *impl_from_IDocumentSelector(IDocumentSelector *i return CONTAINING_RECORD(iface, HTMLDocumentNode, IDocumentSelector_iface); }
-static HRESULT WINAPI DocumentSelector_QueryInterface(IDocumentSelector *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IDocumentSelector(iface); - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI DocumentSelector_AddRef(IDocumentSelector *iface) -{ - HTMLDocumentNode *This = impl_from_IDocumentSelector(iface); - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI DocumentSelector_Release(IDocumentSelector *iface) -{ - HTMLDocumentNode *This = impl_from_IDocumentSelector(iface); - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI DocumentSelector_GetTypeInfoCount(IDocumentSelector *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IDocumentSelector(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI DocumentSelector_GetTypeInfo(IDocumentSelector *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IDocumentSelector(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI DocumentSelector_GetIDsOfNames(IDocumentSelector *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IDocumentSelector(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, - rgDispId); -} - -static HRESULT WINAPI DocumentSelector_Invoke(IDocumentSelector *iface, DISPID dispIdMember, REFIID riid, - LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IDocumentSelector(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(DocumentSelector, IDocumentSelector, + impl_from_IDocumentSelector(iface)->node.event_target.dispex)
static HRESULT WINAPI DocumentSelector_querySelector(IDocumentSelector *iface, BSTR v, IHTMLElement **pel) { @@ -4780,52 +4470,8 @@ static inline HTMLDocumentNode *impl_from_IDocumentEvent(IDocumentEvent *iface) return CONTAINING_RECORD(iface, HTMLDocumentNode, IDocumentEvent_iface); }
-static HRESULT WINAPI DocumentEvent_QueryInterface(IDocumentEvent *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IDocumentEvent(iface); - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI DocumentEvent_AddRef(IDocumentEvent *iface) -{ - HTMLDocumentNode *This = impl_from_IDocumentEvent(iface); - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI DocumentEvent_Release(IDocumentEvent *iface) -{ - HTMLDocumentNode *This = impl_from_IDocumentEvent(iface); - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI DocumentEvent_GetTypeInfoCount(IDocumentEvent *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IDocumentEvent(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI DocumentEvent_GetTypeInfo(IDocumentEvent *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IDocumentEvent(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI DocumentEvent_GetIDsOfNames(IDocumentEvent *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IDocumentEvent(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, - rgDispId); -} - -static HRESULT WINAPI DocumentEvent_Invoke(IDocumentEvent *iface, DISPID dispIdMember, REFIID riid, - LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IDocumentEvent(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(DocumentEvent, IDocumentEvent, + impl_from_IDocumentEvent(iface)->node.event_target.dispex)
static HRESULT WINAPI DocumentEvent_createEvent(IDocumentEvent *iface, BSTR eventType, IDOMEvent **p) { @@ -4996,63 +4642,8 @@ static HRESULT dispid_from_elem_name(HTMLDocumentNode *This, const WCHAR *name, return S_OK; }
-static HRESULT WINAPI DocDispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IDispatchEx(iface); - - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI DocDispatchEx_AddRef(IDispatchEx *iface) -{ - HTMLDocumentNode *This = impl_from_IDispatchEx(iface); - - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI DocDispatchEx_Release(IDispatchEx *iface) -{ - HTMLDocumentNode *This = impl_from_IDispatchEx(iface); - - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI DocDispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IDispatchEx(iface); - - return IDispatchEx_GetTypeInfoCount(&This->node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI DocDispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IDispatchEx(iface); - - return IDispatchEx_GetTypeInfo(&This->node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI DocDispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IDispatchEx(iface); - - return IDispatchEx_GetIDsOfNames(&This->node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); -} - -static HRESULT WINAPI DocDispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IDispatchEx(iface); - - TRACE("(%p)->(%ld %s %ld %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - - return IDispatchEx_InvokeEx(&This->IDispatchEx_iface, dispIdMember, lcid, wFlags, pDispParams, - pVarResult, pExcepInfo, NULL); -} +DISPEX_IDISPATCH_IMPL(DocDispatchEx, IDispatchEx, + impl_from_IDispatchEx(iface)->node.event_target.dispex)
static HRESULT WINAPI DocDispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) { @@ -5548,58 +5139,8 @@ static inline HTMLDocumentNode *impl_from_IDocumentRange(IDocumentRange *iface) return CONTAINING_RECORD(iface, HTMLDocumentNode, IDocumentRange_iface); }
-static HRESULT WINAPI DocumentRange_QueryInterface(IDocumentRange *iface, REFIID riid, void **ppv) -{ - HTMLDocumentNode *This = impl_from_IDocumentRange(iface); - - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI DocumentRange_AddRef(IDocumentRange *iface) -{ - HTMLDocumentNode *This = impl_from_IDocumentRange(iface); - - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI DocumentRange_Release(IDocumentRange *iface) -{ - HTMLDocumentNode *This = impl_from_IDocumentRange(iface); - - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI DocumentRange_GetTypeInfoCount(IDocumentRange *iface, UINT *pctinfo) -{ - HTMLDocumentNode *This = impl_from_IDocumentRange(iface); - - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI DocumentRange_GetTypeInfo(IDocumentRange *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLDocumentNode *This = impl_from_IDocumentRange(iface); - - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI DocumentRange_GetIDsOfNames(IDocumentRange *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - HTMLDocumentNode *This = impl_from_IDocumentRange(iface); - - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, - rgDispId); -} - -static HRESULT WINAPI DocumentRange_Invoke(IDocumentRange *iface, DISPID dispIdMember, REFIID riid, LCID lcid, - WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDocumentNode *This = impl_from_IDocumentRange(iface); - - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(DocumentRange, IDocumentRange, + impl_from_IDocumentRange(iface)->node.event_target.dispex)
static HRESULT WINAPI DocumentRange_createRange(IDocumentRange *iface, IHTMLDOMRange **p) {