comdlg32: Constify some variables.
This commit is contained in:
parent
fc5f6d4bdc
commit
918c9d9ac1
|
@ -3580,7 +3580,7 @@ static BOOL CALLBACK FD32_Init(LPARAM lParam, PFD31_DATA lfs, DWORD data)
|
|||
*
|
||||
* called from the common 16/32 code to call the appropriate hook
|
||||
*/
|
||||
static BOOL CALLBACK FD32_CallWindowProc(PFD31_DATA lfs, UINT wMsg, WPARAM wParam,
|
||||
static BOOL CALLBACK FD32_CallWindowProc(const FD31_DATA *lfs, UINT wMsg, WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
BOOL ret;
|
||||
|
@ -3608,7 +3608,7 @@ static BOOL CALLBACK FD32_CallWindowProc(PFD31_DATA lfs, UINT wMsg, WPARAM wPara
|
|||
* FD32_UpdateResult [internal]
|
||||
* update the real client structures if any
|
||||
*/
|
||||
static void CALLBACK FD32_UpdateResult(PFD31_DATA lfs)
|
||||
static void CALLBACK FD32_UpdateResult(const FD31_DATA *lfs)
|
||||
{
|
||||
PFD32_PRIVATE priv = (PFD32_PRIVATE) lfs->private1632;
|
||||
LPOPENFILENAMEW ofnW = lfs->ofnW;
|
||||
|
@ -3628,7 +3628,7 @@ static void CALLBACK FD32_UpdateResult(PFD31_DATA lfs)
|
|||
* FD32_UpdateFileTitle [internal]
|
||||
* update the real client structures if any
|
||||
*/
|
||||
static void CALLBACK FD32_UpdateFileTitle(PFD31_DATA lfs)
|
||||
static void CALLBACK FD32_UpdateFileTitle(const FD31_DATA *lfs)
|
||||
{
|
||||
PFD32_PRIVATE priv = (PFD32_PRIVATE) lfs->private1632;
|
||||
LPOPENFILENAMEW ofnW = lfs->ofnW;
|
||||
|
@ -3646,7 +3646,7 @@ static void CALLBACK FD32_UpdateFileTitle(PFD31_DATA lfs)
|
|||
* FD32_SendLbGetCurSel [internal]
|
||||
* retrieve selected listbox item
|
||||
*/
|
||||
static LRESULT CALLBACK FD32_SendLbGetCurSel(PFD31_DATA lfs)
|
||||
static LRESULT CALLBACK FD32_SendLbGetCurSel(const FD31_DATA *lfs)
|
||||
{
|
||||
return SendDlgItemMessageW(lfs->hwnd, lst1, LB_GETCURSEL, 0, 0);
|
||||
}
|
||||
|
@ -3656,7 +3656,7 @@ static LRESULT CALLBACK FD32_SendLbGetCurSel(PFD31_DATA lfs)
|
|||
* FD32_Destroy [internal]
|
||||
* called from the common 16/32 code to cleanup 32 bit data
|
||||
*/
|
||||
static void CALLBACK FD32_Destroy(PFD31_DATA lfs)
|
||||
static void CALLBACK FD32_Destroy(const FD31_DATA *lfs)
|
||||
{
|
||||
PFD32_PRIVATE priv = (PFD32_PRIVATE) lfs->private1632;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef struct tagFD16_PRIVATE
|
|||
* FD16_MapOfnStruct16 [internal]
|
||||
* map a 16 bits structure to an Unicode one
|
||||
*/
|
||||
static void FD16_MapOfnStruct16(LPOPENFILENAME16 ofn16, LPOPENFILENAMEW ofnW, BOOL open)
|
||||
static void FD16_MapOfnStruct16(const OPENFILENAME16 *ofn16, LPOPENFILENAMEW ofnW, BOOL open)
|
||||
{
|
||||
OPENFILENAMEA ofnA;
|
||||
/* first convert to linear pointers */
|
||||
|
@ -85,7 +85,7 @@ static void FD16_MapOfnStruct16(LPOPENFILENAME16 ofn16, LPOPENFILENAMEW ofnW, BO
|
|||
* by a 16 bits application
|
||||
*
|
||||
*/
|
||||
static BOOL FD16_GetTemplate(PFD31_DATA lfs)
|
||||
static BOOL FD16_GetTemplate(const FD31_DATA *lfs)
|
||||
{
|
||||
PFD16_PRIVATE priv = (PFD16_PRIVATE) lfs->private1632;
|
||||
LPOPENFILENAME16 ofn16 = priv->ofn16;
|
||||
|
@ -183,7 +183,7 @@ static BOOL CALLBACK FD16_Init(LPARAM lParam, PFD31_DATA lfs, DWORD data)
|
|||
*
|
||||
* called from the common 16/32 code to call the appropriate hook
|
||||
*/
|
||||
static BOOL CALLBACK FD16_CallWindowProc(PFD31_DATA lfs, UINT wMsg, WPARAM wParam,
|
||||
static BOOL CALLBACK FD16_CallWindowProc(const FD31_DATA *lfs, UINT wMsg, WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
PFD16_PRIVATE priv = (PFD16_PRIVATE) lfs->private1632;
|
||||
|
@ -202,7 +202,7 @@ static BOOL CALLBACK FD16_CallWindowProc(PFD31_DATA lfs, UINT wMsg, WPARAM wPara
|
|||
* FD31_UpdateResult [internal]
|
||||
* update the real client structures
|
||||
*/
|
||||
static void CALLBACK FD16_UpdateResult(PFD31_DATA lfs)
|
||||
static void CALLBACK FD16_UpdateResult(const FD31_DATA *lfs)
|
||||
{
|
||||
PFD16_PRIVATE priv = (PFD16_PRIVATE) lfs->private1632;
|
||||
LPOPENFILENAMEW ofnW = lfs->ofnW;
|
||||
|
@ -238,7 +238,7 @@ static void CALLBACK FD16_UpdateResult(PFD31_DATA lfs)
|
|||
* FD16_UpdateFileTitle [internal]
|
||||
* update the real client structures
|
||||
*/
|
||||
static void CALLBACK FD16_UpdateFileTitle(PFD31_DATA lfs)
|
||||
static void CALLBACK FD16_UpdateFileTitle(const FD31_DATA *lfs)
|
||||
{
|
||||
PFD16_PRIVATE priv = (PFD16_PRIVATE) lfs->private1632;
|
||||
LPOPENFILENAMEW ofnW = lfs->ofnW;
|
||||
|
@ -257,7 +257,7 @@ static void CALLBACK FD16_UpdateFileTitle(PFD31_DATA lfs)
|
|||
* FD16_SendLbGetCurSel [internal]
|
||||
* retrieve selected listbox item
|
||||
*/
|
||||
static LRESULT CALLBACK FD16_SendLbGetCurSel(PFD31_DATA lfs)
|
||||
static LRESULT CALLBACK FD16_SendLbGetCurSel(const FD31_DATA *lfs)
|
||||
{
|
||||
return SendDlgItemMessageW(lfs->hwnd, lst1, LB_GETCURSEL16, 0, 0);
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ static LRESULT CALLBACK FD16_SendLbGetCurSel(PFD31_DATA lfs)
|
|||
* FD16_Destroy [internal]
|
||||
* called from the common 16/32 code to cleanup 32 bit data
|
||||
*/
|
||||
static void CALLBACK FD16_Destroy(PFD31_DATA lfs)
|
||||
static void CALLBACK FD16_Destroy(const FD31_DATA *lfs)
|
||||
{
|
||||
PFD16_PRIVATE priv = (PFD16_PRIVATE) lfs->private1632;
|
||||
|
||||
|
@ -299,7 +299,7 @@ static void FD16_SetupCallbacks(PFD31_CALLBACKS callbacks)
|
|||
* FD16_MapDrawItemStruct [internal]
|
||||
* map a 16 bits drawitem struct to 32
|
||||
*/
|
||||
static void FD16_MapDrawItemStruct(LPDRAWITEMSTRUCT16 lpdis16, LPDRAWITEMSTRUCT lpdis)
|
||||
static void FD16_MapDrawItemStruct(const DRAWITEMSTRUCT16 *lpdis16, LPDRAWITEMSTRUCT lpdis)
|
||||
{
|
||||
lpdis->CtlType = lpdis16->CtlType;
|
||||
lpdis->CtlID = lpdis16->CtlID;
|
||||
|
|
|
@ -107,7 +107,7 @@ static void FD31_StripEditControl(HWND hwnd)
|
|||
*
|
||||
* Call the appropriate hook
|
||||
*/
|
||||
BOOL FD31_CallWindowProc(PFD31_DATA lfs, UINT wMsg, WPARAM wParam,
|
||||
BOOL FD31_CallWindowProc(const FD31_DATA *lfs, UINT wMsg, WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
return lfs->callbacks->CWP(lfs, wMsg, wParam, lParam);
|
||||
|
@ -116,7 +116,7 @@ BOOL FD31_CallWindowProc(PFD31_DATA lfs, UINT wMsg, WPARAM wParam,
|
|||
/***********************************************************************
|
||||
* FD31_ScanDir [internal]
|
||||
*/
|
||||
static BOOL FD31_ScanDir(HWND hWnd, LPWSTR newPath)
|
||||
static BOOL FD31_ScanDir(HWND hWnd, LPCWSTR newPath)
|
||||
{
|
||||
WCHAR buffer[BUFFILE];
|
||||
HWND hdlg, hdlgDir;
|
||||
|
@ -194,7 +194,7 @@ static LPCWSTR FD31_GetFileType(LPCWSTR cfptr, LPCWSTR fptr, const WORD index)
|
|||
* FD31_WMDrawItem [internal]
|
||||
*/
|
||||
LONG FD31_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,
|
||||
int savedlg, LPDRAWITEMSTRUCT lpdis)
|
||||
int savedlg, const DRAWITEMSTRUCT *lpdis)
|
||||
{
|
||||
WCHAR *str;
|
||||
HICON hIcon;
|
||||
|
@ -299,7 +299,7 @@ LONG FD31_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,
|
|||
* FD31_UpdateResult [internal]
|
||||
* update the displayed file name (with path)
|
||||
*/
|
||||
static void FD31_UpdateResult(PFD31_DATA lfs, WCHAR *tmpstr)
|
||||
static void FD31_UpdateResult(const FD31_DATA *lfs, const WCHAR *tmpstr)
|
||||
{
|
||||
int lenstr2;
|
||||
LPOPENFILENAMEW ofnW = lfs->ofnW;
|
||||
|
@ -337,7 +337,7 @@ static void FD31_UpdateResult(PFD31_DATA lfs, WCHAR *tmpstr)
|
|||
* FD31_UpdateFileTitle [internal]
|
||||
* update the displayed file name (without path)
|
||||
*/
|
||||
static void FD31_UpdateFileTitle(PFD31_DATA lfs)
|
||||
static void FD31_UpdateFileTitle(const FD31_DATA *lfs)
|
||||
{
|
||||
LONG lRet;
|
||||
LPOPENFILENAMEW ofnW = lfs->ofnW;
|
||||
|
@ -353,7 +353,7 @@ static void FD31_UpdateFileTitle(PFD31_DATA lfs)
|
|||
/***********************************************************************
|
||||
* FD31_DirListDblClick [internal]
|
||||
*/
|
||||
static LRESULT FD31_DirListDblClick( PFD31_DATA lfs )
|
||||
static LRESULT FD31_DirListDblClick( const FD31_DATA *lfs )
|
||||
{
|
||||
LONG lRet;
|
||||
HWND hWnd = lfs->hwnd;
|
||||
|
@ -391,7 +391,7 @@ static LRESULT FD31_DirListDblClick( PFD31_DATA lfs )
|
|||
* FD31_FileListSelect [internal]
|
||||
* called when a new item is picked in the file list
|
||||
*/
|
||||
static LRESULT FD31_FileListSelect( PFD31_DATA lfs )
|
||||
static LRESULT FD31_FileListSelect( const FD31_DATA *lfs )
|
||||
{
|
||||
LONG lRet;
|
||||
HWND hWnd = lfs->hwnd;
|
||||
|
@ -424,7 +424,7 @@ static LRESULT FD31_FileListSelect( PFD31_DATA lfs )
|
|||
* before accepting the file name, test if it includes wild cards
|
||||
* tries to scan the directory and returns TRUE if no error.
|
||||
*/
|
||||
static LRESULT FD31_TestPath( PFD31_DATA lfs, LPWSTR path )
|
||||
static LRESULT FD31_TestPath( const FD31_DATA *lfs, LPWSTR path )
|
||||
{
|
||||
HWND hWnd = lfs->hwnd;
|
||||
LPWSTR pBeginFileName, pstr2;
|
||||
|
@ -493,7 +493,7 @@ static LRESULT FD31_TestPath( PFD31_DATA lfs, LPWSTR path )
|
|||
* FD31_Validate [internal]
|
||||
* called on: click Ok button, Enter in edit, DoubleClick in file list
|
||||
*/
|
||||
static LRESULT FD31_Validate( PFD31_DATA lfs, LPWSTR path, UINT control, INT itemIndex,
|
||||
static LRESULT FD31_Validate( const FD31_DATA *lfs, LPCWSTR path, UINT control, INT itemIndex,
|
||||
BOOL internalUse )
|
||||
{
|
||||
LONG lRet;
|
||||
|
@ -557,7 +557,7 @@ static LRESULT FD31_Validate( PFD31_DATA lfs, LPWSTR path, UINT control, INT ite
|
|||
* FD31_DiskChange [internal]
|
||||
* called when a new item is picked in the disk selection combo
|
||||
*/
|
||||
static LRESULT FD31_DiskChange( PFD31_DATA lfs )
|
||||
static LRESULT FD31_DiskChange( const FD31_DATA *lfs )
|
||||
{
|
||||
LONG lRet;
|
||||
HWND hWnd = lfs->hwnd;
|
||||
|
@ -581,7 +581,7 @@ static LRESULT FD31_DiskChange( PFD31_DATA lfs )
|
|||
* FD31_FileTypeChange [internal]
|
||||
* called when a new item is picked in the file type combo
|
||||
*/
|
||||
static LRESULT FD31_FileTypeChange( PFD31_DATA lfs )
|
||||
static LRESULT FD31_FileTypeChange( const FD31_DATA *lfs )
|
||||
{
|
||||
LONG lRet;
|
||||
LPWSTR pstr;
|
||||
|
@ -600,7 +600,7 @@ static LRESULT FD31_FileTypeChange( PFD31_DATA lfs )
|
|||
* FD31_WMCommand [internal]
|
||||
*/
|
||||
LRESULT FD31_WMCommand(HWND hWnd, LPARAM lParam, UINT notification,
|
||||
UINT control, PFD31_DATA lfs )
|
||||
UINT control, const FD31_DATA *lfs )
|
||||
{
|
||||
switch (control)
|
||||
{
|
||||
|
@ -754,7 +754,7 @@ void FD31_MapOfnStructA(const OPENFILENAMEA *ofnA, LPOPENFILENAMEW ofnW, BOOL op
|
|||
* FD31_FreeOfnW [internal]
|
||||
* Undo all allocations done by FD31_MapOfnStructA
|
||||
*/
|
||||
void FD31_FreeOfnW(LPOPENFILENAMEW ofnW)
|
||||
void FD31_FreeOfnW(const OPENFILENAMEW *ofnW)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrFilter);
|
||||
HeapFree(GetProcessHeap(), 0, ofnW->lpstrCustomFilter);
|
||||
|
|
|
@ -22,20 +22,20 @@
|
|||
#define FD31_OFN_PROP "FILEDLG_OFN"
|
||||
|
||||
/* Forward declare */
|
||||
typedef struct tagFD31_DATA *PFD31_DATA;
|
||||
typedef struct tagFD31_DATA FD31_DATA, *PFD31_DATA;
|
||||
|
||||
typedef struct tagFD31_CALLBACKS
|
||||
{
|
||||
BOOL (CALLBACK *Init)(LPARAM lParam, PFD31_DATA lfs, DWORD data);
|
||||
BOOL (CALLBACK *CWP)(PFD31_DATA lfs, UINT wMsg, WPARAM wParam,
|
||||
LPARAM lParam); /* CWP instead of CallWindowProc to avoid macro expansion */
|
||||
void (CALLBACK *UpdateResult)(PFD31_DATA lfs);
|
||||
void (CALLBACK *UpdateFileTitle)(PFD31_DATA lfs);
|
||||
LRESULT (CALLBACK *SendLbGetCurSel)(PFD31_DATA lfs);
|
||||
void (CALLBACK *Destroy)(PFD31_DATA lfs);
|
||||
BOOL (CALLBACK *CWP)(const FD31_DATA *lfs, UINT wMsg, WPARAM wParam,
|
||||
LPARAM lParam); /* CWP instead of CallWindowProc to avoid macro expansion */
|
||||
void (CALLBACK *UpdateResult)(const FD31_DATA *lfs);
|
||||
void (CALLBACK *UpdateFileTitle)(const FD31_DATA *lfs);
|
||||
LRESULT (CALLBACK *SendLbGetCurSel)(const FD31_DATA *lfs);
|
||||
void (CALLBACK *Destroy)(const FD31_DATA *lfs);
|
||||
} FD31_CALLBACKS, *PFD31_CALLBACKS;
|
||||
|
||||
typedef struct tagFD31_DATA
|
||||
struct tagFD31_DATA
|
||||
{
|
||||
HWND hwnd; /* file dialog window handle */
|
||||
BOOL hook; /* TRUE if the dialog is hooked */
|
||||
|
@ -48,21 +48,21 @@ typedef struct tagFD31_DATA
|
|||
a W copy for A/16 API */
|
||||
LPVOID private1632; /* 16/32 bit caller private data */
|
||||
PFD31_CALLBACKS callbacks; /* callbacks to handle 16/32 bit differences */
|
||||
} FD31_DATA;
|
||||
};
|
||||
|
||||
extern BOOL FD31_Init(void);
|
||||
extern PFD31_DATA FD31_AllocPrivate(LPARAM lParam, UINT dlgType,
|
||||
PFD31_CALLBACKS callbacks, DWORD data);
|
||||
extern void FD31_DestroyPrivate(PFD31_DATA lfs);
|
||||
extern void FD31_MapOfnStructA(const OPENFILENAMEA *ofnA, LPOPENFILENAMEW ofnW, BOOL open);
|
||||
extern void FD31_FreeOfnW(LPOPENFILENAMEW ofnW);
|
||||
extern BOOL FD31_CallWindowProc(PFD31_DATA lfs, UINT wMsg, WPARAM wParam,
|
||||
extern void FD31_FreeOfnW(const OPENFILENAMEW *ofnW);
|
||||
extern BOOL FD31_CallWindowProc(const FD31_DATA *lfs, UINT wMsg, WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
extern LONG FD31_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
||||
extern LONG FD31_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,
|
||||
int savedlg, LPDRAWITEMSTRUCT lpdis);
|
||||
int savedlg, const DRAWITEMSTRUCT *lpdis);
|
||||
extern LRESULT FD31_WMCommand(HWND hWnd, LPARAM lParam, UINT notification,
|
||||
UINT control, PFD31_DATA lfs);
|
||||
UINT control, const FD31_DATA *lfs);
|
||||
extern int FD31_GetFldrHeight(void);
|
||||
|
||||
#endif /* _WINE_DLL_FILEDLG31_H */
|
||||
|
|
Loading…
Reference in New Issue