Split bidi16.c and network.c out of misc/ into their respective dlls.
[wine] / dlls / user / bidi16.c
1 /*
2  * Win16 BiDi functions
3  * Right now, most of these functions do nothing.
4  */
5
6 #include "winbase.h"
7 #include "wingdi.h"
8 #include "winuser.h"
9 #include "winerror.h"
10 #include "debugtools.h"
11
12 DEFAULT_DEBUG_CHANNEL(relay);
13
14 /***********************************************************************
15  *              ChangeDialogTemplate16   (USER.905)
16  * FIXME: The prototypes of this function have not been found yet.
17  */
18 LONG WINAPI ChangeDialogTemplate16(void) { FIXME("stub (no prototype)\n"); return 0; }
19
20 /***********************************************************************
21  *              BiDiMessageBoxEx16   (USER.910)
22  * FIXME: The prototypes of this function have not been found yet.
23  */
24 LONG WINAPI BiDiMessageBoxEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
25
26
27 /******************************************************************************
28  *                    ChangeKeyboardCodePage16 [USER.924]
29  * Change the keyboard layouts to a new pair.
30  * If the language IDs are set to -1, the language is not to be changed.
31  */
32 DWORD WINAPI ChangeKeyboardCodePage16( UINT16 iLangLeft, UINT16 iLangRight )
33 {
34     FIXME( "( %hu, %hu ): stub\n", iLangLeft, iLangRight );
35     return 0;
36 }
37
38
39 /******************************************************************************
40  *                    ChangeKeyboardLanguage16 [USER.912]
41  * Change the keyboard layouts to a new pair.
42  *
43  * RETURNS
44  *    The old keyboard layout pair.
45  */
46 DWORD WINAPI ChangeKeyboardLanguage16( UINT16 iLangLeft, UINT iLangRight )
47 {
48     FIXME( "( %hu, %hu ): stub\n", iLangLeft, iLangRight );
49     return 0;
50 }
51
52
53 /******************************************************************************
54  *                    CreateDialogIndirectParamML16 [USER.916]
55  */
56 HWND16 WINAPI CreateDialogIndirectParamML16( HINSTANCE16 hinstWnd,
57                                              const void * lpvDlgTmp,
58                                              HWND16 hwndOwner,
59                                              DLGPROC16 dlgProc,
60                                              LPARAM lParamInit,
61                                              UINT16 iCodePage, UINT16 iLang,
62                                              LPCSTR lpDlgName,
63                                              HINSTANCE16 hinstLoad )
64 {
65     FIXME( "( %04hx, %p, %04hx, %p, %08lx, %hu, %hu, %p, %04hx ): stub\n",
66            hinstWnd, lpvDlgTmp, hwndOwner, dlgProc, lParamInit,
67            iCodePage, iLang, lpDlgName, hinstLoad );
68     return 0;
69 }
70
71
72 /******************************************************************************
73  *                    DialogBoxIndirectParamML16 [USER.916]
74  */
75 HWND16 WINAPI DialogBoxIndirectParamML16( HINSTANCE16 hinstWnd,
76                                           HGLOBAL16 hglbDlgTemp,
77                                           HWND16 hwndOwner,
78                                           DLGPROC16 dlgprc,
79                                           LPARAM lParamInit,
80                                           UINT16 iCodePage, UINT16 iLang,
81                                           LPCSTR lpDlgName,
82                                           HINSTANCE16 hinstLoad )
83 {
84     FIXME( "( %04hx, %04hx, %04hx, %p, %08lx, %hu, %hu, %p, %04hx ): stub\n",
85            hinstWnd, hglbDlgTemp, hwndOwner, dlgprc, lParamInit,
86            iCodePage, iLang, lpDlgName, hinstLoad );
87     return 0;
88 }
89
90
91
92 /******************************************************************************
93  *                    FindLanguageResource16 [USER.923]
94  */
95 HRSRC16 WINAPI FindLanguageResource16( HINSTANCE16 hinst, LPCSTR lpRes,
96                                        LPCSTR lpResType, UINT16 iLang )
97 {
98     FIXME( "( %04hx, %p, %p, %hu ): stub\n", hinst, lpRes, lpResType, iLang );
99     return 0;
100 }
101
102
103 /******************************************************************************
104  *                    GetAppCodePage16 [USER.915]
105  * Returns the code page and language of the window
106  *
107  * RETURNS
108  *    The low word contains the code page, the high word contains the resource language.
109  */
110 DWORD WINAPI GetAppCodePage16( HWND16 hwnd )
111 {
112     FIXME( "( %04hx ): stub\n", hwnd );
113     return 0;
114 }
115
116
117 /******************************************************************************
118  *                    GetBaseCodePage16 [USER.922]
119  * Returns the base code page and resource language.
120  * For example, Hebrew windows will return HebrewCodePage in the low word
121  * and English in the high word.
122  */
123 DWORD WINAPI GetBaseCodePage16( void )
124 {
125     FIXME( ": stub\n" );
126     return 0;
127 }
128
129
130
131 /******************************************************************************
132  *                    GetCodePageSystemFont16 [USER.913]
133  * Returns the stock font for the requested code page.
134  */
135 HFONT16 WINAPI GetCodePageSystemFont16( UINT16 iFont, UINT16 iCodePage )
136 {
137     FIXME( "( %hu, %hu ): stub\n", iFont, iCodePage );
138     return 0;
139 }
140
141
142
143 /******************************************************************************
144  *                    GetLanguageName16 [USER.906]
145  * Returns the name of one language in (possibly) a different language.
146  * Currently only handles language 0 (english).
147  *
148  * RETURNS
149  *    Success: The number of bytes copied to the buffer, not including the null.
150  *    Failure: 0
151  */
152 UINT WINAPI GetLanguageName16( UINT16 iLang, UINT16 iName,
153                                LPSTR lpszName, UINT16 cbBuffer )
154 {
155     if ( (iLang == 0) && (iName == 0) ) {
156         if ( !lpszName || cbBuffer < 8 ) {
157             SetLastError( ERROR_INVALID_PARAMETER );
158             return 0;
159         }
160         strcpy( lpszName, "English" );
161         return 7;
162     }
163
164     FIXME( "( %hu, %hu, %p, %hu ): No BiDi16\n", iLang, iName, lpszName, cbBuffer );
165     return 0;
166 }
167
168
169 /******************************************************************************
170  *                    GetNumLanguages16 [USER.906]
171  * Returns the number of languages in the system.
172  */
173 UINT WINAPI GetNumLanguages16( void )
174 {
175     FIXME( ": No Bidi16\n" );
176     return 1;
177 }
178
179
180
181 /******************************************************************************
182  *                    GetProcessDefaultLayout16 [USER.1001]
183  *
184  * Gets the default layout for parentless windows.
185  * Right now, just returns 0 (left-to-right).
186  *
187  * RETURNS
188  *    Success: Nonzero
189  *    Failure: Zero
190  */
191 BOOL16 WINAPI GetProcessDefaultLayout16( DWORD *pdwDefaultLayout )
192 {
193     FIXME( "( %p ): no BiDi16\n", pdwDefaultLayout );
194     return GetProcessDefaultLayout( pdwDefaultLayout );
195 }
196
197
198 /******************************************************************************
199  *                   LoadLanguageString16 [USER.919]
200  * Loads a string for a specific language.
201  *
202  * RETURNS
203  *    SUCCESS: The length of the string loaded.
204  *    FAILURE: Zero.
205  */
206 UINT16 WINAPI LoadLanguageString16( HINSTANCE16 hinst, UINT16 id, UINT16 iLang,
207                                     LPSTR lpszText, INT16 nBytes )
208 {
209     FIXME( "( %04hx, %hu, %hu, %p, %hd ): stub\n", hinst, id, iLang, lpszText, nBytes );
210     return 0;
211 }
212
213
214
215 /******************************************************************************
216  *                   LoadSystemLanguageString16 [USER.902]
217  * Loads a string which is in one of the system language modules.
218  *
219  * RETURNS
220  *    Success: The length of the string loaded
221  *    Failure: Zero
222  */
223 UINT WINAPI LoadSystemLanguageString16( HINSTANCE16 hinstCaller, UINT16 id,
224                                         LPSTR lpszText, INT16 nBytes, UINT16 iLang )
225 {
226     FIXME( "( %04hx, %hu, %p, %hd, %hu ): stub\n", hinstCaller, id, lpszText, nBytes, iLang );
227     return 0;
228 }
229
230
231 /***********************************************************************
232  *           MessageBoxEx16 [USER.930]
233  * The multilingual version of MessageBox.
234  */
235 INT16 WINAPI MessageBoxEx16( HWND16 hwndParent, LPCSTR lpszText,
236                              LPCSTR lpszTitle, UINT16 fuStyle, UINT16 iLang )
237 {
238     FIXME( "( %04hx, %p, %p, %hu, %hu ): stub\n", hwndParent, lpszText, lpszTitle,
239            fuStyle, iLang );
240     return 0;
241 }
242
243
244 /***********************************************************************
245  *           QueryCodePage16   [USER.914]
246  * Query code page specific data.
247  */
248 LRESULT WINAPI QueryCodePage16( UINT16 idxLang, UINT16 msg,
249                                 WPARAM16 wParam, LPARAM lParam )
250 {
251     FIXME( "( %hu, %hu, %04hx, %08lx ): stub\n", idxLang, msg, wParam, lParam );
252     return 0;
253 }
254
255 /***********************************************************************
256  *           SetAppCodePage16   [USER.920]
257  * Set the code page and language of the window to new values.
258  *
259  * RETURNS
260  *    The low word contains the old code page, the high word contains
261  *       the old resource language.
262  */
263 DWORD WINAPI SetAppCodePage16( HWND16 hwnd, UINT16 iCodePage, UINT16 iLang,
264                                UINT16 fRedraw )
265 {
266     FIXME( "( %04hx, %hu, %hu, %hu ): stub\n", hwnd, iCodePage, iLang, fRedraw );
267     return 0;
268 }
269
270 /***********************************************************************
271  *           SetDlgItemTextEx16   [USER.911]
272  * Sets the title or text of a control in a dialog box.
273  * Currently only works for language 0 (english)
274  */
275 void WINAPI SetDlgItemTextEx16( HWND16 hwnd, INT16 id,
276                                 LPCSTR lpszText, UINT16 iLang )
277 {
278     FIXME( "( %04hx, %hd, %p, %hu ): stub\n", hwnd, id, lpszText, iLang );
279 }
280
281 /******************************************************************************
282  *                    SetProcessDefaultLayout16 [USER.1000]
283  *
284  * Sets the default layout for parentless windows.
285  * Right now, only accepts 0 (left-to-right).
286  *
287  * RETURNS
288  *    Success: Nonzero
289  *    Failure: Zero
290  */
291 BOOL16 WINAPI SetProcessDefaultLayout16( DWORD dwDefaultLayout )
292 {
293     FIXME( "( %08lx ): No BiDi16\n", dwDefaultLayout );
294     return SetProcessDefaultLayout( dwDefaultLayout );
295 }
296
297 /******************************************************************************
298  *                    SetWindowTextEx16 [USER.909]
299  * Sets the given window's title to the specified text in the specified language.
300  */
301 void WINAPI SetWindowTextEx16( HWND16 hwnd, LPCSTR lpsz, UINT16 iLang )
302 {
303     FIXME( "( %04hx, %p, %hu ): stub\n", hwnd, lpsz, iLang );
304 }