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

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

ScrollDC implemented

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