source: trunk/src/shell32/shell32.h@ 46

Last change on this file since 46 was 46, checked in by sandervl, 26 years ago

* empty log message *

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