Jacek Caban : mshtml: Added IHTMLInputTextElement2 stub implementation.

Alexandre Julliard julliard at winehq.org
Thu Jun 15 15:34:20 CDT 2017


Module: wine
Branch: master
Commit: 0fed758ef022d4b96dfff4d6f18dc3512a1c45c7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0fed758ef022d4b96dfff4d6f18dc3512a1c45c7

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Jun 15 14:55:11 2017 +0200

mshtml: Added IHTMLInputTextElement2 stub implementation.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/htmlinput.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 108 insertions(+)

diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c
index 8271bf4..c89dad6 100644
--- a/dlls/mshtml/htmlinput.c
+++ b/dlls/mshtml/htmlinput.c
@@ -39,6 +39,7 @@ struct HTMLInputElement {
 
     IHTMLInputElement IHTMLInputElement_iface;
     IHTMLInputTextElement IHTMLInputTextElement_iface;
+    IHTMLInputTextElement2 IHTMLInputTextElement2_iface;
 
     nsIDOMHTMLInputElement *nsinput;
 };
@@ -1206,6 +1207,109 @@ static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl = {
     HTMLInputTextElement_createTextRange
 };
 
+static inline HTMLInputElement *impl_from_IHTMLInputTextElement2(IHTMLInputTextElement2 *iface)
+{
+    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);
+}
+
+static HRESULT WINAPI HTMLInputTextElement2_put_selectionStart(IHTMLInputTextElement2 *iface, LONG v)
+{
+    HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
+    FIXME("(%p)->(%d)\n", This, v);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLInputTextElement2_get_selectionStart(IHTMLInputTextElement2 *iface, LONG *p)
+{
+    HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
+    FIXME("(%p)->(%p)\n", This, p);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLInputTextElement2_put_selectionEnd(IHTMLInputTextElement2 *iface, LONG v)
+{
+    HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
+    FIXME("(%p)->(%d)\n", This, v);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLInputTextElement2_get_selectionEnd(IHTMLInputTextElement2 *iface, LONG *p)
+{
+    HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
+    FIXME("(%p)->(%p)\n", This, p);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLInputTextElement2_setSelectionRange(IHTMLInputTextElement2 *iface, LONG start, LONG end)
+{
+    HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
+    FIXME("(%p)->(%d %d)\n", This, start, end);
+    return E_NOTIMPL;
+}
+
+static const IHTMLInputTextElement2Vtbl HTMLInputTextElement2Vtbl = {
+    HTMLInputTextElement2_QueryInterface,
+    HTMLInputTextElement2_AddRef,
+    HTMLInputTextElement2_Release,
+    HTMLInputTextElement2_GetTypeInfoCount,
+    HTMLInputTextElement2_GetTypeInfo,
+    HTMLInputTextElement2_GetIDsOfNames,
+    HTMLInputTextElement2_Invoke,
+    HTMLInputTextElement2_put_selectionStart,
+    HTMLInputTextElement2_get_selectionStart,
+    HTMLInputTextElement2_put_selectionEnd,
+    HTMLInputTextElement2_get_selectionEnd,
+    HTMLInputTextElement2_setSelectionRange
+};
+
 static inline HTMLInputElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
 {
     return CONTAINING_RECORD(iface, HTMLInputElement, element.node);
@@ -1229,6 +1333,9 @@ static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
     }else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) {
         TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv);
         *ppv = &This->IHTMLInputTextElement_iface;
+    }else if(IsEqualGUID(&IID_IHTMLInputTextElement2, riid)) {
+        TRACE("(%p)->(IID_IHTMLInputTextElement2 %p)\n", This, ppv);
+        *ppv = &This->IHTMLInputTextElement2_iface;
     }
 
     if(*ppv) {
@@ -1361,6 +1468,7 @@ HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem
 
     ret->IHTMLInputElement_iface.lpVtbl = &HTMLInputElementVtbl;
     ret->IHTMLInputTextElement_iface.lpVtbl = &HTMLInputTextElementVtbl;
+    ret->IHTMLInputTextElement2_iface.lpVtbl = &HTMLInputTextElement2Vtbl;
     ret->element.node.vtbl = &HTMLInputElementImplVtbl;
 
     HTMLElement_Init(&ret->element, doc, nselem, &HTMLInputElement_dispex);




More information about the wine-cvs mailing list