Do not initialize dcb in BuildCommDCB[AndTimeouts].
[wine] / misc / bidi16.c
1 /*
2  * Win16 BiDi functions
3  * Right now, most of these functions do nothing.
4  */
5
6 #include "windef.h"
7 #include "debugtools.h"
8 #include "windows.h"
9
10 DEFAULT_DEBUG_CHANNEL(relay)
11
12 /***********************************************************************
13  *              RawTextOut16
14  */
15 LONG WINAPI RawTextOut16(void) { FIXME("stub (no prototype)\n"); return 0; }
16
17 /***********************************************************************
18  *              RawExtTextOut16
19  */
20 LONG WINAPI RawExtTextOut16(void) { FIXME("stub (no prototype)\n"); return 0; }
21
22 /***********************************************************************
23  *              RawGetTextExtent16
24  */
25 LONG WINAPI RawGetTextExtent16(HDC16 hdc, LPCSTR lpszString, INT16 cbString ) { 
26       FIXME("(%04hx, %p, %hd): stub\n", hdc, lpszString, cbString); 
27       return 0; 
28 }
29
30 /***********************************************************************
31  *              BiDiLayout16
32  */
33 LONG WINAPI BiDiLayout16(void) { FIXME("stub (no prototype)\n"); return 0; }
34
35 /***********************************************************************
36  *              BiDiCreateTabString16
37  */
38 LONG WINAPI BiDiCreateTabString16(void) { FIXME("stub (no prototype)\n"); return 0; }
39
40 /***********************************************************************
41  *              BiDiGlyphOut16
42  */
43 LONG WINAPI BiDiGlyphOut16(void) { FIXME("stub (no prototype)\n"); return 0; }
44
45 /***********************************************************************
46  *              BiDiGetStringExtent16
47  */
48 LONG WINAPI BiDiGetStringExtent16(void) { FIXME("stub (no prototype)\n"); return 0; }
49
50 /***********************************************************************
51  *              BiDiDeleteString16
52  */
53 LONG WINAPI BiDiDeleteString16(void) { FIXME("stub (no prototype)\n"); return 0; }
54
55 /***********************************************************************
56  *              BiDiSetDefaults16
57  */
58 LONG WINAPI BiDiSetDefaults16(void) { FIXME("stub (no prototype)\n"); return 0; }
59
60 /***********************************************************************
61  *              BiDiGetDefaults16
62  */
63 LONG WINAPI BiDiGetDefaults16(void) { FIXME("stub (no prototype)\n"); return 0; }
64
65 /***********************************************************************
66  *              BiDiShape16
67  */
68 LONG WINAPI BiDiShape16(void) { FIXME("stub (no prototype)\n"); return 0; }
69
70 /***********************************************************************
71  *              BiDiFontComplement16
72  */
73 LONG WINAPI BiDiFontComplement16(void) { FIXME("stub (no prototype)\n"); return 0; }
74
75 /***********************************************************************
76  *              BiDiSetKashida16
77  */
78 LONG WINAPI BiDiSetKashida16(void) { FIXME("stub (no prototype)\n"); return 0; }
79
80 /***********************************************************************
81  *              BiDiKExtTextOut16
82  */
83 LONG WINAPI BiDiKExtTextOut16(void) { FIXME("stub (no prototype)\n"); return 0; }
84
85 /***********************************************************************
86  *              BiDiShapeEx16
87  */
88 LONG WINAPI BiDiShapeEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
89
90 /***********************************************************************
91  *              BiDiCreateStringEx16
92  */
93 LONG WINAPI BiDiCreateStringEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
94
95 /***********************************************************************
96  *              GetTextExtentRtoL16
97  */
98 LONG WINAPI GetTextExtentRtoL16(void) { FIXME("stub (no prototype)\n"); return 0; }
99
100 /***********************************************************************
101  *              GetHDCCharSet16
102  */
103 LONG WINAPI GetHDCCharSet16(void) { FIXME("stub (no prototype)\n"); return 0; }
104
105 /***********************************************************************
106  *              BiDiLayoutEx16
107  */
108 LONG WINAPI BiDiLayoutEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
109
110 /***********************************************************************
111  *              ChangeDialogTemplate16
112  * FIXME: The prototypes of this function have not been found yet.
113  */
114 LONG WINAPI ChangeDialogTemplate16(void) { FIXME("stub (no prototype)\n"); return 0; }
115
116 /***********************************************************************
117  *              BiDiMessageBoxEx16
118  * FIXME: The prototypes of this function have not been found yet.
119  */
120 LONG WINAPI BiDiMessageBoxEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
121
122
123 /******************************************************************************
124  *                    ChangeKeyboardCodePage16 [USER.924]
125  * Change the keyboard layouts to a new pair.
126  * If the language IDs are set to -1, the language is not to be changed.
127  */
128 DWORD WINAPI ChangeKeyboardCodePage16( UINT16 iLangLeft, UINT16 iLangRight )
129 {
130     FIXME( "( %hu, %hu ): stub\n", iLangLeft, iLangRight );
131     return 0;
132 }
133
134
135 /******************************************************************************
136  *                    ChangeKeyboardLanguage16 [USER.912]
137  * Change the keyboard layouts to a new pair.
138  *
139  * RETURNS
140  *    The old keyboard layout pair.
141  */
142 DWORD WINAPI ChangeKeyboardLanguage16( UINT16 iLangLeft, UINT iLangRight )
143 {
144     FIXME( "( %hu, %hu ): stub\n", iLangLeft, iLangRight );
145     return 0;
146 }
147
148
149 /******************************************************************************
150  *                    CreateDialogIndirectParamML16 [USER.916]
151  */
152 HWND16 WINAPI CreateDialogIndirectParamML16( HINSTANCE16 hinstWnd,
153                                              const void * lpvDlgTmp,
154                                              HWND16 hwndOwner,
155                                              DLGPROC16 dlgProc,
156                                              LPARAM lParamInit,
157                                              UINT16 iCodePage, UINT16 iLang,
158                                              LPCSTR lpDlgName,
159                                              HINSTANCE16 hinstLoad )
160 {
161     FIXME( "( %04hx, %p, %04hx, %p, %08lx, %hu, %hu, %p, %04hx ): stub\n",
162            hinstWnd, lpvDlgTmp, hwndOwner, dlgProc, lParamInit,
163            iCodePage, iLang, lpDlgName, hinstLoad );
164     return 0;
165 }
166
167
168 /******************************************************************************
169  *                    DialogBoxIndirectParamML16 [USER.916]
170  */
171 HWND16 WINAPI DialogBoxIndirectParamML16( HINSTANCE16 hinstWnd,
172                                           HGLOBAL16 hglbDlgTemp,
173                                           HWND16 hwndOwner,
174                                           DLGPROC16 dlgprc,
175                                           LPARAM lParamInit,
176                                           UINT16 iCodePage, UINT16 iLang,
177                                           LPCSTR lpDlgName,
178                                           HINSTANCE16 hinstLoad )
179 {
180     FIXME( "( %04hx, %04hx, %04hx, %p, %08lx, %hu, %hu, %p, %04hx ): stub\n",
181            hinstWnd, hglbDlgTemp, hwndOwner, dlgprc, lParamInit,
182            iCodePage, iLang, lpDlgName, hinstLoad );
183     return 0;
184 }
185
186
187
188 /******************************************************************************
189  *                    FindLanguageResource16 [USER.923]
190  */
191 HRSRC16 WINAPI FindLanguageResource16( HINSTANCE16 hinst, LPCSTR lpRes,
192                                        LPCSTR lpResType, UINT16 iLang )
193 {
194     FIXME( "( %04hx, %p, %p, %hu ): stub\n", hinst, lpRes, lpResType, iLang );
195     return 0;
196 }
197
198
199 /******************************************************************************
200  *                    GetAppCodePage16 [USER.915]
201  * Returns the code page and language of the window
202  *
203  * RETURNS
204  *    The low word contains the code page, the high word contains the resource language.
205  */
206 DWORD WINAPI GetAppCodePage16( HWND16 hwnd )
207 {
208     FIXME( "( %04hx ): stub\n", hwnd );
209     return 0;
210 }
211
212
213 /******************************************************************************
214  *                    GetBaseCodePage16 [USER.922]
215  * Returns the base code page and resource language.
216  * For example, Hebrew windows will return HebrewCodePage in the low word
217  * and English in the high word.
218  */
219 DWORD WINAPI GetBaseCodePage16( void )
220 {
221     FIXME( ": stub\n" );
222     return 0;
223 }
224
225
226
227 /******************************************************************************
228  *                    GetCodePageSystemFont16 [USER.913]
229  * Returns the stock font for the requested code page.
230  */
231 HFONT16 WINAPI GetCodePageSystemFont16( UINT16 iFont, UINT16 iCodePage )
232 {
233     FIXME( "( %hu, %hu ): stub\n", iFont, iCodePage );
234     return 0;
235 }
236
237
238
239 /******************************************************************************
240  *                    GetLanguageName16 [USER.906]
241  * Returns the name of one language in (possibly) a different language.
242  * Currently only handles language 0 (english).
243  *
244  * RETURNS
245  *    Success: The number of bytes copied to the buffer, not including the null.
246  *    Failure: 0
247  */
248 UINT WINAPI GetLanguageName16( UINT16 iLang, UINT16 iName,
249                                LPSTR lpszName, UINT16 cbBuffer )
250 {
251     if ( (iLang == 0) && (iName == 0) ) {
252         if ( !lpszName || cbBuffer < 8 ) {
253             SetLastError( ERROR_INVALID_PARAMETER );
254             return 0;
255         }
256         strcpy( lpszName, "English" );
257         return 7;
258     }
259
260     FIXME( "( %hu, %hu, %p, %hu ): No BiDi16\n", iLang, iName, lpszName, cbBuffer );
261     return 0;
262 }
263
264
265 /******************************************************************************
266  *                    GetNumLanguages16 [USER.906]
267  * Returns the number of languages in the system.
268  */
269 UINT WINAPI GetNumLanguages16( void )
270 {
271     FIXME( ": No Bidi16\n" );
272     return 1;
273 }
274
275
276
277 /******************************************************************************
278  *                    GetProcessDefaultLayout16 [USER.1001]
279  *
280  * Gets the default layout for parentless windows.
281  * Right now, just returns 0 (left-to-right).
282  *
283  * RETURNS
284  *    Success: Nonzero
285  *    Failure: Zero
286  */
287 BOOL16 WINAPI GetProcessDefaultLayout16( DWORD *pdwDefaultLayout )
288 {
289     FIXME( "( %p ): no BiDi16\n", pdwDefaultLayout );
290     return GetProcessDefaultLayout( pdwDefaultLayout );
291 }
292
293
294 /******************************************************************************
295  *                   LoadLanguageString16 [USER.919]
296  * Loads a string for a specific language.
297  *
298  * RETURNS
299  *    SUCCESS: The length of the string loaded.
300  *    FAILURE: Zero.
301  */
302 UINT16 WINAPI LoadLanguageString16( HINSTANCE16 hinst, UINT16 id, UINT16 iLang,
303                                     LPSTR lpszText, INT16 nBytes )
304 {
305     FIXME( "( %04hx, %hu, %hu, %p, %hd ): stub\n", hinst, id, iLang, lpszText, nBytes );
306     return 0;
307 }
308
309
310
311 /******************************************************************************
312  *                   LoadSystemLanguageString16 [USER.902]
313  * Loads a string which is in one of the system language modules.
314  *
315  * RETURNS
316  *    Success: The length of the string loaded
317  *    Failure: Zero
318  */
319 UINT WINAPI LoadSystemLanguageString16( HINSTANCE16 hinstCaller, UINT16 id,
320                                         LPSTR lpszText, INT16 nBytes, UINT16 iLang )
321 {
322     FIXME( "( %04hx, %hu, %p, %hd, %hu ): stub\n", hinstCaller, id, lpszText, nBytes, iLang );
323     return 0;
324 }
325
326
327 /***********************************************************************
328  *           MessageBoxEx16 [USER.930]
329  * The multilingual version of MessageBox.
330  */
331 INT16 WINAPI MessageBoxEx16( HWND16 hwndParent, LPCSTR lpszText,
332                              LPCSTR lpszTitle, UINT16 fuStyle, UINT16 iLang )
333 {
334     FIXME( "( %04hx, %p, %p, %hu, %hu ): stub\n", hwndParent, lpszText, lpszTitle,
335            fuStyle, iLang );
336     return 0;
337 }
338
339
340 /***********************************************************************
341  *           QueryCodePage16   [USER.914]
342  * Query code page specific data.
343  */
344 LRESULT WINAPI QueryCodePage16( UINT16 idxLang, UINT16 msg,
345                                 WPARAM16 wParam, LPARAM lParam )
346 {
347     FIXME( "( %hu, %hu, %04hx, %08lx ): stub\n", idxLang, msg, wParam, lParam );
348     return 0;
349 }
350
351
352 /***********************************************************************
353  *           SetAppCodePage16   [USER.920]
354  * Set the code page and language of the window to new values.
355  *
356  * RETURNS
357  *    The low word contains the old code page, the high word contains
358  *       the old resource language.
359  */
360 DWORD WINAPI SetAppCodePage16( HWND16 hwnd, UINT16 iCodePage, UINT16 iLang,
361                                UINT16 fRedraw )
362 {
363     FIXME( "( %04hx, %hu, %hu, %hu ): stub\n", hwnd, iCodePage, iLang, fRedraw );
364     return 0;
365 }
366
367
368
369 /***********************************************************************
370  *           SetDlgItemTextEx16   [USER.911]
371  * Sets the title or text of a control in a dialog box.
372  * Currently only works for language 0 (english)
373  */
374 void WINAPI SetDlgItemTextEx16( HWND16 hwnd, INT16 id,
375                                 LPCSTR lpszText, UINT16 iLang )
376 {
377     FIXME( "( %04hx, %hd, %p, %hu ): stub\n", hwnd, id, lpszText, iLang );
378 }
379
380
381
382 /***********************************************************************
383  *           SetLayout16   [GDI.1000]
384  *
385  * Sets left->right or right->left text layout flags of a dc.
386  */
387 BOOL16 WINAPI SetLayout16( HDC16 hdc, DWORD layout )
388 {
389     FIXME( "( %04hx, %08lx ): No BiDi16\n", hdc, layout );
390     return SetLayout( hdc, layout );
391 }
392
393
394
395 /******************************************************************************
396  *                    SetProcessDefaultLayout16 [USER.1000]
397  *
398  * Sets the default layout for parentless windows.
399  * Right now, only accepts 0 (left-to-right).
400  *
401  * RETURNS
402  *    Success: Nonzero
403  *    Failure: Zero
404  */
405 BOOL16 WINAPI SetProcessDefaultLayout16( DWORD dwDefaultLayout )
406 {
407     FIXME( "( %08lx ): No BiDi16\n", dwDefaultLayout );
408     return SetProcessDefaultLayout( dwDefaultLayout );
409 }
410
411
412 /******************************************************************************
413  *                    SetWindowTextEx16 [USER.909]
414  * Sets the given window's title to the specified text in the specified language.
415  */
416 void WINAPI SetWindowTextEx16( HWND16 hwnd, LPCSTR lpsz, UINT16 iLang )
417 {
418     FIXME( "( %04hx, %p, %hu ): stub\n", hwnd, lpsz, iLang );
419 }
420