Release 1.3.1.
[wine/hramrach.git] / dlls / user.exe16 / bidi.c
blobe415785a0de781cf6c703d6ad83e0bf960db60c9
1 /*
2 * Win16 BiDi functions
3 * Copyright 2000 Erez Volk
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.
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.
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
19 * NOTE: Right now, most of these functions do nothing.
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"
31 WINE_DEFAULT_DEBUG_CHANNEL(relay);
33 /***********************************************************************
34 * ChangeDialogTemplate (USER.905)
35 * FIXME: The prototypes of this function have not been found yet.
37 LONG WINAPI ChangeDialogTemplate16(void) { FIXME("stub (no prototype)\n"); return 0; }
39 /***********************************************************************
40 * BiDiMessageBoxEx (USER.910)
41 * FIXME: The prototypes of this function have not been found yet.
43 LONG WINAPI BiDiMessageBoxEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
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.
51 DWORD WINAPI ChangeKeyboardCodePage16( UINT16 iLangLeft, UINT16 iLangRight )
53 FIXME( "( %hu, %hu ): stub\n", iLangLeft, iLangRight );
54 return 0;
58 /******************************************************************************
59 * ChangeKeyboardLanguage [USER.912]
60 * Change the keyboard layouts to a new pair.
62 * RETURNS
63 * The old keyboard layout pair.
65 DWORD WINAPI ChangeKeyboardLanguage16( UINT16 iLangLeft, UINT iLangRight )
67 FIXME( "( %hu, %hu ): stub\n", iLangLeft, iLangRight );
68 return 0;
72 /******************************************************************************
73 * CreateDialogIndirectParamML [USER.916]
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 )
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;
91 /******************************************************************************
92 * DialogBoxIndirectParamML [USER.918]
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 )
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;
111 /******************************************************************************
112 * FindLanguageResource [USER.923]
114 HRSRC16 WINAPI FindLanguageResource16( HINSTANCE16 hinst, LPCSTR lpRes,
115 LPCSTR lpResType, UINT16 iLang )
117 FIXME( "( %04hx, %p, %p, %hu ): stub\n", hinst, lpRes, lpResType, iLang );
118 return 0;
122 /******************************************************************************
123 * GetAppCodePage [USER.915]
124 * Returns the code page and language of the window
126 * RETURNS
127 * The low word contains the code page, the high word contains the resource language.
129 DWORD WINAPI GetAppCodePage16( HWND16 hwnd )
131 FIXME( "( %04hx ): stub\n", hwnd );
132 return 0;
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.
142 DWORD WINAPI GetBaseCodePage16( void )
144 FIXME( ": stub\n" );
145 return 0;
150 /******************************************************************************
151 * GetCodePageSystemFont [USER.913]
152 * Returns the stock font for the requested code page.
154 HFONT16 WINAPI GetCodePageSystemFont16( UINT16 iFont, UINT16 iCodePage )
156 FIXME( "( %hu, %hu ): stub\n", iFont, iCodePage );
157 return 0;
162 /******************************************************************************
163 * GetLanguageName [USER.907]
164 * Returns the name of one language in (possibly) a different language.
165 * Currently only handles language 0 (english).
167 * RETURNS
168 * Success: The number of bytes copied to the buffer, not including the null.
169 * Failure: 0
171 UINT WINAPI GetLanguageName16( UINT16 iLang, UINT16 iName,
172 LPSTR lpszName, UINT16 cbBuffer )
174 if ( (iLang == 0) && (iName == 0) ) {
175 if ( !lpszName || cbBuffer < 8 ) {
176 SetLastError( ERROR_INVALID_PARAMETER );
177 return 0;
179 strcpy( lpszName, "English" );
180 return 7;
183 FIXME( "( %hu, %hu, %p, %hu ): No BiDi16\n", iLang, iName, lpszName, cbBuffer );
184 return 0;
188 /******************************************************************************
189 * GetNumLanguages [USER.906]
190 * Returns the number of languages in the system.
192 UINT WINAPI GetNumLanguages16( void )
194 FIXME( ": No Bidi16\n" );
195 return 1;
200 /******************************************************************************
201 * GetProcessDefaultLayout [USER.1001]
203 * Gets the default layout for parentless windows.
204 * Right now, just returns 0 (left-to-right).
206 * RETURNS
207 * Success: Nonzero
208 * Failure: Zero
210 BOOL16 WINAPI GetProcessDefaultLayout16( DWORD *pdwDefaultLayout )
212 FIXME( "( %p ): no BiDi16\n", pdwDefaultLayout );
213 return GetProcessDefaultLayout( pdwDefaultLayout );
217 /******************************************************************************
218 * LoadLanguageString [USER.919]
219 * Loads a string for a specific language.
221 * RETURNS
222 * SUCCESS: The length of the string loaded.
223 * FAILURE: Zero.
225 UINT16 WINAPI LoadLanguageString16( HINSTANCE16 hinst, UINT16 id, UINT16 iLang,
226 LPSTR lpszText, INT16 nBytes )
228 FIXME( "( %04hx, %hu, %hu, %p, %hd ): stub\n", hinst, id, iLang, lpszText, nBytes );
229 return 0;
234 /******************************************************************************
235 * LoadSystemLanguageString [USER.902]
236 * Loads a string which is in one of the system language modules.
238 * RETURNS
239 * Success: The length of the string loaded
240 * Failure: Zero
242 UINT WINAPI LoadSystemLanguageString16( HINSTANCE16 hinstCaller, UINT16 id,
243 LPSTR lpszText, INT16 nBytes, UINT16 iLang )
245 FIXME( "( %04hx, %hu, %p, %hd, %hu ): stub\n", hinstCaller, id, lpszText, nBytes, iLang );
246 return 0;
250 /***********************************************************************
251 * MessageBoxEx [USER.930]
252 * The multilingual version of MessageBox.
254 INT16 WINAPI MessageBoxEx16( HWND16 hwndParent, LPCSTR lpszText,
255 LPCSTR lpszTitle, UINT16 fuStyle, UINT16 iLang )
257 FIXME( "( %04hx, %p, %p, %hu, %hu ): stub\n", hwndParent, lpszText, lpszTitle,
258 fuStyle, iLang );
259 return 0;
263 /***********************************************************************
264 * QueryCodePage [USER.914]
265 * Query code page specific data.
267 LRESULT WINAPI QueryCodePage16( UINT16 idxLang, UINT16 msg,
268 WPARAM16 wParam, LPARAM lParam )
270 FIXME( "( %hu, %hu, %04hx, %08lx ): stub\n", idxLang, msg, wParam, lParam );
271 return 0;
274 /***********************************************************************
275 * SetAppCodePage [USER.920]
276 * Set the code page and language of the window to new values.
278 * RETURNS
279 * The low word contains the old code page, the high word contains
280 * the old resource language.
282 DWORD WINAPI SetAppCodePage16( HWND16 hwnd, UINT16 iCodePage, UINT16 iLang,
283 UINT16 fRedraw )
285 FIXME( "( %04hx, %hu, %hu, %hu ): stub\n", hwnd, iCodePage, iLang, fRedraw );
286 return 0;
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)
294 void WINAPI SetDlgItemTextEx16( HWND16 hwnd, INT16 id,
295 LPCSTR lpszText, UINT16 iLang )
297 FIXME( "( %04hx, %hd, %p, %hu ): stub\n", hwnd, id, lpszText, iLang );
300 /******************************************************************************
301 * SetProcessDefaultLayout [USER.1000]
303 * Sets the default layout for parentless windows.
304 * Right now, only accepts 0 (left-to-right).
306 * RETURNS
307 * Success: Nonzero
308 * Failure: Zero
310 BOOL16 WINAPI SetProcessDefaultLayout16( DWORD dwDefaultLayout )
312 FIXME( "( %08x ): No BiDi16\n", dwDefaultLayout );
313 return SetProcessDefaultLayout( dwDefaultLayout );
316 /******************************************************************************
317 * SetWindowTextEx [USER.909]
318 * Sets the given window's title to the specified text in the specified language.
320 void WINAPI SetWindowTextEx16( HWND16 hwnd, LPCSTR lpsz, UINT16 iLang )
322 FIXME( "( %04hx, %p, %hu ): stub\n", hwnd, lpsz, iLang );