Do filename postprocessing in GetDisplayNameOf (Hide filename
[wine] / dlls / mshtml / mshtml_private.h
1 /*
2  * Copyright 2005 Jacek Caban
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 typedef struct {
20     const IHTMLDocument2Vtbl              *lpHTMLDocument2Vtbl;
21     const IPersistMonikerVtbl             *lpPersistMonikerVtbl;
22     const IPersistFileVtbl                *lpPersistFileVtbl;
23     const IMonikerPropVtbl                *lpMonikerPropVtbl;
24     const IOleObjectVtbl                  *lpOleObjectVtbl;
25     const IOleDocumentVtbl                *lpOleDocumentVtbl;
26     const IOleDocumentViewVtbl            *lpOleDocumentViewVtbl;
27     const IOleInPlaceActiveObjectVtbl     *lpOleInPlaceActiveObjectVtbl;
28     const IViewObject2Vtbl                *lpViewObject2Vtbl;
29     const IOleInPlaceObjectWindowlessVtbl *lpOleInPlaceObjectWindowlessVtbl;
30     const IServiceProviderVtbl            *lpServiceProviderVtbl;
31     const IOleCommandTargetVtbl           *lpOleCommandTargetVtbl;
32
33     LONG ref;
34
35     IOleClientSite *client;
36     IDocHostUIHandler *hostui;
37     IOleInPlaceSite *ipsite;
38     IOleInPlaceFrame *frame;
39
40     HWND hwnd;
41
42     BOOL in_place_active;
43     BOOL ui_active;
44 } HTMLDocument;
45
46 #define HTMLDOC(x)       ((IHTMLDocument2*)               &(x)->lpHTMLDocument2Vtbl)
47 #define PERSIST(x)       ((IPersist*)                     &(x)->lpPersistFileVtbl)
48 #define PERSISTMON(x)    ((IPersistMoniker*)              &(x)->lpPersistMonikerVtbl)
49 #define PERSISTFILE(x)   ((IPersistFile*)                 &(x)->lpPersistFileVtbl)
50 #define MONPROP(x)       ((IMonikerProp*)                 &(x)->lpMonikerPropVtbl)
51 #define OLEOBJ(x)        ((IOleObject*)                   &(x)->lpOleObjectVtbl)
52 #define OLEDOC(x)        ((IOleDocument*)                 &(x)->lpOleDocumentVtbl)
53 #define DOCVIEW(x)       ((IOleDocumentView*)             &(x)->lpOleDocumentViewVtbl)
54 #define OLEWIN(x)        ((IOleWindow*)                   &(x)->lpOleInPlaceActiveObjectVtbl)
55 #define ACTOBJ(x)        ((IOleInPlaceActiveObject*)      &(x)->lpOleInPlaceActiveObjectVtbl)
56 #define VIEWOBJ(x)       ((IViewObject*)                  &(x)->lpViewObject2Vtbl)
57 #define VIEWOBJ2(x)      ((IViewObject2*)                 &(x)->lpViewObject2Vtbl)
58 #define INPLACEOBJ(x)    ((IOleInPlaceObject*)            &(x)->lpOleInPlaceObjectWindowlessVtbl)
59 #define INPLACEWIN(x)    ((IOleInPlaceObjectWindowless*)  &(x)->lpOleInPlaceObjectWindowlessVtbl)
60 #define SERVPROV(x)      ((IServiceProvider*)             &(x)->lpServiceProviderVtbl)
61 #define CMDTARGET(x)     ((IOleCommandTarget*)            &(x)->lpOleCommandTargetVtbl)
62
63 #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
64
65 HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
66
67 void HTMLDocument_Persist_Init(HTMLDocument*);
68 void HTMLDocument_OleObj_Init(HTMLDocument*);
69 void HTMLDocument_View_Init(HTMLDocument*);
70 void HTMLDocument_Window_Init(HTMLDocument*);
71 void HTMLDocument_Service_Init(HTMLDocument*);
72
73 HRESULT ProtocolFactory_Create(REFCLSID,REFIID,void**);
74
75 DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
76 DEFINE_GUID(CLSID_JSProtocol, 0x3050F3B2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
77 DEFINE_GUID(CLSID_MailtoProtocol, 0x3050F3DA, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
78 DEFINE_GUID(CLSID_ResProtocol, 0x3050F3BC, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
79 DEFINE_GUID(CLSID_SysimageProtocol, 0x76E67A63, 0x06E9, 0x11D2, 0xA8,0x40, 0x00,0x60,0x08,0x05,0x93,0x82);
80
81 extern HINSTANCE hInst;