1/* 2 * Copyright (C) 1999 Paul Quinn 3 * Copyright (C) 2003 Alexandre Julliard 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 18 */ 19 20import "ocidl.idl"; 21import "objidl.idl"; 22import "oleidl.idl"; 23import "oaidl.idl"; 24import "servprov.idl"; 25 26 27interface IOleDocumentView; 28interface IEnumOleDocumentViews; 29 30 31/***************************************************************************** 32 * IOleDocument interface 33 */ 34[ 35 object, 36 uuid(b722bcc5-4e68-101b-a2bc-00aa00404770), 37 pointer_default(unique) 38] 39interface IOleDocument : IUnknown 40{ 41 typedef [unique] IOleDocument *LPOLEDOCUMENT; 42 43 typedef enum 44 { 45 DOCMISC_CANCREATEMULTIPLEVIEWS = 1, 46 DOCMISC_SUPPORTCOMPLEXRECTANGLES = 2, 47 DOCMISC_CANTOPENEDIT = 4, 48 DOCMISC_NOFILESUPPORT = 8 49 } DOCMISC; 50 51 HRESULT CreateView( 52 [in, unique] IOleInPlaceSite *pIPSite, 53 [in, unique] IStream *pstm, 54 [in] DWORD dwReserved, 55 [out] IOleDocumentView **ppView); 56 57 HRESULT GetDocMiscStatus( 58 [out] DWORD *pdwStatus); 59 60 HRESULT EnumViews( 61 [out] IEnumOleDocumentViews **ppEnum, 62 [out] IOleDocumentView **ppView); 63} 64 65 66/***************************************************************************** 67 * IOleDocumentSite interface 68 */ 69[ 70 object, 71 uuid(b722bcc7-4e68-101b-a2bc-00aa00404770), 72 pointer_default(unique) 73] 74interface IOleDocumentSite : IUnknown 75{ 76 typedef [unique] IOleDocumentSite *LPOLEDOCUMENTSITE; 77 78 HRESULT ActivateMe( [in] IOleDocumentView *pViewToActivate ); 79} 80 81 82/***************************************************************************** 83 * IOleDocumentView interface 84 */ 85[ 86 object, 87 uuid(b722bcc6-4e68-101b-a2bc-00aa00404770), 88 pointer_default(unique) 89] 90interface IOleDocumentView : IUnknown 91{ 92 typedef [unique] IOleDocumentView *LPOLEDOCUMENTVIEW; 93 94 HRESULT SetInPlaceSite( [in, unique] IOleInPlaceSite *pIPSite ); 95 96 HRESULT GetInPlaceSite( [out] IOleInPlaceSite **ppIPSite ); 97 98 HRESULT GetDocument( [out] IUnknown **ppunk ); 99 100 HRESULT SetRect( [in] LPRECT prcView ); 101 102 HRESULT GetRect( [out] LPRECT prcView ); 103 104 HRESULT SetRectComplex( 105 [in, unique] LPRECT prcView, 106 [in, unique] LPRECT prcHScroll, 107 [in, unique] LPRECT prcVScroll, 108 [in, unique] LPRECT prcSizeBox); 109 110 HRESULT Show( [in] BOOL fShow ); 111 112 HRESULT UIActivate( [in] BOOL fUIActivate ); 113 114 HRESULT Open(); 115 116 HRESULT CloseView( [in] DWORD dwReserved ); 117 118 HRESULT SaveViewState( [in] LPSTREAM pstm ); 119 120 HRESULT ApplyViewState( [in] LPSTREAM pstm ); 121 122 HRESULT Clone( 123 [in] IOleInPlaceSite *pIPSiteNew, 124 [out] IOleDocumentView **ppViewNew); 125} 126 127 128/***************************************************************************** 129 * IEnumOleDocumentViews interface 130 */ 131[ 132 object, 133 uuid(b722bcc8-4e68-101b-a2bc-00aa00404770), 134 pointer_default(unique) 135] 136interface IEnumOleDocumentViews : IUnknown 137{ 138 typedef [unique] IEnumOleDocumentViews *LPENUMOLEDOCUMENTVIEWS; 139 140 [local] 141 HRESULT Next( 142 [in] ULONG cViews, 143 [out] IOleDocumentView **rgpView, 144 [out] ULONG *pcFetched); 145 146 [call_as(Next)] 147 HRESULT RemoteNext( 148 [in] ULONG cViews, 149 [out, size_is(cViews), length_is(*pcFetched)] IOleDocumentView **rgpView, 150 [out] ULONG *pcFetched); 151 152 HRESULT Skip( [in] ULONG cViews ); 153 154 HRESULT Reset(); 155 156 HRESULT Clone( [out] IEnumOleDocumentViews **ppEnum ); 157} 158 159 160/***************************************************************************** 161 * IOleCommandTarget interface 162 */ 163[ 164 object, 165 uuid(b722bccb-4e68-101b-a2bc-00aa00404770), 166 pointer_default(unique) 167] 168interface IOleCommandTarget : IUnknown 169{ 170 typedef [unique] IOleCommandTarget *LPOLECOMMANDTARGET; 171 172 typedef enum OLECMDF 173 { 174 OLECMDF_SUPPORTED = 0x1, 175 OLECMDF_ENABLED = 0x2, 176 OLECMDF_LATCHED = 0x4, 177 OLECMDF_NINCHED = 0x8, 178 OLECMDF_INVISIBLE = 0x10, 179 OLECMDF_DEFHIDEONCTXTMENU = 0x20 180 } OLECMDF; 181 182 typedef struct _tagOLECMD 183 { 184 ULONG cmdID; 185 DWORD cmdf; 186 } OLECMD; 187 188 typedef struct _tagOLECMDTEXT 189 { 190 DWORD cmdtextf; 191 ULONG cwActual; 192 ULONG cwBuf; 193 [size_is(cwBuf)] WCHAR rgwz[]; 194 } OLECMDTEXT; 195 196 typedef enum OLECMDTEXTF 197 { 198 OLECMDTEXTF_NONE = 0, 199 OLECMDTEXTF_NAME = 1, 200 OLECMDTEXTF_STATUS = 2 201 } OLECMDTEXTF; 202 203 typedef enum OLECMDEXECOPT 204 { 205 OLECMDEXECOPT_DODEFAULT = 0, 206 OLECMDEXECOPT_PROMPTUSER = 1, 207 OLECMDEXECOPT_DONTPROMPTUSER = 2, 208 OLECMDEXECOPT_SHOWHELP = 3 209 } OLECMDEXECOPT; 210 211 typedef enum OLECMDID 212 { 213 OLECMDID_OPEN = 1, 214 OLECMDID_NEW = 2, 215 OLECMDID_SAVE = 3, 216 OLECMDID_SAVEAS = 4, 217 OLECMDID_SAVECOPYAS = 5, 218 OLECMDID_PRINT = 6, 219 OLECMDID_PRINTPREVIEW = 7, 220 OLECMDID_PAGESETUP = 8, 221 OLECMDID_SPELL = 9, 222 OLECMDID_PROPERTIES = 10, 223 OLECMDID_CUT = 11, 224 OLECMDID_COPY = 12, 225 OLECMDID_PASTE = 13, 226 OLECMDID_PASTESPECIAL = 14, 227 OLECMDID_UNDO = 15, 228 OLECMDID_REDO = 16, 229 OLECMDID_SELECTALL = 17, 230 OLECMDID_CLEARSELECTION = 18, 231 OLECMDID_ZOOM = 19, 232 OLECMDID_GETZOOMRANGE = 20, 233 OLECMDID_UPDATECOMMANDS = 21, 234 OLECMDID_REFRESH = 22, 235 OLECMDID_STOP = 23, 236 OLECMDID_HIDETOOLBARS = 24, 237 OLECMDID_SETPROGRESSMAX = 25, 238 OLECMDID_SETPROGRESSPOS = 26, 239 OLECMDID_SETPROGRESSTEXT = 27, 240 OLECMDID_SETTITLE = 28, 241 OLECMDID_SETDOWNLOADSTATE = 29, 242 OLECMDID_STOPDOWNLOAD = 30, 243 OLECMDID_ONTOOLBARACTIVATED = 31, 244 OLECMDID_FIND = 32, 245 OLECMDID_DELETE = 33, 246 OLECMDID_HTTPEQUIV = 34, 247 OLECMDID_HTTPEQUIV_DONE = 35, 248 OLECMDID_ENABLE_INTERACTION = 36, 249 OLECMDID_ONUNLOAD = 37, 250 OLECMDID_PROPERTYBAG2 = 38, 251 OLECMDID_PREREFRESH = 39, 252 /* iexplorer uses ... 44 */ 253 OLECMDID_SHOWSCRIPTERROR = 40, 254 OLECMDID_SHOWMESSAGE = 41, 255 OLECMDID_SHOWFIND = 42, 256 OLECMDID_SHOWPAGESETUP = 43, 257 OLECMDID_SHOWPRINT = 44, 258 OLECMDID_CLOSE = 45, 259 OLECMDID_ALLOWUILESSSAVEAS = 46, 260 OLECMDID_DONTDOWNLOADCSS = 47, 261 OLECMDID_UPDATEPAGESTATUS = 48, 262 OLECMDID_PRINT2 = 49, 263 OLECMDID_PRINTPREVIEW2 = 50, 264 OLECMDID_SETPRINTTEMPLATE = 51, 265 OLECMDID_GETPRINTTEMPLATE = 52, 266 OLECMDID_PAGEACTIONBLOCKED = 55, 267 OLECMDID_PAGEACTIONUIQUERY = 56, 268 OLECMDID_FOCUSVIEWCONTROLS = 57, 269 OLECMDID_FOCUSVIEWCONTROLSQUERY = 58, 270 OLECMDID_SHOWPAGEACTIONMENU = 59, 271 OLECMDID_ADDTRAVELENTRY = 60, 272 OLECMDID_UPDATETRAVELENTRY = 61, 273 OLECMDID_UPDATEBACKFORWARDSTATE = 62, 274 OLECMDID_OPTICAL_ZOOM = 63, 275 OLECMDID_OPTICAL_GETZOOMRANGE = 64, 276 OLECMDID_WINDOWSTATECHANGED = 65, 277 OLECMDID_ACTIVEXINSTALLSCOPE = 66, 278 OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67, 279 OLECMDID_SHOWTASKDLG = 68, 280 OLECMDID_POPSTATEEVENT = 69, 281 OLECMDID_VIEWPORT_MODE = 70, 282 OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71, 283 OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72, 284 OLECMDID_USER_OPTICAL_ZOOM = 73, 285 OLECMDID_PAGEAVAILABLE = 74, 286 OLECMDID_GETUSERSCALABLE = 75, 287 OLECMDID_UPDATE_CARET = 76, 288 OLECMDID_ENABLE_VISIBILITY = 77, 289 OLECMDID_MEDIA_PLAYBACK = 78 290 } OLECMDID; 291 292 HRESULT QueryStatus( 293 [in, unique] const GUID *pguidCmdGroup, 294 [in] ULONG cCmds, 295 [in, out, size_is(cCmds)] OLECMD prgCmds[], 296 [in, out, unique] OLECMDTEXT *pCmdText); 297 298 HRESULT Exec( 299 [in, unique] const GUID *pguidCmdGroup, 300 [in] DWORD nCmdID, 301 [in] DWORD nCmdexecopt, 302 [in, unique] VARIANT *pvaIn, 303 [in, out, unique] VARIANT *pvaOut); 304} 305 306 307/***************************************************************************** 308 * IContinueCallback interface 309 */ 310[ 311 object, 312 uuid(b722bcca-4e68-101b-a2bc-00aa00404770), 313 pointer_default(unique) 314] 315interface IContinueCallback : IUnknown 316{ 317 typedef [unique] IContinueCallback *LPCONTINUECALLBACK; 318 319 HRESULT FContinue(); 320 321 HRESULT FContinuePrinting( 322 [in] LONG nCntPrinted, 323 [in] LONG nCurPage, 324 [in, unique] WCHAR *pwszPrintStatus); 325} 326 327 328/***************************************************************************** 329 * IPrint interface 330 */ 331[ 332 object, 333 uuid(b722bcc9-4e68-101b-a2bc-00aa00404770), 334 pointer_default(unique) 335] 336interface IPrint : IUnknown 337{ 338 typedef [unique] IPrint *LPPRINT; 339 340 typedef enum 341 { 342 PRINTFLAG_MAYBOTHERUSER = 1, 343 PRINTFLAG_PROMPTUSER = 2, 344 PRINTFLAG_USERMAYCHANGEPRINTER = 4, 345 PRINTFLAG_RECOMPOSETODEVICE = 8, 346 PRINTFLAG_DONTACTUALLYPRINT = 16, 347 PRINTFLAG_FORCEPROPERTIES = 32, 348 PRINTFLAG_PRINTTOFILE = 64 349 } PRINTFLAG; 350 351 typedef struct tagPAGERANGE 352 { 353 LONG nFromPage; 354 LONG nToPage; 355 } PAGERANGE; 356 357 typedef struct tagPAGESET 358 { 359 ULONG cbStruct; 360 BOOL fOddPages; 361 BOOL fEvenPages; 362 ULONG cPageRange; 363 [size_is(cPageRange)] PAGERANGE rgPages[]; 364 } PAGESET; 365 366 HRESULT SetInitialPageNum( 367 [in] LONG nFirstPage); 368 369 HRESULT GetPageInfo( 370 [out] LONG *pnFirstPage, 371 [out] LONG *pcPages); 372 373 [local] 374 HRESULT Print( 375 [in] DWORD grfFlags, 376 [in, out] DVTARGETDEVICE **pptd, 377 [in, out] PAGESET **ppPageSet, 378 [in, out, unique] STGMEDIUM *pstgmOptions, 379 [in] IContinueCallback *pcallback, 380 [in] LONG nFirstPage, 381 [out] LONG *pcPagesPrinted, 382 [out] LONG *pnLastPage); 383 384 [call_as(Print)] 385 HRESULT RemotePrint( 386 [in] DWORD grfFlags, 387 [in, out] DVTARGETDEVICE **pptd, 388 [in, out] PAGESET **pppageset, 389 [in, out, unique] RemSTGMEDIUM *pstgmOptions, 390 [in] IContinueCallback *pcallback, 391 [in] LONG nFirstPage, 392 [out] LONG *pcPagesPrinted, 393 [out] LONG *pnLastPage); 394} 395 396 397cpp_quote("#define OLECMDERR_E_FIRST (OLE_E_LAST+1)") 398cpp_quote("#define OLECMDERR_E_NOTSUPPORTED (OLECMDERR_E_FIRST)") 399cpp_quote("#define OLECMDERR_E_DISABLED (OLECMDERR_E_FIRST+1)") 400cpp_quote("#define OLECMDERR_E_NOHELP (OLECMDERR_E_FIRST+2)") 401cpp_quote("#define OLECMDERR_E_CANCELED (OLECMDERR_E_FIRST+3)") 402cpp_quote("#define OLECMDERR_E_UNKNOWNGROUP (OLECMDERR_E_FIRST+4)") 403 404cpp_quote("#define MSOCMDERR_E_FIRST OLECMDERR_E_FIRST") 405cpp_quote("#define MSOCMDERR_E_NOTSUPPORTED OLECMDERR_E_NOTSUPPORTED") 406cpp_quote("#define MSOCMDERR_E_DISABLED OLECMDERR_E_DISABLED") 407cpp_quote("#define MSOCMDERR_E_NOHELP OLECMDERR_E_NOHELP") 408cpp_quote("#define MSOCMDERR_E_CANCELED OLECMDERR_E_CANCELED") 409cpp_quote("#define MSOCMDERR_E_UNKNOWNGROUP OLECMDERR_E_UNKNOWNGROUP") 410 411cpp_quote("#define LPMSODOCUMENT LPOLEDOCUMENT") 412cpp_quote("#define LPMSODOCUMENTSITE LPOLEDOCUMENTSITE") 413cpp_quote("#define LPMSOVIEW LPOLEDOCUMENTVIEW") 414cpp_quote("#define LPENUMMSOVIEW LPENUMOLEDOCUMENTVIEWS") 415cpp_quote("#define LPMSOCOMMANDTARGET LPOLECOMMANDTARGET") 416cpp_quote("#define IID_IMsoDocument IID_IOleDocument") 417cpp_quote("#define IID_IMsoDocumentSite IID_IOleDocumentSite") 418cpp_quote("#define IID_IMsoView IID_IOleDocumentView") 419cpp_quote("#define IID_IEnumMsoView IID_IEnumOleDocumentViews") 420cpp_quote("#define IID_IMsoCommandTarget IID_IOleCommandTarget") 421 422cpp_quote("EXTERN_C const GUID SID_SContainerDispatch;") 423