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

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

fixed ClientToScreen adn ScreenToClient

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