The OpenD Programming Language

1 /**
2  * Windows API header module
3  *
4  * Translated from MinGW Windows headers
5  *
6  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
7  * Source: $(DRUNTIMESRC core/sys/windows/_docobj.d)
8  */
9 module core.sys.windows.docobj;
10 version (Windows):
11 
12 import core.sys.windows.basetyps, core.sys.windows.oaidl, core.sys.windows.objidl, core.sys.windows.oleidl,
13   core.sys.windows.unknwn, core.sys.windows.windef, core.sys.windows.wtypes;
14 
15 // FIXME: remove inherited methods from interface definitions
16 
17 enum {
18     OLECMDERR_E_UNKNOWNGROUP = -2147221244,
19     OLECMDERR_E_CANCELED     = -2147221245,
20     OLECMDERR_E_NOHELP       = -2147221246,
21     OLECMDERR_E_DISABLED     = -2147221247,
22     OLECMDERR_E_NOTSUPPORTED = -2147221248
23 }
24 
25 enum OLECMDID {
26     OLECMDID_OPEN = 1,
27     OLECMDID_NEW = 2,
28     OLECMDID_SAVE = 3,
29     OLECMDID_SAVEAS = 4,
30     OLECMDID_SAVECOPYAS = 5,
31     OLECMDID_PRINT = 6,
32     OLECMDID_PRINTPREVIEW = 7,
33     OLECMDID_PAGESETUP = 8,
34     OLECMDID_SPELL = 9,
35     OLECMDID_PROPERTIES = 10,
36     OLECMDID_CUT = 11,
37     OLECMDID_COPY = 12,
38     OLECMDID_PASTE = 13,
39     OLECMDID_PASTESPECIAL = 14,
40     OLECMDID_UNDO = 15,
41     OLECMDID_REDO = 16,
42     OLECMDID_SELECTALL = 17,
43     OLECMDID_CLEARSELECTION = 18,
44     OLECMDID_ZOOM = 19,
45     OLECMDID_GETZOOMRANGE = 20,
46     OLECMDID_UPDATECOMMANDS = 21,
47     OLECMDID_REFRESH = 22,
48     OLECMDID_STOP = 23,
49     OLECMDID_HIDETOOLBARS = 24,
50     OLECMDID_SETPROGRESSMAX = 25,
51     OLECMDID_SETPROGRESSPOS = 26,
52     OLECMDID_SETPROGRESSTEXT = 27,
53     OLECMDID_SETTITLE = 28,
54     OLECMDID_SETDOWNLOADSTATE = 29,
55     OLECMDID_STOPDOWNLOAD = 30
56 }
57 
58 enum OLECMDF {
59     OLECMDF_SUPPORTED = 1,
60     OLECMDF_ENABLED = 2,
61     OLECMDF_LATCHED = 4,
62     OLECMDF_NINCHED = 8
63 }
64 
65 enum OLECMDEXECOPT {
66     OLECMDEXECOPT_DODEFAULT = 0,
67     OLECMDEXECOPT_PROMPTUSER = 1,
68     OLECMDEXECOPT_DONTPROMPTUSER = 2,
69     OLECMDEXECOPT_SHOWHELP = 3
70 }
71 
72 struct OLECMDTEXT {
73     DWORD cmdtextf;
74     ULONG cwActual;
75     ULONG cwBuf;
76     wchar[1] rgwz = 0;
77 }
78 
79 struct OLECMD {
80     ULONG cmdID;
81     DWORD cmdf;
82 }
83 
84 alias IOleInPlaceSite LPOLEINPLACESITE;
85 alias IEnumOleDocumentViews LPENUMOLEDOCUMENTVIEWS;
86 
87 extern (C) extern const IID
88     IID_IContinueCallback,
89     IID_IEnumOleDocumentViews,
90     IID_IPrint,
91     IID_IOleDocumentView,
92     IID_IOleDocument,
93     IID_IOleCommandTarget,
94     IID_IOleDocumentSite;
95 
96 
97 interface IOleDocumentView : IUnknown {
98     HRESULT SetInPlaceSite(LPOLEINPLACESITE);
99     HRESULT GetInPlaceSite(LPOLEINPLACESITE*);
100     HRESULT GetDocument(IUnknown*);
101     HRESULT SetRect(LPRECT);
102     HRESULT GetRect(LPRECT);
103     HRESULT SetRectComplex(LPRECT, LPRECT, LPRECT, LPRECT);
104     HRESULT Show(BOOL);
105     HRESULT UIActivate(BOOL);
106     HRESULT Open();
107     HRESULT Close(DWORD);
108     HRESULT SaveViewState(IStream);
109     HRESULT ApplyViewState(IStream);
110     HRESULT Clone(LPOLEINPLACESITE, IOleDocumentView*);
111 }
112 
113 interface IEnumOleDocumentViews : IUnknown {
114       HRESULT Next(ULONG, IOleDocumentView, ULONG*);
115       HRESULT Skip(ULONG);
116       HRESULT Reset();
117       HRESULT Clone(IEnumOleDocumentViews*);
118 }
119 
120 interface IOleDocument : IUnknown {
121     HRESULT CreateView(LPOLEINPLACESITE, IStream, DWORD, IOleDocumentView*);
122     HRESULT GetDocMiscStatus(DWORD*);
123     HRESULT EnumViews(LPENUMOLEDOCUMENTVIEWS*, IOleDocumentView*);
124 }
125 
126 interface IOleCommandTarget : IUnknown {
127     HRESULT QueryStatus(const(GUID)*, ULONG, OLECMD*, OLECMDTEXT*);
128     HRESULT Exec(const(GUID)*, DWORD, DWORD, VARIANTARG*, VARIANTARG*);
129 }
130 
131 interface IOleDocumentSite : IUnknown {
132     HRESULT ActivateMe(IOleDocumentView);
133 }