~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/shell32/shell32_main.h

Version: ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  *      internal Shell32 Library definitions
  3  *
  4  * Copyright 1998 Marcus Meissner
  5  * Copyright 1998 Juergen Schmied (jsch)  *  <juergen.schmied@metronet.de>
  6  *
  7  * This library is free software; you can redistribute it and/or
  8  * modify it under the terms of the GNU Lesser General Public
  9  * License as published by the Free Software Foundation; either
 10  * version 2.1 of the License, or (at your option) any later version.
 11  *
 12  * This library is distributed in the hope that it will be useful,
 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15  * Lesser General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU Lesser General Public
 18  * License along with this library; if not, write to the Free Software
 19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 20  */
 21 
 22 #ifndef __WINE_SHELL_MAIN_H
 23 #define __WINE_SHELL_MAIN_H
 24 
 25 #include <stdarg.h>
 26 
 27 #include "windef.h"
 28 #include "winbase.h"
 29 #include "wingdi.h"
 30 #include "winuser.h"
 31 #include "winnls.h"
 32 #include "commctrl.h"
 33 #include "objbase.h"
 34 #include "docobj.h"
 35 #include "undocshell.h"
 36 #include "shlobj.h"
 37 #include "shellapi.h"
 38 #include "wine/windef16.h"
 39 #include "wine/unicode.h"
 40 
 41 /*******************************************
 42 *  global SHELL32.DLL variables
 43 */
 44 extern HMODULE  huser32;
 45 extern HINSTANCE shell32_hInstance;
 46 extern HIMAGELIST       ShellSmallIconList;
 47 extern HIMAGELIST       ShellBigIconList;
 48 
 49 BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList);
 50 
 51 /* Iconcache */
 52 #define INVALID_INDEX -1
 53 BOOL SIC_Initialize(void);
 54 void SIC_Destroy(void);
 55 BOOL PidlToSicIndex (IShellFolder * sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, int * pIndex);
 56 INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags );
 57 
 58 /* Classes Root */
 59 BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot);
 60 BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len );
 61 BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len );
 62 BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, int* picon_idx);
 63 BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len);
 64 
 65 /* ANSI versions of above functions, supposed to go away as soon as they are not used anymore */
 66 BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot);
 67 BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, int* picon_idx);
 68 BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len);
 69 
 70 BOOL HCR_GetFolderAttributes(LPCITEMIDLIST pidlFolder, LPDWORD dwAttributes);
 71 
 72 INT_PTR CALLBACK AboutDlgProc(HWND,UINT,WPARAM,LPARAM);
 73 DWORD WINAPI ParseFieldA(LPCSTR src, DWORD nField, LPSTR dst, DWORD len);
 74 DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len);
 75 
 76 /****************************************************************************
 77  * Class constructors
 78  */
 79 LPDATAOBJECT    IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST myPidl, LPCITEMIDLIST * apidl, UINT cidl);
 80 LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
 81 
 82 LPCLASSFACTORY  IClassFactory_Constructor(REFCLSID);
 83 IContextMenu2 * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, const LPCITEMIDLIST *aPidls, UINT uItemCount);
 84 IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent, BOOL bDesktop);
 85 LPSHELLVIEW     IShellView_Constructor(LPSHELLFOLDER);
 86 
 87 HRESULT WINAPI IFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 88 HRESULT WINAPI IShellItem_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 89 HRESULT WINAPI IShellLink_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 90 HRESULT WINAPI IShellLink_ConstructFromFile(IUnknown * pUnkOuter, REFIID riid, LPCITEMIDLIST pidl, LPVOID * ppv);
 91 HRESULT WINAPI ISF_Desktop_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 92 HRESULT WINAPI ISF_MyComputer_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 93 HRESULT WINAPI ISF_NetworkPlaces_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 94 HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 95 HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV);
 96 HRESULT WINAPI IControlPanel_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 97 HRESULT WINAPI UnixFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 98 HRESULT WINAPI UnixDosFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
 99 HRESULT WINAPI FolderShortcut_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
