Translation update.
[wine] / dlls / commdlg / cdlg.h
1 /*
2  *  Common Dialog Boxes interface (32 bit)
3  *
4  * Copyright 1998 Bertho A. Stultiens
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef _WINE_DLL_CDLG_H
22 #define _WINE_DLL_CDLG_H
23
24 #define COM_NO_WINDOWS_H
25 #include "dlgs.h"
26 #include "wownt32.h"
27
28 /* Common dialogs implementation globals */
29 #define COMDLG32_Atom   ((ATOM)0xa000)  /* MS uses this one to identify props */
30
31 extern HINSTANCE        COMDLG32_hInstance;
32
33 void    COMDLG32_SetCommDlgExtendedError(DWORD err);
34 LPVOID  COMDLG32_AllocMem(int size);
35
36 /* handle<-handle16 conversion */
37 #define HINSTANCE_32(h16)           ((HINSTANCE)(ULONG_PTR)(h16))
38
39 /* Find/Replace local definitions */
40
41 #define FR_WINE_UNICODE         0x80000000
42 #define FR_WINE_REPLACE         0x40000000
43
44 typedef struct {
45         FINDREPLACEA    fr;     /* Internally used structure */
46         union {
47                 FINDREPLACEA    *fra;   /* Reference to the user supplied structure */
48                 FINDREPLACEW    *frw;
49         } user_fr;
50 } COMDLG32_FR_Data;
51
52 #define PD32_PRINT_TITLE        7000
53
54 #define PD32_VALUE_UREADABLE                  1104
55 #define PD32_INVALID_PAGE_RANGE               1105
56 #define PD32_FROM_NOT_ABOVE_TO                1106
57 #define PD32_MARGINS_OVERLAP                  1107
58 #define PD32_NR_OF_COPIES_EMPTY               1108
59 #define PD32_TOO_LARGE_COPIES                 1109
60 #define PD32_PRINT_ERROR                      1110
61 #define PD32_NO_DEFAULT_PRINTER               1111
62 #define PD32_CANT_FIND_PRINTER                1112
63 #define PD32_OUT_OF_MEMORY                    1113
64 #define PD32_GENERIC_ERROR                    1114
65 #define PD32_DRIVER_UNKNOWN                   1115
66
67 #define PD32_PRINTER_STATUS_READY             1536
68 #define PD32_PRINTER_STATUS_PAUSED            1537
69 #define PD32_PRINTER_STATUS_ERROR             1538
70 #define PD32_PRINTER_STATUS_PENDING_DELETION  1539
71 #define PD32_PRINTER_STATUS_PAPER_JAM         1540
72 #define PD32_PRINTER_STATUS_PAPER_OUT         1541
73 #define PD32_PRINTER_STATUS_MANUAL_FEED       1542
74 #define PD32_PRINTER_STATUS_PAPER_PROBLEM     1543
75 #define PD32_PRINTER_STATUS_OFFLINE           1544
76 #define PD32_PRINTER_STATUS_IO_ACTIVE         1545
77 #define PD32_PRINTER_STATUS_BUSY              1546
78 #define PD32_PRINTER_STATUS_PRINTING          1547
79 #define PD32_PRINTER_STATUS_OUTPUT_BIN_FULL   1548
80 #define PD32_PRINTER_STATUS_NOT_AVAILABLE     1549
81 #define PD32_PRINTER_STATUS_WAITING           1550
82 #define PD32_PRINTER_STATUS_PROCESSING        1551
83 #define PD32_PRINTER_STATUS_INITIALIZING      1552
84 #define PD32_PRINTER_STATUS_WARMING_UP        1553
85 #define PD32_PRINTER_STATUS_TONER_LOW         1554
86 #define PD32_PRINTER_STATUS_NO_TONER          1555
87 #define PD32_PRINTER_STATUS_PAGE_PUNT         1556
88 #define PD32_PRINTER_STATUS_USER_INTERVENTION 1557
89 #define PD32_PRINTER_STATUS_OUT_OF_MEMORY     1558
90 #define PD32_PRINTER_STATUS_DOOR_OPEN         1559
91 #define PD32_PRINTER_STATUS_SERVER_UNKNOWN    1560
92 #define PD32_PRINTER_STATUS_POWER_SAVE        1561
93
94 #define PD32_DEFAULT_PRINTER                  1582
95 #define PD32_NR_OF_DOCUMENTS_IN_QUEUE         1583
96 #define PD32_PRINT_ALL_X_PAGES                1584
97 #define PD32_MARGINS_IN_INCHES                1585
98 #define PD32_MARGINS_IN_MILIMETERS            1586
99 #define PD32_MILIMETERS                       1587
100
101 /* Charset names string IDs */
102
103 #define IDS_CHARSET_ANSI        200
104 #define IDS_CHARSET_SYMBOL      201
105 #define IDS_CHARSET_JIS         202
106 #define IDS_CHARSET_HANGUL      203
107 #define IDS_CHARSET_GB2312      204
108 #define IDS_CHARSET_BIG5        205
109 #define IDS_CHARSET_GREEK       206
110 #define IDS_CHARSET_TURKISH     207
111 #define IDS_CHARSET_HEBREW      208
112 #define IDS_CHARSET_ARABIC      209
113 #define IDS_CHARSET_BALTIC      210
114 #define IDS_CHARSET_VIETNAMESE  211
115 #define IDS_CHARSET_RUSSIAN     212
116 #define IDS_CHARSET_EE          213
117 #define IDS_CHARSET_THAI        214
118 #define IDS_CHARSET_JOHAB       215
119 #define IDS_CHARSET_MAC         216
120 #define IDS_CHARSET_OEM         217
121 #define IDS_CHARSET_VISCII      218
122 #define IDS_CHARSET_TCVN        219
123 #define IDS_CHARSET_KOI8        220
124 #define IDS_CHARSET_ISO3        221
125 #define IDS_CHARSET_ISO4        222
126 #define IDS_CHARSET_ISO10       223
127 #define IDS_CHARSET_CELTIC      224
128
129 /* Color names string IDs */
130
131 #define IDS_COLOR_BLACK                 1040
132 #define IDS_COLOR_MAROON                1041
133 #define IDS_COLOR_GREEN                 1042
134 #define IDS_COLOR_OLIVE                 1043
135 #define IDS_COLOR_NAVY                  1044
136 #define IDS_COLOR_PURPLE                1045
137 #define IDS_COLOR_TEAL                  1046
138 #define IDS_COLOR_GRAY                  1047
139 #define IDS_COLOR_SILVER                1048
140 #define IDS_COLOR_RED                   1049
141 #define IDS_COLOR_LIME                  1050
142 #define IDS_COLOR_YELLOW                1051
143 #define IDS_COLOR_BLUE                  1052
144 #define IDS_COLOR_FUCHSIA               1053
145 #define IDS_COLOR_AQUA                  1054
146 #define IDS_COLOR_WHITE                 1055
147
148 #include "windef.h"
149 #include "winbase.h"
150 #include "wingdi.h"
151 #include "winuser.h"
152 #include "winnls.h"
153 #include "commctrl.h"
154 #include "shlobj.h"
155 #include "shellapi.h"
156
157 /* ITEMIDLIST */
158
159 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILClone) (LPCITEMIDLIST);
160 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILCombine)(LPCITEMIDLIST,LPCITEMIDLIST);
161 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILGetNext)(LPITEMIDLIST);
162 extern BOOL (WINAPI *COMDLG32_PIDL_ILRemoveLastID)(LPCITEMIDLIST);
163 extern BOOL (WINAPI *COMDLG32_PIDL_ILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST);
164
165 /* SHELL */
166 extern LPVOID (WINAPI *COMDLG32_SHAlloc)(DWORD);
167 extern DWORD (WINAPI *COMDLG32_SHFree)(LPVOID);
168 extern BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR);
169 extern BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR);
170
171 extern BOOL  WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType);
172 extern BOOL  WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType);
173
174 /*
175  * Internal Functions
176  * Do NOT Export to other programs and dlls
177  */
178
179 BOOL CC_HookCallChk( LPCHOOSECOLORW lpcc );
180 int CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam );
181 LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam );
182 LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam );
183 LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD 
184                                                 notifyCode, HWND hwndCtl );
185 LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam );
186 LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam );
187 void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPRECT lprect );
188 void CC_PaintSelectedColor( HWND hDlg, COLORREF cr );
189 int CC_RGBtoHSL(char c, int r, int g, int b);
190 void CC_PaintCross( HWND hDlg, int x, int y);
191 void CC_PaintTriangle( HWND hDlg, int y);
192 int CC_CheckDigitsInEdit( HWND hwnd, int maxval );
193 void CC_EditSetHSL( HWND hDlg, int h, int s, int l );
194 int CC_HSLtoRGB(char c, int hue, int sat, int lum);
195 void CC_EditSetRGB( HWND hDlg, COLORREF cr );
196 void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr );
197
198 typedef struct
199 {
200   HWND hWnd1;
201   HWND hWnd2;
202   LPCHOOSEFONTA lpcf32a;
203   int  added;
204 } CFn_ENUMSTRUCT, *LPCFn_ENUMSTRUCT;
205
206 INT AddFontFamily(const ENUMLOGFONTEXA *lpElfex, const NEWTEXTMETRICEXA *lpNTM,
207                   UINT nFontType, LPCHOOSEFONTA lpcf, HWND hwnd,
208                   LPCFn_ENUMSTRUCT e);
209 INT AddFontStyle(const ENUMLOGFONTEXA *lpElfex, const NEWTEXTMETRICEXA *metrics,
210                  UINT nFontType, LPCHOOSEFONTA lpcf, HWND hcmb2, HWND hcmb3,
211                  HWND hDlg, BOOL iswin16);
212 void _dump_cf_flags(DWORD cflags);
213
214 LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
215                          LPCHOOSEFONTA lpcf);
216 LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam);
217 LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam);
218 LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
219                       LPCHOOSEFONTA lpcf);
220 LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam,
221                       LPCHOOSEFONTA lpcf);
222 LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam);
223
224 #endif /* _WINE_DLL_CDLG_H */