wldap32: Fix winldap_private header compatibility with 64-bit.
[wine/wine64.git] / dlls / mshtml / htmldoc5.c
blob34dc4e08b122a98c497df545614462edb5ec557f
1 /*
2 * Copyright 2007 Jacek Caban for CodeWeavers
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.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "config.h"
21 #include <stdarg.h>
22 #include <stdio.h>
24 #define COBJMACROS
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
31 #include "wine/debug.h"
33 #include "mshtml_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 #define HTMLDOC5_THIS(iface) DEFINE_THIS(HTMLDocument, HTMLDocument5, iface)
39 static HRESULT WINAPI HTMLDocument5_QueryInterface(IHTMLDocument5 *iface,
40 REFIID riid, void **ppv)
42 HTMLDocument *This = HTMLDOC5_THIS(iface);
43 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
46 static ULONG WINAPI HTMLDocument5_AddRef(IHTMLDocument5 *iface)
48 HTMLDocument *This = HTMLDOC5_THIS(iface);
49 return IHTMLDocument2_AddRef(HTMLDOC(This));
52 static ULONG WINAPI HTMLDocument5_Release(IHTMLDocument5 *iface)
54 HTMLDocument *This = HTMLDOC5_THIS(iface);
55 return IHTMLDocument2_Release(HTMLDOC(This));
58 static HRESULT WINAPI HTMLDocument5_GetTypeInfoCount(IHTMLDocument5 *iface, UINT *pctinfo)
60 HTMLDocument *This = HTMLDOC5_THIS(iface);
61 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(This), pctinfo);
64 static HRESULT WINAPI HTMLDocument5_GetTypeInfo(IHTMLDocument5 *iface, UINT iTInfo,
65 LCID lcid, ITypeInfo **ppTInfo)
67 HTMLDocument *This = HTMLDOC5_THIS(iface);
68 return IDispatchEx_GetTypeInfo(DISPATCHEX(This), iTInfo, lcid, ppTInfo);
71 static HRESULT WINAPI HTMLDocument5_GetIDsOfNames(IHTMLDocument5 *iface, REFIID riid,
72 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
74 HTMLDocument *This = HTMLDOC5_THIS(iface);
75 return IDispatchEx_GetIDsOfNames(DISPATCHEX(This), riid, rgszNames, cNames, lcid, rgDispId);
78 static HRESULT WINAPI HTMLDocument5_Invoke(IHTMLDocument5 *iface, DISPID dispIdMember,
79 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
80 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
82 HTMLDocument *This = HTMLDOC5_THIS(iface);
83 return IDispatchEx_Invoke(DISPATCHEX(This), dispIdMember, riid, lcid, wFlags, pDispParams,
84 pVarResult, pExcepInfo, puArgErr);
87 static HRESULT WINAPI HTMLDocument5_put_onmousewheel(IHTMLDocument5 *iface, VARIANT v)
89 HTMLDocument *This = HTMLDOC5_THIS(iface);
90 FIXME("(%p)->(v)\n", This);
91 return E_NOTIMPL;
94 static HRESULT WINAPI HTMLDocument5_get_onmousewheel(IHTMLDocument5 *iface, VARIANT *p)
96 HTMLDocument *This = HTMLDOC5_THIS(iface);
97 FIXME("(%p)->(%p)\n", This, p);
98 return E_NOTIMPL;
101 static HRESULT WINAPI HTMLDocument5_get_doctype(IHTMLDocument5 *iface, IHTMLDOMNode **p)
103 HTMLDocument *This = HTMLDOC5_THIS(iface);
104 FIXME("(%p)->(%p)\n", This, p);
105 return E_NOTIMPL;
108 static HRESULT WINAPI HTMLDocument5_get_implementation(IHTMLDocument5 *iface, IHTMLDOMImplementation **p)
110 HTMLDocument *This = HTMLDOC5_THIS(iface);
111 FIXME("(%p)->(%p)\n", This, p);
112 return E_NOTIMPL;
115 static HRESULT WINAPI HTMLDocument5_createAttribute(IHTMLDocument5 *iface, BSTR bstrattrName,
116 IHTMLDOMAttribute **ppattribute)
118 HTMLDocument *This = HTMLDOC5_THIS(iface);
119 FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrattrName), ppattribute);
120 return E_NOTIMPL;
123 static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bstrdata,
124 IHTMLDOMNode **ppRetNode)
126 HTMLDocument *This = HTMLDOC5_THIS(iface);
127 FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrdata), ppRetNode);
128 return E_NOTIMPL;
131 static HRESULT WINAPI HTMLDocument5_put_onfocusin(IHTMLDocument5 *iface, VARIANT v)
133 HTMLDocument *This = HTMLDOC5_THIS(iface);
134 FIXME("(%p)->(v)\n", This);
135 return E_NOTIMPL;
138 static HRESULT WINAPI HTMLDocument5_get_onfocusin(IHTMLDocument5 *iface, VARIANT *p)
140 HTMLDocument *This = HTMLDOC5_THIS(iface);
141 FIXME("(%p)->(%p)\n", This, p);
142 return E_NOTIMPL;
145 static HRESULT WINAPI HTMLDocument5_put_onfocusout(IHTMLDocument5 *iface, VARIANT v)
147 HTMLDocument *This = HTMLDOC5_THIS(iface);
148 FIXME("(%p)->(v)\n", This);
149 return E_NOTIMPL;
152 static HRESULT WINAPI HTMLDocument5_get_onfocusout(IHTMLDocument5 *iface, VARIANT *p)
154 HTMLDocument *This = HTMLDOC5_THIS(iface);
155 FIXME("(%p)->(%p)\n", This, p);
156 return E_NOTIMPL;
159 static HRESULT WINAPI HTMLDocument5_put_onactivate(IHTMLDocument5 *iface, VARIANT v)
161 HTMLDocument *This = HTMLDOC5_THIS(iface);
162 FIXME("(%p)->(v)\n", This);
163 return E_NOTIMPL;
166 static HRESULT WINAPI HTMLDocument5_get_onactivate(IHTMLDocument5 *iface, VARIANT *p)
168 HTMLDocument *This = HTMLDOC5_THIS(iface);
169 FIXME("(%p)->(%p)\n", This, p);
170 return E_NOTIMPL;
173 static HRESULT WINAPI HTMLDocument5_put_ondeactivate(IHTMLDocument5 *iface, VARIANT v)
175 HTMLDocument *This = HTMLDOC5_THIS(iface);
176 FIXME("(%p)->(v)\n", This);
177 return E_NOTIMPL;
180 static HRESULT WINAPI HTMLDocument5_get_ondeactivate(IHTMLDocument5 *iface, VARIANT *p)
182 HTMLDocument *This = HTMLDOC5_THIS(iface);
183 FIXME("(%p)->(%p)\n", This, p);
184 return E_NOTIMPL;
187 static HRESULT WINAPI HTMLDocument5_put_onbeforeactivate(IHTMLDocument5 *iface, VARIANT v)
189 HTMLDocument *This = HTMLDOC5_THIS(iface);
190 FIXME("(%p)->(v)\n", This);
191 return E_NOTIMPL;
194 static HRESULT WINAPI HTMLDocument5_get_onbeforeactivate(IHTMLDocument5 *iface, VARIANT *p)
196 HTMLDocument *This = HTMLDOC5_THIS(iface);
197 FIXME("(%p)->(%p)\n", This, p);
198 return E_NOTIMPL;
201 static HRESULT WINAPI HTMLDocument5_put_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT v)
203 HTMLDocument *This = HTMLDOC5_THIS(iface);
204 FIXME("(%p)->(v)\n", This);
205 return E_NOTIMPL;
208 static HRESULT WINAPI HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT *p)
210 HTMLDocument *This = HTMLDOC5_THIS(iface);
211 FIXME("(%p)->(%p)\n", This, p);
212 return E_NOTIMPL;
215 static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *p)
217 HTMLDocument *This = HTMLDOC5_THIS(iface);
218 nsIDOMNSHTMLDocument *nshtmldoc;
219 nsAString mode_str;
220 const PRUnichar *mode;
221 nsresult nsres;
223 TRACE("(%p)->(%p)\n", This, p);
225 if(!This->nsdoc) {
226 WARN("NULL nsdoc\n");
227 return E_UNEXPECTED;
230 nsres = nsIDOMHTMLDocument_QueryInterface(This->nsdoc, &IID_nsIDOMNSHTMLDocument, (void**)&nshtmldoc);
231 if(NS_FAILED(nsres)) {
232 ERR("Could not get nsIDOMNSHTMLDocument: %08x\n", nsres);
233 return S_OK;
236 nsAString_Init(&mode_str, NULL);
237 nsIDOMNSHTMLDocument_GetCompatMode(nshtmldoc, &mode_str);
238 nsIDOMNSHTMLDocument_Release(nshtmldoc);
240 nsAString_GetData(&mode_str, &mode);
241 *p = SysAllocString(mode);
242 nsAString_Finish(&mode_str);
244 return S_OK;
247 #undef HTMLDOC5_THIS
249 static const IHTMLDocument5Vtbl HTMLDocument5Vtbl = {
250 HTMLDocument5_QueryInterface,
251 HTMLDocument5_AddRef,
252 HTMLDocument5_Release,
253 HTMLDocument5_GetTypeInfoCount,
254 HTMLDocument5_GetTypeInfo,
255 HTMLDocument5_GetIDsOfNames,
256 HTMLDocument5_Invoke,
257 HTMLDocument5_put_onmousewheel,
258 HTMLDocument5_get_onmousewheel,
259 HTMLDocument5_get_doctype,
260 HTMLDocument5_get_implementation,
261 HTMLDocument5_createAttribute,
262 HTMLDocument5_createComment,
263 HTMLDocument5_put_onfocusin,
264 HTMLDocument5_get_onfocusin,
265 HTMLDocument5_put_onfocusout,
266 HTMLDocument5_get_onfocusout,
267 HTMLDocument5_put_onactivate,
268 HTMLDocument5_get_onactivate,
269 HTMLDocument5_put_ondeactivate,
270 HTMLDocument5_get_ondeactivate,
271 HTMLDocument5_put_onbeforeactivate,
272 HTMLDocument5_get_onbeforeactivate,
273 HTMLDocument5_put_onbeforedeactivate,
274 HTMLDocument5_get_onbeforedeactivate,
275 HTMLDocument5_get_compatMode
278 void HTMLDocument_HTMLDocument5_Init(HTMLDocument *This)
280 This->lpHTMLDocument5Vtbl = &HTMLDocument5Vtbl;