1 | /* $Id: shell32.h,v 1.1 1999-05-24 20:19:58 ktk Exp $ */
|
---|
2 |
|
---|
3 | #ifndef __shell32_H__
|
---|
4 | #define __shell32_H__
|
---|
5 |
|
---|
6 | #define LPMALLOC void *
|
---|
7 |
|
---|
8 | typedef struct
|
---|
9 | {
|
---|
10 | WORD cb; /* nr of bytes in this item */
|
---|
11 | BYTE abID[1]; /* first byte in this item */
|
---|
12 | } SHITEMID, *LPSHITEMID;
|
---|
13 |
|
---|
14 |
|
---|
15 | typedef struct
|
---|
16 | {
|
---|
17 | SHITEMID mkid; /* first itemid in list */
|
---|
18 | } ITEMIDLIST, *LPITEMIDLIST, *LPCITEMIDLIST;
|
---|
19 |
|
---|
20 |
|
---|
21 | typedef int (* WIN32API BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
|
---|
22 |
|
---|
23 | typedef struct _browseinfoA
|
---|
24 | {
|
---|
25 | HWND hwndOwner;
|
---|
26 | LPCITEMIDLIST pidlRoot;
|
---|
27 | LPSTR pszDisplayName;// Return display name of item selected.
|
---|
28 | LPCSTR lpszTitle; // text to go in the banner over the tree.
|
---|
29 | UINT ulFlags; // Flags that control the return stuff
|
---|
30 | BFFCALLBACK lpfn;
|
---|
31 | LPARAM lParam; // extra info that's passed back in callbacks
|
---|
32 |
|
---|
33 | int iImage; // output var: where to return the Image index.
|
---|
34 | } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
|
---|
35 |
|
---|
36 | typedef struct _browseinfoW
|
---|
37 | {
|
---|
38 | HWND hwndOwner;
|
---|
39 | LPCITEMIDLIST pidlRoot;
|
---|
40 | LPWSTR pszDisplayName;// Return display name of item selected.
|
---|
41 | LPCWSTR lpszTitle; // text to go in the banner over the tree.
|
---|
42 | UINT ulFlags; // Flags that control the return stuff
|
---|
43 | BFFCALLBACK lpfn;
|
---|
44 | LPARAM lParam; // extra info that's passed back in callbacks
|
---|
45 |
|
---|
46 | int iImage; // output var: where to return the Image index.
|
---|
47 | } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
|
---|
48 |
|
---|
49 | // Browsing for directory.
|
---|
50 | #define BIF_RETURNONLYFSDIRS 0x0001 // For finding a folder to start document searching
|
---|
51 | #define BIF_DONTGOBELOWDOMAIN 0x0002 // For starting the Find Computer
|
---|
52 | #define BIF_STATUSTEXT 0x0004
|
---|
53 | #define BIF_RETURNFSANCESTORS 0x0008
|
---|
54 |
|
---|
55 | #define BIF_BROWSEFORCOMPUTER 0x1000 // Browsing for Computers.
|
---|
56 | #define BIF_BROWSEFORPRINTER 0x2000 // Browsing for Printers
|
---|
57 | #define BIF_BROWSEINCLUDEFILES 0x4000 // Browsing for Everything
|
---|
58 |
|
---|
59 | // message from browser
|
---|
60 | #define BFFM_INITIALIZED 1
|
---|
61 | #define BFFM_SELCHANGED 2
|
---|
62 |
|
---|
63 | // messages to browser
|
---|
64 | #define BFFM_SETSTATUSTEXT (WM_USER + 100)
|
---|
65 | #define BFFM_ENABLEOK (WM_USER + 101)
|
---|
66 | #define BFFM_SETSELECTION (WM_USER + 102)
|
---|
67 |
|
---|
68 |
|
---|
69 |
|
---|
70 | typedef void *LPSHELLFOLDER;
|
---|
71 |
|
---|
72 |
|
---|
73 | #endif /* __shell32_h_ */
|
---|
74 |
|
---|
75 |
|
---|
76 |
|
---|
77 |
|
---|
78 |
|
---|
79 |
|
---|
80 |
|
---|
81 |
|
---|
82 |
|
---|
83 |
|
---|
84 |
|
---|
85 |
|
---|
86 |
|
---|
87 |
|
---|
88 |
|
---|
89 | #if 0
|
---|
90 |
|
---|
91 |
|
---|
92 | /* .ICO file ICONDIR definitions */
|
---|
93 |
|
---|
94 | #pragma pack(1)
|
---|
95 |
|
---|
96 | typedef struct
|
---|
97 | {
|
---|
98 | BYTE bWidth; /* Width, in pixels, of the image */
|
---|
99 | BYTE bHeight; /* Height, in pixels, of the image */
|
---|
100 | BYTE bColorCount; /* Number of colors in image (0 if >=8bpp) */
|
---|
101 | BYTE bReserved; /* Reserved ( must be 0) */
|
---|
102 | WORD wPlanes; /* Color Planes */
|
---|
103 | WORD wBitCount; /* Bits per pixel */
|
---|
104 | DWORD dwBytesInRes; /* How many bytes in this resource? */
|
---|
105 | DWORD dwImageOffset; /* Where in the file is this image? */
|
---|
106 | } icoICONDIRENTRY, *LPicoICONDIRENTRY;
|
---|
107 |
|
---|
108 | typedef struct
|
---|
109 | {
|
---|
110 | WORD idReserved; /* Reserved (must be 0) */
|
---|
111 | WORD idType; /* Resource Type (1 for icons) */
|
---|
112 | WORD idCount; /* How many images? */
|
---|
113 | icoICONDIRENTRY idEntries[1]; /* An entry for each image (idCount of 'em) */
|
---|
114 | } icoICONDIR, *LPicoICONDIR;
|
---|
115 |
|
---|
116 | #pragma pack(4)
|
---|
117 |
|
---|
118 |
|
---|
119 | #endif
|
---|
120 |
|
---|
121 |
|
---|
122 |
|
---|
123 |
|
---|
124 |
|
---|
125 |
|
---|
126 | #if 0
|
---|
127 | #ifndef _WINE_SHLOBJ_H
|
---|
128 | #define _WINE_SHLOBJ_H
|
---|
129 |
|
---|
130 | #include "shell.h"
|
---|
131 | #include "ole.h"
|
---|
132 | #include "ole2.h"
|
---|
133 | #include "compobj.h"
|
---|
134 |
|
---|
135 | #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
|
---|
136 | #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
|
---|
137 | #define PURE
|
---|
138 | #define FAR
|
---|
139 | #define THIS_ THIS,
|
---|
140 |
|
---|
141 |
|
---|
142 | typedef LPVOID LPBC; /* *IBindCtx really */
|
---|
143 |
|
---|
144 | /*
|
---|
145 | * shell32 classids
|
---|
146 | */
|
---|
147 | DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
|
---|
148 | DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
|
---|
149 |
|
---|
150 | /*
|
---|
151 | * shell32 Interface ids
|
---|
152 | */
|
---|
153 | DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
|
---|
154 | DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
|
---|
155 | DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
|
---|
156 | DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
|
---|
157 | DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
|
---|
158 | DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
|
---|
159 | DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
|
---|
160 | DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
|
---|
161 | DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
|
---|
162 | DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
|
---|
163 |
|
---|
164 | #define STRRET_WSTR 0x0000
|
---|
165 | #define STRRET_OFFSET 0x0001
|
---|
166 | #define STRRET_CSTR 0x0002
|
---|
167 |
|
---|
168 | typedef struct _STRRET
|
---|
169 | {
|
---|
170 | UINT32 uType; /* STRRET_xxx */
|
---|
171 | union
|
---|
172 | {
|
---|
173 | LPWSTR pOleStr; /* OLESTR that will be freed */
|
---|
174 | UINT32 uOffset; /* Offset into SHITEMID (ANSI) */
|
---|
175 | char cStr[MAX_PATH]; /* Buffer to fill in */
|
---|
176 | } DUMMYUNIONNAME;
|
---|
177 | } STRRET,*LPSTRRET;
|
---|
178 |
|
---|
179 | /*****************************************************************************
|
---|
180 | * IEnumIDList interface
|
---|
181 | */
|
---|
182 | #define THIS LPENUMIDLIST this
|
---|
183 |
|
---|
184 | typedef struct IEnumIDList IEnumIDList,*LPENUMIDLIST;
|
---|
185 | typedef struct IEnumIDList_VTable {
|
---|
186 | /* *** IUnknown methods *** */
|
---|
187 | STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
---|
188 | STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
---|
189 | STDMETHOD_(ULONG,Release) (THIS) PURE;
|
---|
190 |
|
---|
191 | /* *** IEnumIDList methods *** */
|
---|
192 | STDMETHOD(Next) (THIS_ ULONG celt,
|
---|
193 | LPITEMIDLIST *rgelt,
|
---|
194 | ULONG *pceltFetched) PURE;
|
---|
195 | STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
|
---|
196 | STDMETHOD(Reset) (THIS) PURE;
|
---|
197 | STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
|
---|
198 | } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
|
---|
199 |
|
---|
200 | struct IEnumIDList {
|
---|
201 | LPENUMIDLIST_VTABLE lpvtbl;
|
---|
202 | DWORD ref;
|
---|
203 | };
|
---|
204 | #undef THIS
|
---|
205 | /************************************************************************
|
---|
206 | * The IShellFolder interface ... the basic interface for a lot of stuff
|
---|
207 | */
|
---|
208 |
|
---|
209 | #define THIS LPSHELLFOLDER this
|
---|
210 |
|
---|
211 | /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
|
---|
212 | typedef enum
|
---|
213 | {
|
---|
214 | SHGDN_NORMAL = 0, /* default (display purpose) */
|
---|
215 | SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
|
---|
216 | SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
|
---|
217 | } SHGNO;
|
---|
218 |
|
---|
219 | /* IShellFolder::EnumObjects */
|
---|
220 | typedef enum tagSHCONTF
|
---|
221 | {
|
---|
222 | SHCONTF_FOLDERS = 32, /* for shell browser */
|
---|
223 | SHCONTF_NONFOLDERS = 64, /* for default view */
|
---|
224 | SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
|
---|
225 | } SHCONTF;
|
---|
226 |
|
---|
227 | /* from oleidl.h */
|
---|
228 | #define DROPEFFECT_NONE 0
|
---|
229 | #define DROPEFFECT_COPY 1
|
---|
230 | #define DROPEFFECT_MOVE 2
|
---|
231 | #define DROPEFFECT_LINK 4
|
---|
232 | #define DROPEFFECT_SCROLL 0x80000000
|
---|
233 |
|
---|
234 | /* IShellFolder::GetAttributesOf flags */
|
---|
235 | #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
|
---|
236 | #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
|
---|
237 | #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
|
---|
238 | #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
|
---|
239 | #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
|
---|
240 | #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
|
---|
241 | #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
|
---|
242 | #define SFGAO_CAPABILITYMASK 0x00000177L
|
---|
243 | #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
|
---|
244 | #define SFGAO_SHARE 0x00020000L /* shared */
|
---|
245 | #define SFGAO_READONLY 0x00040000L /* read-only */
|
---|
246 | #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
|
---|
247 | #define SFGAO_DISPLAYATTRMASK 0x000F0000L
|
---|
248 | #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
|
---|
249 | #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
|
---|
250 | #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
|
---|
251 | #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
|
---|
252 | #define SFGAO_CONTENTSMASK 0x80000000L
|
---|
253 | #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
|
---|
254 | #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
|
---|
255 |
|
---|
256 |
|
---|
257 | typedef struct tagSHELLFOLDER *LPSHELLFOLDER,IShellFolder;
|
---|
258 | typedef struct IShellFolder_VTable {
|
---|
259 | /* *** IUnknown methods *** */
|
---|
260 | STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
---|
261 | STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
---|
262 | STDMETHOD_(ULONG,Release) (THIS) PURE;
|
---|
263 |
|
---|
264 | /* *** IShellFolder methods *** */
|
---|
265 | STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,
|
---|
266 | LPBC pbcReserved, LPOLESTR32 lpszDisplayName,
|
---|
267 | ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
|
---|
268 | STDMETHOD(EnumObjects) ( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST
|
---|
269 | * ppenumIDList) PURE;
|
---|
270 | STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,
|
---|
271 | REFIID riid, LPVOID * ppvOut) PURE;
|
---|
272 | STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,
|
---|
273 | REFIID riid, LPVOID * ppvObj) PURE;
|
---|
274 | STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
|
---|
275 | STDMETHOD(CreateViewObject) (THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
|
---|
276 | STDMETHOD(GetAttributesOf) (THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,
|
---|
277 | ULONG * rgfInOut) PURE;
|
---|
278 | STDMETHOD(GetUIObjectOf) (THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST
|
---|
279 | * apidl,
|
---|
280 | REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
|
---|
281 | STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
|
---|
282 | STDMETHOD(SetNameOf) (THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,
|
---|
283 | LPCOLESTR32 lpszName, DWORD uFlags,
|
---|
284 | LPITEMIDLIST * ppidlOut) PURE;
|
---|
285 | } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
|
---|
286 |
|
---|
287 | struct tagSHELLFOLDER {
|
---|
288 | LPSHELLFOLDER_VTABLE lpvtbl;
|
---|
289 | DWORD ref;
|
---|
290 | };
|
---|
291 |
|
---|
292 | #undef THIS
|
---|
293 |
|
---|
294 | /****************************************************************************
|
---|
295 | * IShellLink interface
|
---|
296 | */
|
---|
297 |
|
---|
298 | #define THIS LPSHELLLINK this
|
---|
299 | /* IShellLink::Resolve fFlags */
|
---|
300 | typedef enum {
|
---|
301 | SLR_NO_UI = 0x0001,
|
---|
302 | SLR_ANY_MATCH = 0x0002,
|
---|
303 | SLR_UPDATE = 0x0004
|
---|
304 | } SLR_FLAGS;
|
---|
305 |
|
---|
306 | /* IShellLink::GetPath fFlags */
|
---|
307 | typedef enum {
|
---|
308 | SLGP_SHORTPATH = 0x0001,
|
---|
309 | SLGP_UNCPRIORITY = 0x0002
|
---|
310 | } SLGP_FLAGS;
|
---|
311 |
|
---|
312 |
|
---|
313 |
|
---|
314 | typedef struct IShellLink IShellLink,*LPSHELLLINK;
|
---|
315 | typedef struct IShellLink_VTable
|
---|
316 | {
|
---|
317 | /* *** IUnknown methods *** */
|
---|
318 | STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
---|
319 | STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
---|
320 | STDMETHOD_(ULONG,Release) (THIS) PURE;
|
---|
321 |
|
---|
322 | STDMETHOD(GetPath)(THIS_ LPSTR pszFile, INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
|
---|
323 |
|
---|
324 | STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
|
---|
325 | STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
|
---|
326 |
|
---|
327 | STDMETHOD(GetDescription)(THIS_ LPSTR pszName, int cchMaxName) PURE;
|
---|
328 | STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
|
---|
329 |
|
---|
330 | STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir, int cchMaxPath) PURE;
|
---|
331 | STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
|
---|
332 |
|
---|
333 | STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs, int cchMaxPath) PURE;
|
---|
334 | STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
|
---|
335 |
|
---|
336 | STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
|
---|
337 | STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
|
---|
338 |
|
---|
339 | STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
|
---|
340 | STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
|
---|
341 |
|
---|
342 | STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath, INT32 cchIconPath, INT32 *piIcon) PURE;
|
---|
343 | STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath, INT32 iIcon) PURE;
|
---|
344 |
|
---|
345 | STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
|
---|
346 |
|
---|
347 | STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
|
---|
348 |
|
---|
349 | STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
|
---|
350 | } IShellLink_VTable,*LPSHELLLINK_VTABLE;
|
---|
351 |
|
---|
352 | struct IShellLink {
|
---|
353 | LPSHELLLINK_VTABLE lpvtbl;
|
---|
354 | DWORD ref;
|
---|
355 | };
|
---|
356 |
|
---|
357 | #undef THIS
|
---|
358 |
|
---|
359 | #ifdef __WINE__
|
---|
360 | extern LPSHELLFOLDER IShellFolder_Constructor();
|
---|
361 | extern LPSHELLLINK IShellLink_Constructor();
|
---|
362 | extern LPENUMIDLIST IEnumIDList_Constructor();
|
---|
363 | #endif
|
---|
364 |
|
---|
365 | DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
|
---|
366 |
|
---|
367 | #undef PURE
|
---|
368 | #undef FAR
|
---|
369 | #undef THIS
|
---|
370 | #undef THIS_
|
---|
371 | #undef STDMETHOD
|
---|
372 | #undef STDMETHOD_
|
---|
373 | #endif /*_WINE_SHLOBJ_H*/
|
---|
374 |
|
---|
375 | #endif
|
---|