From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlinput.c | 276 ++-------------------------------------- 1 file changed, 10 insertions(+), 266 deletions(-)
diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 8c7f738a298..c031dbff766 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -53,63 +53,8 @@ static inline HTMLInputElement *impl_from_IHTMLInputTextElement(IHTMLInputTextEl return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputTextElement_iface); }
-static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface, - REFIID riid, void **ppv) -{ - HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - - return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface) -{ - HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - - return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface) -{ - HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - - return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo) -{ - HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - - return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLInputElement_GetTypeInfo(IHTMLInputElement *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - - return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, - ppTInfo); -} - -static HRESULT WINAPI HTMLInputElement_GetIDsOfNames(IHTMLInputElement *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - - return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLInputElement_Invoke(IHTMLInputElement *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - - return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLInputElement, IHTMLInputElement, + impl_from_IHTMLInputElement(iface)->element.node.event_target.dispex)
static HRESULT WINAPI HTMLInputElement_put_type(IHTMLInputElement *iface, BSTR v) { @@ -888,58 +833,8 @@ static const IHTMLInputElementVtbl HTMLInputElementVtbl = { HTMLInputElement_get_start };
-static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement *iface, - REFIID riid, void **ppv) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface); - - return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface); - - return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface); - - return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface); - return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface); - return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, - ppTInfo); -} - -static HRESULT WINAPI HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface); - return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLInputTextElement_Invoke(IHTMLInputTextElement *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface); - return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLInputTextElement, IHTMLInputTextElement, + impl_from_IHTMLInputTextElement(iface)->element.node.event_target.dispex)
static HRESULT WINAPI HTMLInputTextElement_get_type(IHTMLInputTextElement *iface, BSTR *p) { @@ -1192,53 +1087,8 @@ static inline HTMLInputElement *impl_from_IHTMLInputTextElement2(IHTMLInputTextE return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputTextElement2_iface); }
-static HRESULT WINAPI HTMLInputTextElement2_QueryInterface(IHTMLInputTextElement2 *iface, REFIID riid, void **ppv) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLInputTextElement2_AddRef(IHTMLInputTextElement2 *iface) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLInputTextElement2_Release(IHTMLInputTextElement2 *iface) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLInputTextElement2_GetTypeInfoCount(IHTMLInputTextElement2 *iface, UINT *pctinfo) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLInputTextElement2_GetTypeInfo(IHTMLInputTextElement2 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLInputTextElement2_GetIDsOfNames(IHTMLInputTextElement2 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLInputTextElement2_Invoke(IHTMLInputTextElement2 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLInputTextElement2, IHTMLInputTextElement2, + impl_from_IHTMLInputTextElement2(iface)->element.node.event_target.dispex)
static HRESULT WINAPI HTMLInputTextElement2_put_selectionStart(IHTMLInputTextElement2 *iface, LONG v) { @@ -1480,61 +1330,8 @@ static inline HTMLLabelElement *impl_from_IHTMLLabelElement(IHTMLLabelElement *i return CONTAINING_RECORD(iface, HTMLLabelElement, IHTMLLabelElement_iface); }
-static HRESULT WINAPI HTMLLabelElement_QueryInterface(IHTMLLabelElement *iface, - REFIID riid, void **ppv) -{ - HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface); - - return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLLabelElement_AddRef(IHTMLLabelElement *iface) -{ - HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface); - - return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLLabelElement_Release(IHTMLLabelElement *iface) -{ - HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface); - - return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLLabelElement_GetTypeInfoCount(IHTMLLabelElement *iface, UINT *pctinfo) -{ - HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface); - - return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLLabelElement_GetTypeInfo(IHTMLLabelElement *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface); - - return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLLabelElement_GetIDsOfNames(IHTMLLabelElement *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface); - - return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLLabelElement_Invoke(IHTMLLabelElement *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface); - - return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLLabelElement, IHTMLLabelElement, + impl_from_IHTMLLabelElement(iface)->element.node.event_target.dispex)
static HRESULT WINAPI HTMLLabelElement_put_htmlFor(IHTMLLabelElement *iface, BSTR v) { @@ -1671,61 +1468,8 @@ static inline HTMLButtonElement *impl_from_IHTMLButtonElement(IHTMLButtonElement return CONTAINING_RECORD(iface, HTMLButtonElement, IHTMLButtonElement_iface); }
-static HRESULT WINAPI HTMLButtonElement_QueryInterface(IHTMLButtonElement *iface, - REFIID riid, void **ppv) -{ - HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - - return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); -} - -static ULONG WINAPI HTMLButtonElement_AddRef(IHTMLButtonElement *iface) -{ - HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - - return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); -} - -static ULONG WINAPI HTMLButtonElement_Release(IHTMLButtonElement *iface) -{ - HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - - return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); -} - -static HRESULT WINAPI HTMLButtonElement_GetTypeInfoCount(IHTMLButtonElement *iface, UINT *pctinfo) -{ - HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - - return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); -} - -static HRESULT WINAPI HTMLButtonElement_GetTypeInfo(IHTMLButtonElement *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - - return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); -} - -static HRESULT WINAPI HTMLButtonElement_GetIDsOfNames(IHTMLButtonElement *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) -{ - HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - - return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, - cNames, lcid, rgDispId); -} - -static HRESULT WINAPI HTMLButtonElement_Invoke(IHTMLButtonElement *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - - return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); -} +DISPEX_IDISPATCH_IMPL(HTMLButtonElement, IHTMLButtonElement, + impl_from_IHTMLButtonElement(iface)->element.node.event_target.dispex)
static HRESULT WINAPI HTMLButtonElement_get_type(IHTMLButtonElement *iface, BSTR *p) {