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

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

Caret functions added

File size: 136.5 KB
Line 
1/* $Id: user32.cpp,v 1.34 1999-09-28 08:00:56 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//******************************************************************************
1271BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
1272{
1273#ifdef DEBUG
1274 WriteLog("USER32: ScrollDC\n");
1275#endif
1276 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1277}
1278//******************************************************************************
1279//******************************************************************************
1280BOOL WIN32API SetDoubleClickTime( UINT arg1)
1281{
1282#ifdef DEBUG
1283 WriteLog("USER32: SetDoubleClickTime\n");
1284#endif
1285 return O32_SetDoubleClickTime(arg1);
1286}
1287//******************************************************************************
1288//******************************************************************************
1289BOOL WIN32API SwapMouseButton( BOOL arg1)
1290{
1291#ifdef DEBUG
1292 WriteLog("USER32: SwapMouseButton\n");
1293#endif
1294 return O32_SwapMouseButton(arg1);
1295}
1296//******************************************************************************
1297/* Not support by Open32 (not included are the new win9x parameters):
1298 case SPI_GETFASTTASKSWITCH:
1299 case SPI_GETGRIDGRANULARITY:
1300 case SPI_GETICONTITLELOGFONT:
1301 case SPI_GETICONTITLEWRAP:
1302 case SPI_GETMENUDROPALIGNMENT:
1303 case SPI_ICONHORIZONTALSPACING:
1304 case SPI_ICONVERTICALSPACING:
1305 case SPI_LANGDRIVER:
1306 case SPI_SETFASTTASKSWITCH:
1307 case SPI_SETGRIDGRANULARITY:
1308 case SPI_SETICONTITLELOGFONT:
1309 case SPI_SETICONTITLEWRAP:
1310 case SPI_SETMENUDROPALIGNMENT:
1311 case SPI_GETSCREENSAVEACTIVE:
1312 case SPI_GETSCREENSAVETIMEOUT:
1313 case SPI_SETDESKPATTERN:
1314 case SPI_SETDESKWALLPAPER:
1315 case SPI_SETSCREENSAVEACTIVE:
1316 case SPI_SETSCREENSAVETIMEOUT:
1317*/
1318//******************************************************************************
1319BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
1320{
1321 BOOL rc = TRUE;
1322 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
1323
1324 switch(uiAction) {
1325 case SPI_SCREENSAVERRUNNING:
1326 *(BOOL *)pvParam = FALSE;
1327 break;
1328 case SPI_GETDRAGFULLWINDOWS:
1329 *(BOOL *)pvParam = FALSE;
1330 break;
1331 case SPI_GETNONCLIENTMETRICS:
1332 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
1333 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
1334 //CB: font info not valid, needs improvements
1335 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
1336 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
1337 //CB: experimental change for statusbar (and tooltips)
1338
1339 //O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
1340 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
1341 cmetric->lfStatusFont.lfHeight = 9;
1342
1343 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
1344 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
1345 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
1346 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
1347 cmetric->iCaptionWidth = 32; //TODO
1348 cmetric->iCaptionHeight = 16; //TODO
1349 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
1350 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
1351 cmetric->iMenuWidth = 32; //TODO
1352 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
1353 break;
1354 case SPI_GETICONTITLELOGFONT:
1355 {
1356 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
1357
1358 /* from now on we always have an alias for MS Sans Serif */
1359 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
1360 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
1361 lpLogFont->lfWidth = 0;
1362 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
1363 lpLogFont->lfWeight = FW_NORMAL;
1364 lpLogFont->lfItalic = FALSE;
1365 lpLogFont->lfStrikeOut = FALSE;
1366 lpLogFont->lfUnderline = FALSE;
1367 lpLogFont->lfCharSet = ANSI_CHARSET;
1368 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1369 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1370 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1371 break;
1372 }
1373 case SPI_GETBORDER:
1374 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
1375 break;
1376
1377 case SPI_GETWORKAREA:
1378 SetRect( (RECT *)pvParam, 0, 0,
1379 GetSystemMetrics( SM_CXSCREEN ),
1380 GetSystemMetrics( SM_CYSCREEN )
1381 );
1382 break;
1383
1384 case 104: //TODO: Undocumented
1385 rc = 16;
1386 break;
1387 default:
1388 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
1389 break;
1390 }
1391#ifdef DEBUG
1392 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
1393#endif
1394 return(rc);
1395}
1396//******************************************************************************
1397//TODO: Check for more options that have different structs for Unicode!!!!
1398//******************************************************************************
1399BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
1400{
1401 BOOL rc;
1402 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
1403 NONCLIENTMETRICSA clientMetricsA = {0};
1404 PVOID pvParamA;
1405 UINT uiParamA;
1406
1407 switch(uiAction) {
1408 case SPI_SETNONCLIENTMETRICS:
1409 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
1410 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
1411 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
1412 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
1413 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
1414 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
1415 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
1416 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
1417 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
1418 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
1419 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
1420 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
1421 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
1422 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
1423 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
1424 //no break
1425 case SPI_GETNONCLIENTMETRICS:
1426 uiParamA = sizeof(NONCLIENTMETRICSA);
1427 pvParamA = &clientMetricsA;
1428 break;
1429 case SPI_GETICONTITLELOGFONT:
1430 {
1431 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
1432
1433 /* from now on we always have an alias for MS Sans Serif */
1434 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
1435 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
1436 lpLogFont->lfWidth = 0;
1437 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
1438 lpLogFont->lfWeight = FW_NORMAL;
1439 lpLogFont->lfItalic = FALSE;
1440 lpLogFont->lfStrikeOut = FALSE;
1441 lpLogFont->lfUnderline = FALSE;
1442 lpLogFont->lfCharSet = ANSI_CHARSET;
1443 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1444 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1445 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1446 return TRUE;
1447 }
1448 default:
1449 pvParamA = pvParam;
1450 uiParamA = uiParam;
1451 break;
1452 }
1453 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1454
1455 switch(uiAction) {
1456 case SPI_GETNONCLIENTMETRICS:
1457 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1458 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1459 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1460 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1461 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1462 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1463 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1464
1465 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1466 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1467 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1468
1469 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1470 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1471 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1472 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1473 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1474 break;
1475 }
1476#ifdef DEBUG
1477 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
1478#endif
1479 return(rc);
1480}
1481//******************************************************************************
1482//******************************************************************************
1483LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
1484{
1485#ifdef DEBUG
1486 WriteLog("USER32: TabbedTextOutA\n");
1487#endif
1488 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1489}
1490//******************************************************************************
1491//******************************************************************************
1492LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
1493{
1494 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
1495 LONG rc;
1496
1497#ifdef DEBUG
1498 WriteLog("USER32: TabbedTextOutW\n");
1499#endif
1500 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
1501 FreeAsciiString(astring);
1502 return rc;
1503}
1504//******************************************************************************
1505//******************************************************************************
1506BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
1507{
1508#ifdef DEBUG
1509 WriteLog("USER32: ValidateRect\n");
1510#endif
1511 return O32_ValidateRect(arg1, arg2);
1512}
1513//******************************************************************************
1514//******************************************************************************
1515BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
1516{
1517#ifdef DEBUG
1518 WriteLog("USER32: ValidateRgn\n");
1519#endif
1520 return O32_ValidateRgn(arg1, arg2);
1521}
1522//******************************************************************************
1523//******************************************************************************
1524WORD WIN32API VkKeyScanW( WCHAR arg1)
1525{
1526#ifdef DEBUG
1527 WriteLog("USER32: VkKeyScanW\n");
1528#endif
1529 // NOTE: This will not work as is (needs UNICODE support)
1530 return O32_VkKeyScan((char)arg1);
1531}
1532//******************************************************************************
1533//******************************************************************************
1534BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
1535{
1536 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1537 BOOL rc;
1538
1539#ifdef DEBUG
1540 WriteLog("USER32: WinHelpW\n");
1541#endif
1542 rc = WinHelpA(arg1, astring, arg3, arg4);
1543 FreeAsciiString(astring);
1544 return rc;
1545}
1546//******************************************************************************
1547//TODO: Not complete
1548//******************************************************************************
1549BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1550 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1551 int nHeight)
1552{
1553 BOOL rc;
1554 COLORREF curclr;
1555
1556#ifdef DEBUG
1557 WriteLog("USER32: GrayStringA, not completely implemented\n");
1558#endif
1559 if(lpOutputFunc == NULL && lpData == NULL) {
1560#ifdef DEBUG
1561 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1562#endif
1563 return(FALSE);
1564 }
1565 if(lpOutputFunc) {
1566 return(lpOutputFunc(hdc, lpData, nCount));
1567 }
1568 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1569 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
1570 SetTextColor(hdc, curclr);
1571
1572 return(rc);
1573}
1574//******************************************************************************
1575//******************************************************************************
1576BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1577 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1578 int nHeight)
1579{
1580 BOOL rc;
1581 char *astring;
1582 COLORREF curclr;
1583
1584#ifdef DEBUG
1585 WriteLog("USER32: GrayStringW, not completely implemented\n");
1586#endif
1587
1588 if(lpOutputFunc == NULL && lpData == NULL) {
1589#ifdef DEBUG
1590 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1591#endif
1592 return(FALSE);
1593 }
1594 if(nCount == 0)
1595 nCount = UniStrlen((UniChar*)lpData);
1596
1597 if(lpOutputFunc) {
1598 return(lpOutputFunc(hdc, lpData, nCount));
1599 }
1600 astring = UnicodeToAsciiString((LPWSTR)lpData);
1601
1602 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1603 rc = TextOutA(hdc, X, Y, astring, nCount);
1604 SetTextColor(hdc, curclr);
1605
1606 FreeAsciiString(astring);
1607 return(rc);
1608}
1609//******************************************************************************
1610//TODO:
1611//******************************************************************************
1612HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
1613{
1614#ifdef DEBUG
1615 WriteLog("USER32: CopyImage, not implemented\n");
1616#endif
1617 switch(uType) {
1618 case IMAGE_BITMAP:
1619 case IMAGE_CURSOR:
1620 case IMAGE_ICON:
1621 default:
1622#ifdef DEBUG
1623 WriteLog("USER32: CopyImage, unknown type\n");
1624#endif
1625 return(NULL);
1626 }
1627 return(NULL);
1628}
1629//******************************************************************************
1630//******************************************************************************
1631BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
1632{
1633#ifdef DEBUG
1634 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
1635#endif
1636 memset(lpKeyState, 0, 256);
1637 return(TRUE);
1638}
1639//******************************************************************************
1640//******************************************************************************
1641BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
1642{
1643#ifdef DEBUG
1644 WriteLog("USER32: SetKeyboardState, not implemented\n");
1645#endif
1646 return(TRUE);
1647}
1648//******************************************************************************
1649//2nd parameter not used according to SDK (yet?)
1650//******************************************************************************
1651VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
1652{
1653#ifdef DEBUG
1654 WriteLog("USER32: SetLastErrorEx\n");
1655#endif
1656 SetLastError(dwErrCode);
1657}
1658//******************************************************************************
1659//******************************************************************************
1660BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1661{
1662#ifdef DEBUG
1663 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
1664#endif
1665 return(TRUE);
1666}
1667//******************************************************************************
1668//******************************************************************************
1669int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
1670{
1671#ifdef DEBUG
1672 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
1673#endif
1674 return(0);
1675}
1676//******************************************************************************
1677//******************************************************************************
1678HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
1679{
1680#ifdef DEBUG
1681 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
1682#endif
1683 return(0);
1684}
1685//******************************************************************************
1686//******************************************************************************
1687int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
1688{
1689#ifdef DEBUG
1690 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
1691#endif
1692 return(0);
1693}
1694//******************************************************************************
1695//******************************************************************************
1696int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
1697 int cxDesired, int cyDesired,
1698 UINT Flags)
1699{
1700#ifdef DEBUG
1701 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
1702#endif
1703 return(0);
1704}
1705//******************************************************************************
1706//DWORD idAttach; /* thread to attach */
1707//DWORD idAttachTo; /* thread to attach to */
1708//BOOL fAttach; /* attach or detach */
1709//******************************************************************************
1710BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1711{
1712#ifdef DEBUG
1713 WriteLog("USER32: AttachThreadInput, not implemented\n");
1714#endif
1715 return(TRUE);
1716}
1717//******************************************************************************
1718//******************************************************************************
1719BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1720{
1721#ifdef DEBUG
1722 WriteLog("USER32: RegisterHotKey, not implemented\n");
1723#endif
1724 return(TRUE);
1725}
1726//******************************************************************************
1727//******************************************************************************
1728BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1729{
1730#ifdef DEBUG
1731 WriteLog("USER32: UnregisterHotKey, not implemented\n");
1732#endif
1733 return(TRUE);
1734}
1735//******************************************************************************
1736//******************************************************************************
1737BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
1738{
1739#ifdef DEBUG
1740 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
1741#endif
1742 return(TRUE);
1743}
1744//******************************************************************************
1745//******************************************************************************
1746DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
1747{
1748#ifdef DEBUG
1749 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
1750#endif
1751 return(0);
1752}
1753//******************************************************************************
1754//******************************************************************************
1755BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
1756{
1757#ifdef DEBUG
1758 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
1759#endif
1760 return(FALSE);
1761}
1762//******************************************************************************
1763//******************************************************************************
1764BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
1765{
1766#ifdef DEBUG
1767 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
1768#endif
1769 return(FALSE);
1770}
1771//******************************************************************************
1772//******************************************************************************
1773HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
1774{
1775#ifdef DEBUG
1776 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
1777#endif
1778 return(0);
1779}
1780//******************************************************************************
1781//******************************************************************************
1782HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
1783{
1784#ifdef DEBUG
1785 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
1786#endif
1787 return(0);
1788}
1789//******************************************************************************
1790//******************************************************************************
1791HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
1792{
1793#ifdef DEBUG
1794 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
1795#endif
1796 return(0);
1797}
1798//******************************************************************************
1799//******************************************************************************
1800BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
1801{
1802#ifdef DEBUG
1803 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
1804#endif
1805 return(FALSE);
1806}
1807//******************************************************************************
1808//******************************************************************************
1809BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
1810 LPDEVMODEA lpDevMode)
1811{
1812#ifdef DEBUG
1813 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
1814#endif
1815 switch(iModeNum) {
1816 case 0:
1817 lpDevMode->dmBitsPerPel = 16;
1818 lpDevMode->dmPelsWidth = 768;
1819 lpDevMode->dmPelsHeight = 1024;
1820 lpDevMode->dmDisplayFlags = 0;
1821 lpDevMode->dmDisplayFrequency = 70;
1822 break;
1823 case 1:
1824 lpDevMode->dmBitsPerPel = 16;
1825 lpDevMode->dmPelsWidth = 640;
1826 lpDevMode->dmPelsHeight = 480;
1827 lpDevMode->dmDisplayFlags = 0;
1828 lpDevMode->dmDisplayFrequency = 70;
1829 break;
1830 default:
1831 return(FALSE);
1832 }
1833 return(TRUE);
1834}
1835//******************************************************************************
1836//******************************************************************************
1837LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
1838{
1839#ifdef DEBUG
1840 if(lpDevMode) {
1841 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
1842 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
1843 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
1844 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
1845 }
1846#endif
1847 return(DISP_CHANGE_SUCCESSFUL);
1848}
1849//******************************************************************************
1850//******************************************************************************
1851
1852
1853/*****************************************************************************
1854 * Name : BOOL WIN32API AnyPopup
1855 * Purpose : The AnyPopup function indicates whether an owned, visible,
1856 * top-level pop-up, or overlapped window exists on the screen. The
1857 * function searches the entire Windows screen, not just the calling
1858 * application's client area.
1859 * Parameters: VOID
1860 * Variables :
1861 * Result : If a pop-up window exists, the return value is TRUE even if the
1862 * pop-up window is completely covered by other windows. Otherwise,
1863 * it is FALSE.
1864 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1865 * compatibility purposes. It is generally not useful.
1866 * Status : UNTESTED STUB
1867 *
1868 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1869 *****************************************************************************/
1870
1871BOOL WIN32API AnyPopup(VOID)
1872{
1873 dprintf(("USER32:AnyPopup() not implemented.\n"));
1874
1875 return (FALSE);
1876}
1877
1878
1879
1880/*****************************************************************************
1881 * Name : LONG WIN32API ChangeDisplaySettingsW
1882 * Purpose : The ChangeDisplaySettings function changes the display settings
1883 * to the specified graphics mode.
1884 * Parameters: LPDEVMODEW lpDevModeW
1885 * DWORD dwFlags
1886 * Variables :
1887 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
1888 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
1889 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
1890 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
1891 * DISP_CHANGE_BADMODE The graphics mode is not supported.
1892 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
1893 * Remark :
1894 * Status : UNTESTED STUB
1895 *
1896 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1897 *****************************************************************************/
1898
1899LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
1900 DWORD dwFlags)
1901{
1902 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
1903 lpDevMode,
1904 dwFlags));
1905
1906 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
1907 dwFlags));
1908}
1909
1910/*****************************************************************************
1911 * Name : BOOL WIN32API CloseDesktop
1912 * Purpose : The CloseDesktop function closes an open handle of a desktop
1913 * object. A desktop is a secure object contained within a window
1914 * station object. A desktop has a logical display surface and
1915 * contains windows, menus and hooks.
1916 * Parameters: HDESK hDesktop
1917 * Variables :
1918 * Result : If the function succeeds, the return value is TRUE.
1919 * If the functions fails, the return value is FALSE. To get
1920 * extended error information, call GetLastError.
1921 * Remark :
1922 * Status : UNTESTED STUB
1923 *
1924 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1925 *****************************************************************************/
1926
1927BOOL WIN32API CloseDesktop(HDESK hDesktop)
1928{
1929 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1930 hDesktop));
1931
1932 return (FALSE);
1933}
1934
1935
1936/*****************************************************************************
1937 * Name : BOOL WIN32API CloseWindowStation
1938 * Purpose : The CloseWindowStation function closes an open window station handle.
1939 * Parameters: HWINSTA hWinSta
1940 * Variables :
1941 * Result :
1942 * Remark : If the function succeeds, the return value is TRUE.
1943 * If the functions fails, the return value is FALSE. To get
1944 * extended error information, call GetLastError.
1945 * Status : UNTESTED STUB
1946 *
1947 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1948 *****************************************************************************/
1949
1950BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1951{
1952 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1953 hWinSta));
1954
1955 return (FALSE);
1956}
1957
1958
1959/*****************************************************************************
1960 * Name : HDESK WIN32API CreateDesktopA
1961 * Purpose : The CreateDesktop function creates a new desktop on the window
1962 * station associated with the calling process.
1963 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1964 * LPCTSTR lpszDevice name of display device to assign to the desktop
1965 * LPDEVMODE pDevMode reserved; must be NULL
1966 * DWORD dwFlags flags to control interaction with other applications
1967 * DWORD dwDesiredAccess specifies access of returned handle
1968 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1969 * Variables :
1970 * Result : If the function succeeds, the return value is a handle of the
1971 * newly created desktop.
1972 * If the function fails, the return value is NULL. To get extended
1973 * error information, call GetLastError.
1974 * Remark :
1975 * Status : UNTESTED STUB
1976 *
1977 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1978 *****************************************************************************/
1979
1980HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1981 LPCTSTR lpszDevice,
1982 LPDEVMODEA pDevMode,
1983 DWORD dwFlags,
1984 DWORD dwDesiredAccess,
1985 LPSECURITY_ATTRIBUTES lpsa)
1986{
1987 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1988 lpszDesktop,
1989 lpszDevice,
1990 pDevMode,
1991 dwFlags,
1992 dwDesiredAccess,
1993 lpsa));
1994
1995 return (NULL);
1996}
1997
1998
1999/*****************************************************************************
2000 * Name : HDESK WIN32API CreateDesktopW
2001 * Purpose : The CreateDesktop function creates a new desktop on the window
2002 * station associated with the calling process.
2003 * Parameters: LPCTSTR lpszDesktop name of the new desktop
2004 * LPCTSTR lpszDevice name of display device to assign to the desktop
2005 * LPDEVMODE pDevMode reserved; must be NULL
2006 * DWORD dwFlags flags to control interaction with other applications
2007 * DWORD dwDesiredAccess specifies access of returned handle
2008 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
2009 * Variables :
2010 * Result : If the function succeeds, the return value is a handle of the
2011 * newly created desktop.
2012 * If the function fails, the return value is NULL. To get extended
2013 * error information, call GetLastError.
2014 * Remark :
2015 * Status : UNTESTED STUB
2016 *
2017 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2018 *****************************************************************************/
2019
2020HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
2021 LPCTSTR lpszDevice,
2022 LPDEVMODEW pDevMode,
2023 DWORD dwFlags,
2024 DWORD dwDesiredAccess,
2025 LPSECURITY_ATTRIBUTES lpsa)
2026{
2027 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
2028 lpszDesktop,
2029 lpszDevice,
2030 pDevMode,
2031 dwFlags,
2032 dwDesiredAccess,
2033 lpsa));
2034
2035 return (NULL);
2036}
2037
2038
2039/*****************************************************************************
2040 * Name : HWINSTA WIN32API CreateWindowStationA
2041 * Purpose : The CreateWindowStation function creates a window station object.
2042 * It returns a handle that can be used to access the window station.
2043 * A window station is a secure object that contains a set of global
2044 * atoms, a clipboard, and a set of desktop objects.
2045 * Parameters: LPTSTR lpwinsta name of the new window station
2046 * DWORD dwReserved reserved; must be NULL
2047 * DWORD dwDesiredAccess specifies access of returned handle
2048 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
2049 * Variables :
2050 * Result : If the function succeeds, the return value is the handle to the
2051 * newly created window station.
2052 * If the function fails, the return value is NULL. To get extended
2053 * error information, call GetLastError.
2054 * Remark :
2055 * Status : UNTESTED STUB
2056 *
2057 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2058 *****************************************************************************/
2059
2060HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
2061 DWORD dwReserved,
2062 DWORD dwDesiredAccess,
2063 LPSECURITY_ATTRIBUTES lpsa)
2064{
2065 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
2066 lpWinSta,
2067 dwReserved,
2068 dwDesiredAccess,
2069 lpsa));
2070
2071 return (NULL);
2072}
2073
2074
2075/*****************************************************************************
2076 * Name : HWINSTA WIN32API CreateWindowStationW
2077 * Purpose : The CreateWindowStation function creates a window station object.
2078 * It returns a handle that can be used to access the window station.
2079 * A window station is a secure object that contains a set of global
2080 * atoms, a clipboard, and a set of desktop objects.
2081 * Parameters: LPTSTR lpwinsta name of the new window station
2082 * DWORD dwReserved reserved; must be NULL
2083 * DWORD dwDesiredAccess specifies access of returned handle
2084 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
2085 * Variables :
2086 * Result : If the function succeeds, the return value is the handle to the
2087 * newly created window station.
2088 * If the function fails, the return value is NULL. To get extended
2089 * error information, call GetLastError.
2090 * Remark :
2091 * Status : UNTESTED STUB
2092 *
2093 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2094 *****************************************************************************/
2095
2096HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
2097 DWORD dwReserved,
2098 DWORD dwDesiredAccess,
2099 LPSECURITY_ATTRIBUTES lpsa)
2100{
2101 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
2102 lpWinSta,
2103 dwReserved,
2104 dwDesiredAccess,
2105 lpsa));
2106
2107 return (NULL);
2108}
2109
2110/*****************************************************************************
2111 * Name : BOOL WIN32API DragDetect
2112 * Purpose : The DragDetect function captures the mouse and tracks its movement
2113 * Parameters: HWND hwnd
2114 * POINT pt
2115 * Variables :
2116 * Result : If the user moved the mouse outside of the drag rectangle while
2117 * holding the left button down, the return value is TRUE.
2118 * If the user did not move the mouse outside of the drag rectangle
2119 * while holding the left button down, the return value is FALSE.
2120 * Remark :
2121 * Status : UNTESTED STUB
2122 *
2123 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2124 *****************************************************************************/
2125
2126BOOL WIN32API DragDetect(HWND hwnd,
2127 POINT pt)
2128{
2129 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
2130 hwnd));
2131
2132 return (FALSE);
2133}
2134
2135
2136
2137/*****************************************************************************
2138 * Name : BOOL WIN32API EnumDesktopWindows
2139 * Purpose : The EnumDesktopWindows function enumerates all windows in a
2140 * desktop by passing the handle of each window, in turn, to an
2141 * application-defined callback function.
2142 * Parameters: HDESK hDesktop handle of desktop to enumerate
2143 * WNDENUMPROC lpfn points to application's callback function
2144 * LPARAM lParam 32-bit value to pass to the callback function
2145 * Variables :
2146 * Result : If the function succeeds, the return value is TRUE.
2147 * If the function fails, the return value is FALSE. To get
2148 * extended error information, call GetLastError.
2149 * Remark :
2150 * Status : UNTESTED STUB
2151 *
2152 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2153 *****************************************************************************/
2154
2155BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
2156 WNDENUMPROC lpfn,
2157 LPARAM lParam)
2158{
2159 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
2160 hDesktop,
2161 lpfn,
2162 lParam));
2163
2164 return (FALSE);
2165}
2166
2167
2168/*****************************************************************************
2169 * Name : BOOL WIN32API EnumDesktopsA
2170 * Purpose : The EnumDesktops function enumerates all desktops in the window
2171 * station assigned to the calling process. The function does so by
2172 * passing the name of each desktop, in turn, to an application-
2173 * defined callback function.
2174 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2175 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2176 * LPARAM lParam 32-bit value to pass to the callback function
2177 * Variables :
2178 * Result : If the function succeeds, the return value is TRUE.
2179 * If the function fails, the return value is FALSE. To get extended
2180 * error information, call GetLastError.
2181 * Remark :
2182 * Status : UNTESTED STUB
2183 *
2184 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2185 *****************************************************************************/
2186
2187BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
2188 DESKTOPENUMPROCA lpEnumFunc,
2189 LPARAM lParam)
2190{
2191 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
2192 hWinSta,
2193 lpEnumFunc,
2194 lParam));
2195
2196 return (FALSE);
2197}
2198
2199
2200/*****************************************************************************
2201 * Name : BOOL WIN32API EnumDesktopsW
2202 * Purpose : The EnumDesktops function enumerates all desktops in the window
2203 * station assigned to the calling process. The function does so by
2204 * passing the name of each desktop, in turn, to an application-
2205 * defined callback function.
2206 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2207 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2208 * LPARAM lParam 32-bit value to pass to the callback function
2209 * Variables :
2210 * Result : If the function succeeds, the return value is TRUE.
2211 * If the function fails, the return value is FALSE. To get extended
2212 * error information, call GetLastError.
2213 * Remark :
2214 * Status : UNTESTED STUB
2215 *
2216 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2217 *****************************************************************************/
2218
2219BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
2220 DESKTOPENUMPROCW lpEnumFunc,
2221 LPARAM lParam)
2222{
2223 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
2224 hWinSta,
2225 lpEnumFunc,
2226 lParam));
2227
2228 return (FALSE);
2229}
2230
2231
2232
2233/*****************************************************************************
2234 * Name : BOOL WIN32API EnumDisplaySettingsW
2235 * Purpose : The EnumDisplaySettings function obtains information about one
2236 * of a display device's graphics modes. You can obtain information
2237 * for all of a display device's graphics modes by making a series
2238 * of calls to this function.
2239 * Parameters: LPCTSTR lpszDeviceName specifies the display device
2240 * DWORD iModeNum specifies the graphics mode
2241 * LPDEVMODE lpDevMode points to structure to receive settings
2242 * Variables :
2243 * Result : If the function succeeds, the return value is TRUE.
2244 * If the function fails, the return value is FALSE.
2245 * Remark :
2246 * Status : UNTESTED STUB
2247 *
2248 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2249 *****************************************************************************/
2250
2251BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
2252 DWORD iModeNum,
2253 LPDEVMODEW lpDevMode)
2254{
2255 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
2256 lpszDeviceName,
2257 iModeNum,
2258 lpDevMode));
2259
2260 return (EnumDisplaySettingsA(lpszDeviceName,
2261 iModeNum,
2262 (LPDEVMODEA)lpDevMode));
2263}
2264
2265
2266/*****************************************************************************
2267 * Name : BOOL WIN32API EnumWindowStationsA
2268 * Purpose : The EnumWindowStations function enumerates all windowstations
2269 * in the system by passing the name of each window station, in
2270 * turn, to an application-defined callback function.
2271 * Parameters:
2272 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2273 * LPARAM lParam 32-bit value to pass to the callback function
2274 * Result : If the function succeeds, the return value is TRUE.
2275 * If the function fails the return value is FALSE. To get extended
2276 * error information, call GetLastError.
2277 * Remark :
2278 * Status : UNTESTED STUB
2279 *
2280 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2281 *****************************************************************************/
2282
2283BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
2284 LPARAM lParam)
2285{
2286 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
2287 lpEnumFunc,
2288 lParam));
2289
2290 return (FALSE);
2291}
2292
2293
2294/*****************************************************************************
2295 * Name : BOOL WIN32API EnumWindowStationsW
2296 * Purpose : The EnumWindowStations function enumerates all windowstations
2297 * in the system by passing the name of each window station, in
2298 * turn, to an application-defined callback function.
2299 * Parameters:
2300 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2301 * LPARAM lParam 32-bit value to pass to the callback function
2302 * Result : If the function succeeds, the return value is TRUE.
2303 * If the function fails the return value is FALSE. To get extended
2304 * error information, call GetLastError.
2305 * Remark :
2306 * Status : UNTESTED STUB
2307 *
2308 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2309 *****************************************************************************/
2310
2311BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
2312 LPARAM lParam)
2313{
2314 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
2315 lpEnumFunc,
2316 lParam));
2317
2318 return (FALSE);
2319}
2320
2321
2322
2323/*****************************************************************************
2324 * Name : BOOL WIN32API GetInputState
2325 * Purpose : The GetInputState function determines whether there are
2326 * mouse-button or keyboard messages in the calling thread's message queue.
2327 * Parameters:
2328 * Variables :
2329 * Result : If the queue contains one or more new mouse-button or keyboard
2330 * messages, the return value is TRUE.
2331 * If the function fails, the return value is FALSE.
2332 * Remark :
2333 * Status : UNTESTED STUB
2334 *
2335 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2336 *****************************************************************************/
2337
2338BOOL WIN32API GetInputState(VOID)
2339{
2340 dprintf(("USER32:GetInputState () not implemented.\n"));
2341
2342 return (FALSE);
2343}
2344
2345
2346/*****************************************************************************
2347 * Name : UINT WIN32API GetKBCodePage
2348 * Purpose : The GetKBCodePage function is provided for compatibility with
2349 * earlier versions of Windows. In the Win32 application programming
2350 * interface (API) it just calls the GetOEMCP function.
2351 * Parameters:
2352 * Variables :
2353 * Result : If the function succeeds, the return value is an OEM code-page
2354 * identifier, or it is the default identifier if the registry
2355 * value is not readable. For a list of OEM code-page identifiers,
2356 * see GetOEMCP.
2357 * Remark :
2358 * Status : UNTESTED
2359 *
2360 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2361 *****************************************************************************/
2362
2363UINT WIN32API GetKBCodePage(VOID)
2364{
2365 return (GetOEMCP());
2366}
2367
2368
2369/*****************************************************************************
2370 * Name : BOOL WIN32API GetKeyboardLayoutNameA
2371 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
2372 * active keyboard layout.
2373 * Parameters: LPTSTR pwszKLID address of buffer for layout name
2374 * Variables :
2375 * Result : If the function succeeds, the return value is TRUE.
2376 * If the function fails, the return value is FALSE. To get extended
2377 * error information, call GetLastError.
2378 * Remark :
2379 * Status : UNTESTED STUB
2380 *
2381 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2382 *****************************************************************************/
2383
2384// @@@PH Win32 BOOL's are casted to INTs
2385INT WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
2386{
2387 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
2388 pwszKLID));
2389
2390 return(FALSE);
2391}
2392
2393
2394/*****************************************************************************
2395 * Name : BOOL WIN32API GetKeyboardLayoutNameW
2396 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
2397 * active keyboard layout.
2398 * Parameters: LPTSTR pwszKLID address of buffer for layout name
2399 * Variables :
2400 * Result : If the function succeeds, the return value is TRUE.
2401 * If the function fails, the return value is FALSE. To get extended
2402 * error information, call GetLastError.
2403 * Remark :
2404 * Status : UNTESTED STUB
2405 *
2406 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2407 *****************************************************************************/
2408
2409// @@@PH Win32 BOOL's are casted to INTs
2410INT WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
2411{
2412 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
2413 pwszKLID));
2414
2415 return(FALSE);
2416}
2417
2418
2419
2420
2421/*****************************************************************************
2422 * Name : HWINSTA WIN32API GetProcessWindowStation
2423 * Purpose : The GetProcessWindowStation function returns a handle of the
2424 * window station associated with the calling process.
2425 * Parameters:
2426 * Variables :
2427 * Result : If the function succeeds, the return value is a handle of the
2428 * window station associated with the calling process.
2429 * If the function fails, the return value is NULL. This can occur
2430 * if the calling process is not an application written for Windows
2431 * NT. To get extended error information, call GetLastError.
2432 * Remark :
2433 * Status : UNTESTED STUB
2434 *
2435 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2436 *****************************************************************************/
2437
2438HWINSTA WIN32API GetProcessWindowStation(VOID)
2439{
2440 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
2441
2442 return (NULL);
2443}
2444
2445
2446
2447/*****************************************************************************
2448 * Name : HDESK WIN32API GetThreadDesktop
2449 * Purpose : The GetThreadDesktop function returns a handle to the desktop
2450 * associated with a specified thread.
2451 * Parameters: DWORD dwThreadId thread identifier
2452 * Variables :
2453 * Result : If the function succeeds, the return value is the handle of the
2454 * desktop associated with the specified thread.
2455 * Remark :
2456 * Status : UNTESTED STUB
2457 *
2458 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2459 *****************************************************************************/
2460
2461HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
2462{
2463 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
2464 dwThreadId));
2465
2466 return (NULL);
2467}
2468
2469
2470/*****************************************************************************
2471 * Name : BOOL WIN32API GetUserObjectInformationA
2472 * Purpose : The GetUserObjectInformation function returns information about
2473 * a window station or desktop object.
2474 * Parameters: HANDLE hObj handle of object to get information for
2475 * int nIndex type of information to get
2476 * PVOID pvInfo points to buffer that receives the information
2477 * DWORD nLength size, in bytes, of pvInfo buffer
2478 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2479 * Variables :
2480 * Result : If the function succeeds, the return value is TRUE.
2481 * If the function fails, the return value is FALSE. To get extended
2482 * error information, call GetLastError.
2483 * Remark :
2484 * Status : UNTESTED STUB
2485 *
2486 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2487 *****************************************************************************/
2488
2489BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2490 int nIndex,
2491 PVOID pvInfo,
2492 DWORD nLength,
2493 LPDWORD lpnLengthNeeded)
2494{
2495 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2496 hObj,
2497 nIndex,
2498 pvInfo,
2499 nLength,
2500 lpnLengthNeeded));
2501
2502 return (FALSE);
2503}
2504
2505
2506/*****************************************************************************
2507 * Name : BOOL WIN32API GetUserObjectInformationW
2508 * Purpose : The GetUserObjectInformation function returns information about
2509 * a window station or desktop object.
2510 * Parameters: HANDLE hObj handle of object to get information for
2511 * int nIndex type of information to get
2512 * PVOID pvInfo points to buffer that receives the information
2513 * DWORD nLength size, in bytes, of pvInfo buffer
2514 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2515 * Variables :
2516 * Result : If the function succeeds, the return value is TRUE.
2517 * If the function fails, the return value is FALSE. To get extended
2518 * error information, call GetLastError.
2519 * Remark :
2520 * Status : UNTESTED STUB
2521 *
2522 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2523 *****************************************************************************/
2524
2525BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2526 int nIndex,
2527 PVOID pvInfo,
2528 DWORD nLength,
2529 LPDWORD lpnLengthNeeded)
2530{
2531 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2532 hObj,
2533 nIndex,
2534 pvInfo,
2535 nLength,
2536 lpnLengthNeeded));
2537
2538 return (FALSE);
2539}
2540
2541
2542/*****************************************************************************
2543 * Name : BOOL WIN32API GetUserObjectSecurity
2544 * Purpose : The GetUserObjectSecurity function retrieves security information
2545 * for the specified user object.
2546 * Parameters: HANDLE hObj handle of user object
2547 * SECURITY_INFORMATION * pSIRequested address of requested security information
2548 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2549 * DWORD nLength size of buffer for security descriptor
2550 * LPDWORD lpnLengthNeeded address of required size of buffer
2551 * Variables :
2552 * Result : If the function succeeds, the return value is TRUE.
2553 * If the function fails, the return value is FALSE. To get extended
2554 * error information, call GetLastError.
2555 * Remark :
2556 * Status : UNTESTED STUB
2557 *
2558 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2559 *****************************************************************************/
2560
2561BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2562 SECURITY_INFORMATION * pSIRequested,
2563 LPSECURITY_DESCRIPTOR pSID,
2564 DWORD nLength,
2565 LPDWORD lpnLengthNeeded)
2566{
2567 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2568 hObj,
2569 pSIRequested,
2570 pSID,
2571 nLength,
2572 lpnLengthNeeded));
2573
2574 return (FALSE);
2575}
2576
2577
2578
2579/*****************************************************************************
2580 * Name : int WIN32API GetWindowRgn
2581 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
2582 * Parameters: HWND hWnd handle to window whose window region is to be obtained
2583 * HRGN hRgn handle to region that receives a copy of the window region
2584 * Variables :
2585 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
2586 * Remark :
2587 * Status : UNTESTED STUB
2588 *
2589 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2590 *****************************************************************************/
2591
2592int WIN32API GetWindowRgn (HWND hWnd,
2593 HRGN hRgn)
2594{
2595 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
2596 hWnd,
2597 hRgn));
2598
2599 return (NULLREGION);
2600}
2601
2602
2603
2604/*****************************************************************************
2605 * Name : HLK WIN32API LoadKeyboardLayoutA
2606 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
2607 * the system. Several keyboard layouts can be loaded at a time, but
2608 * only one per process is active at a time. Loading multiple keyboard
2609 * layouts makes it possible to rapidly switch between layouts.
2610 * Parameters:
2611 * Variables :
2612 * Result : If the function succeeds, the return value is the handle of the
2613 * keyboard layout.
2614 * If the function fails, the return value is NULL. To get extended
2615 * error information, call GetLastError.
2616 * Remark :
2617 * Status : UNTESTED STUB
2618 *
2619 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2620 *****************************************************************************/
2621
2622HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
2623 UINT Flags)
2624{
2625 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
2626 pwszKLID,
2627 Flags));
2628
2629 return (NULL);
2630}
2631
2632
2633/*****************************************************************************
2634 * Name : HLK WIN32API LoadKeyboardLayoutW
2635 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
2636 * the system. Several keyboard layouts can be loaded at a time, but
2637 * only one per process is active at a time. Loading multiple keyboard
2638 * layouts makes it possible to rapidly switch between layouts.
2639 * Parameters:
2640 * Variables :
2641 * Result : If the function succeeds, the return value is the handle of the
2642 * keyboard layout.
2643 * If the function fails, the return value is NULL. To get extended
2644 * error information, call GetLastError.
2645 * Remark :
2646 * Status : UNTESTED STUB
2647 *
2648 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2649 *****************************************************************************/
2650
2651HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
2652 UINT Flags)
2653{
2654 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
2655 pwszKLID,
2656 Flags));
2657
2658 return (NULL);
2659}
2660
2661
2662/*****************************************************************************
2663 * Name : UINT WIN32API MapVirtualKeyExA
2664 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
2665 * code into a scan code or character value, or translates a scan
2666 * code into a virtual-key code. The function translates the codes
2667 * using the input language and physical keyboard layout identified
2668 * by the given keyboard layout handle.
2669 * Parameters:
2670 * Variables :
2671 * Result : The return value is either a scan code, a virtual-key code, or
2672 * a character value, depending on the value of uCode and uMapType.
2673 * If there is no translation, the return value is zero.
2674 * Remark :
2675 * Status : UNTESTED STUB
2676 *
2677 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2678 *****************************************************************************/
2679
2680UINT WIN32API MapVirtualKeyExA(UINT uCode,
2681 UINT uMapType,
2682 HKL dwhkl)
2683{
2684 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
2685 uCode,
2686 uMapType,
2687 dwhkl));
2688
2689 return (0);
2690}
2691
2692
2693/*****************************************************************************
2694 * Name : UINT WIN32API MapVirtualKeyExW
2695 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
2696 * code into a scan code or character value, or translates a scan
2697 * code into a virtual-key code. The function translates the codes
2698 * using the input language and physical keyboard layout identified
2699 * by the given keyboard layout handle.
2700 * Parameters:
2701 * Variables :
2702 * Result : The return value is either a scan code, a virtual-key code, or
2703 * a character value, depending on the value of uCode and uMapType.
2704 * If there is no translation, the return value is zero.
2705 * Remark :
2706 * Status : UNTESTED STUB
2707
2708 *
2709 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2710 *****************************************************************************/
2711
2712UINT WIN32API MapVirtualKeyExW(UINT uCode,
2713 UINT uMapType,
2714 HKL dwhkl)
2715{
2716 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
2717 uCode,
2718 uMapType,
2719 dwhkl));
2720
2721 return (0);
2722}
2723
2724/*****************************************************************************
2725 * Name : DWORD WIN32API OemKeyScan
2726 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
2727 * into the OEM scan codes and shift states. The function provides
2728 * information that allows a program to send OEM text to another
2729 * program by simulating keyboard input.
2730 * Parameters:
2731 * Variables :
2732 * Result :
2733 * Remark :
2734 * Status : UNTESTED STUB
2735 *
2736 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2737 *****************************************************************************/
2738
2739DWORD WIN32API OemKeyScan(WORD wOemChar)
2740{
2741 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
2742 wOemChar));
2743
2744 return (wOemChar);
2745}
2746
2747
2748/*****************************************************************************
2749 * Name : HDESK WIN32API OpenDesktopA
2750 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2751 * A desktop is a secure object contained within a window station
2752 * object. A desktop has a logical display surface and contains
2753 * windows, menus and hooks.
2754 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2755 * DWORD dwFlags flags to control interaction with other applications
2756 * BOOL fInherit specifies whether returned handle is inheritable
2757 * DWORD dwDesiredAccess specifies access of returned handle
2758 * Variables :
2759 * Result : If the function succeeds, the return value is the handle to the
2760 * opened desktop.
2761 * If the function fails, the return value is NULL. To get extended
2762 * error information, call GetLastError.
2763 * Remark :
2764 * Status : UNTESTED STUB
2765 *
2766 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2767 *****************************************************************************/
2768
2769HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2770 DWORD dwFlags,
2771 BOOL fInherit,
2772 DWORD dwDesiredAccess)
2773{
2774 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2775 lpszDesktopName,
2776 dwFlags,
2777 fInherit,
2778 dwDesiredAccess));
2779
2780 return (NULL);
2781}
2782
2783
2784/*****************************************************************************
2785 * Name : HDESK WIN32API OpenDesktopW
2786 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2787 * A desktop is a secure object contained within a window station
2788 * object. A desktop has a logical display surface and contains
2789 * windows, menus and hooks.
2790 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2791 * DWORD dwFlags flags to control interaction with other applications
2792 * BOOL fInherit specifies whether returned handle is inheritable
2793 * DWORD dwDesiredAccess specifies access of returned handle
2794 * Variables :
2795 * Result : If the function succeeds, the return value is the handle to the
2796 * opened desktop.
2797 * If the function fails, the return value is NULL. To get extended
2798 * error information, call GetLastError.
2799 * Remark :
2800 * Status : UNTESTED STUB
2801 *
2802 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2803 *****************************************************************************/
2804
2805HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2806 DWORD dwFlags,
2807 BOOL fInherit,
2808 DWORD dwDesiredAccess)
2809{
2810 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2811 lpszDesktopName,
2812 dwFlags,
2813 fInherit,
2814 dwDesiredAccess));
2815
2816 return (NULL);
2817}
2818
2819
2820/*****************************************************************************
2821 * Name : HDESK WIN32API OpenInputDesktop
2822 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2823 * that receives user input. The input desktop is a desktop on the
2824 * window station associated with the logged-on user.
2825 * Parameters: DWORD dwFlags flags to control interaction with other applications
2826 * BOOL fInherit specifies whether returned handle is inheritable
2827 * DWORD dwDesiredAccess specifies access of returned handle
2828 * Variables :
2829 * Result : If the function succeeds, the return value is a handle of the
2830 * desktop that receives user input.
2831 * If the function fails, the return value is NULL. To get extended
2832 * error information, call GetLastError.
2833 * Remark :
2834 * Status : UNTESTED STUB
2835 *
2836 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2837 *****************************************************************************/
2838
2839HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2840 BOOL fInherit,
2841 DWORD dwDesiredAccess)
2842{
2843 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2844 dwFlags,
2845 fInherit,
2846 dwDesiredAccess));
2847
2848 return (NULL);
2849}
2850
2851
2852/*****************************************************************************
2853 * Name : HWINSTA WIN32API OpenWindowStationA
2854 * Purpose : The OpenWindowStation function returns a handle to an existing
2855 * window station.
2856 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2857 * BOOL fInherit specifies whether returned handle is inheritable
2858 * DWORD dwDesiredAccess specifies access of returned handle
2859 * Variables :
2860 * Result : If the function succeeds, the return value is the handle to the
2861 * specified window station.
2862 * If the function fails, the return value is NULL. To get extended
2863 * error information, call GetLastError.
2864 * Remark :
2865 * Status : UNTESTED STUB
2866 *
2867 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2868 *****************************************************************************/
2869
2870HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2871 BOOL fInherit,
2872 DWORD dwDesiredAccess)
2873{
2874 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2875 lpszWinStaName,
2876 fInherit,
2877 dwDesiredAccess));
2878
2879 return (NULL);
2880}
2881
2882
2883/*****************************************************************************
2884 * Name : HWINSTA WIN32API OpenWindowStationW
2885 * Purpose : The OpenWindowStation function returns a handle to an existing
2886 * window station.
2887 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2888 * BOOL fInherit specifies whether returned handle is inheritable
2889 * DWORD dwDesiredAccess specifies access of returned handle
2890 * Variables :
2891 * Result : If the function succeeds, the return value is the handle to the
2892 * specified window station.
2893 * If the function fails, the return value is NULL. To get extended
2894 * error information, call GetLastError.
2895
2896
2897 * Remark :
2898 * Status : UNTESTED STUB
2899 *
2900 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2901 *****************************************************************************/
2902
2903HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2904 BOOL fInherit,
2905 DWORD dwDesiredAccess)
2906{
2907 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2908 lpszWinStaName,
2909 fInherit,
2910 dwDesiredAccess));
2911
2912 return (NULL);
2913}
2914
2915
2916/*****************************************************************************
2917 * Name : BOOL WIN32API PaintDesktop
2918 * Purpose : The PaintDesktop function fills the clipping region in the
2919 * specified device context with the desktop pattern or wallpaper.
2920 * The function is provided primarily for shell desktops.
2921 * Parameters:
2922 * Variables :
2923 * Result : If the function succeeds, the return value is TRUE.
2924 * If the function fails, the return value is FALSE.
2925 * Remark :
2926 * Status : UNTESTED STUB
2927 *
2928 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2929 *****************************************************************************/
2930
2931BOOL WIN32API PaintDesktop(HDC hdc)
2932{
2933 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
2934 hdc));
2935
2936 return (FALSE);
2937}
2938
2939
2940
2941/*****************************************************************************
2942 * Name : VOID WIN32API SetDebugErrorLevel
2943 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
2944 * which Windows will generate debugging events and pass them to a debugger.
2945 * Parameters: DWORD dwLevel debugging error level
2946 * Variables :
2947 * Result :
2948 * Remark :
2949 * Status : UNTESTED STUB
2950 *
2951 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2952 *****************************************************************************/
2953
2954VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
2955{
2956 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
2957 dwLevel));
2958}
2959
2960
2961/*****************************************************************************
2962 * Name : BOOL WIN32API SetProcessWindowStation
2963 * Purpose : The SetProcessWindowStation function assigns a window station
2964 * to the calling process. This enables the process to access
2965 * objects in the window station such as desktops, the clipboard,
2966 * and global atoms. All subsequent operations on the window station
2967 * use the access rights granted to hWinSta.
2968 * Parameters:
2969 * Variables :
2970 * Result : If the function succeeds, the return value is TRUE.
2971 * If the function fails, the return value is FALSE. To get extended
2972 * error information, call GetLastError.
2973 * Remark :
2974 * Status : UNTESTED STUB
2975 *
2976 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2977 *****************************************************************************/
2978
2979BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2980{
2981 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2982 hWinSta));
2983
2984 return (FALSE);
2985}
2986
2987
2988/*****************************************************************************
2989 * Name : BOOL WIN32API SetThreadDesktop
2990 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2991 * thread. All subsequent operations on the desktop use the access
2992 * rights granted to hDesk.
2993 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
2994 * Variables :
2995 * Result : If the function succeeds, the return value is TRUE.
2996 * If the function fails, the return value is FALSE. To get extended
2997 * error information, call GetLastError.
2998 * Remark :
2999 * Status : UNTESTED STUB
3000 *
3001 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3002 *****************************************************************************/
3003
3004BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
3005{
3006 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
3007 hDesktop));
3008
3009 return (FALSE);
3010}
3011
3012
3013/*****************************************************************************
3014 * Name : BOOL WIN32API SetUserObjectInformationA
3015 * Purpose : The SetUserObjectInformation function sets information about a
3016 * window station or desktop object.
3017 * Parameters: HANDLE hObject handle of the object for which to set information
3018 * int nIndex type of information to set
3019 * PVOID lpvInfo points to a buffer that contains the information
3020 * DWORD cbInfo size, in bytes, of lpvInfo buffer
3021 * Variables :
3022 * Result : If the function succeeds, the return value is TRUE.
3023 * If the function fails the return value is FALSE. To get extended
3024 * error information, call GetLastError.
3025 * Remark :
3026 * Status : UNTESTED STUB
3027 *
3028 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3029 *****************************************************************************/
3030
3031BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
3032 int nIndex,
3033 PVOID lpvInfo,
3034 DWORD cbInfo)
3035{
3036 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
3037 hObject,
3038 nIndex,
3039 lpvInfo,
3040 cbInfo));
3041
3042 return (FALSE);
3043}
3044
3045
3046/*****************************************************************************
3047 * Name : BOOL WIN32API SetUserObjectInformationW
3048 * Purpose : The SetUserObjectInformation function sets information about a
3049 * window station or desktop object.
3050 * Parameters: HANDLE hObject handle of the object for which to set information
3051 * int nIndex type of information to set
3052 * PVOID lpvInfo points to a buffer that contains the information
3053 * DWORD cbInfo size, in bytes, of lpvInfo buffer
3054 * Variables :
3055 * Result : If the function succeeds, the return value is TRUE.
3056 * If the function fails the return value is FALSE. To get extended
3057 * error information, call GetLastError.
3058 * Remark :
3059 * Status : UNTESTED STUB
3060 *
3061 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3062 *****************************************************************************/
3063
3064BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
3065 int nIndex,
3066 PVOID lpvInfo,
3067 DWORD cbInfo)
3068{
3069 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
3070 hObject,
3071 nIndex,
3072 lpvInfo,
3073 cbInfo));
3074
3075 return (FALSE);
3076}
3077
3078
3079/*****************************************************************************
3080 * Name : BOOL WIN32API SetUserObjectSecurity
3081 * Purpose : The SetUserObjectSecurity function sets the security of a user
3082 * object. This can be, for example, a window or a DDE conversation
3083 * Parameters: HANDLE hObject handle of user object
3084 * SECURITY_INFORMATION * psi address of security information
3085 * LPSECURITY_DESCRIPTOR psd address of security descriptor
3086 * Variables :
3087 * Result : If the function succeeds, the return value is TRUE.
3088 * If the function fails, the return value is FALSE. To get extended
3089 * error information, call GetLastError.
3090 * Remark :
3091 * Status : UNTESTED STUB
3092 *
3093 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3094 *****************************************************************************/
3095
3096BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
3097 SECURITY_INFORMATION * psi,
3098 LPSECURITY_DESCRIPTOR psd)
3099{
3100 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
3101 hObject,
3102 psi,
3103 psd));
3104
3105 return (FALSE);
3106}
3107
3108
3109/*****************************************************************************
3110 * Name : int WIN32API SetWindowRgn
3111 * Purpose : The SetWindowRgn function sets the window region of a window. The
3112 * window region determines the area within the window where the
3113 * operating system permits drawing. The operating system does not
3114 * display any portion of a window that lies outside of the window region
3115 * Parameters: HWND hWnd handle to window whose window region is to be set
3116 * HRGN hRgn handle to region
3117 * BOOL bRedraw window redraw flag
3118 * Variables :
3119 * Result : If the function succeeds, the return value is non-zero.
3120 * If the function fails, the return value is zero.
3121 * Remark :
3122 * Status : UNTESTED STUB
3123 *
3124 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3125 *****************************************************************************/
3126
3127int WIN32API SetWindowRgn(HWND hWnd,
3128 HRGN hRgn,
3129 BOOL bRedraw)
3130{
3131 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
3132 hWnd,
3133 hRgn,
3134 bRedraw));
3135
3136 return (0);
3137}
3138
3139
3140/*****************************************************************************
3141 * Name : BOOL WIN32API SetWindowsHookW
3142 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
3143 * Win32-based applications should use the SetWindowsHookEx function.
3144 * Parameters:
3145 * Variables :
3146 * Result :
3147 * Remark : ARGH ! MICROSOFT !
3148 * Status : UNTESTED STUB
3149 *
3150 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3151 *****************************************************************************/
3152
3153HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
3154
3155{
3156 return (FALSE);
3157}
3158
3159
3160/*****************************************************************************
3161 * Name : BOOL WIN32API ShowWindowAsync
3162 * Purpose : The ShowWindowAsync function sets the show state of a window
3163 * created by a different thread.
3164 * Parameters: HWND hwnd handle of window
3165 * int nCmdShow show state of window
3166 * Variables :
3167 * Result : If the window was previously visible, the return value is TRUE.
3168 * If the window was previously hidden, the return value is FALSE.
3169 * Remark :
3170 * Status : UNTESTED STUB
3171 *
3172 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3173 *****************************************************************************/
3174
3175BOOL WIN32API ShowWindowAsync (HWND hWnd,
3176 int nCmdShow)
3177{
3178 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
3179 hWnd,
3180 nCmdShow));
3181
3182 return (FALSE);
3183}
3184
3185
3186/*****************************************************************************
3187 * Name : BOOL WIN32API SwitchDesktop
3188 * Purpose : The SwitchDesktop function makes a desktop visible and activates
3189 * it. This enables the desktop to receive input from the user. The
3190 * calling process must have DESKTOP_SWITCHDESKTOP access to the
3191 * desktop for the SwitchDesktop function to succeed.
3192 * Parameters:
3193 * Variables :
3194 * Result : If the function succeeds, the return value is TRUE.
3195 * If the function fails, the return value is FALSE. To get extended
3196 * error information, call GetLastError.
3197 * Remark :
3198 * Status : UNTESTED STUB
3199 *
3200 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3201 *****************************************************************************/
3202
3203BOOL WIN32API SwitchDesktop(HDESK hDesktop)
3204{
3205 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
3206 hDesktop));
3207
3208 return (FALSE);
3209}
3210
3211
3212/*****************************************************************************
3213 * Name : WORD WIN32API TileWindows
3214 * Purpose : The TileWindows function tiles the specified windows, or the child
3215 * windows of the specified parent window.
3216 * Parameters: HWND hwndParent handle of parent window
3217 * WORD wFlags types of windows not to arrange
3218 * LPCRECT lpRect rectangle to arrange windows in
3219 * WORD cChildrenb number of windows to arrange
3220 * const HWND *ahwndChildren array of window handles
3221 * Variables :
3222 * Result : If the function succeeds, the return value is the number of
3223 * windows arranged.
3224 * If the function fails, the return value is zero.
3225 * Remark :
3226 * Status : UNTESTED STUB
3227 *
3228 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3229 *****************************************************************************/
3230
3231WORD WIN32API TileWindows(HWND hwndParent,
3232 UINT wFlags,
3233 const LPRECT lpRect,
3234 UINT cChildrenb,
3235 const HWND *ahwndChildren)
3236{
3237 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3238 hwndParent,
3239 wFlags,
3240 lpRect,
3241 cChildrenb,
3242 ahwndChildren));
3243
3244 return (0);
3245}
3246
3247
3248/*****************************************************************************
3249 * Name : int WIN32API ToAscii
3250 * Purpose : The ToAscii function translates the specified virtual-key code
3251 * and keyboard state to the corresponding Windows character or characters.
3252 * Parameters: UINT uVirtKey virtual-key code
3253 * UINT uScanCode scan code
3254 * PBYTE lpbKeyState address of key-state array
3255 * LPWORD lpwTransKey buffer for translated key
3256 * UINT fuState active-menu flag
3257 * Variables :
3258 * Result : 0 The specified virtual key has no translation for the current
3259 * state of the keyboard.
3260 * 1 One Windows character was copied to the buffer.
3261 * 2 Two characters were copied to the buffer. This usually happens
3262 * when a dead-key character (accent or diacritic) stored in the
3263 * keyboard layout cannot be composed with the specified virtual
3264 * key to form a single character.
3265 * Remark :
3266 * Status : UNTESTED STUB
3267 *
3268 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3269 *****************************************************************************/
3270
3271int WIN32API ToAscii(UINT uVirtKey,
3272 UINT uScanCode,
3273 PBYTE lpbKeyState,
3274 LPWORD lpwTransKey,
3275 UINT fuState)
3276{
3277 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
3278 uVirtKey,
3279 uScanCode,
3280 lpbKeyState,
3281 lpwTransKey,
3282 fuState));
3283
3284 return (0);
3285}
3286
3287
3288/*****************************************************************************
3289 * Name : int WIN32API ToAsciiEx
3290 * Purpose : The ToAscii function translates the specified virtual-key code
3291 * and keyboard state to the corresponding Windows character or characters.
3292 * Parameters: UINT uVirtKey virtual-key code
3293 * UINT uScanCode scan code
3294 * PBYTE lpbKeyState address of key-state array
3295 * LPWORD lpwTransKey buffer for translated key
3296 * UINT fuState active-menu flag
3297 * HLK hlk keyboard layout handle
3298 * Variables :
3299 * Result : 0 The specified virtual key has no translation for the current
3300 * state of the keyboard.
3301 * 1 One Windows character was copied to the buffer.
3302 * 2 Two characters were copied to the buffer. This usually happens
3303 * when a dead-key character (accent or diacritic) stored in the
3304 * keyboard layout cannot be composed with the specified virtual
3305 * key to form a single character.
3306 * Remark :
3307 * Status : UNTESTED STUB
3308 *
3309 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3310 *****************************************************************************/
3311
3312int WIN32API ToAsciiEx(UINT uVirtKey,
3313 UINT uScanCode,
3314 PBYTE lpbKeyState,
3315 LPWORD lpwTransKey,
3316 UINT fuState,
3317 HKL hkl)
3318{
3319 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
3320 uVirtKey,
3321 uScanCode,
3322 lpbKeyState,
3323 lpwTransKey,
3324 fuState,
3325 hkl));
3326
3327 return (0);
3328}
3329
3330
3331/*****************************************************************************
3332 * Name : int WIN32API ToUnicode
3333 * Purpose : The ToUnicode function translates the specified virtual-key code
3334 * and keyboard state to the corresponding Unicode character or characters.
3335 * Parameters: UINT wVirtKey virtual-key code
3336 * UINT wScanCode scan code
3337 * PBYTE lpKeyState address of key-state array
3338 * LPWSTR pwszBuff buffer for translated key
3339 * int cchBuff size of translated key buffer
3340 * UINT wFlags set of function-conditioning flags
3341 * Variables :
3342 * Result : - 1 The specified virtual key is a dead-key character (accent or
3343 * diacritic). This value is returned regardless of the keyboard
3344 * layout, even if several characters have been typed and are
3345 * stored in the keyboard state. If possible, even with Unicode
3346 * keyboard layouts, the function has written a spacing version of
3347 * the dead-key character to the buffer specified by pwszBuffer.
3348 * For example, the function writes the character SPACING ACUTE
3349 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
3350 * 0 The specified virtual key has no translation for the current
3351 * state of the keyboard. Nothing was written to the buffer
3352 * specified by pwszBuffer.
3353 * 1 One character was written to the buffer specified by pwszBuffer.
3354 * 2 or more Two or more characters were written to the buffer specified by
3355 * pwszBuff. The most common cause for this is that a dead-key
3356 * character (accent or diacritic) stored in the keyboard layout
3357 * could not be combined with the specified virtual key to form a
3358 * single character.
3359 * Remark :
3360 * Status : UNTESTED STUB
3361 *
3362 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3363 *****************************************************************************/
3364
3365int WIN32API ToUnicode(UINT uVirtKey,
3366 UINT uScanCode,
3367 PBYTE lpKeyState,
3368 LPWSTR pwszBuff,
3369 int cchBuff,
3370 UINT wFlags)
3371{
3372 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
3373 uVirtKey,
3374 uScanCode,
3375 lpKeyState,
3376 pwszBuff,
3377 cchBuff,
3378 wFlags));
3379
3380 return (0);
3381}
3382
3383
3384/*****************************************************************************
3385 * Name : BOOL WIN32API UnloadKeyboardLayout
3386 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
3387 * Parameters: HKL hkl handle of keyboard layout
3388 * Variables :
3389 * Result : If the function succeeds, the return value is the handle of the
3390 * keyboard layout; otherwise, it is NULL. To get extended error
3391 * information, use the GetLastError function.
3392 * Remark :
3393 * Status : UNTESTED STUB
3394 *
3395 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3396 *****************************************************************************/
3397
3398BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
3399{
3400 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
3401 hkl));
3402
3403 return (0);
3404}
3405
3406
3407/*****************************************************************************
3408 * Name : SHORT WIN32API VkKeyScanExW
3409 * Purpose : The VkKeyScanEx function translates a character to the
3410 * corresponding virtual-key code and shift state. The function
3411 * translates the character using the input language and physical
3412 * keyboard layout identified by the given keyboard layout handle.
3413 * Parameters: UINT uChar character to translate
3414 * HKL hkl keyboard layout handle
3415 * Variables :
3416 * Result : see docs
3417 * Remark :
3418 * Status : UNTESTED STUB
3419 *
3420 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3421 *****************************************************************************/
3422
3423WORD WIN32API VkKeyScanExW(WCHAR uChar,
3424 HKL hkl)
3425{
3426 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
3427 uChar,
3428 hkl));
3429
3430 return (uChar);
3431}
3432
3433
3434/*****************************************************************************
3435 * Name : SHORT WIN32API VkKeyScanExA
3436 * Purpose : The VkKeyScanEx function translates a character to the
3437 * corresponding virtual-key code and shift state. The function
3438 * translates the character using the input language and physical
3439 * keyboard layout identified by the given keyboard layout handle.
3440 * Parameters: UINT uChar character to translate
3441 * HKL hkl keyboard layout handle
3442 * Variables :
3443 * Result : see docs
3444 * Remark :
3445 * Status : UNTESTED STUB
3446 *
3447 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3448 *****************************************************************************/
3449
3450WORD WIN32API VkKeyScanExA(CHAR uChar,
3451 HKL hkl)
3452{
3453 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
3454 uChar,
3455 hkl));
3456
3457 return (uChar);
3458}
3459
3460
3461/*****************************************************************************
3462 * Name : VOID WIN32API keybd_event
3463 * Purpose : The keybd_event function synthesizes a keystroke. The system
3464 * can use such a synthesized keystroke to generate a WM_KEYUP or
3465 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
3466 * the keybd_event function.
3467 * Parameters: BYTE bVk virtual-key code
3468
3469 * BYTE bScan hardware scan code
3470 * DWORD dwFlags flags specifying various function options
3471 * DWORD dwExtraInfo additional data associated with keystroke
3472 * Variables :
3473 * Result :
3474 * Remark :
3475 * Status : UNTESTED STUB
3476 *
3477 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3478 *****************************************************************************/
3479
3480VOID WIN32API keybd_event (BYTE bVk,
3481 BYTE bScan,
3482 DWORD dwFlags,
3483 DWORD dwExtraInfo)
3484{
3485 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
3486 bVk,
3487 bScan,
3488 dwFlags,
3489 dwExtraInfo));
3490}
3491
3492
3493/*****************************************************************************
3494 * Name : VOID WIN32API mouse_event
3495 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
3496 * Parameters: DWORD dwFlags flags specifying various motion/click variants
3497 * DWORD dx horizontal mouse position or position change
3498 * DWORD dy vertical mouse position or position change
3499 * DWORD cButtons unused, reserved for future use, set to zero
3500 * DWORD dwExtraInfo 32 bits of application-defined information
3501 * Variables :
3502 * Result :
3503 * Remark :
3504 * Status : UNTESTED STUB
3505 *
3506 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3507 *****************************************************************************/
3508
3509VOID WIN32API mouse_event(DWORD dwFlags,
3510 DWORD dx,
3511 DWORD dy,
3512 DWORD cButtons,
3513 DWORD dwExtraInfo)
3514{
3515 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
3516 dwFlags,
3517 dx,
3518 dy,
3519 cButtons,
3520 dwExtraInfo));
3521}
3522
3523
3524/*****************************************************************************
3525 * Name : BOOL WIN32API SetShellWindow
3526 * Purpose : Unknown
3527 * Parameters: Unknown
3528 * Variables :
3529 * Result :
3530 * Remark :
3531 * Status : UNTESTED UNKNOWN STUB
3532 *
3533 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3534 *****************************************************************************/
3535
3536BOOL WIN32API SetShellWindow(DWORD x1)
3537{
3538 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
3539 x1));
3540
3541 return (FALSE); /* default */
3542}
3543
3544
3545/*****************************************************************************
3546 * Name : BOOL WIN32API PlaySoundEvent
3547 * Purpose : Unknown
3548 * Parameters: Unknown
3549 * Variables :
3550 * Result :
3551 * Remark :
3552 * Status : UNTESTED UNKNOWN STUB
3553 *
3554 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3555 *****************************************************************************/
3556
3557BOOL WIN32API PlaySoundEvent(DWORD x1)
3558{
3559 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
3560 x1));
3561
3562 return (FALSE); /* default */
3563}
3564
3565
3566/*****************************************************************************
3567 * Name : BOOL WIN32API TileChildWindows
3568 * Purpose : Unknown
3569 * Parameters: Unknown
3570 * Variables :
3571 * Result :
3572 * Remark :
3573 * Status : UNTESTED UNKNOWN STUB
3574 *
3575 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3576 *****************************************************************************/
3577
3578BOOL WIN32API TileChildWindows(DWORD x1,
3579 DWORD x2)
3580{
3581 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
3582 x1,
3583 x2));
3584
3585 return (FALSE); /* default */
3586}
3587
3588
3589/*****************************************************************************
3590 * Name : BOOL WIN32API SetSysColorsTemp
3591 * Purpose : Unknown
3592 * Parameters: Unknown
3593 * Variables :
3594 * Result :
3595 * Remark :
3596 * Status : UNTESTED UNKNOWN STUB
3597 *
3598 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3599 *****************************************************************************/
3600
3601BOOL WIN32API SetSysColorsTemp(void)
3602{
3603 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
3604
3605 return (FALSE); /* default */
3606}
3607
3608
3609/*****************************************************************************
3610 * Name : BOOL WIN32API RegisterNetworkCapabilities
3611 * Purpose : Unknown
3612 * Parameters: Unknown
3613 * Variables :
3614 * Result :
3615 * Remark :
3616 * Status : UNTESTED UNKNOWN STUB
3617 *
3618 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3619 *****************************************************************************/
3620
3621BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
3622 DWORD x2)
3623{
3624 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
3625 x1,
3626 x2));
3627
3628 return (FALSE); /* default */
3629}
3630
3631
3632/*****************************************************************************
3633 * Name : BOOL WIN32API EndTask
3634 * Purpose : Unknown
3635 * Parameters: Unknown
3636 * Variables :
3637 * Result :
3638 * Remark :
3639 * Status : UNTESTED UNKNOWN STUB
3640 *
3641 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3642 *****************************************************************************/
3643
3644BOOL WIN32API EndTask(DWORD x1,
3645 DWORD x2,
3646 DWORD x3)
3647{
3648 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
3649 x1,
3650 x2,
3651 x3));
3652
3653 return (FALSE); /* default */
3654}
3655
3656
3657
3658/*****************************************************************************
3659 * Name : BOOL WIN32API GetNextQueueWindow
3660 * Purpose : Unknown
3661 * Parameters: Unknown
3662 * Variables :
3663 * Result :
3664 * Remark :
3665 * Status : UNTESTED UNKNOWN STUB
3666 *
3667 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3668 *****************************************************************************/
3669
3670BOOL WIN32API GetNextQueueWindow(DWORD x1,
3671 DWORD x2)
3672{
3673 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
3674 x1,
3675 x2));
3676
3677 return (FALSE); /* default */
3678}
3679
3680
3681/*****************************************************************************
3682 * Name : BOOL WIN32API YieldTask
3683 * Purpose : Unknown
3684 * Parameters: Unknown
3685 * Variables :
3686 * Result :
3687 * Remark :
3688 * Status : UNTESTED UNKNOWN STUB
3689 *
3690 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3691 *****************************************************************************/
3692
3693BOOL WIN32API YieldTask(void)
3694{
3695 dprintf(("USER32: YieldTask() not implemented.\n"));
3696
3697 return (FALSE); /* default */
3698}
3699
3700
3701/*****************************************************************************
3702 * Name : BOOL WIN32API WinOldAppHackoMatic
3703 * Purpose : Unknown
3704 * Parameters: Unknown
3705 * Variables :
3706 * Result :
3707 * Remark :
3708 * Status : UNTESTED UNKNOWN STUB
3709 *
3710 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3711 *****************************************************************************/
3712
3713BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
3714{
3715 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
3716 x1));
3717
3718 return (FALSE); /* default */
3719}
3720
3721
3722/*****************************************************************************
3723 * Name : BOOL WIN32API DragObject
3724 * Purpose : Unknown
3725 * Parameters: Unknown
3726 * Variables :
3727 * Result :
3728 * Remark :
3729 * Status : UNTESTED UNKNOWN STUB
3730 *
3731 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3732 *****************************************************************************/
3733
3734DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
3735{
3736 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3737 x1,
3738 x2,
3739 x3,
3740 x4,
3741 x5));
3742
3743 return (FALSE); /* default */
3744}
3745
3746
3747/*****************************************************************************
3748 * Name : BOOL WIN32API CascadeChildWindows
3749 * Purpose : Unknown
3750 * Parameters: Unknown
3751 * Variables :
3752 * Result :
3753 * Remark :
3754 * Status : UNTESTED UNKNOWN STUB
3755 *
3756 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3757 *****************************************************************************/
3758
3759BOOL WIN32API CascadeChildWindows(DWORD x1,
3760 DWORD x2)
3761{
3762 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
3763 x1,
3764 x2));
3765
3766 return (FALSE); /* default */
3767}
3768
3769
3770/*****************************************************************************
3771 * Name : BOOL WIN32API RegisterSystemThread
3772 * Purpose : Unknown
3773 * Parameters: Unknown
3774 * Variables :
3775 * Result :
3776 * Remark :
3777 * Status : UNTESTED UNKNOWN STUB
3778 *
3779 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3780 *****************************************************************************/
3781
3782BOOL WIN32API RegisterSystemThread(DWORD x1,
3783 DWORD x2)
3784{
3785 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
3786 x1,
3787 x2));
3788
3789 return (FALSE); /* default */
3790}
3791
3792
3793/*****************************************************************************
3794 * Name : BOOL WIN32API IsHungThread
3795 * Purpose : Unknown
3796 * Parameters: Unknown
3797 * Variables :
3798 * Result :
3799 * Remark :
3800 * Status : UNTESTED UNKNOWN STUB
3801 *
3802 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3803 *****************************************************************************/
3804
3805BOOL WIN32API IsHungThread(DWORD x1)
3806{
3807 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
3808 x1));
3809
3810 return (FALSE); /* default */
3811}
3812
3813
3814
3815/*****************************************************************************
3816 * Name : BOOL WIN32API UserSignalProc
3817 * Purpose : Unknown
3818 * Parameters: Unknown
3819 * Variables :
3820 * Result :
3821 * Remark :
3822 * Status : UNTESTED UNKNOWN STUB
3823 *
3824 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3825 *****************************************************************************/
3826
3827BOOL WIN32API UserSignalProc(DWORD x1,
3828 DWORD x2,
3829 DWORD x3,
3830 DWORD x4)
3831{
3832 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3833 x1,
3834 x2,
3835 x3,
3836 x4));
3837
3838 return (FALSE); /* default */
3839}
3840
3841
3842/*****************************************************************************
3843 * Name : BOOL WIN32API GetShellWindow
3844 * Purpose : Unknown
3845 * Parameters: Unknown
3846 * Variables :
3847 * Result :
3848 * Remark :
3849 * Status : UNTESTED UNKNOWN STUB
3850 *
3851 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3852 *****************************************************************************/
3853
3854HWND WIN32API GetShellWindow(void)
3855{
3856 dprintf(("USER32: GetShellWindow() not implemented.\n"));
3857
3858 return (0); /* default */
3859}
3860
3861
3862
3863/***********************************************************************
3864 * RegisterTasklist32 [USER32.436]
3865 */
3866DWORD WIN32API RegisterTasklist (DWORD x)
3867{
3868 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
3869 x));
3870
3871 return TRUE;
3872}
3873
3874
Note: See TracBrowser for help on using the repository browser.