source: trunk/src/user32/user32.cpp@ 962

Last change on this file since 962 was 962, checked in by dengert, 26 years ago

some more DC related functions

File size: 136.2 KB
Line 
1/* $Id: user32.cpp,v 1.26 1999-09-16 18:00:44 dengert Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21/*
22 CB:
23 - don't replace GDI functions (hdc), only convert window handle
24 - always use OSRECTL for PM functions
25 - POINT == POINTL
26*/
27
28#include <os2win.h>
29#include "misc.h"
30
31#include "user32.h"
32#include <winicon.h>
33#include "syscolor.h"
34
35#include <wchar.h>
36#include <stdlib.h>
37#include <string.h>
38#include <oslibwin.h>
39#include <win32wnd.h>
40
41//undocumented stuff
42// WIN32API CalcChildScroll
43// WIN32API CascadeChildWindows
44// WIN32API ClientThreadConnect
45// WIN32API DragObject
46// WIN32API DrawFrame
47// WIN32API EditWndProc
48// WIN32API EndTask
49// WIN32API GetInputDesktop
50// WIN32API GetNextQueueWindow
51// WIN32API GetShellWindow
52// WIN32API InitSharedTable
53// WIN32API InitTask
54// WIN32API IsHungThread
55// WIN32API LockWindowStation
56// WIN32API ModifyAccess
57// WIN32API PlaySoundEvent
58// WIN32API RegisterLogonProcess
59// WIN32API RegisterNetworkCapabilities
60// WIN32API RegisterSystemThread
61// WIN32API SetDeskWallpaper
62// WIN32API SetDesktopBitmap
63// WIN32API SetInternalWindowPos
64// WIN32API SetLogonNotifyWindow
65// WIN32API SetShellWindow
66// WIN32API SetSysColorsTemp
67// WIN32API SetWindowFullScreenState
68// WIN32API SwitchToThisWindow
69// WIN32API SysErrorBox
70// WIN32API TileChildWindows
71// WIN32API UnlockWindowStation
72// WIN32API UserClientDllInitialize
73// WIN32API UserSignalProc
74// WIN32API WinOldAppHackoMatic
75// WIN32API WNDPROC_CALLBACK
76// WIN32API YieldTask
77
78/* Coordinate Transformation */
79
80inline void OS2ToWin32ScreenPos(POINT *dest,POINT *source)
81{
82 dest->x = source->x;
83 dest->y = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN)-1-source->y;
84}
85
86inline void Win32ToOS2ScreenPos(POINT *dest,POINT *source)
87{
88 OS2ToWin32ScreenPos(dest,source); //transform back
89}
90
91/* Rectangle Functions - parts from wine/windows/rect.c */
92
93BOOL WIN32API CopyRect( PRECT lprcDst, const RECT * lprcSrc)
94{
95// ddprintf(("USER32: CopyRect\n"));
96 if (!lprcDst || !lprcSrc) {
97 SetLastError(ERROR_INVALID_PARAMETER);
98 return FALSE;
99 }
100
101 memcpy(lprcDst,lprcSrc,sizeof(RECT));
102
103 return TRUE;
104}
105//******************************************************************************
106//******************************************************************************
107BOOL WIN32API EqualRect( const RECT *lprc1, const RECT *lprc2)
108{
109#ifdef DEBUG
110 WriteLog("USER32: EqualRect\n");
111#endif
112 if (!lprc1 || !lprc2)
113 {
114 SetLastError(ERROR_INVALID_PARAMETER);
115 return FALSE;
116 }
117
118 return (lprc1->left == lprc2->left &&
119 lprc1->right == lprc2->right &&
120 lprc1->top == lprc2->top &&
121 lprc1->bottom == lprc2->bottom);
122}
123//******************************************************************************
124//******************************************************************************
125BOOL WIN32API InflateRect( PRECT lprc, int dx, int dy)
126{
127#ifdef DEBUG
128 WriteLog("USER32: InflateRect\n");
129#endif
130 if (!lprc)
131 {
132 SetLastError(ERROR_INVALID_PARAMETER);
133 return FALSE;
134 }
135
136 lprc->left -= dx;
137 lprc->right += dx;
138 lprc->top -= dy;
139 lprc->bottom += dy;
140
141 return TRUE;
142}
143//******************************************************************************
144//******************************************************************************
145BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2)
146{
147#ifdef DEBUG
148//// WriteLog("USER32: IntersectRect\n");
149#endif
150 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
151 {
152 SetLastError(ERROR_INVALID_PARAMETER);
153 return FALSE;
154 }
155
156 if (IsRectEmpty(lprcSrc1) || IsRectEmpty(lprcSrc2) ||
157 (lprcSrc1->left >= lprcSrc2->right) || (lprcSrc2->left >= lprcSrc1->right) ||
158 (lprcSrc1->top >= lprcSrc2->bottom) || (lprcSrc2->top >= lprcSrc1->bottom))
159 {
160 SetLastError(ERROR_INVALID_PARAMETER);
161 SetRectEmpty(lprcDst);
162 return FALSE;
163 }
164 lprcDst->left = MAX(lprcSrc1->left,lprcSrc2->left);
165 lprcDst->right = MIN(lprcSrc1->right,lprcSrc2->right);
166 lprcDst->top = MAX(lprcSrc1->top,lprcSrc2->top);
167 lprcDst->bottom = MIN(lprcSrc1->bottom,lprcSrc2->bottom);
168
169 return TRUE;
170}
171//******************************************************************************
172//******************************************************************************
173BOOL WIN32API IsRectEmpty( const RECT * lprc)
174{
175 if (!lprc)
176 {
177 SetLastError(ERROR_INVALID_PARAMETER);
178 return FALSE;
179 }
180
181 return (lprc->left == lprc->right || lprc->top == lprc->bottom);
182}
183//******************************************************************************
184//******************************************************************************
185BOOL WIN32API OffsetRect( PRECT lprc, int x, int y)
186{
187#ifdef DEBUG
188//// WriteLog("USER32: OffsetRect\n");
189#endif
190 if (!lprc)
191 {
192 SetLastError(ERROR_INVALID_PARAMETER);
193 return FALSE;
194 }
195
196 lprc->left += x;
197 lprc->right += x;
198 lprc->top += y;
199 lprc->bottom += y;
200
201 return TRUE;
202}
203//******************************************************************************
204//******************************************************************************
205BOOL WIN32API PtInRect( const RECT *lprc, POINT pt)
206{
207#ifdef DEBUG1
208 WriteLog("USER32: PtInRect\n");
209#endif
210 if (!lprc)
211 {
212 SetLastError(ERROR_INVALID_PARAMETER);
213 return FALSE;
214 }
215
216 return (pt.x >= lprc->left &&
217 pt.x < lprc->right &&
218 pt.y >= lprc->top &&
219 pt.y < lprc->bottom);
220}
221//******************************************************************************
222//******************************************************************************
223BOOL WIN32API SetRect( PRECT lprc, int nLeft, int nTop, int nRight, int nBottom)
224{
225 if (!lprc)
226 {
227 SetLastError(ERROR_INVALID_PARAMETER);
228 return FALSE;
229 }
230
231 lprc->left = nLeft;
232 lprc->top = nTop;
233 lprc->right = nRight;
234 lprc->bottom = nBottom;
235
236 return TRUE;
237}
238//******************************************************************************
239//******************************************************************************
240BOOL WIN32API SetRectEmpty( PRECT lprc)
241{
242 if (!lprc)
243 {
244 SetLastError(ERROR_INVALID_PARAMETER);
245 return FALSE;
246 }
247
248 lprc->left = lprc->right = lprc->top = lprc->bottom = 0;
249
250 return TRUE;
251}
252//******************************************************************************
253//******************************************************************************
254BOOL WIN32API SubtractRect( PRECT lprcDest, const RECT * lprcSrc1, const RECT * lprcSrc2)
255{
256#ifdef DEBUG
257 WriteLog("USER32: SubtractRect");
258#endif
259 RECT tmp;
260
261 if (!lprcDest || !lprcSrc1 || !lprcSrc2)
262 {
263 SetLastError(ERROR_INVALID_PARAMETER);
264 return FALSE;
265 }
266
267 if (IsRectEmpty(lprcSrc1))
268 {
269 SetLastError(ERROR_INVALID_PARAMETER);
270 SetRectEmpty(lprcDest);
271 return FALSE;
272 }
273 *lprcDest = *lprcSrc1;
274 if (IntersectRect(&tmp,lprcSrc1,lprcSrc2))
275 {
276 if (EqualRect(&tmp,lprcDest))
277 {
278 SetRectEmpty(lprcDest);
279 return FALSE;
280 }
281 if ((tmp.top == lprcDest->top) && (tmp.bottom == lprcDest->bottom))
282 {
283 if (tmp.left == lprcDest->left) lprcDest->left = tmp.right;
284 else if (tmp.right == lprcDest->right) lprcDest->right = tmp.left;
285 }
286 else if ((tmp.left == lprcDest->left) && (tmp.right == lprcDest->right))
287 {
288 if (tmp.top == lprcDest->top) lprcDest->top = tmp.bottom;
289 else if (tmp.bottom == lprcDest->bottom) lprcDest->bottom = tmp.top;
290 }
291 }
292
293 return TRUE;
294}
295//******************************************************************************
296//******************************************************************************
297BOOL WIN32API UnionRect( PRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2)
298{
299#ifdef DEBUG
300 WriteLog("USER32: UnionRect\n");
301#endif
302 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
303 {
304 SetLastError(ERROR_INVALID_PARAMETER);
305 return FALSE;
306 }
307
308 if (IsRectEmpty(lprcSrc1))
309 {
310 if (IsRectEmpty(lprcSrc2))
311 {
312 SetLastError(ERROR_INVALID_PARAMETER);
313 SetRectEmpty(lprcDst);
314 return FALSE;
315 }
316 else *lprcDst = *lprcSrc2;
317 }
318 else
319 {
320 if (IsRectEmpty(lprcSrc2)) *lprcDst = *lprcSrc1;
321 else
322 {
323 lprcDst->left = MIN(lprcSrc1->left,lprcSrc2->left);
324 lprcDst->right = MAX(lprcSrc1->right,lprcSrc2->right);
325 lprcDst->top = MIN(lprcSrc1->top,lprcSrc2->top);
326 lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom);
327 }
328 }
329
330 return TRUE;
331}
332
333/* String Manipulating Functions */
334
335int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
336{
337 int rc;
338 va_list argptr;
339
340#ifdef DEBUG
341 WriteLog("USER32: wsprintfA\n");
342 WriteLog("USER32: %s\n", lpFmt);
343#endif
344 va_start(argptr, lpFmt);
345 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
346 va_end(argptr);
347#ifdef DEBUG
348 WriteLog("USER32: %s\n", lpOut);
349#endif
350 return(rc);
351}
352//******************************************************************************
353//******************************************************************************
354int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
355{
356 int rc;
357 char *lpFmtA;
358 char szOut[512];
359 va_list argptr;
360
361 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
362 lpOut,
363 lpFmt));
364
365 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
366
367 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
368 {
369 PCHAR pszTemp;
370 PCHAR pszTemp1;
371 ULONG ulStrings;
372 ULONG ulIndex; /* temporary string counter */
373
374 for (ulStrings = 0, /* determine number of placeholders */
375 pszTemp = lpFmtA;
376
377 (pszTemp != NULL) &&
378 (*pszTemp != 0);
379
380 ulStrings++)
381 {
382 pszTemp = strstr(pszTemp,
383 "%s");
384 if (pszTemp != NULL) /* skip 2 characters */
385 {
386 pszTemp++;
387 pszTemp++;
388 }
389 else
390 break; /* leave loop immediately */
391 }
392
393 if (ulStrings != 0) /* transformation required ? */
394 {
395 /* now reallocate lpFmt */
396 ulStrings += strlen(lpFmtA); /* calculate total string length */
397 pszTemp = lpFmtA; /* save string pointer */
398 pszTemp1 = lpFmtA; /* save string pointer */
399
400 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
401 lpFmtA = (char *)malloc(ulStrings + 1);
402 if (lpFmtA == NULL) /* check proper allocation */
403 return (0); /* raise error condition */
404
405 for (ulIndex = 0;
406 ulIndex <= ulStrings;
407 ulIndex++,
408 pszTemp++)
409 {
410 if ((pszTemp[0] == '%') &&
411 (pszTemp[1] == 's') )
412 {
413 /* replace %s by %ls */
414 lpFmtA[ulIndex++] = '%';
415 lpFmtA[ulIndex ] = 'l';
416 lpFmtA[ulIndex+1] = 's';
417 }
418 else
419 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
420 }
421
422 lpFmtA[ulStrings] = 0; /* string termination */
423
424 FreeAsciiString(pszTemp1); /* the original string is obsolete */
425 }
426 }
427
428 dprintf(("USER32: wsprintfW (%s).\n",
429 lpFmt));
430
431 va_start(argptr,
432 lpFmt);
433
434 rc = O32_wvsprintf(szOut,
435 lpFmtA,
436 argptr);
437
438 AsciiToUnicode(szOut,
439 lpOut);
440
441 FreeAsciiString(lpFmtA);
442 return(rc);
443}
444//******************************************************************************
445//******************************************************************************
446BOOL WIN32API MessageBeep( UINT uType)
447{
448 INT flStyle;
449
450#ifdef DEBUG
451 WriteLog("USER32: MessageBeep\n");
452#endif
453
454 switch (uType)
455 {
456 case 0xFFFFFFFF:
457 OSLibDosBeep(500,50);
458 return TRUE;
459 case MB_ICONASTERISK:
460 flStyle = WAOS_NOTE;
461 break;
462 case MB_ICONEXCLAMATION:
463 flStyle = WAOS_WARNING;
464 break;
465 case MB_ICONHAND:
466 case MB_ICONQUESTION:
467 case MB_OK:
468 flStyle = WAOS_NOTE;
469 break;
470 default:
471 flStyle = WAOS_ERROR; //CB: should be right
472 break;
473 }
474 return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle);
475}
476//******************************************************************************
477//******************************************************************************
478int WIN32API GetSystemMetrics(int nIndex)
479{
480 int rc = 0;
481
482 switch(nIndex) {
483 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
484 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXICON);
485 //CB: return standard windows icon size?
486 //rc = 32;
487 break;
488 case SM_CYICONSPACING:
489 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYICON);
490 //read SM_CXICONSPACING comment
491 //rc = 32;
492 break;
493 case SM_PENWINDOWS:
494 rc = FALSE;
495 break;
496 case SM_DBCSENABLED:
497 rc = FALSE;
498 break;
499 case SM_CXEDGE: //size of 3D window edge (not supported)
500 rc = 1;
501 break;
502 case SM_CYEDGE:
503 rc = 1;
504 break;
505 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
506 //CB: replace with const
507 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
508 break;
509 case SM_CYMINSPACING:
510 //CB: replace with const
511 rc = GetSystemMetrics(SM_CYMINIMIZED);
512 break;
513 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
514 rc = 16;
515 break;
516 case SM_CYSMICON:
517 rc = 16;
518 break;
519 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
520 rc = 8;
521 break;
522 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
523 rc = 16;
524 break;
525 case SM_CYSMSIZE:
526 rc = 16;
527 break;
528 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
529 rc = 16;
530 break;
531 case SM_CYMENUSIZE:
532 rc = 16;
533 break;
534 case SM_ARRANGE:
535 rc = ARW_BOTTOMLEFT | ARW_LEFT;
536 break;
537 case SM_CXMINIMIZED:
538 break;
539 case SM_CYMINIMIZED:
540 break;
541 case SM_CXMAXTRACK: //max window size
542 case SM_CXMAXIMIZED: //max toplevel window size
543 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
544 break;
545 case SM_CYMAXTRACK:
546 case SM_CYMAXIMIZED:
547 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
548 break;
549 case SM_NETWORK:
550 rc = 0x01; //TODO: default = yes
551 break;
552 case SM_CLEANBOOT:
553 rc = 0; //normal boot
554 break;
555 case SM_CXDRAG: //nr of pixels before drag becomes a real one
556 rc = 2;
557 break;
558 case SM_CYDRAG:
559 rc = 2;
560 break;
561 case SM_SHOWSOUNDS: //show instead of play sound
562 rc = FALSE;
563 break;
564 case SM_CXMENUCHECK:
565 rc = 4; //TODO
566 break;
567 case SM_CYMENUCHECK:
568 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYMENU);
569 break;
570 case SM_SLOWMACHINE:
571 rc = FALSE; //even a slow machine is fast with OS/2 :)
572 break;
573 case SM_MIDEASTENABLED:
574 rc = FALSE;
575 break;
576 case SM_CMETRICS:
577 //CB: replace with const
578 rc = O32_GetSystemMetrics(44); //Open32 changed this one
579 break;
580 default:
581 //better than nothing
582 rc = O32_GetSystemMetrics(nIndex);
583 break;
584 }
585#ifdef DEBUG
586 WriteLog("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc);
587#endif
588 return(rc);
589}
590//******************************************************************************
591//******************************************************************************
592UINT WIN32API SetTimer( HWND hwnd, UINT idTimer, UINT uTimeout, TIMERPROC tmprc)
593{
594#ifdef DEBUG
595 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
596#endif
597 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
598 //SvL: Write callback handler class for this one
599 //CB: replace
600 return O32_SetTimer(hwnd,idTimer,uTimeout,(TIMERPROC_O32)tmprc);
601}
602//******************************************************************************
603//******************************************************************************
604BOOL WIN32API KillTimer(HWND hWnd, UINT uIDEvent)
605{
606#ifdef DEBUG
607 WriteLog("USER32: KillTimer\n");
608#endif
609 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
610 //WinStopTimer
611 //CB: replace
612 return O32_KillTimer(hWnd,uIDEvent);
613}
614//******************************************************************************
615//******************************************************************************
616//******************************************************************************
617//TODO:How can we emulate this one in OS/2???
618//******************************************************************************
619DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
620{
621#ifdef DEBUG
622 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
623#endif
624
625 if(dwTimeOut == INFINITE) return(0);
626
627// DosSleep(dwTimeOut/16);
628 return(0);
629}
630//******************************************************************************
631//******************************************************************************
632int WIN32API ShowCursor( BOOL arg1)
633{
634#ifdef DEBUG
635 WriteLog("USER32: ShowCursor\n");
636#endif
637 //WinShowCursor(OSLIB_HWND_DESKTOP,arg1); //CB: not the same
638 return O32_ShowCursor(arg1);
639}
640//******************************************************************************
641//******************************************************************************
642BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
643{
644#ifdef DEBUG
645 WriteLog("USER32: WinHelp not implemented %s\n", lpszHelp);
646#endif
647// hwnd = Win32Window::Win32ToOS2Handle(hwnd);
648// return O32_WinHelp(arg1, arg2, arg3, arg4);
649
650 return(TRUE);
651}
652//******************************************************************************
653//SvL: 24-6-'97 - Added
654//******************************************************************************
655BOOL WIN32API ClipCursor(const RECT * lpRect)
656{
657#ifdef DEBUG
658 WriteLog("USER32: ClipCursor\n");
659#endif
660 //CB: how to replace?
661 return O32_ClipCursor(lpRect);
662}
663//******************************************************************************
664//SvL: 24-6-'97 - Added
665//TODO: Not implemented
666//******************************************************************************
667WORD WIN32API GetAsyncKeyState(INT nVirtKey)
668{
669#ifdef DEBUG
670//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
671#endif
672 return 0;
673}
674//******************************************************************************
675//SvL: 24-6-'97 - Added
676//******************************************************************************
677HCURSOR WIN32API GetCursor(void)
678{
679#ifdef DEBUG
680//// WriteLog("USER32: GetCursor\n");
681#endif
682 return O32_GetCursor();
683}
684//******************************************************************************
685//SvL: 24-6-'97 - Added
686//******************************************************************************
687BOOL WIN32API GetCursorPos( PPOINT lpPoint)
688{
689 BOOL rc;
690 POINT point;
691#ifdef DEBUG
692//// WriteLog("USER32: GetCursorPos\n");
693#endif
694 if (!lpPoint) return FALSE;
695 if (OSLibWinQueryPointerPos(OSLIB_HWND_DESKTOP,&point)) //POINT == POINTL
696 {
697 OS2ToWin32ScreenPos(lpPoint,&point);
698 return TRUE;
699 } else return FALSE;
700}
701//******************************************************************************
702//SvL: 24-6-'97 - Added
703//******************************************************************************
704WORD WIN32API VkKeyScanA( char ch)
705{
706#ifdef DEBUG
707 WriteLog("USER32: VkKeyScanA\n");
708#endif
709 return O32_VkKeyScan(ch);
710}
711//******************************************************************************
712//SvL: 24-6-'97 - Added
713//******************************************************************************
714SHORT WIN32API GetKeyState( int nVirtKey)
715{
716#ifdef DEBUG
717 WriteLog("USER32: GetKeyState %d\n", nVirtKey);
718#endif
719 return O32_GetKeyState(nVirtKey);
720}
721//******************************************************************************
722//******************************************************************************
723HCURSOR WIN32API SetCursor( HCURSOR hcur)
724{
725#ifdef DEBUG
726 WriteLog("USER32: SetCursor\n");
727#endif
728 return O32_SetCursor(hcur);
729}
730//******************************************************************************
731//******************************************************************************
732BOOL WIN32API SetCursorPos( int arg1, int arg2)
733{
734#ifdef DEBUG
735 WriteLog("USER32: SetCursorPos\n");
736#endif
737//CB:{a} stopped here
738 return O32_SetCursorPos(arg1, arg2);
739}
740//******************************************************************************
741//******************************************************************************
742HWND WIN32API SetCapture( HWND arg1)
743{
744#ifdef DEBUG
745 WriteLog("USER32: SetCapture\n");
746#endif
747 return O32_SetCapture(arg1);
748}
749//******************************************************************************
750//******************************************************************************
751BOOL WIN32API ReleaseCapture(void)
752{
753#ifdef DEBUG
754 WriteLog("USER32: ReleaseCapture\n");
755#endif
756 return O32_ReleaseCapture();
757}
758//******************************************************************************
759//******************************************************************************
760DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
761{
762#ifdef DEBUG
763 WriteLog("USER32: MsgWaitForMultipleObjects\n");
764#endif
765 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
766}
767//******************************************************************************
768//******************************************************************************
769BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
770{
771#ifdef DEBUG
772 WriteLog("USER32: CheckRadioButton\n");
773#endif
774 //CB: check radio buttons in interval
775 if (arg2 > arg3) return (FALSE);
776 for (UINT x=arg2;x <= arg3;x++)
777 {
778 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
779 }
780 return (TRUE);
781}
782//******************************************************************************
783//******************************************************************************
784BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
785{
786#ifdef DEBUG
787 WriteLog("USER32: CreateCaret\n");
788#endif
789 return O32_CreateCaret(arg1, arg2, arg3, arg4);
790}
791//******************************************************************************
792//******************************************************************************
793HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
794{
795#ifdef DEBUG
796 WriteLog("USER32: CreateCursor\n");
797#endif
798 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
799}
800//******************************************************************************
801//******************************************************************************
802//******************************************************************************
803//******************************************************************************
804BOOL WIN32API DestroyCaret(void)
805{
806#ifdef DEBUG
807 WriteLog("USER32: DestroyCaret\n");
808#endif
809 return O32_DestroyCaret();
810}
811//******************************************************************************
812//******************************************************************************
813BOOL WIN32API DestroyCursor( HCURSOR arg1)
814{
815#ifdef DEBUG
816 WriteLog("USER32: DestroyCursor\n");
817#endif
818 return O32_DestroyCursor(arg1);
819}
820//******************************************************************************
821//******************************************************************************
822BOOL WIN32API EndDeferWindowPos( HDWP arg1)
823{
824#ifdef DEBUG
825 WriteLog("USER32: EndDeferWindowPos\n");
826#endif
827 return O32_EndDeferWindowPos(arg1);
828}
829//******************************************************************************
830//******************************************************************************
831INT WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
832{
833#ifdef DEBUG
834 WriteLog("USER32: ExcludeUpdateRgn\n");
835#endif
836 return O32_ExcludeUpdateRgn(arg1, arg2);
837}
838//******************************************************************************
839//******************************************************************************
840BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
841{
842#ifdef DEBUG
843 WriteLog("USER32: ExitWindowsEx\n");
844#endif
845 return O32_ExitWindowsEx(arg1, arg2);
846}
847//******************************************************************************
848//******************************************************************************
849int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
850{
851#ifdef DEBUG
852 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
853#endif
854 return O32_FillRect(arg1, arg2, arg3);
855}
856//******************************************************************************
857//******************************************************************************
858HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
859{
860 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
861 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
862 HWND rc;
863
864#ifdef DEBUG
865 WriteLog("USER32: FindWindowW\n");
866#endif
867 rc = O32_FindWindow(astring1, astring2);
868 FreeAsciiString(astring1);
869 FreeAsciiString(astring2);
870 return rc;
871}
872//******************************************************************************
873//******************************************************************************
874int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
875{
876#ifdef DEBUG
877 WriteLog("USER32: FrameRect\n");
878#endif
879 return O32_FrameRect(arg1, arg2, arg3);
880}
881//******************************************************************************
882//******************************************************************************
883HWND WIN32API GetCapture(void)
884{
885#ifdef DEBUG
886 WriteLog("USER32: GetCapture\n");
887#endif
888 return O32_GetCapture();
889}
890//******************************************************************************
891//******************************************************************************
892UINT WIN32API GetCaretBlinkTime(void)
893{
894#ifdef DEBUG
895 WriteLog("USER32: GetCaretBlinkTime\n");
896#endif
897 return O32_GetCaretBlinkTime();
898}
899//******************************************************************************
900//******************************************************************************
901BOOL WIN32API GetCaretPos( PPOINT arg1)
902{
903#ifdef DEBUG
904 WriteLog("USER32: GetCaretPos\n");
905#endif
906 return O32_GetCaretPos(arg1);
907}
908//******************************************************************************
909//******************************************************************************
910BOOL WIN32API GetClipCursor( PRECT arg1)
911{
912#ifdef DEBUG
913 WriteLog("USER32: GetClipCursor\n");
914#endif
915 return O32_GetClipCursor(arg1);
916}
917//******************************************************************************
918//******************************************************************************
919UINT WIN32API GetDoubleClickTime(void)
920{
921#ifdef DEBUG
922 WriteLog("USER32: GetDoubleClickTime\n");
923#endif
924 return O32_GetDoubleClickTime();
925}
926//******************************************************************************
927//******************************************************************************
928HWND WIN32API GetForegroundWindow(void)
929{
930#ifdef DEBUG
931 WriteLog("USER32: GetForegroundWindow\n");
932#endif
933 return O32_GetForegroundWindow();
934}
935//******************************************************************************
936//******************************************************************************
937int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
938{
939#ifdef DEBUG
940 WriteLog("USER32: GetKeyNameTextA\n");
941#endif
942 return O32_GetKeyNameText(arg1, arg2, arg3);
943}
944//******************************************************************************
945//******************************************************************************
946int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
947{
948#ifdef DEBUG
949 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
950#endif
951 // NOTE: This will not work as is (needs UNICODE support)
952 return 0;
953// return O32_GetKeyNameText(arg1, arg2, arg3);
954}
955//******************************************************************************
956//******************************************************************************
957int WIN32API GetKeyboardType( int arg1)
958{
959#ifdef DEBUG
960 WriteLog("USER32: GetKeyboardType\n");
961#endif
962 return O32_GetKeyboardType(arg1);
963}
964//******************************************************************************
965//******************************************************************************
966HWND WIN32API GetLastActivePopup( HWND arg1)
967{
968#ifdef DEBUG
969 WriteLog("USER32: GetLastActivePopup\n");
970#endif
971 return O32_GetLastActivePopup(arg1);
972}
973//******************************************************************************
974//******************************************************************************
975//******************************************************************************
976//******************************************************************************
977DWORD WIN32API GetQueueStatus( UINT arg1)
978{
979#ifdef DEBUG
980 WriteLog("USER32: GetQueueStatus\n");
981#endif
982 return O32_GetQueueStatus(arg1);
983}
984//******************************************************************************
985//******************************************************************************
986DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
987{
988#ifdef DEBUG
989 WriteLog("USER32: GetTabbedTextExtentA\n");
990#endif
991 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
992}
993//******************************************************************************
994//******************************************************************************
995DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
996{
997 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
998 DWORD rc;
999
1000#ifdef DEBUG
1001 WriteLog("USER32: GetTabbedTextExtentW\n");
1002#endif
1003 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
1004 FreeAsciiString(astring);
1005 return rc;
1006}
1007//******************************************************************************
1008//******************************************************************************
1009#if 0
1010int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
1011{
1012#ifdef DEBUG
1013 WriteLog("USER32: GetUpdateRgn\n");
1014#endif
1015 return O32_GetUpdateRgn(arg1, arg2, arg3);
1016}
1017#endif
1018//******************************************************************************
1019
1020
1021//******************************************************************************
1022//******************************************************************************
1023//******************************************************************************
1024DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
1025{
1026#ifdef DEBUG
1027 WriteLog("USER32: GetWindowThreadProcessId\n");
1028#endif
1029 return O32_GetWindowThreadProcessId(arg1, arg2);
1030}
1031//******************************************************************************
1032//******************************************************************************
1033BOOL WIN32API HideCaret( HWND arg1)
1034{
1035#ifdef DEBUG
1036 WriteLog("USER32: HideCaret\n");
1037#endif
1038 return O32_HideCaret(arg1);
1039}
1040//******************************************************************************
1041//******************************************************************************
1042#if 0
1043BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
1044{
1045#ifdef DEBUG
1046 WriteLog("USER32: InvalidateRgn\n");
1047#endif
1048 return O32_InvalidateRgn(arg1, arg2, arg3);
1049}
1050#endif
1051//******************************************************************************
1052//******************************************************************************
1053BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
1054{
1055#ifdef DEBUG
1056 WriteLog("USER32: InvertRect\n");
1057#endif
1058 return O32_InvertRect(arg1, arg2);
1059}
1060//******************************************************************************
1061//******************************************************************************
1062BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
1063{
1064#ifdef DEBUG
1065 WriteLog("USER32: MapDialogRect\n");
1066#endif
1067 return O32_MapDialogRect(arg1, arg2);
1068}
1069//******************************************************************************
1070//******************************************************************************
1071UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
1072{
1073#ifdef DEBUG
1074 WriteLog("USER32: MapVirtualKeyA\n");
1075#endif
1076 return O32_MapVirtualKey(arg1, arg2);
1077}
1078//******************************************************************************
1079//******************************************************************************
1080UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
1081{
1082#ifdef DEBUG
1083 WriteLog("USER32: MapVirtualKeyW\n");
1084#endif
1085 // NOTE: This will not work as is (needs UNICODE support)
1086 return O32_MapVirtualKey(arg1, arg2);
1087}
1088//******************************************************************************
1089//******************************************************************************
1090int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
1091{
1092#ifdef DEBUG
1093 WriteLog("USER32: MapWindowPoints\n");
1094#endif
1095 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
1096}
1097//******************************************************************************
1098//******************************************************************************
1099BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
1100{
1101#ifdef DEBUG
1102 WriteLog("USER32: ScreenToClient\n");
1103#endif
1104 return O32_ScreenToClient(arg1, arg2);
1105}
1106//******************************************************************************
1107//******************************************************************************
1108BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
1109{
1110#ifdef DEBUG
1111 WriteLog("USER32: ScrollDC\n");
1112#endif
1113 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1114}
1115//******************************************************************************
1116//******************************************************************************
1117BOOL WIN32API SetCaretBlinkTime( UINT arg1)
1118{
1119#ifdef DEBUG
1120 WriteLog("USER32: SetCaretBlinkTime\n");
1121#endif
1122 return O32_SetCaretBlinkTime(arg1);
1123}
1124//******************************************************************************
1125//******************************************************************************
1126BOOL WIN32API SetCaretPos( int arg1, int arg2)
1127{
1128 dprintf(("USER32: SetCaretPos\n"));
1129 return O32_SetCaretPos(arg1, arg2);
1130}
1131//******************************************************************************
1132//******************************************************************************
1133BOOL WIN32API SetDoubleClickTime( UINT arg1)
1134{
1135#ifdef DEBUG
1136 WriteLog("USER32: SetDoubleClickTime\n");
1137#endif
1138 return O32_SetDoubleClickTime(arg1);
1139}
1140//******************************************************************************
1141//******************************************************************************
1142BOOL WIN32API ShowCaret( HWND arg1)
1143{
1144 dprintf(("USER32: ShowCaret\n"));
1145 return O32_ShowCaret(arg1);
1146}
1147//******************************************************************************
1148//******************************************************************************
1149BOOL WIN32API SwapMouseButton( BOOL arg1)
1150{
1151#ifdef DEBUG
1152 WriteLog("USER32: SwapMouseButton\n");
1153#endif
1154 return O32_SwapMouseButton(arg1);
1155}
1156//******************************************************************************
1157/* Not support by Open32 (not included are the new win9x parameters):
1158 case SPI_GETFASTTASKSWITCH:
1159 case SPI_GETGRIDGRANULARITY:
1160 case SPI_GETICONTITLELOGFONT:
1161 case SPI_GETICONTITLEWRAP:
1162 case SPI_GETMENUDROPALIGNMENT:
1163 case SPI_ICONHORIZONTALSPACING:
1164 case SPI_ICONVERTICALSPACING:
1165 case SPI_LANGDRIVER:
1166 case SPI_SETFASTTASKSWITCH:
1167 case SPI_SETGRIDGRANULARITY:
1168 case SPI_SETICONTITLELOGFONT:
1169 case SPI_SETICONTITLEWRAP:
1170 case SPI_SETMENUDROPALIGNMENT:
1171 case SPI_GETSCREENSAVEACTIVE:
1172 case SPI_GETSCREENSAVETIMEOUT:
1173 case SPI_SETDESKPATTERN:
1174 case SPI_SETDESKWALLPAPER:
1175 case SPI_SETSCREENSAVEACTIVE:
1176 case SPI_SETSCREENSAVETIMEOUT:
1177*/
1178//******************************************************************************
1179BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
1180{
1181 BOOL rc = TRUE;
1182 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
1183
1184 switch(uiAction) {
1185 case SPI_SCREENSAVERRUNNING:
1186 *(BOOL *)pvParam = FALSE;
1187 break;
1188 case SPI_GETDRAGFULLWINDOWS:
1189 *(BOOL *)pvParam = FALSE;
1190 break;
1191 case SPI_GETNONCLIENTMETRICS:
1192 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
1193 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
1194 //CB: font info not valid, needs improvements
1195 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
1196 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
1197 //CB: experimental change for statusbar (and tooltips)
1198
1199 //O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
1200 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
1201 cmetric->lfStatusFont.lfHeight = 9;
1202
1203 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
1204 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
1205 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
1206 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
1207 cmetric->iCaptionWidth = 32; //TODO
1208 cmetric->iCaptionHeight = 16; //TODO
1209 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
1210 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
1211 cmetric->iMenuWidth = 32; //TODO
1212 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
1213 break;
1214 case SPI_GETICONTITLELOGFONT:
1215 {
1216 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
1217
1218 /* from now on we always have an alias for MS Sans Serif */
1219 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
1220 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
1221 lpLogFont->lfWidth = 0;
1222 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
1223 lpLogFont->lfWeight = FW_NORMAL;
1224 lpLogFont->lfItalic = FALSE;
1225 lpLogFont->lfStrikeOut = FALSE;
1226 lpLogFont->lfUnderline = FALSE;
1227 lpLogFont->lfCharSet = ANSI_CHARSET;
1228 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1229 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1230 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1231 break;
1232 }
1233 case SPI_GETBORDER:
1234 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
1235 break;
1236
1237 case SPI_GETWORKAREA:
1238 SetRect( (RECT *)pvParam, 0, 0,
1239 GetSystemMetrics( SM_CXSCREEN ),
1240 GetSystemMetrics( SM_CYSCREEN )
1241 );
1242 break;
1243
1244 case 104: //TODO: Undocumented
1245 rc = 16;
1246 break;
1247 default:
1248 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
1249 break;
1250 }
1251#ifdef DEBUG
1252 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
1253#endif
1254 return(rc);
1255}
1256//******************************************************************************
1257//TODO: Check for more options that have different structs for Unicode!!!!
1258//******************************************************************************
1259BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
1260{
1261 BOOL rc;
1262 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
1263 NONCLIENTMETRICSA clientMetricsA = {0};
1264 PVOID pvParamA;
1265 UINT uiParamA;
1266
1267 switch(uiAction) {
1268 case SPI_SETNONCLIENTMETRICS:
1269 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
1270 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
1271 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
1272 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
1273 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
1274 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
1275 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
1276 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
1277 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
1278 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
1279 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
1280 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
1281 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
1282 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
1283 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
1284 //no break
1285 case SPI_GETNONCLIENTMETRICS:
1286 uiParamA = sizeof(NONCLIENTMETRICSA);
1287 pvParamA = &clientMetricsA;
1288 break;
1289 case SPI_GETICONTITLELOGFONT:
1290 {
1291 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
1292
1293 /* from now on we always have an alias for MS Sans Serif */
1294 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
1295 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
1296 lpLogFont->lfWidth = 0;
1297 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
1298 lpLogFont->lfWeight = FW_NORMAL;
1299 lpLogFont->lfItalic = FALSE;
1300 lpLogFont->lfStrikeOut = FALSE;
1301 lpLogFont->lfUnderline = FALSE;
1302 lpLogFont->lfCharSet = ANSI_CHARSET;
1303 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1304 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1305 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1306 return TRUE;
1307 }
1308 default:
1309 pvParamA = pvParam;
1310 uiParamA = uiParam;
1311 break;
1312 }
1313 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1314
1315 switch(uiAction) {
1316 case SPI_GETNONCLIENTMETRICS:
1317 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1318 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1319 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1320 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1321 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1322 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1323 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1324
1325 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1326 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1327 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1328
1329 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1330 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1331 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1332 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1333 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1334 break;
1335 }
1336#ifdef DEBUG
1337 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
1338#endif
1339 return(rc);
1340}
1341//******************************************************************************
1342//******************************************************************************
1343LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
1344{
1345#ifdef DEBUG
1346 WriteLog("USER32: TabbedTextOutA\n");
1347#endif
1348 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1349}
1350//******************************************************************************
1351//******************************************************************************
1352LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
1353{
1354 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
1355 LONG rc;
1356
1357#ifdef DEBUG
1358 WriteLog("USER32: TabbedTextOutW\n");
1359#endif
1360 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
1361 FreeAsciiString(astring);
1362 return rc;
1363}
1364//******************************************************************************
1365//******************************************************************************
1366BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
1367{
1368#ifdef DEBUG
1369 WriteLog("USER32: ValidateRect\n");
1370#endif
1371 return O32_ValidateRect(arg1, arg2);
1372}
1373//******************************************************************************
1374//******************************************************************************
1375BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
1376{
1377#ifdef DEBUG
1378 WriteLog("USER32: ValidateRgn\n");
1379#endif
1380 return O32_ValidateRgn(arg1, arg2);
1381}
1382//******************************************************************************
1383//******************************************************************************
1384WORD WIN32API VkKeyScanW( WCHAR arg1)
1385{
1386#ifdef DEBUG
1387 WriteLog("USER32: VkKeyScanW\n");
1388#endif
1389 // NOTE: This will not work as is (needs UNICODE support)
1390 return O32_VkKeyScan((char)arg1);
1391}
1392//******************************************************************************
1393//******************************************************************************
1394BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
1395{
1396 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1397 BOOL rc;
1398
1399#ifdef DEBUG
1400 WriteLog("USER32: WinHelpW\n");
1401#endif
1402 rc = WinHelpA(arg1, astring, arg3, arg4);
1403 FreeAsciiString(astring);
1404 return rc;
1405}
1406//******************************************************************************
1407//******************************************************************************
1408int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
1409{
1410#ifdef DEBUG
1411 WriteLog("USER32: wvsprintfA\n");
1412#endif
1413 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
1414}
1415//******************************************************************************
1416//******************************************************************************
1417int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
1418{
1419 int rc;
1420 char szOut[256];
1421 char *lpFmtA;
1422
1423 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
1424#ifdef DEBUG
1425 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
1426 WriteLog("USER32: %s\n", lpFmt);
1427#endif
1428 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
1429
1430 AsciiToUnicode(szOut, lpOut);
1431#ifdef DEBUG
1432 WriteLog("USER32: %s\n", lpOut);
1433#endif
1434 FreeAsciiString(lpFmtA);
1435 return(rc);
1436}
1437//******************************************************************************
1438//TODO: Not complete
1439//******************************************************************************
1440BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1441 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1442 int nHeight)
1443{
1444 BOOL rc;
1445 COLORREF curclr;
1446
1447#ifdef DEBUG
1448 WriteLog("USER32: GrayStringA, not completely implemented\n");
1449#endif
1450 if(lpOutputFunc == NULL && lpData == NULL) {
1451#ifdef DEBUG
1452 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1453#endif
1454 return(FALSE);
1455 }
1456 if(lpOutputFunc) {
1457 return(lpOutputFunc(hdc, lpData, nCount));
1458 }
1459 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1460 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
1461 SetTextColor(hdc, curclr);
1462
1463 return(rc);
1464}
1465//******************************************************************************
1466//******************************************************************************
1467BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1468 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1469 int nHeight)
1470{
1471 BOOL rc;
1472 char *astring;
1473 COLORREF curclr;
1474
1475#ifdef DEBUG
1476 WriteLog("USER32: GrayStringW, not completely implemented\n");
1477#endif
1478
1479 if(lpOutputFunc == NULL && lpData == NULL) {
1480#ifdef DEBUG
1481 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1482#endif
1483 return(FALSE);
1484 }
1485 if(nCount == 0)
1486 nCount = UniStrlen((UniChar*)lpData);
1487
1488 if(lpOutputFunc) {
1489 return(lpOutputFunc(hdc, lpData, nCount));
1490 }
1491 astring = UnicodeToAsciiString((LPWSTR)lpData);
1492
1493 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1494 rc = TextOutA(hdc, X, Y, astring, nCount);
1495 SetTextColor(hdc, curclr);
1496
1497 FreeAsciiString(astring);
1498 return(rc);
1499}
1500//******************************************************************************
1501//TODO:
1502//******************************************************************************
1503HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
1504{
1505#ifdef DEBUG
1506 WriteLog("USER32: CopyImage, not implemented\n");
1507#endif
1508 switch(uType) {
1509 case IMAGE_BITMAP:
1510 case IMAGE_CURSOR:
1511 case IMAGE_ICON:
1512 default:
1513#ifdef DEBUG
1514 WriteLog("USER32: CopyImage, unknown type\n");
1515#endif
1516 return(NULL);
1517 }
1518 return(NULL);
1519}
1520//******************************************************************************
1521//******************************************************************************
1522BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
1523{
1524#ifdef DEBUG
1525 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
1526#endif
1527 memset(lpKeyState, 0, 256);
1528 return(TRUE);
1529}
1530//******************************************************************************
1531//******************************************************************************
1532BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
1533{
1534#ifdef DEBUG
1535 WriteLog("USER32: SetKeyboardState, not implemented\n");
1536#endif
1537 return(TRUE);
1538}
1539//******************************************************************************
1540//2nd parameter not used according to SDK (yet?)
1541//******************************************************************************
1542VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
1543{
1544#ifdef DEBUG
1545 WriteLog("USER32: SetLastErrorEx\n");
1546#endif
1547 SetLastError(dwErrCode);
1548}
1549//******************************************************************************
1550//******************************************************************************
1551BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1552{
1553#ifdef DEBUG
1554 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
1555#endif
1556 return(TRUE);
1557}
1558//******************************************************************************
1559//******************************************************************************
1560int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
1561{
1562#ifdef DEBUG
1563 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
1564#endif
1565 return(0);
1566}
1567//******************************************************************************
1568//******************************************************************************
1569HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
1570{
1571#ifdef DEBUG
1572 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
1573#endif
1574 return(0);
1575}
1576//******************************************************************************
1577//******************************************************************************
1578int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
1579{
1580#ifdef DEBUG
1581 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
1582#endif
1583 return(0);
1584}
1585//******************************************************************************
1586//******************************************************************************
1587int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
1588 int cxDesired, int cyDesired,
1589 UINT Flags)
1590{
1591#ifdef DEBUG
1592 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
1593#endif
1594 return(0);
1595}
1596//******************************************************************************
1597//DWORD idAttach; /* thread to attach */
1598//DWORD idAttachTo; /* thread to attach to */
1599//BOOL fAttach; /* attach or detach */
1600//******************************************************************************
1601BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1602{
1603#ifdef DEBUG
1604 WriteLog("USER32: AttachThreadInput, not implemented\n");
1605#endif
1606 return(TRUE);
1607}
1608//******************************************************************************
1609//******************************************************************************
1610BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1611{
1612#ifdef DEBUG
1613 WriteLog("USER32: RegisterHotKey, not implemented\n");
1614#endif
1615 return(TRUE);
1616}
1617//******************************************************************************
1618//******************************************************************************
1619BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1620{
1621#ifdef DEBUG
1622 WriteLog("USER32: UnregisterHotKey, not implemented\n");
1623#endif
1624 return(TRUE);
1625}
1626//******************************************************************************
1627//******************************************************************************
1628BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
1629{
1630#ifdef DEBUG
1631 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
1632#endif
1633 return(TRUE);
1634}
1635//******************************************************************************
1636//******************************************************************************
1637DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
1638{
1639#ifdef DEBUG
1640 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
1641#endif
1642 return(0);
1643}
1644//******************************************************************************
1645//******************************************************************************
1646BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
1647{
1648#ifdef DEBUG
1649 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
1650#endif
1651 return(FALSE);
1652}
1653//******************************************************************************
1654//******************************************************************************
1655BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
1656{
1657#ifdef DEBUG
1658 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
1659#endif
1660 return(FALSE);
1661}
1662//******************************************************************************
1663//******************************************************************************
1664HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
1665{
1666#ifdef DEBUG
1667 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
1668#endif
1669 return(0);
1670}
1671//******************************************************************************
1672//******************************************************************************
1673HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
1674{
1675#ifdef DEBUG
1676 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
1677#endif
1678 return(0);
1679}
1680//******************************************************************************
1681//******************************************************************************
1682HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
1683{
1684#ifdef DEBUG
1685 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
1686#endif
1687 return(0);
1688}
1689//******************************************************************************
1690//******************************************************************************
1691BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
1692{
1693#ifdef DEBUG
1694 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
1695#endif
1696 return(FALSE);
1697}
1698//******************************************************************************
1699//******************************************************************************
1700BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
1701 LPDEVMODEA lpDevMode)
1702{
1703#ifdef DEBUG
1704 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
1705#endif
1706 switch(iModeNum) {
1707 case 0:
1708 lpDevMode->dmBitsPerPel = 16;
1709 lpDevMode->dmPelsWidth = 768;
1710 lpDevMode->dmPelsHeight = 1024;
1711 lpDevMode->dmDisplayFlags = 0;
1712 lpDevMode->dmDisplayFrequency = 70;
1713 break;
1714 case 1:
1715 lpDevMode->dmBitsPerPel = 16;
1716 lpDevMode->dmPelsWidth = 640;
1717 lpDevMode->dmPelsHeight = 480;
1718 lpDevMode->dmDisplayFlags = 0;
1719 lpDevMode->dmDisplayFrequency = 70;
1720 break;
1721 default:
1722 return(FALSE);
1723 }
1724 return(TRUE);
1725}
1726//******************************************************************************
1727//******************************************************************************
1728LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
1729{
1730#ifdef DEBUG
1731 if(lpDevMode) {
1732 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
1733 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
1734 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
1735 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
1736 }
1737#endif
1738 return(DISP_CHANGE_SUCCESSFUL);
1739}
1740//******************************************************************************
1741//******************************************************************************
1742
1743
1744/*****************************************************************************
1745 * Name : BOOL WIN32API AnyPopup
1746 * Purpose : The AnyPopup function indicates whether an owned, visible,
1747 * top-level pop-up, or overlapped window exists on the screen. The
1748 * function searches the entire Windows screen, not just the calling
1749 * application's client area.
1750 * Parameters: VOID
1751 * Variables :
1752 * Result : If a pop-up window exists, the return value is TRUE even if the
1753 * pop-up window is completely covered by other windows. Otherwise,
1754 * it is FALSE.
1755 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1756 * compatibility purposes. It is generally not useful.
1757 * Status : UNTESTED STUB
1758 *
1759 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1760 *****************************************************************************/
1761
1762BOOL WIN32API AnyPopup(VOID)
1763{
1764 dprintf(("USER32:AnyPopup() not implemented.\n"));
1765
1766 return (FALSE);
1767}
1768
1769
1770
1771/*****************************************************************************
1772 * Name : LONG WIN32API ChangeDisplaySettingsW
1773 * Purpose : The ChangeDisplaySettings function changes the display settings
1774 * to the specified graphics mode.
1775 * Parameters: LPDEVMODEW lpDevModeW
1776 * DWORD dwFlags
1777 * Variables :
1778 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
1779 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
1780 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
1781 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
1782 * DISP_CHANGE_BADMODE The graphics mode is not supported.
1783 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
1784 * Remark :
1785 * Status : UNTESTED STUB
1786 *
1787 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1788 *****************************************************************************/
1789
1790LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
1791 DWORD dwFlags)
1792{
1793 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
1794 lpDevMode,
1795 dwFlags));
1796
1797 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
1798 dwFlags));
1799}
1800
1801/*****************************************************************************
1802 * Name : BOOL WIN32API CloseDesktop
1803 * Purpose : The CloseDesktop function closes an open handle of a desktop
1804 * object. A desktop is a secure object contained within a window
1805 * station object. A desktop has a logical display surface and
1806 * contains windows, menus and hooks.
1807 * Parameters: HDESK hDesktop
1808 * Variables :
1809 * Result : If the function succeeds, the return value is TRUE.
1810 * If the functions fails, the return value is FALSE. To get
1811 * extended error information, call GetLastError.
1812 * Remark :
1813 * Status : UNTESTED STUB
1814 *
1815 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1816 *****************************************************************************/
1817
1818BOOL WIN32API CloseDesktop(HDESK hDesktop)
1819{
1820 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1821 hDesktop));
1822
1823 return (FALSE);
1824}
1825
1826
1827/*****************************************************************************
1828 * Name : BOOL WIN32API CloseWindowStation
1829 * Purpose : The CloseWindowStation function closes an open window station handle.
1830 * Parameters: HWINSTA hWinSta
1831 * Variables :
1832 * Result :
1833 * Remark : If the function succeeds, the return value is TRUE.
1834 * If the functions fails, the return value is FALSE. To get
1835 * extended error information, call GetLastError.
1836 * Status : UNTESTED STUB
1837 *
1838 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1839 *****************************************************************************/
1840
1841BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1842{
1843 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1844 hWinSta));
1845
1846 return (FALSE);
1847}
1848
1849
1850/*****************************************************************************
1851 * Name : HDESK WIN32API CreateDesktopA
1852 * Purpose : The CreateDesktop function creates a new desktop on the window
1853 * station associated with the calling process.
1854 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1855 * LPCTSTR lpszDevice name of display device to assign to the desktop
1856 * LPDEVMODE pDevMode reserved; must be NULL
1857 * DWORD dwFlags flags to control interaction with other applications
1858 * DWORD dwDesiredAccess specifies access of returned handle
1859 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1860 * Variables :
1861 * Result : If the function succeeds, the return value is a handle of the
1862 * newly created desktop.
1863 * If the function fails, the return value is NULL. To get extended
1864 * error information, call GetLastError.
1865 * Remark :
1866 * Status : UNTESTED STUB
1867 *
1868 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1869 *****************************************************************************/
1870
1871HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1872 LPCTSTR lpszDevice,
1873 LPDEVMODEA pDevMode,
1874 DWORD dwFlags,
1875 DWORD dwDesiredAccess,
1876 LPSECURITY_ATTRIBUTES lpsa)
1877{
1878 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1879 lpszDesktop,
1880 lpszDevice,
1881 pDevMode,
1882 dwFlags,
1883 dwDesiredAccess,
1884 lpsa));
1885
1886 return (NULL);
1887}
1888
1889
1890/*****************************************************************************
1891 * Name : HDESK WIN32API CreateDesktopW
1892 * Purpose : The CreateDesktop function creates a new desktop on the window
1893 * station associated with the calling process.
1894 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1895 * LPCTSTR lpszDevice name of display device to assign to the desktop
1896 * LPDEVMODE pDevMode reserved; must be NULL
1897 * DWORD dwFlags flags to control interaction with other applications
1898 * DWORD dwDesiredAccess specifies access of returned handle
1899 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1900 * Variables :
1901 * Result : If the function succeeds, the return value is a handle of the
1902 * newly created desktop.
1903 * If the function fails, the return value is NULL. To get extended
1904 * error information, call GetLastError.
1905 * Remark :
1906 * Status : UNTESTED STUB
1907 *
1908 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1909 *****************************************************************************/
1910
1911HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1912 LPCTSTR lpszDevice,
1913 LPDEVMODEW pDevMode,
1914 DWORD dwFlags,
1915 DWORD dwDesiredAccess,
1916 LPSECURITY_ATTRIBUTES lpsa)
1917{
1918 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1919 lpszDesktop,
1920 lpszDevice,
1921 pDevMode,
1922 dwFlags,
1923 dwDesiredAccess,
1924 lpsa));
1925
1926 return (NULL);
1927}
1928
1929
1930/*****************************************************************************
1931 * Name : HWINSTA WIN32API CreateWindowStationA
1932 * Purpose : The CreateWindowStation function creates a window station object.
1933 * It returns a handle that can be used to access the window station.
1934 * A window station is a secure object that contains a set of global
1935 * atoms, a clipboard, and a set of desktop objects.
1936 * Parameters: LPTSTR lpwinsta name of the new window station
1937 * DWORD dwReserved reserved; must be NULL
1938 * DWORD dwDesiredAccess specifies access of returned handle
1939 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1940 * Variables :
1941 * Result : If the function succeeds, the return value is the handle to the
1942 * newly created window station.
1943 * If the function fails, the return value is NULL. To get extended
1944 * error information, call GetLastError.
1945 * Remark :
1946 * Status : UNTESTED STUB
1947 *
1948 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1949 *****************************************************************************/
1950
1951HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1952 DWORD dwReserved,
1953 DWORD dwDesiredAccess,
1954 LPSECURITY_ATTRIBUTES lpsa)
1955{
1956 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1957 lpWinSta,
1958 dwReserved,
1959 dwDesiredAccess,
1960 lpsa));
1961
1962 return (NULL);
1963}
1964
1965
1966/*****************************************************************************
1967 * Name : HWINSTA WIN32API CreateWindowStationW
1968 * Purpose : The CreateWindowStation function creates a window station object.
1969 * It returns a handle that can be used to access the window station.
1970 * A window station is a secure object that contains a set of global
1971 * atoms, a clipboard, and a set of desktop objects.
1972 * Parameters: LPTSTR lpwinsta name of the new window station
1973 * DWORD dwReserved reserved; must be NULL
1974 * DWORD dwDesiredAccess specifies access of returned handle
1975 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1976 * Variables :
1977 * Result : If the function succeeds, the return value is the handle to the
1978 * newly created window station.
1979 * If the function fails, the return value is NULL. To get extended
1980 * error information, call GetLastError.
1981 * Remark :
1982 * Status : UNTESTED STUB
1983 *
1984 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1985 *****************************************************************************/
1986
1987HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
1988 DWORD dwReserved,
1989 DWORD dwDesiredAccess,
1990 LPSECURITY_ATTRIBUTES lpsa)
1991{
1992 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
1993 lpWinSta,
1994 dwReserved,
1995 dwDesiredAccess,
1996 lpsa));
1997
1998 return (NULL);
1999}
2000
2001/*****************************************************************************
2002 * Name : BOOL WIN32API DragDetect
2003 * Purpose : The DragDetect function captures the mouse and tracks its movement
2004 * Parameters: HWND hwnd
2005 * POINT pt
2006 * Variables :
2007 * Result : If the user moved the mouse outside of the drag rectangle while
2008 * holding the left button down, the return value is TRUE.
2009 * If the user did not move the mouse outside of the drag rectangle
2010 * while holding the left button down, the return value is FALSE.
2011 * Remark :
2012 * Status : UNTESTED STUB
2013 *
2014 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2015 *****************************************************************************/
2016
2017BOOL WIN32API DragDetect(HWND hwnd,
2018 POINT pt)
2019{
2020 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
2021 hwnd));
2022
2023 return (FALSE);
2024}
2025
2026
2027
2028/*****************************************************************************
2029 * Name : BOOL WIN32API EnumDesktopWindows
2030 * Purpose : The EnumDesktopWindows function enumerates all windows in a
2031 * desktop by passing the handle of each window, in turn, to an
2032 * application-defined callback function.
2033 * Parameters: HDESK hDesktop handle of desktop to enumerate
2034 * WNDENUMPROC lpfn points to application's callback function
2035 * LPARAM lParam 32-bit value to pass to the callback function
2036 * Variables :
2037 * Result : If the function succeeds, the return value is TRUE.
2038 * If the function fails, the return value is FALSE. To get
2039 * extended error information, call GetLastError.
2040 * Remark :
2041 * Status : UNTESTED STUB
2042 *
2043 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2044 *****************************************************************************/
2045
2046BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
2047 WNDENUMPROC lpfn,
2048 LPARAM lParam)
2049{
2050 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
2051 hDesktop,
2052 lpfn,
2053 lParam));
2054
2055 return (FALSE);
2056}
2057
2058
2059/*****************************************************************************
2060 * Name : BOOL WIN32API EnumDesktopsA
2061 * Purpose : The EnumDesktops function enumerates all desktops in the window
2062 * station assigned to the calling process. The function does so by
2063 * passing the name of each desktop, in turn, to an application-
2064 * defined callback function.
2065 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2066 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2067 * LPARAM lParam 32-bit value to pass to the callback function
2068 * Variables :
2069 * Result : If the function succeeds, the return value is TRUE.
2070 * If the function fails, the return value is FALSE. To get extended
2071 * error information, call GetLastError.
2072 * Remark :
2073 * Status : UNTESTED STUB
2074 *
2075 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2076 *****************************************************************************/
2077
2078BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
2079 DESKTOPENUMPROCA lpEnumFunc,
2080 LPARAM lParam)
2081{
2082 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
2083 hWinSta,
2084 lpEnumFunc,
2085 lParam));
2086
2087 return (FALSE);
2088}
2089
2090
2091/*****************************************************************************
2092 * Name : BOOL WIN32API EnumDesktopsW
2093 * Purpose : The EnumDesktops function enumerates all desktops in the window
2094 * station assigned to the calling process. The function does so by
2095 * passing the name of each desktop, in turn, to an application-
2096 * defined callback function.
2097 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2098 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2099 * LPARAM lParam 32-bit value to pass to the callback function
2100 * Variables :
2101 * Result : If the function succeeds, the return value is TRUE.
2102 * If the function fails, the return value is FALSE. To get extended
2103 * error information, call GetLastError.
2104 * Remark :
2105 * Status : UNTESTED STUB
2106 *
2107 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2108 *****************************************************************************/
2109
2110BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
2111 DESKTOPENUMPROCW lpEnumFunc,
2112 LPARAM lParam)
2113{
2114 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
2115 hWinSta,
2116 lpEnumFunc,
2117 lParam));
2118
2119 return (FALSE);
2120}
2121
2122
2123
2124/*****************************************************************************
2125 * Name : BOOL WIN32API EnumDisplaySettingsW
2126 * Purpose : The EnumDisplaySettings function obtains information about one
2127 * of a display device's graphics modes. You can obtain information
2128 * for all of a display device's graphics modes by making a series
2129 * of calls to this function.
2130 * Parameters: LPCTSTR lpszDeviceName specifies the display device
2131 * DWORD iModeNum specifies the graphics mode
2132 * LPDEVMODE lpDevMode points to structure to receive settings
2133 * Variables :
2134 * Result : If the function succeeds, the return value is TRUE.
2135 * If the function fails, the return value is FALSE.
2136 * Remark :
2137 * Status : UNTESTED STUB
2138 *
2139 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2140 *****************************************************************************/
2141
2142BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
2143 DWORD iModeNum,
2144 LPDEVMODEW lpDevMode)
2145{
2146 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
2147 lpszDeviceName,
2148 iModeNum,
2149 lpDevMode));
2150
2151 return (EnumDisplaySettingsA(lpszDeviceName,
2152 iModeNum,
2153 (LPDEVMODEA)lpDevMode));
2154}
2155
2156
2157/*****************************************************************************
2158 * Name : BOOL WIN32API EnumWindowStationsA
2159 * Purpose : The EnumWindowStations function enumerates all windowstations
2160 * in the system by passing the name of each window station, in
2161 * turn, to an application-defined callback function.
2162 * Parameters:
2163 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2164 * LPARAM lParam 32-bit value to pass to the callback function
2165 * Result : If the function succeeds, the return value is TRUE.
2166 * If the function fails the return value is FALSE. To get extended
2167 * error information, call GetLastError.
2168 * Remark :
2169 * Status : UNTESTED STUB
2170 *
2171 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2172 *****************************************************************************/
2173
2174BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
2175 LPARAM lParam)
2176{
2177 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
2178 lpEnumFunc,
2179 lParam));
2180
2181 return (FALSE);
2182}
2183
2184
2185/*****************************************************************************
2186 * Name : BOOL WIN32API EnumWindowStationsW
2187 * Purpose : The EnumWindowStations function enumerates all windowstations
2188 * in the system by passing the name of each window station, in
2189 * turn, to an application-defined callback function.
2190 * Parameters:
2191 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2192 * LPARAM lParam 32-bit value to pass to the callback function
2193 * Result : If the function succeeds, the return value is TRUE.
2194 * If the function fails the return value is FALSE. To get extended
2195 * error information, call GetLastError.
2196 * Remark :
2197 * Status : UNTESTED STUB
2198 *
2199 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2200 *****************************************************************************/
2201
2202BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
2203 LPARAM lParam)
2204{
2205 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
2206 lpEnumFunc,
2207 lParam));
2208
2209 return (FALSE);
2210}
2211
2212
2213
2214/*****************************************************************************
2215 * Name : BOOL WIN32API GetInputState
2216 * Purpose : The GetInputState function determines whether there are
2217 * mouse-button or keyboard messages in the calling thread's message queue.
2218 * Parameters:
2219 * Variables :
2220 * Result : If the queue contains one or more new mouse-button or keyboard
2221 * messages, the return value is TRUE.
2222 * If the function fails, the return value is FALSE.
2223 * Remark :
2224 * Status : UNTESTED STUB
2225 *
2226 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2227 *****************************************************************************/
2228
2229BOOL WIN32API GetInputState(VOID)
2230{
2231 dprintf(("USER32:GetInputState () not implemented.\n"));
2232
2233 return (FALSE);
2234}
2235
2236
2237/*****************************************************************************
2238 * Name : UINT WIN32API GetKBCodePage
2239 * Purpose : The GetKBCodePage function is provided for compatibility with
2240 * earlier versions of Windows. In the Win32 application programming
2241 * interface (API) it just calls the GetOEMCP function.
2242 * Parameters:
2243 * Variables :
2244 * Result : If the function succeeds, the return value is an OEM code-page
2245 * identifier, or it is the default identifier if the registry
2246 * value is not readable. For a list of OEM code-page identifiers,
2247 * see GetOEMCP.
2248 * Remark :
2249 * Status : UNTESTED
2250 *
2251 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2252 *****************************************************************************/
2253
2254UINT WIN32API GetKBCodePage(VOID)
2255{
2256 return (GetOEMCP());
2257}
2258
2259
2260/*****************************************************************************
2261 * Name : BOOL WIN32API GetKeyboardLayoutNameA
2262 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
2263 * active keyboard layout.
2264 * Parameters: LPTSTR pwszKLID address of buffer for layout name
2265 * Variables :
2266 * Result : If the function succeeds, the return value is TRUE.
2267 * If the function fails, the return value is FALSE. To get extended
2268 * error information, call GetLastError.
2269 * Remark :
2270 * Status : UNTESTED STUB
2271 *
2272 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2273 *****************************************************************************/
2274
2275// @@@PH Win32 BOOL's are casted to INTs
2276INT WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
2277{
2278 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
2279 pwszKLID));
2280
2281 return(FALSE);
2282}
2283
2284
2285/*****************************************************************************
2286 * Name : BOOL WIN32API GetKeyboardLayoutNameW
2287 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
2288 * active keyboard layout.
2289 * Parameters: LPTSTR pwszKLID address of buffer for layout name
2290 * Variables :
2291 * Result : If the function succeeds, the return value is TRUE.
2292 * If the function fails, the return value is FALSE. To get extended
2293 * error information, call GetLastError.
2294 * Remark :
2295 * Status : UNTESTED STUB
2296 *
2297 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2298 *****************************************************************************/
2299
2300// @@@PH Win32 BOOL's are casted to INTs
2301INT WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
2302{
2303 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
2304 pwszKLID));
2305
2306 return(FALSE);
2307}
2308
2309
2310
2311
2312/*****************************************************************************
2313 * Name : HWINSTA WIN32API GetProcessWindowStation
2314 * Purpose : The GetProcessWindowStation function returns a handle of the
2315 * window station associated with the calling process.
2316 * Parameters:
2317 * Variables :
2318 * Result : If the function succeeds, the return value is a handle of the
2319 * window station associated with the calling process.
2320 * If the function fails, the return value is NULL. This can occur
2321 * if the calling process is not an application written for Windows
2322 * NT. To get extended error information, call GetLastError.
2323 * Remark :
2324 * Status : UNTESTED STUB
2325 *
2326 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2327 *****************************************************************************/
2328
2329HWINSTA WIN32API GetProcessWindowStation(VOID)
2330{
2331 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
2332
2333 return (NULL);
2334}
2335
2336
2337
2338/*****************************************************************************
2339 * Name : HDESK WIN32API GetThreadDesktop
2340 * Purpose : The GetThreadDesktop function returns a handle to the desktop
2341 * associated with a specified thread.
2342 * Parameters: DWORD dwThreadId thread identifier
2343 * Variables :
2344 * Result : If the function succeeds, the return value is the handle of the
2345 * desktop associated with the specified thread.
2346 * Remark :
2347 * Status : UNTESTED STUB
2348 *
2349 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2350 *****************************************************************************/
2351
2352HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
2353{
2354 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
2355 dwThreadId));
2356
2357 return (NULL);
2358}
2359
2360
2361/*****************************************************************************
2362 * Name : BOOL WIN32API GetUserObjectInformationA
2363 * Purpose : The GetUserObjectInformation function returns information about
2364 * a window station or desktop object.
2365 * Parameters: HANDLE hObj handle of object to get information for
2366 * int nIndex type of information to get
2367 * PVOID pvInfo points to buffer that receives the information
2368 * DWORD nLength size, in bytes, of pvInfo buffer
2369 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2370 * Variables :
2371 * Result : If the function succeeds, the return value is TRUE.
2372 * If the function fails, the return value is FALSE. To get extended
2373 * error information, call GetLastError.
2374 * Remark :
2375 * Status : UNTESTED STUB
2376 *
2377 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2378 *****************************************************************************/
2379
2380BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2381 int nIndex,
2382 PVOID pvInfo,
2383 DWORD nLength,
2384 LPDWORD lpnLengthNeeded)
2385{
2386 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2387 hObj,
2388 nIndex,
2389 pvInfo,
2390 nLength,
2391 lpnLengthNeeded));
2392
2393 return (FALSE);
2394}
2395
2396
2397/*****************************************************************************
2398 * Name : BOOL WIN32API GetUserObjectInformationW
2399 * Purpose : The GetUserObjectInformation function returns information about
2400 * a window station or desktop object.
2401 * Parameters: HANDLE hObj handle of object to get information for
2402 * int nIndex type of information to get
2403 * PVOID pvInfo points to buffer that receives the information
2404 * DWORD nLength size, in bytes, of pvInfo buffer
2405 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2406 * Variables :
2407 * Result : If the function succeeds, the return value is TRUE.
2408 * If the function fails, the return value is FALSE. To get extended
2409 * error information, call GetLastError.
2410 * Remark :
2411 * Status : UNTESTED STUB
2412 *
2413 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2414 *****************************************************************************/
2415
2416BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2417 int nIndex,
2418 PVOID pvInfo,
2419 DWORD nLength,
2420 LPDWORD lpnLengthNeeded)
2421{
2422 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2423 hObj,
2424 nIndex,
2425 pvInfo,
2426 nLength,
2427 lpnLengthNeeded));
2428
2429 return (FALSE);
2430}
2431
2432
2433/*****************************************************************************
2434 * Name : BOOL WIN32API GetUserObjectSecurity
2435 * Purpose : The GetUserObjectSecurity function retrieves security information
2436 * for the specified user object.
2437 * Parameters: HANDLE hObj handle of user object
2438 * SECURITY_INFORMATION * pSIRequested address of requested security information
2439 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2440 * DWORD nLength size of buffer for security descriptor
2441 * LPDWORD lpnLengthNeeded address of required size of buffer
2442 * Variables :
2443 * Result : If the function succeeds, the return value is TRUE.
2444 * If the function fails, the return value is FALSE. To get extended
2445 * error information, call GetLastError.
2446 * Remark :
2447 * Status : UNTESTED STUB
2448 *
2449 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2450 *****************************************************************************/
2451
2452BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2453 SECURITY_INFORMATION * pSIRequested,
2454 LPSECURITY_DESCRIPTOR pSID,
2455 DWORD nLength,
2456 LPDWORD lpnLengthNeeded)
2457{
2458 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2459 hObj,
2460 pSIRequested,
2461 pSID,
2462 nLength,
2463 lpnLengthNeeded));
2464
2465 return (FALSE);
2466}
2467
2468
2469
2470/*****************************************************************************
2471 * Name : int WIN32API GetWindowRgn
2472 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
2473 * Parameters: HWND hWnd handle to window whose window region is to be obtained
2474 * HRGN hRgn handle to region that receives a copy of the window region
2475 * Variables :
2476 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
2477 * Remark :
2478 * Status : UNTESTED STUB
2479 *
2480 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2481 *****************************************************************************/
2482
2483int WIN32API GetWindowRgn (HWND hWnd,
2484 HRGN hRgn)
2485{
2486 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
2487 hWnd,
2488 hRgn));
2489
2490 return (NULLREGION);
2491}
2492
2493
2494
2495/*****************************************************************************
2496 * Name : HCURSOR WIN32API LoadCursorFromFileA
2497 * Purpose : The LoadCursorFromFile function creates a cursor based on data
2498 * contained in a file. The file is specified by its name or by a
2499 * system cursor identifier. The function returns a handle to the
2500 * newly created cursor. Files containing cursor data may be in
2501 * either cursor (.CUR) or animated cursor (.ANI) format.
2502 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
2503 * Variables :
2504 * Result : If the function is successful, the return value is a handle to
2505 * the new cursor.
2506 * If the function fails, the return value is NULL. To get extended
2507 * error information, call GetLastError. GetLastError may return
2508 * the following
2509 * Remark :
2510 * Status : UNTESTED STUB
2511 *
2512 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2513 *****************************************************************************/
2514
2515HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
2516{
2517 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
2518 lpFileName));
2519
2520 return (NULL);
2521}
2522
2523
2524/*****************************************************************************
2525 * Name : HCURSOR WIN32API LoadCursorFromFileW
2526 * Purpose : The LoadCursorFromFile function creates a cursor based on data
2527 * contained in a file. The file is specified by its name or by a
2528 * system cursor identifier. The function returns a handle to the
2529 * newly created cursor. Files containing cursor data may be in
2530 * either cursor (.CUR) or animated cursor (.ANI) format.
2531 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
2532 * Variables :
2533 * Result : If the function is successful, the return value is a handle to
2534 * the new cursor.
2535 * If the function fails, the return value is NULL. To get extended
2536 * error information, call GetLastError. GetLastError may return
2537 * the following
2538 * Remark :
2539 * Status : UNTESTED STUB
2540 *
2541 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2542 *****************************************************************************/
2543
2544HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
2545{
2546 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
2547 lpFileName));
2548
2549 return (NULL);
2550}
2551
2552
2553/*****************************************************************************
2554 * Name : HLK WIN32API LoadKeyboardLayoutA
2555 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
2556 * the system. Several keyboard layouts can be loaded at a time, but
2557 * only one per process is active at a time. Loading multiple keyboard
2558 * layouts makes it possible to rapidly switch between layouts.
2559 * Parameters:
2560 * Variables :
2561 * Result : If the function succeeds, the return value is the handle of the
2562 * keyboard layout.
2563 * If the function fails, the return value is NULL. To get extended
2564 * error information, call GetLastError.
2565 * Remark :
2566 * Status : UNTESTED STUB
2567 *
2568 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2569 *****************************************************************************/
2570
2571HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
2572 UINT Flags)
2573{
2574 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
2575 pwszKLID,
2576 Flags));
2577
2578 return (NULL);
2579}
2580
2581
2582/*****************************************************************************
2583 * Name : HLK WIN32API LoadKeyboardLayoutW
2584 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
2585 * the system. Several keyboard layouts can be loaded at a time, but
2586 * only one per process is active at a time. Loading multiple keyboard
2587 * layouts makes it possible to rapidly switch between layouts.
2588 * Parameters:
2589 * Variables :
2590 * Result : If the function succeeds, the return value is the handle of the
2591 * keyboard layout.
2592 * If the function fails, the return value is NULL. To get extended
2593 * error information, call GetLastError.
2594 * Remark :
2595 * Status : UNTESTED STUB
2596 *
2597 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2598 *****************************************************************************/
2599
2600HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
2601 UINT Flags)
2602{
2603 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
2604 pwszKLID,
2605 Flags));
2606
2607 return (NULL);
2608}
2609
2610
2611/*****************************************************************************
2612 * Name : UINT WIN32API MapVirtualKeyExA
2613 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
2614 * code into a scan code or character value, or translates a scan
2615 * code into a virtual-key code. The function translates the codes
2616 * using the input language and physical keyboard layout identified
2617 * by the given keyboard layout handle.
2618 * Parameters:
2619 * Variables :
2620 * Result : The return value is either a scan code, a virtual-key code, or
2621 * a character value, depending on the value of uCode and uMapType.
2622 * If there is no translation, the return value is zero.
2623 * Remark :
2624 * Status : UNTESTED STUB
2625 *
2626 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2627 *****************************************************************************/
2628
2629UINT WIN32API MapVirtualKeyExA(UINT uCode,
2630 UINT uMapType,
2631 HKL dwhkl)
2632{
2633 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
2634 uCode,
2635 uMapType,
2636 dwhkl));
2637
2638 return (0);
2639}
2640
2641
2642/*****************************************************************************
2643 * Name : UINT WIN32API MapVirtualKeyExW
2644 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
2645 * code into a scan code or character value, or translates a scan
2646 * code into a virtual-key code. The function translates the codes
2647 * using the input language and physical keyboard layout identified
2648 * by the given keyboard layout handle.
2649 * Parameters:
2650 * Variables :
2651 * Result : The return value is either a scan code, a virtual-key code, or
2652 * a character value, depending on the value of uCode and uMapType.
2653 * If there is no translation, the return value is zero.
2654 * Remark :
2655 * Status : UNTESTED STUB
2656
2657 *
2658 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2659 *****************************************************************************/
2660
2661UINT WIN32API MapVirtualKeyExW(UINT uCode,
2662 UINT uMapType,
2663 HKL dwhkl)
2664{
2665 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
2666 uCode,
2667 uMapType,
2668 dwhkl));
2669
2670 return (0);
2671}
2672
2673/*****************************************************************************
2674 * Name : DWORD WIN32API OemKeyScan
2675 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
2676 * into the OEM scan codes and shift states. The function provides
2677 * information that allows a program to send OEM text to another
2678 * program by simulating keyboard input.
2679 * Parameters:
2680 * Variables :
2681 * Result :
2682 * Remark :
2683 * Status : UNTESTED STUB
2684 *
2685 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2686 *****************************************************************************/
2687
2688DWORD WIN32API OemKeyScan(WORD wOemChar)
2689{
2690 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
2691 wOemChar));
2692
2693 return (wOemChar);
2694}
2695
2696
2697/*****************************************************************************
2698 * Name : HDESK WIN32API OpenDesktopA
2699 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2700 * A desktop is a secure object contained within a window station
2701 * object. A desktop has a logical display surface and contains
2702 * windows, menus and hooks.
2703 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2704 * DWORD dwFlags flags to control interaction with other applications
2705 * BOOL fInherit specifies whether returned handle is inheritable
2706 * DWORD dwDesiredAccess specifies access of returned handle
2707 * Variables :
2708 * Result : If the function succeeds, the return value is the handle to the
2709 * opened desktop.
2710 * If the function fails, the return value is NULL. To get extended
2711 * error information, call GetLastError.
2712 * Remark :
2713 * Status : UNTESTED STUB
2714 *
2715 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2716 *****************************************************************************/
2717
2718HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2719 DWORD dwFlags,
2720 BOOL fInherit,
2721 DWORD dwDesiredAccess)
2722{
2723 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2724 lpszDesktopName,
2725 dwFlags,
2726 fInherit,
2727 dwDesiredAccess));
2728
2729 return (NULL);
2730}
2731
2732
2733/*****************************************************************************
2734 * Name : HDESK WIN32API OpenDesktopW
2735 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2736 * A desktop is a secure object contained within a window station
2737 * object. A desktop has a logical display surface and contains
2738 * windows, menus and hooks.
2739 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2740 * DWORD dwFlags flags to control interaction with other applications
2741 * BOOL fInherit specifies whether returned handle is inheritable
2742 * DWORD dwDesiredAccess specifies access of returned handle
2743 * Variables :
2744 * Result : If the function succeeds, the return value is the handle to the
2745 * opened desktop.
2746 * If the function fails, the return value is NULL. To get extended
2747 * error information, call GetLastError.
2748 * Remark :
2749 * Status : UNTESTED STUB
2750 *
2751 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2752 *****************************************************************************/
2753
2754HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2755 DWORD dwFlags,
2756 BOOL fInherit,
2757 DWORD dwDesiredAccess)
2758{
2759 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2760 lpszDesktopName,
2761 dwFlags,
2762 fInherit,
2763 dwDesiredAccess));
2764
2765 return (NULL);
2766}
2767
2768
2769/*****************************************************************************
2770 * Name : HDESK WIN32API OpenInputDesktop
2771 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2772 * that receives user input. The input desktop is a desktop on the
2773 * window station associated with the logged-on user.
2774 * Parameters: DWORD dwFlags flags to control interaction with other applications
2775 * BOOL fInherit specifies whether returned handle is inheritable
2776 * DWORD dwDesiredAccess specifies access of returned handle
2777 * Variables :
2778 * Result : If the function succeeds, the return value is a handle of the
2779 * desktop that receives user input.
2780 * If the function fails, the return value is NULL. To get extended
2781 * error information, call GetLastError.
2782 * Remark :
2783 * Status : UNTESTED STUB
2784 *
2785 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2786 *****************************************************************************/
2787
2788HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2789 BOOL fInherit,
2790 DWORD dwDesiredAccess)
2791{
2792 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2793 dwFlags,
2794 fInherit,
2795 dwDesiredAccess));
2796
2797 return (NULL);
2798}
2799
2800
2801/*****************************************************************************
2802 * Name : HWINSTA WIN32API OpenWindowStationA
2803 * Purpose : The OpenWindowStation function returns a handle to an existing
2804 * window station.
2805 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2806 * BOOL fInherit specifies whether returned handle is inheritable
2807 * DWORD dwDesiredAccess specifies access of returned handle
2808 * Variables :
2809 * Result : If the function succeeds, the return value is the handle to the
2810 * specified window station.
2811 * If the function fails, the return value is NULL. To get extended
2812 * error information, call GetLastError.
2813 * Remark :
2814 * Status : UNTESTED STUB
2815 *
2816 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2817 *****************************************************************************/
2818
2819HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2820 BOOL fInherit,
2821 DWORD dwDesiredAccess)
2822{
2823 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2824 lpszWinStaName,
2825 fInherit,
2826 dwDesiredAccess));
2827
2828 return (NULL);
2829}
2830
2831
2832/*****************************************************************************
2833 * Name : HWINSTA WIN32API OpenWindowStationW
2834 * Purpose : The OpenWindowStation function returns a handle to an existing
2835 * window station.
2836 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2837 * BOOL fInherit specifies whether returned handle is inheritable
2838 * DWORD dwDesiredAccess specifies access of returned handle
2839 * Variables :
2840 * Result : If the function succeeds, the return value is the handle to the
2841 * specified window station.
2842 * If the function fails, the return value is NULL. To get extended
2843 * error information, call GetLastError.
2844
2845
2846 * Remark :
2847 * Status : UNTESTED STUB
2848 *
2849 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2850 *****************************************************************************/
2851
2852HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2853 BOOL fInherit,
2854 DWORD dwDesiredAccess)
2855{
2856 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2857 lpszWinStaName,
2858 fInherit,
2859 dwDesiredAccess));
2860
2861 return (NULL);
2862}
2863
2864
2865/*****************************************************************************
2866 * Name : BOOL WIN32API PaintDesktop
2867 * Purpose : The PaintDesktop function fills the clipping region in the
2868 * specified device context with the desktop pattern or wallpaper.
2869 * The function is provided primarily for shell desktops.
2870 * Parameters:
2871 * Variables :
2872 * Result : If the function succeeds, the return value is TRUE.
2873 * If the function fails, the return value is FALSE.
2874 * Remark :
2875 * Status : UNTESTED STUB
2876 *
2877 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2878 *****************************************************************************/
2879
2880BOOL WIN32API PaintDesktop(HDC hdc)
2881{
2882 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
2883 hdc));
2884
2885 return (FALSE);
2886}
2887
2888
2889
2890/*****************************************************************************
2891 * Name : VOID WIN32API SetDebugErrorLevel
2892 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
2893 * which Windows will generate debugging events and pass them to a debugger.
2894 * Parameters: DWORD dwLevel debugging error level
2895 * Variables :
2896 * Result :
2897 * Remark :
2898 * Status : UNTESTED STUB
2899 *
2900 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2901 *****************************************************************************/
2902
2903VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
2904{
2905 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
2906 dwLevel));
2907}
2908
2909
2910/*****************************************************************************
2911 * Name : BOOL WIN32API SetProcessWindowStation
2912 * Purpose : The SetProcessWindowStation function assigns a window station
2913 * to the calling process. This enables the process to access
2914 * objects in the window station such as desktops, the clipboard,
2915 * and global atoms. All subsequent operations on the window station
2916 * use the access rights granted to hWinSta.
2917 * Parameters:
2918 * Variables :
2919 * Result : If the function succeeds, the return value is TRUE.
2920 * If the function fails, the return value is FALSE. To get extended
2921 * error information, call GetLastError.
2922 * Remark :
2923 * Status : UNTESTED STUB
2924 *
2925 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2926 *****************************************************************************/
2927
2928BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2929{
2930 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2931 hWinSta));
2932
2933 return (FALSE);
2934}
2935
2936
2937/*****************************************************************************
2938 * Name : BOOL WIN32API SetSystemCursor
2939 * Purpose : The SetSystemCursor function replaces the contents of the system
2940 * cursor specified by dwCursorId with the contents of the cursor
2941 * specified by hCursor, and then destroys hCursor. This function
2942 * lets an application customize the system cursors.
2943 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
2944 * contents, then destroy this
2945 * DWORD dwCursorID system cursor specified by its identifier
2946 * Variables :
2947 * Result : If the function succeeds, the return value is TRUE.
2948 * If the function fails, the return value is FALSE. To get extended
2949 * error information, call GetLastError.
2950 * Remark :
2951 * Status : UNTESTED STUB
2952 *
2953 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2954 *****************************************************************************/
2955
2956BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
2957 DWORD dwCursorId)
2958{
2959 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
2960 hCursor,
2961 dwCursorId));
2962
2963 return (FALSE);
2964}
2965
2966
2967/*****************************************************************************
2968 * Name : BOOL WIN32API SetThreadDesktop
2969 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2970 * thread. All subsequent operations on the desktop use the access
2971 * rights granted to hDesk.
2972 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
2973 * Variables :
2974 * Result : If the function succeeds, the return value is TRUE.
2975 * If the function fails, the return value is FALSE. To get extended
2976 * error information, call GetLastError.
2977 * Remark :
2978 * Status : UNTESTED STUB
2979 *
2980 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2981 *****************************************************************************/
2982
2983BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
2984{
2985 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
2986 hDesktop));
2987
2988 return (FALSE);
2989}
2990
2991
2992/*****************************************************************************
2993 * Name : BOOL WIN32API SetUserObjectInformationA
2994 * Purpose : The SetUserObjectInformation function sets information about a
2995 * window station or desktop object.
2996 * Parameters: HANDLE hObject handle of the object for which to set information
2997 * int nIndex type of information to set
2998 * PVOID lpvInfo points to a buffer that contains the information
2999 * DWORD cbInfo size, in bytes, of lpvInfo buffer
3000 * Variables :
3001 * Result : If the function succeeds, the return value is TRUE.
3002 * If the function fails the return value is FALSE. To get extended
3003 * error information, call GetLastError.
3004 * Remark :
3005 * Status : UNTESTED STUB
3006 *
3007 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3008 *****************************************************************************/
3009
3010BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
3011 int nIndex,
3012 PVOID lpvInfo,
3013 DWORD cbInfo)
3014{
3015 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
3016 hObject,
3017 nIndex,
3018 lpvInfo,
3019 cbInfo));
3020
3021 return (FALSE);
3022}
3023
3024
3025/*****************************************************************************
3026 * Name : BOOL WIN32API SetUserObjectInformationW
3027 * Purpose : The SetUserObjectInformation function sets information about a
3028 * window station or desktop object.
3029 * Parameters: HANDLE hObject handle of the object for which to set information
3030 * int nIndex type of information to set
3031 * PVOID lpvInfo points to a buffer that contains the information
3032 * DWORD cbInfo size, in bytes, of lpvInfo buffer
3033 * Variables :
3034 * Result : If the function succeeds, the return value is TRUE.
3035 * If the function fails the return value is FALSE. To get extended
3036 * error information, call GetLastError.
3037 * Remark :
3038 * Status : UNTESTED STUB
3039 *
3040 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3041 *****************************************************************************/
3042
3043BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
3044 int nIndex,
3045 PVOID lpvInfo,
3046 DWORD cbInfo)
3047{
3048 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
3049 hObject,
3050 nIndex,
3051 lpvInfo,
3052 cbInfo));
3053
3054 return (FALSE);
3055}
3056
3057
3058/*****************************************************************************
3059 * Name : BOOL WIN32API SetUserObjectSecurity
3060 * Purpose : The SetUserObjectSecurity function sets the security of a user
3061 * object. This can be, for example, a window or a DDE conversation
3062 * Parameters: HANDLE hObject handle of user object
3063 * SECURITY_INFORMATION * psi address of security information
3064 * LPSECURITY_DESCRIPTOR psd address of security descriptor
3065 * Variables :
3066 * Result : If the function succeeds, the return value is TRUE.
3067 * If the function fails, the return value is FALSE. To get extended
3068 * error information, call GetLastError.
3069 * Remark :
3070 * Status : UNTESTED STUB
3071 *
3072 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3073 *****************************************************************************/
3074
3075BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
3076 SECURITY_INFORMATION * psi,
3077 LPSECURITY_DESCRIPTOR psd)
3078{
3079 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
3080 hObject,
3081 psi,
3082 psd));
3083
3084 return (FALSE);
3085}
3086
3087
3088/*****************************************************************************
3089 * Name : int WIN32API SetWindowRgn
3090 * Purpose : The SetWindowRgn function sets the window region of a window. The
3091 * window region determines the area within the window where the
3092 * operating system permits drawing. The operating system does not
3093 * display any portion of a window that lies outside of the window region
3094 * Parameters: HWND hWnd handle to window whose window region is to be set
3095 * HRGN hRgn handle to region
3096 * BOOL bRedraw window redraw flag
3097 * Variables :
3098 * Result : If the function succeeds, the return value is non-zero.
3099 * If the function fails, the return value is zero.
3100 * Remark :
3101 * Status : UNTESTED STUB
3102 *
3103 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3104 *****************************************************************************/
3105
3106int WIN32API SetWindowRgn(HWND hWnd,
3107 HRGN hRgn,
3108 BOOL bRedraw)
3109{
3110 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
3111 hWnd,
3112 hRgn,
3113 bRedraw));
3114
3115 return (0);
3116}
3117
3118
3119/*****************************************************************************
3120 * Name : BOOL WIN32API SetWindowsHookW
3121 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
3122 * Win32-based applications should use the SetWindowsHookEx function.
3123 * Parameters:
3124 * Variables :
3125 * Result :
3126 * Remark : ARGH ! MICROSOFT !
3127 * Status : UNTESTED STUB
3128 *
3129 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3130 *****************************************************************************/
3131
3132HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
3133
3134{
3135 return (FALSE);
3136}
3137
3138
3139/*****************************************************************************
3140 * Name : BOOL WIN32API ShowWindowAsync
3141 * Purpose : The ShowWindowAsync function sets the show state of a window
3142 * created by a different thread.
3143 * Parameters: HWND hwnd handle of window
3144 * int nCmdShow show state of window
3145 * Variables :
3146 * Result : If the window was previously visible, the return value is TRUE.
3147 * If the window was previously hidden, the return value is FALSE.
3148 * Remark :
3149 * Status : UNTESTED STUB
3150 *
3151 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3152 *****************************************************************************/
3153
3154BOOL WIN32API ShowWindowAsync (HWND hWnd,
3155 int nCmdShow)
3156{
3157 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
3158 hWnd,
3159 nCmdShow));
3160
3161 return (FALSE);
3162}
3163
3164
3165/*****************************************************************************
3166 * Name : BOOL WIN32API SwitchDesktop
3167 * Purpose : The SwitchDesktop function makes a desktop visible and activates
3168 * it. This enables the desktop to receive input from the user. The
3169 * calling process must have DESKTOP_SWITCHDESKTOP access to the
3170 * desktop for the SwitchDesktop function to succeed.
3171 * Parameters:
3172 * Variables :
3173 * Result : If the function succeeds, the return value is TRUE.
3174 * If the function fails, the return value is FALSE. To get extended
3175 * error information, call GetLastError.
3176 * Remark :
3177 * Status : UNTESTED STUB
3178 *
3179 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3180 *****************************************************************************/
3181
3182BOOL WIN32API SwitchDesktop(HDESK hDesktop)
3183{
3184 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
3185 hDesktop));
3186
3187 return (FALSE);
3188}
3189
3190
3191/*****************************************************************************
3192 * Name : WORD WIN32API TileWindows
3193 * Purpose : The TileWindows function tiles the specified windows, or the child
3194 * windows of the specified parent window.
3195 * Parameters: HWND hwndParent handle of parent window
3196 * WORD wFlags types of windows not to arrange
3197 * LPCRECT lpRect rectangle to arrange windows in
3198 * WORD cChildrenb number of windows to arrange
3199 * const HWND *ahwndChildren array of window handles
3200 * Variables :
3201 * Result : If the function succeeds, the return value is the number of
3202 * windows arranged.
3203 * If the function fails, the return value is zero.
3204 * Remark :
3205 * Status : UNTESTED STUB
3206 *
3207 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3208 *****************************************************************************/
3209
3210WORD WIN32API TileWindows(HWND hwndParent,
3211 UINT wFlags,
3212 const LPRECT lpRect,
3213 UINT cChildrenb,
3214 const HWND *ahwndChildren)
3215{
3216 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3217 hwndParent,
3218 wFlags,
3219 lpRect,
3220 cChildrenb,
3221 ahwndChildren));
3222
3223 return (0);
3224}
3225
3226
3227/*****************************************************************************
3228 * Name : int WIN32API ToAscii
3229 * Purpose : The ToAscii function translates the specified virtual-key code
3230 * and keyboard state to the corresponding Windows character or characters.
3231 * Parameters: UINT uVirtKey virtual-key code
3232 * UINT uScanCode scan code
3233 * PBYTE lpbKeyState address of key-state array
3234 * LPWORD lpwTransKey buffer for translated key
3235 * UINT fuState active-menu flag
3236 * Variables :
3237 * Result : 0 The specified virtual key has no translation for the current
3238 * state of the keyboard.
3239 * 1 One Windows character was copied to the buffer.
3240 * 2 Two characters were copied to the buffer. This usually happens
3241 * when a dead-key character (accent or diacritic) stored in the
3242 * keyboard layout cannot be composed with the specified virtual
3243 * key to form a single character.
3244 * Remark :
3245 * Status : UNTESTED STUB
3246 *
3247 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3248 *****************************************************************************/
3249
3250int WIN32API ToAscii(UINT uVirtKey,
3251 UINT uScanCode,
3252 PBYTE lpbKeyState,
3253 LPWORD lpwTransKey,
3254 UINT fuState)
3255{
3256 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
3257 uVirtKey,
3258 uScanCode,
3259 lpbKeyState,
3260 lpwTransKey,
3261 fuState));
3262
3263 return (0);
3264}
3265
3266
3267/*****************************************************************************
3268 * Name : int WIN32API ToAsciiEx
3269 * Purpose : The ToAscii function translates the specified virtual-key code
3270 * and keyboard state to the corresponding Windows character or characters.
3271 * Parameters: UINT uVirtKey virtual-key code
3272 * UINT uScanCode scan code
3273 * PBYTE lpbKeyState address of key-state array
3274 * LPWORD lpwTransKey buffer for translated key
3275 * UINT fuState active-menu flag
3276 * HLK hlk keyboard layout handle
3277 * Variables :
3278 * Result : 0 The specified virtual key has no translation for the current
3279 * state of the keyboard.
3280 * 1 One Windows character was copied to the buffer.
3281 * 2 Two characters were copied to the buffer. This usually happens
3282 * when a dead-key character (accent or diacritic) stored in the
3283 * keyboard layout cannot be composed with the specified virtual
3284 * key to form a single character.
3285 * Remark :
3286 * Status : UNTESTED STUB
3287 *
3288 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3289 *****************************************************************************/
3290
3291int WIN32API ToAsciiEx(UINT uVirtKey,
3292 UINT uScanCode,
3293 PBYTE lpbKeyState,
3294 LPWORD lpwTransKey,
3295 UINT fuState,
3296 HKL hkl)
3297{
3298 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
3299 uVirtKey,
3300 uScanCode,
3301 lpbKeyState,
3302 lpwTransKey,
3303 fuState,
3304 hkl));
3305
3306 return (0);
3307}
3308
3309
3310/*****************************************************************************
3311 * Name : int WIN32API ToUnicode
3312 * Purpose : The ToUnicode function translates the specified virtual-key code
3313 * and keyboard state to the corresponding Unicode character or characters.
3314 * Parameters: UINT wVirtKey virtual-key code
3315 * UINT wScanCode scan code
3316 * PBYTE lpKeyState address of key-state array
3317 * LPWSTR pwszBuff buffer for translated key
3318 * int cchBuff size of translated key buffer
3319 * UINT wFlags set of function-conditioning flags
3320 * Variables :
3321 * Result : - 1 The specified virtual key is a dead-key character (accent or
3322 * diacritic). This value is returned regardless of the keyboard
3323 * layout, even if several characters have been typed and are
3324 * stored in the keyboard state. If possible, even with Unicode
3325 * keyboard layouts, the function has written a spacing version of
3326 * the dead-key character to the buffer specified by pwszBuffer.
3327 * For example, the function writes the character SPACING ACUTE
3328 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
3329 * 0 The specified virtual key has no translation for the current
3330 * state of the keyboard. Nothing was written to the buffer
3331 * specified by pwszBuffer.
3332 * 1 One character was written to the buffer specified by pwszBuffer.
3333 * 2 or more Two or more characters were written to the buffer specified by
3334 * pwszBuff. The most common cause for this is that a dead-key
3335 * character (accent or diacritic) stored in the keyboard layout
3336 * could not be combined with the specified virtual key to form a
3337 * single character.
3338 * Remark :
3339 * Status : UNTESTED STUB
3340 *
3341 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3342 *****************************************************************************/
3343
3344int WIN32API ToUnicode(UINT uVirtKey,
3345 UINT uScanCode,
3346 PBYTE lpKeyState,
3347 LPWSTR pwszBuff,
3348 int cchBuff,
3349 UINT wFlags)
3350{
3351 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
3352 uVirtKey,
3353 uScanCode,
3354 lpKeyState,
3355 pwszBuff,
3356 cchBuff,
3357 wFlags));
3358
3359 return (0);
3360}
3361
3362
3363/*****************************************************************************
3364 * Name : BOOL WIN32API UnloadKeyboardLayout
3365 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
3366 * Parameters: HKL hkl handle of keyboard layout
3367 * Variables :
3368 * Result : If the function succeeds, the return value is the handle of the
3369 * keyboard layout; otherwise, it is NULL. To get extended error
3370 * information, use the GetLastError function.
3371 * Remark :
3372 * Status : UNTESTED STUB
3373 *
3374 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3375 *****************************************************************************/
3376
3377BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
3378{
3379 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
3380 hkl));
3381
3382 return (0);
3383}
3384
3385
3386/*****************************************************************************
3387 * Name : SHORT WIN32API VkKeyScanExW
3388 * Purpose : The VkKeyScanEx function translates a character to the
3389 * corresponding virtual-key code and shift state. The function
3390 * translates the character using the input language and physical
3391 * keyboard layout identified by the given keyboard layout handle.
3392 * Parameters: UINT uChar character to translate
3393 * HKL hkl keyboard layout handle
3394 * Variables :
3395 * Result : see docs
3396 * Remark :
3397 * Status : UNTESTED STUB
3398 *
3399 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3400 *****************************************************************************/
3401
3402WORD WIN32API VkKeyScanExW(WCHAR uChar,
3403 HKL hkl)
3404{
3405 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
3406 uChar,
3407 hkl));
3408
3409 return (uChar);
3410}
3411
3412
3413/*****************************************************************************
3414 * Name : SHORT WIN32API VkKeyScanExA
3415 * Purpose : The VkKeyScanEx function translates a character to the
3416 * corresponding virtual-key code and shift state. The function
3417 * translates the character using the input language and physical
3418 * keyboard layout identified by the given keyboard layout handle.
3419 * Parameters: UINT uChar character to translate
3420 * HKL hkl keyboard layout handle
3421 * Variables :
3422 * Result : see docs
3423 * Remark :
3424 * Status : UNTESTED STUB
3425 *
3426 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3427 *****************************************************************************/
3428
3429WORD WIN32API VkKeyScanExA(CHAR uChar,
3430 HKL hkl)
3431{
3432 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
3433 uChar,
3434 hkl));
3435
3436 return (uChar);
3437}
3438
3439
3440/*****************************************************************************
3441 * Name : VOID WIN32API keybd_event
3442 * Purpose : The keybd_event function synthesizes a keystroke. The system
3443 * can use such a synthesized keystroke to generate a WM_KEYUP or
3444 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
3445 * the keybd_event function.
3446 * Parameters: BYTE bVk virtual-key code
3447
3448 * BYTE bScan hardware scan code
3449 * DWORD dwFlags flags specifying various function options
3450 * DWORD dwExtraInfo additional data associated with keystroke
3451 * Variables :
3452 * Result :
3453 * Remark :
3454 * Status : UNTESTED STUB
3455 *
3456 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3457 *****************************************************************************/
3458
3459VOID WIN32API keybd_event (BYTE bVk,
3460 BYTE bScan,
3461 DWORD dwFlags,
3462 DWORD dwExtraInfo)
3463{
3464 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
3465 bVk,
3466 bScan,
3467 dwFlags,
3468 dwExtraInfo));
3469}
3470
3471
3472/*****************************************************************************
3473 * Name : VOID WIN32API mouse_event
3474 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
3475 * Parameters: DWORD dwFlags flags specifying various motion/click variants
3476 * DWORD dx horizontal mouse position or position change
3477 * DWORD dy vertical mouse position or position change
3478 * DWORD cButtons unused, reserved for future use, set to zero
3479 * DWORD dwExtraInfo 32 bits of application-defined information
3480 * Variables :
3481 * Result :
3482 * Remark :
3483 * Status : UNTESTED STUB
3484 *
3485 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3486 *****************************************************************************/
3487
3488VOID WIN32API mouse_event(DWORD dwFlags,
3489 DWORD dx,
3490 DWORD dy,
3491 DWORD cButtons,
3492 DWORD dwExtraInfo)
3493{
3494 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
3495 dwFlags,
3496 dx,
3497 dy,
3498 cButtons,
3499 dwExtraInfo));
3500}
3501
3502
3503/*****************************************************************************
3504 * Name : BOOL WIN32API SetShellWindow
3505 * Purpose : Unknown
3506 * Parameters: Unknown
3507 * Variables :
3508 * Result :
3509 * Remark :
3510 * Status : UNTESTED UNKNOWN STUB
3511 *
3512 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3513 *****************************************************************************/
3514
3515BOOL WIN32API SetShellWindow(DWORD x1)
3516{
3517 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
3518 x1));
3519
3520 return (FALSE); /* default */
3521}
3522
3523
3524/*****************************************************************************
3525 * Name : BOOL WIN32API PlaySoundEvent
3526 * Purpose : Unknown
3527 * Parameters: Unknown
3528 * Variables :
3529 * Result :
3530 * Remark :
3531 * Status : UNTESTED UNKNOWN STUB
3532 *
3533 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3534 *****************************************************************************/
3535
3536BOOL WIN32API PlaySoundEvent(DWORD x1)
3537{
3538 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
3539 x1));
3540
3541 return (FALSE); /* default */
3542}
3543
3544
3545/*****************************************************************************
3546 * Name : BOOL WIN32API TileChildWindows
3547 * Purpose : Unknown
3548 * Parameters: Unknown
3549 * Variables :
3550 * Result :
3551 * Remark :
3552 * Status : UNTESTED UNKNOWN STUB
3553 *
3554 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3555 *****************************************************************************/
3556
3557BOOL WIN32API TileChildWindows(DWORD x1,
3558 DWORD x2)
3559{
3560 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
3561 x1,
3562 x2));
3563
3564 return (FALSE); /* default */
3565}
3566
3567
3568/*****************************************************************************
3569 * Name : BOOL WIN32API SetSysColorsTemp
3570 * Purpose : Unknown
3571 * Parameters: Unknown
3572 * Variables :
3573 * Result :
3574 * Remark :
3575 * Status : UNTESTED UNKNOWN STUB
3576 *
3577 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3578 *****************************************************************************/
3579
3580BOOL WIN32API SetSysColorsTemp(void)
3581{
3582 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
3583
3584 return (FALSE); /* default */
3585}
3586
3587
3588/*****************************************************************************
3589 * Name : BOOL WIN32API RegisterNetworkCapabilities
3590 * Purpose : Unknown
3591 * Parameters: Unknown
3592 * Variables :
3593 * Result :
3594 * Remark :
3595 * Status : UNTESTED UNKNOWN STUB
3596 *
3597 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3598 *****************************************************************************/
3599
3600BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
3601 DWORD x2)
3602{
3603 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
3604 x1,
3605 x2));
3606
3607 return (FALSE); /* default */
3608}
3609
3610
3611/*****************************************************************************
3612 * Name : BOOL WIN32API EndTask
3613 * Purpose : Unknown
3614 * Parameters: Unknown
3615 * Variables :
3616 * Result :
3617 * Remark :
3618 * Status : UNTESTED UNKNOWN STUB
3619 *
3620 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3621 *****************************************************************************/
3622
3623BOOL WIN32API EndTask(DWORD x1,
3624 DWORD x2,
3625 DWORD x3)
3626{
3627 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
3628 x1,
3629 x2,
3630 x3));
3631
3632 return (FALSE); /* default */
3633}
3634
3635
3636
3637/*****************************************************************************
3638 * Name : BOOL WIN32API GetNextQueueWindow
3639 * Purpose : Unknown
3640 * Parameters: Unknown
3641 * Variables :
3642 * Result :
3643 * Remark :
3644 * Status : UNTESTED UNKNOWN STUB
3645 *
3646 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3647 *****************************************************************************/
3648
3649BOOL WIN32API GetNextQueueWindow(DWORD x1,
3650 DWORD x2)
3651{
3652 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
3653 x1,
3654 x2));
3655
3656 return (FALSE); /* default */
3657}
3658
3659
3660/*****************************************************************************
3661 * Name : BOOL WIN32API YieldTask
3662 * Purpose : Unknown
3663 * Parameters: Unknown
3664 * Variables :
3665 * Result :
3666 * Remark :
3667 * Status : UNTESTED UNKNOWN STUB
3668 *
3669 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3670 *****************************************************************************/
3671
3672BOOL WIN32API YieldTask(void)
3673{
3674 dprintf(("USER32: YieldTask() not implemented.\n"));
3675
3676 return (FALSE); /* default */
3677}
3678
3679
3680/*****************************************************************************
3681 * Name : BOOL WIN32API WinOldAppHackoMatic
3682 * Purpose : Unknown
3683 * Parameters: Unknown
3684 * Variables :
3685 * Result :
3686 * Remark :
3687 * Status : UNTESTED UNKNOWN STUB
3688 *
3689 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3690 *****************************************************************************/
3691
3692BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
3693{
3694 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
3695 x1));
3696
3697 return (FALSE); /* default */
3698}
3699
3700
3701/*****************************************************************************
3702 * Name : BOOL WIN32API DragObject
3703 * Purpose : Unknown
3704 * Parameters: Unknown
3705 * Variables :
3706 * Result :
3707 * Remark :
3708 * Status : UNTESTED UNKNOWN STUB
3709 *
3710 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3711 *****************************************************************************/
3712
3713DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
3714{
3715 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3716 x1,
3717 x2,
3718 x3,
3719 x4,
3720 x5));
3721
3722 return (FALSE); /* default */
3723}
3724
3725
3726/*****************************************************************************
3727 * Name : BOOL WIN32API CascadeChildWindows
3728 * Purpose : Unknown
3729 * Parameters: Unknown
3730 * Variables :
3731 * Result :
3732 * Remark :
3733 * Status : UNTESTED UNKNOWN STUB
3734 *
3735 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3736 *****************************************************************************/
3737
3738BOOL WIN32API CascadeChildWindows(DWORD x1,
3739 DWORD x2)
3740{
3741 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
3742 x1,
3743 x2));
3744
3745 return (FALSE); /* default */
3746}
3747
3748
3749/*****************************************************************************
3750 * Name : BOOL WIN32API RegisterSystemThread
3751 * Purpose : Unknown
3752 * Parameters: Unknown
3753 * Variables :
3754 * Result :
3755 * Remark :
3756 * Status : UNTESTED UNKNOWN STUB
3757 *
3758 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3759 *****************************************************************************/
3760
3761BOOL WIN32API RegisterSystemThread(DWORD x1,
3762 DWORD x2)
3763{
3764 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
3765 x1,
3766 x2));
3767
3768 return (FALSE); /* default */
3769}
3770
3771
3772/*****************************************************************************
3773 * Name : BOOL WIN32API IsHungThread
3774 * Purpose : Unknown
3775 * Parameters: Unknown
3776 * Variables :
3777 * Result :
3778 * Remark :
3779 * Status : UNTESTED UNKNOWN STUB
3780 *
3781 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3782 *****************************************************************************/
3783
3784BOOL WIN32API IsHungThread(DWORD x1)
3785{
3786 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
3787 x1));
3788
3789 return (FALSE); /* default */
3790}
3791
3792
3793
3794/*****************************************************************************
3795 * Name : BOOL WIN32API UserSignalProc
3796 * Purpose : Unknown
3797 * Parameters: Unknown
3798 * Variables :
3799 * Result :
3800 * Remark :
3801 * Status : UNTESTED UNKNOWN STUB
3802 *
3803 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3804 *****************************************************************************/
3805
3806BOOL WIN32API UserSignalProc(DWORD x1,
3807 DWORD x2,
3808 DWORD x3,
3809 DWORD x4)
3810{
3811 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3812 x1,
3813 x2,
3814 x3,
3815 x4));
3816
3817 return (FALSE); /* default */
3818}
3819
3820
3821/*****************************************************************************
3822 * Name : BOOL WIN32API GetShellWindow
3823 * Purpose : Unknown
3824 * Parameters: Unknown
3825 * Variables :
3826 * Result :
3827 * Remark :
3828 * Status : UNTESTED UNKNOWN STUB
3829 *
3830 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3831 *****************************************************************************/
3832
3833HWND WIN32API GetShellWindow(void)
3834{
3835 dprintf(("USER32: GetShellWindow() not implemented.\n"));
3836
3837 return (0); /* default */
3838}
3839
3840
3841
3842/***********************************************************************
3843 * RegisterTasklist32 [USER32.436]
3844 */
3845DWORD WIN32API RegisterTasklist (DWORD x)
3846{
3847 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
3848 x));
3849
3850 return TRUE;
3851}
3852
3853
Note: See TracBrowser for help on using the repository browser.