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

Last change on this file since 5196 was 5196, checked in by sandervl, 25 years ago

update

File size: 99.3 KB
Line 
1/* $Id: user32.cpp,v 1.92 2001-02-19 21:43:12 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 * Partly based on Wine code (windows\sysparams.c: SystemParametersInfoA)
13 *
14 * Copyright 1994 Alexandre Julliard
15 *
16 *
17 * Project Odin Software License can be found in LICENSE.TXT
18 *
19 */
20/*****************************************************************************
21 * Name : USER32.CPP
22 * Purpose : This module maps all Win32 functions contained in USER32.DLL
23 * to their OS/2-specific counterparts as far as possible.
24 *****************************************************************************/
25
26//Attention: many functions belong to other subsystems, move them to their
27// right place!
28
29#include <odin.h>
30#include <odinwrap.h>
31#include <os2sel.h>
32
33#include <os2win.h>
34#include <misc.h>
35#include <winuser32.h>
36
37#include "user32.h"
38#include <winicon.h>
39#include "syscolor.h"
40#include "pmwindow.h"
41#include "oslibgdi.h"
42
43#include <wchar.h>
44#include <stdlib.h>
45#include <string.h>
46#include <oslibwin.h>
47#include <win32wnd.h>
48#include <winuser.h>
49
50#define DBG_LOCALLOG DBG_user32
51#include "dbglocal.h"
52
53//undocumented stuff
54// WIN32API CalcChildScroll
55// WIN32API CascadeChildWindows
56// WIN32API ClientThreadConnect
57// WIN32API DragObject
58// WIN32API DrawFrame
59// WIN32API EditWndProc
60// WIN32API EndTask
61// WIN32API GetInputDesktop
62// WIN32API GetNextQueueWindow
63// WIN32API GetShellWindow
64// WIN32API InitSharedTable
65// WIN32API InitTask
66// WIN32API IsHungThread
67// WIN32API LockWindowStation
68// WIN32API ModifyAccess
69// WIN32API PlaySoundEvent
70// WIN32API RegisterLogonProcess
71// WIN32API RegisterNetworkCapabilities
72// WIN32API RegisterSystemThread
73// WIN32API SetDeskWallpaper
74// WIN32API SetDesktopBitmap
75// WIN32API SetInternalWindowPos
76// WIN32API SetLogonNotifyWindow
77// WIN32API SetShellWindow
78// WIN32API SetSysColorsTemp
79// WIN32API SetWindowFullScreenState
80// WIN32API SwitchToThisWindow
81// WIN32API SysErrorBox
82// WIN32API TileChildWindows
83// WIN32API UnlockWindowStation
84// WIN32API UserClientDllInitialize
85// WIN32API UserSignalProc
86// WIN32API WinOldAppHackoMatic
87// WIN32API WNDPROC_CALLBACK
88// WIN32API YieldTask
89
90ODINDEBUGCHANNEL(USER32-USER32)
91
92
93/* Coordinate Transformation */
94
95/* Rectangle Functions - parts from wine/windows/rect.c */
96
97BOOL WIN32API CopyRect( PRECT lprcDst, const RECT * lprcSrc)
98{
99 dprintf2(("USER32: CopyRect\n"));
100 if (!lprcDst || !lprcSrc) {
101 SetLastError(ERROR_INVALID_PARAMETER);
102 return FALSE;
103 }
104
105 memcpy(lprcDst,lprcSrc,sizeof(RECT));
106
107 return TRUE;
108}
109//******************************************************************************
110//******************************************************************************
111BOOL WIN32API EqualRect( const RECT *lprc1, const RECT *lprc2)
112{
113 dprintf2(("USER32: EqualRect\n"));
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 dprintf2(("USER32: InflateRect (%d,%d)(%d,%d) %d,%d", lprc->left, lprc->top, lprc->right, lprc->bottom, dx, dy));
130 if (!lprc)
131 {
132 SetLastError(ERROR_INVALID_PARAMETER);
133 return FALSE;
134 }
135
136 lprc->left -= dx;
137 lprc->right += dx;
138 lprc->top -= dy;
139 lprc->bottom += dy;
140
141 return TRUE;
142}
143//******************************************************************************
144//******************************************************************************
145BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2)
146{
147 dprintf2(("USER32: IntersectRect (%d,%d)(%d,%d) (%d,%d)(%d,%d)", lprcSrc1->left, lprcSrc1->top, lprcSrc1->right, lprcSrc1->bottom, lprcSrc2->left, lprcSrc2->top, lprcSrc2->right, lprcSrc2->bottom));
148 if (!lprcSrc1 || !lprcSrc2)
149 {
150 SetLastError(ERROR_INVALID_PARAMETER);
151 return FALSE;
152 }
153
154 if (IsRectEmpty(lprcSrc1) || IsRectEmpty(lprcSrc2) ||
155 (lprcSrc1->left >= lprcSrc2->right) || (lprcSrc2->left >= lprcSrc1->right) ||
156 (lprcSrc1->top >= lprcSrc2->bottom) || (lprcSrc2->top >= lprcSrc1->bottom))
157 {
158 //SvL: NT doesn't set the last error here
159 //SetLastError(ERROR_INVALID_PARAMETER);
160 if (lprcDst) SetRectEmpty(lprcDst);
161 return FALSE;
162 }
163 if (lprcDst)
164 {
165 lprcDst->left = MAX(lprcSrc1->left,lprcSrc2->left);
166 lprcDst->right = MIN(lprcSrc1->right,lprcSrc2->right);
167 lprcDst->top = MAX(lprcSrc1->top,lprcSrc2->top);
168 lprcDst->bottom = MIN(lprcSrc1->bottom,lprcSrc2->bottom);
169 }
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 dprintf2(("USER32: OffsetRect (%d,%d)(%d,%d) %d %d", lprc->left, lprc->top, lprc->right, lprc->bottom, x, y));
190 if (!lprc)
191 {
192 SetLastError(ERROR_INVALID_PARAMETER);
193 return FALSE;
194 }
195
196 lprc->left += x;
197 lprc->right += x;
198 lprc->top += y;
199 lprc->bottom += y;
200
201 return TRUE;
202}
203//******************************************************************************
204//******************************************************************************
205BOOL WIN32API PtInRect( const RECT *lprc, POINT pt)
206{
207 dprintf2(("USER32: PtInRect (%d,%d)(%d,%d) (%d,%d)", lprc->left, lprc->top, lprc->right, lprc->bottom, pt.x, pt.y));
208 if (!lprc)
209 {
210 SetLastError(ERROR_INVALID_PARAMETER);
211 return FALSE;
212 }
213
214 return (pt.x >= lprc->left &&
215 pt.x < lprc->right &&
216 pt.y >= lprc->top &&
217 pt.y < lprc->bottom);
218}
219//******************************************************************************
220//******************************************************************************
221BOOL WIN32API SetRect( PRECT lprc, int nLeft, int nTop, int nRight, int nBottom)
222{
223 if (!lprc)
224 {
225 SetLastError(ERROR_INVALID_PARAMETER);
226 return FALSE;
227 }
228
229 lprc->left = nLeft;
230 lprc->top = nTop;
231 lprc->right = nRight;
232 lprc->bottom = nBottom;
233
234 return TRUE;
235}
236//******************************************************************************
237//******************************************************************************
238BOOL WIN32API SetRectEmpty( PRECT lprc)
239{
240 if (!lprc)
241 {
242 SetLastError(ERROR_INVALID_PARAMETER);
243 return FALSE;
244 }
245
246 lprc->left = lprc->right = lprc->top = lprc->bottom = 0;
247
248 return TRUE;
249}
250//******************************************************************************
251//******************************************************************************
252BOOL WIN32API SubtractRect( PRECT lprcDest, const RECT * lprcSrc1, const RECT * lprcSrc2)
253{
254 dprintf2(("USER32: SubtractRect"));
255 RECT tmp;
256
257 if (!lprcDest || !lprcSrc1 || !lprcSrc2)
258 {
259 SetLastError(ERROR_INVALID_PARAMETER);
260 return FALSE;
261 }
262
263 if (IsRectEmpty(lprcSrc1))
264 {
265 SetLastError(ERROR_INVALID_PARAMETER);
266 SetRectEmpty(lprcDest);
267 return FALSE;
268 }
269 *lprcDest = *lprcSrc1;
270 if (IntersectRect(&tmp,lprcSrc1,lprcSrc2))
271 {
272 if (EqualRect(&tmp,lprcDest))
273 {
274 SetRectEmpty(lprcDest);
275 return FALSE;
276 }
277 if ((tmp.top == lprcDest->top) && (tmp.bottom == lprcDest->bottom))
278 {
279 if (tmp.left == lprcDest->left) lprcDest->left = tmp.right;
280 else if (tmp.right == lprcDest->right) lprcDest->right = tmp.left;
281 }
282 else if ((tmp.left == lprcDest->left) && (tmp.right == lprcDest->right))
283 {
284 if (tmp.top == lprcDest->top) lprcDest->top = tmp.bottom;
285 else if (tmp.bottom == lprcDest->bottom) lprcDest->bottom = tmp.top;
286 }
287 }
288
289 return TRUE;
290}
291//******************************************************************************
292//******************************************************************************
293BOOL WIN32API UnionRect( PRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2)
294{
295 dprintf2(("USER32: UnionRect\n"));
296 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
297 {
298 SetLastError(ERROR_INVALID_PARAMETER);
299 return FALSE;
300 }
301
302 if (IsRectEmpty(lprcSrc1))
303 {
304 if (IsRectEmpty(lprcSrc2))
305 {
306 SetLastError(ERROR_INVALID_PARAMETER);
307 SetRectEmpty(lprcDst);
308 return FALSE;
309 }
310 else *lprcDst = *lprcSrc2;
311 }
312 else
313 {
314 if (IsRectEmpty(lprcSrc2)) *lprcDst = *lprcSrc1;
315 else
316 {
317 lprcDst->left = MIN(lprcSrc1->left,lprcSrc2->left);
318 lprcDst->right = MAX(lprcSrc1->right,lprcSrc2->right);
319 lprcDst->top = MIN(lprcSrc1->top,lprcSrc2->top);
320 lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom);
321 }
322 }
323
324 return TRUE;
325}
326
327/* Cursor Functions */
328
329BOOL WIN32API ClipCursor(const RECT * lpRect)
330{
331 dprintf(("USER32: ClipCursor\n"));
332 return O32_ClipCursor(lpRect);
333}
334//******************************************************************************
335//******************************************************************************
336HCURSOR WIN32API CreateCursor( HINSTANCE hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, const VOID *pvANDPlane, const VOID *pvXORPlane)
337{
338 dprintf(("USER32: CreateCursor\n"));
339 return O32_CreateCursor(hInst,xHotSpot,yHotSpot,nWidth,nHeight,pvANDPlane,pvXORPlane);
340}
341//******************************************************************************
342//******************************************************************************
343BOOL WIN32API DestroyCursor( HCURSOR hCursor)
344{
345 dprintf(("USER32: DestroyCursor\n"));
346 return O32_DestroyCursor(hCursor);
347}
348//******************************************************************************
349//******************************************************************************
350BOOL WIN32API GetClipCursor( LPRECT lpRect)
351{
352 dprintf(("USER32: GetClipCursor\n"));
353 return O32_GetClipCursor(lpRect);
354}
355//******************************************************************************
356//******************************************************************************
357HCURSOR WIN32API GetCursor(void)
358{
359 dprintf2(("USER32: GetCursor\n"));
360 return O32_GetCursor();
361}
362//******************************************************************************
363//******************************************************************************
364BOOL WIN32API GetCursorPos( PPOINT lpPoint)
365{
366 dprintf2(("USER32: GetCursorPos\n"));
367
368 if (!lpPoint) return FALSE;
369 if (OSLibWinQueryPointerPos(lpPoint)) //POINT == POINTL
370 {
371 mapScreenPoint((OSLIBPOINT*)lpPoint);
372 return TRUE;
373 } else return FALSE;
374}
375//******************************************************************************
376//******************************************************************************
377HCURSOR WIN32API SetCursor( HCURSOR hcur)
378{
379 HCURSOR rc;
380
381 rc = O32_SetCursor(hcur);
382 dprintf(("USER32: SetCursor %x (prev %x (%x))\n", hcur, rc, O32_GetCursor()));
383 return rc;
384}
385//******************************************************************************
386//******************************************************************************
387BOOL WIN32API SetCursorPos( int X, int Y)
388{
389 dprintf(("USER32: SetCursorPos %d %d", X,Y));
390 return O32_SetCursorPos(X,Y);
391}
392/*****************************************************************************
393 * Name : BOOL WIN32API SetSystemCursor
394 * Purpose : The SetSystemCursor function replaces the contents of the system
395 * cursor specified by dwCursorId with the contents of the cursor
396 * specified by hCursor, and then destroys hCursor. This function
397 * lets an application customize the system cursors.
398 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
399 * contents, then destroy this
400 * DWORD dwCursorID system cursor specified by its identifier
401 * Variables :
402 * Result : If the function succeeds, the return value is TRUE.
403 * If the function fails, the return value is FALSE. To get extended
404 * error information, call GetLastError.
405 * Remark :
406 * Status : UNTESTED STUB
407 *
408 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
409 *****************************************************************************/
410BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
411 DWORD dwCursorId)
412{
413 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not supported.\n",
414 hCursor,
415 dwCursorId));
416
417 return DestroyCursor(hCursor);
418}
419//******************************************************************************
420//******************************************************************************
421int WIN32API ShowCursor( BOOL bShow)
422{
423 dprintf2(("USER32: ShowCursor %d", bShow));
424 return O32_ShowCursor(bShow);
425}
426
427/* Mouse Input Functions */
428
429/*****************************************************************************
430 * Name : BOOL WIN32API DragDetect
431 * Purpose : The DragDetect function captures the mouse and tracks its movement
432 * Parameters: HWND hwnd
433 * POINT pt
434 * Variables :
435 * Result : If the user moved the mouse outside of the drag rectangle while
436 * holding the left button down, the return value is TRUE.
437 * If the user did not move the mouse outside of the drag rectangle
438 * while holding the left button down, the return value is FALSE.
439 * Remark :
440 * Status : UNTESTED STUB
441 *
442 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
443 *****************************************************************************/
444BOOL WIN32API DragDetect(HWND hwnd,
445 POINT pt)
446{
447 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
448 hwnd));
449
450 return (FALSE);
451}
452//******************************************************************************
453//******************************************************************************
454UINT WIN32API GetDoubleClickTime(void)
455{
456 dprintf(("USER32: GetDoubleClickTime\n"));
457 return O32_GetDoubleClickTime();
458}
459/*****************************************************************************
460 * Name : VOID WIN32API mouse_event
461 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
462 * Parameters: DWORD dwFlags flags specifying various motion/click variants
463 * DWORD dx horizontal mouse position or position change
464 * DWORD dy vertical mouse position or position change
465 * DWORD cButtons unused, reserved for future use, set to zero
466 * DWORD dwExtraInfo 32 bits of application-defined information
467 * Variables :
468 * Result :
469 * Remark :
470 * Status : UNTESTED STUB
471 *
472 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
473 *****************************************************************************/
474VOID WIN32API mouse_event(DWORD dwFlags,
475 DWORD dx,
476 DWORD dy,
477 DWORD cButtons,
478 DWORD dwExtraInfo)
479{
480 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
481 dwFlags,
482 dx,
483 dy,
484 cButtons,
485 dwExtraInfo));
486}
487//******************************************************************************
488//******************************************************************************
489BOOL WIN32API SetDoubleClickTime( UINT uInterval)
490{
491 dprintf(("USER32: SetDoubleClickTime\n"));
492 return O32_SetDoubleClickTime(uInterval);
493}
494//******************************************************************************
495//******************************************************************************
496BOOL WIN32API SwapMouseButton( BOOL fSwap)
497{
498 dprintf(("USER32: SwapMouseButton\n"));
499 return O32_SwapMouseButton(fSwap);
500}
501
502/* Error Functions */
503
504/*****************************************************************************
505 * Name : ExitWindowsEx
506 * Purpose : Shutdown System
507 * Parameters: UINT uFlags
508 * DWORD dwReserved
509 * Variables :
510 * Result : TRUE / FALSE
511 * Remark :
512 * Status :
513 *
514 * Author : Patrick Haller [Tue, 1999/10/20 21:24]
515 *****************************************************************************/
516
517ODINFUNCTION2(BOOL, ExitWindowsEx, UINT, uFlags,
518 DWORD, dwReserved)
519{
520 int rc = MessageBoxA(HWND_DESKTOP,
521 "Are you sure you want to shutdown the OS/2 system?",
522 "Shutdown ...",
523 MB_YESNOCANCEL | MB_ICONQUESTION);
524 switch (rc)
525 {
526 case IDCANCEL: return (FALSE);
527 case IDYES: break;
528 case IDNO:
529 dprintf(("no shutdown!\n"));
530 return TRUE;
531 }
532
533 return O32_ExitWindowsEx(uFlags,dwReserved);
534}
535
536
537//******************************************************************************
538//******************************************************************************
539BOOL WIN32API MessageBeep( UINT uType)
540{
541 INT flStyle;
542
543 dprintf(("USER32: MessageBeep\n"));
544
545 switch (uType)
546 {
547 case 0xFFFFFFFF:
548 OSLibDosBeep(500,50);
549 return TRUE;
550 case MB_ICONASTERISK:
551 flStyle = WAOS_NOTE;
552 break;
553 case MB_ICONEXCLAMATION:
554 flStyle = WAOS_WARNING;
555 break;
556 case MB_ICONHAND:
557 case MB_ICONQUESTION:
558 case MB_OK:
559 flStyle = WAOS_NOTE;
560 break;
561 default:
562 flStyle = WAOS_ERROR; //CB: should be right
563 break;
564 }
565 return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle);
566}
567//******************************************************************************
568//2nd parameter not used according to SDK (yet?)
569//******************************************************************************
570VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
571{
572 dprintf(("USER32: SetLastErrorEx %x %x", dwErrCode, dwType));
573 SetLastError(dwErrCode);
574}
575
576/* Accessibility Functions */
577
578int WIN32API GetSystemMetrics(int nIndex)
579{
580 int rc = 0;
581
582 switch(nIndex) {
583 case SM_CXSCREEN:
584 rc = ScreenWidth;
585 break;
586
587 case SM_CYSCREEN:
588 rc = ScreenHeight;
589 break;
590
591 case SM_CXVSCROLL:
592 rc = OSLibWinQuerySysValue(SVOS_CXVSCROLL);
593 break;
594
595 case SM_CYHSCROLL:
596 rc = OSLibWinQuerySysValue(SVOS_CYHSCROLL);
597 break;
598
599 case SM_CYCAPTION:
600 rc = 19;
601 //rc = OSLibWinQuerySysValue(SVOS_CYTITLEBAR);
602 break;
603
604 case SM_CXBORDER:
605 case SM_CYBORDER:
606 rc = 1;
607 break;
608
609 case SM_CXDLGFRAME:
610 case SM_CYDLGFRAME:
611 rc = 3;
612 break;
613
614 case SM_CYMENU:
615 case SM_CXMENUSIZE:
616 case SM_CYMENUSIZE:
617 rc = 19;
618 break;
619
620 case SM_CXSIZE:
621 case SM_CYSIZE:
622 rc = GetSystemMetrics(SM_CYCAPTION)-2;
623 break;
624
625 case SM_CXFRAME:
626 case SM_CYFRAME:
627 rc = 4;
628 break;
629
630 case SM_CXEDGE:
631 case SM_CYEDGE:
632 rc = 2;
633 break;
634
635 case SM_CXMINSPACING:
636 rc = 160;
637 break;
638
639 case SM_CYMINSPACING:
640 rc = 24;
641 break;
642
643 case SM_CXSMICON:
644 case SM_CYSMICON:
645 rc = 16;
646 break;
647
648 case SM_CYSMCAPTION:
649 rc = 16;
650 break;
651
652 case SM_CXSMSIZE:
653 case SM_CYSMSIZE:
654 rc = 15;
655 break;
656
657//CB: todo: add missing metrics
658
659 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
660 rc = OSLibWinQuerySysValue(SVOS_CXICON);
661 //CB: return standard windows icon size?
662 //rc = 32;
663 break;
664 case SM_CYICONSPACING:
665 rc = OSLibWinQuerySysValue(SVOS_CYICON);
666 //read SM_CXICONSPACING comment
667 //rc = 32;
668 break;
669 case SM_PENWINDOWS:
670 rc = FALSE;
671 break;
672 case SM_DBCSENABLED:
673 rc = FALSE;
674 break;
675 case SM_CXICON:
676 case SM_CYICON:
677 rc = 32; //CB: Win32: only 32x32, OS/2 32x32/40x40
678 // we must implement 32x32 for all screen resolutions
679 break;
680 case SM_ARRANGE:
681 rc = ARW_BOTTOMLEFT | ARW_LEFT;
682 break;
683 case SM_CXMINIMIZED:
684 break;
685 case SM_CYMINIMIZED:
686 break;
687
688 case SM_CXMINTRACK:
689 case SM_CXMIN:
690 rc = 112;
691 break;
692
693 case SM_CYMINTRACK:
694 case SM_CYMIN:
695 rc = 27;
696 break;
697
698 case SM_CXMAXTRACK: //max window size
699 case SM_CXMAXIMIZED: //max toplevel window size
700 rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
701 break;
702
703 case SM_CYMAXTRACK:
704 case SM_CYMAXIMIZED:
705 rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
706 break;
707
708 case SM_NETWORK:
709 rc = 0x01; //TODO: default = yes
710 break;
711 case SM_CLEANBOOT:
712 rc = 0; //normal boot
713 break;
714 case SM_CXDRAG: //nr of pixels before drag becomes a real one
715 rc = 2;
716 break;
717 case SM_CYDRAG:
718 rc = 2;
719 break;
720 case SM_SHOWSOUNDS: //show instead of play sound
721 rc = FALSE;
722 break;
723 case SM_CXMENUCHECK:
724 rc = 4; //TODO
725 break;
726 case SM_CYMENUCHECK:
727 rc = OSLibWinQuerySysValue(SVOS_CYMENU);
728 break;
729 case SM_SLOWMACHINE:
730 rc = FALSE; //even a slow machine is fast with OS/2 :)
731 break;
732 case SM_MIDEASTENABLED:
733 rc = FALSE;
734 break;
735 case SM_MOUSEWHEELPRESENT:
736 rc = FALSE;
737 break;
738 case SM_XVIRTUALSCREEN:
739 rc = 0;
740 break;
741 case SM_YVIRTUALSCREEN:
742 rc = 0;
743 break;
744
745 case SM_CXVIRTUALSCREEN:
746 rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
747 break;
748 case SM_CYVIRTUALSCREEN:
749 rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
750 break;
751 case SM_CMONITORS:
752 rc = 1;
753 break;
754 case SM_SAMEDISPLAYFORMAT:
755 rc = TRUE;
756 break;
757 case SM_CMETRICS:
758 rc = 81;
759 //rc = O32_GetSystemMetrics(44); //Open32 changed this one
760 break;
761 default:
762 //better than nothing
763 rc = O32_GetSystemMetrics(nIndex);
764 break;
765 }
766 dprintf2(("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc));
767 return(rc);
768}
769//******************************************************************************
770/* Not support by Open32 (not included are the new win9x parameters):
771 case SPI_GETFASTTASKSWITCH:
772 case SPI_GETGRIDGRANULARITY:
773 case SPI_GETICONTITLELOGFONT:
774 case SPI_GETICONTITLEWRAP:
775 case SPI_GETMENUDROPALIGNMENT:
776 case SPI_ICONHORIZONTALSPACING:
777 case SPI_ICONVERTICALSPACING:
778 case SPI_LANGDRIVER:
779 case SPI_SETFASTTASKSWITCH:
780 case SPI_SETGRIDGRANULARITY:
781 case SPI_SETICONTITLELOGFONT:
782 case SPI_SETICONTITLEWRAP:
783 case SPI_SETMENUDROPALIGNMENT:
784 case SPI_GETSCREENSAVEACTIVE:
785 case SPI_GETSCREENSAVETIMEOUT:
786 case SPI_SETDESKPATTERN:
787 case SPI_SETDESKWALLPAPER:
788 case SPI_SETSCREENSAVEACTIVE:
789 case SPI_SETSCREENSAVETIMEOUT:
790*/
791//******************************************************************************
792BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
793{
794 BOOL rc = TRUE;
795
796 switch(uiAction) {
797 case SPI_SCREENSAVERRUNNING:
798 *(BOOL *)pvParam = FALSE;
799 break;
800 case SPI_GETDRAGFULLWINDOWS:
801 *(BOOL *)pvParam = FALSE; //CB: where is the Warp 4 setting stored?
802 break;
803 case SPI_GETNONCLIENTMETRICS:
804 {
805 LPNONCLIENTMETRICSA lpnm = (LPNONCLIENTMETRICSA)pvParam;
806
807 if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA))
808 {
809 memset(lpnm, 0, sizeof(NONCLIENTMETRICSA));
810 lpnm->cbSize = sizeof(NONCLIENTMETRICSA);
811
812 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont),0);
813 lpnm->lfCaptionFont.lfWeight = FW_BOLD;
814 lpnm->iCaptionWidth = 32; //TODO
815 lpnm->iCaptionHeight = 32; //TODO
816
817 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont),0);
818 lpnm->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
819 lpnm->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
820
821 LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont);
822 GetProfileStringA("Desktop", "MenuFont", "MS Sans Serif",
823 lpLogFont->lfFaceName, LF_FACESIZE);
824
825 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 13);
826 lpLogFont->lfWidth = 0;
827 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
828 lpLogFont->lfWeight = FW_NORMAL;
829 lpLogFont->lfItalic = FALSE;
830 lpLogFont->lfStrikeOut = FALSE;
831 lpLogFont->lfUnderline = FALSE;
832 lpLogFont->lfCharSet = ANSI_CHARSET;
833 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
834 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
835 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
836
837 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
838 (LPVOID)&(lpnm->lfStatusFont),0);
839 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
840 (LPVOID)&(lpnm->lfMessageFont),0);
841
842 lpnm->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
843 lpnm->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
844 lpnm->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
845 lpnm->iMenuHeight = GetSystemMetrics(SM_CYMENU);
846 lpnm->iMenuWidth = lpnm->iMenuHeight; //TODO
847 }
848 else
849 {
850 dprintf(("SPI_GETNONCLIENTMETRICS: size mismatch !! (is %d; should be %d)\n", lpnm->cbSize, sizeof(NONCLIENTMETRICSA)));
851 /* FIXME: SetLastError? */
852 rc = FALSE;
853 }
854 break;
855 }
856
857 case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */
858 {
859 LPICONMETRICSA lpIcon = (LPICONMETRICSA)pvParam;
860 if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
861 {
862 SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0,
863 &lpIcon->iHorzSpacing, FALSE );
864 SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0,
865 &lpIcon->iVertSpacing, FALSE );
866 SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0,
867 &lpIcon->iTitleWrap, FALSE );
868 SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
869 &lpIcon->lfFont, FALSE );
870 }
871 else
872 {
873 dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
874 /* FIXME: SetLastError? */
875 rc = FALSE;
876 }
877 break;
878 }
879
880 case SPI_GETICONTITLELOGFONT:
881 {
882 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
883
884 /* from now on we always have an alias for MS Sans Serif */
885 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
886 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
887 lpLogFont->lfWidth = 0;
888 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
889 lpLogFont->lfWeight = FW_NORMAL;
890 lpLogFont->lfItalic = FALSE;
891 lpLogFont->lfStrikeOut = FALSE;
892 lpLogFont->lfUnderline = FALSE;
893 lpLogFont->lfCharSet = ANSI_CHARSET;
894 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
895 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
896 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
897 break;
898 }
899 case SPI_GETBORDER:
900 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
901 break;
902
903 case SPI_GETWORKAREA:
904 SetRect( (RECT *)pvParam, 0, 0,
905 GetSystemMetrics( SM_CXSCREEN ),
906 GetSystemMetrics( SM_CYSCREEN )
907 );
908 break;
909
910 case SPI_GETWHEELSCROLLLINES: //TODO: Undocumented
911 rc = 16;
912 break;
913
914 default:
915 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
916 break;
917 }
918 dprintf(("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc));
919 return(rc);
920}
921//******************************************************************************
922//TODO: Check for more options that have different structs for Unicode!!!!
923//******************************************************************************
924BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
925{
926 BOOL rc = TRUE;
927 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
928 NONCLIENTMETRICSA clientMetricsA = {0};
929 PVOID pvParamA;
930 UINT uiParamA;
931
932 switch(uiAction) {
933 case SPI_SETNONCLIENTMETRICS:
934 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
935 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
936 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
937 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
938 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
939 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
940 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
941 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
942 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
943 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
944 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
945 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
946 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
947 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
948 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
949 //no break
950 case SPI_GETNONCLIENTMETRICS:
951 uiParamA = sizeof(NONCLIENTMETRICSA);
952 pvParamA = &clientMetricsA;
953 break;
954
955 case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */
956 {
957 LPICONMETRICSW lpIcon = (LPICONMETRICSW)pvParam;
958 if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
959 {
960 SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0,
961 &lpIcon->iHorzSpacing, FALSE );
962 SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0,
963 &lpIcon->iVertSpacing, FALSE );
964 SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0,
965 &lpIcon->iTitleWrap, FALSE );
966 SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
967 &lpIcon->lfFont, FALSE );
968 return TRUE;
969 }
970 else
971 {
972 dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
973 /* FIXME: SetLastError? */
974 return FALSE;
975 }
976 }
977
978 case SPI_GETICONTITLELOGFONT:
979 {
980 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
981
982 /* from now on we always have an alias for MS Sans Serif */
983 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
984 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
985 lpLogFont->lfWidth = 0;
986 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
987 lpLogFont->lfWeight = FW_NORMAL;
988 lpLogFont->lfItalic = FALSE;
989 lpLogFont->lfStrikeOut = FALSE;
990 lpLogFont->lfUnderline = FALSE;
991 lpLogFont->lfCharSet = ANSI_CHARSET;
992 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
993 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
994 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
995 return TRUE;
996 }
997 default:
998 pvParamA = pvParam;
999 uiParamA = uiParam;
1000 break;
1001 }
1002 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1003
1004 switch(uiAction) {
1005 case SPI_GETNONCLIENTMETRICS:
1006 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1007 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1008 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1009 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1010 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1011 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1012 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1013
1014 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1015 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1016 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1017
1018 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1019 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1020 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1021 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1022 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1023 break;
1024 }
1025 dprintf(("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc));
1026 return(rc);
1027}
1028
1029/* Process and Thread Functions */
1030
1031//******************************************************************************
1032//DWORD idAttach; /* thread to attach */
1033//DWORD idAttachTo; /* thread to attach to */
1034//BOOL fAttach; /* attach or detach */
1035//******************************************************************************
1036BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1037{
1038 dprintf(("USER32: AttachThreadInput, not implemented\n"));
1039 return(TRUE);
1040}
1041//******************************************************************************
1042//******************************************************************************
1043DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
1044{
1045 dprintf(("USER32: WaitForInputIdle %x %d\n", hProcess, dwTimeOut));
1046
1047 return O32_WaitForInputIdle(hProcess, dwTimeOut);
1048}
1049
1050/* Help Functions */
1051
1052BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
1053{
1054 static WORD WM_WINHELP = 0;
1055 HWND hDest;
1056 LPWINHELP lpwh;
1057 HGLOBAL hwh;
1058 HINSTANCE winhelp;
1059 int size,dsize,nlen;
1060
1061 dprintf(("USER32: WinHelpA %s\n", lpszHelp));
1062
1063 if(!WM_WINHELP)
1064 {
1065 WM_WINHELP=RegisterWindowMessageA("WM_WINHELP");
1066 if(!WM_WINHELP)
1067 return FALSE;
1068 }
1069
1070 hDest = FindWindowA( "MS_WINHELP", NULL );
1071 if(!hDest)
1072 {
1073 if(uCommand == HELP_QUIT)
1074 return TRUE;
1075 else
1076 winhelp = WinExec ( "winhlp32.exe -x", SW_SHOWNORMAL );
1077 if ( winhelp <= 32 ) return FALSE;
1078 if ( ! ( hDest = FindWindowA ( "MS_WINHELP", NULL ) )) return FALSE;
1079 }
1080
1081 switch(uCommand)
1082 {
1083 case HELP_CONTEXT:
1084 case HELP_SETCONTENTS:
1085 case HELP_CONTENTS:
1086 case HELP_CONTEXTPOPUP:
1087 case HELP_FORCEFILE:
1088 case HELP_HELPONHELP:
1089 case HELP_FINDER:
1090 case HELP_QUIT:
1091 dsize=0;
1092 break;
1093
1094 case HELP_KEY:
1095 case HELP_PARTIALKEY:
1096 case HELP_COMMAND:
1097 dsize = strlen( (LPSTR)dwData )+1;
1098 break;
1099
1100 case HELP_MULTIKEY:
1101 dsize = ((LPMULTIKEYHELP)dwData)->mkSize;
1102 break;
1103
1104 case HELP_SETWINPOS:
1105 dsize = ((LPHELPWININFO)dwData)->wStructSize;
1106 break;
1107
1108 default:
1109 //WARN("Unknown help command %d\n",wCommand);
1110 return FALSE;
1111 }
1112 if(lpszHelp)
1113 nlen = strlen(lpszHelp)+1;
1114 else
1115 nlen = 0;
1116 size = sizeof(WINHELP) + nlen + dsize;
1117 hwh = GlobalAlloc(0,size);
1118 lpwh = (WINHELP*)GlobalLock(hwh);
1119 lpwh->size = size;
1120 lpwh->command = uCommand;
1121 lpwh->data = dwData;
1122 if(nlen)
1123 {
1124 strcpy(((char*)lpwh) + sizeof(WINHELP),lpszHelp);
1125 lpwh->ofsFilename = sizeof(WINHELP);
1126 } else
1127 lpwh->ofsFilename = 0;
1128 if(dsize)
1129 {
1130 memcpy(((char*)lpwh)+sizeof(WINHELP)+nlen,(LPSTR)dwData,dsize);
1131 lpwh->ofsData = sizeof(WINHELP)+nlen;
1132 } else
1133 lpwh->ofsData = 0;
1134 GlobalUnlock(hwh);
1135
1136 return SendMessageA(hDest,WM_WINHELP,hwnd,hwh);
1137}
1138//******************************************************************************
1139//******************************************************************************
1140BOOL WIN32API WinHelpW( HWND hwnd, LPCWSTR lpszHelp, UINT uCommand, DWORD dwData)
1141{
1142 char *astring = UnicodeToAsciiString((LPWSTR)lpszHelp);
1143 BOOL rc;
1144
1145 dprintf(("USER32: WinHelpW\n"));
1146
1147 rc = WinHelpA(hwnd,astring,uCommand,dwData);
1148 FreeAsciiString(astring);
1149
1150 return rc;
1151}
1152
1153/* Keyboard and Input Functions */
1154
1155BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1156{
1157 dprintf(("USER32: ActivateKeyboardLayout, not implemented\n"));
1158 return(TRUE);
1159}
1160//******************************************************************************
1161//SvL: 24-6-'97 - Added
1162//TODO: Not implemented
1163//******************************************************************************
1164WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1165{
1166 dprintf2(("USER32: GetAsyncKeyState Not implemented\n"));
1167 return 0;
1168}
1169/*****************************************************************************
1170 * Name : UINT WIN32API GetKBCodePage
1171 * Purpose : The GetKBCodePage function is provided for compatibility with
1172 * earlier versions of Windows. In the Win32 application programming
1173 * interface (API) it just calls the GetOEMCP function.
1174 * Parameters:
1175 * Variables :
1176 * Result : If the function succeeds, the return value is an OEM code-page
1177 * identifier, or it is the default identifier if the registry
1178 * value is not readable. For a list of OEM code-page identifiers,
1179 * see GetOEMCP.
1180 * Remark :
1181 * Status : COMPLETELY IMPLEMENTED UNTESTED
1182 *
1183 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1184 *****************************************************************************/
1185
1186UINT WIN32API GetKBCodePage(VOID)
1187{
1188 return (GetOEMCP());
1189}
1190//******************************************************************************
1191//******************************************************************************
1192int WIN32API GetKeyNameTextA( LPARAM lParam, LPSTR lpString, int nSize)
1193{
1194 dprintf(("USER32: GetKeyNameTextA\n"));
1195 return O32_GetKeyNameText(lParam,lpString,nSize);
1196}
1197//******************************************************************************
1198//******************************************************************************
1199int WIN32API GetKeyNameTextW( LPARAM lParam, LPWSTR lpString, int nSize)
1200{
1201 dprintf(("USER32: GetKeyNameTextW DOES NOT WORK\n"));
1202 // NOTE: This will not work as is (needs UNICODE support)
1203 return 0;
1204// return O32_GetKeyNameText(arg1, arg2, arg3);
1205}
1206//******************************************************************************
1207//SvL: 24-6-'97 - Added
1208//******************************************************************************
1209SHORT WIN32API GetKeyState( int nVirtKey)
1210{
1211 dprintf2(("USER32: GetKeyState %d\n", nVirtKey));
1212 return O32_GetKeyState(nVirtKey);
1213}
1214/*****************************************************************************
1215 * Name : VOID WIN32API keybd_event
1216 * Purpose : The keybd_event function synthesizes a keystroke. The system
1217 * can use such a synthesized keystroke to generate a WM_KEYUP or
1218 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
1219 * the keybd_event function.
1220 * Parameters: BYTE bVk virtual-key code
1221
1222 * BYTE bScan hardware scan code
1223 * DWORD dwFlags flags specifying various function options
1224 * DWORD dwExtraInfo additional data associated with keystroke
1225 * Variables :
1226 * Result :
1227 * Remark :
1228 * Status : UNTESTED STUB
1229 *
1230 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1231 *****************************************************************************/
1232VOID WIN32API keybd_event (BYTE bVk,
1233 BYTE bScan,
1234 DWORD dwFlags,
1235 DWORD dwExtraInfo)
1236{
1237 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
1238 bVk,
1239 bScan,
1240 dwFlags,
1241 dwExtraInfo));
1242}
1243/*****************************************************************************
1244 * Name : HLK WIN32API LoadKeyboardLayoutA
1245 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1246 * the system. Several keyboard layouts can be loaded at a time, but
1247 * only one per process is active at a time. Loading multiple keyboard
1248 * layouts makes it possible to rapidly switch between layouts.
1249 * Parameters:
1250 * Variables :
1251 * Result : If the function succeeds, the return value is the handle of the
1252 * keyboard layout.
1253 * If the function fails, the return value is NULL. To get extended
1254 * error information, call GetLastError.
1255 * Remark :
1256 * Status : UNTESTED STUB
1257 *
1258 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1259 *****************************************************************************/
1260HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
1261 UINT Flags)
1262{
1263 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
1264 pwszKLID,
1265 Flags));
1266
1267 return (NULL);
1268}
1269/*****************************************************************************
1270 * Name : HLK WIN32API LoadKeyboardLayoutW
1271 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1272 * the system. Several keyboard layouts can be loaded at a time, but
1273 * only one per process is active at a time. Loading multiple keyboard
1274 * layouts makes it possible to rapidly switch between layouts.
1275 * Parameters:
1276 * Variables :
1277 * Result : If the function succeeds, the return value is the handle of the
1278 * keyboard layout.
1279 * If the function fails, the return value is NULL. To get extended
1280 * error information, call GetLastError.
1281 * Remark :
1282 * Status : UNTESTED STUB
1283 *
1284 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1285 *****************************************************************************/
1286HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
1287 UINT Flags)
1288{
1289 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
1290 pwszKLID,
1291 Flags));
1292
1293 return (NULL);
1294}
1295//******************************************************************************
1296//******************************************************************************
1297UINT WIN32API MapVirtualKeyA( UINT uCode, UINT uMapType)
1298{
1299 dprintf(("USER32: MapVirtualKeyA\n"));
1300 /* A quick fix for Commandos, very incomplete */
1301 switch (uMapType) {
1302 case 2:
1303 if (uCode >= VK_A && uCode <= VK_Z) {
1304 return 'A' + uCode - VK_A;
1305 }
1306 break;
1307 }
1308 return O32_MapVirtualKey(uCode,uMapType);
1309}
1310//******************************************************************************
1311//******************************************************************************
1312UINT WIN32API MapVirtualKeyW( UINT uCode, UINT uMapType)
1313{
1314 dprintf(("USER32: MapVirtualKeyW\n"));
1315 // NOTE: This will not work as is (needs UNICODE support)
1316 return O32_MapVirtualKey(uCode,uMapType);
1317}
1318/*****************************************************************************
1319 * Name : UINT WIN32API MapVirtualKeyExA
1320 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1321 * code into a scan code or character value, or translates a scan
1322 * code into a virtual-key code. The function translates the codes
1323 * using the input language and physical keyboard layout identified
1324 * by the given keyboard layout handle.
1325 * Parameters:
1326 * Variables :
1327 * Result : The return value is either a scan code, a virtual-key code, or
1328 * a character value, depending on the value of uCode and uMapType.
1329 * If there is no translation, the return value is zero.
1330 * Remark :
1331 * Status : UNTESTED STUB
1332 *
1333 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1334 *****************************************************************************/
1335UINT WIN32API MapVirtualKeyExA(UINT uCode,
1336 UINT uMapType,
1337 HKL dwhkl)
1338{
1339 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
1340 uCode,
1341 uMapType,
1342 dwhkl));
1343
1344 return (0);
1345}
1346/*****************************************************************************
1347 * Name : UINT WIN32API MapVirtualKeyExW
1348 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1349 * code into a scan code or character value, or translates a scan
1350 * code into a virtual-key code. The function translates the codes
1351 * using the input language and physical keyboard layout identified
1352 * by the given keyboard layout handle.
1353 * Parameters:
1354 * Variables :
1355 * Result : The return value is either a scan code, a virtual-key code, or
1356 * a character value, depending on the value of uCode and uMapType.
1357 * If there is no translation, the return value is zero.
1358 * Remark :
1359 * Status : UNTESTED STUB
1360
1361 *
1362 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1363 *****************************************************************************/
1364UINT WIN32API MapVirtualKeyExW(UINT uCode,
1365 UINT uMapType,
1366 HKL dwhkl)
1367{
1368 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
1369 uCode,
1370 uMapType,
1371 dwhkl));
1372
1373 return (0);
1374}
1375/*****************************************************************************
1376 * Name : DWORD WIN32API OemKeyScan
1377 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
1378 * into the OEM scan codes and shift states. The function provides
1379 * information that allows a program to send OEM text to another
1380 * program by simulating keyboard input.
1381 * Parameters:
1382 * Variables :
1383 * Result :
1384 * Remark :
1385 * Status : UNTESTED STUB
1386 *
1387 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1388 *****************************************************************************/
1389DWORD WIN32API OemKeyScan(WORD wOemChar)
1390{
1391 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
1392 wOemChar));
1393
1394 return (wOemChar);
1395}
1396//******************************************************************************
1397//******************************************************************************
1398BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1399{
1400 dprintf(("USER32: RegisterHotKey, not implemented\n"));
1401 hwnd = Win32ToOS2Handle(hwnd);
1402 return(TRUE);
1403}
1404/*****************************************************************************
1405 * Name : int WIN32API ToUnicode
1406 * Purpose : The ToUnicode function translates the specified virtual-key code
1407 * and keyboard state to the corresponding Unicode character or characters.
1408 * Parameters: UINT wVirtKey virtual-key code
1409 * UINT wScanCode scan code
1410 * PBYTE lpKeyState address of key-state array
1411 * LPWSTR pwszBuff buffer for translated key
1412 * int cchBuff size of translated key buffer
1413 * UINT wFlags set of function-conditioning flags
1414 * Variables :
1415 * Result : - 1 The specified virtual key is a dead-key character (accent or
1416 * diacritic). This value is returned regardless of the keyboard
1417 * layout, even if several characters have been typed and are
1418 * stored in the keyboard state. If possible, even with Unicode
1419 * keyboard layouts, the function has written a spacing version of
1420 * the dead-key character to the buffer specified by pwszBuffer.
1421 * For example, the function writes the character SPACING ACUTE
1422 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
1423 * 0 The specified virtual key has no translation for the current
1424 * state of the keyboard. Nothing was written to the buffer
1425 * specified by pwszBuffer.
1426 * 1 One character was written to the buffer specified by pwszBuffer.
1427 * 2 or more Two or more characters were written to the buffer specified by
1428 * pwszBuff. The most common cause for this is that a dead-key
1429 * character (accent or diacritic) stored in the keyboard layout
1430 * could not be combined with the specified virtual key to form a
1431 * single character.
1432 * Remark :
1433 * Status : UNTESTED STUB
1434 *
1435 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1436 *****************************************************************************/
1437int WIN32API ToUnicode(UINT uVirtKey,
1438 UINT uScanCode,
1439 PBYTE lpKeyState,
1440 LPWSTR pwszBuff,
1441 int cchBuff,
1442 UINT wFlags)
1443{
1444 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1445 uVirtKey,
1446 uScanCode,
1447 lpKeyState,
1448 pwszBuff,
1449 cchBuff,
1450 wFlags));
1451
1452 return (0);
1453}
1454/*****************************************************************************
1455 * Name : BOOL WIN32API UnloadKeyboardLayout
1456 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
1457 * Parameters: HKL hkl handle of keyboard layout
1458 * Variables :
1459 * Result : If the function succeeds, the return value is the handle of the
1460 * keyboard layout; otherwise, it is NULL. To get extended error
1461 * information, use the GetLastError function.
1462 * Remark :
1463 * Status : UNTESTED STUB
1464 *
1465 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1466 *****************************************************************************/
1467BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
1468{
1469 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
1470 hkl));
1471
1472 return (0);
1473}
1474//******************************************************************************
1475//******************************************************************************
1476BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1477{
1478 dprintf(("USER32: UnregisterHotKey, not implemented\n"));
1479 hwnd = Win32ToOS2Handle(hwnd);
1480
1481 return(TRUE);
1482}
1483//******************************************************************************
1484//SvL: 24-6-'97 - Added
1485//******************************************************************************
1486WORD WIN32API VkKeyScanA( char ch)
1487{
1488 dprintf(("USER32: VkKeyScanA %x", ch));
1489 return O32_VkKeyScan(ch);
1490}
1491//******************************************************************************
1492//******************************************************************************
1493WORD WIN32API VkKeyScanW( WCHAR wch)
1494{
1495 dprintf(("USER32: VkKeyScanW %x", wch));
1496 // NOTE: This will not work as is (needs UNICODE support)
1497 return O32_VkKeyScan((char)wch);
1498}
1499/*****************************************************************************
1500 * Name : SHORT WIN32API VkKeyScanExW
1501 * Purpose : The VkKeyScanEx function translates a character to the
1502 * corresponding virtual-key code and shift state. The function
1503 * translates the character using the input language and physical
1504 * keyboard layout identified by the given keyboard layout handle.
1505 * Parameters: UINT uChar character to translate
1506 * HKL hkl keyboard layout handle
1507 * Variables :
1508 * Result : see docs
1509 * Remark :
1510 * Status : UNTESTED STUB
1511 *
1512 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1513 *****************************************************************************/
1514WORD WIN32API VkKeyScanExW(WCHAR uChar,
1515 HKL hkl)
1516{
1517 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
1518 uChar,
1519 hkl));
1520
1521 return (uChar);
1522}
1523/*****************************************************************************
1524 * Name : SHORT WIN32API VkKeyScanExA
1525 * Purpose : The VkKeyScanEx function translates a character to the
1526 * corresponding virtual-key code and shift state. The function
1527 * translates the character using the input language and physical
1528 * keyboard layout identified by the given keyboard layout handle.
1529 * Parameters: UINT uChar character to translate
1530 * HKL hkl keyboard layout handle
1531 * Variables :
1532 * Result : see docs
1533 * Remark :
1534 * Status : UNTESTED STUB
1535 *
1536 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1537 *****************************************************************************/
1538WORD WIN32API VkKeyScanExA(CHAR uChar,
1539 HKL hkl)
1540{
1541 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
1542 uChar,
1543 hkl));
1544
1545 return (uChar);
1546}
1547
1548/* Window Functions */
1549
1550/*****************************************************************************
1551 * Name : BOOL WIN32API AnyPopup
1552 * Purpose : The AnyPopup function indicates whether an owned, visible,
1553 * top-level pop-up, or overlapped window exists on the screen. The
1554 * function searches the entire Windows screen, not just the calling
1555 * application's client area.
1556 * Parameters: VOID
1557 * Variables :
1558 * Result : If a pop-up window exists, the return value is TRUE even if the
1559 * pop-up window is completely covered by other windows. Otherwise,
1560 * it is FALSE.
1561 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1562 * compatibility purposes. It is generally not useful.
1563 * Status : UNTESTED STUB
1564 *
1565 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1566 *****************************************************************************/
1567BOOL WIN32API AnyPopup(VOID)
1568{
1569 dprintf(("USER32:AnyPopup() not implemented.\n"));
1570
1571 return (FALSE);
1572}
1573
1574/*****************************************************************************
1575 * Name : BOOL WIN32API PaintDesktop
1576 * Purpose : The PaintDesktop function fills the clipping region in the
1577 * specified device context with the desktop pattern or wallpaper.
1578 * The function is provided primarily for shell desktops.
1579 * Parameters:
1580 * Variables :
1581 * Result : If the function succeeds, the return value is TRUE.
1582 * If the function fails, the return value is FALSE.
1583 * Remark :
1584 * Status : UNTESTED STUB
1585 *
1586 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1587 *****************************************************************************/
1588BOOL WIN32API PaintDesktop(HDC hdc)
1589{
1590 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
1591 hdc));
1592
1593 return (FALSE);
1594}
1595
1596/* Filled Shape Functions */
1597
1598
1599int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
1600{
1601 dprintf(("USER32: FillRect %x (%d,%d)(%d,%d) brush %X", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom, hbr));
1602 return O32_FillRect(hDC,lprc,hbr);
1603}
1604//******************************************************************************
1605//******************************************************************************
1606int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr)
1607{
1608 dprintf(("USER32: FrameRect %x (%d,%d)(%d,%d) brush %x", hDC, lprc->top, lprc->left, lprc->bottom, lprc->right, hbr));
1609 return O32_FrameRect(hDC,lprc,hbr);
1610}
1611//******************************************************************************
1612//******************************************************************************
1613BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
1614{
1615 dprintf(("USER32: InvertRect %x", hDC));
1616 return O32_InvertRect(hDC,lprc);
1617}
1618
1619/* System Information Functions */
1620
1621/* Window Station and Desktop Functions */
1622
1623/*****************************************************************************
1624 * Name : HDESK WIN32API GetThreadDesktop
1625 * Purpose : The GetThreadDesktop function returns a handle to the desktop
1626 * associated with a specified thread.
1627 * Parameters: DWORD dwThreadId thread identifier
1628 * Variables :
1629 * Result : If the function succeeds, the return value is the handle of the
1630 * desktop associated with the specified thread.
1631 * Remark :
1632 * Status : UNTESTED STUB
1633 *
1634 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1635 *****************************************************************************/
1636HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
1637{
1638 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
1639 dwThreadId));
1640
1641 return (NULL);
1642}
1643
1644/*****************************************************************************
1645 * Name : BOOL WIN32API CloseDesktop
1646 * Purpose : The CloseDesktop function closes an open handle of a desktop
1647 * object. A desktop is a secure object contained within a window
1648 * station object. A desktop has a logical display surface and
1649 * contains windows, menus and hooks.
1650 * Parameters: HDESK hDesktop
1651 * Variables :
1652 * Result : If the function succeeds, the return value is TRUE.
1653 * If the functions fails, the return value is FALSE. To get
1654 * extended error information, call GetLastError.
1655 * Remark :
1656 * Status : UNTESTED STUB
1657 *
1658 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1659 *****************************************************************************/
1660BOOL WIN32API CloseDesktop(HDESK hDesktop)
1661{
1662 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1663 hDesktop));
1664
1665 return (FALSE);
1666}
1667/*****************************************************************************
1668 * Name : BOOL WIN32API CloseWindowStation
1669 * Purpose : The CloseWindowStation function closes an open window station handle.
1670 * Parameters: HWINSTA hWinSta
1671 * Variables :
1672 * Result :
1673 * Remark : If the function succeeds, the return value is TRUE.
1674 * If the functions fails, the return value is FALSE. To get
1675 * extended error information, call GetLastError.
1676 * Status : UNTESTED STUB
1677 *
1678 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1679 *****************************************************************************/
1680BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1681{
1682 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1683 hWinSta));
1684
1685 return (FALSE);
1686}
1687/*****************************************************************************
1688 * Name : HDESK WIN32API CreateDesktopA
1689 * Purpose : The CreateDesktop function creates a new desktop on the window
1690 * station associated with the calling process.
1691 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1692 * LPCTSTR lpszDevice name of display device to assign to the desktop
1693 * LPDEVMODE pDevMode reserved; must be NULL
1694 * DWORD dwFlags flags to control interaction with other applications
1695 * DWORD dwDesiredAccess specifies access of returned handle
1696 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1697 * Variables :
1698 * Result : If the function succeeds, the return value is a handle of the
1699 * newly created desktop.
1700 * If the function fails, the return value is NULL. To get extended
1701 * error information, call GetLastError.
1702 * Remark :
1703 * Status : UNTESTED STUB
1704 *
1705 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1706 *****************************************************************************/
1707HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1708 LPCTSTR lpszDevice,
1709 LPDEVMODEA pDevMode,
1710 DWORD dwFlags,
1711 DWORD dwDesiredAccess,
1712 LPSECURITY_ATTRIBUTES lpsa)
1713{
1714 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1715 lpszDesktop,
1716 lpszDevice,
1717 pDevMode,
1718 dwFlags,
1719 dwDesiredAccess,
1720 lpsa));
1721
1722 return (NULL);
1723}
1724/*****************************************************************************
1725 * Name : HDESK WIN32API CreateDesktopW
1726 * Purpose : The CreateDesktop function creates a new desktop on the window
1727 * station associated with the calling process.
1728 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1729 * LPCTSTR lpszDevice name of display device to assign to the desktop
1730 * LPDEVMODE pDevMode reserved; must be NULL
1731 * DWORD dwFlags flags to control interaction with other applications
1732 * DWORD dwDesiredAccess specifies access of returned handle
1733 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1734 * Variables :
1735 * Result : If the function succeeds, the return value is a handle of the
1736 * newly created desktop.
1737 * If the function fails, the return value is NULL. To get extended
1738 * error information, call GetLastError.
1739 * Remark :
1740 * Status : UNTESTED STUB
1741 *
1742 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1743 *****************************************************************************/
1744HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1745 LPCTSTR lpszDevice,
1746 LPDEVMODEW pDevMode,
1747 DWORD dwFlags,
1748 DWORD dwDesiredAccess,
1749 LPSECURITY_ATTRIBUTES lpsa)
1750{
1751 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1752 lpszDesktop,
1753 lpszDevice,
1754 pDevMode,
1755 dwFlags,
1756 dwDesiredAccess,
1757 lpsa));
1758
1759 return (NULL);
1760}
1761/*****************************************************************************
1762 * Name : HWINSTA WIN32API CreateWindowStationA
1763 * Purpose : The CreateWindowStation function creates a window station object.
1764 * It returns a handle that can be used to access the window station.
1765 * A window station is a secure object that contains a set of global
1766 * atoms, a clipboard, and a set of desktop objects.
1767 * Parameters: LPTSTR lpwinsta name of the new window station
1768 * DWORD dwReserved reserved; must be NULL
1769 * DWORD dwDesiredAccess specifies access of returned handle
1770 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1771 * Variables :
1772 * Result : If the function succeeds, the return value is the handle to the
1773 * newly created window station.
1774 * If the function fails, the return value is NULL. To get extended
1775 * error information, call GetLastError.
1776 * Remark :
1777 * Status : UNTESTED STUB
1778 *
1779 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1780 *****************************************************************************/
1781HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1782 DWORD dwReserved,
1783 DWORD dwDesiredAccess,
1784 LPSECURITY_ATTRIBUTES lpsa)
1785{
1786 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1787 lpWinSta,
1788 dwReserved,
1789 dwDesiredAccess,
1790 lpsa));
1791
1792 return (NULL);
1793}
1794/*****************************************************************************
1795 * Name : HWINSTA WIN32API CreateWindowStationW
1796 * Purpose : The CreateWindowStation function creates a window station object.
1797 * It returns a handle that can be used to access the window station.
1798 * A window station is a secure object that contains a set of global
1799 * atoms, a clipboard, and a set of desktop objects.
1800 * Parameters: LPTSTR lpwinsta name of the new window station
1801 * DWORD dwReserved reserved; must be NULL
1802 * DWORD dwDesiredAccess specifies access of returned handle
1803 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1804 * Variables :
1805 * Result : If the function succeeds, the return value is the handle to the
1806 * newly created window station.
1807 * If the function fails, the return value is NULL. To get extended
1808 * error information, call GetLastError.
1809 * Remark :
1810 * Status : UNTESTED STUB
1811 *
1812 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1813 *****************************************************************************/
1814HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
1815 DWORD dwReserved,
1816 DWORD dwDesiredAccess,
1817 LPSECURITY_ATTRIBUTES lpsa)
1818{
1819 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
1820 lpWinSta,
1821 dwReserved,
1822 dwDesiredAccess,
1823 lpsa));
1824
1825 return (NULL);
1826}
1827/*****************************************************************************
1828 * Name : BOOL WIN32API EnumDesktopWindows
1829 * Purpose : The EnumDesktopWindows function enumerates all windows in a
1830 * desktop by passing the handle of each window, in turn, to an
1831 * application-defined callback function.
1832 * Parameters: HDESK hDesktop handle of desktop to enumerate
1833 * WNDENUMPROC lpfn points to application's callback function
1834 * LPARAM lParam 32-bit value to pass to the callback function
1835 * Variables :
1836 * Result : If the function succeeds, the return value is TRUE.
1837 * If the function fails, the return value is FALSE. To get
1838 * extended error information, call GetLastError.
1839 * Remark :
1840 * Status : UNTESTED STUB
1841 *
1842 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1843 *****************************************************************************/
1844BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
1845 WNDENUMPROC lpfn,
1846 LPARAM lParam)
1847{
1848 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
1849 hDesktop,
1850 lpfn,
1851 lParam));
1852
1853 return (FALSE);
1854}
1855/*****************************************************************************
1856 * Name : BOOL WIN32API EnumDesktopsA
1857 * Purpose : The EnumDesktops function enumerates all desktops in the window
1858 * station assigned to the calling process. The function does so by
1859 * passing the name of each desktop, in turn, to an application-
1860 * defined callback function.
1861 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1862 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1863 * LPARAM lParam 32-bit value to pass to the callback function
1864 * Variables :
1865 * Result : If the function succeeds, the return value is TRUE.
1866 * If the function fails, the return value is FALSE. To get extended
1867 * error information, call GetLastError.
1868 * Remark :
1869 * Status : UNTESTED STUB
1870 *
1871 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1872 *****************************************************************************/
1873BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
1874 DESKTOPENUMPROCA lpEnumFunc,
1875 LPARAM lParam)
1876{
1877 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
1878 hWinSta,
1879 lpEnumFunc,
1880 lParam));
1881
1882 return (FALSE);
1883}
1884/*****************************************************************************
1885 * Name : BOOL WIN32API EnumDesktopsW
1886 * Purpose : The EnumDesktops function enumerates all desktops in the window
1887 * station assigned to the calling process. The function does so by
1888 * passing the name of each desktop, in turn, to an application-
1889 * defined callback function.
1890 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1891 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1892 * LPARAM lParam 32-bit value to pass to the callback function
1893 * Variables :
1894 * Result : If the function succeeds, the return value is TRUE.
1895 * If the function fails, the return value is FALSE. To get extended
1896 * error information, call GetLastError.
1897 * Remark :
1898 * Status : UNTESTED STUB
1899 *
1900 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1901 *****************************************************************************/
1902BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
1903 DESKTOPENUMPROCW lpEnumFunc,
1904 LPARAM lParam)
1905{
1906 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
1907 hWinSta,
1908 lpEnumFunc,
1909 lParam));
1910
1911 return (FALSE);
1912}
1913/*****************************************************************************
1914 * Name : BOOL WIN32API EnumWindowStationsA
1915 * Purpose : The EnumWindowStations function enumerates all windowstations
1916 * in the system by passing the name of each window station, in
1917 * turn, to an application-defined callback function.
1918 * Parameters:
1919 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1920 * LPARAM lParam 32-bit value to pass to the callback function
1921 * Result : If the function succeeds, the return value is TRUE.
1922 * If the function fails the return value is FALSE. To get extended
1923 * error information, call GetLastError.
1924 * Remark :
1925 * Status : UNTESTED STUB
1926 *
1927 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1928 *****************************************************************************/
1929BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
1930 LPARAM lParam)
1931{
1932 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
1933 lpEnumFunc,
1934 lParam));
1935
1936 return (FALSE);
1937}
1938/*****************************************************************************
1939 * Name : BOOL WIN32API EnumWindowStationsW
1940 * Purpose : The EnumWindowStations function enumerates all windowstations
1941 * in the system by passing the name of each window station, in
1942 * turn, to an application-defined callback function.
1943 * Parameters:
1944 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1945 * LPARAM lParam 32-bit value to pass to the callback function
1946 * Result : If the function succeeds, the return value is TRUE.
1947 * If the function fails the return value is FALSE. To get extended
1948 * error information, call GetLastError.
1949 * Remark :
1950 * Status : UNTESTED STUB
1951 *
1952 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1953 *****************************************************************************/
1954BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
1955 LPARAM lParam)
1956{
1957 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
1958 lpEnumFunc,
1959 lParam));
1960
1961 return (FALSE);
1962}
1963/*****************************************************************************
1964 * Name : HWINSTA WIN32API GetProcessWindowStation
1965 * Purpose : The GetProcessWindowStation function returns a handle of the
1966 * window station associated with the calling process.
1967 * Parameters:
1968 * Variables :
1969 * Result : If the function succeeds, the return value is a handle of the
1970 * window station associated with the calling process.
1971 * If the function fails, the return value is NULL. This can occur
1972 * if the calling process is not an application written for Windows
1973 * NT. To get extended error information, call GetLastError.
1974 * Remark :
1975 * Status : UNTESTED STUB
1976 *
1977 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1978 *****************************************************************************/
1979HWINSTA WIN32API GetProcessWindowStation(VOID)
1980{
1981 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
1982
1983 return (NULL);
1984}
1985/*****************************************************************************
1986 * Name : BOOL WIN32API GetUserObjectInformationA
1987 * Purpose : The GetUserObjectInformation function returns information about
1988 * a window station or desktop object.
1989 * Parameters: HANDLE hObj handle of object to get information for
1990 * int nIndex type of information to get
1991 * PVOID pvInfo points to buffer that receives the information
1992 * DWORD nLength size, in bytes, of pvInfo buffer
1993 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
1994 * Variables :
1995 * Result : If the function succeeds, the return value is TRUE.
1996 * If the function fails, the return value is FALSE. To get extended
1997 * error information, call GetLastError.
1998 * Remark :
1999 * Status : UNTESTED STUB
2000 *
2001 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2002 *****************************************************************************/
2003BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2004 int nIndex,
2005 PVOID pvInfo,
2006 DWORD nLength,
2007 LPDWORD lpnLengthNeeded)
2008{
2009 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2010 hObj,
2011 nIndex,
2012 pvInfo,
2013 nLength,
2014 lpnLengthNeeded));
2015
2016 return (FALSE);
2017}
2018/*****************************************************************************
2019 * Name : BOOL WIN32API GetUserObjectInformationW
2020 * Purpose : The GetUserObjectInformation function returns information about
2021 * a window station or desktop object.
2022 * Parameters: HANDLE hObj handle of object to get information for
2023 * int nIndex type of information to get
2024 * PVOID pvInfo points to buffer that receives the information
2025 * DWORD nLength size, in bytes, of pvInfo buffer
2026 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2027 * Variables :
2028 * Result : If the function succeeds, the return value is TRUE.
2029 * If the function fails, the return value is FALSE. To get extended
2030 * error information, call GetLastError.
2031 * Remark :
2032 * Status : UNTESTED STUB
2033 *
2034 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2035 *****************************************************************************/
2036BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2037 int nIndex,
2038 PVOID pvInfo,
2039 DWORD nLength,
2040 LPDWORD lpnLengthNeeded)
2041{
2042 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2043 hObj,
2044 nIndex,
2045 pvInfo,
2046 nLength,
2047 lpnLengthNeeded));
2048
2049 return (FALSE);
2050}
2051/*****************************************************************************
2052 * Name : BOOL WIN32API GetUserObjectSecurity
2053 * Purpose : The GetUserObjectSecurity function retrieves security information
2054 * for the specified user object.
2055 * Parameters: HANDLE hObj handle of user object
2056 * SECURITY_INFORMATION * pSIRequested address of requested security information
2057 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2058 * DWORD nLength size of buffer for security descriptor
2059 * LPDWORD lpnLengthNeeded address of required size of buffer
2060 * Variables :
2061 * Result : If the function succeeds, the return value is TRUE.
2062 * If the function fails, the return value is FALSE. To get extended
2063 * error information, call GetLastError.
2064 * Remark :
2065 * Status : UNTESTED STUB
2066 *
2067 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2068 *****************************************************************************/
2069BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2070 PSECURITY_INFORMATION pSIRequested,
2071 PSECURITY_DESCRIPTOR pSID,
2072 DWORD nLength,
2073 LPDWORD lpnLengthNeeded)
2074{
2075 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2076 hObj,
2077 pSIRequested,
2078 pSID,
2079 nLength,
2080 lpnLengthNeeded));
2081
2082 return (FALSE);
2083}
2084/*****************************************************************************
2085 * Name : HDESK WIN32API OpenDesktopA
2086 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2087 * A desktop is a secure object contained within a window station
2088 * object. A desktop has a logical display surface and contains
2089 * windows, menus and hooks.
2090 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2091 * DWORD dwFlags flags to control interaction with other applications
2092 * BOOL fInherit specifies whether returned handle is inheritable
2093 * DWORD dwDesiredAccess specifies access of returned handle
2094 * Variables :
2095 * Result : If the function succeeds, the return value is the handle to the
2096 * opened desktop.
2097 * If the function fails, the return value is NULL. To get extended
2098 * error information, call GetLastError.
2099 * Remark :
2100 * Status : UNTESTED STUB
2101 *
2102 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2103 *****************************************************************************/
2104HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2105 DWORD dwFlags,
2106 BOOL fInherit,
2107 DWORD dwDesiredAccess)
2108{
2109 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2110 lpszDesktopName,
2111 dwFlags,
2112 fInherit,
2113 dwDesiredAccess));
2114
2115 return (NULL);
2116}
2117/*****************************************************************************
2118 * Name : HDESK WIN32API OpenDesktopW
2119 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2120 * A desktop is a secure object contained within a window station
2121 * object. A desktop has a logical display surface and contains
2122 * windows, menus and hooks.
2123 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2124 * DWORD dwFlags flags to control interaction with other applications
2125 * BOOL fInherit specifies whether returned handle is inheritable
2126 * DWORD dwDesiredAccess specifies access of returned handle
2127 * Variables :
2128 * Result : If the function succeeds, the return value is the handle to the
2129 * opened desktop.
2130 * If the function fails, the return value is NULL. To get extended
2131 * error information, call GetLastError.
2132 * Remark :
2133 * Status : UNTESTED STUB
2134 *
2135 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2136 *****************************************************************************/
2137HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2138 DWORD dwFlags,
2139 BOOL fInherit,
2140 DWORD dwDesiredAccess)
2141{
2142 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2143 lpszDesktopName,
2144 dwFlags,
2145 fInherit,
2146 dwDesiredAccess));
2147
2148 return (NULL);
2149}
2150/*****************************************************************************
2151 * Name : HDESK WIN32API OpenInputDesktop
2152 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2153 * that receives user input. The input desktop is a desktop on the
2154 * window station associated with the logged-on user.
2155 * Parameters: DWORD dwFlags flags to control interaction with other applications
2156 * BOOL fInherit specifies whether returned handle is inheritable
2157 * DWORD dwDesiredAccess specifies access of returned handle
2158 * Variables :
2159 * Result : If the function succeeds, the return value is a handle of the
2160 * desktop that receives user input.
2161 * If the function fails, the return value is NULL. To get extended
2162 * error information, call GetLastError.
2163 * Remark :
2164 * Status : UNTESTED STUB
2165 *
2166 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2167 *****************************************************************************/
2168HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2169 BOOL fInherit,
2170 DWORD dwDesiredAccess)
2171{
2172 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2173 dwFlags,
2174 fInherit,
2175 dwDesiredAccess));
2176
2177 return (NULL);
2178}
2179/*****************************************************************************
2180 * Name : HWINSTA WIN32API OpenWindowStationA
2181 * Purpose : The OpenWindowStation function returns a handle to an existing
2182 * window station.
2183 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2184 * BOOL fInherit specifies whether returned handle is inheritable
2185 * DWORD dwDesiredAccess specifies access of returned handle
2186 * Variables :
2187 * Result : If the function succeeds, the return value is the handle to the
2188 * specified window station.
2189 * If the function fails, the return value is NULL. To get extended
2190 * error information, call GetLastError.
2191 * Remark :
2192 * Status : UNTESTED STUB
2193 *
2194 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2195 *****************************************************************************/
2196HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2197 BOOL fInherit,
2198 DWORD dwDesiredAccess)
2199{
2200 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2201 lpszWinStaName,
2202 fInherit,
2203 dwDesiredAccess));
2204
2205 return (NULL);
2206}
2207/*****************************************************************************
2208 * Name : HWINSTA WIN32API OpenWindowStationW
2209 * Purpose : The OpenWindowStation function returns a handle to an existing
2210 * window station.
2211 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2212 * BOOL fInherit specifies whether returned handle is inheritable
2213 * DWORD dwDesiredAccess specifies access of returned handle
2214 * Variables :
2215 * Result : If the function succeeds, the return value is the handle to the
2216 * specified window station.
2217 * If the function fails, the return value is NULL. To get extended
2218 * error information, call GetLastError.
2219
2220
2221 * Remark :
2222 * Status : UNTESTED STUB
2223 *
2224 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2225 *****************************************************************************/
2226HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2227 BOOL fInherit,
2228 DWORD dwDesiredAccess)
2229{
2230 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2231 lpszWinStaName,
2232 fInherit,
2233 dwDesiredAccess));
2234
2235 return (NULL);
2236}
2237/*****************************************************************************
2238 * Name : BOOL WIN32API SetProcessWindowStation
2239 * Purpose : The SetProcessWindowStation function assigns a window station
2240 * to the calling process. This enables the process to access
2241 * objects in the window station such as desktops, the clipboard,
2242 * and global atoms. All subsequent operations on the window station
2243 * use the access rights granted to hWinSta.
2244 * Parameters:
2245 * Variables :
2246 * Result : If the function succeeds, the return value is TRUE.
2247 * If the function fails, the return value is FALSE. To get extended
2248 * error information, call GetLastError.
2249 * Remark :
2250 * Status : UNTESTED STUB
2251 *
2252 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2253 *****************************************************************************/
2254BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2255{
2256 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2257 hWinSta));
2258
2259 return (FALSE);
2260}
2261/*****************************************************************************
2262 * Name : BOOL WIN32API SetThreadDesktop
2263 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2264 * thread. All subsequent operations on the desktop use the access
2265 * rights granted to hDesk.
2266 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
2267 * Variables :
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 *****************************************************************************/
2276BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
2277{
2278 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
2279 hDesktop));
2280
2281 return (FALSE);
2282}
2283/*****************************************************************************
2284 * Name : BOOL WIN32API SetUserObjectInformationA
2285 * Purpose : The SetUserObjectInformation function sets information about a
2286 * window station or desktop object.
2287 * Parameters: HANDLE hObject handle of the object for which to set information
2288 * int nIndex type of information to set
2289 * PVOID lpvInfo points to a buffer that contains the information
2290 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2291 * Variables :
2292 * Result : If the function succeeds, the return value is TRUE.
2293 * If the function fails the return value is FALSE. To get extended
2294 * error information, call GetLastError.
2295 * Remark :
2296 * Status : UNTESTED STUB
2297 *
2298 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2299 *****************************************************************************/
2300BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
2301 int nIndex,
2302 PVOID lpvInfo,
2303 DWORD cbInfo)
2304{
2305 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
2306 hObject,
2307 nIndex,
2308 lpvInfo,
2309 cbInfo));
2310
2311 return (FALSE);
2312}
2313/*****************************************************************************
2314 * Name : BOOL WIN32API SetUserObjectInformationW
2315 * Purpose : The SetUserObjectInformation function sets information about a
2316 * window station or desktop object.
2317 * Parameters: HANDLE hObject handle of the object for which to set information
2318 * int nIndex type of information to set
2319 * PVOID lpvInfo points to a buffer that contains the information
2320 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2321 * Variables :
2322 * Result : If the function succeeds, the return value is TRUE.
2323 * If the function fails the return value is FALSE. To get extended
2324 * error information, call GetLastError.
2325 * Remark :
2326 * Status : UNTESTED STUB
2327 *
2328 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2329 *****************************************************************************/
2330BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
2331 int nIndex,
2332 PVOID lpvInfo,
2333 DWORD cbInfo)
2334{
2335 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
2336 hObject,
2337 nIndex,
2338 lpvInfo,
2339 cbInfo));
2340
2341 return (FALSE);
2342}
2343/*****************************************************************************
2344 * Name : BOOL WIN32API SetUserObjectSecurity
2345 * Purpose : The SetUserObjectSecurity function sets the security of a user
2346 * object. This can be, for example, a window or a DDE conversation
2347 * Parameters: HANDLE hObject handle of user object
2348 * SECURITY_INFORMATION * psi address of security information
2349 * LPSECURITY_DESCRIPTOR psd address of security descriptor
2350 * Variables :
2351 * Result : If the function succeeds, the return value is TRUE.
2352 * If the function fails, the return value is FALSE. To get extended
2353 * error information, call GetLastError.
2354 * Remark :
2355 * Status : UNTESTED STUB
2356 *
2357 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2358 *****************************************************************************/
2359BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
2360 PSECURITY_INFORMATION psi,
2361 PSECURITY_DESCRIPTOR psd)
2362{
2363 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
2364 hObject,
2365 psi,
2366 psd));
2367
2368 return (FALSE);
2369}
2370/*****************************************************************************
2371 * Name : BOOL WIN32API SwitchDesktop
2372 * Purpose : The SwitchDesktop function makes a desktop visible and activates
2373 * it. This enables the desktop to receive input from the user. The
2374 * calling process must have DESKTOP_SWITCHDESKTOP access to the
2375 * desktop for the SwitchDesktop function to succeed.
2376 * Parameters:
2377 * Variables :
2378 * Result : If the function succeeds, the return value is TRUE.
2379 * If the function fails, the return value is FALSE. To get extended
2380 * error information, call GetLastError.
2381 * Remark :
2382 * Status : UNTESTED STUB
2383 *
2384 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2385 *****************************************************************************/
2386BOOL WIN32API SwitchDesktop(HDESK hDesktop)
2387{
2388 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
2389 hDesktop));
2390
2391 return (FALSE);
2392}
2393
2394/* Debugging Functions */
2395
2396/*****************************************************************************
2397 * Name : VOID WIN32API SetDebugErrorLevel
2398 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
2399 * which Windows will generate debugging events and pass them to a debugger.
2400 * Parameters: DWORD dwLevel debugging error level
2401 * Variables :
2402 * Result :
2403 * Remark :
2404 * Status : UNTESTED STUB
2405 *
2406 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2407 *****************************************************************************/
2408VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
2409{
2410 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
2411 dwLevel));
2412}
2413
2414/* Drag'n'drop */
2415
2416/*****************************************************************************
2417 * Name : BOOL WIN32API DragObject
2418 * Purpose : Unknown
2419 * Parameters: Unknown
2420 * Variables :
2421 * Result :
2422 * Remark :
2423 * Status : UNTESTED UNKNOWN STUB
2424 *
2425 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2426 *****************************************************************************/
2427DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
2428{
2429 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2430 x1,
2431 x2,
2432 x3,
2433 x4,
2434 x5));
2435
2436 return (FALSE); /* default */
2437}
2438
2439/* Unknown */
2440
2441/*****************************************************************************
2442 * Name : BOOL WIN32API SetShellWindow
2443 * Purpose : Unknown
2444 * Parameters: Unknown
2445 * Variables :
2446 * Result :
2447 * Remark :
2448 * Status : UNTESTED UNKNOWN STUB
2449 *
2450 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2451 *****************************************************************************/
2452BOOL WIN32API SetShellWindow(DWORD x1)
2453{
2454 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
2455 x1));
2456
2457 return (FALSE); /* default */
2458}
2459/*****************************************************************************
2460 * Name : BOOL WIN32API PlaySoundEvent
2461 * Purpose : Unknown
2462 * Parameters: Unknown
2463 * Variables :
2464 * Result :
2465 * Remark :
2466 * Status : UNTESTED UNKNOWN STUB
2467 *
2468 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2469 *****************************************************************************/
2470BOOL WIN32API PlaySoundEvent(DWORD x1)
2471{
2472 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
2473 x1));
2474
2475 return (FALSE); /* default */
2476}
2477/*****************************************************************************
2478 * Name : BOOL WIN32API SetSysColorsTemp
2479 * Purpose : Unknown
2480 * Parameters: Unknown
2481 * Variables :
2482 * Result :
2483 * Remark :
2484 * Status : UNTESTED UNKNOWN STUB
2485 *
2486 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2487 *****************************************************************************/
2488BOOL WIN32API SetSysColorsTemp(void)
2489{
2490 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
2491
2492 return (FALSE); /* default */
2493}
2494/*****************************************************************************
2495 * Name : BOOL WIN32API RegisterNetworkCapabilities
2496 * Purpose : Unknown
2497 * Parameters: Unknown
2498 * Variables :
2499 * Result :
2500 * Remark :
2501 * Status : UNTESTED UNKNOWN STUB
2502 *
2503 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2504 *****************************************************************************/
2505BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
2506 DWORD x2)
2507{
2508 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
2509 x1,
2510 x2));
2511
2512 return (FALSE); /* default */
2513}
2514/*****************************************************************************
2515 * Name : BOOL WIN32API EndTask
2516 * Purpose : Unknown
2517 * Parameters: Unknown
2518 * Variables :
2519 * Result :
2520 * Remark :
2521 * Status : UNTESTED UNKNOWN STUB
2522 *
2523 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2524 *****************************************************************************/
2525BOOL WIN32API EndTask(DWORD x1,
2526 DWORD x2,
2527 DWORD x3)
2528{
2529 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
2530 x1,
2531 x2,
2532 x3));
2533
2534 return (FALSE); /* default */
2535}
2536/*****************************************************************************
2537 * Name : BOOL WIN32API GetNextQueueWindow
2538 * Purpose : Unknown
2539 * Parameters: Unknown
2540 * Variables :
2541 * Result :
2542 * Remark :
2543 * Status : UNTESTED UNKNOWN STUB
2544 *
2545 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2546 *****************************************************************************/
2547BOOL WIN32API GetNextQueueWindow(DWORD x1,
2548 DWORD x2)
2549{
2550 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
2551 x1,
2552 x2));
2553
2554 return (FALSE); /* default */
2555}
2556/*****************************************************************************
2557 * Name : BOOL WIN32API YieldTask
2558 * Purpose : Unknown
2559 * Parameters: Unknown
2560 * Variables :
2561 * Result :
2562 * Remark :
2563 * Status : UNTESTED UNKNOWN STUB
2564 *
2565 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2566 *****************************************************************************/
2567BOOL WIN32API YieldTask(void)
2568{
2569 dprintf(("USER32: YieldTask() not implemented.\n"));
2570
2571 return (FALSE); /* default */
2572}
2573/*****************************************************************************
2574 * Name : BOOL WIN32API WinOldAppHackoMatic
2575 * Purpose : Unknown
2576 * Parameters: Unknown
2577 * Variables :
2578 * Result :
2579 * Remark :
2580 * Status : UNTESTED UNKNOWN STUB
2581 *
2582 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2583 *****************************************************************************/
2584BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
2585{
2586 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
2587 x1));
2588
2589 return (FALSE); /* default */
2590}
2591/*****************************************************************************
2592 * Name : BOOL WIN32API RegisterSystemThread
2593 * Purpose : Unknown
2594 * Parameters: Unknown
2595 * Variables :
2596 * Result :
2597 * Remark :
2598 * Status : UNTESTED UNKNOWN STUB
2599 *
2600 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2601 *****************************************************************************/
2602BOOL WIN32API RegisterSystemThread(DWORD x1,
2603 DWORD x2)
2604{
2605 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
2606 x1,
2607 x2));
2608
2609 return (FALSE); /* default */
2610}
2611/*****************************************************************************
2612 * Name : BOOL WIN32API IsHungThread
2613 * Purpose : Unknown
2614 * Parameters: Unknown
2615 * Variables :
2616 * Result :
2617 * Remark :
2618 * Status : UNTESTED UNKNOWN STUB
2619 *
2620 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2621 *****************************************************************************/
2622BOOL WIN32API IsHungThread(DWORD x1)
2623{
2624 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
2625 x1));
2626
2627 return (FALSE); /* default */
2628}
2629/*****************************************************************************
2630 * Name : BOOL WIN32API UserSignalProc
2631 * Purpose : Unknown
2632 * Parameters: Unknown
2633 * Variables :
2634 * Result :
2635 * Remark :
2636 * Status : UNTESTED UNKNOWN STUB
2637 *
2638 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2639 *****************************************************************************/
2640BOOL WIN32API UserSignalProc(DWORD x1,
2641 DWORD x2,
2642 DWORD x3,
2643 DWORD x4)
2644{
2645 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2646 x1,
2647 x2,
2648 x3,
2649 x4));
2650
2651 return (FALSE); /* default */
2652}
2653/*****************************************************************************
2654 * Name : BOOL WIN32API GetShellWindow
2655 * Purpose : Unknown
2656 * Parameters: Unknown
2657 * Variables :
2658 * Result :
2659 * Remark :
2660 * Status : UNTESTED UNKNOWN STUB
2661 *
2662 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2663 *****************************************************************************/
2664HWND WIN32API GetShellWindow(void)
2665{
2666 dprintf(("USER32: GetShellWindow() not implemented.\n"));
2667
2668 return (0); /* default */
2669}
2670/***********************************************************************
2671 * RegisterTasklist32 [USER32.436]
2672 */
2673DWORD WIN32API RegisterTasklist (DWORD x)
2674{
2675 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
2676 x));
2677
2678 return TRUE;
2679}
2680/***********************************************************************
2681 * SetLogonNotifyWindow (USER32.486)
2682 */
2683DWORD WIN32API SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd)
2684{
2685 dprintf(("USER32: SetLogonNotifyWindow - empty stub!"));
2686
2687 return 1;
2688}
2689
2690
2691DWORD WIN32API NotifyWinEvent(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4)
2692{
2693 dprintf(("USER32: NotifyWinEvent %x %x %x %x - empty stub!!", arg1, arg2, arg3, arg4));
2694
2695 return 0;
2696}
2697
2698DWORD WIN32API UnhookWinEvent(DWORD arg1)
2699{
2700 dprintf(("USER32: UnhookWinEvent %x - empty stub!!", arg1));
2701
2702 return 0;
2703}
2704
2705DWORD WIN32API SetWinEventHook(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7)
2706{
2707 dprintf(("USER32: SetWinEventHook %x %x %x %x %x %x %x - empty stub!!", arg1, arg2, arg3, arg4, arg5, arg6, arg7));
2708
2709 return 0;
2710}
Note: See TracBrowser for help on using the repository browser.