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

Last change on this file since 1042 was 1042, checked in by sandervl, 26 years ago

Cursor fixes + minor change to RedrawWindow

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