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