-- v2: mshtml: Use DISPEX_IDISPATCH_IMPL for DocumentType object implementation.
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlanchor.c | 55 ++-------------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-)
diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index efd2fa9b06e..670cd48795d 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -201,59 +201,8 @@ static inline HTMLAnchorElement *impl_from_IHTMLAnchorElement(IHTMLAnchorElement return CONTAINING_RECORD(iface, HTMLAnchorElement, IHTMLAnchorElement_iface); }
-static HRESULT WINAPI HTMLAnchorElement_QueryInterface(IHTMLAnchorElement *iface, - REFIID riid, void **ppv) -{ - HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - - return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLAnchorElement_AddRef(IHTMLAnchorElement *iface) -{ - HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - - return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface) -{ - HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - - return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo) -{ - HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLAnchorElement_GetTypeInfo(IHTMLAnchorElement *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, - ppTInfo); -} - -static HRESULT WINAPI HTMLAnchorElement_GetIDsOfNames(IHTMLAnchorElement *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLAnchorElement_Invoke(IHTMLAnchorElement *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLAnchorElement, IHTMLAnchorElement, + impl_from_IHTMLAnchorElement(iface)->element.node.event_target.dispex)
static HRESULT WINAPI HTMLAnchorElement_put_href(IHTMLAnchorElement *iface, BSTR v) {
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlarea.c | 54 ++---------------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-)
diff --git a/dlls/mshtml/htmlarea.c b/dlls/mshtml/htmlarea.c index 96c5ba9322f..f00c621adc2 100644 --- a/dlls/mshtml/htmlarea.c +++ b/dlls/mshtml/htmlarea.c @@ -45,58 +45,8 @@ static inline HTMLAreaElement *impl_from_IHTMLAreaElement(IHTMLAreaElement *ifac return CONTAINING_RECORD(iface, HTMLAreaElement, IHTMLAreaElement_iface); }
-static HRESULT WINAPI HTMLAreaElement_QueryInterface(IHTMLAreaElement *iface, REFIID riid, void **ppv) -{ - HTMLAreaElement *This = impl_from_IHTMLAreaElement(iface); - - return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLAreaElement_AddRef(IHTMLAreaElement *iface) -{ - HTMLAreaElement *This = impl_from_IHTMLAreaElement(iface); - - return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLAreaElement_Release(IHTMLAreaElement *iface) -{ - HTMLAreaElement *This = impl_from_IHTMLAreaElement(iface); - - return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLAreaElement_GetTypeInfoCount(IHTMLAreaElement *iface, UINT *pctinfo) -{ - HTMLAreaElement *This = impl_from_IHTMLAreaElement(iface); - return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLAreaElement_GetTypeInfo(IHTMLAreaElement *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLAreaElement *This = impl_from_IHTMLAreaElement(iface); - return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, - ppTInfo); -} - -static HRESULT WINAPI HTMLAreaElement_GetIDsOfNames(IHTMLAreaElement *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - HTMLAreaElement *This = impl_from_IHTMLAreaElement(iface); - return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLAreaElement_Invoke(IHTMLAreaElement *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLAreaElement *This = impl_from_IHTMLAreaElement(iface); - return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLAreaElement, IHTMLAreaElement, + impl_from_IHTMLAreaElement(iface)->element.node.event_target.dispex)
static HRESULT WINAPI HTMLAreaElement_put_shape(IHTMLAreaElement *iface, BSTR v) {
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlattr.c | 98 +----------------------------------------- 1 file changed, 2 insertions(+), 96 deletions(-)
diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index cbd847038d6..8a652619b59 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -37,55 +37,7 @@ static inline HTMLDOMAttribute *impl_from_IHTMLDOMAttribute(IHTMLDOMAttribute *i return CONTAINING_RECORD(iface, HTMLDOMAttribute, IHTMLDOMAttribute_iface); }
-static HRESULT WINAPI HTMLDOMAttribute_QueryInterface(IHTMLDOMAttribute *iface, - REFIID riid, void **ppv) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface); - return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv); -} - -static ULONG WINAPI HTMLDOMAttribute_AddRef(IHTMLDOMAttribute *iface) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface); - return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface); -} - -static ULONG WINAPI HTMLDOMAttribute_Release(IHTMLDOMAttribute *iface) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface); - return IDispatchEx_Release(&This->dispex.IDispatchEx_iface); -} - -static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfoCount(IHTMLDOMAttribute *iface, UINT *pctinfo) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface); - return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfo(IHTMLDOMAttribute *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface); - return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLDOMAttribute_GetIDsOfNames(IHTMLDOMAttribute *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface); - return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, - lcid, rgDispId); -} - -static HRESULT WINAPI HTMLDOMAttribute_Invoke(IHTMLDOMAttribute *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface); - return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLDOMAttribute, IHTMLDOMAttribute, impl_from_IHTMLDOMAttribute(iface)->dispex)
static HRESULT WINAPI HTMLDOMAttribute_get_nodeName(IHTMLDOMAttribute *iface, BSTR *p) { @@ -200,53 +152,7 @@ static inline HTMLDOMAttribute *impl_from_IHTMLDOMAttribute2(IHTMLDOMAttribute2 return CONTAINING_RECORD(iface, HTMLDOMAttribute, IHTMLDOMAttribute2_iface); }
-static HRESULT WINAPI HTMLDOMAttribute2_QueryInterface(IHTMLDOMAttribute2 *iface, REFIID riid, void **ppv) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - return IHTMLDOMAttribute_QueryInterface(&This->IHTMLDOMAttribute_iface, riid, ppv); -} - -static ULONG WINAPI HTMLDOMAttribute2_AddRef(IHTMLDOMAttribute2 *iface) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - return IHTMLDOMAttribute_AddRef(&This->IHTMLDOMAttribute_iface); -} - -static ULONG WINAPI HTMLDOMAttribute2_Release(IHTMLDOMAttribute2 *iface) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - return IHTMLDOMAttribute_Release(&This->IHTMLDOMAttribute_iface); -} - -static HRESULT WINAPI HTMLDOMAttribute2_GetTypeInfoCount(IHTMLDOMAttribute2 *iface, UINT *pctinfo) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLDOMAttribute2_GetTypeInfo(IHTMLDOMAttribute2 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLDOMAttribute2_GetIDsOfNames(IHTMLDOMAttribute2 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, - lcid, rgDispId); -} - -static HRESULT WINAPI HTMLDOMAttribute2_Invoke(IHTMLDOMAttribute2 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLDOMAttribute2, IHTMLDOMAttribute2, impl_from_IHTMLDOMAttribute2(iface)->dispex)
static HRESULT WINAPI HTMLDOMAttribute2_get_name(IHTMLDOMAttribute2 *iface, BSTR *p) {
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlcomment.c | 55 ++------------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-)
diff --git a/dlls/mshtml/htmlcomment.c b/dlls/mshtml/htmlcomment.c index 398e59cc04f..a96915a58cc 100644 --- a/dlls/mshtml/htmlcomment.c +++ b/dlls/mshtml/htmlcomment.c @@ -43,59 +43,8 @@ static inline HTMLCommentElement *impl_from_IHTMLCommentElement(IHTMLCommentElem return CONTAINING_RECORD(iface, HTMLCommentElement, IHTMLCommentElement_iface); }
-static HRESULT WINAPI HTMLCommentElement_QueryInterface(IHTMLCommentElement *iface, - REFIID riid, void **ppv) -{ - HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface); - - return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLCommentElement_AddRef(IHTMLCommentElement *iface) -{ - HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface); - - return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLCommentElement_Release(IHTMLCommentElement *iface) -{ - HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface); - - return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLCommentElement_GetTypeInfoCount(IHTMLCommentElement *iface, UINT *pctinfo) -{ - HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface); - return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLCommentElement_GetTypeInfo(IHTMLCommentElement *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface); - return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, - ppTInfo); -} - -static HRESULT WINAPI HTMLCommentElement_GetIDsOfNames(IHTMLCommentElement *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface); - return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLCommentElement_Invoke(IHTMLCommentElement *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface); - return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLCommentElement, IHTMLCommentElement, + impl_from_IHTMLCommentElement(iface)->element.node.event_target.dispex)
static HRESULT WINAPI HTMLCommentElement_put_text(IHTMLCommentElement *iface, BSTR v) {
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlcurstyle.c | 208 ++----------------------------------- 1 file changed, 8 insertions(+), 200 deletions(-)
diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 29543eb4a18..7d87d965469 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -72,56 +72,8 @@ static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle4_iface); }
-static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, REFIID riid, void **ppv) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); - TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv); - return IHTMLCSSStyleDeclaration_QueryInterface(&This->css_style.IHTMLCSSStyleDeclaration_iface, riid, ppv); -} - -static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); - TRACE("(%p)\n", This); - return IHTMLCSSStyleDeclaration_AddRef(&This->css_style.IHTMLCSSStyleDeclaration_iface); -} - -static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); - TRACE("(%p)\n", This); - return IHTMLCSSStyleDeclaration_Release(&This->css_style.IHTMLCSSStyleDeclaration_iface); -} - -static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle *iface, UINT *pctinfo) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); - return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); - return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); - return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames, - lcid, rgDispId); -} - -static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); - return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLCurrentStyle, IHTMLCurrentStyle, + impl_from_IHTMLCurrentStyle(iface)->css_style.dispex)
static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p) { @@ -872,56 +824,8 @@ static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = { HTMLCurrentStyle_get_textTransform };
-/* IHTMLCurrentStyle2 */ -static HRESULT WINAPI HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2 *iface, REFIID riid, void **ppv) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface); - - return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv); -} - -static ULONG WINAPI HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2 *iface) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface); - - return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface); -} - -static ULONG WINAPI HTMLCurrentStyle2_Release(IHTMLCurrentStyle2 *iface) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface); - return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface); -} - -static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2 *iface, UINT *pctinfo) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface); - return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface); - return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface); - return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames, - lcid, rgDispId); -} - -static HRESULT WINAPI HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface); - return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLCurrentStyle2, IHTMLCurrentStyle2, + impl_from_IHTMLCurrentStyle2(iface)->css_style.dispex)
static HRESULT WINAPI HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2 *iface, BSTR *p) { @@ -1090,56 +994,8 @@ static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl = { HTMLCurrentStyle2_get_isBlock };
-/* IHTMLCurrentStyle3 */ -static HRESULT WINAPI HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3 *iface, REFIID riid, void **ppv) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface); - - return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv); -} - -static ULONG WINAPI HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3 *iface) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface); - - return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface); -} - -static ULONG WINAPI HTMLCurrentStyle3_Release(IHTMLCurrentStyle3 *iface) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface); - return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface); -} - -static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3 *iface, UINT *pctinfo) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface); - return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface); - return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface); - return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames, - lcid, rgDispId); -} - -static HRESULT WINAPI HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface); - return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLCurrentStyle3, IHTMLCurrentStyle3, + impl_from_IHTMLCurrentStyle3(iface)->css_style.dispex)
static HRESULT WINAPI HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3 *iface, BSTR *p) { @@ -1185,56 +1041,8 @@ static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl = { HTMLCurrentStyle3_get_whiteSpace };
-/* IHTMLCurrentStyle4 */ -static HRESULT WINAPI HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4 *iface, REFIID riid, void **ppv) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface); - - return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv); -} - -static ULONG WINAPI HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4 *iface) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface); - - return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface); -} - -static ULONG WINAPI HTMLCurrentStyle4_Release(IHTMLCurrentStyle4 *iface) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface); - return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface); -} - -static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4 *iface, UINT *pctinfo) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface); - return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface); - return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface); - return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames, - lcid, rgDispId); -} - -static HRESULT WINAPI HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface); - return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLCurrentStyle4, IHTMLCurrentStyle4, + impl_from_IHTMLCurrentStyle4(iface)->css_style.dispex)
static HRESULT WINAPI HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4 *iface, BSTR *p) {
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmldoc.c | 54 ++----------------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index e16b75675d5..118f4706f37 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -158,58 +158,8 @@ static inline DocumentType *impl_from_IDOMDocumentType(IDOMDocumentType *iface) return CONTAINING_RECORD(iface, DocumentType, IDOMDocumentType_iface); }
-static HRESULT WINAPI DocumentType_QueryInterface(IDOMDocumentType *iface, REFIID riid, void **ppv) -{ - DocumentType *This = impl_from_IDOMDocumentType(iface); - - return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI DocumentType_AddRef(IDOMDocumentType *iface) -{ - DocumentType *This = impl_from_IDOMDocumentType(iface); - - return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI DocumentType_Release(IDOMDocumentType *iface) -{ - DocumentType *This = impl_from_IDOMDocumentType(iface); - - return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI DocumentType_GetTypeInfoCount(IDOMDocumentType *iface, UINT *pctinfo) -{ - DocumentType *This = impl_from_IDOMDocumentType(iface); - - return IDispatchEx_GetTypeInfoCount(&This->node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI DocumentType_GetTypeInfo(IDOMDocumentType *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) -{ - DocumentType *This = impl_from_IDOMDocumentType(iface); - - return IDispatchEx_GetTypeInfo(&This->node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI DocumentType_GetIDsOfNames(IDOMDocumentType *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - DocumentType *This = impl_from_IDOMDocumentType(iface); - - return IDispatchEx_GetIDsOfNames(&This->node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI DocumentType_Invoke(IDOMDocumentType *iface, DISPID dispIdMember, REFIID riid, LCID lcid, - WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - DocumentType *This = impl_from_IDOMDocumentType(iface); - - return IDispatchEx_Invoke(&This->node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(DocumentType, IDOMDocumentType, + impl_from_IDOMDocumentType(iface)->node.event_target.dispex)
static HRESULT WINAPI DocumentType_get_name(IDOMDocumentType *iface, BSTR *p) {