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
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 FIXME("(%p)->(%p)\n", This
, pctinfo
);
65 static HRESULT WINAPI
HTMLDocument5_GetTypeInfo(IHTMLDocument5
*iface
, UINT iTInfo
,
66 LCID lcid
, ITypeInfo
**ppTInfo
)
68 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
69 FIXME("(%p)->(%u %u %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
73 static HRESULT WINAPI
HTMLDocument5_GetIDsOfNames(IHTMLDocument5
*iface
, REFIID riid
,
74 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
76 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
77 FIXME("(%p)->(%s %p %u %u %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
82 static HRESULT WINAPI
HTMLDocument5_Invoke(IHTMLDocument5
*iface
, DISPID dispIdMember
,
83 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
84 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
86 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
87 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
88 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
92 static HRESULT WINAPI
HTMLDocument5_put_onmousewheel(IHTMLDocument5
*iface
, VARIANT v
)
94 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
95 FIXME("(%p)->(v)\n", This
);
99 static HRESULT WINAPI
HTMLDocument5_get_onmousewheel(IHTMLDocument5
*iface
, VARIANT
*p
)
101 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
102 FIXME("(%p)->(%p)\n", This
, p
);
106 static HRESULT WINAPI
HTMLDocument5_get_doctype(IHTMLDocument5
*iface
, IHTMLDOMNode
**p
)
108 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
109 FIXME("(%p)->(%p)\n", This
, p
);
113 static HRESULT WINAPI
HTMLDocument5_get_implementation(IHTMLDocument5
*iface
, IHTMLDOMImplementation
**p
)
115 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
116 FIXME("(%p)->(%p)\n", This
, p
);
120 static HRESULT WINAPI
HTMLDocument5_createAttribute(IHTMLDocument5
*iface
, BSTR bstrattrName
,
121 IHTMLDOMAttribute
**ppattribute
)
123 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
124 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(bstrattrName
), ppattribute
);
128 static HRESULT WINAPI
HTMLDocument5_createComment(IHTMLDocument5
*iface
, BSTR bstrdata
,
129 IHTMLDOMNode
**ppRetNode
)
131 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
132 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(bstrdata
), ppRetNode
);
136 static HRESULT WINAPI
HTMLDocument5_put_onfocusin(IHTMLDocument5
*iface
, VARIANT v
)
138 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
139 FIXME("(%p)->(v)\n", This
);
143 static HRESULT WINAPI
HTMLDocument5_get_onfocusin(IHTMLDocument5
*iface
, VARIANT
*p
)
145 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
146 FIXME("(%p)->(%p)\n", This
, p
);
150 static HRESULT WINAPI
HTMLDocument5_put_onfocusout(IHTMLDocument5
*iface
, VARIANT v
)
152 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
153 FIXME("(%p)->(v)\n", This
);
157 static HRESULT WINAPI
HTMLDocument5_get_onfocusout(IHTMLDocument5
*iface
, VARIANT
*p
)
159 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
160 FIXME("(%p)->(%p)\n", This
, p
);
164 static HRESULT WINAPI
HTMLDocument5_put_onactivate(IHTMLDocument5
*iface
, VARIANT v
)
166 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
167 FIXME("(%p)->(v)\n", This
);
171 static HRESULT WINAPI
HTMLDocument5_get_onactivate(IHTMLDocument5
*iface
, VARIANT
*p
)
173 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
174 FIXME("(%p)->(%p)\n", This
, p
);
178 static HRESULT WINAPI
HTMLDocument5_put_ondeactivate(IHTMLDocument5
*iface
, VARIANT v
)
180 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
181 FIXME("(%p)->(v)\n", This
);
185 static HRESULT WINAPI
HTMLDocument5_get_ondeactivate(IHTMLDocument5
*iface
, VARIANT
*p
)
187 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
188 FIXME("(%p)->(%p)\n", This
, p
);
192 static HRESULT WINAPI
HTMLDocument5_put_onbeforeactivate(IHTMLDocument5
*iface
, VARIANT v
)
194 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
195 FIXME("(%p)->(v)\n", This
);
199 static HRESULT WINAPI
HTMLDocument5_get_onbeforeactivate(IHTMLDocument5
*iface
, VARIANT
*p
)
201 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
202 FIXME("(%p)->(%p)\n", This
, p
);
206 static HRESULT WINAPI
HTMLDocument5_put_onbeforedeactivate(IHTMLDocument5
*iface
, VARIANT v
)
208 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
209 FIXME("(%p)->(v)\n", This
);
213 static HRESULT WINAPI
HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5
*iface
, VARIANT
*p
)
215 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
216 FIXME("(%p)->(%p)\n", This
, p
);
220 static HRESULT WINAPI
HTMLDocument5_get_compatMode(IHTMLDocument5
*iface
, BSTR
*p
)
222 HTMLDocument
*This
= HTMLDOC5_THIS(iface
);
223 nsIDOMDocument
*nsdoc
;
224 nsIDOMNSHTMLDocument
*nshtmldoc
;
226 const PRUnichar
*mode
;
229 TRACE("(%p)->(%p)\n", This
, p
);
231 nsres
= nsIWebNavigation_GetDocument(This
->nscontainer
->navigation
, &nsdoc
);
233 ERR("GetDocument failed: %08x\n", nsres
);
235 nsres
= nsIDOMDocument_QueryInterface(nsdoc
, &IID_nsIDOMNSHTMLDocument
, (void**)&nshtmldoc
);
236 nsIDOMDocument_Release(nsdoc
);
237 if(NS_FAILED(nsres
)) {
238 ERR("Could not get nsIDOMNSHTMLDocument: %08x\n", nsres
);
242 nsAString_Init(&mode_str
, NULL
);
243 nsIDOMNSHTMLDocument_GetCompatMode(nshtmldoc
, &mode_str
);
244 nsIDOMNSHTMLDocument_Release(nshtmldoc
);
246 nsAString_GetData(&mode_str
, &mode
, NULL
);
247 *p
= SysAllocString(mode
);
248 nsAString_Finish(&mode_str
);
255 static const IHTMLDocument5Vtbl HTMLDocument5Vtbl
= {
256 HTMLDocument5_QueryInterface
,
257 HTMLDocument5_AddRef
,
258 HTMLDocument5_Release
,
259 HTMLDocument5_GetTypeInfoCount
,
260 HTMLDocument5_GetTypeInfo
,
261 HTMLDocument5_GetIDsOfNames
,
262 HTMLDocument5_Invoke
,
263 HTMLDocument5_put_onmousewheel
,
264 HTMLDocument5_get_onmousewheel
,
265 HTMLDocument5_get_doctype
,
266 HTMLDocument5_get_implementation
,
267 HTMLDocument5_createAttribute
,
268 HTMLDocument5_createComment
,
269 HTMLDocument5_put_onfocusin
,
270 HTMLDocument5_get_onfocusin
,
271 HTMLDocument5_put_onfocusout
,
272 HTMLDocument5_get_onfocusout
,
273 HTMLDocument5_put_onactivate
,
274 HTMLDocument5_get_onactivate
,
275 HTMLDocument5_put_ondeactivate
,
276 HTMLDocument5_get_ondeactivate
,
277 HTMLDocument5_put_onbeforeactivate
,
278 HTMLDocument5_get_onbeforeactivate
,
279 HTMLDocument5_put_onbeforedeactivate
,
280 HTMLDocument5_get_onbeforedeactivate
,
281 HTMLDocument5_get_compatMode
284 void HTMLDocument_HTMLDocument5_Init(HTMLDocument
*This
)
286 This
->lpHTMLDocument5Vtbl
= &HTMLDocument5Vtbl
;