From 487b9f5f00cc8ffc030d9f16956a05bfb05d8b50 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 11 Feb 2004 06:21:45 +0000 Subject: [PATCH] Moved some more definitions out of undocshell.h into the exported headers. --- dlls/shell32/iconcache.c | 8 +-- dlls/shell32/shell32_main.h | 2 +- dlls/shell32/shellord.c | 2 +- dlls/shell32/undocshell.h | 137 ------------------------------------ include/shellapi.h | 16 +++++ include/shlobj.h | 74 +++++++++++++++++-- 6 files changed, 92 insertions(+), 147 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index 4c1737e93c..b3e021c112 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -325,7 +325,7 @@ BOOL PidlToSicIndex ( LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, - UINT * pIndex) + int * pIndex) { IExtractIconA *ei; char szIconFile[MAX_PATH]; /* file containing the icon */ @@ -362,11 +362,11 @@ BOOL PidlToSicIndex ( * */ int WINAPI SHMapPIDLToSystemImageListIndex( - LPSHELLFOLDER sh, + IShellFolder *sh, LPCITEMIDLIST pidl, - UINT * pIndex) + int *pIndex) { - UINT Index; + int Index; TRACE("(SF=%p,pidl=%p,%p)\n",sh,pidl,pIndex); pdump(pidl); diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index b97967debc..49390ac375 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -52,7 +52,7 @@ BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList) #define INVALID_INDEX -1 BOOL SIC_Initialize(void); void SIC_Destroy(void); -BOOL PidlToSicIndex (IShellFolder * sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, UINT * pIndex); +BOOL PidlToSicIndex (IShellFolder * sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, int * pIndex); INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex ); /* Classes Root */ diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index 2d00e17119..55b0b3f33e 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -1023,7 +1023,7 @@ void WINAPI SHFreeUnusedLibraries (void) * DAD_AutoScroll [SHELL32.129] * */ -DWORD WINAPI DAD_AutoScroll(HWND hwnd, LPSCROLLSAMPLES samples, LPPOINT pt) +BOOL WINAPI DAD_AutoScroll(HWND hwnd, AUTO_SCROLL_DATA *samples, LPPOINT pt) { FIXME("hwnd = %p %p %p\n",hwnd,samples,pt); return 0; diff --git a/dlls/shell32/undocshell.h b/dlls/shell32/undocshell.h index 1ac6a7a890..2fc0deac3a 100644 --- a/dlls/shell32/undocshell.h +++ b/dlls/shell32/undocshell.h @@ -62,7 +62,6 @@ void WINAPI ILGlobalFree(LPITEMIDLIST pidl); LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath); LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath); -LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW (LPCVOID lpszPath); HRESULT WINAPI SHILCreateFromPathA ( LPCSTR path, @@ -74,21 +73,14 @@ HRESULT WINAPI SHILCreateFromPathW ( LPITEMIDLIST * ppidl, DWORD *attributes); -HRESULT WINAPI SHILCreateFromPathAW ( - LPCVOID path, - LPITEMIDLIST * ppidl, - DWORD *attributes); - LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path); LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path); -LPITEMIDLIST WINAPI ILCreateFromPathAW(LPCVOID path); /* string functions */ BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*); BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*); -BOOL WINAPI StrRetToStrNAW(LPVOID,DWORD,LPSTRRET,const ITEMIDLIST*); /**************************************************************************** @@ -154,24 +146,10 @@ BOOL WINAPI GetFileNameFromBrowse( LPCSTR lpstrFilter, LPCSTR lpstrTitle); -BOOL WINAPI SHFindFiles( - LPCITEMIDLIST pidlRoot, - LPCITEMIDLIST pidlSavedSearch); - BOOL WINAPI SHFindComputer( LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch); -/* SHObjectProperties flags */ -#define OPF_PRINTERNAME 0x01 -#define OPF_PATHNAME 0x02 - -BOOL WINAPI SHObjectProperties( - HWND hwndOwner, - UINT uFlags, - LPCSTR lpstrName, - LPCSTR lpstrParameters); - void WINAPI SHHandleDiskFull(HWND hwndOwner, UINT uDrive); @@ -185,31 +163,10 @@ DWORD WINAPI SHNetConnectionDialog( LPCSTR lpstrRemoteName, DWORD dwType); -int WINAPIV ShellMessageBoxA( - HINSTANCE hInstance, - HWND hWnd, - LPCSTR lpText, - LPCSTR lpCaption, - UINT uType, - ...); - -int WINAPIV ShellMessageBoxW( - HINSTANCE hInstance, - HWND hWnd, - LPCWSTR lpText, - LPCWSTR lpCaption, - UINT uType, - ...); - -#define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox) - /**************************************************************************** * Memory Routines */ -LPVOID WINAPI SHAlloc(ULONG cb); -void WINAPI SHFree(LPVOID pv); - HANDLE WINAPI SHAllocShared( LPVOID pv, ULONG cb, @@ -269,11 +226,6 @@ HICON WINAPI SHGetFileIcon( DWORD dwFileAttributes, UINT uFlags); -int WINAPI SHMapPIDLToSystemImageListIndex( - LPSHELLFOLDER psf, - LPCITEMIDLIST pidl, - UINT * pOpenIndex); - BOOL WINAPI FileIconInit(BOOL bFullInit); /**************************************************************************** @@ -417,58 +369,14 @@ HRESULT WINAPI SHRegisterDragDrop( HRESULT WINAPI SHRevokeDragDrop(HWND hWnd); -HRESULT WINAPI SHDoDragDrop( - HWND hWnd, - LPDATAOBJECT lpDataObject, - LPDROPSOURCE lpDropSource, - DWORD dwOKEffect, - LPDWORD pdwEffect); - BOOL WINAPI DAD_DragEnter(HWND hWnd); -BOOL WINAPI DAD_DragEnterEx( - HWND hWnd, - POINT pt); - -BOOL WINAPI DAD_DragMove(POINT pt); - -/* DAD_AutoScroll return values */ -#define DAD_SCROLL_UP 1 -#define DAD_SCROLL_DOWN 2 -#define DAD_SCROLL_LEFT 4 -#define DAD_SCROLL_RIGHT 8 - -/* DAD_AutoScroll sample structure */ -typedef struct -{ - DWORD dwCount; - DWORD dwLastTime; - BOOL bWrapped; - POINT aptPositions[3]; - DWORD adwTimes[3]; -} SCROLLSAMPLES, *LPSCROLLSAMPLES; - -DWORD WINAPI DAD_AutoScroll(HWND hWnd, - LPSCROLLSAMPLES lpSamples, - LPPOINT lppt); - -BOOL WINAPI DAD_DragLeave(); - BOOL WINAPI DAD_SetDragImageFromListView( HWND hWnd, POINT pt); -BOOL WINAPI DAD_SetDragImage( - HIMAGELIST himlTrack, - LPPOINT lppt); - BOOL WINAPI DAD_ShowDragImage(BOOL bShow); -HRESULT WINAPI SHCreateStdEnumFmtEtc( - DWORD cFormats, - const FORMATETC *lpFormats, - LPENUMFORMATETC *ppenumFormatetc); - HRESULT WINAPI CIDLData_CreateFromIDArray( LPCITEMIDLIST pidlFolder, DWORD cpidlFiles, @@ -802,57 +710,12 @@ HRESULT WINAPI SHCreateLinks( UINT uFlags, LPITEMIDLIST *lppidlLinks); -/* SHGetNewLinkInfo flags */ -#define SHGNLI_PIDL 0x01 -#define SHGNLI_PREFIXNAME 0x02 -#define SHGNLI_NOUNIQUE 0x04 - -BOOL WINAPI SHGetNewLinkInfoA( - LPCSTR pszLinkTo, - LPCSTR pszDir, - LPSTR pszName, - BOOL *pfMustCopy, - UINT uFlags); - -BOOL WINAPI SHGetNewLinkInfoW( - LPCWSTR pszLinkTo, - LPCWSTR pszDir, - LPWSTR pszName, - BOOL *pfMustCopy, - UINT uFlags); -#define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo) - DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len); DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len); /* policy functions */ BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey); -/* cabinet functions */ - -#include "pshpack1.h" - -typedef struct { - WORD cLength; - WORD nVersion; - BOOL fFullPathTitle:1; - BOOL fSaveLocalView:1; - BOOL fNotShell:1; - BOOL fSimpleDefault:1; - BOOL fDontShowDescBar:1; - BOOL fNewWindowMode:1; - BOOL fShowCompColor:1; - BOOL fDontPrettyNames:1; - BOOL fAdminsCreateCommonGroups:1; - UINT fUnusedFlags:7; - UINT fMenuEnumFilter; -} CABINETSTATE; - -#include "poppack.h" - -BOOL WINAPI ReadCabinetState(CABINETSTATE *, int); -BOOL WINAPI WriteCabinetState(CABINETSTATE *); - #ifdef __cplusplus } /* extern "C" */ #endif /* defined(__cplusplus) */ diff --git a/include/shellapi.h b/include/shellapi.h index ae229e9592..55d883365b 100644 --- a/include/shellapi.h +++ b/include/shellapi.h @@ -341,6 +341,19 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData); #define Shell_NotifyIcon WINELIB_NAME_AW(Shell_NotifyIcon) +/****************************************** + * Links + */ + +#define SHGNLI_PIDL 0x01 +#define SHGNLI_PREFIXNAME 0x02 +#define SHGNLI_NOUNIQUE 0x04 +#define SHGNLI_NOLNK 0x08 + +BOOL WINAPI SHGetNewLinkInfoA(LPCSTR,LPCSTR,LPSTR,BOOL*,UINT); +BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR,LPCWSTR,LPWSTR,BOOL*,UINT); +#define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo) + /****************************************** * Misc */ @@ -365,6 +378,9 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR); BOOL WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON); BOOL WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON); #define ShellAbout WINELIB_NAME_AW(ShellAbout) +int WINAPIV ShellMessageBoxA(HINSTANCE,HWND,LPCSTR,LPCSTR,UINT,...); +int WINAPIV ShellMessageBoxW(HINSTANCE,HWND,LPCWSTR,LPCWSTR,UINT,...); +#define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox) #ifdef __cplusplus } /* extern "C" */ diff --git a/include/shlobj.h b/include/shlobj.h index de5e3e5e3a..de4fb725e5 100644 --- a/include/shlobj.h +++ b/include/shlobj.h @@ -33,11 +33,26 @@ extern "C" { #include #include -HRESULT WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,LPUNKNOWN,REFIID,LPVOID*); +LPVOID WINAPI SHAlloc(ULONG); +HRESULT WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,IUnknown*,REFIID,LPVOID*); +HRESULT WINAPI SHCreateStdEnumFmtEtc(DWORD,const FORMATETC *,IEnumFORMATETC**); +BOOL WINAPI SHFindFiles(LPCITEMIDLIST,LPCITEMIDLIST); +void WINAPI SHFree(LPVOID); +BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl,LPSTR pszPath); +BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl,LPWSTR pszPath); +#define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList) +HRESULT WINAPI SHILCreateFromPath(LPCWSTR,LPITEMIDLIST*,DWORD*); +LPITEMIDLIST WINAPI SHSimpleIDListFromPath(LPCWSTR); +int WINAPI SHMapPIDLToSystemImageListIndex(IShellFolder*,LPCITEMIDLIST,int*); + + +/* SHObjectProperties flags */ +#define SHOP_PRINTERNAME 0x01 +#define SHOP_FILEPATH 0x02 +#define SHOP_VOLUMEGUID 0x04 + +BOOL WINAPI SHObjectProperties(HWND,UINT,LPCWSTR,LPCWSTR); -BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath); -BOOL WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath); -#define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList) /***************************************************************************** * Predeclare interfaces @@ -853,6 +868,31 @@ typedef struct _FILEGROUPDESCRIPTORW { DECL_WINELIB_TYPE_AW(FILEGROUPDESCRIPTOR) DECL_WINELIB_TYPE_AW(LPFILEGROUPDESCRIPTOR) +/**************************************************************************** + * Cabinet functions + */ + +typedef struct { + WORD cLength; + WORD nVersion; + BOOL fFullPathTitle:1; + BOOL fSaveLocalView:1; + BOOL fNotShell:1; + BOOL fSimpleDefault:1; + BOOL fDontShowDescBar:1; + BOOL fNewWindowMode:1; + BOOL fShowCompColor:1; + BOOL fDontPrettyNames:1; + BOOL fAdminsCreateCommonGroups:1; + UINT fUnusedFlags:7; + UINT fMenuEnumFilter; +} CABINETSTATE, *LPCABINETSTATE; + +#define CABINETSTATE_VERSION 2 + +BOOL WINAPI ReadCabinetState(CABINETSTATE *, int); +BOOL WINAPI WriteCabinetState(CABINETSTATE *); + /**************************************************************************** * Path Manipulation Routines */ @@ -860,6 +900,29 @@ VOID WINAPI PathGetShortPath(LPWSTR pszPath); #include +/**************************************************************************** + * Drag And Drop Routines + */ + +/* DAD_AutoScroll sample structure */ +#define NUM_POINTS 3 +typedef struct +{ + int iNextSample; + DWORD dwLastScroll; + BOOL bFull; + POINT pts[NUM_POINTS]; + DWORD dwTimes[NUM_POINTS]; +} AUTO_SCROLL_DATA; + +BOOL WINAPI DAD_SetDragImage(HIMAGELIST,LPPOINT); +BOOL WINAPI DAD_DragEnterEx(HWND,POINT); +BOOL WINAPI DAD_DragEnterEx2(HWND,POINT,IDataObject*); +BOOL WINAPI DAD_DragMove(POINT); +BOOL WINAPI DAD_DragLeave(void); +BOOL WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,LPPOINT); +HRESULT WINAPI SHDoDragDrop(HWND,IDataObject*,IDropSource*,DWORD,LPDWORD); + /***************************************************************************** * IFileSystemBindData interface */ @@ -940,6 +1003,9 @@ struct IFileSystemBindDataVtbl { LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST,LPCSHITEMID,BOOL); LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST); LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST); +LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR); +LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR); +#define ILCreateFromPath WINELIB_NAME_AW(ILCreateFromPath) LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST,LPCITEMIDLIST); LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST,LPCITEMIDLIST); LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST); -- 2.32.0.93.g670b81a890