1 /*
2 * Win16 BiDi functions
3 * Copyright 2000 Erez Volk
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 *
19 * NOTE: Right now, most of these functions do nothing.
20 */
21
22 #include <stdarg.h>
23 #include <string.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "wingdi.h"
27 #include "wine/winuser16.h"
28 #include "winerror.h"
29 #include "wine/debug.h"
30
31 WINE_DEFAULT_DEBUG_CHANNEL(relay);
32
33 /***********************************************************************
34 * ChangeDialogTemplate (USER.905)
35 * FIXME: The prototypes of this function have not been found yet.
36 */
37 LONG WINAPI ChangeDialogTemplate16(void) { FIXME("stub (no prototype)\n"); return 0; }
38
39 /***********************************************************************
40 * BiDiMessageBoxEx (USER.910)
41 * FIXME: The prototypes of this function have not been found yet.
42 */
43 LONG WINAPI BiDiMessageBoxEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
44
45
46 /******************************************************************************
47 * ChangeKeyboardCodePage [USER.924]
48 * Change the keyboard layouts to a new pair.
49 * If the language IDs are set to -1, the language is not to be changed.
50 */
51 DWORD WINAPI ChangeKeyboardCodePage16( UINT16 iLangLeft, UINT16 iLangRight )
52 {
53 FIXME( "( %hu, %hu ): stub\n", iLangLeft, iLangRight );
54 return 0;
55 }
56
57
58 /******************************************************************************
59 * ChangeKeyboardLanguage [USER.912]
60 * Change the keyboard layouts to a new pair.
61 *
62 * RETURNS
63 * The old keyboard layout pair.
64 */
65 DWORD WINAPI ChangeKeyboardLanguage16( UINT16 iLangLeft, UINT iLangRight )
66 {
67 FIXME( "( %hu, %hu ): stub\n", iLangLeft, iLangRight );
68 return 0;
69 }
70
71
72 /******************************************************************************
73 * CreateDialogIndirectParamML [USER.916]
74 */
75 HWND16 WINAPI CreateDialogIndirectParamML16( HINSTANCE16 hinstWnd,
76 const void * lpvDlgTmp,
77 HWND16 hwndOwner,
78 DLGPROC16 dlgProc,
79 LPARAM lParamInit,
80 UINT16 iCodePage, UINT16 iLang,
81 LPCSTR lpDlgName,
82 HINSTANCE16 hinstLoad )
83 {
84 FIXME( "( %04hx, %p, %04hx, %p, %08lx, %hu, %hu, %p, %04hx ): stub\n",
85 hinstWnd, lpvDlgTmp, hwndOwner, dlgProc, lParamInit,
86 iCodePage, iLang, lpDlgName, hinstLoad );
87 return 0;
88 }
89
90
91 /******************************************************************************
92 * DialogBoxIndirectParamML [USER.918]
93 */
94 HWND16 WINAPI DialogBoxIndirectParamML16( HINSTANCE16 hinstWnd,
95 HGLOBAL16 hglbDlgTemp,
96 HWND16 hwndOwner,
97 DLGPROC16 dlgprc,
98 LPARAM lParamInit,
99 UINT16 iCodePage, UINT16 iLang,
100 LPCSTR lpDlgName,
101 HINSTANCE16 hinstLoad )
102 {
103 FIXME( "( %04hx, %04hx, %04hx, %p, %08lx, %hu, %hu, %p, %04hx ): stub\n",
104 hinstWnd, hglbDlgTemp, hwndOwner, dlgprc, lParamInit,
105 iCodePage, iLang, lpDlgName, hinstLoad );
106 return 0;
107 }
108
109
110
111 /******************************************************************************
112 * FindLanguageResource [USER.923]
113 */
114 HRSRC16 WINAPI FindLanguageResource16( HINSTANCE16 hinst, LPCSTR lpRes,
115 LPCSTR lpResType, UINT16 iLang )
116 {
117 FIXME( "( %04hx, %p, %p, %hu ): stub\n", hinst, lpRes, lpResType, iLang );
118 return 0;
119 }
120
121
122 /******************************************************************************
123 * GetAppCodePage [USER.915]
124 * Returns the code page and language of the window
125 *
126 * RETURNS
127 * The low word contains the code page, the high word contains the resource language.
128 */
129 DWORD WINAPI GetAppCodePage16( HWND16 hwnd )
130 {
131 FIXME( "( %04hx ): stub\n", hwnd );
132 return 0;
133 }
134
135
136 /******************************************************************************
137 * GetBaseCodePage [USER.922]
138 * Returns the base code page and resource language.
139 * For example, Hebrew windows will return HebrewCodePage in the low word
140 * and English in the high word.
141 */
142 DWORD WINAPI GetBaseCodePage16( void )
143 {
144 FIXME( ": stub\n" );
145 return 0;
146 }
147
148
149
150 /******************************************************************************
151 * GetCodePageSystemFont [USER.913]
152 * Returns the stock font for the requested code page.
153 */
154 HFONT16 WINAPI GetCodePageSystemFont16( UINT16 iFont, UINT16 iCodePage )
155 {
156 FIXME( "( %hu, %hu ): stub\n", iFont, iCodePage );
157 return 0;
158 }
159
160
161
162 /******************************************************************************
163 * GetLanguageName [USER.907]
164 * Returns the name of one language in (possibly) a different language.
165 * Currently only handles language 0 (english).
166 *
167 * RETURNS
168 * Success: The number of bytes copied to the buffer, not including the null.
169 * Failure: 0
170 */
171 UINT WINAPI GetLanguageName16( UINT16 iLang, UINT16 iName,
172 LPSTR lpszName, UINT16 cbBuffer )
173 {
174 if ( (iLang == 0) && (iName == 0) ) {
175 if ( !lpszName || cbBuffer < 8 ) {
176 SetLastError( ERROR_INVALID_PARAMETER );
177 return 0;
178 }
179 strcpy( lpszName, "English" );
180 return 7;
181 }
182
183 FIXME( "( %hu, %hu, %p, %hu ): No BiDi16\n", iLang, iName, lpszName, cbBuffer );
184 return 0;
185 }
186
187
188 /******************************************************************************
189 * GetNumLanguages [USER.906]
190 * Returns the number of languages in the system.
191 */
192 UINT WINAPI GetNumLanguages16( void )
193 {
194 FIXME( ": No Bidi16\n" );
195 return 1;
196 }
197
198
199
200 /******************************************************************************
201 * GetProcessDefaultLayout [USER.1001]
202 *
203 * Gets the default layout for parentless windows.
204 * Right now, just returns 0 (left-to-right).
205 *
206 * RETURNS
207 * Success: Nonzero
208 * Failure: Zero
209 */
210 BOOL16 WINAPI GetProcessDefaultLayout16( DWORD *pdwDefaultLayout )
211 {
212 FIXME( "( %p ): no BiDi16\n", pdwDefaultLayout );
213 return GetProcessDefaultLayout( pdwDefaultLayout );
214 }
215
216
217 /******************************************************************************
218 * LoadLanguageString [USER.919]
219 * Loads a string for a specific language.
220 *
221 * RETURNS
222 * SUCCESS: The length of the string loaded.
223 * FAILURE: Zero.
224 */
225 UINT16 WINAPI LoadLanguageString16( HINSTANCE16 hinst, UINT16 id, UINT16 iLang,
226 LPSTR lpszText, INT16 nBytes )
227 {
228 FIXME( "( %04hx, %hu, %hu, %p, %hd ): stub\n", hinst, id, iLang, lpszText, nBytes );
229 return 0;
230 }
231
232
233
234 /******************************************************************************
235 * LoadSystemLanguageString [USER.902]
236 * Loads a string which is in one of the system language modules.
237 *
238 * RETURNS
239 * Success: The length of the string loaded
240 * Failure: Zero
241 */
242 UINT WINAPI LoadSystemLanguageString16( HINSTANCE16 hinstCaller, UINT16 id,
243 LPSTR lpszText, INT16 nBytes, UINT16 iLang )
244 {
245 FIXME( "( %04hx, %hu, %p, %hd, %hu ): stub\n", hinstCaller, id, lpszText, nBytes, iLang );
246 return 0;
247 }
248
249
250 /***********************************************************************
251 * MessageBoxEx [USER.930]
252 * The multilingual version of MessageBox.
253 */
254 INT16 WINAPI MessageBoxEx16( HWND16 hwndParent, LPCSTR lpszText,
255 LPCSTR lpszTitle, UINT16 fuStyle, UINT16 iLang )
256 {
257 FIXME( "( %04hx, %p, %p, %hu, %hu ): stub\n", hwndParent, lpszText, lpszTitle,
258 fuStyle, iLang );
259 return 0;
260 }
261
262
263 /***********************************************************************
264 * QueryCodePage [USER.914]
265 * Query code page specific data.
266 */
267 LRESULT WINAPI QueryCodePage16( UINT16 idxLang, UINT16 msg,
268 WPARAM16 wParam, LPARAM lParam )
269 {
270 FIXME( "( %hu, %hu, %04hx, %08lx ): stub\n", idxLang, msg, wParam, lParam );
271 return 0;
272 }
273
274 /***********************************************************************
275 * SetAppCodePage [USER.920]
276 * Set the code page and language of the window to new values.
277 *
278 * RETURNS
279 * The low word contains the old code page, the high word contains
280 * the old resource language.
281 */
282 DWORD WINAPI SetAppCodePage16( HWND16 hwnd, UINT16 iCodePage, UINT16 iLang,
283 UINT16 fRedraw )
284 {
285 FIXME( "( %04hx, %hu, %hu, %hu ): stub\n", hwnd, iCodePage, iLang, fRedraw );
286 return 0;
287 }
288
289 /***********************************************************************
290 * SetDlgItemTextEx [USER.911]
291 * Sets the title or text of a control in a dialog box.
292 * Currently only works for language 0 (english)
293 */
294 void WINAPI SetDlgItemTextEx16( HWND16 hwnd, INT16 id,
295 LPCSTR lpszText, UINT16 iLang )
296 {
297 FIXME( "( %04hx, %hd, %p, %hu ): stub\n", hwnd, id, lpszText, iLang );
298 }
299
300 /******************************************************************************
301 * SetProcessDefaultLayout [USER.1000]
302 *
303 * Sets the default layout for parentless windows.
304 * Right now, only accepts 0 (left-to-right).
305 *
306 * RETURNS
307 * Success: Nonzero
308 * Failure: Zero
309 */
310 BOOL16 WINAPI SetProcessDefaultLayout16( DWORD dwDefaultLayout )
311 {
312 FIXME( "( %08x ): No BiDi16\n", dwDefaultLayout );
313 return SetProcessDefaultLayout( dwDefaultLayout );
314 }
315
316 /******************************************************************************
317 * SetWindowTextEx [USER.909]
318 * Sets the given window's title to the specified text in the specified language.
319 */
320 void WINAPI SetWindowTextEx16( HWND16 hwnd, LPCSTR lpsz, UINT16 iLang )
321 {
322 FIXME( "( %04hx, %p, %hu ): stub\n", hwnd, lpsz, iLang );
323 }
324
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.