Release 980104
[wine/multimedia.git] / include / shlobj.h
blob35b23cc9c94bb06ee4c2e68e8fc5de11bfee10b9
1 #ifndef _WINE_SHLOBJ_H
2 #define _WINE_SHLOBJ_H
4 #include "shell.h"
5 #include "ole.h"
6 #include "ole2.h"
7 #include "compobj.h"
9 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
10 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
11 #define PURE
12 #define FAR
13 #define THIS_ THIS,
16 typedef LPVOID LPBC; /* *IBindCtx really */
19 * shell32 classids
21 DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
22 DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
25 * shell32 Interface ids
27 DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
28 DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
29 DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
30 DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
31 DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
32 DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
33 DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
34 DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
35 DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
36 DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
38 #define STRRET_WSTR 0x0000
39 #define STRRET_OFFSET 0x0001
40 #define STRRET_CSTR 0x0002
42 typedef struct _STRRET
44 UINT32 uType; /* STRRET_xxx */
45 union
47 LPWSTR pOleStr; /* OLESTR that will be freed */
48 UINT32 uOffset; /* Offset into SHITEMID (ANSI) */
49 char cStr[MAX_PATH]; /* Buffer to fill in */
50 } DUMMYUNIONNAME;
51 } STRRET,*LPSTRRET;
53 typedef struct {
54 WORD cb; /* nr of bytes in this item */
55 BYTE abID[1];/* first byte in this item */
56 } SHITEMID,*LPSHITEMID;
58 typedef struct {
59 SHITEMID mkid; /* first itemid in list */
60 } ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST;
62 /*****************************************************************************
63 * IEnumIDList interface
65 #define THIS LPENUMIDLIST this
67 typedef struct IEnumIDList IEnumIDList,*LPENUMIDLIST;
68 typedef struct IEnumIDList_VTable {
69 /* *** IUnknown methods *** */
70 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
71 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
72 STDMETHOD_(ULONG,Release) (THIS) PURE;
74 /* *** IEnumIDList methods *** */
75 STDMETHOD(Next) (THIS_ ULONG celt,
76 LPITEMIDLIST *rgelt,
77 ULONG *pceltFetched) PURE;
78 STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
79 STDMETHOD(Reset) (THIS) PURE;
80 STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
81 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
83 struct IEnumIDList {
84 LPENUMIDLIST_VTABLE lpvtbl;
85 DWORD ref;
87 #undef THIS
88 /************************************************************************
89 * The IShellFolder interface ... the basic interface for a lot of stuff
92 #define THIS LPSHELLFOLDER this
94 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
95 typedef enum
97 SHGDN_NORMAL = 0, /* default (display purpose) */
98 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
99 SHGDN_FORPARSING = 0x8000, /* for ParseDisplayName or path */
100 } SHGNO;
102 /* IShellFolder::EnumObjects */
103 typedef enum tagSHCONTF
105 SHCONTF_FOLDERS = 32, /* for shell browser */
106 SHCONTF_NONFOLDERS = 64, /* for default view */
107 SHCONTF_INCLUDEHIDDEN = 128, /* for hidden/system objects */
108 } SHCONTF;
110 /* from oleidl.h */
111 #define DROPEFFECT_NONE 0
112 #define DROPEFFECT_COPY 1
113 #define DROPEFFECT_MOVE 2
114 #define DROPEFFECT_LINK 4
115 #define DROPEFFECT_SCROLL 0x80000000
117 /* IShellFolder::GetAttributesOf flags */
118 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
119 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
120 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
121 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
122 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
123 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
124 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
125 #define SFGAO_CAPABILITYMASK 0x00000177L
126 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
127 #define SFGAO_SHARE 0x00020000L /* shared */
128 #define SFGAO_READONLY 0x00040000L /* read-only */
129 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
130 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
131 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
132 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
133 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
134 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
135 #define SFGAO_CONTENTSMASK 0x80000000L
136 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
137 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
140 typedef struct tagSHELLFOLDER *LPSHELLFOLDER,IShellFolder;
141 typedef struct IShellFolder_VTable {
142 /* *** IUnknown methods *** */
143 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
144 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
145 STDMETHOD_(ULONG,Release) (THIS) PURE;
147 /* *** IShellFolder methods *** */
148 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,
149 LPBC pbcReserved, LPOLESTR lpszDisplayName,
150 ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
151 STDMETHOD(EnumObjects) ( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST
152 * ppenumIDList) PURE;
153 STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,
154 REFIID riid, LPVOID * ppvOut) PURE;
155 STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,
156 REFIID riid, LPVOID * ppvObj) PURE;
157 STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
158 STDMETHOD(CreateViewObject) (THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
159 STDMETHOD(GetAttributesOf) (THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,
160 ULONG * rgfInOut) PURE;
161 STDMETHOD(GetUIObjectOf) (THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST
162 * apidl,
163 REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
164 STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
165 STDMETHOD(SetNameOf) (THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,
166 LPCOLESTR lpszName, DWORD uFlags,
167 LPITEMIDLIST * ppidlOut) PURE;
168 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
170 struct tagSHELLFOLDER {
171 LPSHELLFOLDER_VTABLE lpvtbl;
172 DWORD ref;
175 #undef THIS
177 /****************************************************************************
178 * IShellLink interface
181 #define THIS LPSHELLLINK this
182 /* IShellLink::Resolve fFlags */
183 typedef enum {
184 SLR_NO_UI = 0x0001,
185 SLR_ANY_MATCH = 0x0002,
186 SLR_UPDATE = 0x0004,
187 } SLR_FLAGS;
189 /* IShellLink::GetPath fFlags */
190 typedef enum {
191 SLGP_SHORTPATH = 0x0001,
192 SLGP_UNCPRIORITY = 0x0002,
193 } SLGP_FLAGS;
197 typedef struct IShellLink IShellLink,*LPSHELLLINK;
198 typedef struct IShellLink_VTable
200 /* *** IUnknown methods *** */
201 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
202 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
203 STDMETHOD_(ULONG,Release) (THIS) PURE;
205 STDMETHOD(GetPath)(THIS_ LPSTR pszFile, INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
207 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
208 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
210 STDMETHOD(GetDescription)(THIS_ LPSTR pszName, int cchMaxName) PURE;
211 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
213 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir, int cchMaxPath) PURE;
214 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
216 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs, int cchMaxPath) PURE;
217 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
219 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
220 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
222 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
223 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
225 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath, INT32 cchIconPath, INT32 *piIcon) PURE;
226 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath, INT32 iIcon) PURE;
228 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
230 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
232 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
233 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
235 struct IShellLink {
236 LPSHELLLINK_VTABLE lpvtbl;
237 DWORD ref;
240 #undef THIS
242 #ifdef __WINE__
243 extern LPSHELLFOLDER IShellFolder_Constructor();
244 extern LPSHELLLINK IShellLink_Constructor();
245 extern LPENUMIDLIST IEnumIDList_Constructor();
246 #endif
248 DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
250 #undef PURE
251 #undef FAR
252 #undef THIS
253 #undef THIS_
254 #undef STDMETHOD
255 #undef STDMETHOD_
256 #endif /*_WINE_SHLOBJ_H*/