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

Last change on this file since 2521 was 2521, checked in by cbratschi, 26 years ago

refixed WM_WINDOWPOS*

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