Cast time_t to long for printing.
[wine] / dlls / commdlg / filedlg.h
1 /*
2  * COMMDLG - File Dialogs
3  *
4  * Copyright 1994 Martin Ayotte
5  * Copyright 1996 Albrecht Kleine
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  */
21
22 #ifndef _WINE_FINDDLG_H
23 #define _WINE_FINDDLG_H
24
25 #define BUFFILE 512
26 #define BUFFILEALLOC 512 * sizeof(WCHAR)
27
28 struct FSPRIVATE
29 {
30     HWND hwnd; /* file dialog window handle */
31     BOOL hook; /* TRUE if the dialog is hooked */
32     UINT lbselchstring; /* registered message id */
33     UINT fileokstring; /* registered message id */
34     LPARAM lParam; /* save original lparam */
35     HANDLE16 hDlgTmpl16; /* handle for resource 16 */
36     HANDLE16 hResource16; /* handle for allocated resource 16 */
37     HANDLE16 hGlobal16; /* 16 bits mem block (resources) */
38     LPCVOID template; /* template for 32 bits resource */
39     BOOL open; /* TRUE if open dialog, FALSE if save dialog */
40     OPENFILENAMEW *ofnW; /* original structure or work struct */
41     OPENFILENAMEA *ofnA; /* original structure if 32bits ansi dialog */
42     OPENFILENAME16 *ofn16; /* original structure if 16 bits dialog */
43 };
44
45 #define LFSPRIVATE struct FSPRIVATE *
46 #define LFS16 1
47 #define LFS32A 2
48 #define LFS32W 3
49 #define OFN_PROP "FILEDLG_OFN"
50
51 static const WCHAR FILE_star[] = {'*','.','*', 0};
52 static const WCHAR FILE_bslash[] = {'\\', 0};
53 static const WCHAR FILE_specc[] = {'%','c',':', 0};
54 static const int fldrHeight = 16;
55 static const int fldrWidth = 20;
56
57 /* Internal Functions
58  * Do not Export to other applications or dlls
59  */
60
61 LPWSTR FILEDLG_GetFileType(LPWSTR cfptr, LPWSTR fptr, WORD index);
62 void FILEDLG_MapDrawItemStruct(LPDRAWITEMSTRUCT16 lpdis16, LPDRAWITEMSTRUCT lpdis);
63 BOOL FILEDLG_ScanDir(HWND hWnd, LPWSTR newPath);
64 LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,
65        int savedlg, LPDRAWITEMSTRUCT lpdis);
66 LRESULT FILEDLG_WMCommand(HWND hWnd, LPARAM lParam, UINT notification,
67        UINT control, LFSPRIVATE lfs );
68 BOOL FileDlg_Init(void);
69 void FILEDLG_DestroyPrivate(LFSPRIVATE lfs);
70 LFSPRIVATE FILEDLG_AllocPrivate(LPARAM lParam, int type, UINT dlgType);
71
72 #endif /* _WINE_FINDDLG_H */