21#define DOCHOST_DOCCANNAVIGATE 0
39 *
ppv = &
This->IEnumUnknown_iface;
42 *
ppv = &
This->IEnumUnknown_iface;
80 TRACE(
"(%p)->(%u %p %p)\n",
This, celt, rgelt, pceltFetched);
151 if(!
This->nscontainer)
154 nsres = nsIWebBrowser_QueryInterface(
This->nscontainer->webbrowser, &IID_nsIScrollable, (
void**)&scrollable);
156 nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable, ScrollOrientation_Y,
159 ERR(
"Could not set default Y scrollbar prefs: %08x\n", nsres);
161 nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable, ScrollOrientation_X,
164 ERR(
"Could not set default X scrollbar prefs: %08x\n", nsres);
166 nsIScrollable_Release(scrollable);
168 ERR(
"Could not get nsIScrollable: %08x\n", nsres);
182 hres = IOleClientSite_QueryInterface(doc->
client, &IID_IOleCommandTarget, (
void**)&olecmd);
187 hres = IOleCommandTarget_Exec(olecmd, &CGID_ShellDocView, 84, 0,
NULL, &
var);
188 IOleCommandTarget_Release(olecmd);
190 FIXME(
"handle result\n");
200 if(doc_can_navigate) {
215 static const WCHAR ie_keyW[] = {
216 'S',
'O',
'F',
'T',
'W',
'A',
'R',
'E',
'\\',
217 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
218 'I',
'n',
't',
'e',
'r',
'n',
'e',
't',
' ',
'E',
'x',
'p',
'l',
'o',
'r',
'e',
'r',0};
219 static const WCHAR zoomW[] = {
'Z',
'o',
'o',
'm',0};
220 static const WCHAR zoom_factorW[] = {
'Z',
'o',
'o',
'm',
'F',
'a',
'c',
't',
'o',
'r',0};
244 TRACE(
"(%p)->(%p)\n",
This, pClientSite);
246 if(pClientSite ==
This->doc_obj->client)
249 if(
This->doc_obj->client) {
250 IOleClientSite_Release(
This->doc_obj->client);
255 if(
This->doc_obj->client_cmdtrg) {
256 IOleCommandTarget_Release(
This->doc_obj->client_cmdtrg);
257 This->doc_obj->client_cmdtrg =
NULL;
260 if(
This->doc_obj->hostui && !
This->doc_obj->custom_hostui) {
261 IDocHostUIHandler_Release(
This->doc_obj->hostui);
265 if(
This->doc_obj->doc_object_service) {
266 IDocObjectService_Release(
This->doc_obj->doc_object_service);
267 This->doc_obj->doc_object_service =
NULL;
270 if(
This->doc_obj->webbrowser) {
271 IUnknown_Release(
This->doc_obj->webbrowser);
275 if(
This->doc_obj->browser_service) {
276 IUnknown_Release(
This->doc_obj->browser_service);
277 This->doc_obj->browser_service =
NULL;
280 if(
This->doc_obj->travel_log) {
281 ITravelLog_Release(
This->doc_obj->travel_log);
285 memset(&
This->doc_obj->hostinfo, 0,
sizeof(DOCHOSTUIINFO));
290 IOleClientSite_AddRef(pClientSite);
291 This->doc_obj->client = pClientSite;
293 hostui_setup =
This->doc_obj->hostui_setup;
295 if(!
This->doc_obj->hostui) {
300 hres = IOleClientSite_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (
void**)&uihandler);
302 This->doc_obj->hostui = uihandler;
305 if(
This->doc_obj->hostui) {
306 DOCHOSTUIINFO hostinfo;
310 memset(&hostinfo, 0,
sizeof(DOCHOSTUIINFO));
311 hostinfo.cbSize =
sizeof(DOCHOSTUIINFO);
312 hres = IDocHostUIHandler_GetHostInfo(
This->doc_obj->hostui, &hostinfo);
314 TRACE(
"hostinfo = {%u %08x %08x %s %s}\n",
315 hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick,
318 This->doc_obj->hostinfo = hostinfo;
322 hres = IDocHostUIHandler_GetOptionKeyPath(
This->doc_obj->hostui, &key_path, 0);
331 hres = IDocHostUIHandler_QueryInterface(
This->doc_obj->hostui, &IID_IDocHostUIHandler2,
332 (
void**)&uihandler2);
334 hres = IDocHostUIHandler2_GetOverrideKeyPath(uihandler2, &override_key_path, 0);
335 if(
hres ==
S_OK && override_key_path) {
336 if(override_key_path[0]) {
342 IDocHostUIHandler2_Release(uihandler2);
353 hres = IOleClientSite_QueryInterface(pClientSite, &
IID_IOleWindow, (
void**)&ole_window);
355 IOleWindow_GetWindow(ole_window, &
hwnd);
356 IOleWindow_Release(ole_window);
360 &IID_IBrowserService, (
void**)&browser_service);
364 This->doc_obj->browser_service = (
IUnknown*)browser_service;
366 hres = IBrowserService_GetTravelLog(browser_service, &travel_log);
368 This->doc_obj->travel_log = travel_log;
370 browser_service =
NULL;
373 hres = IOleClientSite_QueryInterface(pClientSite, &IID_IOleCommandTarget, (
void**)&cmdtrg);
376 OLECMD
cmd = {OLECMDID_SETPROGRESSTEXT, 0};
378 This->doc_obj->client_cmdtrg = cmdtrg;
386 if(browser_service) {
387 hres = IBrowserService_QueryInterface(browser_service,
388 &IID_IDocObjectService, (
void**)&doc_object_service);
390 This->doc_obj->doc_object_service = doc_object_service;
405 IOleCommandTarget_QueryStatus(cmdtrg,
NULL, 1, &
cmd,
NULL);
409 IOleCommandTarget_Exec(cmdtrg,
NULL, OLECMDID_SETPROGRESSMAX,
410 OLECMDEXECOPT_DONTPROMPTUSER, &
var,
NULL);
411 IOleCommandTarget_Exec(cmdtrg,
NULL, OLECMDID_SETPROGRESSPOS,
412 OLECMDEXECOPT_DONTPROMPTUSER, &
var,
NULL);
418 IOleControl_OnAmbientPropertyChange(&
This->IOleControl_iface,
426 FIXME(
"silent == true\n");
439 TRACE(
"(%p)->(%p)\n",
This, ppClientSite);
444 if(
This->doc_obj->client)
445 IOleClientSite_AddRef(
This->doc_obj->client);
446 *ppClientSite =
This->doc_obj->client;
462 TRACE(
"(%p)->(%08x)\n",
This, dwSaveOption);
464 if(dwSaveOption == OLECLOSE_PROMPTSAVE)
465 FIXME(
"OLECLOSE_PROMPTSAVE not implemented\n");
467 if(
This->doc_obj->in_place_active)
468 IOleInPlaceObjectWindowless_InPlaceDeactivate(&
This->IOleInPlaceObjectWindowless_iface);
472 if(
This->advise_holder)
473 IOleAdviseHolder_SendOnClose(
This->advise_holder);
481 FIXME(
"(%p %d %p)->()\n",
This, dwWhichMoniker, pmk);
488 FIXME(
"(%p)->(%d %d %p)\n",
This, dwAssign, dwWhichMoniker, ppmk);
514 TRACE(
"(%p)->(%d %p %p %d %p %p)\n",
This, iVerb, lpmsg, pActiveSite, lindex,
hwndParent, lprcPosRect);
517 FIXME(
"iVerb = %d not supported\n", iVerb);
522 pActiveSite =
This->doc_obj->client;
524 hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleDocumentSite, (
void**)&pDocSite);
529 hres = IOleDocumentSite_ActivateMe(pDocSite, &
This->IOleDocumentView_iface);
530 IOleDocumentSite_Release(pDocSite);
532 hres = IOleDocumentView_UIActivate(&
This->IOleDocumentView_iface,
TRUE);
537 IOleDocumentView_SetRect(&
This->IOleDocumentView_iface, &
rect);
539 IOleDocumentView_Show(&
This->IOleDocumentView_iface,
TRUE);
549 FIXME(
"(%p)->(%p)\n",
This, ppEnumOleVerb);
576 *pClsid = CLSID_HTMLDocument;
583 FIXME(
"(%p)->(%d %p)\n",
This, dwFormOfType, pszUserType);
590 FIXME(
"(%p)->(%d %p)\n",
This, dwDrawAspect, psizel);
597 FIXME(
"(%p)->(%d %p)\n",
This, dwDrawAspect, psizel);
604 TRACE(
"(%p)->(%p %p)\n",
This, pAdvSink, pdwConnection);
614 if(!
This->advise_holder) {
616 if(!
This->advise_holder)
620 return IOleAdviseHolder_Advise(
This->advise_holder, pAdvSink, pdwConnection);
626 TRACE(
"(%p)->(%d)\n",
This, dwConnection);
628 if(!
This->advise_holder)
631 return IOleAdviseHolder_Unadvise(
This->advise_holder, dwConnection);
638 if(!
This->advise_holder) {
639 *ppenumAdvise =
NULL;
643 return IOleAdviseHolder_EnumAdvise(
This->advise_holder, ppenumAdvise);
649 FIXME(
"(%p)->(%d %p)\n",
This, dwAspect, pdwStatus);
733 hres = IOleDocumentView_SetInPlaceSite(&
This->IOleDocumentView_iface, pIPSite);
739 FIXME(
"pstm is not supported\n");
741 IOleDocumentView_AddRef(&
This->IOleDocumentView_iface);
742 *ppView = &
This->IOleDocumentView_iface;
757 FIXME(
"(%p)->(%p %p)\n",
This, ppEnum, ppView);
814 DISPPARAMS dispparams = {
NULL, 0};
820 TRACE(
"Could not get IDispatch\n");
829 IDispatch_Release(disp);
855 TRACE(
"client = NULL\n");
861 TRACE(
"(%p)->(DISPID_AMBIENT_USERMODE)\n",
This);
870 FIXME(
"edit mode is not supported\n");
878 TRACE(
"(%p)->(DISPID_AMBIENT_DLCONTROL)\n",
This);
881 TRACE(
"(%p)->(DISPID_AMBIENT_OFFLINEIFNOTCONNECTED)\n",
This);
889 FIXME(
"offline connection is not supported\n");
897 TRACE(
"(%p)->(DISPID_AMBIENT_SILENT)\n",
This);
905 FIXME(
"silent mode is not supported\n");
913 TRACE(
"(%p)->(DISPID_AMBIENT_USERAGENT)\n",
This);
918 FIXME(
"not supported AMBIENT_USERAGENT\n");
922 TRACE(
"(%p)->(DISPID_AMBIENT_PALETTE)\n",
This);
927 FIXME(
"not supported AMBIENT_PALETTE\n");
932 FIXME(
"(%p) unsupported dispID=%d\n",
This, dispID);
1042 TRACE(
"(%p)->(%x %p)\n",
This, grfFlags, ppenum);
1051 *ppenum = &
ret->IEnumUnknown_iface;
1079 return ICustomDoc_QueryInterface(&
This->ICustomDoc_iface,
riid,
ppv);
1085 return ICustomDoc_AddRef(&
This->ICustomDoc_iface);
1091 return ICustomDoc_Release(&
This->ICustomDoc_iface);
1097 FIXME(
"(%p)->(%p)\n",
This, ppszFrameSrc);
1105 TRACE(
"(%p)->(%p)\n",
This, ppContainer);
1108 IOleContainer_AddRef(&
This->basedoc.IOleContainer_iface);
1109 *ppContainer = &
This->basedoc.IOleContainer_iface;
1168 dwOptionSetMask==INTERFACESAFE_FOR_UNTRUSTED_DATA &&
1169 dwEnabledOptions==INTERFACESAFE_FOR_UNTRUSTED_DATA)
1188 if(!
This->client ||
This->container_locked == fLock)
1193 IOleContainer_LockContainer(
container, fLock);
1194 This->container_locked = fLock;
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define RegCloseKey(hKey)
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
HRESULT do_query_service(IUnknown *unk, REFGUID guid_service, REFIID riid, void **ppv)
static const WCHAR zoomW[]
#define DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
#define DISPID_AMBIENT_SILENT
VOID WINAPI CoTaskMemFree(LPVOID ptr)
static const char * debugstr_variant(const VARIANT *var)
static VARIANTARG static DISPID
#define DISPID_AMBIENT_DLCONTROL
#define DISPID_AMBIENT_USERAGENT
@ DOCHOSTUIFLAG_SCROLL_NO
static HRESULT WINAPI EnumUnknown_QueryInterface(IEnumUnknown *iface, REFIID riid, void **ppv)
static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface)
static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze)
static EnumUnknown * impl_from_IEnumUnknown(IEnumUnknown *iface)
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
static HRESULT WINAPI EnumUnknown_Clone(IEnumUnknown *iface, IEnumUnknown **ppenum)
static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection)
static HRESULT WINAPI EnumUnknown_Skip(IEnumUnknown *iface, ULONG celt)
static HTMLDocument * impl_from_IObjectWithSite(IObjectWithSite *iface)
static ULONG WINAPI TargetContainer_AddRef(ITargetContainer *iface)
static const ITargetContainerVtbl TargetContainerVtbl
static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface)
void set_document_navigation(HTMLDocumentObj *doc, BOOL doc_can_navigate)
static HTMLDocument * impl_from_IOleDocument(IOleDocument *iface)
static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *pMsg)
static const IObjectWithSiteVtbl ObjectWithSiteVtbl
static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
static const IOleContainerVtbl OleContainerVtbl
static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
static ULONG WINAPI ObjectSafety_AddRef(IObjectSafety *iface)
void TargetContainer_Init(HTMLDocumentObj *This)
static HRESULT WINAPI OleDocument_EnumViews(IOleDocument *iface, IEnumOleDocumentViews **ppEnum, IOleDocumentView **ppView)
static HRESULT WINAPI OleDocument_QueryInterface(IOleDocument *iface, REFIID riid, void **ppv)
static ULONG WINAPI OleDocument_Release(IOleDocument *iface)
static HRESULT WINAPI ObjectSafety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv)
static ULONG WINAPI OleDocument_AddRef(IOleDocument *iface)
static HRESULT WINAPI EnumUnknown_Reset(IEnumUnknown *iface)
static HTMLDocument * impl_from_IOleObject(IOleObject *iface)
static HRESULT WINAPI ObjectWithSite_GetSite(IObjectWithSite *iface, REFIID riid, PVOID *ppvSite)
static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwReserved, IDataObject **ppDataObject)
static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
static ULONG WINAPI OleContainer_Release(IOleContainer *iface)
static HRESULT WINAPI OleDocument_GetDocMiscStatus(IOleDocument *iface, DWORD *pdwStatus)
static HTMLDocument * impl_from_IObjectSafety(IObjectSafety *iface)
static const IEnumUnknownVtbl EnumUnknownVtbl
#define DOCHOST_DOCCANNAVIGATE
static const IObjectSafetyVtbl ObjectSafetyVtbl
static HTMLDocument * impl_from_IOleContainer(IOleContainer *iface)
static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType, LPOLESTR *pszUserType)
static HTMLDocumentObj * impl_from_ITargetContainer(ITargetContainer *iface)
static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppv)
static HTMLDocument * impl_from_IOleControl(IOleControl *iface)
static ULONG WINAPI OleObject_Release(IOleObject *iface)
static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
static void update_hostinfo(HTMLDocumentObj *This, DOCHOSTUIINFO *hostinfo)
static ULONG WINAPI ObjectSafety_Release(IObjectSafety *iface)
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, void **ppv)
static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID *pClsid)
static ULONG WINAPI EnumUnknown_Release(IEnumUnknown *iface)
static const IOleDocumentVtbl OleDocumentVtbl
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
void HTMLDocument_LockContainer(HTMLDocumentObj *This, BOOL fLock)
static ULONG WINAPI OleControl_Release(IOleControl *iface)
static ULONG WINAPI EnumUnknown_AddRef(IEnumUnknown *iface)
HRESULT get_client_disp_property(IOleClientSite *client, DISPID dispid, VARIANT *res)
static ULONG WINAPI TargetContainer_Release(ITargetContainer *iface)
static void load_settings(HTMLDocumentObj *doc)
static HRESULT WINAPI OleContainer_EnumObjects(IOleContainer *iface, DWORD grfFlags, IEnumUnknown **ppenum)
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite *pClientSite)
static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer *iface, IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
static const IOleObjectVtbl OleObjectVtbl
static HRESULT WINAPI OleContainer_LockContainer(IOleContainer *iface, BOOL fLock)
static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk)
void HTMLDocument_OleObj_Init(HTMLDocument *This)
static HRESULT WINAPI OleContainer_QueryInterface(IOleContainer *iface, REFIID riid, void **ppv)
static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite)
static ULONG WINAPI OleContainer_AddRef(IOleContainer *iface)
static HRESULT WINAPI OleDocument_CreateView(IOleDocument *iface, IOleInPlaceSite *pIPSite, IStream *pstm, DWORD dwReserved, IOleDocumentView **ppView)
static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
static HRESULT WINAPI OleObject_Update(IOleObject *iface)
void call_docview_84(HTMLDocumentObj *doc)
static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
static HRESULT WINAPI ObjectSafety_GetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions)
static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE *pLogpal)
static HRESULT on_change_dlcontrol(HTMLDocument *This)
static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, IOleClientSite **ppClientSite)
static HRESULT WINAPI TargetContainer_QueryInterface(ITargetContainer *iface, REFIID riid, void **ppv)
static const IOleControlVtbl OleControlVtbl
static HRESULT WINAPI EnumUnknown_Next(IEnumUnknown *iface, ULONG celt, IUnknown **rgelt, ULONG *pceltFetched)
static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, IDataObject *pDataObject, BOOL fCreation, DWORD dwReserved)
static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
static HRESULT WINAPI ObjectSafety_SetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions)
static HRESULT WINAPI TargetContainer_GetFrameUrl(ITargetContainer *iface, LPWSTR *ppszFrameSrc)
static HRESULT WINAPI TargetContainer_GetFramesContainer(ITargetContainer *iface, IOleContainer **ppContainer)
static HRESULT htmldoc_query_interface(HTMLDocument *This, REFIID riid, void **ppv)
static ULONG htmldoc_addref(HTMLDocument *This)
static ULONG htmldoc_release(HTMLDocument *This)
#define NS_SUCCEEDED(res)
void set_viewer_zoom(NSContainer *, float) DECLSPEC_HIDDEN
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define LOCALE_SYSTEM_DEFAULT
#define OLEIVERB_UIACTIVATE
#define OLEIVERB_INPLACEACTIVATE
HRESULT WINAPI CreateOleAdviseHolder(IOleAdviseHolder **ppOAHolder)
#define DISPATCH_PROPERTYGET
#define DISPID_AMBIENT_USERMODE
#define DISPID_AMBIENT_PALETTE
const GUID IID_IOleWindow
const GUID IID_IEnumUnknown
#define IsEqualGUID(rguid1, rguid2)
IEnumUnknown IEnumUnknown_iface
NSContainer * nscontainer
IOleCommandTarget * client_cmdtrg
IHTMLWindow2 IHTMLWindow2_iface
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define CONTAINING_RECORD(address, type, field)
void WINAPI VariantInit(VARIANTARG *pVarg)
#define OLE_E_NOCONNECTION
#define HKEY_CURRENT_USER