1 /***********************************************************************\ 2 * oleidl.d * 3 * * 4 * Windows API header module * 5 * * 6 * Translated from MinGW Windows headers * 7 * * 8 * Placed into public domain * 9 \***********************************************************************/ 10 module windows.oleidl; 11 12 // DAC: This is defined in ocidl !! 13 // what is it doing in here? 14 //alias IEnumOleUndoUnits LPENUMOLEUNDOUNITS; 15 nothrow: 16 private import windows.basetyps, windows.objidl, windows.unknwn, windows.windef, 17 windows.winuser, windows.wtypes; 18 private import windows.objfwd; // for LPMONIKER 19 private import windows.wingdi; // for LPLOGPALETTE 20 21 const MK_ALT = 32; 22 23 enum BINDSPEED { 24 BINDSPEED_INDEFINITE = 1, 25 BINDSPEED_MODERATE, 26 BINDSPEED_IMMEDIATE 27 } 28 29 enum OLEWHICHMK { 30 OLEWHICHMK_CONTAINER = 1, 31 OLEWHICHMK_OBJREL, 32 OLEWHICHMK_OBJFULL 33 } 34 35 enum OLEGETMONIKER { 36 OLEGETMONIKER_ONLYIFTHERE = 1, 37 OLEGETMONIKER_FORCEASSIGN, 38 OLEGETMONIKER_UNASSIGN, 39 OLEGETMONIKER_TEMPFORUSER 40 } 41 42 enum USERCLASSTYPE { 43 USERCLASSTYPE_FULL = 1, 44 USERCLASSTYPE_SHORT, 45 USERCLASSTYPE_APPNAME 46 } 47 48 enum DROPEFFECT { 49 DROPEFFECT_NONE = 0, 50 DROPEFFECT_COPY = 1, 51 DROPEFFECT_MOVE = 2, 52 DROPEFFECT_LINK = 4, 53 DROPEFFECT_SCROLL = 0x80000000 54 } 55 56 struct OLEMENUGROUPWIDTHS { 57 LONG[6] width; 58 } 59 alias OLEMENUGROUPWIDTHS* LPOLEMENUGROUPWIDTHS; 60 61 alias HGLOBAL HOLEMENU; 62 63 enum OLECLOSE { 64 OLECLOSE_SAVEIFDIRTY, 65 OLECLOSE_NOSAVE, 66 OLECLOSE_PROMPTSAVE 67 } 68 69 struct OLEVERB { 70 LONG lVerb; 71 LPWSTR lpszVerbName; 72 DWORD fuFlags; 73 DWORD grfAttribs; 74 } 75 alias OLEVERB* LPOLEVERB; 76 77 alias RECT BORDERWIDTHS; 78 alias LPRECT LPBORDERWIDTHS; 79 alias LPCRECT LPCBORDERWIDTHS; 80 81 struct OLEINPLACEFRAMEINFO { 82 UINT cb; 83 BOOL fMDIApp; 84 HWND hwndFrame; 85 HACCEL haccel; 86 UINT cAccelEntries; 87 } 88 alias OLEINPLACEFRAMEINFO* LPOLEINPLACEFRAMEINFO; 89 90 interface IEnumOLEVERB : IUnknown 91 { 92 HRESULT Next(ULONG,OLEVERB*,ULONG*); 93 HRESULT Skip(ULONG); 94 HRESULT Reset(); 95 HRESULT Clone(IEnumOLEVERB*); 96 } 97 //alias IEnumOLEVERB IEnumOleVerb; 98 alias IEnumOLEVERB LPENUMOLEVERB; 99 100 101 interface IParseDisplayName : IUnknown { 102 HRESULT ParseDisplayName(IBindCtx,LPOLESTR,ULONG*,IMoniker*); 103 } 104 alias IParseDisplayName LPPARSEDISPLAYNAME; 105 106 interface IOleContainer : IParseDisplayName { 107 HRESULT EnumObjects(DWORD,IEnumUnknown*); 108 HRESULT LockContainer(BOOL); 109 } 110 alias IOleContainer LPOLECONTAINER; 111 112 interface IOleItemContainer : IOleContainer { 113 HRESULT GetObject(LPOLESTR,DWORD,IBindCtx,REFIID,void**); 114 HRESULT GetObjectStorage(LPOLESTR,IBindCtx,REFIID,void**); 115 HRESULT IsRunning(LPOLESTR); 116 } 117 118 119 interface IOleClientSite : IUnknown { 120 HRESULT SaveObject(); 121 HRESULT GetMoniker(DWORD,DWORD,LPMONIKER*); 122 HRESULT GetContainer(LPOLECONTAINER*); 123 HRESULT ShowObject(); 124 HRESULT OnShowWindow(BOOL); 125 HRESULT RequestNewObjectLayout(); 126 } 127 alias IOleClientSite LPOLECLIENTSITE; 128 129 interface IOleObject : IUnknown { 130 HRESULT SetClientSite(LPOLECLIENTSITE); 131 HRESULT GetClientSite(LPOLECLIENTSITE*); 132 HRESULT SetHostNames(LPCOLESTR,LPCOLESTR); 133 HRESULT Close(DWORD); 134 HRESULT SetMoniker(DWORD,LPMONIKER); 135 HRESULT GetMoniker(DWORD,DWORD,LPMONIKER*); 136 HRESULT InitFromData(LPDATAOBJECT,BOOL,DWORD); 137 HRESULT GetClipboardData(DWORD,LPDATAOBJECT*); 138 HRESULT DoVerb(LONG,LPMSG,LPOLECLIENTSITE,LONG,HWND,LPCRECT); 139 HRESULT EnumVerbs(LPENUMOLEVERB*); 140 HRESULT Update(); 141 HRESULT IsUpToDate(); 142 HRESULT GetUserClassID(LPCLSID); 143 HRESULT GetUserType(DWORD,LPOLESTR*); 144 HRESULT SetExtent(DWORD,SIZEL*); 145 HRESULT GetExtent(DWORD,SIZEL*); 146 HRESULT Advise(LPADVISESINK,PDWORD); 147 HRESULT Unadvise(DWORD); 148 HRESULT EnumAdvise(LPENUMSTATDATA*); 149 HRESULT GetMiscStatus(DWORD,PDWORD); 150 HRESULT SetColorScheme(LPLOGPALETTE); 151 } 152 alias IOleObject LPOLEOBJECT; 153 154 interface IOleWindow : IUnknown { 155 HRESULT GetWindow(HWND*); 156 HRESULT ContextSensitiveHelp(BOOL); 157 } 158 alias IOleWindow LPOLEWINDOW; 159 160 interface IOleInPlaceUIWindow : IOleWindow { 161 HRESULT GetBorder(LPRECT); 162 HRESULT RequestBorderSpace(LPCBORDERWIDTHS); 163 HRESULT SetBorderSpace(LPCBORDERWIDTHS); 164 HRESULT SetActiveObject(LPOLEINPLACEACTIVEOBJECT,LPCOLESTR); 165 } 166 alias IOleInPlaceUIWindow LPOLEINPLACEUIWINDOW; 167 168 interface IOleInPlaceObject : IOleWindow { 169 HRESULT InPlaceDeactivate(); 170 HRESULT UIDeactivate(); 171 HRESULT SetObjectRects(LPCRECT,LPCRECT); 172 HRESULT ReactivateAndUndo(); 173 } 174 175 176 interface IOleInPlaceActiveObject : IOleWindow { 177 HRESULT TranslateAccelerator(LPMSG); 178 HRESULT OnFrameWindowActivate(BOOL); 179 HRESULT OnDocWindowActivate(BOOL); 180 HRESULT ResizeBorder(LPCRECT,LPOLEINPLACEUIWINDOW,BOOL); 181 HRESULT EnableModeless(BOOL); 182 } 183 alias IOleInPlaceActiveObject LPOLEINPLACEACTIVEOBJECT; 184 185 interface IOleInPlaceFrame : IOleInPlaceUIWindow { 186 HRESULT InsertMenus(HMENU,LPOLEMENUGROUPWIDTHS); 187 HRESULT SetMenu(HMENU,HOLEMENU,HWND); 188 HRESULT RemoveMenus(HMENU); 189 HRESULT SetStatusText(LPCOLESTR); 190 HRESULT EnableModeless(BOOL); 191 HRESULT TranslateAccelerator(LPMSG,WORD); 192 } 193 alias IOleInPlaceFrame LPOLEINPLACEFRAME; 194 195 interface IOleInPlaceSite : IOleWindow { 196 HRESULT CanInPlaceActivate(); 197 HRESULT OnInPlaceActivate(); 198 HRESULT OnUIActivate(); 199 HRESULT GetWindowContext(IOleInPlaceFrame,IOleInPlaceUIWindow,LPRECT,LPRECT,LPOLEINPLACEFRAMEINFO); 200 HRESULT Scroll(SIZE); 201 HRESULT OnUIDeactivate(BOOL); 202 HRESULT OnInPlaceDeactivate(); 203 HRESULT DiscardUndoState(); 204 HRESULT DeactivateAndUndo(); 205 HRESULT OnPosRectChange(LPCRECT); 206 } 207 208 interface IOleAdviseHolder : IUnknown { 209 HRESULT Advise(LPADVISESINK,PDWORD); 210 HRESULT Unadvise(DWORD); 211 HRESULT EnumAdvise(LPENUMSTATDATA*); 212 HRESULT SendOnRename(LPMONIKER); 213 HRESULT SendOnSave(); 214 HRESULT SendOnClose(); 215 } 216 alias IOleAdviseHolder LPOLEADVISEHOLDER; 217 218 interface IDropSource : IUnknown { 219 HRESULT QueryContinueDrag(BOOL,DWORD); 220 HRESULT GiveFeedback(DWORD); 221 } 222 alias IDropSource LPDROPSOURCE; 223 224 interface IDropTarget : IUnknown { 225 HRESULT DragEnter(LPDATAOBJECT,DWORD,POINTL,PDWORD); 226 HRESULT DragOver(DWORD,POINTL,PDWORD); 227 HRESULT DragLeave(); 228 HRESULT Drop(LPDATAOBJECT,DWORD,POINTL,PDWORD); 229 } 230 alias IDropTarget LPDROPTARGET; 231 232 extern (Windows) { 233 alias BOOL function(DWORD) __IView_pfncont; 234 } 235 236 interface IViewObject : IUnknown { 237 HRESULT Draw(DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,HDC,LPCRECTL,LPCRECTL,__IView_pfncont pfnContinue,DWORD); 238 HRESULT GetColorSet(DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,LPLOGPALETTE*); 239 HRESULT Freeze(DWORD,LONG,PVOID,PDWORD); 240 HRESULT Unfreeze(DWORD); 241 HRESULT SetAdvise(DWORD,DWORD,IAdviseSink); 242 HRESULT GetAdvise(PDWORD,PDWORD,IAdviseSink*); 243 } 244 alias IViewObject LPVIEWOBJECT; 245 246 interface IViewObject2 : IViewObject { 247 HRESULT GetExtent(DWORD,LONG,DVTARGETDEVICE*,LPSIZEL); 248 } 249 alias IViewObject2 LPVIEWOBJECT2; 250 251 interface IOleCache : IUnknown { 252 HRESULT Cache(FORMATETC*,DWORD,DWORD*); 253 HRESULT Uncache(DWORD); 254 HRESULT EnumCache(IEnumSTATDATA*); 255 HRESULT InitCache(LPDATAOBJECT); 256 HRESULT SetData(FORMATETC*,STGMEDIUM*,BOOL); 257 } 258 alias IOleCache LPOLECACHE; 259 260 interface IOleCache2 : IOleCache { 261 HRESULT UpdateCache(LPDATAOBJECT,DWORD,LPVOID); 262 HRESULT DiscardCache(DWORD); 263 } 264 alias IOleCache2 LPOLECACHE2; 265 266 interface IOleCacheControl : IUnknown { 267 HRESULT OnRun(LPDATAOBJECT); 268 HRESULT OnStop(); 269 } 270 alias IOleCacheControl LPOLECACHECONTROL;