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

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

Dinput additions + PostThreadMessageA/W fix

File size: 126.8 KB
Line 
1/* $Id: user32.cpp,v 1.51 1999-11-08 13:44:14 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 * Copyright 1999 Daniela Engert (dani@ngrt.de)
11 *
12 *
13 * Project Odin Software License can be found in LICENSE.TXT
14 *
15 */
16/*****************************************************************************
17 * Name : USER32.CPP
18 * Purpose : This module maps all Win32 functions contained in USER32.DLL
19 * to their OS/2-specific counterparts as far as possible.
20 *****************************************************************************/
21
22//Attention: many functions belong to other subsystems, move them to their
23// right place!
24
25#include <odin.h>
26#include <odinwrap.h>
27#include <os2sel.h>
28
29#include <os2win.h>
30#include "misc.h"
31
32#include "user32.h"
33#include <winicon.h>
34#include "syscolor.h"
35#include "pmwindow.h"
36
37#include <wchar.h>
38#include <stdlib.h>
39#include <string.h>
40#include <oslibwin.h>
41#include <win32wnd.h>
42#include <winuser.h>
43
44//undocumented stuff
45// WIN32API CalcChildScroll
46// WIN32API CascadeChildWindows
47// WIN32API ClientThreadConnect
48// WIN32API DragObject
49// WIN32API DrawFrame
50// WIN32API EditWndProc
51// WIN32API EndTask
52// WIN32API GetInputDesktop
53// WIN32API GetNextQueueWindow
54// WIN32API GetShellWindow
55// WIN32API InitSharedTable
56// WIN32API InitTask
57// WIN32API IsHungThread
58// WIN32API LockWindowStation
59// WIN32API ModifyAccess
60// WIN32API PlaySoundEvent
61// WIN32API RegisterLogonProcess
62// WIN32API RegisterNetworkCapabilities
63// WIN32API RegisterSystemThread
64// WIN32API SetDeskWallpaper
65// WIN32API SetDesktopBitmap
66// WIN32API SetInternalWindowPos
67// WIN32API SetLogonNotifyWindow
68// WIN32API SetShellWindow
69// WIN32API SetSysColorsTemp
70// WIN32API SetWindowFullScreenState
71// WIN32API SwitchToThisWindow
72// WIN32API SysErrorBox
73// WIN32API TileChildWindows
74// WIN32API UnlockWindowStation
75// WIN32API UserClientDllInitialize
76// WIN32API UserSignalProc
77// WIN32API WinOldAppHackoMatic
78// WIN32API WNDPROC_CALLBACK
79// WIN32API YieldTask
80
81ODINDEBUGCHANNEL(USER32-USER32)
82
83
84/* Coordinate Transformation */
85
86inline void OS2ToWin32ScreenPos(POINT *dest,POINT *source)
87{
88 dest->x = source->x;
89 dest->y = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN)-1-source->y;
90}
91
92inline void Win32ToOS2ScreenPos(POINT *dest,POINT *source)
93{
94 OS2ToWin32ScreenPos(dest,source); //transform back
95}
96
97/* Rectangle Functions - parts from wine/windows/rect.c */
98
99BOOL WIN32API CopyRect( PRECT lprcDst, const RECT * lprcSrc)
100{
101// ddprintf(("USER32: CopyRect\n"));
102 if (!lprcDst || !lprcSrc) {
103 SetLastError(ERROR_INVALID_PARAMETER);
104 return FALSE;
105 }
106
107 memcpy(lprcDst,lprcSrc,sizeof(RECT));
108
109 return TRUE;
110}
111//******************************************************************************
112//******************************************************************************
113BOOL WIN32API EqualRect( const RECT *lprc1, const RECT *lprc2)
114{
115#ifdef DEBUG
116 WriteLog("USER32: EqualRect\n");
117#endif
118 if (!lprc1 || !lprc2)
119 {
120 SetLastError(ERROR_INVALID_PARAMETER);
121 return FALSE;
122 }
123
124 return (lprc1->left == lprc2->left &&
125 lprc1->right == lprc2->right &&
126 lprc1->top == lprc2->top &&
127 lprc1->bottom == lprc2->bottom);
128}
129//******************************************************************************
130//******************************************************************************
131BOOL WIN32API InflateRect( PRECT lprc, int dx, int dy)
132{
133#ifdef DEBUG
134 WriteLog("USER32: InflateRect\n");
135#endif
136 if (!lprc)
137 {
138 SetLastError(ERROR_INVALID_PARAMETER);
139 return FALSE;
140 }
141
142 lprc->left -= dx;
143 lprc->right += dx;
144 lprc->top -= dy;
145 lprc->bottom += dy;
146
147 return TRUE;
148}
149//******************************************************************************
150//******************************************************************************
151BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2)
152{
153#ifdef DEBUG
154//// WriteLog("USER32: IntersectRect\n");
155#endif
156 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
157 {
158 SetLastError(ERROR_INVALID_PARAMETER);
159 return FALSE;
160 }
161
162 if (IsRectEmpty(lprcSrc1) || IsRectEmpty(lprcSrc2) ||
163 (lprcSrc1->left >= lprcSrc2->right) || (lprcSrc2->left >= lprcSrc1->right) ||
164 (lprcSrc1->top >= lprcSrc2->bottom) || (lprcSrc2->top >= lprcSrc1->bottom))
165 {
166 SetLastError(ERROR_INVALID_PARAMETER);
167 SetRectEmpty(lprcDst);
168 return FALSE;
169 }
170 lprcDst->left = MAX(lprcSrc1->left,lprcSrc2->left);
171 lprcDst->right = MIN(lprcSrc1->right,lprcSrc2->right);
172 lprcDst->top = MAX(lprcSrc1->top,lprcSrc2->top);
173 lprcDst->bottom = MIN(lprcSrc1->bottom,lprcSrc2->bottom);
174
175 return TRUE;
176}
177//******************************************************************************
178//******************************************************************************
179BOOL WIN32API IsRectEmpty( const RECT * lprc)
180{
181 if (!lprc)
182 {
183 SetLastError(ERROR_INVALID_PARAMETER);
184 return FALSE;
185 }
186
187 return (lprc->left == lprc->right || lprc->top == lprc->bottom);
188}
189//******************************************************************************
190//******************************************************************************
191BOOL WIN32API OffsetRect( PRECT lprc, int x, int y)
192{
193#ifdef DEBUG
194//// WriteLog("USER32: OffsetRect\n");
195#endif
196 if (!lprc)
197 {
198 SetLastError(ERROR_INVALID_PARAMETER);
199 return FALSE;
200 }
201
202 lprc->left += x;
203 lprc->right += x;
204 lprc->top += y;
205 lprc->bottom += y;
206
207 return TRUE;
208}
209//******************************************************************************
210//******************************************************************************
211BOOL WIN32API PtInRect( const RECT *lprc, POINT pt)
212{
213#ifdef DEBUG1
214 WriteLog("USER32: PtInRect\n");
215#endif
216 if (!lprc)
217 {
218 SetLastError(ERROR_INVALID_PARAMETER);
219 return FALSE;
220 }
221
222 return (pt.x >= lprc->left &&
223 pt.x < lprc->right &&
224 pt.y >= lprc->top &&
225 pt.y < lprc->bottom);
226}
227//******************************************************************************
228//******************************************************************************
229BOOL WIN32API SetRect( PRECT lprc, int nLeft, int nTop, int nRight, int nBottom)
230{
231 if (!lprc)
232 {
233 SetLastError(ERROR_INVALID_PARAMETER);
234 return FALSE;
235 }
236
237 lprc->left = nLeft;
238 lprc->top = nTop;
239 lprc->right = nRight;
240 lprc->bottom = nBottom;
241
242 return TRUE;
243}
244//******************************************************************************
245//******************************************************************************
246BOOL WIN32API SetRectEmpty( PRECT lprc)
247{
248 if (!lprc)
249 {
250 SetLastError(ERROR_INVALID_PARAMETER);
251 return FALSE;
252 }
253
254 lprc->left = lprc->right = lprc->top = lprc->bottom = 0;
255
256 return TRUE;
257}
258//******************************************************************************
259//******************************************************************************
260BOOL WIN32API SubtractRect( PRECT lprcDest, const RECT * lprcSrc1, const RECT * lprcSrc2)
261{
262#ifdef DEBUG
263 WriteLog("USER32: SubtractRect");
264#endif
265 RECT tmp;
266
267 if (!lprcDest || !lprcSrc1 || !lprcSrc2)
268 {
269 SetLastError(ERROR_INVALID_PARAMETER);
270 return FALSE;
271 }
272
273 if (IsRectEmpty(lprcSrc1))
274 {
275 SetLastError(ERROR_INVALID_PARAMETER);
276 SetRectEmpty(lprcDest);
277 return FALSE;
278 }
279 *lprcDest = *lprcSrc1;
280 if (IntersectRect(&tmp,lprcSrc1,lprcSrc2))
281 {
282 if (EqualRect(&tmp,lprcDest))
283 {
284 SetRectEmpty(lprcDest);
285 return FALSE;
286 }
287 if ((tmp.top == lprcDest->top) && (tmp.bottom == lprcDest->bottom))
288 {
289 if (tmp.left == lprcDest->left) lprcDest->left = tmp.right;
290 else if (tmp.right == lprcDest->right) lprcDest->right = tmp.left;
291 }
292 else if ((tmp.left == lprcDest->left) && (tmp.right == lprcDest->right))
293 {
294 if (tmp.top == lprcDest->top) lprcDest->top = tmp.bottom;
295 else if (tmp.bottom == lprcDest->bottom) lprcDest->bottom = tmp.top;
296 }
297 }
298
299 return TRUE;
300}
301//******************************************************************************
302//******************************************************************************
303BOOL WIN32API UnionRect( PRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2)
304{
305#ifdef DEBUG
306 WriteLog("USER32: UnionRect\n");
307#endif
308 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
309 {
310 SetLastError(ERROR_INVALID_PARAMETER);
311 return FALSE;
312 }
313
314 if (IsRectEmpty(lprcSrc1))
315 {
316 if (IsRectEmpty(lprcSrc2))
317 {
318 SetLastError(ERROR_INVALID_PARAMETER);
319 SetRectEmpty(lprcDst);
320 return FALSE;
321 }
322 else *lprcDst = *lprcSrc2;
323 }
324 else
325 {
326 if (IsRectEmpty(lprcSrc2)) *lprcDst = *lprcSrc1;
327 else
328 {
329 lprcDst->left = MIN(lprcSrc1->left,lprcSrc2->left);
330 lprcDst->right = MAX(lprcSrc1->right,lprcSrc2->right);
331 lprcDst->top = MIN(lprcSrc1->top,lprcSrc2->top);
332 lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom);
333 }
334 }
335
336 return TRUE;
337}
338
339/* Cursor Functions */
340
341BOOL WIN32API ClipCursor(const RECT * lpRect)
342{
343#ifdef DEBUG
344 WriteLog("USER32: ClipCursor\n");
345#endif
346 return O32_ClipCursor(lpRect);
347}
348//******************************************************************************
349//******************************************************************************
350HCURSOR WIN32API CreateCursor( HINSTANCE hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, const VOID *pvANDPlane, const VOID *pvXORPlane)
351{
352#ifdef DEBUG
353 WriteLog("USER32: CreateCursor\n");
354#endif
355 return O32_CreateCursor(hInst,xHotSpot,yHotSpot,nWidth,nHeight,pvANDPlane,pvXORPlane);
356}
357//******************************************************************************
358//******************************************************************************
359BOOL WIN32API DestroyCursor( HCURSOR hCursor)
360{
361#ifdef DEBUG
362 WriteLog("USER32: DestroyCursor\n");
363#endif
364 return O32_DestroyCursor(hCursor);
365}
366//******************************************************************************
367//******************************************************************************
368BOOL WIN32API GetClipCursor( LPRECT lpRect)
369{
370#ifdef DEBUG
371 WriteLog("USER32: GetClipCursor\n");
372#endif
373 return O32_GetClipCursor(lpRect);
374}
375//******************************************************************************
376//******************************************************************************
377HCURSOR WIN32API GetCursor(void)
378{
379#ifdef DEBUG
380//// WriteLog("USER32: GetCursor\n");
381#endif
382 return O32_GetCursor();
383}
384//******************************************************************************
385//******************************************************************************
386BOOL WIN32API GetCursorPos( PPOINT lpPoint)
387{
388 BOOL rc;
389 POINT point;
390#ifdef DEBUG
391//// WriteLog("USER32: GetCursorPos\n");
392#endif
393 if (!lpPoint) return FALSE;
394 if (OSLibWinQueryPointerPos(OSLIB_HWND_DESKTOP,&point)) //POINT == POINTL
395 {
396 OS2ToWin32ScreenPos(lpPoint,&point);
397 return TRUE;
398 } else return FALSE;
399}
400/*****************************************************************************
401 * Name : HCURSOR WIN32API LoadCursorFromFileA
402 * Purpose : The LoadCursorFromFile function creates a cursor based on data
403 * contained in a file. The file is specified by its name or by a
404 * system cursor identifier. The function returns a handle to the
405 * newly created cursor. Files containing cursor data may be in
406 * either cursor (.CUR) or animated cursor (.ANI) format.
407 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
408 * Variables :
409 * Result : If the function is successful, the return value is a handle to
410 * the new cursor.
411 * If the function fails, the return value is NULL. To get extended
412 * error information, call GetLastError. GetLastError may return
413 * the following
414 * Remark :
415 * Status : UNTESTED STUB
416 *
417 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
418 *****************************************************************************/
419HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
420{
421 if (!HIWORD(lpFileName))
422 {
423 return LoadCursorA(NULL,lpFileName);
424 } else
425 {
426 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
427 lpFileName));
428
429 return (NULL);
430 }
431}
432/*****************************************************************************
433 * Name : HCURSOR WIN32API LoadCursorFromFileW
434 * Purpose : The LoadCursorFromFile function creates a cursor based on data
435 * contained in a file. The file is specified by its name or by a
436 * system cursor identifier. The function returns a handle to the
437 * newly created cursor. Files containing cursor data may be in
438 * either cursor (.CUR) or animated cursor (.ANI) format.
439 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
440 * Variables :
441 * Result : If the function is successful, the return value is a handle to
442 * the new cursor.
443 * If the function fails, the return value is NULL. To get extended
444 * error information, call GetLastError. GetLastError may return
445 * the following
446 * Remark :
447 * Status : UNTESTED STUB
448 *
449 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
450 *****************************************************************************/
451HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
452{
453 if (!HIWORD(lpFileName))
454 {
455 return LoadCursorW(NULL,lpFileName);
456 } else
457 {
458 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
459 lpFileName));
460
461 return (NULL);
462 }
463}
464//******************************************************************************
465//******************************************************************************
466HCURSOR WIN32API SetCursor( HCURSOR hcur)
467{
468 HCURSOR rc;
469
470 rc = O32_SetCursor(hcur);
471 dprintf(("USER32: SetCursor %x (prev %x (%x))\n", hcur, rc, O32_GetCursor()));
472 return rc;
473}
474//******************************************************************************
475//******************************************************************************
476BOOL WIN32API SetCursorPos( int X, int Y)
477{
478#ifdef DEBUG
479 WriteLog("USER32: SetCursorPos\n");
480#endif
481 return O32_SetCursorPos(X,Y);
482}
483/*****************************************************************************
484 * Name : BOOL WIN32API SetSystemCursor
485 * Purpose : The SetSystemCursor function replaces the contents of the system
486 * cursor specified by dwCursorId with the contents of the cursor
487 * specified by hCursor, and then destroys hCursor. This function
488 * lets an application customize the system cursors.
489 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
490 * contents, then destroy this
491 * DWORD dwCursorID system cursor specified by its identifier
492 * Variables :
493 * Result : If the function succeeds, the return value is TRUE.
494 * If the function fails, the return value is FALSE. To get extended
495 * error information, call GetLastError.
496 * Remark :
497 * Status : UNTESTED STUB
498 *
499 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
500 *****************************************************************************/
501BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
502 DWORD dwCursorId)
503{
504 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not supported.\n",
505 hCursor,
506 dwCursorId));
507
508 return DestroyCursor(hCursor);
509}
510//******************************************************************************
511//******************************************************************************
512int WIN32API ShowCursor( BOOL bShow)
513{
514#ifdef DEBUG
515 WriteLog("USER32: ShowCursor\n");
516#endif
517 return O32_ShowCursor(bShow);
518}
519
520/* Mouse Input Functions */
521
522/*****************************************************************************
523 * Name : BOOL WIN32API DragDetect
524 * Purpose : The DragDetect function captures the mouse and tracks its movement
525 * Parameters: HWND hwnd
526 * POINT pt
527 * Variables :
528 * Result : If the user moved the mouse outside of the drag rectangle while
529 * holding the left button down, the return value is TRUE.
530 * If the user did not move the mouse outside of the drag rectangle
531 * while holding the left button down, the return value is FALSE.
532 * Remark :
533 * Status : UNTESTED STUB
534 *
535 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
536 *****************************************************************************/
537BOOL WIN32API DragDetect(HWND hwnd,
538 POINT pt)
539{
540 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
541 hwnd));
542
543 return (FALSE);
544}
545//******************************************************************************
546//******************************************************************************
547UINT WIN32API GetDoubleClickTime(void)
548{
549#ifdef DEBUG
550 WriteLog("USER32: GetDoubleClickTime\n");
551#endif
552 return O32_GetDoubleClickTime();
553}
554/*****************************************************************************
555 * Name : VOID WIN32API mouse_event
556 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
557 * Parameters: DWORD dwFlags flags specifying various motion/click variants
558 * DWORD dx horizontal mouse position or position change
559 * DWORD dy vertical mouse position or position change
560 * DWORD cButtons unused, reserved for future use, set to zero
561 * DWORD dwExtraInfo 32 bits of application-defined information
562 * Variables :
563 * Result :
564 * Remark :
565 * Status : UNTESTED STUB
566 *
567 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
568 *****************************************************************************/
569VOID WIN32API mouse_event(DWORD dwFlags,
570 DWORD dx,
571 DWORD dy,
572 DWORD cButtons,
573 DWORD dwExtraInfo)
574{
575 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
576 dwFlags,
577 dx,
578 dy,
579 cButtons,
580 dwExtraInfo));
581}
582//******************************************************************************
583//******************************************************************************
584BOOL WIN32API ReleaseCapture(void)
585{
586 dprintf(("USER32: ReleaseCapture"));
587 return O32_ReleaseCapture();
588}
589//******************************************************************************
590//******************************************************************************
591HWND WIN32API GetCapture(void)
592{
593 HWND hwnd;
594
595 hwnd = Win32Window::OS2ToWin32Handle(O32_GetCapture());
596 dprintf(("USER32: GetCapture returned %x", hwnd));
597 return hwnd;
598}
599//******************************************************************************
600//******************************************************************************
601HWND WIN32API SetCapture( HWND hwnd)
602{
603#ifdef DEBUG
604 WriteLog("USER32: SetCapture %x", hwnd);
605#endif
606 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
607 return Win32Window::OS2ToWin32Handle(O32_SetCapture(hwnd));
608}
609//******************************************************************************
610//******************************************************************************
611BOOL WIN32API SetDoubleClickTime( UINT uInterval)
612{
613#ifdef DEBUG
614 WriteLog("USER32: SetDoubleClickTime\n");
615#endif
616 return O32_SetDoubleClickTime(uInterval);
617}
618//******************************************************************************
619//******************************************************************************
620BOOL WIN32API SwapMouseButton( BOOL fSwap)
621{
622#ifdef DEBUG
623 WriteLog("USER32: SwapMouseButton\n");
624#endif
625 return O32_SwapMouseButton(fSwap);
626}
627
628/* Error Functions */
629
630/*****************************************************************************
631 * Name : ExitWindowsEx
632 * Purpose : Shutdown System
633 * Parameters: UINT uFlags
634 * DWORD dwReserved
635 * Variables :
636 * Result : TRUE / FALSE
637 * Remark :
638 * Status :
639 *
640 * Author : Patrick Haller [Tue, 1999/10/20 21:24]
641 *****************************************************************************/
642
643ODINFUNCTION2(BOOL, ExitWindowsEx, UINT, uFlags,
644 DWORD, dwReserved)
645{
646 int rc = MessageBoxA(HWND_DESKTOP,
647 "Are you sure you want to shutdown the system?",
648 "Shutdown ...",
649 MB_YESNOCANCEL | MB_ICONQUESTION);
650 switch (rc)
651 {
652 case IDCANCEL: return (FALSE);
653 case IDYES: break;
654 case IDNO:
655 dprintf(("no shutdown!\n"));
656 return TRUE;
657 }
658
659 return O32_ExitWindowsEx(uFlags,dwReserved);
660}
661
662
663//******************************************************************************
664//******************************************************************************
665BOOL WIN32API MessageBeep( UINT uType)
666{
667 INT flStyle;
668
669#ifdef DEBUG
670 WriteLog("USER32: MessageBeep\n");
671#endif
672
673 switch (uType)
674 {
675 case 0xFFFFFFFF:
676 OSLibDosBeep(500,50);
677 return TRUE;
678 case MB_ICONASTERISK:
679 flStyle = WAOS_NOTE;
680 break;
681 case MB_ICONEXCLAMATION:
682 flStyle = WAOS_WARNING;
683 break;
684 case MB_ICONHAND:
685 case MB_ICONQUESTION:
686 case MB_OK:
687 flStyle = WAOS_NOTE;
688 break;
689 default:
690 flStyle = WAOS_ERROR; //CB: should be right
691 break;
692 }
693 return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle);
694}
695//******************************************************************************
696//2nd parameter not used according to SDK (yet?)
697//******************************************************************************
698VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
699{
700#ifdef DEBUG
701 WriteLog("USER32: SetLastErrorEx\n");
702#endif
703 SetLastError(dwErrCode);
704}
705
706/* Accessibility Functions */
707
708int WIN32API GetSystemMetrics(int nIndex)
709{
710 int rc = 0;
711
712 switch(nIndex) {
713 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
714 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXICON);
715 //CB: return standard windows icon size?
716 //rc = 32;
717 break;
718 case SM_CYICONSPACING:
719 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYICON);
720 //read SM_CXICONSPACING comment
721 //rc = 32;
722 break;
723 case SM_PENWINDOWS:
724 rc = FALSE;
725 break;
726 case SM_DBCSENABLED:
727 rc = FALSE;
728 break;
729 case SM_CXEDGE: //size of 3D window edge (not supported)
730 rc = 1;
731 break;
732 case SM_CYEDGE:
733 rc = 1;
734 break;
735 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
736 //CB: replace with const
737 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
738 break;
739 case SM_CYMINSPACING:
740 //CB: replace with const
741 rc = GetSystemMetrics(SM_CYMINIMIZED);
742 break;
743 case SM_CXICON:
744 case SM_CYICON:
745 rc = 32; //CB: Win32: only 32x32, OS/2 32x32/40x40
746 // we must implement 32x32 for all screen resolutions
747 break;
748 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
749 rc = 16;
750 break;
751 case SM_CYSMICON:
752 rc = 16;
753 break;
754 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
755 rc = 8;
756 break;
757 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
758 rc = 16;
759 break;
760 case SM_CYSMSIZE:
761 rc = 16;
762 break;
763 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
764 rc = 16;
765 break;
766 case SM_CYMENUSIZE:
767 rc = 16;
768 break;
769 case SM_ARRANGE:
770 rc = ARW_BOTTOMLEFT | ARW_LEFT;
771 break;
772 case SM_CXMINIMIZED:
773 break;
774 case SM_CYMINIMIZED:
775 break;
776 case SM_CXMAXTRACK: //max window size
777 case SM_CXMAXIMIZED: //max toplevel window size
778 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
779 break;
780 case SM_CYMAXTRACK:
781 case SM_CYMAXIMIZED:
782 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
783 break;
784 case SM_NETWORK:
785 rc = 0x01; //TODO: default = yes
786 break;
787 case SM_CLEANBOOT:
788 rc = 0; //normal boot
789 break;
790 case SM_CXDRAG: //nr of pixels before drag becomes a real one
791 rc = 2;
792 break;
793 case SM_CYDRAG:
794 rc = 2;
795 break;
796 case SM_SHOWSOUNDS: //show instead of play sound
797 rc = FALSE;
798 break;
799 case SM_CXMENUCHECK:
800 rc = 4; //TODO
801 break;
802 case SM_CYMENUCHECK:
803 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYMENU);
804 break;
805 case SM_SLOWMACHINE:
806 rc = FALSE; //even a slow machine is fast with OS/2 :)
807 break;
808 case SM_MIDEASTENABLED:
809 rc = FALSE;
810 break;
811 case SM_MOUSEWHEELPRESENT:
812 rc = FALSE;
813 break;
814 case SM_XVIRTUALSCREEN:
815 rc = 0;
816 break;
817 case SM_YVIRTUALSCREEN:
818 rc = 0;
819 break;
820 case SM_CXSCREEN:
821
822 return ScreenWidth;
823 case SM_CYSCREEN:
824 return ScreenHeight;
825
826 case SM_CXVIRTUALSCREEN:
827 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
828 break;
829 case SM_CYVIRTUALSCREEN:
830 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
831 break;
832 case SM_CMONITORS:
833 rc = 1;
834 break;
835 case SM_SAMEDISPLAYFORMAT:
836 rc = TRUE;
837 break;
838 case SM_CMETRICS:
839 rc = 81;
840 //rc = O32_GetSystemMetrics(44); //Open32 changed this one
841 break;
842 default:
843 //better than nothing
844 rc = O32_GetSystemMetrics(nIndex);
845 break;
846 }
847#ifdef DEBUG
848 WriteLog("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc);
849#endif
850 return(rc);
851}
852//******************************************************************************
853/* Not support by Open32 (not included are the new win9x parameters):
854 case SPI_GETFASTTASKSWITCH:
855 case SPI_GETGRIDGRANULARITY:
856 case SPI_GETICONTITLELOGFONT:
857 case SPI_GETICONTITLEWRAP:
858 case SPI_GETMENUDROPALIGNMENT:
859 case SPI_ICONHORIZONTALSPACING:
860 case SPI_ICONVERTICALSPACING:
861 case SPI_LANGDRIVER:
862 case SPI_SETFASTTASKSWITCH:
863 case SPI_SETGRIDGRANULARITY:
864 case SPI_SETICONTITLELOGFONT:
865 case SPI_SETICONTITLEWRAP:
866 case SPI_SETMENUDROPALIGNMENT:
867 case SPI_GETSCREENSAVEACTIVE:
868 case SPI_GETSCREENSAVETIMEOUT:
869 case SPI_SETDESKPATTERN:
870 case SPI_SETDESKWALLPAPER:
871 case SPI_SETSCREENSAVEACTIVE:
872 case SPI_SETSCREENSAVETIMEOUT:
873*/
874//******************************************************************************
875BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
876{
877 BOOL rc = TRUE;
878 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
879
880 switch(uiAction) {
881 case SPI_SCREENSAVERRUNNING:
882 *(BOOL *)pvParam = FALSE;
883 break;
884 case SPI_GETDRAGFULLWINDOWS:
885 *(BOOL *)pvParam = FALSE;
886 break;
887 case SPI_GETNONCLIENTMETRICS:
888 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
889 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
890
891 //CB: fonts not handled by Open32, set to WarpSans
892 lstrcpyA(cmetric->lfCaptionFont.lfFaceName,"WarpSans");
893 cmetric->lfCaptionFont.lfHeight = 9;
894
895 lstrcpyA(cmetric->lfMenuFont.lfFaceName,"WarpSans");
896 cmetric->lfMenuFont.lfHeight = 9;
897
898 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
899 cmetric->lfStatusFont.lfHeight = 9;
900
901 lstrcpyA(cmetric->lfMessageFont.lfFaceName,"WarpSans");
902 cmetric->lfMessageFont.lfHeight = 9;
903
904 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
905 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
906 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
907 cmetric->iCaptionWidth = 32; //TODO
908 cmetric->iCaptionHeight = 16; //TODO
909 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
910 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
911 cmetric->iMenuWidth = 32; //TODO
912 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
913 break;
914 case SPI_GETICONTITLELOGFONT:
915 {
916 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
917
918 /* from now on we always have an alias for MS Sans Serif */
919 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
920 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
921 lpLogFont->lfWidth = 0;
922 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
923 lpLogFont->lfWeight = FW_NORMAL;
924 lpLogFont->lfItalic = FALSE;
925 lpLogFont->lfStrikeOut = FALSE;
926 lpLogFont->lfUnderline = FALSE;
927 lpLogFont->lfCharSet = ANSI_CHARSET;
928 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
929 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
930 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
931 break;
932 }
933 case SPI_GETBORDER:
934 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
935 break;
936
937 case SPI_GETWORKAREA:
938 SetRect( (RECT *)pvParam, 0, 0,
939 GetSystemMetrics( SM_CXSCREEN ),
940 GetSystemMetrics( SM_CYSCREEN )
941 );
942 break;
943
944 case 104: //TODO: Undocumented
945 rc = 16;
946 break;
947 default:
948 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
949 break;
950 }
951#ifdef DEBUG
952 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
953#endif
954 return(rc);
955}
956//******************************************************************************
957//TODO: Check for more options that have different structs for Unicode!!!!
958//******************************************************************************
959BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
960{
961 BOOL rc;
962 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
963 NONCLIENTMETRICSA clientMetricsA = {0};
964 PVOID pvParamA;
965 UINT uiParamA;
966
967 switch(uiAction) {
968 case SPI_SETNONCLIENTMETRICS:
969 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
970 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
971 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
972 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
973 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
974 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
975 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
976 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
977 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
978 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
979 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
980 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
981 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
982 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
983 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
984 //no break
985 case SPI_GETNONCLIENTMETRICS:
986 uiParamA = sizeof(NONCLIENTMETRICSA);
987 pvParamA = &clientMetricsA;
988 break;
989 case SPI_GETICONTITLELOGFONT:
990 {
991 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
992
993 /* from now on we always have an alias for MS Sans Serif */
994 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
995 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
996 lpLogFont->lfWidth = 0;
997 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
998 lpLogFont->lfWeight = FW_NORMAL;
999 lpLogFont->lfItalic = FALSE;
1000 lpLogFont->lfStrikeOut = FALSE;
1001 lpLogFont->lfUnderline = FALSE;
1002 lpLogFont->lfCharSet = ANSI_CHARSET;
1003 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1004 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1005 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1006 return TRUE;
1007 }
1008 default:
1009 pvParamA = pvParam;
1010 uiParamA = uiParam;
1011 break;
1012 }
1013 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1014
1015 switch(uiAction) {
1016 case SPI_GETNONCLIENTMETRICS:
1017 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1018 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1019 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1020 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1021 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1022 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1023 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1024
1025 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1026 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1027 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1028
1029 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1030 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1031 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1032 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1033 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1034 break;
1035 }
1036#ifdef DEBUG
1037 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
1038#endif
1039 return(rc);
1040}
1041
1042/* Process and Thread Functions */
1043
1044//******************************************************************************
1045//DWORD idAttach; /* thread to attach */
1046//DWORD idAttachTo; /* thread to attach to */
1047//BOOL fAttach; /* attach or detach */
1048//******************************************************************************
1049BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1050{
1051#ifdef DEBUG
1052 WriteLog("USER32: AttachThreadInput, not implemented\n");
1053#endif
1054 return(TRUE);
1055}
1056//******************************************************************************
1057//TODO:How can we emulate this one in OS/2???
1058//******************************************************************************
1059DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
1060{
1061#ifdef DEBUG
1062 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
1063#endif
1064
1065 if(dwTimeOut == INFINITE) return(0);
1066
1067// DosSleep(dwTimeOut/16);
1068 return(0);
1069}
1070
1071/* Help Functions */
1072
1073DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
1074{
1075#ifdef DEBUG
1076 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
1077#endif
1078 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1079
1080 return(0);
1081}
1082//******************************************************************************
1083//******************************************************************************
1084BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
1085{
1086#ifdef DEBUG
1087 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
1088#endif
1089 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1090
1091 return(TRUE);
1092}
1093//******************************************************************************
1094//******************************************************************************
1095BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
1096{
1097#ifdef DEBUG
1098 WriteLog("USER32: WinHelp not implemented %s\n", lpszHelp);
1099#endif
1100// hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1101// return O32_WinHelp(arg1, arg2, arg3, arg4);
1102
1103 return(TRUE);
1104}
1105//******************************************************************************
1106//******************************************************************************
1107BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
1108{
1109 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1110 BOOL rc;
1111
1112#ifdef DEBUG
1113 WriteLog("USER32: WinHelpW\n");
1114#endif
1115 rc = WinHelpA(arg1, astring, arg3, arg4);
1116 FreeAsciiString(astring);
1117 return rc;
1118}
1119
1120/* Keyboard and Input Functions */
1121
1122BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1123{
1124#ifdef DEBUG
1125 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
1126#endif
1127 return(TRUE);
1128}
1129//******************************************************************************
1130//SvL: 24-6-'97 - Added
1131//TODO: Not implemented
1132//******************************************************************************
1133WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1134{
1135#ifdef DEBUG
1136//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1137#endif
1138 return 0;
1139}
1140/*****************************************************************************
1141 * Name : UINT WIN32API GetKBCodePage
1142 * Purpose : The GetKBCodePage function is provided for compatibility with
1143 * earlier versions of Windows. In the Win32 application programming
1144 * interface (API) it just calls the GetOEMCP function.
1145 * Parameters:
1146 * Variables :
1147 * Result : If the function succeeds, the return value is an OEM code-page
1148 * identifier, or it is the default identifier if the registry
1149 * value is not readable. For a list of OEM code-page identifiers,
1150 * see GetOEMCP.
1151 * Remark :
1152 * Status : UNTESTED
1153 *
1154 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1155 *****************************************************************************/
1156
1157UINT WIN32API GetKBCodePage(VOID)
1158{
1159 return (GetOEMCP());
1160}
1161/*****************************************************************************
1162 * Name : BOOL WIN32API GetKeyboardLayoutNameA
1163 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
1164 * active keyboard layout.
1165 * Parameters: LPTSTR pwszKLID address of buffer for layout name
1166 * Variables :
1167 * Result : If the function succeeds, the return value is TRUE.
1168 * If the function fails, the return value is FALSE. To get extended
1169 * error information, call GetLastError.
1170 * Remark :
1171 * Status : UNTESTED STUB
1172 *
1173 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1174 *****************************************************************************/
1175// @@@PH Win32 BOOL's are casted to INTs
1176INT WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
1177{
1178 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
1179 pwszKLID));
1180
1181 return(FALSE);
1182}
1183//******************************************************************************
1184//******************************************************************************
1185int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
1186{
1187#ifdef DEBUG
1188 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
1189#endif
1190 return(0);
1191}
1192//******************************************************************************
1193//******************************************************************************
1194HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
1195{
1196#ifdef DEBUG
1197 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
1198#endif
1199 return(0);
1200}
1201/*****************************************************************************
1202 * Name : BOOL WIN32API GetKeyboardLayoutNameW
1203 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
1204 * active keyboard layout.
1205 * Parameters: LPTSTR pwszKLID address of buffer for layout name
1206 * Variables :
1207 * Result : If the function succeeds, the return value is TRUE.
1208 * If the function fails, the return value is FALSE. To get extended
1209 * error information, call GetLastError.
1210 * Remark :
1211 * Status : UNTESTED STUB
1212 *
1213 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1214 *****************************************************************************/
1215// @@@PH Win32 BOOL's are casted to INTs
1216INT WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
1217{
1218 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
1219 pwszKLID));
1220
1221 return(FALSE);
1222}
1223//******************************************************************************
1224//******************************************************************************
1225BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
1226{
1227#ifdef DEBUG
1228 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
1229#endif
1230 memset(lpKeyState, 0, 256);
1231 return(TRUE);
1232}
1233//******************************************************************************
1234//******************************************************************************
1235int WIN32API GetKeyNameTextA( LPARAM lParam, LPSTR lpString, int nSize)
1236{
1237#ifdef DEBUG
1238 WriteLog("USER32: GetKeyNameTextA\n");
1239#endif
1240 return O32_GetKeyNameText(lParam,lpString,nSize);
1241}
1242//******************************************************************************
1243//******************************************************************************
1244int WIN32API GetKeyNameTextW( LPARAM lParam, LPWSTR lpString, int nSize)
1245{
1246#ifdef DEBUG
1247 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
1248#endif
1249 // NOTE: This will not work as is (needs UNICODE support)
1250 return 0;
1251// return O32_GetKeyNameText(arg1, arg2, arg3);
1252}
1253//******************************************************************************
1254//SvL: 24-6-'97 - Added
1255//******************************************************************************
1256SHORT WIN32API GetKeyState( int nVirtKey)
1257{
1258//SvL: Hehe. 32 MB logfile for Opera after a minute.
1259#ifdef DEBUG
1260// WriteLog("USER32: GetKeyState %d\n", nVirtKey);
1261#endif
1262 return O32_GetKeyState(nVirtKey);
1263}
1264/*****************************************************************************
1265 * Name : VOID WIN32API keybd_event
1266 * Purpose : The keybd_event function synthesizes a keystroke. The system
1267 * can use such a synthesized keystroke to generate a WM_KEYUP or
1268 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
1269 * the keybd_event function.
1270 * Parameters: BYTE bVk virtual-key code
1271
1272 * BYTE bScan hardware scan code
1273 * DWORD dwFlags flags specifying various function options
1274 * DWORD dwExtraInfo additional data associated with keystroke
1275 * Variables :
1276 * Result :
1277 * Remark :
1278 * Status : UNTESTED STUB
1279 *
1280 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1281 *****************************************************************************/
1282VOID WIN32API keybd_event (BYTE bVk,
1283 BYTE bScan,
1284 DWORD dwFlags,
1285 DWORD dwExtraInfo)
1286{
1287 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
1288 bVk,
1289 bScan,
1290 dwFlags,
1291 dwExtraInfo));
1292}
1293/*****************************************************************************
1294 * Name : HLK WIN32API LoadKeyboardLayoutA
1295 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1296 * the system. Several keyboard layouts can be loaded at a time, but
1297 * only one per process is active at a time. Loading multiple keyboard
1298 * layouts makes it possible to rapidly switch between layouts.
1299 * Parameters:
1300 * Variables :
1301 * Result : If the function succeeds, the return value is the handle of the
1302 * keyboard layout.
1303 * If the function fails, the return value is NULL. To get extended
1304 * error information, call GetLastError.
1305 * Remark :
1306 * Status : UNTESTED STUB
1307 *
1308 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1309 *****************************************************************************/
1310HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
1311 UINT Flags)
1312{
1313 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
1314 pwszKLID,
1315 Flags));
1316
1317 return (NULL);
1318}
1319/*****************************************************************************
1320 * Name : HLK WIN32API LoadKeyboardLayoutW
1321 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1322 * the system. Several keyboard layouts can be loaded at a time, but
1323 * only one per process is active at a time. Loading multiple keyboard
1324 * layouts makes it possible to rapidly switch between layouts.
1325 * Parameters:
1326 * Variables :
1327 * Result : If the function succeeds, the return value is the handle of the
1328 * keyboard layout.
1329 * If the function fails, the return value is NULL. To get extended
1330 * error information, call GetLastError.
1331 * Remark :
1332 * Status : UNTESTED STUB
1333 *
1334 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1335 *****************************************************************************/
1336HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
1337 UINT Flags)
1338{
1339 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
1340 pwszKLID,
1341 Flags));
1342
1343 return (NULL);
1344}
1345//******************************************************************************
1346//******************************************************************************
1347UINT WIN32API MapVirtualKeyA( UINT uCode, UINT uMapType)
1348{
1349#ifdef DEBUG
1350 WriteLog("USER32: MapVirtualKeyA\n");
1351#endif
1352 return O32_MapVirtualKey(uCode,uMapType);
1353}
1354//******************************************************************************
1355//******************************************************************************
1356UINT WIN32API MapVirtualKeyW( UINT uCode, UINT uMapType)
1357{
1358#ifdef DEBUG
1359 WriteLog("USER32: MapVirtualKeyW\n");
1360#endif
1361 // NOTE: This will not work as is (needs UNICODE support)
1362 return O32_MapVirtualKey(uCode,uMapType);
1363}
1364/*****************************************************************************
1365 * Name : UINT WIN32API MapVirtualKeyExA
1366 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1367 * code into a scan code or character value, or translates a scan
1368 * code into a virtual-key code. The function translates the codes
1369 * using the input language and physical keyboard layout identified
1370 * by the given keyboard layout handle.
1371 * Parameters:
1372 * Variables :
1373 * Result : The return value is either a scan code, a virtual-key code, or
1374 * a character value, depending on the value of uCode and uMapType.
1375 * If there is no translation, the return value is zero.
1376 * Remark :
1377 * Status : UNTESTED STUB
1378 *
1379 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1380 *****************************************************************************/
1381UINT WIN32API MapVirtualKeyExA(UINT uCode,
1382 UINT uMapType,
1383 HKL dwhkl)
1384{
1385 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
1386 uCode,
1387 uMapType,
1388 dwhkl));
1389
1390 return (0);
1391}
1392/*****************************************************************************
1393 * Name : UINT WIN32API MapVirtualKeyExW
1394 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1395 * code into a scan code or character value, or translates a scan
1396 * code into a virtual-key code. The function translates the codes
1397 * using the input language and physical keyboard layout identified
1398 * by the given keyboard layout handle.
1399 * Parameters:
1400 * Variables :
1401 * Result : The return value is either a scan code, a virtual-key code, or
1402 * a character value, depending on the value of uCode and uMapType.
1403 * If there is no translation, the return value is zero.
1404 * Remark :
1405 * Status : UNTESTED STUB
1406
1407 *
1408 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1409 *****************************************************************************/
1410UINT WIN32API MapVirtualKeyExW(UINT uCode,
1411 UINT uMapType,
1412 HKL dwhkl)
1413{
1414 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
1415 uCode,
1416 uMapType,
1417 dwhkl));
1418
1419 return (0);
1420}
1421/*****************************************************************************
1422 * Name : DWORD WIN32API OemKeyScan
1423 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
1424 * into the OEM scan codes and shift states. The function provides
1425 * information that allows a program to send OEM text to another
1426 * program by simulating keyboard input.
1427 * Parameters:
1428 * Variables :
1429 * Result :
1430 * Remark :
1431 * Status : UNTESTED STUB
1432 *
1433 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1434 *****************************************************************************/
1435DWORD WIN32API OemKeyScan(WORD wOemChar)
1436{
1437 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
1438 wOemChar));
1439
1440 return (wOemChar);
1441}
1442//******************************************************************************
1443//******************************************************************************
1444BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1445{
1446#ifdef DEBUG
1447 WriteLog("USER32: RegisterHotKey, not implemented\n");
1448#endif
1449 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1450 return(TRUE);
1451}
1452//******************************************************************************
1453//******************************************************************************
1454BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
1455{
1456#ifdef DEBUG
1457 WriteLog("USER32: SetKeyboardState, not implemented\n");
1458#endif
1459 return(TRUE);
1460}
1461/*****************************************************************************
1462 * Name : int WIN32API ToAscii
1463 * Purpose : The ToAscii function translates the specified virtual-key code
1464 * and keyboard state to the corresponding Windows character or characters.
1465 * Parameters: UINT uVirtKey virtual-key code
1466 * UINT uScanCode scan code
1467 * PBYTE lpbKeyState address of key-state array
1468 * LPWORD lpwTransKey buffer for translated key
1469 * UINT fuState active-menu flag
1470 * Variables :
1471 * Result : 0 The specified virtual key has no translation for the current
1472 * state of the keyboard.
1473 * 1 One Windows character was copied to the buffer.
1474 * 2 Two characters were copied to the buffer. This usually happens
1475 * when a dead-key character (accent or diacritic) stored in the
1476 * keyboard layout cannot be composed with the specified virtual
1477 * key to form a single character.
1478 * Remark :
1479 * Status : UNTESTED STUB
1480 *
1481 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1482 *****************************************************************************/
1483int WIN32API ToAscii(UINT uVirtKey,
1484 UINT uScanCode,
1485 PBYTE lpbKeyState,
1486 LPWORD lpwTransKey,
1487 UINT fuState)
1488{
1489 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
1490 uVirtKey,
1491 uScanCode,
1492 lpbKeyState,
1493 lpwTransKey,
1494 fuState));
1495
1496 return (0);
1497}
1498/*****************************************************************************
1499 * Name : int WIN32API ToAsciiEx
1500 * Purpose : The ToAscii function translates the specified virtual-key code
1501 * and keyboard state to the corresponding Windows character or characters.
1502 * Parameters: UINT uVirtKey virtual-key code
1503 * UINT uScanCode scan code
1504 * PBYTE lpbKeyState address of key-state array
1505 * LPWORD lpwTransKey buffer for translated key
1506 * UINT fuState active-menu flag
1507 * HLK hlk keyboard layout handle
1508 * Variables :
1509 * Result : 0 The specified virtual key has no translation for the current
1510 * state of the keyboard.
1511 * 1 One Windows character was copied to the buffer.
1512 * 2 Two characters were copied to the buffer. This usually happens
1513 * when a dead-key character (accent or diacritic) stored in the
1514 * keyboard layout cannot be composed with the specified virtual
1515 * key to form a single character.
1516 * Remark :
1517 * Status : UNTESTED STUB
1518 *
1519 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1520 *****************************************************************************/
1521int WIN32API ToAsciiEx(UINT uVirtKey,
1522 UINT uScanCode,
1523 PBYTE lpbKeyState,
1524 LPWORD lpwTransKey,
1525 UINT fuState,
1526 HKL hkl)
1527{
1528 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1529 uVirtKey,
1530 uScanCode,
1531 lpbKeyState,
1532 lpwTransKey,
1533 fuState,
1534 hkl));
1535
1536 return (0);
1537}
1538/*****************************************************************************
1539 * Name : int WIN32API ToUnicode
1540 * Purpose : The ToUnicode function translates the specified virtual-key code
1541 * and keyboard state to the corresponding Unicode character or characters.
1542 * Parameters: UINT wVirtKey virtual-key code
1543 * UINT wScanCode scan code
1544 * PBYTE lpKeyState address of key-state array
1545 * LPWSTR pwszBuff buffer for translated key
1546 * int cchBuff size of translated key buffer
1547 * UINT wFlags set of function-conditioning flags
1548 * Variables :
1549 * Result : - 1 The specified virtual key is a dead-key character (accent or
1550 * diacritic). This value is returned regardless of the keyboard
1551 * layout, even if several characters have been typed and are
1552 * stored in the keyboard state. If possible, even with Unicode
1553 * keyboard layouts, the function has written a spacing version of
1554 * the dead-key character to the buffer specified by pwszBuffer.
1555 * For example, the function writes the character SPACING ACUTE
1556 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
1557 * 0 The specified virtual key has no translation for the current
1558 * state of the keyboard. Nothing was written to the buffer
1559 * specified by pwszBuffer.
1560 * 1 One character was written to the buffer specified by pwszBuffer.
1561 * 2 or more Two or more characters were written to the buffer specified by
1562 * pwszBuff. The most common cause for this is that a dead-key
1563 * character (accent or diacritic) stored in the keyboard layout
1564 * could not be combined with the specified virtual key to form a
1565 * single character.
1566 * Remark :
1567 * Status : UNTESTED STUB
1568 *
1569 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1570 *****************************************************************************/
1571int WIN32API ToUnicode(UINT uVirtKey,
1572 UINT uScanCode,
1573 PBYTE lpKeyState,
1574 LPWSTR pwszBuff,
1575 int cchBuff,
1576 UINT wFlags)
1577{
1578 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1579 uVirtKey,
1580 uScanCode,
1581 lpKeyState,
1582 pwszBuff,
1583 cchBuff,
1584 wFlags));
1585
1586 return (0);
1587}
1588/*****************************************************************************
1589 * Name : BOOL WIN32API UnloadKeyboardLayout
1590 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
1591 * Parameters: HKL hkl handle of keyboard layout
1592 * Variables :
1593 * Result : If the function succeeds, the return value is the handle of the
1594 * keyboard layout; otherwise, it is NULL. To get extended error
1595 * information, use the GetLastError function.
1596 * Remark :
1597 * Status : UNTESTED STUB
1598 *
1599 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1600 *****************************************************************************/
1601BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
1602{
1603 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
1604 hkl));
1605
1606 return (0);
1607}
1608//******************************************************************************
1609//******************************************************************************
1610BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1611{
1612#ifdef DEBUG
1613 WriteLog("USER32: UnregisterHotKey, not implemented\n");
1614#endif
1615 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1616
1617 return(TRUE);
1618}
1619//******************************************************************************
1620//SvL: 24-6-'97 - Added
1621//******************************************************************************
1622WORD WIN32API VkKeyScanA( char ch)
1623{
1624#ifdef DEBUG
1625 WriteLog("USER32: VkKeyScanA\n");
1626#endif
1627 return O32_VkKeyScan(ch);
1628}
1629//******************************************************************************
1630//******************************************************************************
1631WORD WIN32API VkKeyScanW( WCHAR wch)
1632{
1633#ifdef DEBUG
1634 WriteLog("USER32: VkKeyScanW\n");
1635#endif
1636 // NOTE: This will not work as is (needs UNICODE support)
1637 return O32_VkKeyScan((char)wch);
1638}
1639/*****************************************************************************
1640 * Name : SHORT WIN32API VkKeyScanExW
1641 * Purpose : The VkKeyScanEx function translates a character to the
1642 * corresponding virtual-key code and shift state. The function
1643 * translates the character using the input language and physical
1644 * keyboard layout identified by the given keyboard layout handle.
1645 * Parameters: UINT uChar character to translate
1646 * HKL hkl keyboard layout handle
1647 * Variables :
1648 * Result : see docs
1649 * Remark :
1650 * Status : UNTESTED STUB
1651 *
1652 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1653 *****************************************************************************/
1654WORD WIN32API VkKeyScanExW(WCHAR uChar,
1655 HKL hkl)
1656{
1657 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
1658 uChar,
1659 hkl));
1660
1661 return (uChar);
1662}
1663/*****************************************************************************
1664 * Name : SHORT WIN32API VkKeyScanExA
1665 * Purpose : The VkKeyScanEx function translates a character to the
1666 * corresponding virtual-key code and shift state. The function
1667 * translates the character using the input language and physical
1668 * keyboard layout identified by the given keyboard layout handle.
1669 * Parameters: UINT uChar character to translate
1670 * HKL hkl keyboard layout handle
1671 * Variables :
1672 * Result : see docs
1673 * Remark :
1674 * Status : UNTESTED STUB
1675 *
1676 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1677 *****************************************************************************/
1678WORD WIN32API VkKeyScanExA(CHAR uChar,
1679 HKL hkl)
1680{
1681 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
1682 uChar,
1683 hkl));
1684
1685 return (uChar);
1686}
1687
1688/* Synchronization Functions */
1689ODINFUNCTION5(DWORD,MsgWaitForMultipleObjects,DWORD, nCount,
1690 LPHANDLE, pHandles,
1691 BOOL, fWaitAll,
1692 DWORD, dwMilliseconds,
1693 DWORD, dwWakeMask)
1694{
1695 // @@@PH that's a really difficult function to implement
1696
1697 // @@@PH this is a temporary bugfix for WINFILE.EXE
1698 if (nCount == 0)
1699 {
1700 // only listens to incoming thread messages.
1701 return (WAIT_OBJECT_0);
1702 }
1703
1704 return O32_MsgWaitForMultipleObjects(nCount,pHandles,fWaitAll,dwMilliseconds,dwWakeMask);
1705}
1706
1707/* Button Functions */
1708
1709BOOL WIN32API CheckRadioButton( HWND hDlg, UINT nIDFirstButton, UINT nIDLastButton, UINT nIDCheckButton)
1710{
1711#ifdef DEBUG
1712 WriteLog("USER32: CheckRadioButton\n");
1713#endif
1714 //CB: check radio buttons in interval
1715 if (nIDFirstButton > nIDLastButton)
1716 {
1717 SetLastError(ERROR_INVALID_PARAMETER);
1718 return (FALSE);
1719 }
1720
1721 for (UINT x = nIDFirstButton;x <= nIDLastButton;x++)
1722 {
1723 SendDlgItemMessageA(hDlg,x,BM_SETCHECK,(x == nIDCheckButton) ? BST_CHECKED : BST_UNCHECKED,0);
1724 }
1725
1726 return (TRUE);
1727}
1728
1729/* Window Functions */
1730
1731/*****************************************************************************
1732 * Name : BOOL WIN32API AnyPopup
1733 * Purpose : The AnyPopup function indicates whether an owned, visible,
1734 * top-level pop-up, or overlapped window exists on the screen. The
1735 * function searches the entire Windows screen, not just the calling
1736 * application's client area.
1737 * Parameters: VOID
1738 * Variables :
1739 * Result : If a pop-up window exists, the return value is TRUE even if the
1740 * pop-up window is completely covered by other windows. Otherwise,
1741 * it is FALSE.
1742 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1743 * compatibility purposes. It is generally not useful.
1744 * Status : UNTESTED STUB
1745 *
1746 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1747 *****************************************************************************/
1748BOOL WIN32API AnyPopup(VOID)
1749{
1750 dprintf(("USER32:AnyPopup() not implemented.\n"));
1751
1752 return (FALSE);
1753}
1754//******************************************************************************
1755//******************************************************************************
1756HWND WIN32API GetForegroundWindow(void)
1757{
1758#ifdef DEBUG
1759 WriteLog("USER32: GetForegroundWindow\n");
1760#endif
1761 return Win32Window::OS2ToWin32Handle(O32_GetForegroundWindow());
1762}
1763//******************************************************************************
1764//******************************************************************************
1765HWND WIN32API GetLastActivePopup( HWND hWnd)
1766{
1767#ifdef DEBUG
1768 WriteLog("USER32: GetLastActivePopup\n");
1769#endif
1770 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
1771
1772 return Win32Window::OS2ToWin32Handle(O32_GetLastActivePopup(hWnd));
1773}
1774//******************************************************************************
1775//******************************************************************************
1776DWORD WIN32API GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
1777{
1778#ifdef DEBUG
1779 WriteLog("USER32: GetWindowThreadProcessId\n");
1780#endif
1781 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
1782
1783 return O32_GetWindowThreadProcessId(hWnd,lpdwProcessId);
1784}
1785
1786/* Painting and Drawing Functions */
1787
1788INT WIN32API ExcludeUpdateRgn( HDC hDC, HWND hWnd)
1789{
1790#ifdef DEBUG
1791 WriteLog("USER32: ExcludeUpdateRgn\n");
1792#endif
1793 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
1794
1795 return O32_ExcludeUpdateRgn(hDC,hWnd);
1796}
1797//******************************************************************************
1798//******************************************************************************
1799/*****************************************************************************
1800 * Name : int WIN32API GetWindowRgn
1801 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
1802 * Parameters: HWND hWnd handle to window whose window region is to be obtained
1803 * HRGN hRgn handle to region that receives a copy of the window region
1804 * Variables :
1805 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
1806 * Remark :
1807 * Status : UNTESTED STUB
1808 *
1809 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1810 *****************************************************************************/
1811
1812int WIN32API GetWindowRgn (HWND hWnd,
1813 HRGN hRgn)
1814{
1815 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
1816 hWnd,
1817 hRgn));
1818 //Attention: Win32 hwnd handle!
1819
1820 return (NULLREGION);
1821}
1822//******************************************************************************
1823//TODO: Not complete
1824//******************************************************************************
1825BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1826 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1827 int nHeight)
1828{
1829 BOOL rc;
1830 COLORREF curclr;
1831
1832#ifdef DEBUG
1833 WriteLog("USER32: GrayStringA, not completely implemented\n");
1834#endif
1835 if(lpOutputFunc == NULL && lpData == NULL) {
1836#ifdef DEBUG
1837 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1838#endif
1839 return(FALSE);
1840 }
1841 if(lpOutputFunc) {
1842 return(lpOutputFunc(hdc, lpData, nCount));
1843 }
1844 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1845 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
1846 SetTextColor(hdc, curclr);
1847
1848 return(rc);
1849}
1850//******************************************************************************
1851//******************************************************************************
1852BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1853 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1854 int nHeight)
1855{
1856 BOOL rc;
1857 char *astring;
1858 COLORREF curclr;
1859
1860#ifdef DEBUG
1861 WriteLog("USER32: GrayStringW, not completely implemented\n");
1862#endif
1863
1864 if(lpOutputFunc == NULL && lpData == NULL) {
1865#ifdef DEBUG
1866 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1867#endif
1868 return(FALSE);
1869 }
1870 if(nCount == 0)
1871 nCount = UniStrlen((UniChar*)lpData);
1872
1873 if(lpOutputFunc) {
1874 return(lpOutputFunc(hdc, lpData, nCount));
1875 }
1876 astring = UnicodeToAsciiString((LPWSTR)lpData);
1877
1878 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1879 rc = TextOutA(hdc, X, Y, astring, nCount);
1880 SetTextColor(hdc, curclr);
1881
1882 FreeAsciiString(astring);
1883 return(rc);
1884}
1885//******************************************************************************
1886//******************************************************************************
1887#if 0
1888BOOL WIN32API InvalidateRgn( HWND hWnd, HRGN hRgn, BOOL bErase)
1889{
1890#ifdef DEBUG
1891 WriteLog("USER32: InvalidateRgn\n");
1892#endif
1893 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
1894
1895 return O32_InvalidateRgn(hWnd,hRgn,bErase);
1896}
1897#endif
1898/*****************************************************************************
1899 * Name : BOOL WIN32API PaintDesktop
1900 * Purpose : The PaintDesktop function fills the clipping region in the
1901 * specified device context with the desktop pattern or wallpaper.
1902 * The function is provided primarily for shell desktops.
1903 * Parameters:
1904 * Variables :
1905 * Result : If the function succeeds, the return value is TRUE.
1906 * If the function fails, the return value is FALSE.
1907 * Remark :
1908 * Status : UNTESTED STUB
1909 *
1910 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1911 *****************************************************************************/
1912BOOL WIN32API PaintDesktop(HDC hdc)
1913{
1914 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
1915 hdc));
1916
1917 return (FALSE);
1918}
1919/*****************************************************************************
1920 * Name : int WIN32API SetWindowRgn
1921 * Purpose : The SetWindowRgn function sets the window region of a window. The
1922 * window region determines the area within the window where the
1923 * operating system permits drawing. The operating system does not
1924 * display any portion of a window that lies outside of the window region
1925 * Parameters: HWND hWnd handle to window whose window region is to be set
1926 * HRGN hRgn handle to region
1927 * BOOL bRedraw window redraw flag
1928 * Variables :
1929 * Result : If the function succeeds, the return value is non-zero.
1930 * If the function fails, the return value is zero.
1931 * Remark :
1932 * Status : UNTESTED STUB
1933 *
1934 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1935 *****************************************************************************/
1936
1937int WIN32API SetWindowRgn(HWND hWnd,
1938 HRGN hRgn,
1939 BOOL bRedraw)
1940{
1941 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
1942 hWnd,
1943 hRgn,
1944 bRedraw));
1945 //Attention: Win32 hwnd handle!
1946
1947 return (0);
1948}
1949//******************************************************************************
1950//******************************************************************************
1951BOOL WIN32API ValidateRect( HWND hwnd, const RECT * lprc)
1952{
1953#ifdef DEBUG
1954 WriteLog("USER32: ValidateRect\n");
1955#endif
1956 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1957
1958 return O32_ValidateRect(hwnd,lprc);
1959}
1960//******************************************************************************
1961//******************************************************************************
1962BOOL WIN32API ValidateRgn( HWND hwnd, HRGN hrgn)
1963{
1964#ifdef DEBUG
1965 WriteLog("USER32: ValidateRgn\n");
1966#endif
1967 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1968
1969 return O32_ValidateRgn(hwnd,hrgn);
1970}
1971
1972/* Filled Shape Functions */
1973
1974
1975int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
1976{
1977#ifdef DEBUG
1978 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", lprc->left, lprc->top, lprc->right, lprc->bottom, hbr);
1979#endif
1980 return O32_FillRect(hDC,lprc,hbr);
1981}
1982//******************************************************************************
1983//******************************************************************************
1984int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr)
1985{
1986#ifdef DEBUG
1987 WriteLog("USER32: FrameRect\n");
1988#endif
1989 return O32_FrameRect(hDC,lprc,hbr);
1990}
1991//******************************************************************************
1992//******************************************************************************
1993BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
1994{
1995#ifdef DEBUG
1996 WriteLog("USER32: InvertRect\n");
1997#endif
1998 return O32_InvertRect(hDC,lprc);
1999}
2000
2001/* System Information Functions */
2002
2003int WIN32API GetKeyboardType( int nTypeFlag)
2004{
2005#ifdef DEBUG
2006 WriteLog("USER32: GetKeyboardType\n");
2007#endif
2008 return O32_GetKeyboardType(nTypeFlag);
2009}
2010/*****************************************************************************
2011 * Name : HDESK WIN32API GetThreadDesktop
2012 * Purpose : The GetThreadDesktop function returns a handle to the desktop
2013 * associated with a specified thread.
2014 * Parameters: DWORD dwThreadId thread identifier
2015 * Variables :
2016 * Result : If the function succeeds, the return value is the handle of the
2017 * desktop associated with the specified thread.
2018 * Remark :
2019 * Status : UNTESTED STUB
2020 *
2021 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2022 *****************************************************************************/
2023HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
2024{
2025 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
2026 dwThreadId));
2027
2028 return (NULL);
2029}
2030
2031/* Message and Message Queue Functions */
2032
2033/*****************************************************************************
2034 * Name : BOOL WIN32API GetInputState
2035 * Purpose : The GetInputState function determines whether there are
2036 * mouse-button or keyboard messages in the calling thread's message queue.
2037 * Parameters:
2038 * Variables :
2039 * Result : If the queue contains one or more new mouse-button or keyboard
2040 * messages, the return value is TRUE.
2041 * If the function fails, the return value is FALSE.
2042 * Remark :
2043 * Status : UNTESTED STUB
2044 *
2045 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2046 *****************************************************************************/
2047BOOL WIN32API GetInputState(VOID)
2048{
2049 dprintf(("USER32:GetInputState () not implemented.\n"));
2050
2051 return (FALSE);
2052}
2053//******************************************************************************
2054//******************************************************************************
2055DWORD WIN32API GetQueueStatus( UINT flags)
2056{
2057#ifdef DEBUG
2058 WriteLog("USER32: GetQueueStatus\n");
2059#endif
2060 return O32_GetQueueStatus(flags);
2061}
2062
2063/* Font and Text Functions */
2064
2065DWORD WIN32API GetTabbedTextExtentA( HDC hDC, LPCSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions)
2066{
2067#ifdef DEBUG
2068 WriteLog("USER32: GetTabbedTextExtentA\n");
2069#endif
2070 return O32_GetTabbedTextExtent(hDC,lpString,nCount,nTabPositions,lpnTabStopPositions);
2071}
2072//******************************************************************************
2073//******************************************************************************
2074DWORD WIN32API GetTabbedTextExtentW( HDC hDC, LPCWSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions)
2075{
2076 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
2077 DWORD rc;
2078
2079#ifdef DEBUG
2080 WriteLog("USER32: GetTabbedTextExtentW\n");
2081#endif
2082 rc = O32_GetTabbedTextExtent(hDC,astring,nCount,nTabPositions,lpnTabStopPositions);
2083 FreeAsciiString(astring);
2084 return rc;
2085}
2086//******************************************************************************
2087//******************************************************************************
2088LONG WIN32API TabbedTextOutA( HDC hdc, int x, int y, LPCSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin)
2089{
2090#ifdef DEBUG
2091 WriteLog("USER32: TabbedTextOutA\n");
2092#endif
2093 return O32_TabbedTextOut(hdc,x,y,lpString,nCount,nTabPositions,lpnTabStopPositions,nTabOrigin);
2094}
2095//******************************************************************************
2096//******************************************************************************
2097LONG WIN32API TabbedTextOutW( HDC hdc, int x, int y, LPCWSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin)
2098{
2099 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
2100 LONG rc;
2101
2102#ifdef DEBUG
2103 WriteLog("USER32: TabbedTextOutW\n");
2104#endif
2105 rc = O32_TabbedTextOut(hdc,x,y,astring,nCount,nTabPositions,lpnTabStopPositions,nTabOrigin);
2106 FreeAsciiString(astring);
2107 return rc;
2108}
2109
2110/* Icon Functions */
2111int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
2112{
2113#ifdef DEBUG
2114 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
2115#endif
2116 return(0);
2117}
2118//******************************************************************************
2119//******************************************************************************
2120int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
2121 int cxDesired, int cyDesired,
2122 UINT Flags)
2123{
2124#ifdef DEBUG
2125 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
2126#endif
2127 return(0);
2128}
2129
2130/* Device Context Functions */
2131
2132BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
2133{
2134#ifdef DEBUG
2135 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
2136#endif
2137 return(FALSE);
2138}
2139//******************************************************************************
2140//******************************************************************************
2141BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
2142{
2143#ifdef DEBUG
2144 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
2145#endif
2146 return(FALSE);
2147}
2148//******************************************************************************
2149//******************************************************************************
2150HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
2151{
2152#ifdef DEBUG
2153 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
2154#endif
2155 //Attention: Win32 hwnd!
2156
2157 return(0);
2158}
2159//******************************************************************************
2160//******************************************************************************
2161HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
2162{
2163#ifdef DEBUG
2164 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
2165#endif
2166 return(0);
2167}
2168//******************************************************************************
2169//******************************************************************************
2170HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
2171{
2172#ifdef DEBUG
2173 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
2174#endif
2175 return(0);
2176}
2177//******************************************************************************
2178//******************************************************************************
2179BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
2180{
2181#ifdef DEBUG
2182 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
2183#endif
2184 return(FALSE);
2185}
2186//******************************************************************************
2187//******************************************************************************
2188BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
2189 LPDEVMODEA lpDevMode)
2190{
2191#ifdef DEBUG
2192 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
2193#endif
2194 switch(iModeNum) {
2195 case 0:
2196 lpDevMode->dmBitsPerPel = 16;
2197 lpDevMode->dmPelsWidth = 768;
2198 lpDevMode->dmPelsHeight = 1024;
2199 lpDevMode->dmDisplayFlags = 0;
2200 lpDevMode->dmDisplayFrequency = 70;
2201 break;
2202 case 1:
2203 lpDevMode->dmBitsPerPel = 16;
2204 lpDevMode->dmPelsWidth = 640;
2205 lpDevMode->dmPelsHeight = 480;
2206 lpDevMode->dmDisplayFlags = 0;
2207 lpDevMode->dmDisplayFrequency = 70;
2208 break;
2209 default:
2210 return(FALSE);
2211 }
2212 return(TRUE);
2213}
2214/*****************************************************************************
2215 * Name : BOOL WIN32API EnumDisplaySettingsW
2216 * Purpose : The EnumDisplaySettings function obtains information about one
2217 * of a display device's graphics modes. You can obtain information
2218 * for all of a display device's graphics modes by making a series
2219 * of calls to this function.
2220 * Parameters: LPCTSTR lpszDeviceName specifies the display device
2221 * DWORD iModeNum specifies the graphics mode
2222 * LPDEVMODE lpDevMode points to structure to receive settings
2223 * Variables :
2224 * Result : If the function succeeds, the return value is TRUE.
2225 * If the function fails, the return value is FALSE.
2226 * Remark :
2227 * Status : UNTESTED STUB
2228 *
2229 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2230 *****************************************************************************/
2231BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
2232 DWORD iModeNum,
2233 LPDEVMODEW lpDevMode)
2234{
2235 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
2236 lpszDeviceName,
2237 iModeNum,
2238 lpDevMode));
2239
2240 return (EnumDisplaySettingsA(lpszDeviceName,
2241 iModeNum,
2242 (LPDEVMODEA)lpDevMode));
2243}
2244//******************************************************************************
2245//******************************************************************************
2246LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
2247{
2248#ifdef DEBUG
2249 if(lpDevMode) {
2250 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
2251 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
2252 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
2253 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
2254 }
2255#endif
2256 return(DISP_CHANGE_SUCCESSFUL);
2257}
2258/*****************************************************************************
2259 * Name : LONG WIN32API ChangeDisplaySettingsW
2260 * Purpose : The ChangeDisplaySettings function changes the display settings
2261 * to the specified graphics mode.
2262 * Parameters: LPDEVMODEW lpDevModeW
2263 * DWORD dwFlags
2264 * Variables :
2265 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
2266 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
2267 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
2268 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
2269 * DISP_CHANGE_BADMODE The graphics mode is not supported.
2270 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
2271 * Remark :
2272 * Status : UNTESTED STUB
2273 *
2274 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2275 *****************************************************************************/
2276LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
2277 DWORD dwFlags)
2278{
2279 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
2280 lpDevMode,
2281 dwFlags));
2282
2283 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
2284 dwFlags));
2285}
2286
2287/* Window Station and Desktop Functions */
2288
2289/*****************************************************************************
2290 * Name : BOOL WIN32API CloseDesktop
2291 * Purpose : The CloseDesktop function closes an open handle of a desktop
2292 * object. A desktop is a secure object contained within a window
2293 * station object. A desktop has a logical display surface and
2294 * contains windows, menus and hooks.
2295 * Parameters: HDESK hDesktop
2296 * Variables :
2297 * Result : If the function succeeds, the return value is TRUE.
2298 * If the functions fails, the return value is FALSE. To get
2299 * extended error information, call GetLastError.
2300 * Remark :
2301 * Status : UNTESTED STUB
2302 *
2303 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2304 *****************************************************************************/
2305BOOL WIN32API CloseDesktop(HDESK hDesktop)
2306{
2307 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
2308 hDesktop));
2309
2310 return (FALSE);
2311}
2312/*****************************************************************************
2313 * Name : BOOL WIN32API CloseWindowStation
2314 * Purpose : The CloseWindowStation function closes an open window station handle.
2315 * Parameters: HWINSTA hWinSta
2316 * Variables :
2317 * Result :
2318 * Remark : If the function succeeds, the return value is TRUE.
2319 * If the functions fails, the return value is FALSE. To get
2320 * extended error information, call GetLastError.
2321 * Status : UNTESTED STUB
2322 *
2323 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2324 *****************************************************************************/
2325BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
2326{
2327 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
2328 hWinSta));
2329
2330 return (FALSE);
2331}
2332/*****************************************************************************
2333 * Name : HDESK WIN32API CreateDesktopA
2334 * Purpose : The CreateDesktop function creates a new desktop on the window
2335 * station associated with the calling process.
2336 * Parameters: LPCTSTR lpszDesktop name of the new desktop
2337 * LPCTSTR lpszDevice name of display device to assign to the desktop
2338 * LPDEVMODE pDevMode reserved; must be NULL
2339 * DWORD dwFlags flags to control interaction with other applications
2340 * DWORD dwDesiredAccess specifies access of returned handle
2341 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
2342 * Variables :
2343 * Result : If the function succeeds, the return value is a handle of the
2344 * newly created desktop.
2345 * If the function fails, the return value is NULL. To get extended
2346 * error information, call GetLastError.
2347 * Remark :
2348 * Status : UNTESTED STUB
2349 *
2350 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2351 *****************************************************************************/
2352HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
2353 LPCTSTR lpszDevice,
2354 LPDEVMODEA pDevMode,
2355 DWORD dwFlags,
2356 DWORD dwDesiredAccess,
2357 LPSECURITY_ATTRIBUTES lpsa)
2358{
2359 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
2360 lpszDesktop,
2361 lpszDevice,
2362 pDevMode,
2363 dwFlags,
2364 dwDesiredAccess,
2365 lpsa));
2366
2367 return (NULL);
2368}
2369/*****************************************************************************
2370 * Name : HDESK WIN32API CreateDesktopW
2371 * Purpose : The CreateDesktop function creates a new desktop on the window
2372 * station associated with the calling process.
2373 * Parameters: LPCTSTR lpszDesktop name of the new desktop
2374 * LPCTSTR lpszDevice name of display device to assign to the desktop
2375 * LPDEVMODE pDevMode reserved; must be NULL
2376 * DWORD dwFlags flags to control interaction with other applications
2377 * DWORD dwDesiredAccess specifies access of returned handle
2378 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
2379 * Variables :
2380 * Result : If the function succeeds, the return value is a handle of the
2381 * newly created desktop.
2382 * If the function fails, the return value is NULL. To get extended
2383 * error information, call GetLastError.
2384 * Remark :
2385 * Status : UNTESTED STUB
2386 *
2387 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2388 *****************************************************************************/
2389HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
2390 LPCTSTR lpszDevice,
2391 LPDEVMODEW pDevMode,
2392 DWORD dwFlags,
2393 DWORD dwDesiredAccess,
2394 LPSECURITY_ATTRIBUTES lpsa)
2395{
2396 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
2397 lpszDesktop,
2398 lpszDevice,
2399 pDevMode,
2400 dwFlags,
2401 dwDesiredAccess,
2402 lpsa));
2403
2404 return (NULL);
2405}
2406/*****************************************************************************
2407 * Name : HWINSTA WIN32API CreateWindowStationA
2408 * Purpose : The CreateWindowStation function creates a window station object.
2409 * It returns a handle that can be used to access the window station.
2410 * A window station is a secure object that contains a set of global
2411 * atoms, a clipboard, and a set of desktop objects.
2412 * Parameters: LPTSTR lpwinsta name of the new window station
2413 * DWORD dwReserved reserved; must be NULL
2414 * DWORD dwDesiredAccess specifies access of returned handle
2415 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
2416 * Variables :
2417 * Result : If the function succeeds, the return value is the handle to the
2418 * newly created window station.
2419 * If the function fails, the return value is NULL. To get extended
2420 * error information, call GetLastError.
2421 * Remark :
2422 * Status : UNTESTED STUB
2423 *
2424 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2425 *****************************************************************************/
2426HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
2427 DWORD dwReserved,
2428 DWORD dwDesiredAccess,
2429 LPSECURITY_ATTRIBUTES lpsa)
2430{
2431 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
2432 lpWinSta,
2433 dwReserved,
2434 dwDesiredAccess,
2435 lpsa));
2436
2437 return (NULL);
2438}
2439/*****************************************************************************
2440 * Name : HWINSTA WIN32API CreateWindowStationW
2441 * Purpose : The CreateWindowStation function creates a window station object.
2442 * It returns a handle that can be used to access the window station.
2443 * A window station is a secure object that contains a set of global
2444 * atoms, a clipboard, and a set of desktop objects.
2445 * Parameters: LPTSTR lpwinsta name of the new window station
2446 * DWORD dwReserved reserved; must be NULL
2447 * DWORD dwDesiredAccess specifies access of returned handle
2448 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
2449 * Variables :
2450 * Result : If the function succeeds, the return value is the handle to the
2451 * newly created window station.
2452 * If the function fails, the return value is NULL. To get extended
2453 * error information, call GetLastError.
2454 * Remark :
2455 * Status : UNTESTED STUB
2456 *
2457 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2458 *****************************************************************************/
2459HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
2460 DWORD dwReserved,
2461 DWORD dwDesiredAccess,
2462 LPSECURITY_ATTRIBUTES lpsa)
2463{
2464 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
2465 lpWinSta,
2466 dwReserved,
2467 dwDesiredAccess,
2468 lpsa));
2469
2470 return (NULL);
2471}
2472/*****************************************************************************
2473 * Name : BOOL WIN32API EnumDesktopWindows
2474 * Purpose : The EnumDesktopWindows function enumerates all windows in a
2475 * desktop by passing the handle of each window, in turn, to an
2476 * application-defined callback function.
2477 * Parameters: HDESK hDesktop handle of desktop to enumerate
2478 * WNDENUMPROC lpfn points to application's callback function
2479 * LPARAM lParam 32-bit value to pass to the callback function
2480 * Variables :
2481 * Result : If the function succeeds, the return value is TRUE.
2482 * If the function fails, the return value is FALSE. To get
2483 * extended error information, call GetLastError.
2484 * Remark :
2485 * Status : UNTESTED STUB
2486 *
2487 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2488 *****************************************************************************/
2489BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
2490 WNDENUMPROC lpfn,
2491 LPARAM lParam)
2492{
2493 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
2494 hDesktop,
2495 lpfn,
2496 lParam));
2497
2498 return (FALSE);
2499}
2500/*****************************************************************************
2501 * Name : BOOL WIN32API EnumDesktopsA
2502 * Purpose : The EnumDesktops function enumerates all desktops in the window
2503 * station assigned to the calling process. The function does so by
2504 * passing the name of each desktop, in turn, to an application-
2505 * defined callback function.
2506 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2507 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2508 * LPARAM lParam 32-bit value to pass to the callback function
2509 * Variables :
2510 * Result : If the function succeeds, the return value is TRUE.
2511 * If the function fails, the return value is FALSE. To get extended
2512 * error information, call GetLastError.
2513 * Remark :
2514 * Status : UNTESTED STUB
2515 *
2516 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2517 *****************************************************************************/
2518BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
2519 DESKTOPENUMPROCA lpEnumFunc,
2520 LPARAM lParam)
2521{
2522 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
2523 hWinSta,
2524 lpEnumFunc,
2525 lParam));
2526
2527 return (FALSE);
2528}
2529/*****************************************************************************
2530 * Name : BOOL WIN32API EnumDesktopsW
2531 * Purpose : The EnumDesktops function enumerates all desktops in the window
2532 * station assigned to the calling process. The function does so by
2533 * passing the name of each desktop, in turn, to an application-
2534 * defined callback function.
2535 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2536 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2537 * LPARAM lParam 32-bit value to pass to the callback function
2538 * Variables :
2539 * Result : If the function succeeds, the return value is TRUE.
2540 * If the function fails, the return value is FALSE. To get extended
2541 * error information, call GetLastError.
2542 * Remark :
2543 * Status : UNTESTED STUB
2544 *
2545 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2546 *****************************************************************************/
2547BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
2548 DESKTOPENUMPROCW lpEnumFunc,
2549 LPARAM lParam)
2550{
2551 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
2552 hWinSta,
2553 lpEnumFunc,
2554 lParam));
2555
2556 return (FALSE);
2557}
2558/*****************************************************************************
2559 * Name : BOOL WIN32API EnumWindowStationsA
2560 * Purpose : The EnumWindowStations function enumerates all windowstations
2561 * in the system by passing the name of each window station, in
2562 * turn, to an application-defined callback function.
2563 * Parameters:
2564 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2565 * LPARAM lParam 32-bit value to pass to the callback function
2566 * Result : If the function succeeds, the return value is TRUE.
2567 * If the function fails the return value is FALSE. To get extended
2568 * error information, call GetLastError.
2569 * Remark :
2570 * Status : UNTESTED STUB
2571 *
2572 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2573 *****************************************************************************/
2574BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
2575 LPARAM lParam)
2576{
2577 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
2578 lpEnumFunc,
2579 lParam));
2580
2581 return (FALSE);
2582}
2583/*****************************************************************************
2584 * Name : BOOL WIN32API EnumWindowStationsW
2585 * Purpose : The EnumWindowStations function enumerates all windowstations
2586 * in the system by passing the name of each window station, in
2587 * turn, to an application-defined callback function.
2588 * Parameters:
2589 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2590 * LPARAM lParam 32-bit value to pass to the callback function
2591 * Result : If the function succeeds, the return value is TRUE.
2592 * If the function fails the return value is FALSE. To get extended
2593 * error information, call GetLastError.
2594 * Remark :
2595 * Status : UNTESTED STUB
2596 *
2597 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2598 *****************************************************************************/
2599BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
2600 LPARAM lParam)
2601{
2602 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
2603 lpEnumFunc,
2604 lParam));
2605
2606 return (FALSE);
2607}
2608/*****************************************************************************
2609 * Name : HWINSTA WIN32API GetProcessWindowStation
2610 * Purpose : The GetProcessWindowStation function returns a handle of the
2611 * window station associated with the calling process.
2612 * Parameters:
2613 * Variables :
2614 * Result : If the function succeeds, the return value is a handle of the
2615 * window station associated with the calling process.
2616 * If the function fails, the return value is NULL. This can occur
2617 * if the calling process is not an application written for Windows
2618 * NT. To get extended error information, call GetLastError.
2619 * Remark :
2620 * Status : UNTESTED STUB
2621 *
2622 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2623 *****************************************************************************/
2624HWINSTA WIN32API GetProcessWindowStation(VOID)
2625{
2626 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
2627
2628 return (NULL);
2629}
2630/*****************************************************************************
2631 * Name : BOOL WIN32API GetUserObjectInformationA
2632 * Purpose : The GetUserObjectInformation function returns information about
2633 * a window station or desktop object.
2634 * Parameters: HANDLE hObj handle of object to get information for
2635 * int nIndex type of information to get
2636 * PVOID pvInfo points to buffer that receives the information
2637 * DWORD nLength size, in bytes, of pvInfo buffer
2638 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2639 * Variables :
2640 * Result : If the function succeeds, the return value is TRUE.
2641 * If the function fails, the return value is FALSE. To get extended
2642 * error information, call GetLastError.
2643 * Remark :
2644 * Status : UNTESTED STUB
2645 *
2646 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2647 *****************************************************************************/
2648BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2649 int nIndex,
2650 PVOID pvInfo,
2651 DWORD nLength,
2652 LPDWORD lpnLengthNeeded)
2653{
2654 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2655 hObj,
2656 nIndex,
2657 pvInfo,
2658 nLength,
2659 lpnLengthNeeded));
2660
2661 return (FALSE);
2662}
2663/*****************************************************************************
2664 * Name : BOOL WIN32API GetUserObjectInformationW
2665 * Purpose : The GetUserObjectInformation function returns information about
2666 * a window station or desktop object.
2667 * Parameters: HANDLE hObj handle of object to get information for
2668 * int nIndex type of information to get
2669 * PVOID pvInfo points to buffer that receives the information
2670 * DWORD nLength size, in bytes, of pvInfo buffer
2671 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2672 * Variables :
2673 * Result : If the function succeeds, the return value is TRUE.
2674 * If the function fails, the return value is FALSE. To get extended
2675 * error information, call GetLastError.
2676 * Remark :
2677 * Status : UNTESTED STUB
2678 *
2679 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2680 *****************************************************************************/
2681BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2682 int nIndex,
2683 PVOID pvInfo,
2684 DWORD nLength,
2685 LPDWORD lpnLengthNeeded)
2686{
2687 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2688 hObj,
2689 nIndex,
2690 pvInfo,
2691 nLength,
2692 lpnLengthNeeded));
2693
2694 return (FALSE);
2695}
2696/*****************************************************************************
2697 * Name : BOOL WIN32API GetUserObjectSecurity
2698 * Purpose : The GetUserObjectSecurity function retrieves security information
2699 * for the specified user object.
2700 * Parameters: HANDLE hObj handle of user object
2701 * SECURITY_INFORMATION * pSIRequested address of requested security information
2702 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2703 * DWORD nLength size of buffer for security descriptor
2704 * LPDWORD lpnLengthNeeded address of required size of buffer
2705 * Variables :
2706 * Result : If the function succeeds, the return value is TRUE.
2707 * If the function fails, the return value is FALSE. To get extended
2708 * error information, call GetLastError.
2709 * Remark :
2710 * Status : UNTESTED STUB
2711 *
2712 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2713 *****************************************************************************/
2714BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2715 SECURITY_INFORMATION * pSIRequested,
2716 LPSECURITY_DESCRIPTOR pSID,
2717 DWORD nLength,
2718 LPDWORD lpnLengthNeeded)
2719{
2720 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2721 hObj,
2722 pSIRequested,
2723 pSID,
2724 nLength,
2725 lpnLengthNeeded));
2726
2727 return (FALSE);
2728}
2729/*****************************************************************************
2730 * Name : HDESK WIN32API OpenDesktopA
2731 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2732 * A desktop is a secure object contained within a window station
2733 * object. A desktop has a logical display surface and contains
2734 * windows, menus and hooks.
2735 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2736 * DWORD dwFlags flags to control interaction with other applications
2737 * BOOL fInherit specifies whether returned handle is inheritable
2738 * DWORD dwDesiredAccess specifies access of returned handle
2739 * Variables :
2740 * Result : If the function succeeds, the return value is the handle to the
2741 * opened desktop.
2742 * If the function fails, the return value is NULL. To get extended
2743 * error information, call GetLastError.
2744 * Remark :
2745 * Status : UNTESTED STUB
2746 *
2747 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2748 *****************************************************************************/
2749HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2750 DWORD dwFlags,
2751 BOOL fInherit,
2752 DWORD dwDesiredAccess)
2753{
2754 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2755 lpszDesktopName,
2756 dwFlags,
2757 fInherit,
2758 dwDesiredAccess));
2759
2760 return (NULL);
2761}
2762/*****************************************************************************
2763 * Name : HDESK WIN32API OpenDesktopW
2764 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2765 * A desktop is a secure object contained within a window station
2766 * object. A desktop has a logical display surface and contains
2767 * windows, menus and hooks.
2768 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2769 * DWORD dwFlags flags to control interaction with other applications
2770 * BOOL fInherit specifies whether returned handle is inheritable
2771 * DWORD dwDesiredAccess specifies access of returned handle
2772 * Variables :
2773 * Result : If the function succeeds, the return value is the handle to the
2774 * opened desktop.
2775 * If the function fails, the return value is NULL. To get extended
2776 * error information, call GetLastError.
2777 * Remark :
2778 * Status : UNTESTED STUB
2779 *
2780 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2781 *****************************************************************************/
2782HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2783 DWORD dwFlags,
2784 BOOL fInherit,
2785 DWORD dwDesiredAccess)
2786{
2787 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2788 lpszDesktopName,
2789 dwFlags,
2790 fInherit,
2791 dwDesiredAccess));
2792
2793 return (NULL);
2794}
2795/*****************************************************************************
2796 * Name : HDESK WIN32API OpenInputDesktop
2797 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2798 * that receives user input. The input desktop is a desktop on the
2799 * window station associated with the logged-on user.
2800 * Parameters: DWORD dwFlags flags to control interaction with other applications
2801 * BOOL fInherit specifies whether returned handle is inheritable
2802 * DWORD dwDesiredAccess specifies access of returned handle
2803 * Variables :
2804 * Result : If the function succeeds, the return value is a handle of the
2805 * desktop that receives user input.
2806 * If the function fails, the return value is NULL. To get extended
2807 * error information, call GetLastError.
2808 * Remark :
2809 * Status : UNTESTED STUB
2810 *
2811 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2812 *****************************************************************************/
2813HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2814 BOOL fInherit,
2815 DWORD dwDesiredAccess)
2816{
2817 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2818 dwFlags,
2819 fInherit,
2820 dwDesiredAccess));
2821
2822 return (NULL);
2823}
2824/*****************************************************************************
2825 * Name : HWINSTA WIN32API OpenWindowStationA
2826 * Purpose : The OpenWindowStation function returns a handle to an existing
2827 * window station.
2828 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2829 * BOOL fInherit specifies whether returned handle is inheritable
2830 * DWORD dwDesiredAccess specifies access of returned handle
2831 * Variables :
2832 * Result : If the function succeeds, the return value is the handle to the
2833 * specified window station.
2834 * If the function fails, the return value is NULL. To get extended
2835 * error information, call GetLastError.
2836 * Remark :
2837 * Status : UNTESTED STUB
2838 *
2839 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2840 *****************************************************************************/
2841HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2842 BOOL fInherit,
2843 DWORD dwDesiredAccess)
2844{
2845 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2846 lpszWinStaName,
2847 fInherit,
2848 dwDesiredAccess));
2849
2850 return (NULL);
2851}
2852/*****************************************************************************
2853 * Name : HWINSTA WIN32API OpenWindowStationW
2854 * Purpose : The OpenWindowStation function returns a handle to an existing
2855 * window station.
2856 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2857 * BOOL fInherit specifies whether returned handle is inheritable
2858 * DWORD dwDesiredAccess specifies access of returned handle
2859 * Variables :
2860 * Result : If the function succeeds, the return value is the handle to the
2861 * specified window station.
2862 * If the function fails, the return value is NULL. To get extended
2863 * error information, call GetLastError.
2864
2865
2866 * Remark :
2867 * Status : UNTESTED STUB
2868 *
2869 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2870 *****************************************************************************/
2871HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2872 BOOL fInherit,
2873 DWORD dwDesiredAccess)
2874{
2875 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2876 lpszWinStaName,
2877 fInherit,
2878 dwDesiredAccess));
2879
2880 return (NULL);
2881}
2882/*****************************************************************************
2883 * Name : BOOL WIN32API SetProcessWindowStation
2884 * Purpose : The SetProcessWindowStation function assigns a window station
2885 * to the calling process. This enables the process to access
2886 * objects in the window station such as desktops, the clipboard,
2887 * and global atoms. All subsequent operations on the window station
2888 * use the access rights granted to hWinSta.
2889 * Parameters:
2890 * Variables :
2891 * Result : If the function succeeds, the return value is TRUE.
2892 * If the function fails, the return value is FALSE. To get extended
2893 * error information, call GetLastError.
2894 * Remark :
2895 * Status : UNTESTED STUB
2896 *
2897 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2898 *****************************************************************************/
2899BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2900{
2901 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2902 hWinSta));
2903
2904 return (FALSE);
2905}
2906/*****************************************************************************
2907 * Name : BOOL WIN32API SetThreadDesktop
2908 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2909 * thread. All subsequent operations on the desktop use the access
2910 * rights granted to hDesk.
2911 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
2912 * Variables :
2913 * Result : If the function succeeds, the return value is TRUE.
2914 * If the function fails, the return value is FALSE. To get extended
2915 * error information, call GetLastError.
2916 * Remark :
2917 * Status : UNTESTED STUB
2918 *
2919 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2920 *****************************************************************************/
2921BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
2922{
2923 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
2924 hDesktop));
2925
2926 return (FALSE);
2927}
2928/*****************************************************************************
2929 * Name : BOOL WIN32API SetUserObjectInformationA
2930 * Purpose : The SetUserObjectInformation function sets information about a
2931 * window station or desktop object.
2932 * Parameters: HANDLE hObject handle of the object for which to set information
2933 * int nIndex type of information to set
2934 * PVOID lpvInfo points to a buffer that contains the information
2935 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2936 * Variables :
2937 * Result : If the function succeeds, the return value is TRUE.
2938 * If the function fails the return value is FALSE. To get extended
2939 * error information, call GetLastError.
2940 * Remark :
2941 * Status : UNTESTED STUB
2942 *
2943 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2944 *****************************************************************************/
2945BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
2946 int nIndex,
2947 PVOID lpvInfo,
2948 DWORD cbInfo)
2949{
2950 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
2951 hObject,
2952 nIndex,
2953 lpvInfo,
2954 cbInfo));
2955
2956 return (FALSE);
2957}
2958/*****************************************************************************
2959 * Name : BOOL WIN32API SetUserObjectInformationW
2960 * Purpose : The SetUserObjectInformation function sets information about a
2961 * window station or desktop object.
2962 * Parameters: HANDLE hObject handle of the object for which to set information
2963 * int nIndex type of information to set
2964 * PVOID lpvInfo points to a buffer that contains the information
2965 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2966 * Variables :
2967 * Result : If the function succeeds, the return value is TRUE.
2968 * If the function fails the return value is FALSE. To get extended
2969 * error information, call GetLastError.
2970 * Remark :
2971 * Status : UNTESTED STUB
2972 *
2973 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2974 *****************************************************************************/
2975BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
2976 int nIndex,
2977 PVOID lpvInfo,
2978 DWORD cbInfo)
2979{
2980 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
2981 hObject,
2982 nIndex,
2983 lpvInfo,
2984 cbInfo));
2985
2986 return (FALSE);
2987}
2988/*****************************************************************************
2989 * Name : BOOL WIN32API SetUserObjectSecurity
2990 * Purpose : The SetUserObjectSecurity function sets the security of a user
2991 * object. This can be, for example, a window or a DDE conversation
2992 * Parameters: HANDLE hObject handle of user object
2993 * SECURITY_INFORMATION * psi address of security information
2994 * LPSECURITY_DESCRIPTOR psd address of security descriptor
2995 * Variables :
2996 * Result : If the function succeeds, the return value is TRUE.
2997 * If the function fails, the return value is FALSE. To get extended
2998 * error information, call GetLastError.
2999 * Remark :
3000 * Status : UNTESTED STUB
3001 *
3002 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3003 *****************************************************************************/
3004BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
3005 SECURITY_INFORMATION * psi,
3006 LPSECURITY_DESCRIPTOR psd)
3007{
3008 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
3009 hObject,
3010 psi,
3011 psd));
3012
3013 return (FALSE);
3014}
3015/*****************************************************************************
3016 * Name : BOOL WIN32API SwitchDesktop
3017 * Purpose : The SwitchDesktop function makes a desktop visible and activates
3018 * it. This enables the desktop to receive input from the user. The
3019 * calling process must have DESKTOP_SWITCHDESKTOP access to the
3020 * desktop for the SwitchDesktop function to succeed.
3021 * Parameters:
3022 * Variables :
3023 * Result : If the function succeeds, the return value is TRUE.
3024 * If the function fails, the return value is FALSE. To get extended
3025 * error information, call GetLastError.
3026 * Remark :
3027 * Status : UNTESTED STUB
3028 *
3029 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3030 *****************************************************************************/
3031BOOL WIN32API SwitchDesktop(HDESK hDesktop)
3032{
3033 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
3034 hDesktop));
3035
3036 return (FALSE);
3037}
3038
3039/* Debugging Functions */
3040
3041/*****************************************************************************
3042 * Name : VOID WIN32API SetDebugErrorLevel
3043 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
3044 * which Windows will generate debugging events and pass them to a debugger.
3045 * Parameters: DWORD dwLevel debugging error level
3046 * Variables :
3047 * Result :
3048 * Remark :
3049 * Status : UNTESTED STUB
3050 *
3051 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3052 *****************************************************************************/
3053VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
3054{
3055 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
3056 dwLevel));
3057}
3058
3059/* Hook Functions */
3060
3061/*****************************************************************************
3062 * Name : BOOL WIN32API SetWindowsHookW
3063 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
3064 * Win32-based applications should use the SetWindowsHookEx function.
3065 * Parameters:
3066 * Variables :
3067 * Result :
3068 * Remark : ARGH ! MICROSOFT !
3069 * Status : UNTESTED STUB
3070 *
3071 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3072 *****************************************************************************/
3073HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
3074
3075{
3076 return (FALSE);
3077}
3078
3079/* CB: move to ShowWindow() */
3080
3081/*****************************************************************************
3082 * Name : BOOL WIN32API ShowWindowAsync
3083 * Purpose : The ShowWindowAsync function sets the show state of a window
3084 * created by a different thread.
3085 * Parameters: HWND hwnd handle of window
3086 * int nCmdShow show state of window
3087 * Variables :
3088 * Result : If the window was previously visible, the return value is TRUE.
3089 * If the window was previously hidden, the return value is FALSE.
3090 * Remark :
3091 * Status : UNTESTED STUB
3092 *
3093 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3094 *****************************************************************************/
3095BOOL WIN32API ShowWindowAsync (HWND hWnd,
3096 int nCmdShow)
3097{
3098 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
3099 hWnd,
3100 nCmdShow));
3101
3102 return (FALSE);
3103}
3104
3105/* CB: move to MDI */
3106
3107/*****************************************************************************
3108 * Name : WORD WIN32API TileWindows
3109 * Purpose : The TileWindows function tiles the specified windows, or the child
3110 * windows of the specified parent window.
3111 * Parameters: HWND hwndParent handle of parent window
3112 * WORD wFlags types of windows not to arrange
3113 * LPCRECT lpRect rectangle to arrange windows in
3114 * WORD cChildrenb number of windows to arrange
3115 * const HWND *ahwndChildren array of window handles
3116 * Variables :
3117 * Result : If the function succeeds, the return value is the number of
3118 * windows arranged.
3119 * If the function fails, the return value is zero.
3120 * Remark :
3121 * Status : UNTESTED STUB
3122 *
3123 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3124 *****************************************************************************/
3125WORD WIN32API TileWindows(HWND hwndParent,
3126 UINT wFlags,
3127 const LPRECT lpRect,
3128 UINT cChildrenb,
3129 const HWND *ahwndChildren)
3130{
3131 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3132 hwndParent,
3133 wFlags,
3134 lpRect,
3135 cChildrenb,
3136 ahwndChildren));
3137
3138 return (0);
3139}
3140/*****************************************************************************
3141 * Name : BOOL WIN32API TileChildWindows
3142 * Purpose : Unknown
3143 * Parameters: Unknown
3144 * Variables :
3145 * Result :
3146 * Remark :
3147 * Status : UNTESTED UNKNOWN STUB
3148 *
3149 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3150 *****************************************************************************/
3151BOOL WIN32API TileChildWindows(DWORD x1,
3152 DWORD x2)
3153{
3154 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
3155 x1,
3156 x2));
3157
3158 return (FALSE); /* default */
3159}
3160/*****************************************************************************
3161 * Name : BOOL WIN32API CascadeChildWindows
3162 * Purpose : Unknown
3163 * Parameters: Unknown
3164 * Variables :
3165 * Result :
3166 * Remark :
3167 * Status : UNTESTED UNKNOWN STUB
3168 *
3169 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3170 *****************************************************************************/
3171BOOL WIN32API CascadeChildWindows(DWORD x1,
3172 DWORD x2)
3173{
3174 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
3175 x1,
3176 x2));
3177
3178 return (FALSE); /* default */
3179}
3180
3181/* Drag'n'drop */
3182
3183/*****************************************************************************
3184 * Name : BOOL WIN32API DragObject
3185 * Purpose : Unknown
3186 * Parameters: Unknown
3187 * Variables :
3188 * Result :
3189 * Remark :
3190 * Status : UNTESTED UNKNOWN STUB
3191 *
3192 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3193 *****************************************************************************/
3194DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
3195{
3196 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3197 x1,
3198 x2,
3199 x3,
3200 x4,
3201 x5));
3202
3203 return (FALSE); /* default */
3204}
3205
3206/* Unknown */
3207
3208/*****************************************************************************
3209 * Name : BOOL WIN32API SetShellWindow
3210 * Purpose : Unknown
3211 * Parameters: Unknown
3212 * Variables :
3213 * Result :
3214 * Remark :
3215 * Status : UNTESTED UNKNOWN STUB
3216 *
3217 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3218 *****************************************************************************/
3219BOOL WIN32API SetShellWindow(DWORD x1)
3220{
3221 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
3222 x1));
3223
3224 return (FALSE); /* default */
3225}
3226/*****************************************************************************
3227 * Name : BOOL WIN32API PlaySoundEvent
3228 * Purpose : Unknown
3229 * Parameters: Unknown
3230 * Variables :
3231 * Result :
3232 * Remark :
3233 * Status : UNTESTED UNKNOWN STUB
3234 *
3235 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3236 *****************************************************************************/
3237BOOL WIN32API PlaySoundEvent(DWORD x1)
3238{
3239 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
3240 x1));
3241
3242 return (FALSE); /* default */
3243}
3244/*****************************************************************************
3245 * Name : BOOL WIN32API SetSysColorsTemp
3246 * Purpose : Unknown
3247 * Parameters: Unknown
3248 * Variables :
3249 * Result :
3250 * Remark :
3251 * Status : UNTESTED UNKNOWN STUB
3252 *
3253 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3254 *****************************************************************************/
3255BOOL WIN32API SetSysColorsTemp(void)
3256{
3257 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
3258
3259 return (FALSE); /* default */
3260}
3261/*****************************************************************************
3262 * Name : BOOL WIN32API RegisterNetworkCapabilities
3263 * Purpose : Unknown
3264 * Parameters: Unknown
3265 * Variables :
3266 * Result :
3267 * Remark :
3268 * Status : UNTESTED UNKNOWN STUB
3269 *
3270 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3271 *****************************************************************************/
3272BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
3273 DWORD x2)
3274{
3275 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
3276 x1,
3277 x2));
3278
3279 return (FALSE); /* default */
3280}
3281/*****************************************************************************
3282 * Name : BOOL WIN32API EndTask
3283 * Purpose : Unknown
3284 * Parameters: Unknown
3285 * Variables :
3286 * Result :
3287 * Remark :
3288 * Status : UNTESTED UNKNOWN STUB
3289 *
3290 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3291 *****************************************************************************/
3292BOOL WIN32API EndTask(DWORD x1,
3293 DWORD x2,
3294 DWORD x3)
3295{
3296 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
3297 x1,
3298 x2,
3299 x3));
3300
3301 return (FALSE); /* default */
3302}
3303/*****************************************************************************
3304 * Name : BOOL WIN32API GetNextQueueWindow
3305 * Purpose : Unknown
3306 * Parameters: Unknown
3307 * Variables :
3308 * Result :
3309 * Remark :
3310 * Status : UNTESTED UNKNOWN STUB
3311 *
3312 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3313 *****************************************************************************/
3314BOOL WIN32API GetNextQueueWindow(DWORD x1,
3315 DWORD x2)
3316{
3317 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
3318 x1,
3319 x2));
3320
3321 return (FALSE); /* default */
3322}
3323/*****************************************************************************
3324 * Name : BOOL WIN32API YieldTask
3325 * Purpose : Unknown
3326 * Parameters: Unknown
3327 * Variables :
3328 * Result :
3329 * Remark :
3330 * Status : UNTESTED UNKNOWN STUB
3331 *
3332 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3333 *****************************************************************************/
3334BOOL WIN32API YieldTask(void)
3335{
3336 dprintf(("USER32: YieldTask() not implemented.\n"));
3337
3338 return (FALSE); /* default */
3339}
3340/*****************************************************************************
3341 * Name : BOOL WIN32API WinOldAppHackoMatic
3342 * Purpose : Unknown
3343 * Parameters: Unknown
3344 * Variables :
3345 * Result :
3346 * Remark :
3347 * Status : UNTESTED UNKNOWN STUB
3348 *
3349 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3350 *****************************************************************************/
3351BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
3352{
3353 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
3354 x1));
3355
3356 return (FALSE); /* default */
3357}
3358/*****************************************************************************
3359 * Name : BOOL WIN32API RegisterSystemThread
3360 * Purpose : Unknown
3361 * Parameters: Unknown
3362 * Variables :
3363 * Result :
3364 * Remark :
3365 * Status : UNTESTED UNKNOWN STUB
3366 *
3367 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3368 *****************************************************************************/
3369BOOL WIN32API RegisterSystemThread(DWORD x1,
3370 DWORD x2)
3371{
3372 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
3373 x1,
3374 x2));
3375
3376 return (FALSE); /* default */
3377}
3378/*****************************************************************************
3379 * Name : BOOL WIN32API IsHungThread
3380 * Purpose : Unknown
3381 * Parameters: Unknown
3382 * Variables :
3383 * Result :
3384 * Remark :
3385 * Status : UNTESTED UNKNOWN STUB
3386 *
3387 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3388 *****************************************************************************/
3389BOOL WIN32API IsHungThread(DWORD x1)
3390{
3391 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
3392 x1));
3393
3394 return (FALSE); /* default */
3395}
3396/*****************************************************************************
3397 * Name : BOOL WIN32API UserSignalProc
3398 * Purpose : Unknown
3399 * Parameters: Unknown
3400 * Variables :
3401 * Result :
3402 * Remark :
3403 * Status : UNTESTED UNKNOWN STUB
3404 *
3405 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3406 *****************************************************************************/
3407BOOL WIN32API UserSignalProc(DWORD x1,
3408 DWORD x2,
3409 DWORD x3,
3410 DWORD x4)
3411{
3412 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3413 x1,
3414 x2,
3415 x3,
3416 x4));
3417
3418 return (FALSE); /* default */
3419}
3420/*****************************************************************************
3421 * Name : BOOL WIN32API GetShellWindow
3422 * Purpose : Unknown
3423 * Parameters: Unknown
3424 * Variables :
3425 * Result :
3426 * Remark :
3427 * Status : UNTESTED UNKNOWN STUB
3428 *
3429 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3430 *****************************************************************************/
3431HWND WIN32API GetShellWindow(void)
3432{
3433 dprintf(("USER32: GetShellWindow() not implemented.\n"));
3434
3435 return (0); /* default */
3436}
3437/***********************************************************************
3438 * RegisterTasklist32 [USER32.436]
3439 */
3440DWORD WIN32API RegisterTasklist (DWORD x)
3441{
3442 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
3443 x));
3444
3445 return TRUE;
3446}
3447
3448
Note: See TracBrowser for help on using the repository browser.