100 HRESULT WINAPI MyDocuments_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
101 HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID *ppv);
102 extern HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST, LPWSTR, UINT, int*);
103 HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
104 HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
105 
106 HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
107 
108 LPEXTRACTICONA  IExtractIconA_Constructor(LPCITEMIDLIST);
109 LPEXTRACTICONW  IExtractIconW_Constructor(LPCITEMIDLIST);
110 
111 /* menu merging */
112 #define MM_ADDSEPARATOR         0x00000001L
113 #define MM_SUBMENUSHAVEIDS      0x00000002L
114 HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags);
115 
116 /* initialisation for FORMATETC */
117 #define InitFormatEtc(fe, cf, med) \
118         {\
119         (fe).cfFormat=cf;\
120         (fe).dwAspect=DVASPECT_CONTENT;\
121         (fe).ptd=NULL;\
122         (fe).tymed=med;\
123         (fe).lindex=-1;\
124         };
125 
126 #define KeyStateToDropEffect(kst)\
127     ((((kst)&(MK_CONTROL|MK_SHIFT))==(MK_CONTROL|MK_SHIFT)) ? DROPEFFECT_LINK :\
128     (((kst)&(MK_CONTROL|MK_SHIFT)) ? DROPEFFECT_COPY :\
129     DROPEFFECT_MOVE))
130 
131 
132 HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
133 HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
134 HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
135 HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
136 
137 /* Change Notification */
138 void InitChangeNotifications(void);
139 void FreeChangeNotifications(void);
140 
141 /* file operation */
142 #define ASK_DELETE_FILE           1
143 #define ASK_DELETE_FOLDER         2
144 #define ASK_DELETE_MULTIPLE_ITEM  3
145 #define ASK_CREATE_FOLDER         4
146 #define ASK_OVERWRITE_FILE        5
147 #define ASK_DELETE_SELECTED       6
148 #define ASK_TRASH_FILE            7
149 #define ASK_TRASH_FOLDER          8
150 #define ASK_TRASH_MULTIPLE_ITEM   9
151 #define ASK_CANT_TRASH_ITEM      10
152 #define ASK_OVERWRITE_FOLDER     11
153 
154 BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir);
155 
156 /* 16-bit functions */
157 void        WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b);
158 UINT16      WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength);
159 void        WINAPI DragFinish16(HDROP16 h);
160 BOOL16      WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p);
161 HINSTANCE16 WINAPI ShellExecute16(HWND16,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT16);
162 HICON16     WINAPI ExtractIcon16(HINSTANCE16,LPCSTR,UINT16);
163 HICON16     WINAPI ExtractAssociatedIcon16(HINSTANCE16,LPSTR,LPWORD);
164 HICON16     WINAPI ExtractIconEx16 ( LPCSTR, INT16, HICON16 *, HICON16 *, UINT16 );
165 HINSTANCE16 WINAPI FindExecutable16(LPCSTR,LPCSTR,LPSTR);
166 HGLOBAL16   WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD);
167 BOOL16      WINAPI ShellAbout16(HWND16,LPCSTR,LPCSTR,HICON16);
168 BOOL16      WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM);
169 
170 static inline BOOL SHELL_OsIsUnicode(void)
171 {
172     /* if high-bit of version is 0, we are emulating NT */
173     return !(GetVersion() & 0x80000000);
174 }
175 
176 #define __SHFreeAndNil(ptr) \
177         {\
178           SHFree(*ptr); \
179           *ptr = NULL; \
180         };
181 static inline void __SHCloneStrA(char ** target,const char * source)
182 {
183         *target = SHAlloc(strlen(source)+1);
184         strcpy(*target, source);
185 }
186 
187 static inline void __SHCloneStrWtoA(char ** target, const WCHAR * source)
188 {
189         int len = WideCharToMultiByte(CP_ACP, 0, source, -1, NULL, 0, NULL, NULL);
190         *target = SHAlloc(len);
191         WideCharToMultiByte(CP_ACP, 0, source, -1, *target, len, NULL, NULL);
192 }
193 
194 static inline void __SHCloneStrW(WCHAR ** target, const WCHAR * source)
195 {
196         *target = SHAlloc( (lstrlenW(source)+1) * sizeof(WCHAR) );
197         lstrcpyW(*target, source);
198 }
199 
200 static inline WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source)
201 {
202         int len = MultiByteToWideChar(CP_ACP, 0, source, -1, NULL, 0);
203         *target = SHAlloc(len*sizeof(WCHAR));
204         MultiByteToWideChar(CP_ACP, 0, source, -1, *target, len);
205         return *target;
206 }
207 
208 /* handle conversions */
209 #define HICON_16(h32)           (LOWORD(h32))
210 #define HICON_32(h16)           ((HICON)(ULONG_PTR)(h16))
211 #define HINSTANCE_32(h16)       ((HINSTANCE)(ULONG_PTR)(h16))
212 #define HINSTANCE_16(h32)       (LOWORD(h32))
213 
214 typedef UINT_PTR (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
215                             const SHELLEXECUTEINFOW *sei, LPSHELLEXECUTEINFOW sei_out);
216 
217 BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc);
218 
219 extern WCHAR swShell32Name[MAX_PATH];
220 
221 BOOL UNIXFS_is_rooted_at_desktop(void);
222 extern const GUID CLSID_UnixFolder;
223 extern const GUID CLSID_UnixDosFolder;
224 
225 /* Default shell folder value registration */
226 HRESULT SHELL_RegisterShellFolders(void);
227 
228 /* Detect Shell Links */
229 BOOL SHELL_IsShortcut(LPCITEMIDLIST);
230 
231 #endif
232 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.