Module: wine Branch: master Commit: 2ffe440b3453a93506ef9b25cd2516d35f3762d7 URL: https://gitlab.winehq.org/wine/wine/-/commit/2ffe440b3453a93506ef9b25cd2516d...
Author: Jacek Caban jacek@codeweavers.com Date: Thu May 16 15:42:31 2024 +0200
mshtml: Use DISPEX_IDISPATCH_IMPL macro in htmlimg.c.
---
dlls/mshtml/htmlimg.c | 106 ++------------------------------------------------ 1 file changed, 4 insertions(+), 102 deletions(-)
diff --git a/dlls/mshtml/htmlimg.c b/dlls/mshtml/htmlimg.c index f037578e5d4..84eef1ad5ea 100644 --- a/dlls/mshtml/htmlimg.c +++ b/dlls/mshtml/htmlimg.c @@ -46,58 +46,8 @@ static inline HTMLImg *impl_from_IHTMLImgElement(IHTMLImgElement *iface) return CONTAINING_RECORD(iface, HTMLImg, IHTMLImgElement_iface); }
-static HRESULT WINAPI HTMLImgElement_QueryInterface(IHTMLImgElement *iface, REFIID riid, void **ppv) -{ - HTMLImg *This = impl_from_IHTMLImgElement(iface); - - return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLImgElement_AddRef(IHTMLImgElement *iface) -{ - HTMLImg *This = impl_from_IHTMLImgElement(iface); - - return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLImgElement_Release(IHTMLImgElement *iface) -{ - HTMLImg *This = impl_from_IHTMLImgElement(iface); - - return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLImgElement_GetTypeInfoCount(IHTMLImgElement *iface, UINT *pctinfo) -{ - HTMLImg *This = impl_from_IHTMLImgElement(iface); - return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLImgElement_GetTypeInfo(IHTMLImgElement *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLImg *This = impl_from_IHTMLImgElement(iface); - return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, - ppTInfo); -} - -static HRESULT WINAPI HTMLImgElement_GetIDsOfNames(IHTMLImgElement *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - HTMLImg *This = impl_from_IHTMLImgElement(iface); - return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLImgElement_Invoke(IHTMLImgElement *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLImg *This = impl_from_IHTMLImgElement(iface); - return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLImgElement, IHTMLImgElement, + impl_from_IHTMLImgElement(iface)->element.node.event_target.dispex)
static HRESULT WINAPI HTMLImgElement_put_isMap(IHTMLImgElement *iface, VARIANT_BOOL v) { @@ -767,56 +717,8 @@ static inline HTMLImageElementFactory *impl_from_IHTMLImageElementFactory(IHTMLI return CONTAINING_RECORD(iface, HTMLImageElementFactory, IHTMLImageElementFactory_iface); }
-static HRESULT WINAPI HTMLImageElementFactory_QueryInterface(IHTMLImageElementFactory *iface, - REFIID riid, void **ppv) -{ - HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface); - return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv); -} - -static ULONG WINAPI HTMLImageElementFactory_AddRef(IHTMLImageElementFactory *iface) -{ - HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface); - return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface); -} - -static ULONG WINAPI HTMLImageElementFactory_Release(IHTMLImageElementFactory *iface) -{ - HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface); - return IDispatchEx_Release(&This->dispex.IDispatchEx_iface); -} - -static HRESULT WINAPI HTMLImageElementFactory_GetTypeInfoCount(IHTMLImageElementFactory *iface, - UINT *pctinfo) -{ - HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface); - return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLImageElementFactory_GetTypeInfo(IHTMLImageElementFactory *iface, - UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface); - return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLImageElementFactory_GetIDsOfNames(IHTMLImageElementFactory *iface, - REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, - DISPID *rgDispId) -{ - HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface); - return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLImageElementFactory_Invoke(IHTMLImageElementFactory *iface, - DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, - DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, - UINT *puArgErr) -{ - HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface); - return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLImageElementFactory, IHTMLImageElementFactory, + impl_from_IHTMLImageElementFactory(iface)->dispex)
static LONG var_to_size(const VARIANT *v) {