gdiplus: Stubs for GdipIsVisiblePoint/GdipIsVisiblePointI.
[wine] / include / shlobj.h
1 /*
2  * Copyright (C) the Wine project
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #ifndef __WINE_SHLOBJ_H
20 #define __WINE_SHLOBJ_H
21
22 #include <ole2.h>
23 #include <commctrl.h>
24 #include <prsht.h>
25 #include <shlguid.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* defined(__cplusplus) */
30
31 /* Except for specific structs, this header is byte packed */
32 #include <pshpack1.h>
33
34 #include <shtypes.h>
35 #include <shobjidl.h>
36
37 #ifndef HPSXA_DEFINED
38 #define HPSXA_DEFINED
39 DECLARE_HANDLE(HPSXA);
40 #endif
41
42 UINT         WINAPI SHAddFromPropSheetExtArray(HPSXA,LPFNADDPROPSHEETPAGE,LPARAM);
43 LPVOID       WINAPI SHAlloc(ULONG) __WINE_ALLOC_SIZE(1);
44 HRESULT      WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,IUnknown*,REFIID,LPVOID*);
45 HPSXA        WINAPI SHCreatePropSheetExtArray(HKEY,LPCWSTR,UINT);
46 HPSXA        WINAPI SHCreatePropSheetExtArrayEx(HKEY,LPCWSTR,UINT,IDataObject*);
47 DWORD        WINAPI SHCLSIDFromStringA(LPCSTR,CLSID*);
48 DWORD        WINAPI SHCLSIDFromStringW(LPCWSTR,CLSID*);
49 #define             SHCLSIDFromString WINELIB_NAME_AW(SHCLSIDFromString)
50 HRESULT      WINAPI SHCreateStdEnumFmtEtc(DWORD,const FORMATETC *,IEnumFORMATETC**);
51 void         WINAPI SHDestroyPropSheetExtArray(HPSXA);
52 BOOL         WINAPI SHFindFiles(LPCITEMIDLIST,LPCITEMIDLIST);
53 DWORD        WINAPI SHFormatDrive(HWND,UINT,UINT,UINT);
54 void         WINAPI SHFree(LPVOID);
55 BOOL         WINAPI GetFileNameFromBrowse(HWND,LPSTR,DWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR);
56 HRESULT      WINAPI SHGetInstanceExplorer(IUnknown**);
57 HRESULT      WINAPI SHGetFolderPathAndSubDirA(HWND,int,HANDLE,DWORD,LPCSTR,LPSTR);
58 HRESULT      WINAPI SHGetFolderPathAndSubDirW(HWND,int,HANDLE,DWORD,LPCWSTR,LPWSTR);
59 #define             SHGetFolderPathAndSubDir WINELIB_NAME_AW(SHGetFolderPathAndSubDir);
60 BOOL         WINAPI SHGetPathFromIDListA(LPCITEMIDLIST,LPSTR);
61 BOOL         WINAPI SHGetPathFromIDListW(LPCITEMIDLIST,LPWSTR);
62 #define             SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
63 INT          WINAPI SHHandleUpdateImage(LPCITEMIDLIST);
64 HRESULT      WINAPI SHILCreateFromPath(LPCWSTR,LPITEMIDLIST*,DWORD*);
65 HRESULT      WINAPI SHLoadOLE(LPARAM);
66 HRESULT      WINAPI SHPathPrepareForWriteA(HWND,IUnknown*,LPCSTR,DWORD);
67 HRESULT      WINAPI SHPathPrepareForWriteW(HWND,IUnknown*,LPCWSTR,DWORD);
68 #define             SHPathPrepareForWrite WINELIB_NAME_AW(SHPathPrepareForWrite);
69 UINT         WINAPI SHReplaceFromPropSheetExtArray(HPSXA,UINT,LPFNADDPROPSHEETPAGE,LPARAM);
70 LPITEMIDLIST WINAPI SHSimpleIDListFromPath(LPCWSTR);
71 int          WINAPI SHMapPIDLToSystemImageListIndex(IShellFolder*,LPCITEMIDLIST,int*);
72 HRESULT      WINAPI SHStartNetConnectionDialog(HWND,LPCSTR,DWORD);
73 VOID         WINAPI SHUpdateImageA(LPCSTR,INT,UINT,INT);
74 VOID         WINAPI SHUpdateImageW(LPCWSTR,INT,UINT,INT);
75 #define             SHUpdateImage WINELIB_NAME_AW(SHUpdateImage)
76 int          WINAPI RestartDialog(HWND,LPCWSTR,DWORD);
77 int          WINAPI RestartDialogEx(HWND,LPCWSTR,DWORD,DWORD);
78
79 #define SHFMT_ERROR     0xFFFFFFFFL  /* Error on last format, drive may be formattable */
80 #define SHFMT_CANCEL    0xFFFFFFFEL  /* Last format was cancelled */
81 #define SHFMT_NOFORMAT  0xFFFFFFFDL  /* Drive is not formattable */
82
83 /* SHFormatDrive flags */
84 #define SHFMT_ID_DEFAULT        0xFFFF
85 #define SHFMT_OPT_FULL          1
86 #define SHFMT_OPT_SYSONLY       2
87
88 /* SHPathPrepareForWrite flags */
89 #define SHPPFW_NONE             0x00000000
90 #define SHPPFW_DIRCREATE        0x00000001
91 #define SHPPFW_DEFAULT          SHPPFW_DIRCREATE
92 #define SHPPFW_ASKDIRCREATE     0x00000002
93 #define SHPPFW_IGNOREFILENAME   0x00000004
94 #define SHPPFW_NOWRITECHECK     0x00000008
95 #define SHPPFW_MEDIACHECKONLY   0x00000010
96
97 /* SHObjectProperties flags */
98 #define SHOP_PRINTERNAME 0x01
99 #define SHOP_FILEPATH    0x02
100 #define SHOP_VOLUMEGUID  0x04
101
102 BOOL WINAPI SHObjectProperties(HWND,DWORD,LPCWSTR,LPCWSTR);
103
104 #define PCS_FATAL           0x80000000
105 #define PCS_REPLACEDCHAR    0x00000001
106 #define PCS_REMOVEDCHAR     0x00000002
107 #define PCS_TRUNCATED       0x00000004
108 #define PCS_PATHTOOLONG     0x00000008
109
110 int WINAPI PathCleanupSpec(LPCWSTR,LPWSTR);
111
112 /*****************************************************************************
113  * IContextMenu interface
114  */
115
116
117 /* DATAOBJECT_InitShellIDList*/
118 #define CFSTR_SHELLIDLISTA           "Shell IDList Array"   /* CF_IDLIST */
119 #define CFSTR_SHELLIDLISTOFFSETA     "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
120 #define CFSTR_NETRESOURCESA          "Net Resource"         /* CF_NETRESOURCE */
121 /* DATAOBJECT_InitFileGroupDesc */
122 #define CFSTR_FILEDESCRIPTORA        "FileGroupDescriptor"  /* CF_FILEGROUPDESCRIPTORA */
123 /* DATAOBJECT_InitFileContents*/
124 #define CFSTR_FILECONTENTSA          "FileContents"         /* CF_FILECONTENTS */
125 #define CFSTR_FILENAMEA              "FileName"             /* CF_FILENAMEA */
126 #define CFSTR_FILENAMEMAPA           "FileNameMap"          /* CF_FILENAMEMAPA */
127 #define CFSTR_PRINTERGROUPA          "PrinterFriendlyName"  /* CF_PRINTERS */
128 #define CFSTR_SHELLURLA              "UniformResourceLocator"
129 #define CFSTR_INETURLA               CFSTR_SHELLURLA
130 #define CFSTR_PREFERREDDROPEFFECTA   "Preferred DropEffect"
131 #define CFSTR_PERFORMEDDROPEFFECTA   "Performed DropEffect"
132 #define CFSTR_PASTESUCCEEDEDA        "Paste Succeeded"
133 #define CFSTR_INDRAGLOOPA            "InShellDragLoop"
134 #define CFSTR_DRAGCONTEXTA           "DragContext"
135 #define CFSTR_MOUNTEDVOLUMEA         "MountedVolume"
136 #define CFSTR_PERSISTEDDATAOBJECTA   "PersistedDataObject"
137 #define CFSTR_TARGETCLSIDA           "TargetCLSID"
138 #define CFSTR_AUTOPLAY_SHELLIDLISTSA "Autoplay Enumerated IDList Array"
139 #define CFSTR_LOGICALPERFORMEDDROPEFFECTA "Logical Performed DropEffect"
140
141 #if defined(__GNUC__)
142 # define CFSTR_SHELLIDLISTW \
143     (const WCHAR []){ 'S','h','e','l','l',' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 }
144 # define CFSTR_SHELLIDLISTOFFSETW \
145     (const WCHAR []){ 'S','h','e','l','l',' ','O','b','j','e','c','t',' ','O','f','f','s','e','t','s',0 }
146 # define CFSTR_NETRESOURCESW \
147     (const WCHAR []){ 'N','e','t',' ','R','e','s','o','u','r','c','e',0 }
148 # define CFSTR_FILEDESCRIPTORW \
149     (const WCHAR []){ 'F','i','l','e','G','r','o','u','p','D','e','s','c','r','i','p','t','o','r','W',0 }
150 # define CFSTR_FILECONTENTSW \
151     (const WCHAR []){ 'F','i','l','e','C','o','n','t','e','n','t','s',0 }
152 # define CFSTR_FILENAMEW \
153     (const WCHAR []){ 'F','i','l','e','N','a','m','e','W',0 }
154 # define CFSTR_FILENAMEMAPW \
155     (const WCHAR []){ 'F','i','l','e','N','a','m','e','M','a','p','W',0 }
156 # define CFSTR_PRINTERGROUPW \
157     (const WCHAR []){ 'P','r','i','n','t','e','r','F','r','i','e','n','d','l','y','N','a','m','e',0 }
158 # define CFSTR_SHELLURLW \
159     (const WCHAR []){ 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r',0 }
160 # define CFSTR_INETURLW \
161     (const WCHAR []){ 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r','W',0 }
162 # define CFSTR_PREFERREDDROPEFFECTW \
163     (const WCHAR []){ 'P','r','e','f','e','r','r','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 }
164 # define CFSTR_PERFORMEDDROPEFFECTW \
165     (const WCHAR []){ 'P','e','r','f','o','r','m','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 }
166 # define CFSTR_PASTESUCCEEDEDW \
167     (const WCHAR []){ 'P','a','s','t','e',' ','S','u','c','c','e','e','d','e','d',0 }
168 # define CFSTR_INDRAGLOOPW \
169     (const WCHAR []){ 'I','n','S','h','e','l','l','D','r','a','g','L','o','o','p',0 }
170 # define CFSTR_DRAGCONTEXTW \
171     (const WCHAR []){ 'D','r','a','g','C','o','n','t','e','x','t',0 }
172 # define CFSTR_MOUNTEDVOLUMEW \
173     (const WCHAR []){ 'M','o','u','n','t','e','d','V','o','l','u','m','e',0 }
174 # define CFSTR_PERSISTEDDATAOBJECTW \
175     (const WCHAR []){ 'P','e','r','s','i','s','t','e','d','D','a','t','a','O','b','j','e','c','t',0 }
176 # define CFSTR_TARGETCLSIDW \
177     (const WCHAR []){ 'T','a','r','g','e','t','C','L','S','I','D',0 }
178 # define CFSTR_AUTOPLAY_SHELLIDLISTSW \
179     (const WCHAR []){ 'A','u','t','o','p','l','a','y',' ','E','n','u','m','e','r','a','t','e','d',\
180                       ' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 }
181 # define CFSTR_LOGICALPERFORMEDDROPEFFECTW \
182     (const WCHAR []){ 'L','o','g','i','c','a','l',' ','P','e','r','f','o','r','m','e','d',\
183                       ' ','D','r','o','p','E','f','f','e','c','t',0 }
184 #elif defined(_MSC_VER)
185 # define CFSTR_SHELLIDLISTW           L"Shell IDList Array"
186 # define CFSTR_SHELLIDLISTOFFSETW     L"Shell Object Offsets"
187 # define CFSTR_NETRESOURCESW          L"Net Resource"
188 # define CFSTR_FILEDESCRIPTORW        L"FileGroupDescriptorW"
189 # define CFSTR_FILECONTENTSW          L"FileContents"
190 # define CFSTR_FILENAMEW              L"FileNameW"
191 # define CFSTR_FILENAMEMAPW           L"FileNameMapW"
192 # define CFSTR_PRINTERGROUPW          L"PrinterFriendlyName"
193 # define CFSTR_SHELLURLW              L"UniformResourceLocator"
194 # define CFSTR_INETURLW               L"UniformResourceLocatorW"
195 # define CFSTR_PREFERREDDROPEFFECTW   L"Preferred DropEffect"
196 # define CFSTR_PERFORMEDDROPEFFECTW   L"Performed DropEffect"
197 # define CFSTR_PASTESUCCEEDEDW        L"Paste Succeeded"
198 # define CFSTR_INDRAGLOOPW            L"InShellDragLoop"
199 # define CFSTR_DRAGCONTEXTW           L"DragContext"
200 # define CFSTR_MOUNTEDVOLUMEW         L"MountedVolume"
201 # define CFSTR_PERSISTEDDATAOBJECTW   L"PersistedDataObject"
202 # define CFSTR_TARGETCLSIDW           L"TargetCLSID"
203 # define CFSTR_AUTOPLAY_SHELLIDLISTSW L"Autoplay Enumerated IDList Array"
204 # define CFSTR_LOGICALPERFORMEDDROPEFFECTW L"Logical Performed DropEffect"
205 #else
206 static const WCHAR CFSTR_SHELLIDLISTW[] =
207     { 'S','h','e','l','l',' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 };
208 static const WCHAR CFSTR_SHELLIDLISTOFFSETW[] =
209     { 'S','h','e','l','l',' ','O','b','j','e','c','t',' ','O','f','f','s','e','t','s',0 };
210 static const WCHAR CFSTR_NETRESOURCESW[] =
211     { 'N','e','t',' ','R','e','s','o','u','r','c','e',0 };
212 static const WCHAR CFSTR_FILEDESCRIPTORW[] =
213     { 'F','i','l','e','G','r','o','u','p','D','e','s','c','r','i','p','t','o','r','W',0 };
214 static const WCHAR CFSTR_FILECONTENTSW[] =
215     { 'F','i','l','e','C','o','n','t','e','n','t','s',0 };
216 static const WCHAR CFSTR_FILENAMEW[] =
217     { 'F','i','l','e','N','a','m','e','W',0 }
218 static const WCHAR CFSTR_FILENAMEMAPW[] =
219     { 'F','i','l','e','N','a','m','e','M','a','p','W',0 };
220 static const WCHAR CFSTR_PRINTERGROUPW[] =
221     { 'P','r','i','n','t','e','r','F','r','i','e','n','d','l','y','N','a','m','e',0 };
222 static const WCHAR CFSTR_SHELLURLW[] =
223     { 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r',0 };
224 static const WCHAR CFSTR_INETURLW[] =
225     { 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r','W',0 };
226 static const WCHAR CFSTR_PREFERREDDROPEFFECTW[] =
227     { 'P','r','e','f','e','r','r','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 };
228 static const WCHAR CFSTR_PERFORMEDDROPEFFECTW[] =
229     { 'P','e','r','f','o','r','m','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 };
230 static const WCHAR CFSTR_PASTESUCCEEDEDW[] =
231     { 'P','a','s','t','e',' ','S','u','c','c','e','e','d','e','d',0 };
232 static const WCHAR CFSTR_INDRAGLOOPW[] =
233     { 'I','n','S','h','e','l','l','D','r','a','g','L','o','o','p',0 };
234 static const WCHAR CFSTR_DRAGCONTEXTW[] =
235     { 'D','r','a','g','C','o','n','t','e','x','t',0 };
236 static const WCHAR CFSTR_MOUNTEDVOLUMEW[] =
237     { 'M','o','u','n','t','e','d','V','o','l','u','m','e',0 };
238 static const WCHAR CFSTR_PERSISTEDDATAOBJECTW[] =
239     { 'P','e','r','s','i','s','t','e','d','D','a','t','a','O','b','j','e','c','t',0 };
240 static const WCHAR CFSTR_TARGETCLSIDW[] =
241     { 'T','a','r','g','e','t','C','L','S','I','D',0 };
242 static const WCHAR CFSTR_AUTOPLAY_SHELLIDLISTSW[] =
243     { 'A','u','t','o','p','l','a','y',' ','E','n','u','m','e','r','a','t','e','d',
244       ' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 };
245 static const WCHAR CFSTR_LOGICALPERFORMEDDROPEFFECTW[] =
246     { 'L','o','g','i','c','a','l',' ','P','e','r','f','o','r','m','e','d',
247       ' ','D','r','o','p','E','f','f','e','c','t',0 };
248 #endif
249
250 #define CFSTR_SHELLIDLIST           WINELIB_NAME_AW(CFSTR_SHELLIDLIST)
251 #define CFSTR_SHELLIDLISTOFFSET     WINELIB_NAME_AW(CFSTR_SHELLIDLISTOFFSET)
252 #define CFSTR_NETRESOURCES          WINELIB_NAME_AW(CFSTR_NETRESOURCES)
253 #define CFSTR_FILEDESCRIPTOR        WINELIB_NAME_AW(CFSTR_FILEDESCRIPTOR)
254 #define CFSTR_FILECONTENTS          WINELIB_NAME_AW(CFSTR_FILECONTENTS)
255 #define CFSTR_FILENAME              WINELIB_NAME_AW(CFSTR_FILENAME)
256 #define CFSTR_FILENAMEMAP           WINELIB_NAME_AW(CFSTR_FILENAMEMAP)
257 #define CFSTR_PRINTERGROUP          WINELIB_NAME_AW(CFSTR_PRINTERGROUP)
258 #define CFSTR_SHELLURL              WINELIB_NAME_AW(CFSTR_SHELLURL)
259 #define CFSTR_INETURL               WINELIB_NAME_AW(CFSTR_INETURL)
260 #define CFSTR_PREFERREDDROPEFFECT   WINELIB_NAME_AW(CFSTR_PREFERREDDROPEFFECT)
261 #define CFSTR_PERFORMEDDROPEFFECT   WINELIB_NAME_AW(CFSTR_PERFORMEDDROPEFFECT)
262 #define CFSTR_PASTESUCCEEDED        WINELIB_NAME_AW(CFSTR_PASTESUCCEEDED)
263 #define CFSTR_INDRAGLOOP            WINELIB_NAME_AW(CFSTR_INDRAGLOOP)
264 #define CFSTR_DRAGCONTEXT           WINELIB_NAME_AW(CFSTR_DRAGCONTEXT)
265 #define CFSTR_MOUNTEDVOLUME         WINELIB_NAME_AW(CFSTR_MOUNTEDVOLUME)
266 #define CFSTR_PERSISTEDDATAOBJECT   WINELIB_NAME_AW(CFSTR_PERSISTEDDATAOBJECT)
267 #define CFSTR_TARGETCLSID           WINELIB_NAME_AW(CFSTR_TARGETCLSID)
268 #define CFSTR_AUTOPLAY_SHELLIDLISTS WINELIB_NAME_AW(CFSTR_AUTOPLAY_SHELLIDLISTS)
269 #define CFSTR_LOGICALPERFORMEDDROPEFFECT WINELIB_NAME_AW(CFSTR_LOGICALPERFORMEDDROPEFFECT)
270
271 typedef struct
272 {       UINT cidl;
273         UINT aoffset[1];
274 } CIDA, *LPIDA;
275
276 /************************************************************************
277 * IShellView interface
278 */
279
280 typedef GUID SHELLVIEWID;
281
282 #define FCIDM_SHVIEWFIRST       0x0000
283 /* undocumented */
284 #define FCIDM_SHVIEW_ARRANGE    0x7001
285 #define FCIDM_SHVIEW_DELETE     0x7011
286 #define FCIDM_SHVIEW_PROPERTIES 0x7013
287 #define FCIDM_SHVIEW_CUT        0x7018
288 #define FCIDM_SHVIEW_COPY       0x7019
289 #define FCIDM_SHVIEW_INSERT     0x701A
290 #define FCIDM_SHVIEW_UNDO       0x701B
291 #define FCIDM_SHVIEW_INSERTLINK 0x701C
292 #define FCIDM_SHVIEW_SELECTALL  0x7021
293 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
294
295 #define FCIDM_SHVIEW_BIGICON    0x7029
296 #define FCIDM_SHVIEW_SMALLICON  0x702A
297 #define FCIDM_SHVIEW_LISTVIEW   0x702B
298 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
299 /* 0x7030-0x703f are used by the shellbrowser */
300 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
301 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
302
303 #define FCIDM_SHVIEW_HELP       0x7041
304 #define FCIDM_SHVIEW_RENAME     0x7050
305 #define FCIDM_SHVIEW_CREATELINK 0x7051
306 #define FCIDM_SHVIEW_NEWLINK    0x7052
307 #define FCIDM_SHVIEW_NEWFOLDER  0x7053
308
309 #define FCIDM_SHVIEW_REFRESH    0x7100 /* FIXME */
310 #define FCIDM_SHVIEW_EXPLORE    0x7101 /* FIXME */
311 #define FCIDM_SHVIEW_OPEN       0x7102 /* FIXME */
312
313 #define FCIDM_SHVIEWLAST        0x7fff
314 #define FCIDM_BROWSERFIRST      0xA000
315 /* undocumented toolbar items from stddlg's*/
316 #define FCIDM_TB_UPFOLDER       0xA001
317 #define FCIDM_TB_NEWFOLDER      0xA002
318 #define FCIDM_TB_SMALLICON      0xA003
319 #define FCIDM_TB_REPORTVIEW     0xA004
320 #define FCIDM_TB_DESKTOP        0xA005  /* FIXME */
321
322 #define FCIDM_BROWSERLAST       0xbf00
323 #define FCIDM_GLOBALFIRST       0x8000
324 #define FCIDM_GLOBALLAST        0x9fff
325
326 /*
327 * Global submenu IDs and separator IDs
328 */
329 #define FCIDM_MENU_FILE             (FCIDM_GLOBALFIRST+0x0000)
330 #define FCIDM_MENU_EDIT             (FCIDM_GLOBALFIRST+0x0040)
331 #define FCIDM_MENU_VIEW             (FCIDM_GLOBALFIRST+0x0080)
332 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
333 #define FCIDM_MENU_TOOLS            (FCIDM_GLOBALFIRST+0x00c0)
334 #define FCIDM_MENU_TOOLS_SEP_GOTO   (FCIDM_GLOBALFIRST+0x00c1)
335 #define FCIDM_MENU_HELP             (FCIDM_GLOBALFIRST+0x0100)
336 #define FCIDM_MENU_FIND             (FCIDM_GLOBALFIRST+0x0140)
337 #define FCIDM_MENU_EXPLORE          (FCIDM_GLOBALFIRST+0x0150)
338 #define FCIDM_MENU_FAVORITES        (FCIDM_GLOBALFIRST+0x0170)
339
340 /* control IDs known to the view */
341 #define FCIDM_TOOLBAR      (FCIDM_BROWSERFIRST + 0)
342 #define FCIDM_STATUS       (FCIDM_BROWSERFIRST + 1)
343
344
345 /****************************************************************************
346  * IShellIcon interface
347  */
348
349 #define INTERFACE IShellIcon
350 DECLARE_INTERFACE_(IShellIcon,IUnknown)
351 {
352     /*** IUnknown methods ***/
353     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
354     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
355     STDMETHOD_(ULONG,Release)(THIS) PURE;
356     /*** IShellIcon methods ***/
357     STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT flags, LPINT lpIconIndex) PURE;
358 };
359 #undef INTERFACE
360
361 #if !defined(__cplusplus) || defined(CINTERFACE)
362 /*** IUnknown methods ***/
363 #define IShellIcon_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
364 #define IShellIcon_AddRef(p)                  (p)->lpVtbl->AddRef(p)
365 #define IShellIcon_Release(p)                 (p)->lpVtbl->Release(p)
366 /*** IShellIcon methods ***/
367 #define IShellIcon_GetIconOf(p,a,b,c)         (p)->lpVtbl->GetIconOf(p,a,b,c)
368 #endif
369
370 typedef IShellIcon *LPSHELLICON;
371
372 /* IQueryInfo interface */
373 #define INTERFACE IQueryInfo
374 DECLARE_INTERFACE_(IQueryInfo,IUnknown)
375 {
376     /*** IUnknown methods ***/
377     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
378     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
379     STDMETHOD_(ULONG,Release)(THIS) PURE;
380     /*** IQueryInfo methods ***/
381     STDMETHOD(GetInfoTip)(THIS_ DWORD dwFlags, WCHAR** lppTips) PURE;
382     STDMETHOD(GetInfoFlags)(THIS_ DWORD* lpFlags) PURE;
383 };
384 #undef INTERFACE
385
386 #if !defined(__cplusplus) || defined(CINTERFACE)
387 /*** IUnknown methods ***/
388 #define IQueryInfo_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
389 #define IQueryInfo_AddRef(p)                  (p)->lpVtbl->AddRef(p)
390 #define IQueryInfo_Release(p)                 (p)->lpVtbl->Release(p)
391 /*** IQueryInfo methods ***/
392 #define IQueryInfo_GetInfoTip(p,a,b)          (p)->lpVtbl->GetInfoTip(p,a,b)
393 #define IQueryInfo_GetInfoFlags(p,a)          (p)->lpVtbl->GetInfoFlags(p,a)
394 #endif
395
396 /* IInputObject interface */
397 #define INTERFACE IInputObject
398 DECLARE_INTERFACE_(IInputObject,IUnknown)
399 {
400     /*** IUnknown methods ***/
401     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
402     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
403     STDMETHOD_(ULONG,Release)(THIS) PURE;
404     /*** IInputObject methods ***/
405     STDMETHOD(UIActivateIO)(THIS_ BOOL bActivating, LPMSG lpMsg) PURE;
406     STDMETHOD(HasFocusIO)(THIS) PURE;
407     STDMETHOD(TranslateAcceleratorIO)(THIS_ LPMSG lpMsg) PURE;
408 };
409 #undef INTERFACE
410
411 #if !defined(__cplusplus) || defined(CINTERFACE)
412 /*** IUnknown methods ***/
413 #define IInputObject_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
414 #define IInputObject_AddRef(p)                   (p)->lpVtbl->AddRef(p)
415 #define IInputObject_Release(p)                  (p)->lpVtbl->Release(p)
416 /*** IInputObject methods ***/
417 #define IInputObject_UIActivateIO(p,a,b)         (p)->lpVtbl->UIActivateIO(p,a,b)
418 #define IInputObject_HasFocusIO(p)               (p)->lpVtbl->HasFocusIO(p)
419 #define IInputObject_TranslateAcceleratorIO(p,a) (p)->lpVtbl->TranslateAcceleratorIO(p,a)
420 #endif
421
422 /* IInputObjectSite interface */
423 #define INTERFACE IInputObjectSite
424 DECLARE_INTERFACE_(IInputObjectSite,IUnknown)
425 {
426     /*** IUnknown methods ***/
427     STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
428     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
429     STDMETHOD_(ULONG,Release) (THIS) PURE;
430     /*** IInputObjectSite methods ***/
431     STDMETHOD(OnFocusChangeIS)(THIS_ LPUNKNOWN lpUnknown, BOOL bFocus) PURE;
432 };
433 #undef INTERFACE
434
435 #if !defined(__cplusplus) || defined(CINTERFACE)
436 /*** IUnknown methods ***/
437 #define IInputObjectSite_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
438 #define IInputObjectSite_AddRef(p)              (p)->lpVtbl->AddRef(p)
439 #define IInputObjectSite_Release(p)             (p)->lpVtbl->Release(p)
440 /*** IInputObject methods ***/
441 #define IInputObjectSite_OnFocusChangeIS(p,a,b) (p)->lpVtbl->OnFocusChangeIS(p,a,b)
442 #endif
443
444 /* IObjMgr interface */
445 #define INTERFACE IObjMgr
446 DECLARE_INTERFACE_(IObjMgr,IUnknown)
447 {
448     /*** IUnknown methods ***/
449     STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
450     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
451     STDMETHOD_(ULONG,Release) (THIS) PURE;
452     /*** IObjMgr methods ***/
453     STDMETHOD(Append)(THIS_ LPUNKNOWN punk) PURE;
454     STDMETHOD(Remove)(THIS_ LPUNKNOWN punk) PURE;
455 };
456 #undef INTERFACE
457
458 #if !defined(__cplusplus) || defined(CINTERFACE)
459 /*** IUnknown methods ***/
460 #define IObjMgr_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
461 #define IObjMgr_AddRef(p)              (p)->lpVtbl->AddRef(p)
462 #define IObjMgr_Release(p)             (p)->lpVtbl->Release(p)
463 /*** IObjMgr methods ***/
464 #define IObjMgr_Append(p,a) (p)->lpVtbl->Append(p,a)
465 #define IObjMgr_Remove(p,a) (p)->lpVtbl->Remove(p,a)
466 #endif
467
468 /* IACList interface */
469 #define INTERFACE IACList
470 DECLARE_INTERFACE_(IACList,IUnknown)
471 {
472     /*** IUnknown methods ***/
473     STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
474     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
475     STDMETHOD_(ULONG,Release) (THIS) PURE;
476     /*** IACList methods ***/
477     STDMETHOD(Expand)(THIS_ LPCOLESTR str) PURE;
478 };
479 #undef INTERFACE
480
481 #if !defined(__cplusplus) || defined(CINTERFACE)
482 /*** IUnknown methods ***/
483 #define IACList_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
484 #define IACList_AddRef(p)              (p)->lpVtbl->AddRef(p)
485 #define IACList_Release(p)             (p)->lpVtbl->Release(p)
486 /*** IACList methods ***/
487 #define IACList_Expand(p,a)             (p)->lpVtbl->Expand(p,a)
488 #endif
489
490 /* IProgressDialog interface */
491 #define PROGDLG_NORMAL           0x00000000
492 #define PROGDLG_MODAL            0x00000001
493 #define PROGDLG_AUTOTIME         0x00000002
494 #define PROGDLG_NOTIME           0x00000004
495 #define PROGDLG_NOMINIMIZE       0x00000008
496 #define PROGDLG_NOPROGRESSBAR    0x00000010
497 #define PROGDLG_MARQUEEPROGRESS  0x00000020
498 #define PROGDLG_NOCANCEL         0x00000040
499
500 #define PDTIMER_RESET            0x00000001
501 #define PDTIMER_PAUSE            0x00000002
502 #define PDTIMER_RESUME           0x00000003
503
504 #define INTERFACE IProgressDialog
505 DECLARE_INTERFACE_(IProgressDialog,IUnknown)
506 {
507     /*** IUnknown methods ***/
508     STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
509     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
510     STDMETHOD_(ULONG,Release) (THIS) PURE;
511     /*** IProgressDialog methods ***/
512     STDMETHOD(StartProgressDialog)(THIS_ HWND hwndParent, IUnknown *punkEnableModeless, DWORD dwFlags, LPCVOID reserved) PURE;
513     STDMETHOD(StopProgressDialog)(THIS) PURE;
514     STDMETHOD(SetTitle)(THIS_ LPCWSTR pwzTitle) PURE;
515     STDMETHOD(SetAnimation)(THIS_ HINSTANCE hInstance, UINT uiResourceId) PURE;
516     STDMETHOD_(BOOL,HasUserCancelled)(THIS) PURE;
517     STDMETHOD(SetProgress)(THIS_ DWORD dwCompleted, DWORD dwTotal) PURE;
518     STDMETHOD(SetProgress64)(THIS_ ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE;
519     STDMETHOD(SetLine)(THIS_ DWORD dwLineNum, LPCWSTR pwzString, BOOL bPath, LPCVOID reserved) PURE;
520     STDMETHOD(SetCancelMsg)(THIS_ LPCWSTR pwzCancelMsg, LPCVOID reserved) PURE;
521     STDMETHOD(Timer)(THIS_ DWORD dwTimerAction, LPCVOID reserved) PURE;
522 };
523 #undef INTERFACE
524
525 #if !defined(__cplusplus) || defined(CINTERFACE)
526 /*** IUnknown methods ***/
527 #define IProgressDialog_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
528 #define IProgressDialog_AddRef(p)              (p)->lpVtbl->AddRef(p)
529 #define IProgressDialog_Release(p)             (p)->lpVtbl->Release(p)
530 /*** IProgressDialog methods ***/
531 #define IProgressDialog_StartProgressDialog(p,a,b,c,d)    (p)->lpVtbl->StartProgressDialog(p,a,b,c,d)
532 #define IProgressDialog_StopProgressDialog(p)             (p)->lpVtbl->StopProgressDialog(p)
533 #define IProgressDialog_SetTitle(p,a)                     (p)->lpVtbl->SetTitle(p,a)
534 #define IProgressDialog_SetAnimation(p,a,b)               (p)->lpVtbl->SetAnimation(p,a,b)
535 #define IProgressDialog_HasUserCancelled(p)               (p)->lpVtbl->HasUserCancelled(p)
536 #define IProgressDialog_SetProgress(p,a,b)                (p)->lpVtbl->SetProgress(p,a,b)
537 #define IProgressDialog_SetProgress64(p,a,b)              (p)->lpVtbl->SetProgress64(p,a,b)
538 #define IProgressDialog_SetLine(p,a,b,c,d)                (p)->lpVtbl->SetLine(p,a,b,c,d)
539 #define IProgressDialog_SetCancelMsg(p,a,b)               (p)->lpVtbl->SetCancelMsg(p,a,b)
540 #define IProgressDialog_Timer(p,a,b)                      (p)->lpVtbl->Timer(p,a,b)
541 #endif
542
543
544 /****************************************************************************
545 * SHAddToRecentDocs API
546 */
547 #define SHARD_PIDL      0x00000001L
548 #define SHARD_PATHA     0x00000002L
549 #define SHARD_PATHW     0x00000003L
550 #define SHARD_PATH WINELIB_NAME_AW(SHARD_PATH)
551
552 void WINAPI SHAddToRecentDocs(UINT,LPCVOID);
553
554 /****************************************************************************
555  * SHBrowseForFolder API
556  */
557 typedef INT (CALLBACK *BFFCALLBACK)(HWND,UINT,LPARAM,LPARAM);
558
559 #include <pshpack8.h>
560
561 typedef struct tagBROWSEINFOA {
562     HWND        hwndOwner;
563     LPCITEMIDLIST pidlRoot;
564     LPSTR         pszDisplayName;
565     LPCSTR        lpszTitle;
566     UINT        ulFlags;
567     BFFCALLBACK   lpfn;
568     LPARAM        lParam;
569     INT         iImage;
570 } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
571
572 typedef struct tagBROWSEINFOW {
573     HWND        hwndOwner;
574     LPCITEMIDLIST pidlRoot;
575     LPWSTR        pszDisplayName;
576     LPCWSTR       lpszTitle;
577     UINT        ulFlags;
578     BFFCALLBACK   lpfn;
579     LPARAM        lParam;
580     INT         iImage;
581 } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
582
583 #define BROWSEINFO   WINELIB_NAME_AW(BROWSEINFO)
584 #define PBROWSEINFO  WINELIB_NAME_AW(PBROWSEINFO)
585 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
586
587 #include <poppack.h>
588
589 /* Browsing for directory. */
590 #define BIF_RETURNONLYFSDIRS   0x0001
591 #define BIF_DONTGOBELOWDOMAIN  0x0002
592 #define BIF_STATUSTEXT         0x0004
593 #define BIF_RETURNFSANCESTORS  0x0008
594 #define BIF_EDITBOX            0x0010
595 #define BIF_VALIDATE           0x0020
596 #define BIF_NEWDIALOGSTYLE     0x0040
597 #define BIF_USENEWUI           (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)
598 #define BIF_BROWSEINCLUDEURLS  0x0080
599 #define BIF_UAHINT             0x0100
600 #define BIF_NONEWFOLDERBUTTON  0x0200
601 #define BIF_NOTRANSLATETARGETS 0x0400
602
603 #define BIF_BROWSEFORCOMPUTER  0x1000
604 #define BIF_BROWSEFORPRINTER   0x2000
605 #define BIF_BROWSEINCLUDEFILES 0x4000
606
607 /* message from browser */
608 #define BFFM_INITIALIZED        1
609 #define BFFM_SELCHANGED         2
610 #define BFFM_VALIDATEFAILEDA    3
611 #define BFFM_VALIDATEFAILEDW    4
612 #define BFFM_IUNKNOWN           5
613
614 /* messages to browser */
615 #define BFFM_SETSTATUSTEXTA     (WM_USER+100)
616 #define BFFM_ENABLEOK           (WM_USER+101)
617 #define BFFM_SETSELECTIONA      (WM_USER+102)
618 #define BFFM_SETSELECTIONW      (WM_USER+103)
619 #define BFFM_SETSTATUSTEXTW     (WM_USER+104)
620 #define BFFM_SETOKTEXT          (WM_USER+105)
621 #define BFFM_SETEXPANDED        (WM_USER+106)
622
623 LPITEMIDLIST WINAPI SHBrowseForFolderA(LPBROWSEINFOA lpbi);
624 LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi);
625 #define SHBrowseForFolder        WINELIB_NAME_AW(SHBrowseForFolder)
626 #define BFFM_SETSTATUSTEXT  WINELIB_NAME_AW(BFFM_SETSTATUSTEXT)
627 #define BFFM_SETSELECTION   WINELIB_NAME_AW(BFFM_SETSELECTION)
628 #define BFFM_VALIDATEFAILED WINELIB_NAME_AW(BFFM_VALIDATEFAILED)
629
630 /**********************************************************************
631  * SHCreateShellFolderViewEx API
632  */
633
634 typedef HRESULT (CALLBACK *LPFNVIEWCALLBACK)(
635         IShellView* dwUser,
636         IShellFolder* pshf,
637         HWND hWnd,
638         UINT uMsg,
639         WPARAM wParam,
640         LPARAM lParam);
641
642 typedef struct _CSFV
643 {
644   UINT             cbSize;
645   IShellFolder*    pshf;
646   IShellView*      psvOuter;
647   LPCITEMIDLIST    pidl;
648   LONG             lEvents;
649   LPFNVIEWCALLBACK pfnCallback;
650   FOLDERVIEWMODE   fvm;
651 } CSFV, *LPCSFV;
652
653 HRESULT WINAPI SHCreateShellFolderViewEx(LPCSFV pshfvi, IShellView **ppshv);
654
655 /* SHCreateShellFolderViewEx callback messages */
656 #define SFVM_MERGEMENU                 1
657 #define SFVM_INVOKECOMMAND             2
658 #define SFVM_GETHELPTEXT               3
659 #define SFVM_GETTOOLTIPTEXT            4
660 #define SFVM_GETBUTTONINFO             5
661 #define SFVM_GETBUTTONS                6
662 #define SFVM_INITMENUPOPUP             7
663 #define SFVM_SELECTIONCHANGED          8 /* undocumented */
664 #define SFVM_DRAWMENUITEM              9 /* undocumented */
665 #define SFVM_MEASUREMENUITEM          10 /* undocumented */
666 #define SFVM_EXITMENULOOP             11 /* undocumented */
667 #define SFVM_VIEWRELEASE              12 /* undocumented */
668 #define SFVM_GETNAMELENGTH            13 /* undocumented */
669 #define SFVM_FSNOTIFY                 14
670 #define SFVM_WINDOWCREATED            15
671 #define SFVM_WINDOWCLOSING            16 /* undocumented */
672 #define SFVM_LISTREFRESHED            17 /* undocumented */
673 #define SFVM_WINDOWFOCUSED            18 /* undocumented */
674 #define SFVM_REGISTERCOPYHOOK         20 /* undocumented */
675 #define SFVM_COPYHOOKCALLBACK         21 /* undocumented */
676 #define SFVM_GETDETAILSOF             23
677 #define SFVM_COLUMNCLICK              24
678 #define SFVM_QUERYFSNOTIFY            25
679 #define SFVM_DEFITEMCOUNT             26
680 #define SFVM_DEFVIEWMODE              27
681 #define SFVM_UNMERGEFROMMENU          28
682 #define SFVM_ADDINGOBJECT             29 /* undocumented */
683 #define SFVM_REMOVINGOBJECT           30 /* undocumented */
684 #define SFVM_UPDATESTATUSBAR          31
685 #define SFVM_BACKGROUNDENUM           32
686 #define SFVM_GETCOMMANDDIR            33 /* undocumented */
687 #define SFVM_GETCOLUMNSTREAM          34 /* undocumented */
688 #define SFVM_CANSELECTALL             35 /* undocumented */
689 #define SFVM_DIDDRAGDROP              36
690 #define SFVM_ISSTRICTREFRESH          37 /* undocumented */
691 #define SFVM_ISCHILDOBJECT            38 /* undocumented */
692 #define SFVM_SETISFV                  39
693 #define SFVM_GETEXTVIEWS              40 /* undocumented */
694 #define SFVM_THISIDLIST               41
695 #define SFVM_ADDPROPERTYPAGES         47
696 #define SFVM_BACKGROUNDENUMDONE       48
697 #define SFVM_GETNOTIFY                49
698 #define SFVM_GETSORTDEFAULTS          53
699 #define SFVM_SIZE                     57
700 #define SFVM_GETZONE                  58
701 #define SFVM_GETPANE                  59
702 #define SFVM_GETHELPTOPIC             63
703 #define SFVM_GETANIMATION             68
704 #define SFVM_GET_CUSTOMVIEWINFO       77 /* undocumented */
705 #define SFVM_ENUMERATEDITEMS          79 /* undocumented */
706 #define SFVM_GET_VIEW_DATA            80 /* undocumented */
707 #define SFVM_GET_WEBVIEW_LAYOUT       82 /* undocumented */
708 #define SFVM_GET_WEBVIEW_CONTENT      83 /* undocumented */
709 #define SFVM_GET_WEBVIEW_TASKS        84 /* undocumented */
710 #define SFVM_GET_WEBVIEW_THEME        86 /* undocumented */
711 #define SFVM_GETDEFERREDVIEWSETTINGS  92 /* undocumented */
712
713 /* Types and definitions for the SFM_* parameters */
714 #include <pshpack8.h>
715
716 #define QCMINFO_PLACE_BEFORE          0
717 #define QCMINFO_PLACE_AFTER           1
718 typedef struct _QCMINFO_IDMAP_PLACEMENT
719 {
720     UINT id;
721     UINT fFlags;
722 } QCMINFO_IDMAP_PLACEMENT;
723
724 typedef struct _QCMINFO_IDMAP
725 {
726     UINT nMaxIds;
727     QCMINFO_IDMAP_PLACEMENT pIdList[1];
728 } QCMINFO_IDMAP;
729
730 typedef struct _QCMINFO
731 {
732     HMENU hmenu;
733     UINT indexMenu;
734     UINT idCmdFirst;
735     UINT idCmdLast;
736     QCMINFO_IDMAP const* pIdMap;
737 } QCMINFO, *LPQCMINFO;
738
739 #define TBIF_DEFAULT           0x00000000
740 #define TBIF_APPEND            0x00000000
741 #define TBIF_PREPEND           0x00000001
742 #define TBIF_REPLACE           0x00000002
743 #define TBIF_INTERNETBAR       0x00010000
744 #define TBIF_STANDARDTOOLBAR   0x00020000
745 #define TBIF_NOTOOLBAR         0x00030000
746
747 typedef struct _TBINFO
748 {
749     UINT cbuttons;
750     UINT uFlags;
751 } TBINFO, *LPTBINFO;
752
753 #include <poppack.h>
754
755 /****************************************************************************
756 *       SHShellFolderView_Message API
757 */
758
759 LRESULT WINAPI SHShellFolderView_Message(
760         HWND hwndCabinet,
761         UINT uMessage,
762         LPARAM lParam);
763
764 /* SHShellFolderView_Message messages */
765 #define SFVM_REARRANGE          0x0001
766 #define SFVM_GETARRANGECOLUMN   0x0002 /* undocumented */
767 #define SFVM_ADDOBJECT          0x0003
768 #define SFVM_GETITEMCOUNT       0x0004 /* undocumented */
769 #define SFVM_GETITEMPIDL        0x0005 /* undocumented */
770 #define SFVM_REMOVEOBJECT       0x0006
771 #define SFVM_UPDATEOBJECT       0x0007
772 #define SFVM_SETREDRAW          0x0008 /* undocumented */
773 #define SFVM_GETSELECTEDOBJECTS 0x0009
774 #define SFVM_ISDROPONSOURCE     0x000A /* undocumented */
775 #define SFVM_MOVEICONS          0x000B /* undocumented */
776 #define SFVM_GETDRAGPOINT       0x000C /* undocumented */
777 #define SFVM_GETDROPPOINT       0x000D /* undocumented */
778 #define SFVM_SETITEMPOS         0x000E
779 #define SFVM_ISDROPONBACKGROUND 0x000F /* undocumented */
780 #define SFVM_SETCLIPBOARD       0x0010
781 #define SFVM_TOGGLEAUTOARRANGE  0x0011 /* undocumented */
782 #define SFVM_LINEUPICONS        0x0012 /* undocumented */
783 #define SFVM_GETAUTOARRANGE     0x0013 /* undocumented */
784 #define SFVM_GETSELECTEDCOUNT   0x0014 /* undocumented */
785 #define SFVM_GETITEMSPACING     0x0015 /* undocumented */
786 #define SFVM_REFRESHOBJECT      0x0016 /* undocumented */
787 #define SFVM_SETPOINTS          0x0017
788
789 /****************************************************************************
790 *       SHGetDataFromIDList API
791 */
792 #define SHGDFIL_FINDDATA        1
793 #define SHGDFIL_NETRESOURCE     2
794 #define SHGDFIL_DESCRIPTIONID   3
795
796 #define SHDID_ROOT_REGITEM          1
797 #define SHDID_FS_FILE               2
798 #define SHDID_FS_DIRECTORY          3
799 #define SHDID_FS_OTHER              4
800 #define SHDID_COMPUTER_DRIVE35      5
801 #define SHDID_COMPUTER_DRIVE525     6
802 #define SHDID_COMPUTER_REMOVABLE    7
803 #define SHDID_COMPUTER_FIXED        8
804 #define SHDID_COMPUTER_NETDRIVE     9
805 #define SHDID_COMPUTER_CDROM        10
806 #define SHDID_COMPUTER_RAMDISK      11
807 #define SHDID_COMPUTER_OTHER        12
808 #define SHDID_NET_DOMAIN            13
809 #define SHDID_NET_SERVER            14
810 #define SHDID_NET_SHARE             15
811 #define SHDID_NET_RESTOFNET         16
812 #define SHDID_NET_OTHER             17
813 #define SHDID_COMPUTER_IMAGING      18
814 #define SHDID_COMPUTER_AUDIO        19
815 #define SHDID_COMPUTER_SHAREDDOCS   20
816
817 #include <pshpack8.h>
818
819 typedef struct _SHDESCRIPTIONID
820 {   DWORD   dwDescriptionId;
821     CLSID   clsid;
822 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
823
824 #include <poppack.h>
825
826 HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
827 HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
828 #define  SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
829
830 BOOL WINAPI SHGetSpecialFolderPathA (HWND hwndOwner, LPSTR szPath, int nFolder, BOOL bCreate);
831 BOOL WINAPI SHGetSpecialFolderPathW (HWND hwndOwner, LPWSTR szPath, int nFolder, BOOL bCreate);
832 #define  SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
833
834 HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal) ;
835
836 /**********************************************************************
837  * SHGetSetSettings ()
838  */
839
840 typedef struct
841 {
842     BOOL fShowAllObjects : 1;
843     BOOL fShowExtensions : 1;
844     BOOL fNoConfirmRecycle : 1;
845
846     BOOL fShowSysFiles : 1;
847     BOOL fShowCompColor : 1;
848     BOOL fDoubleClickInWebView : 1;
849     BOOL fDesktopHTML : 1;
850     BOOL fWin95Classic : 1;
851     BOOL fDontPrettyPath : 1;
852     BOOL fShowAttribCol : 1;
853     BOOL fMapNetDrvBtn : 1;
854     BOOL fShowInfoTip : 1;
855     BOOL fHideIcons : 1;
856     BOOL fWebView : 1;
857     BOOL fFilter : 1;
858     BOOL fShowSuperHidden : 1;
859     BOOL fNoNetCrawling : 1;
860
861     UINT :15; /* Required for proper binary layout with gcc */
862     DWORD dwWin95Unused;
863     UINT  uWin95Unused;
864     LONG   lParamSort;
865     int    iSortDirection;
866     UINT   version;
867     UINT uNotUsed;
868     BOOL fSepProcess: 1;
869     BOOL fStartPanelOn: 1;
870     BOOL fShowStartPage: 1;
871     UINT fSpareFlags : 13;
872     UINT :15; /* Required for proper binary layout with gcc */
873 } SHELLSTATE, *LPSHELLSTATE;
874
875 /**********************************************************************
876  * SHGetSettings ()
877  */
878 typedef struct
879 {       BOOL fShowAllObjects : 1;
880         BOOL fShowExtensions : 1;
881         BOOL fNoConfirmRecycle : 1;
882         BOOL fShowSysFiles : 1;
883
884         BOOL fShowCompColor : 1;
885         BOOL fDoubleClickInWebView : 1;
886         BOOL fDesktopHTML : 1;
887         BOOL fWin95Classic : 1;
888
889         BOOL fDontPrettyPath : 1;
890         BOOL fShowAttribCol : 1;
891         BOOL fMapNetDrvBtn : 1;
892         BOOL fShowInfoTip : 1;
893
894         BOOL fHideIcons : 1;
895         UINT fRestFlags : 3;
896         UINT :15; /* Required for proper binary layout with gcc */
897 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
898
899 VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
900
901 #define SSF_SHOWALLOBJECTS              0x0001
902 #define SSF_SHOWEXTENSIONS              0x0002
903 #define SSF_SHOWCOMPCOLOR               0x0008
904 #define SSF_SHOWSYSFILES                0x0020
905 #define SSF_DOUBLECLICKINWEBVIEW        0x0080
906 #define SSF_SHOWATTRIBCOL               0x0100
907 #define SSF_DESKTOPHTML                 0x0200
908 #define SSF_WIN95CLASSIC                0x0400
909 #define SSF_DONTPRETTYPATH              0x0800
910 #define SSF_SHOWINFOTIP                 0x2000
911 #define SSF_MAPNETDRVBUTTON             0x1000
912 #define SSF_NOCONFIRMRECYCLE            0x8000
913 #define SSF_HIDEICONS                   0x4000
914
915 /****************************************************************************
916 * SHRestricted API
917 */
918 typedef enum RESTRICTIONS
919 {
920         REST_NONE                       = 0x00000000,
921         REST_NORUN                      = 0x00000001,
922         REST_NOCLOSE                    = 0x00000002,
923         REST_NOSAVESET                  = 0x00000004,
924         REST_NOFILEMENU                 = 0x00000008,
925         REST_NOSETFOLDERS               = 0x00000010,
926         REST_NOSETTASKBAR               = 0x00000020,
927         REST_NODESKTOP                  = 0x00000040,
928         REST_NOFIND                     = 0x00000080,
929         REST_NODRIVES                   = 0x00000100,
930         REST_NODRIVEAUTORUN             = 0x00000200,
931         REST_NODRIVETYPEAUTORUN         = 0x00000400,
932         REST_NONETHOOD                  = 0x00000800,
933         REST_STARTBANNER                = 0x00001000,
934         REST_RESTRICTRUN                = 0x00002000,
935         REST_NOPRINTERTABS              = 0x00004000,
936         REST_NOPRINTERDELETE            = 0x00008000,
937         REST_NOPRINTERADD               = 0x00010000,
938         REST_NOSTARTMENUSUBFOLDERS      = 0x00020000,
939         REST_MYDOCSONNET                = 0x00040000,
940         REST_NOEXITTODOS                = 0x00080000,
941         REST_ENFORCESHELLEXTSECURITY    = 0x00100000,
942         REST_LINKRESOLVEIGNORELINKINFO  = 0x00200000,
943         REST_NOCOMMONGROUPS             = 0x00400000,
944         REST_SEPARATEDESKTOPPROCESS     = 0x00800000,
945         REST_NOWEB                      = 0x01000000,
946         REST_NOTRAYCONTEXTMENU          = 0x02000000,
947         REST_NOVIEWCONTEXTMENU          = 0x04000000,
948         REST_NONETCONNECTDISCONNECT     = 0x08000000,
949         REST_STARTMENULOGOFF            = 0x10000000,
950         REST_NOSETTINGSASSIST           = 0x20000000,
951         REST_NOINTERNETICON             = 0x40000001,
952         REST_NORECENTDOCSHISTORY,
953         REST_NORECENTDOCSMENU,
954         REST_NOACTIVEDESKTOP,
955         REST_NOACTIVEDESKTOPCHANGES,
956         REST_NOFAVORITESMENU,
957         REST_CLEARRECENTDOCSONEXIT,
958         REST_CLASSICSHELL,
959         REST_NOCUSTOMIZEWEBVIEW,
960
961         REST_NOHTMLWALLPAPER            = 0x40000010,
962         REST_NOCHANGINGWALLPAPER,
963         REST_NODESKCOMP,
964         REST_NOADDDESKCOMP,
965         REST_NODELDESKCOMP,
966         REST_NOCLOSEDESKCOMP,
967         REST_NOCLOSE_DRAGDROPBAND,
968         REST_NOMOVINGBAND,
969         REST_NOEDITDESKCOMP,
970         REST_NORESOLVESEARCH,
971         REST_NORESOLVETRACK,
972         REST_FORCECOPYACLWITHFILE,
973         REST_NOLOGO3CHANNELNOTIFY,
974         REST_NOFORGETSOFTWAREUPDATE,
975         REST_NOSETACTIVEDESKTOP,
976         REST_NOUPDATEWINDOWS,
977         REST_NOCHANGESTARMENU,          /* 0x40000020 */
978         REST_NOFOLDEROPTIONS,
979         REST_HASFINDCOMPUTERS,
980         REST_INTELLIMENUS,
981         REST_RUNDLGMEMCHECKBOX,
982         REST_ARP_ShowPostSetup,
983         REST_NOCSC,
984         REST_NOCONTROLPANEL,
985         REST_ENUMWORKGROUP,
986         REST_ARP_NOARP,
987         REST_ARP_NOREMOVEPAGE,
988         REST_ARP_NOADDPAGE,
989         REST_ARP_NOWINSETUPPAGE,
990         REST_GREYMSIADS,
991         REST_NOCHANGEMAPPEDDRIVELABEL,
992         REST_NOCHANGEMAPPEDDRIVECOMMENT,
993         REST_MaxRecentDocs,             /* 0x40000030 */
994         REST_NONETWORKCONNECTIONS,
995         REST_FORCESTARTMENULOGOFF,
996         REST_NOWEBVIEW,
997         REST_NOCUSTOMIZETHISFOLDER,
998         REST_NOENCRYPTION,
999
1000         REST_ALLOWFRENCHENCRYPTION,     /* not documented */
1001
1002         REST_DONTSHOWSUPERHIDDEN,
1003         REST_NOSHELLSEARCHBUTTON,
1004         REST_NOHARDWARETAB,
1005         REST_NORUNASINSTALLPROMPT,
1006         REST_PROMPTRUNASINSTALLNETPATH,
1007         REST_NOMANAGEMYCOMPUTERVERB,
1008         REST_NORECENTDOCSNETHOOD,
1009         REST_DISALLOWRUN,
1010         REST_NOWELCOMESCREEN,
1011         REST_RESTRICTCPL,               /* 0x40000040 */
1012         REST_DISALLOWCPL,
1013         REST_NOSMBALLOONTIP,
1014         REST_NOSMHELP,
1015         REST_NOWINKEYS,
1016         REST_NOENCRYPTONMOVE,
1017         REST_NOLOCALMACHINERUN,
1018         REST_NOCURRENTUSERRUN,
1019         REST_NOLOCALMACHINERUNONCE,
1020         REST_NOCURRENTUSERRUNONCE,
1021         REST_FORCEACTIVEDESKTOPON,
1022         REST_NOCOMPUTERSNEARME,
1023         REST_NOVIEWONDRIVE,
1024         REST_NONETCRAWL,
1025         REST_NOSHAREDDOCUMENTS,
1026         REST_NOSMMYDOCS,
1027         REST_NOSMMYPICS,                /* 0x40000050 */
1028         REST_ALLOWBITBUCKDRIVES,
1029         REST_NONLEGACYSHELLMODE,
1030         REST_NOCONTROLPANELBARRICADE,
1031         REST_NOSTARTPAGE,
1032         REST_NOAUTOTRAYNOTIFY,
1033         REST_NOTASKGROUPING,
1034         REST_NOCDBURNING,
1035         REST_MYCOMPNOPROP,
1036         REST_MYDOCSNOPROP,
1037         REST_NOSTARTPANEL,
1038         REST_NODISPLAYAPPEARANCEPAGE,
1039         REST_NOTHEMESTAB,
1040         REST_NOVISUALSTYLECHOICE,
1041         REST_NOSIZECHOICE,
1042         REST_NOCOLORCHOICE,
1043         REST_SETVISUALSTYLE,            /* 0x40000060 */
1044         REST_STARTRUNNOHOMEPATH,
1045         REST_NOUSERNAMEINSTARTPANEL,
1046         REST_NOMYCOMPUTERICON,
1047         REST_NOSMNETWORKPLACES,
1048         REST_NOSMPINNEDLIST,
1049         REST_NOSMMYMUSIC,
1050         REST_NOSMEJECTPC,
1051         REST_NOSMMOREPROGRAMS,
1052         REST_NOSMMFUPROGRAMS,
1053         REST_NOTRAYITEMSDISPLAY,
1054         REST_NOTOOLBARSONTASKBAR,
1055         /* 0x4000006C
1056            0x4000006D
1057            0x4000006E */
1058         REST_NOSMCONFIGUREPROGRAMS      = 0x4000006F,
1059         REST_HIDECLOCK,                 /* 0x40000070 */
1060         REST_NOLOWDISKSPACECHECKS,
1061         REST_NOENTIRENETWORK,
1062         REST_NODESKTOPCLEANUP,
1063         REST_BITBUCKNUKEONDELETE,
1064         REST_BITBUCKCONFIRMDELETE,
1065         REST_BITBUCKNOPROP,
1066         REST_NODISPBACKGROUND,
1067         REST_NODISPSCREENSAVEPG,
1068         REST_NODISPSETTINGSPG,
1069         REST_NODISPSCREENSAVEPREVIEW,
1070         REST_NODISPLAYCPL,
1071         REST_HIDERUNASVERB,
1072         REST_NOTHUMBNAILCACHE,
1073         REST_NOSTRCMPLOGICAL,
1074         REST_NOPUBLISHWIZARD,
1075         REST_NOONLINEPRINTSWIZARD,      /* 0x40000080 */
1076         REST_NOWEBSERVICES,
1077         REST_ALLOWUNHASHEDWEBVIEW,
1078         REST_ALLOWLEGACYWEBVIEW,
1079         REST_REVERTWEBVIEWSECURITY,
1080
1081         REST_INHERITCONSOLEHANDLES      = 0x40000086,
1082
1083         REST_NODISCONNECT               = 0x41000001,
1084         REST_NOSECURITY,
1085         REST_NOFILEASSOCIATE,           /* 0x41000003 */
1086 } RESTRICTIONS;
1087
1088 DWORD WINAPI SHRestricted(RESTRICTIONS rest);
1089
1090 /****************************************************************************
1091 * SHChangeNotify API
1092 */
1093 typedef struct _SHChangeNotifyEntry
1094 {
1095     LPCITEMIDLIST pidl;
1096     BOOL   fRecursive;
1097 } SHChangeNotifyEntry;
1098
1099 #define SHCNE_RENAMEITEM        0x00000001
1100 #define SHCNE_CREATE            0x00000002
1101 #define SHCNE_DELETE            0x00000004
1102 #define SHCNE_MKDIR             0x00000008
1103 #define SHCNE_RMDIR             0x00000010
1104 #define SHCNE_MEDIAINSERTED     0x00000020
1105 #define SHCNE_MEDIAREMOVED      0x00000040
1106 #define SHCNE_DRIVEREMOVED      0x00000080
1107 #define SHCNE_DRIVEADD          0x00000100
1108 #define SHCNE_NETSHARE          0x00000200
1109 #define SHCNE_NETUNSHARE        0x00000400
1110 #define SHCNE_ATTRIBUTES        0x00000800
1111 #define SHCNE_UPDATEDIR         0x00001000
1112 #define SHCNE_UPDATEITEM        0x00002000
1113 #define SHCNE_SERVERDISCONNECT  0x00004000
1114 #define SHCNE_UPDATEIMAGE       0x00008000
1115 #define SHCNE_DRIVEADDGUI       0x00010000
1116 #define SHCNE_RENAMEFOLDER      0x00020000
1117 #define SHCNE_FREESPACE         0x00040000
1118
1119 #define SHCNE_EXTENDED_EVENT    0x04000000
1120 #define SHCNE_ASSOCCHANGED      0x08000000
1121 #define SHCNE_DISKEVENTS        0x0002381F
1122 #define SHCNE_GLOBALEVENTS      0x0C0581E0
1123 #define SHCNE_ALLEVENTS         0x7FFFFFFF
1124 #define SHCNE_INTERRUPT         0x80000000
1125
1126 #define SHCNEE_ORDERCHANGED     0x0002L
1127 #define SHCNEE_MSI_CHANGE       0x0004L
1128 #define SHCNEE_MSI_UNINSTALL    0x0005L
1129
1130 #define SHCNF_IDLIST            0x0000
1131 #define SHCNF_PATHA             0x0001
1132 #define SHCNF_PRINTERA          0x0002
1133 #define SHCNF_DWORD             0x0003
1134 #define SHCNF_PATHW             0x0005
1135 #define SHCNF_PRINTERW          0x0006
1136 #define SHCNF_TYPE              0x00FF
1137 #define SHCNF_FLUSH             0x1000
1138 #define SHCNF_FLUSHNOWAIT       0x2000
1139
1140 #define SHCNF_PATH              WINELIB_NAME_AW(SHCNF_PATH)
1141 #define SHCNF_PRINTER           WINELIB_NAME_AW(SHCNF_PRINTER)
1142
1143 void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
1144
1145 typedef enum {
1146     SLDF_HAS_ID_LIST = 0x00000001,
1147     SLDF_HAS_LINK_INFO = 0x00000002,
1148     SLDF_HAS_NAME = 0x00000004,
1149     SLDF_HAS_RELPATH = 0x00000008,
1150     SLDF_HAS_WORKINGDIR = 0x00000010,
1151     SLDF_HAS_ARGS = 0x00000020,
1152     SLDF_HAS_ICONLOCATION = 0x00000040,
1153     SLDF_UNICODE = 0x00000080,
1154     SLDF_FORCE_NO_LINKINFO = 0x00000100,
1155     SLDF_HAS_EXP_SZ = 0x00000200,
1156     SLDF_RUN_IN_SEPARATE = 0x00000400,
1157     SLDF_HAS_LOGO3ID = 0x00000800,
1158     SLDF_HAS_DARWINID = 0x00001000,
1159     SLDF_RUNAS_USER = 0x00002000,
1160     SLDF_HAS_EXP_ICON_SZ = 0x00004000,
1161     SLDF_NO_PIDL_ALIAS = 0x00008000,
1162     SLDF_FORCE_UNCNAME = 0x00010000,
1163     SLDF_RUN_WITH_SHIMLAYER = 0x00020000,
1164     SLDF_FORCE_NO_LINKTRACK = 0x00040000,
1165     SLDF_ENABLE_TARGET_METADATA = 0x00080000,
1166     SLDF_DISABLE_KNOWNFOLDER_RELATIVE_TRACKING = 0x00200000,
1167     SLDF_VALID = 0x003ff7ff,
1168     SLDF_RESERVED = 0x80000000,
1169 } SHELL_LINK_DATA_FLAGS;
1170
1171 typedef struct tagDATABLOCKHEADER
1172 {
1173     DWORD cbSize;
1174     DWORD dwSignature;
1175 } DATABLOCK_HEADER, *LPDATABLOCK_HEADER, *LPDBLIST;
1176
1177 typedef struct {
1178     DATABLOCK_HEADER dbh;
1179     CHAR szDarwinID[MAX_PATH];
1180     WCHAR szwDarwinID[MAX_PATH];
1181 } EXP_DARWIN_LINK, *LPEXP_DARWIN_LINK;
1182
1183 typedef struct {
1184     DWORD cbSize;
1185     DWORD cbSignature;
1186     CHAR szTarget[MAX_PATH];
1187     WCHAR szwTarget[MAX_PATH];
1188 } EXP_SZ_LINK, *LPEXP_SZ_LINK;
1189
1190 typedef struct {
1191     DWORD cbSize;
1192     DWORD dwSignature;
1193     DWORD idSpecialFolder;
1194     DWORD cbOffset;
1195 } EXP_SPECIAL_FOLDER, *LPEXP_SPECIAL_FOLDER;
1196
1197 typedef struct {
1198     DWORD cbSize;
1199     DWORD dwSignature;
1200     BYTE abPropertyStorage[1];
1201 } EXP_PROPERTYSTORAGE;
1202
1203 #define EXP_SZ_LINK_SIG         0xa0000001
1204 #define NT_CONSOLE_PROPS_SIG    0xa0000002
1205 #define NT_FE_CONSOLE_PROPS_SIG 0xa0000004
1206 #define EXP_SPECIAL_FOLDER_SIG  0xa0000005
1207 #define EXP_DARWIN_ID_SIG       0xa0000006
1208 #define EXP_SZ_ICON_SIG         0xa0000007
1209 #define EXP_LOGO3_ID_SIG        EXP_SZ_ICON_SIG /* Old SDKs only */
1210 #define EXP_PROPERTYSTORAGE_SIG 0xa0000009
1211
1212 typedef struct _SHChangeDWORDAsIDList {
1213     USHORT   cb;
1214     DWORD    dwItem1;
1215     DWORD    dwItem2;
1216     USHORT   cbZero;
1217 } SHChangeDWORDAsIDList, *LPSHChangeDWORDAsIDList;
1218
1219 typedef struct _SHChangeProductKeyAsIDList {
1220     USHORT cb;
1221     WCHAR wszProductKey[39];
1222     USHORT cbZero;
1223 } SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList;
1224
1225 ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, int fSources, LONG fEvents, UINT wMsg,
1226                                     int cEntries, SHChangeNotifyEntry *pshcne);
1227 BOOL WINAPI SHChangeNotifyDeregister(ULONG ulID);
1228 HANDLE WINAPI SHChangeNotification_Lock(HANDLE hChangeNotification, DWORD dwProcessId,
1229                                         LPITEMIDLIST **pppidl, LONG *plEvent);
1230 BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock);
1231
1232 HRESULT WINAPI SHGetRealIDL(IShellFolder *psf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST * ppidlReal);
1233
1234 /****************************************************************************
1235 * SHCreateDirectory API
1236 */
1237 DWORD WINAPI SHCreateDirectory(HWND, LPCVOID);
1238 int WINAPI SHCreateDirectoryExA(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
1239 int WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES);
1240
1241 /****************************************************************************
1242 * SHGetSpecialFolderLocation API
1243 */
1244 HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, int nFolder, LPITEMIDLIST * ppidl);
1245 HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl);
1246
1247 /****************************************************************************
1248 * SHGetFolderPath API
1249 */
1250 typedef enum {
1251     SHGFP_TYPE_CURRENT = 0,
1252     SHGFP_TYPE_DEFAULT = 1
1253 } SHGFP_TYPE;
1254
1255 HRESULT WINAPI SHGetFolderPathA(HWND hwnd, int nFolder, HANDLE hToken, DWORD dwFlags, LPSTR pszPath);
1256 HRESULT WINAPI SHGetFolderPathW(HWND hwnd, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
1257 #define        SHGetFolderPath WINELIB_NAME_AW(SHGetFolderPath)
1258
1259 #define CSIDL_DESKTOP           0x0000
1260 #define CSIDL_INTERNET          0x0001
1261 #define CSIDL_PROGRAMS          0x0002
1262 #define CSIDL_CONTROLS          0x0003
1263 #define CSIDL_PRINTERS          0x0004
1264 #define CSIDL_PERSONAL          0x0005
1265 #define CSIDL_FAVORITES         0x0006
1266 #define CSIDL_STARTUP           0x0007
1267 #define CSIDL_RECENT            0x0008
1268 #define CSIDL_SENDTO            0x0009
1269 #define CSIDL_BITBUCKET         0x000a
1270 #define CSIDL_STARTMENU         0x000b
1271 #define CSIDL_MYDOCUMENTS       CSIDL_PERSONAL
1272 #define CSIDL_MYMUSIC           0x000d
1273 #define CSIDL_MYVIDEO           0x000e
1274 #define CSIDL_DESKTOPDIRECTORY  0x0010
1275 #define CSIDL_DRIVES            0x0011
1276 #define CSIDL_NETWORK           0x0012
1277 #define CSIDL_NETHOOD           0x0013
1278 #define CSIDL_FONTS             0x0014
1279 #define CSIDL_TEMPLATES         0x0015
1280 #define CSIDL_COMMON_STARTMENU  0x0016
1281 #define CSIDL_COMMON_PROGRAMS   0X0017
1282 #define CSIDL_COMMON_STARTUP    0x0018
1283 #define CSIDL_COMMON_DESKTOPDIRECTORY   0x0019
1284 #define CSIDL_APPDATA           0x001a
1285 #define CSIDL_PRINTHOOD         0x001b
1286 #define CSIDL_LOCAL_APPDATA     0x001c
1287 #define CSIDL_ALTSTARTUP        0x001d
1288 #define CSIDL_COMMON_ALTSTARTUP 0x001e
1289 #define CSIDL_COMMON_FAVORITES  0x001f
1290 #define CSIDL_INTERNET_CACHE    0x0020
1291 #define CSIDL_COOKIES           0x0021
1292 #define CSIDL_HISTORY           0x0022
1293 #define CSIDL_COMMON_APPDATA    0x0023
1294 #define CSIDL_WINDOWS           0x0024
1295 #define CSIDL_SYSTEM            0x0025
1296 #define CSIDL_PROGRAM_FILES     0x0026
1297 #define CSIDL_MYPICTURES        0x0027
1298 #define CSIDL_PROFILE           0x0028
1299 #define CSIDL_SYSTEMX86         0x0029
1300 #define CSIDL_PROGRAM_FILESX86  0x002a
1301 #define CSIDL_PROGRAM_FILES_COMMON      0x002b
1302 #define CSIDL_PROGRAM_FILES_COMMONX86   0x002c
1303 #define CSIDL_COMMON_TEMPLATES  0x002d
1304 #define CSIDL_COMMON_DOCUMENTS  0x002e
1305 #define CSIDL_COMMON_ADMINTOOLS 0x002f
1306 #define CSIDL_ADMINTOOLS        0x0030
1307 #define CSIDL_CONNECTIONS       0x0031
1308 #define CSIDL_COMMON_MUSIC      0x0035
1309 #define CSIDL_COMMON_PICTURES   0x0036
1310 #define CSIDL_COMMON_VIDEO      0x0037
1311 #define CSIDL_RESOURCES         0x0038
1312 #define CSIDL_RESOURCES_LOCALIZED 0x0039
1313 #define CSIDL_COMMON_OEM_LINKS  0x003a
1314 #define CSIDL_CDBURN_AREA       0x003b
1315 #define CSIDL_COMPUTERSNEARME   0x003d
1316 #define CSIDL_PROFILES          0x003e
1317 #define CSIDL_FOLDER_MASK       0x00ff
1318 #define CSIDL_FLAG_PER_USER_INIT 0x0800
1319 #define CSIDL_FLAG_NO_ALIAS     0x1000
1320 #define CSIDL_FLAG_DONT_VERIFY  0x4000
1321 #define CSIDL_FLAG_CREATE       0x8000
1322
1323 #define CSIDL_FLAG_MASK         0xff00
1324
1325 /****************************************************************************
1326  * SHGetDesktopFolder API
1327  */
1328 HRESULT WINAPI SHGetDesktopFolder(IShellFolder * *);
1329
1330 /****************************************************************************
1331  * SHBindToParent API
1332  */
1333 HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast);
1334
1335 /****************************************************************************
1336 * SHDefExtractIcon API
1337 */
1338 HRESULT WINAPI SHDefExtractIconA(LPCSTR pszIconFile, int iIndex, UINT uFlags,
1339                                  HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
1340 HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags,
1341                                  HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
1342 #define        SHDefExtractIcon WINELIB_NAME_AW(SHDefExtractIcon)
1343
1344 /*
1345  * DROPFILES for CF_HDROP and CF_PRINTERS
1346  */
1347 typedef struct _DROPFILES
1348 {
1349   DWORD pFiles;
1350   POINT pt;
1351   BOOL  fNC;
1352   BOOL  fWide;
1353 } DROPFILES, *LPDROPFILES;
1354
1355 /*
1356  * Properties of a file in the clipboard
1357  */
1358 typedef struct _FILEDESCRIPTORA {
1359     DWORD dwFlags;
1360     CLSID clsid;
1361     SIZEL sizel;
1362     POINTL pointl;
1363     DWORD dwFileAttributes;
1364     FILETIME ftCreationTime;
1365     FILETIME ftLastAccessTime;
1366     FILETIME ftLastWriteTime;
1367     DWORD nFileSizeHigh;
1368     DWORD nFileSizeLow;
1369     CHAR cFileName[MAX_PATH];
1370 } FILEDESCRIPTORA, *LPFILEDESCRIPTORA;
1371
1372 typedef struct _FILEDESCRIPTORW {
1373     DWORD dwFlags;
1374     CLSID clsid;
1375     SIZEL sizel;
1376     POINTL pointl;
1377     DWORD dwFileAttributes;
1378     FILETIME ftCreationTime;
1379     FILETIME ftLastAccessTime;
1380     FILETIME ftLastWriteTime;
1381     DWORD nFileSizeHigh;
1382     DWORD nFileSizeLow;
1383     WCHAR cFileName[MAX_PATH];
1384 } FILEDESCRIPTORW, *LPFILEDESCRIPTORW;
1385
1386 DECL_WINELIB_TYPE_AW(FILEDESCRIPTOR)
1387 DECL_WINELIB_TYPE_AW(LPFILEDESCRIPTOR)
1388
1389 /*
1390  * CF_FILEGROUPDESCRIPTOR clipboard format
1391  */
1392 typedef struct _FILEGROUPDESCRIPTORA {
1393     UINT cItems;
1394     FILEDESCRIPTORA fgd[1];
1395 } FILEGROUPDESCRIPTORA, *LPFILEGROUPDESCRIPTORA;
1396
1397 typedef struct _FILEGROUPDESCRIPTORW {
1398     UINT cItems;
1399     FILEDESCRIPTORW fgd[1];
1400 } FILEGROUPDESCRIPTORW, *LPFILEGROUPDESCRIPTORW;
1401
1402 DECL_WINELIB_TYPE_AW(FILEGROUPDESCRIPTOR)
1403 DECL_WINELIB_TYPE_AW(LPFILEGROUPDESCRIPTOR)
1404
1405 /****************************************************************************
1406  * Cabinet functions
1407  */
1408
1409 typedef struct {
1410     WORD cLength;
1411     WORD nVersion;
1412     BOOL fFullPathTitle:1;
1413     BOOL fSaveLocalView:1;
1414     BOOL fNotShell:1;
1415     BOOL fSimpleDefault:1;
1416     BOOL fDontShowDescBar:1;
1417     BOOL fNewWindowMode:1;
1418     BOOL fShowCompColor:1;
1419     BOOL fDontPrettyNames:1;
1420     BOOL fAdminsCreateCommonGroups:1;
1421     UINT fUnusedFlags:7;
1422     UINT :15; /* Required for proper binary layout with gcc */
1423     UINT fMenuEnumFilter;
1424 } CABINETSTATE, *LPCABINETSTATE;
1425
1426 #define CABINETSTATE_VERSION 2
1427
1428 BOOL WINAPI ReadCabinetState(CABINETSTATE *, int);
1429 BOOL WINAPI WriteCabinetState(CABINETSTATE *);
1430
1431 /****************************************************************************
1432  * Path Manipulation Routines
1433  */
1434
1435 /* PathProcessCommand flags */
1436 #define PPCF_ADDQUOTES        0x01
1437 #define PPCF_INCLUDEARGS      0x02
1438 #define PPCF_ADDARGUMENTS     0x03
1439 #define PPCF_NODIRECTORIES    0x10
1440 #define PPCF_DONTRESOLVE      0x20
1441 #define PPCF_FORCEQUALIFY     0x40
1442 #define PPCF_LONGESTPOSSIBLE  0x80
1443
1444 /* PathResolve flags */
1445 #define PRF_VERIFYEXISTS         0x01
1446 #define PRF_EXECUTABLE           0x02
1447 #define PRF_TRYPROGRAMEXTENSIONS 0x03
1448 #define PRF_FIRSTDIRDEF          0x04
1449 #define PRF_DONTFINDLINK         0x08
1450
1451 VOID WINAPI PathGetShortPath(LPWSTR pszPath);
1452 LONG WINAPI PathProcessCommand(LPCWSTR, LPWSTR, int, DWORD);
1453 BOOL WINAPI PathYetAnotherMakeUniqueName(LPWSTR, LPCWSTR, LPCWSTR, LPCWSTR);
1454
1455 /****************************************************************************
1456  * Drag And Drop Routines
1457  */
1458
1459 /* DAD_AutoScroll sample structure */
1460 #define NUM_POINTS 3
1461 typedef struct
1462 {
1463     int   iNextSample;
1464     DWORD dwLastScroll;
1465     BOOL  bFull;
1466     POINT pts[NUM_POINTS];
1467     DWORD dwTimes[NUM_POINTS];
1468 } AUTO_SCROLL_DATA;
1469
1470 BOOL         WINAPI DAD_SetDragImage(HIMAGELIST,LPPOINT);
1471 BOOL         WINAPI DAD_DragEnterEx(HWND,POINT);
1472 BOOL         WINAPI DAD_DragEnterEx2(HWND,POINT,IDataObject*);
1473 BOOL         WINAPI DAD_DragMove(POINT);
1474 BOOL         WINAPI DAD_DragLeave(void);
1475 BOOL         WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,LPPOINT);
1476 HRESULT      WINAPI SHDoDragDrop(HWND,IDataObject*,IDropSource*,DWORD,LPDWORD);
1477
1478 LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST,LPCSHITEMID,BOOL);
1479 LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST);
1480 LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST);
1481 LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR);
1482 LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR);
1483 #define             ILCreateFromPath WINELIB_NAME_AW(ILCreateFromPath)
1484 LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST,LPCITEMIDLIST);
1485 LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST,LPCITEMIDLIST);
1486 LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST);
1487 void         WINAPI ILFree(LPITEMIDLIST);
1488 LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST);
1489 UINT         WINAPI ILGetSize(LPCITEMIDLIST);
1490 BOOL         WINAPI ILIsEqual(LPCITEMIDLIST,LPCITEMIDLIST);
1491 BOOL         WINAPI ILIsParent(LPCITEMIDLIST,LPCITEMIDLIST,BOOL);
1492 HRESULT      WINAPI ILLoadFromStream(LPSTREAM,LPITEMIDLIST*);
1493 BOOL         WINAPI ILRemoveLastID(LPITEMIDLIST);
1494 HRESULT      WINAPI ILSaveToStream(LPSTREAM,LPCITEMIDLIST);
1495
1496
1497 #include <poppack.h>
1498
1499 #ifdef __cplusplus
1500 } /* extern "C" */
1501 #endif /* defined(__cplusplus) */
1502
1503 #endif /* __WINE_SHLOBJ_H */