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

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

erase background/paint stuff enhanced

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