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/_olectl.d) 8 */ 9 /// Automatically imported and edited from the druntime module 10 /// core.sys.windows.olectl for the auto-generated win32 package. 11 module win32.olectl; 12 //version (Windows): 13 @system: 14 15 // In conversion from MinGW, the following was deleted: 16 //#define FONTSIZE(n) {n##0000, 0} 17 18 import win32.ocidl, win32.olectlid; 19 import win32.basetyps, win32.oaidl, win32.oleauto, win32.unknwn, 20 win32.windef, win32.wingdi, win32.winuser, win32.wtypes; 21 import win32.ntdef; // for NTSTATUS 22 import win32.objfwd; // for LPSTREAM 23 import win32.winerror; // for SCODE 24 25 26 private { 27 // These replace C macros. 28 template ITF_ERROR_SCODE_FOR_D(int c) 29 { 30 enum SCODE ITF_ERROR_SCODE_FOR_D 31 = (SEVERITY_ERROR << 31) | (FACILITY_ITF << 16) | c; 32 } 33 34 template ITF_SUCCESS_SCODE_FOR_D(int c) 35 { 36 enum SCODE ITF_SUCCESS_SCODE_FOR_D 37 = (SEVERITY_SUCCESS << 31) | (FACILITY_ITF << 16) | c; 38 } 39 40 template STD_CTL_SCODE(int c) 41 { 42 enum SCODE STD_CTL_SCODE 43 = (SEVERITY_ERROR << 31) | (FACILITY_CONTROL << 16) | c; 44 } 45 } 46 47 enum : SCODE { 48 CTL_E_ILLEGALFUNCTIONCALL = STD_CTL_SCODE!(5), 49 CTL_E_OVERFLOW = STD_CTL_SCODE!(6), 50 CTL_E_OUTOFMEMORY = STD_CTL_SCODE!(7), 51 CTL_E_DIVISIONBYZERO = STD_CTL_SCODE!(11), 52 CTL_E_OUTOFSTRINGSPACE = STD_CTL_SCODE!(14), 53 CTL_E_OUTOFSTACKSPACE = STD_CTL_SCODE!(28), 54 CTL_E_BADFILENAMEORNUMBER = STD_CTL_SCODE!(52), 55 CTL_E_FILENOTFOUND = STD_CTL_SCODE!(53), 56 CTL_E_BADFILEMODE = STD_CTL_SCODE!(54), 57 CTL_E_FILEALREADYOPEN = STD_CTL_SCODE!(55), 58 CTL_E_DEVICEIOERROR = STD_CTL_SCODE!(57), 59 CTL_E_FILEALREADYEXISTS = STD_CTL_SCODE!(58), 60 CTL_E_BADRECORDLENGTH = STD_CTL_SCODE!(59), 61 CTL_E_DISKFULL = STD_CTL_SCODE!(61), 62 CTL_E_BADRECORDNUMBER = STD_CTL_SCODE!(63), 63 CTL_E_BADFILENAME = STD_CTL_SCODE!(64), 64 CTL_E_TOOMANYFILES = STD_CTL_SCODE!(67), 65 CTL_E_DEVICEUNAVAILABLE = STD_CTL_SCODE!(68), 66 CTL_E_PERMISSIONDENIED = STD_CTL_SCODE!(70), 67 CTL_E_DISKNOTREADY = STD_CTL_SCODE!(71), 68 CTL_E_PATHFILEACCESSERROR = STD_CTL_SCODE!(75), 69 CTL_E_PATHNOTFOUND = STD_CTL_SCODE!(76), 70 CTL_E_INVALIDPATTERNSTRING = STD_CTL_SCODE!(93), 71 CTL_E_INVALIDUSEOFNULL = STD_CTL_SCODE!(94), 72 CTL_E_INVALIDFILEFORMAT = STD_CTL_SCODE!(321), 73 CTL_E_INVALIDPROPERTYVALUE = STD_CTL_SCODE!(380), 74 CTL_E_INVALIDPROPERTYARRAYINDEX = STD_CTL_SCODE!(381), 75 CTL_E_SETNOTSUPPORTEDATRUNTIME = STD_CTL_SCODE!(382), 76 CTL_E_SETNOTSUPPORTED = STD_CTL_SCODE!(383), 77 CTL_E_NEEDPROPERTYARRAYINDEX = STD_CTL_SCODE!(385), 78 CTL_E_SETNOTPERMITTED = STD_CTL_SCODE!(387), 79 CTL_E_GETNOTSUPPORTEDATRUNTIME = STD_CTL_SCODE!(393), 80 CTL_E_GETNOTSUPPORTED = STD_CTL_SCODE!(394), 81 CTL_E_PROPERTYNOTFOUND = STD_CTL_SCODE!(422), 82 CTL_E_INVALIDCLIPBOARDFORMAT = STD_CTL_SCODE!(460), 83 CTL_E_INVALIDPICTURE = STD_CTL_SCODE!(481), 84 CTL_E_PRINTERERROR = STD_CTL_SCODE!(482), 85 CTL_E_CANTSAVEFILETOTEMP = STD_CTL_SCODE!(735), 86 CTL_E_SEARCHTEXTNOTFOUND = STD_CTL_SCODE!(744), 87 CTL_E_REPLACEMENTSTOOLONG = STD_CTL_SCODE!(746), 88 CTL_E_CUSTOM_FIRST = STD_CTL_SCODE!(600) 89 } 90 91 enum SCODE CLASS_E_NOTLICENSED = CLASSFACTORY_E_FIRST+2; 92 93 enum : SCODE { 94 CONNECT_E_FIRST = ITF_ERROR_SCODE_FOR_D!(0x200), 95 CONNECT_E_LAST = ITF_ERROR_SCODE_FOR_D!(0x20F), 96 CONNECT_S_FIRST = ITF_SUCCESS_SCODE_FOR_D!(0x200), 97 CONNECT_S_LAST = ITF_SUCCESS_SCODE_FOR_D!(0x20F), 98 CONNECT_E_NOCONNECTION = CONNECT_E_FIRST + 0, 99 CONNECT_E_ADVISELIMIT = CONNECT_E_FIRST + 1, 100 CONNECT_E_CANNOTCONNECT = CONNECT_E_FIRST + 2, 101 CONNECT_E_OVERRIDDEN = CONNECT_E_FIRST + 3, 102 103 SELFREG_E_FIRST = ITF_ERROR_SCODE_FOR_D!(0x200), 104 SELFREG_E_LAST = ITF_ERROR_SCODE_FOR_D!(0x20F), 105 SELFREG_S_FIRST = ITF_SUCCESS_SCODE_FOR_D!(0x200), 106 SELFREG_S_LAST = ITF_SUCCESS_SCODE_FOR_D!(0x20F), 107 SELFREG_E_TYPELIB = SELFREG_E_FIRST + 0, 108 SELFREG_E_CLASS = SELFREG_E_FIRST + 1, 109 110 PERPROP_E_FIRST = ITF_ERROR_SCODE_FOR_D!(0x200), 111 PERPROP_E_LAST = ITF_ERROR_SCODE_FOR_D!(0x20F), 112 PERPROP_S_FIRST = ITF_SUCCESS_SCODE_FOR_D!(0x200), 113 PERPROP_S_LAST = ITF_SUCCESS_SCODE_FOR_D!(0x20F), 114 PERPROP_E_NOPAGEAVAILABLE = PERPROP_E_FIRST 115 } 116 117 enum { 118 OLEMISC_RECOMPOSEONRESIZE = 0x1, 119 OLEMISC_ONLYICONIC = 0x2, 120 OLEMISC_INSERTNOTREPLACE = 0x4, 121 OLEMISC_STATIC = 0x8, 122 OLEMISC_CANTLINKINSIDE = 0x10, 123 OLEMISC_CANLINKBYOLE1 = 0x20, 124 OLEMISC_ISLINKOBJECT = 0x40, 125 OLEMISC_INSIDEOUT = 0x80, 126 OLEMISC_ACTIVATEWHENVISIBLE = 0x100, 127 OLEMISC_RENDERINGISDEVICEINDEPENDENT = 0x200, 128 OLEMISC_INVISIBLEATRUNTIME = 0x400, 129 OLEMISC_ALWAYSRUN = 0x800, 130 OLEMISC_ACTSLIKEBUTTON = 0x1000, 131 OLEMISC_ACTSLIKELABEL = 0x2000, 132 OLEMISC_NOUIACTIVATE = 0x4000, 133 OLEMISC_ALIGNABLE = 0x8000, 134 OLEMISC_SIMPLEFRAME = 0x10000, 135 OLEMISC_SETCLIENTSITEFIRST = 0x20000, 136 OLEMISC_IMEMODE = 0x40000, 137 OLEMISC_IGNOREACTIVATEWHENVISIBLE = 0x80000, 138 OLEMISC_WANTSTOMENUMERGE = 0x100000, 139 OLEMISC_SUPPORTSMULTILEVELUNDO = 0x200000 140 } 141 enum OLEIVERB_PROPERTIES = -7; 142 143 enum VT_STREAMED_PROPSET = 73; 144 enum VT_STORED_PROPSET = 74; 145 enum VT_BLOB_PROPSET = 75; 146 enum VT_VERBOSE_ENUM = 76; 147 enum VT_COLOR = VARENUM.VT_I4; 148 enum VT_XPOS_PIXELS = VARENUM.VT_I4; 149 enum VT_YPOS_PIXELS = VARENUM.VT_I4; 150 enum VT_XSIZE_PIXELS = VARENUM.VT_I4; 151 enum VT_YSIZE_PIXELS = VARENUM.VT_I4; 152 enum VT_XPOS_HIMETRIC = VARENUM.VT_I4; 153 enum VT_YPOS_HIMETRIC = VARENUM.VT_I4; 154 enum VT_XSIZE_HIMETRIC = VARENUM.VT_I4; 155 enum VT_YSIZE_HIMETRIC = VARENUM.VT_I4; 156 enum VT_TRISTATE = VARENUM.VT_I2; 157 enum VT_OPTEXCLUSIVE = VARENUM.VT_BOOL; 158 enum VT_FONT = VARENUM.VT_DISPATCH; 159 enum VT_PICTURE = VARENUM.VT_DISPATCH; 160 enum VT_HANDLE = VARENUM.VT_I4; 161 162 enum { 163 OCM__BASE = WM_USER + 0x1c00, 164 OCM_COMMAND = OCM__BASE + WM_COMMAND, 165 OCM_CTLCOLORBTN = OCM__BASE + WM_CTLCOLORBTN, 166 OCM_CTLCOLOREDIT = OCM__BASE + WM_CTLCOLOREDIT, 167 OCM_CTLCOLORDLG = OCM__BASE + WM_CTLCOLORDLG, 168 OCM_CTLCOLORLISTBOX = OCM__BASE + WM_CTLCOLORLISTBOX, 169 OCM_CTLCOLORMSGBOX = OCM__BASE + WM_CTLCOLORMSGBOX, 170 OCM_CTLCOLORSCROLLBAR = OCM__BASE + WM_CTLCOLORSCROLLBAR, 171 OCM_CTLCOLORSTATIC = OCM__BASE + WM_CTLCOLORSTATIC, 172 OCM_DRAWITEM = OCM__BASE + WM_DRAWITEM, 173 OCM_MEASUREITEM = OCM__BASE + WM_MEASUREITEM, 174 OCM_DELETEITEM = OCM__BASE + WM_DELETEITEM, 175 OCM_VKEYTOITEM = OCM__BASE + WM_VKEYTOITEM, 176 OCM_CHARTOITEM = OCM__BASE + WM_CHARTOITEM, 177 OCM_COMPAREITEM = OCM__BASE + WM_COMPAREITEM, 178 OCM_HSCROLL = OCM__BASE + WM_HSCROLL, 179 OCM_VSCROLL = OCM__BASE + WM_VSCROLL, 180 OCM_PARENTNOTIFY = OCM__BASE + WM_PARENTNOTIFY, 181 OCM_NOTIFY = OCM__BASE + WM_NOTIFY 182 } 183 184 enum { 185 CTRLINFO_EATS_RETURN = 1, 186 CTRLINFO_EATS_ESCAPE 187 } 188 189 enum { 190 XFORMCOORDS_POSITION = 1, 191 XFORMCOORDS_SIZE = 2, 192 XFORMCOORDS_HIMETRICTOCONTAINER = 4, 193 XFORMCOORDS_CONTAINERTOHIMETRIC = 8 194 } 195 196 enum GUIDKIND_DEFAULT_SOURCE_DISP_IID = 1; 197 198 enum { 199 PROPPAGESTATUS_DIRTY = 1, 200 PROPPAGESTATUS_VALIDATE = 2 201 } 202 203 enum { 204 PICTURE_SCALABLE = 1, 205 PICTURE_TRANSPARENT = 2 206 } 207 208 enum { 209 PICTYPE_UNINITIALIZED = -1, 210 PICTYPE_NONE, // = 0 211 PICTYPE_BITMAP, 212 PICTYPE_METAFILE, 213 PICTYPE_ICON, 214 PICTYPE_ENHMETAFILE // = 4 215 } 216 217 enum { 218 DISPID_AUTOSIZE = -500, 219 DISPID_BACKCOLOR = -501, 220 DISPID_BACKSTYLE = -502, 221 DISPID_BORDERCOLOR = -503, 222 DISPID_BORDERSTYLE = -504, 223 DISPID_BORDERWIDTH = -505, 224 DISPID_DRAWMODE = -507, 225 DISPID_DRAWSTYLE = -508, 226 DISPID_DRAWWIDTH = -509, 227 DISPID_FILLCOLOR = -510, 228 DISPID_FILLSTYLE = -511, 229 DISPID_FONT = -512, 230 DISPID_FORECOLOR = -513, 231 DISPID_ENABLED = -514, 232 DISPID_HWND = -515, 233 DISPID_TABSTOP = -516, 234 DISPID_TEXT = -517, 235 DISPID_CAPTION = -518, 236 DISPID_BORDERVISIBLE = -519, 237 DISPID_APPEARANCE = -520, 238 DISPID_MOUSEPOINTER = -521, 239 DISPID_MOUSEICON = -522, 240 DISPID_PICTURE = -523, 241 DISPID_VALID = -524, 242 DISPID_REFRESH = -550, 243 DISPID_DOCLICK = -551, 244 DISPID_ABOUTBOX = -552, 245 DISPID_CLICK = -600, 246 DISPID_DBLCLICK = -601, 247 DISPID_KEYDOWN = -602, 248 DISPID_KEYPRESS = -603, 249 DISPID_KEYUP = -604, 250 DISPID_MOUSEDOWN = -605, 251 DISPID_MOUSEMOVE = -606, 252 DISPID_MOUSEUP = -607, 253 DISPID_ERROREVENT = -608, 254 DISPID_AMBIENT_BACKCOLOR = -701, 255 DISPID_AMBIENT_DISPLAYNAME = -702, 256 DISPID_AMBIENT_FONT = -703, 257 DISPID_AMBIENT_FORECOLOR = -704, 258 DISPID_AMBIENT_LOCALEID = -705, 259 DISPID_AMBIENT_MESSAGEREFLECT = -706, 260 DISPID_AMBIENT_SCALEUNITS = -707, 261 DISPID_AMBIENT_TEXTALIGN = -708, 262 DISPID_AMBIENT_USERMODE = -709, 263 DISPID_AMBIENT_UIDEAD = -710, 264 DISPID_AMBIENT_SHOWGRABHANDLES = -711, 265 DISPID_AMBIENT_SHOWHATCHING = -712, 266 DISPID_AMBIENT_DISPLAYASDEFAULT = -713, 267 DISPID_AMBIENT_SUPPORTSMNEMONICS = -714, 268 DISPID_AMBIENT_AUTOCLIP = -715, 269 DISPID_AMBIENT_APPEARANCE = -716, 270 DISPID_AMBIENT_CODEPAGE = -725, 271 DISPID_AMBIENT_PALETTE = -726, 272 DISPID_AMBIENT_CHARSET = -727, 273 DISPID_AMBIENT_RIGHTTOLEFT = -732, 274 DISPID_AMBIENT_TOPTOBOTTOM = -733 275 } 276 277 enum { 278 DISPID_FONT_NAME = 0, 279 DISPID_FONT_SIZE = 2, 280 DISPID_FONT_BOLD, 281 DISPID_FONT_ITALIC, 282 DISPID_FONT_UNDER, 283 DISPID_FONT_STRIKE, 284 DISPID_FONT_WEIGHT, 285 DISPID_FONT_CHARSET // = 8 286 } 287 288 enum { 289 DISPID_PICT_HANDLE = 0, 290 DISPID_PICT_HPAL = 2, 291 DISPID_PICT_TYPE, 292 DISPID_PICT_WIDTH, 293 DISPID_PICT_HEIGHT, 294 DISPID_PICT_RENDER // = 6 295 } 296 297 alias IOleControl LPOLECONTROL; 298 alias IOleControlSite LPOLECONTROLSITE; 299 alias ISimpleFrameSite LPSIMPLEFRAMESITE; 300 alias IPersistPropertyBag LPPERSISTPROPERTYBAG; 301 alias IPersistStreamInit LPPERSISTSTREAMINIT; 302 alias IPersistMemory LPPERSISTMEMORY; 303 alias IPropertyNotifySink LPPROPERTYNOTIFYSINK; 304 alias IProvideClassInfo LPPROVIDECLASSINFO; 305 alias IProvideClassInfo2 LPPROVIDECLASSINFO2; 306 alias IConnectionPointContainer LPCONNECTIONPOINTCONTAINER; 307 alias IClassFactory2 LPCLASSFACTORY2; 308 alias ISpecifyPropertyPages LPSPECIFYPROPERTYPAGES; 309 alias IPerPropertyBrowsing LPPERPROPERTYBROWSING; 310 alias IPropertyPage LPPROPERTYPAGE; 311 alias IPropertyPage2 LPPROPERTYPAGE2; 312 313 alias IPicture LPPICTURE; 314 alias IPictureDisp LPPICTUREDISP; 315 alias int OLE_XPOS_PIXELS; 316 alias int OLE_YPOS_PIXELS; 317 alias int OLE_XSIZE_PIXELS; 318 alias int OLE_YSIZE_PIXELS; 319 alias float OLE_XPOS_CONTAINER; 320 alias float OLE_YPOS_CONTAINER; 321 alias float OLE_XSIZE_CONTAINER; 322 323 alias VARIANT_BOOL OLE_OPTEXCLUSIVE; 324 alias VARIANT_BOOL OLE_CANCELBOOL; 325 alias VARIANT_BOOL OLE_ENABLEDEFAULTBOOL; 326 327 align(8): 328 329 enum OLE_TRISTATE { 330 triUnchecked, 331 triChecked1, 332 triGray 333 } 334 335 struct OCPFIPARAMS { 336 ULONG cbStructSize; 337 HWND hWndOwner; 338 int x; 339 int y; 340 LPCOLESTR lpszCaption; 341 ULONG cObjects; 342 LPUNKNOWN *lplpUnk; 343 ULONG cPages; 344 CLSID *lpPages; 345 LCID lcid; 346 DISPID dispidInitialProperty; 347 } 348 alias OCPFIPARAMS* LPOCPFIPARAMS; 349 350 struct FONTDESC { 351 UINT cbSizeofstruct; 352 LPOLESTR lpstrName; 353 CY cySize; 354 SHORT sWeight; 355 SHORT sCharset; 356 BOOL fItalic; 357 BOOL fUnderline; 358 BOOL fStrikethrough; 359 } 360 alias FONTDESC* LPFONTDESC; 361 362 struct PICTDESC 363 { 364 UINT cbSizeofstruct; 365 UINT picType; 366 union { 367 struct _bmp { 368 HBITMAP hbitmap; 369 HPALETTE hpal; 370 } 371 _bmp bmp; 372 struct _wmf { 373 HMETAFILE hmeta; 374 int xExt; 375 int yExt; 376 } 377 _wmf wmf; 378 struct _icon { 379 HICON hicon; 380 } 381 _icon icon; 382 struct _emf { 383 HENHMETAFILE hemf; 384 } 385 _emf emf; 386 } 387 } 388 alias PICTDESC* LPPICTDESC; 389 390 extern(Windows) { 391 HRESULT DllRegisterServer(); 392 HRESULT DllUnregisterServer(); 393 HRESULT OleCreateFontIndirect(LPFONTDESC, REFIID, PVOID*); 394 HRESULT OleCreatePictureIndirect(LPPICTDESC, REFIID, BOOL, PVOID*); 395 HRESULT OleCreatePropertyFrame(HWND, UINT, UINT, LPCOLESTR, ULONG, LPUNKNOWN*, ULONG, LPCLSID, LCID, DWORD, PVOID); 396 HRESULT OleCreatePropertyFrameIndirect(LPOCPFIPARAMS); 397 HCURSOR OleIconToCursor(HINSTANCE, HICON); 398 HRESULT OleLoadPicture(LPSTREAM, LONG, BOOL, REFIID, PVOID*); 399 HRESULT OleLoadPictureEx(LPSTREAM, LONG, BOOL, REFIID, DWORD, DWORD, DWORD, LPVOID*); 400 HRESULT OleLoadPicturePath(LPOLESTR, LPUNKNOWN, DWORD, OLE_COLOR, REFIID, LPVOID*); 401 HRESULT OleLoadPictureFile(VARIANT, LPDISPATCH*); 402 HRESULT OleLoadPictureFileEx(VARIANT, DWORD, DWORD, DWORD, LPDISPATCH*); 403 HRESULT OleSavePictureFile(LPDISPATCH, BSTR); 404 HRESULT OleTranslateColor(OLE_COLOR, HPALETTE, COLORREF*); 405 }