1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms. 6 use ctypes::{c_int, c_void}; 7 use shared::guiddef::{REFGUID, REFIID}; 8 use shared::minwindef::{BOOL, DWORD, UINT, ULONG, WORD}; 9 use shared::windef::{HICON, HWND, RECT}; 10 use um::commctrl::HIMAGELIST; 11 use um::objidl::IBindCtx; 12 use um::unknwnbase::{IUnknown, IUnknownVtbl}; 13 use um::winnt::{HRESULT, LPCWSTR, LPWSTR, ULONGLONG, WCHAR}; 14 DEFINE_GUID!{CLSID_TaskbarList, 15 0x56fdf344, 0xfd6d, 0x11d0, 0x95, 0x8a, 0x00, 0x60, 0x97, 0xc9, 0xa0, 0x90} 16 DEFINE_GUID!{CLSID_FileOpenDialog, 17 0xdc1c5a9c, 0xe88a, 0x4dde, 0xa5, 0xa1, 0x60, 0xf8, 0x2a, 0x20, 0xae, 0xf7} 18 DEFINE_GUID!{CLSID_FileSaveDialog, 19 0xc0b4e2f3, 0xba21, 0x4773, 0x8d, 0xba, 0x33, 0x5e, 0xc9, 0x46, 0xeb, 0x8b} 20 //4498 21 ENUM!{enum SHCONTF { 22 SHCONTF_CHECKING_FOR_CHILDREN = 0x10, 23 SHCONTF_FOLDERS = 0x20, 24 SHCONTF_NONFOLDERS = 0x40, 25 SHCONTF_INCLUDEHIDDEN = 0x80, 26 SHCONTF_INIT_ON_FIRST_NEXT = 0x100, 27 SHCONTF_NETPRINTERSRCH = 0x200, 28 SHCONTF_SHAREABLE = 0x400, 29 SHCONTF_STORAGE = 0x800, 30 SHCONTF_NAVIGATION_ENUM = 0x1000, 31 SHCONTF_FASTITEMS = 0x2000, 32 SHCONTF_FLATLIST = 0x4000, 33 SHCONTF_ENABLE_ASYNC = 0x8000, 34 SHCONTF_INCLUDESUPERHIDDEN = 0x10000, 35 }} 36 pub type SFGAOF = ULONG; 37 //9466 38 ENUM!{enum SIGDN { 39 SIGDN_NORMALDISPLAY = 0, 40 SIGDN_PARENTRELATIVEPARSING = 0x80018001, 41 SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000, 42 SIGDN_PARENTRELATIVEEDITING = 0x80031001, 43 SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000, 44 SIGDN_FILESYSPATH = 0x80058000, 45 SIGDN_URL = 0x80068000, 46 SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8007c001, 47 SIGDN_PARENTRELATIVE = 0x80080001, 48 SIGDN_PARENTRELATIVEFORUI = 0x80094001, 49 }} 50 ENUM!{enum SICHINTF { 51 SICHINT_DISPLAY = 0, 52 SICHINT_ALLFIELDS = 0x80000000, 53 SICHINT_CANONICAL = 0x10000000, 54 SICHINT_TEST_FILESYSPATH_IF_NOT_EQUAL = 0x20000000, 55 }} 56 RIDL!{#[uuid(0x43826d1e, 0xe718, 0x42ee, 0xbc, 0x55, 0xa1, 0xe2, 0x61, 0xc3, 0x7b, 0xfe)] 57 interface IShellItem(IShellItemVtbl): IUnknown(IUnknownVtbl) { 58 fn BindToHandler( 59 pbc: *mut IBindCtx, 60 bhid: REFGUID, 61 riid: REFIID, 62 ppv: *mut *mut c_void, 63 ) -> HRESULT, 64 fn GetParent( 65 ppsi: *mut *mut IShellItem, 66 ) -> HRESULT, 67 fn GetDisplayName( 68 sigdnName: SIGDN, 69 ppszName: *mut LPWSTR, 70 ) -> HRESULT, 71 fn GetAttributes( 72 sfgaoMask: SFGAOF, 73 psfgaoAttribs: *mut SFGAOF, 74 ) -> HRESULT, 75 fn Compare( 76 psi: *mut IShellItem, 77 hint: SICHINTF, 78 piOrder: *mut c_int, 79 ) -> HRESULT, 80 }} 81 //20869 82 RIDL!{#[uuid(0xb4db1657, 0x70d7, 0x485e, 0x8e, 0x3e, 0x6f, 0xcb, 0x5a, 0x5c, 0x18, 0x02)] 83 interface IModalWindow(IModalWindowVtbl): IUnknown(IUnknownVtbl) { 84 fn Show( 85 hwndOwner: HWND, 86 ) -> HRESULT, 87 }} 88 //22307 89 //27457 90 RIDL!{#[uuid(0x2659b475, 0xeeb8, 0x48b7, 0x8f, 0x07, 0xb3, 0x78, 0x81, 0x0f, 0x48, 0xcf)] 91 interface IShellItemFilter(IShellItemFilterVtbl): IUnknown(IUnknownVtbl) { 92 fn IncludeItem( 93 psi: *mut IShellItem, 94 ) -> HRESULT, 95 fn GetEnumFlagsForItem( 96 psi: *mut IShellItem, 97 pgrfFlags: *mut SHCONTF, 98 ) -> HRESULT, 99 }} 100 RIDL!{#[uuid(0x56fdf342, 0xfd6d, 0x11d0, 0x95, 0x8a, 0x00, 0x60, 0x97, 0xc9, 0xa0, 0x90)] 101 interface ITaskbarList(ITaskbarListVtbl): IUnknown(IUnknownVtbl) { 102 fn HrInit() -> HRESULT, 103 fn AddTab( 104 hwnd: HWND, 105 ) -> HRESULT, 106 fn DeleteTab( 107 hwnd: HWND, 108 ) -> HRESULT, 109 fn ActivateTab( 110 hwnd: HWND, 111 ) -> HRESULT, 112 fn SetActiveAlt( 113 hwnd: HWND, 114 ) -> HRESULT, 115 }} 116 RIDL!{#[uuid(0x602d4995, 0xb13a, 0x429b, 0xa6, 0x6e, 0x19, 0x35, 0xe4, 0x4f, 0x43, 0x17)] 117 interface ITaskbarList2(ITaskbarList2Vtbl): ITaskbarList(ITaskbarListVtbl) { 118 fn MarkFullscreenWindow( 119 hwnd: HWND, 120 fFullscreen: BOOL, 121 ) -> HRESULT, 122 }} 123 ENUM!{enum THUMBBUTTONFLAGS { 124 THBF_ENABLED = 0, 125 THBF_DISABLED = 0x1, 126 THBF_DISMISSONCLICK = 0x2, 127 THBF_NOBACKGROUND = 0x4, 128 THBF_HIDDEN = 0x8, 129 THBF_NONINTERACTIVE = 0x10, 130 }} 131 ENUM!{enum THUMBBUTTONMASK { 132 THB_BITMAP = 0x1, 133 THB_ICON = 0x2, 134 THB_TOOLTIP = 0x4, 135 THB_FLAGS = 0x8, 136 }} 137 STRUCT!{struct THUMBBUTTON { 138 dwMask: THUMBBUTTONMASK, 139 iId: UINT, 140 iBitmap: UINT, 141 hIcon: HICON, 142 szTip: [WCHAR; 260], 143 dwFlags: THUMBBUTTONFLAGS, 144 }} 145 pub type LPTHUMBBUTTON = *mut THUMBBUTTON; 146 pub const THBN_CLICKED: WORD = 0x1800; 147 ENUM!{enum TBPFLAG { 148 TBPF_NOPROGRESS = 0, 149 TBPF_INDETERMINATE = 0x1, 150 TBPF_NORMAL = 0x2, 151 TBPF_ERROR = 0x4, 152 TBPF_PAUSED = 0x8, 153 }} 154 RIDL!{#[uuid(0xea1afb91, 0x9e28, 0x4b86, 0x90, 0xe9, 0x9e, 0x9f, 0x8a, 0x5e, 0xef, 0xaf)] 155 interface ITaskbarList3(ITaskbarList3Vtbl): ITaskbarList2(ITaskbarList2Vtbl) { 156 fn SetProgressValue( 157 hwnd: HWND, 158 ullCompleted: ULONGLONG, 159 ullTotal: ULONGLONG, 160 ) -> HRESULT, 161 fn SetProgressState( 162 hwnd: HWND, 163 tbpFlags: TBPFLAG, 164 ) -> HRESULT, 165 fn RegisterTab( 166 hwndTab: HWND, 167 hwndMDI: HWND, 168 ) -> HRESULT, 169 fn UnregisterTab( 170 hwndTab: HWND, 171 ) -> HRESULT, 172 fn SetTabOrder( 173 hwndTab: HWND, 174 hwndInsertBefore: HWND, 175 ) -> HRESULT, 176 fn SetTabActive( 177 hwndTab: HWND, 178 hwndMDI: HWND, 179 dwReserved: DWORD, 180 ) -> HRESULT, 181 fn ThumbBarAddButtons( 182 hwnd: HWND, 183 cButtons: UINT, 184 pButton: LPTHUMBBUTTON, 185 ) -> HRESULT, 186 fn ThumbBarUpdateButtons( 187 hwnd: HWND, 188 cButtons: UINT, 189 pButton: LPTHUMBBUTTON, 190 ) -> HRESULT, 191 fn ThumbBarSetImageList( 192 hwnd: HWND, 193 himl: HIMAGELIST, 194 ) -> HRESULT, 195 fn SetOverlayIcon( 196 hwnd: HWND, 197 hIcon: HICON, 198 pszDescription: LPCWSTR, 199 ) -> HRESULT, 200 fn SetThumbnailTooltip( 201 hwnd: HWND, 202 pszTip: LPCWSTR, 203 ) -> HRESULT, 204 fn SetThumbnailClip( 205 hwnd: HWND, 206 prcClip: *mut RECT, 207 ) -> HRESULT, 208 }} 209 ENUM!{enum STPFLAG { 210 STPF_NONE = 0, 211 STPF_USEAPPTHUMBNAILALWAYS = 0x1, 212 STPF_USEAPPTHUMBNAILWHENACTIVE = 0x2, 213 STPF_USEAPPPEEKALWAYS = 0x4, 214 STPF_USEAPPPEEKWHENACTIVE = 0x8, 215 }} 216 RIDL!{#[uuid(0xc43dc798, 0x95d1, 0x4bea, 0x90, 0x30, 0xbb, 0x99, 0xe2, 0x98, 0x3a, 0x1a)] 217 interface ITaskbarList4(ITaskbarList4Vtbl): ITaskbarList3(ITaskbarList3Vtbl) { 218 fn SetTabProperties( 219 hwndTab: HWND, 220 stpFlags: STPFLAG, 221 ) -> HRESULT, 222 }} 223 RIDL!{#[uuid(0xc2cf3110, 0x460e, 0x4fc1, 0xb9, 0xd0, 0x8a, 0x1c, 0x0c, 0x9c, 0xc4, 0xbd)] 224 class DesktopWallpaper;} 225 RIDL!{#[uuid(0x00021400, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46)] 226 class ShellDesktop;} 227 RIDL!{#[uuid(0xf3364ba0, 0x65b9, 0x11ce, 0xa9, 0xba, 0x00, 0xaa, 0x00, 0x4a, 0xe8, 0x37)] 228 class ShellFSFolder;} 229 RIDL!{#[uuid(0x208d2c60, 0x3aea, 0x1069, 0xa2, 0xd7, 0x08, 0x00, 0x2b, 0x30, 0x30, 0x9d)] 230 class NetworkPlaces;} 231 RIDL!{#[uuid(0x00021401, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46)] 232 class ShellLink;} 233 RIDL!{#[uuid(0x94357b53, 0xca29, 0x4b78, 0x83, 0xae, 0xe8, 0xfe, 0x74, 0x09, 0x13, 0x4f)] 234 class DriveSizeCategorizer;} 235 RIDL!{#[uuid(0xb0a8f3cf, 0x4333, 0x4bab, 0x88, 0x73, 0x1c, 0xcb, 0x1c, 0xad, 0xa4, 0x8b)] 236 class DriveTypeCategorizer;} 237 RIDL!{#[uuid(0xb5607793, 0x24ac, 0x44c7, 0x82, 0xe2, 0x83, 0x17, 0x26, 0xaa, 0x6c, 0xb7)] 238 class FreeSpaceCategorizer;} 239 RIDL!{#[uuid(0x55d7b852, 0xf6d1, 0x42f2, 0xaa, 0x75, 0x87, 0x28, 0xa1, 0xb2, 0xd2, 0x64)] 240 class SizeCategorizer;} 241 RIDL!{#[uuid(0xd912f8cf, 0x0396, 0x4915, 0x88, 0x4e, 0xfb, 0x42, 0x5d, 0x32, 0x94, 0x3b)] 242 class PropertiesUI;} 243 RIDL!{#[uuid(0x0010890e, 0x8789, 0x413c, 0xad, 0xbc, 0x48, 0xf5, 0xb5, 0x11, 0xb3, 0xaf)] 244 class UserNotification;} 245 RIDL!{#[uuid(0x56fdf344, 0xfd6d, 0x11d0, 0x95, 0x8a, 0x00, 0x60, 0x97, 0xc9, 0xa0, 0x90)] 246 class TaskbarList;} 247 RIDL!{#[uuid(0x9ac9fbe1, 0xe0a2, 0x4ad6, 0xb4, 0xee, 0xe2, 0x12, 0x01, 0x3e, 0xa9, 0x17)] 248 class ShellItem;} 249 RIDL!{#[uuid(0x72eb61e0, 0x8672, 0x4303, 0x91, 0x75, 0xf2, 0xe4, 0xc6, 0x8b, 0x2e, 0x7c)] 250 class NamespaceWalker;} 251 RIDL!{#[uuid(0x3ad05575, 0x8857, 0x4850, 0x92, 0x77, 0x11, 0xb8, 0x5b, 0xdb, 0x8e, 0x09)] 252 class FileOperation;} 253 RIDL!{#[uuid(0xdc1c5a9c, 0xe88a, 0x4dde, 0xa5, 0xa1, 0x60, 0xf8, 0x2a, 0x20, 0xae, 0xf7)] 254 class FileOpenDialog;} 255 RIDL!{#[uuid(0xc0b4e2f3, 0xba21, 0x4773, 0x8d, 0xba, 0x33, 0x5e, 0xc9, 0x46, 0xeb, 0x8b)] 256 class FileSaveDialog;} 257 RIDL!{#[uuid(0x4df0c730, 0xdf9d, 0x4ae3, 0x91, 0x53, 0xaa, 0x6b, 0x82, 0xe9, 0x79, 0x5a)] 258 class KnownFolderManager;} 259 RIDL!{#[uuid(0x49f371e1, 0x8c5c, 0x4d9c, 0x9a, 0x3b, 0x54, 0xa6, 0x82, 0x7f, 0x51, 0x3c)] 260 class SharingConfigurationManager;} 261 RIDL!{#[uuid(0x7007acc7, 0x3202, 0x11d1, 0xaa, 0xd2, 0x00, 0x80, 0x5f, 0xc1, 0x27, 0x0e)] 262 class NetworkConnections;} 263 RIDL!{#[uuid(0xd6277990, 0x4c6a, 0x11cf, 0x8d, 0x87, 0x00, 0xaa, 0x00, 0x60, 0xf5, 0xbf)] 264 class ScheduledTasks;} 265 RIDL!{#[uuid(0x591209c7, 0x767b, 0x42b2, 0x9f, 0xba, 0x44, 0xee, 0x46, 0x15, 0xf2, 0xc7)] 266 class ApplicationAssociationRegistration;} 267 RIDL!{#[uuid(0x14010e02, 0xbbbd, 0x41f0, 0x88, 0xe3, 0xed, 0xa3, 0x71, 0x21, 0x65, 0x84)] 268 class SearchFolderItemFactory;} 269 RIDL!{#[uuid(0x06622d85, 0x6856, 0x4460, 0x8d, 0xe1, 0xa8, 0x19, 0x21, 0xb4, 0x1c, 0x4b)] 270 class OpenControlPanel;} 271 RIDL!{#[uuid(0x9e56be60, 0xc50f, 0x11cf, 0x9a, 0x2c, 0x00, 0xa0, 0xc9, 0x0a, 0x90, 0xce)] 272 class MailRecipient;} 273 RIDL!{#[uuid(0xf02c1a0d, 0xbe21, 0x4350, 0x88, 0xb0, 0x73, 0x67, 0xfc, 0x96, 0xef, 0x3c)] 274 class NetworkExplorerFolder;} 275 RIDL!{#[uuid(0x77f10cf0, 0x3db5, 0x4966, 0xb5, 0x20, 0xb7, 0xc5, 0x4f, 0xd3, 0x5e, 0xd6)] 276 class DestinationList;} 277 RIDL!{#[uuid(0x86c14003, 0x4d6b, 0x4ef3, 0xa7, 0xb4, 0x05, 0x06, 0x66, 0x3b, 0x2e, 0x68)] 278 class ApplicationDestinations;} 279 RIDL!{#[uuid(0x86bec222, 0x30f2, 0x47e0, 0x9f, 0x25, 0x60, 0xd1, 0x1c, 0xd7, 0x5c, 0x28)] 280 class ApplicationDocumentLists;} 281 RIDL!{#[uuid(0xde77ba04, 0x3c92, 0x4d11, 0xa1, 0xa5, 0x42, 0x35, 0x2a, 0x53, 0xe0, 0xe3)] 282 class HomeGroup;} 283 RIDL!{#[uuid(0xd9b3211d, 0xe57f, 0x4426, 0xaa, 0xef, 0x30, 0xa8, 0x06, 0xad, 0xd3, 0x97)] 284 class ShellLibrary;} 285 RIDL!{#[uuid(0x273eb5e7, 0x88b0, 0x4843, 0xbf, 0xef, 0xe2, 0xc8, 0x1d, 0x43, 0xaa, 0xe5)] 286 class AppStartupLink;} 287 RIDL!{#[uuid(0x2d3468c1, 0x36a7, 0x43b6, 0xac, 0x24, 0xd3, 0xf0, 0x2f, 0xd9, 0x60, 0x7a)] 288 class EnumerableObjectCollection;} 289 RIDL!{#[uuid(0xd5120aa3, 0x46ba, 0x44c5, 0x82, 0x2d, 0xca, 0x80, 0x92, 0xc1, 0xfc, 0x72)] 290 class FrameworkInputPane;} 291 RIDL!{#[uuid(0xc63382be, 0x7933, 0x48d0, 0x9a, 0xc8, 0x85, 0xfb, 0x46, 0xbe, 0x2f, 0xdd)] 292 class DefFolderMenu;} 293 RIDL!{#[uuid(0x7e5fe3d9, 0x985f, 0x4908, 0x91, 0xf9, 0xee, 0x19, 0xf9, 0xfd, 0x15, 0x14)] 294 class AppVisibility;} 295 RIDL!{#[uuid(0x4ed3a719, 0xcea8, 0x4bd9, 0x91, 0x0d, 0xe2, 0x52, 0xf9, 0x97, 0xaf, 0xc2)] 296 class AppShellVerbHandler;} 297 RIDL!{#[uuid(0xe44e9428, 0xbdbc, 0x4987, 0xa0, 0x99, 0x40, 0xdc, 0x8f, 0xd2, 0x55, 0xe7)] 298 class ExecuteUnknown;} 299 RIDL!{#[uuid(0xb1aec16f, 0x2383, 0x4852, 0xb0, 0xe9, 0x8f, 0x0b, 0x1d, 0xc6, 0x6b, 0x4d)] 300 class PackageDebugSettings;} 301 RIDL!{#[uuid(0x6b273fc5, 0x61fd, 0x4918, 0x95, 0xa2, 0xc3, 0xb5, 0xe9, 0xd7, 0xf5, 0x81)] 302 class SuspensionDependencyManager;} 303 RIDL!{#[uuid(0x45ba127d, 0x10a8, 0x46ea, 0x8a, 0xb7, 0x56, 0xea, 0x90, 0x78, 0x94, 0x3c)] 304 class ApplicationActivationManager;} 305 RIDL!{#[uuid(0x958a6fb5, 0xdcb2, 0x4faf, 0xaa, 0xfd, 0x7f, 0xb0, 0x54, 0xad, 0x1a, 0x3b)] 306 class ApplicationDesignModeSettings;} 307