Moved undocshell.h to dlls/shell32. Removed shell16.h.
[wine/multimedia.git] / dlls / shell32 / shell32_main.h
blob10991c306d60727444838b2cac31b84978f2f0b6
1 /*
2 * internal Shell32 Library definitions
3 */
5 #ifndef __WINE_SHELL_MAIN_H
6 #define __WINE_SHELL_MAIN_H
8 #include "commctrl.h"
9 #include "docobj.h"
11 #include "wine/obj_shellfolder.h"
12 #include "wine/obj_dataobject.h"
13 #include "wine/obj_contextmenu.h"
14 #include "wine/obj_shellview.h"
15 #include "wine/obj_shelllink.h"
16 #include "wine/obj_extracticon.h"
17 #include "wine/windef16.h"
19 /*******************************************
20 * global SHELL32.DLL variables
22 extern HMODULE huser32;
23 extern HINSTANCE shell32_hInstance;
24 extern LONG shell32_ObjCount;
25 extern HIMAGELIST ShellSmallIconList;
26 extern HIMAGELIST ShellBigIconList;
27 extern HDPA sic_hdpa;
29 /*******************************************
30 * pointer to functions dynamically loaded
32 extern void WINAPI (*pDLLInitComctl)(LPVOID);
34 extern LPVOID WINAPI (*pCOMCTL32_Alloc) (INT);
35 extern BOOL WINAPI (*pCOMCTL32_Free) (LPVOID);
37 extern HDPA WINAPI (*pDPA_Create) (INT);
38 extern INT WINAPI (*pDPA_InsertPtr) (const HDPA, INT, LPVOID);
39 extern BOOL WINAPI (*pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);
40 extern LPVOID WINAPI (*pDPA_GetPtr) (const HDPA, INT);
41 extern BOOL WINAPI (*pDPA_Destroy) (const HDPA);
42 extern INT WINAPI (*pDPA_Search) (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
43 extern LPVOID WINAPI (*pDPA_DeletePtr) (const HDPA hdpa, INT i);
44 #define pDPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
46 /* ole2 */
48 extern HRESULT WINAPI (*pOleInitialize)(LPVOID reserved);
49 extern void WINAPI (*pOleUninitialize)(void);
50 extern HRESULT WINAPI (*pDoDragDrop)(IDataObject* pDataObject, IDropSource * pDropSource, DWORD dwOKEffect, DWORD * pdwEffect);
51 extern HRESULT WINAPI (*pRegisterDragDrop)(HWND hwnd, IDropTarget* pDropTarget);
52 extern HRESULT WINAPI (*pRevokeDragDrop)(HWND hwnd);
54 BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList);
56 /* Iconcache */
57 #define INVALID_INDEX -1
58 BOOL SIC_Initialize(void);
59 void SIC_Destroy(void);
60 BOOL PidlToSicIndex (IShellFolder * sh, LPITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, UINT * pIndex);
62 /* Classes Root */
63 BOOL HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot);
64 BOOL HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len );
65 BOOL HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr);
66 BOOL HCR_GetClassName (REFIID riid, LPSTR szDest, DWORD len);
67 BOOL HCR_GetFolderAttributes (REFIID riid, LPDWORD szDest);
69 BOOL WINAPI AboutDlgProc(HWND,UINT,WPARAM,LPARAM);
70 DWORD WINAPI ParseFieldA(LPCSTR src,DWORD field,LPSTR dst,DWORD len);
72 /****************************************************************************
73 * Class constructors
75 LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPITEMIDLIST myPidl, LPITEMIDLIST * apidl, UINT cidl);
76 LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
78 LPCLASSFACTORY IClassFactory_Constructor(REFCLSID);
79 IContextMenu * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *aPidls, UINT uItemCount);
80 IContextMenu * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent);
81 LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER);
82 LPSHELLLINK IShellLink_Constructor(BOOL);
84 IShellFolder * ISF_Desktop_Constructor(void);
86 /* kind of enumidlist */
87 #define EIDL_DESK 0
88 #define EIDL_MYCOMP 1
89 #define EIDL_FILE 2
91 LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,DWORD);
93 LPEXTRACTICONA IExtractIconA_Constructor(LPITEMIDLIST);
94 HRESULT CreateStreamOnFile (LPCSTR pszFilename, IStream ** ppstm);
96 /* fixme: rename the functions when the shell32.dll has it's own exports namespace */
97 HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv);
98 HRESULT WINAPI SHELL32_DllCanUnloadNow(void);
100 /* fixme: move away */
101 #define ResultFromShort(i) MAKE_SCODE(SEVERITY_SUCCESS, 0, (USHORT)(i))
103 /* menu merging */
104 #define MM_ADDSEPARATOR 0x00000001L
105 #define MM_SUBMENUSHAVEIDS 0x00000002L
106 HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags);
108 /* initialisation for FORMATETC */
109 #define InitFormatEtc(fe, cf, med) \
111 (fe).cfFormat=cf;\
112 (fe).dwAspect=DVASPECT_CONTENT;\
113 (fe).ptd=NULL;\
114 (fe).tymed=med;\
115 (fe).lindex=-1;\
118 #define KeyStateToDropEffect(kst)\
119 (((kst) & MK_CONTROL) ?\
120 (((kst) & MK_SHIFT) ? DROPEFFECT_LINK : DROPEFFECT_COPY):\
121 DROPEFFECT_MOVE)
123 /* Systray */
124 BOOL SYSTRAY_Init(void);
126 /* Clipboard */
127 void InitShellOle(void);
128 void FreeShellOle(void);
129 BOOL GetShellOle(void);
131 HRESULT WINAPI (*pOleInitialize)(LPVOID reserved);
132 void WINAPI (*pOleUninitialize)(void);
133 HRESULT WINAPI (*pRegisterDragDrop)(HWND hwnd, IDropTarget* pDropTarget);
134 HRESULT WINAPI (*pRevokeDragDrop)(HWND hwnd);
135 HRESULT WINAPI (*pDoDragDrop)(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
136 void WINAPI (*pReleaseStgMedium)(STGMEDIUM* pmedium);
137 HRESULT WINAPI (*pOleSetClipboard)(IDataObject* pDataObj);
138 HRESULT WINAPI (*pOleGetClipboard)(IDataObject** ppDataObj);
140 HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
141 HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
142 HGLOBAL RenderSHELLIDLISTOFFSET (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
143 HGLOBAL RenderFILECONTENTS (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
144 HGLOBAL RenderFILEDESCRIPTOR (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
145 HGLOBAL RenderFILENAME (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
146 HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags);
148 /* Change Notification */
149 void InitChangeNotifications(void);
150 void FreeChangeNotifications(void);
152 /* file operation */
153 #define ASK_DELETE_FILE 1
154 #define ASK_DELETE_FOLDER 2
155 #define ASK_DELETE_MULTIPLE_ITEM 3
157 BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI);
158 BOOL SHELL_DeleteFileA(LPCSTR pszFile, BOOL bShowUI);
159 BOOL SHELL_WarnItemDelete(int nKindOfDialog, LPCSTR szDir);
161 extern HINSTANCE SHELL_FindExecutable(LPCSTR,LPCSTR ,LPSTR);
163 /* 16-bit functions */
164 void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b);
165 UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength);
166 void WINAPI DragFinish16(HDROP16 h);
167 BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p);
168 HINSTANCE16 WINAPI ShellExecute16(HWND16,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT16);
169 HICON16 WINAPI ExtractIcon16(HINSTANCE16,LPCSTR,UINT16);
170 HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16,LPSTR,LPWORD);
171 HICON16 WINAPI ExtractIconEx16 ( LPCSTR, INT16, HICON16 *, HICON16 *, UINT16 );
172 HINSTANCE16 WINAPI FindExecutable16(LPCSTR,LPCSTR,LPSTR);
173 HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD);
174 BOOL16 WINAPI ShellAbout16(HWND16,LPCSTR,LPCSTR,HICON16);
175 BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM);
177 inline static BOOL SHELL_OsIsUnicode(void)
179 /* if high-bit of version is 0, we are emulating NT */
180 return !(GetVersion() & 0x80000000);
183 #endif