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

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

SetTimer/KillTimer implemented

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