user: Added fast A->W mapping for EM_GETLINE.
[wine] / dlls / mshtml / htmltextcont.c
1 /*
2  * Copyright 2006 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #include "config.h"
20
21 #include <stdarg.h>
22 #include <stdio.h>
23
24 #define COBJMACROS
25
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
30
31 #include "wine/debug.h"
32
33 #include "mshtml_private.h"
34
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
36
37 #define HTMLTEXTCONT_THIS(iface) DEFINE_THIS(HTMLTextContainer, HTMLTextContainer, iface)
38
39 static HRESULT WINAPI HTMLTextContainer_QueryInterface(IHTMLTextContainer *iface,
40                                                        REFIID riid, void **ppv)
41 {
42     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
43     return IUnknown_QueryInterface(This->impl, riid, ppv);
44 }
45
46 static ULONG WINAPI HTMLTextContainer_AddRef(IHTMLTextContainer *iface)
47 {
48     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
49     return IUnknown_AddRef(This->impl);
50 }
51
52 static ULONG WINAPI HTMLTextContainer_Release(IHTMLTextContainer *iface)
53 {
54     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
55     return IUnknown_Release(This->impl);
56 }
57
58 static HRESULT WINAPI HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer *iface, UINT *pctinfo)
59 {
60     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
61     FIXME("(%p)->(%p)\n", This, pctinfo);
62     return E_NOTIMPL;
63 }
64
65 static HRESULT WINAPI HTMLTextContainer_GetTypeInfo(IHTMLTextContainer *iface, UINT iTInfo,
66                                               LCID lcid, ITypeInfo **ppTInfo)
67 {
68     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
69     FIXME("(%p)->(%u %lu %p)\n", This, iTInfo, lcid, ppTInfo);
70     return E_NOTIMPL;
71 }
72
73 static HRESULT WINAPI HTMLTextContainer_GetIDsOfNames(IHTMLTextContainer *iface, REFIID riid,
74                                                 LPOLESTR *rgszNames, UINT cNames,
75                                                 LCID lcid, DISPID *rgDispId)
76 {
77     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
78     FIXME("(%p)->(%s %p %u %lu %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
79                                         lcid, rgDispId);
80     return E_NOTIMPL;
81 }
82
83 static HRESULT WINAPI HTMLTextContainer_Invoke(IHTMLTextContainer *iface, DISPID dispIdMember,
84                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
85                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
86 {
87     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
88     FIXME("(%p)->(%ld %s %ld %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
89             lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
90     return E_NOTIMPL;
91 }
92
93 static HRESULT WINAPI HTMLTextContainer_createControlRange(IHTMLTextContainer *iface,
94                                                            IDispatch **range)
95 {
96     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
97     FIXME("(%p)->(%p)\n", This, range);
98     return E_NOTIMPL;
99 }
100
101 static HRESULT WINAPI HTMLTextContainer_get_scrollHeight(IHTMLTextContainer *iface, long *p)
102 {
103     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
104     FIXME("(%p)->(%p)\n", This, p);
105     return E_NOTIMPL;
106 }
107
108 static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *iface, long *p)
109 {
110     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
111     FIXME("(%p)->(%p)\n", This, p);
112     return E_NOTIMPL;
113 }
114
115 static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, long v)
116 {
117     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
118     FIXME("(%p)->(%ld)\n", This, v);
119     return E_NOTIMPL;
120 }
121
122 static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, long *p)
123 {
124     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
125     FIXME("(%p)->(%p)\n", This, p);
126     return E_NOTIMPL;
127 }
128
129 static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, long v)
130 {
131     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
132     FIXME("(%p)->(%ld)\n", This, v);
133     return E_NOTIMPL;
134 }
135
136 static HRESULT WINAPI HTMLTextContainer_get_scrollLeft(IHTMLTextContainer *iface, long *p)
137 {
138     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
139     FIXME("(%p)->(%p)\n", This, p);
140     return E_NOTIMPL;
141 }
142
143 static HRESULT WINAPI HTMLTextContainer_put_onscroll(IHTMLTextContainer *iface, VARIANT v)
144 {
145     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
146     FIXME("(%p)->()\n", This);
147     return E_NOTIMPL;
148 }
149
150 static HRESULT WINAPI HTMLTextContainer_get_onscroll(IHTMLTextContainer *iface, VARIANT *p)
151 {
152     HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
153     FIXME("(%p)->(%p)\n", This, p);
154     return E_NOTIMPL;
155 }
156
157 #undef HTMLTEXTCONT_THIS
158
159 static const IHTMLTextContainerVtbl HTMLTextContainerVtbl = {
160     HTMLTextContainer_QueryInterface,
161     HTMLTextContainer_AddRef,
162     HTMLTextContainer_Release,
163     HTMLTextContainer_GetTypeInfoCount,
164     HTMLTextContainer_GetTypeInfo,
165     HTMLTextContainer_GetIDsOfNames,
166     HTMLTextContainer_Invoke,
167     HTMLTextContainer_createControlRange,
168     HTMLTextContainer_get_scrollHeight,
169     HTMLTextContainer_get_scrollWidth,
170     HTMLTextContainer_put_scrollTop,
171     HTMLTextContainer_get_scrollTop,
172     HTMLTextContainer_put_scrollLeft,
173     HTMLTextContainer_get_scrollLeft,
174     HTMLTextContainer_put_onscroll,
175     HTMLTextContainer_get_onscroll
176 };
177
178 void HTMLTextContainer_Init(HTMLTextContainer *This, IUnknown *impl)
179 {
180     This->lpHTMLTextContainerVtbl = &HTMLTextContainerVtbl;
181     This->impl = impl;
182 }