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

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

Message handling rewrite

File size: 102.3 KB
Line 
1/* $Id: user32.cpp,v 1.63 1999-12-24 18:39:11 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 * Copyright 1999 Daniela Engert (dani@ngrt.de)
11 *
12 *
13 * Project Odin Software License can be found in LICENSE.TXT
14 *
15 */
16/*****************************************************************************
17 * Name : USER32.CPP
18 * Purpose : This module maps all Win32 functions contained in USER32.DLL
19 * to their OS/2-specific counterparts as far as possible.
20 *****************************************************************************/
21
22//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 rc = 1;
706 break;
707
708 case SM_CYBORDER:
709 rc = 1;
710 break;
711
712//CB: todo: add missing metrics
713
714 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
715 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXICON);
716 //CB: return standard windows icon size?
717 //rc = 32;
718 break;
719 case SM_CYICONSPACING:
720 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYICON);
721 //read SM_CXICONSPACING comment
722 //rc = 32;
723 break;
724 case SM_PENWINDOWS:
725 rc = FALSE;
726 break;
727 case SM_DBCSENABLED:
728 rc = FALSE;
729 break;
730 case SM_CXEDGE: //size of 3D window edge
731 rc = 1;
732 break;
733 case SM_CYEDGE:
734 rc = 1;
735 break;
736 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
737 //CB: replace with const
738 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
739 break;
740 case SM_CYMINSPACING:
741 //CB: replace with const
742 rc = GetSystemMetrics(SM_CYMINIMIZED);
743 break;
744 case SM_CXICON:
745 case SM_CYICON:
746 rc = 32; //CB: Win32: only 32x32, OS/2 32x32/40x40
747 // we must implement 32x32 for all screen resolutions
748 break;
749 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
750 rc = 16;
751 break;
752 case SM_CYSMICON:
753 rc = 16;
754 break;
755 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
756 rc = 8;
757 break;
758 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
759 rc = 16;
760 break;
761 case SM_CYSMSIZE:
762 rc = 16;
763 break;
764 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
765 rc = 16;
766 break;
767 case SM_CYMENUSIZE:
768 rc = 16;
769 break;
770 case SM_ARRANGE:
771 rc = ARW_BOTTOMLEFT | ARW_LEFT;
772 break;
773 case SM_CXMINIMIZED:
774 break;
775 case SM_CYMINIMIZED:
776 break;
777 case SM_CXMAXTRACK: //max window size
778 case SM_CXMAXIMIZED: //max toplevel window size
779 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
780 break;
781 case SM_CYMAXTRACK:
782 case SM_CYMAXIMIZED:
783 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
784 break;
785 case SM_NETWORK:
786 rc = 0x01; //TODO: default = yes
787 break;
788 case SM_CLEANBOOT:
789 rc = 0; //normal boot
790 break;
791 case SM_CXDRAG: //nr of pixels before drag becomes a real one
792 rc = 2;
793 break;
794 case SM_CYDRAG:
795 rc = 2;
796 break;
797 case SM_SHOWSOUNDS: //show instead of play sound
798 rc = FALSE;
799 break;
800 case SM_CXMENUCHECK:
801 rc = 4; //TODO
802 break;
803 case SM_CYMENUCHECK:
804 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYMENU);
805 break;
806 case SM_SLOWMACHINE:
807 rc = FALSE; //even a slow machine is fast with OS/2 :)
808 break;
809 case SM_MIDEASTENABLED:
810 rc = FALSE;
811 break;
812 case SM_MOUSEWHEELPRESENT:
813 rc = FALSE;
814 break;
815 case SM_XVIRTUALSCREEN:
816 rc = 0;
817 break;
818 case SM_YVIRTUALSCREEN:
819 rc = 0;
820 break;
821
822 case SM_CXVIRTUALSCREEN:
823 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
824 break;
825 case SM_CYVIRTUALSCREEN:
826 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
827 break;
828 case SM_CMONITORS:
829 rc = 1;
830 break;
831 case SM_SAMEDISPLAYFORMAT:
832 rc = TRUE;
833 break;
834 case SM_CMETRICS:
835 rc = 81;
836 //rc = O32_GetSystemMetrics(44); //Open32 changed this one
837 break;
838 default:
839 //better than nothing
840 rc = O32_GetSystemMetrics(nIndex);
841 break;
842 }
843 dprintf(("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc));
844 return(rc);
845}
846//******************************************************************************
847/* Not support by Open32 (not included are the new win9x parameters):
848 case SPI_GETFASTTASKSWITCH:
849 case SPI_GETGRIDGRANULARITY:
850 case SPI_GETICONTITLELOGFONT:
851 case SPI_GETICONTITLEWRAP:
852 case SPI_GETMENUDROPALIGNMENT:
853 case SPI_ICONHORIZONTALSPACING:
854 case SPI_ICONVERTICALSPACING:
855 case SPI_LANGDRIVER:
856 case SPI_SETFASTTASKSWITCH:
857 case SPI_SETGRIDGRANULARITY:
858 case SPI_SETICONTITLELOGFONT:
859 case SPI_SETICONTITLEWRAP:
860 case SPI_SETMENUDROPALIGNMENT:
861 case SPI_GETSCREENSAVEACTIVE:
862 case SPI_GETSCREENSAVETIMEOUT:
863 case SPI_SETDESKPATTERN:
864 case SPI_SETDESKWALLPAPER:
865 case SPI_SETSCREENSAVEACTIVE:
866 case SPI_SETSCREENSAVETIMEOUT:
867*/
868//******************************************************************************
869BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
870{
871 BOOL rc = TRUE;
872 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
873
874 switch(uiAction) {
875 case SPI_SCREENSAVERRUNNING:
876 *(BOOL *)pvParam = FALSE;
877 break;
878 case SPI_GETDRAGFULLWINDOWS:
879 *(BOOL *)pvParam = FALSE; //CB: where is the Warp 4 setting stored?
880 break;
881 case SPI_GETNONCLIENTMETRICS:
882 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
883 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
884
885 //CB: fonts not handled by Open32, set to WarpSans
886 lstrcpyA(cmetric->lfCaptionFont.lfFaceName,"WarpSans");
887 cmetric->lfCaptionFont.lfHeight = 9;
888
889 lstrcpyA(cmetric->lfMenuFont.lfFaceName,"WarpSans");
890 cmetric->lfMenuFont.lfHeight = 9;
891
892 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
893 cmetric->lfStatusFont.lfHeight = 9;
894
895 lstrcpyA(cmetric->lfMessageFont.lfFaceName,"WarpSans");
896 cmetric->lfMessageFont.lfHeight = 9;
897
898 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
899 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
900 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
901 cmetric->iCaptionWidth = 32; //TODO
902 cmetric->iCaptionHeight = 16; //TODO
903 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
904 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
905 cmetric->iMenuWidth = 32; //TODO
906 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
907 break;
908 case SPI_GETICONTITLELOGFONT:
909 {
910 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
911
912 /* from now on we always have an alias for MS Sans Serif */
913 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
914 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
915 lpLogFont->lfWidth = 0;
916 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
917 lpLogFont->lfWeight = FW_NORMAL;
918 lpLogFont->lfItalic = FALSE;
919 lpLogFont->lfStrikeOut = FALSE;
920 lpLogFont->lfUnderline = FALSE;
921 lpLogFont->lfCharSet = ANSI_CHARSET;
922 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
923 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
924 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
925 break;
926 }
927 case SPI_GETBORDER:
928 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
929 break;
930
931 case SPI_GETWORKAREA:
932 SetRect( (RECT *)pvParam, 0, 0,
933 GetSystemMetrics( SM_CXSCREEN ),
934 GetSystemMetrics( SM_CYSCREEN )
935 );
936 break;
937
938 case 104: //TODO: Undocumented
939 rc = 16;
940 break;
941 default:
942 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
943 break;
944 }
945 dprintf(("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc));
946 return(rc);
947}
948//******************************************************************************
949//TODO: Check for more options that have different structs for Unicode!!!!
950//******************************************************************************
951BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
952{
953 BOOL rc;
954 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
955 NONCLIENTMETRICSA clientMetricsA = {0};
956 PVOID pvParamA;
957 UINT uiParamA;
958
959 switch(uiAction) {
960 case SPI_SETNONCLIENTMETRICS:
961 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
962 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
963 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
964 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
965 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
966 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
967 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
968 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
969 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
970 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
971 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
972 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
973 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
974 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
975 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
976 //no break
977 case SPI_GETNONCLIENTMETRICS:
978 uiParamA = sizeof(NONCLIENTMETRICSA);
979 pvParamA = &clientMetricsA;
980 break;
981 case SPI_GETICONTITLELOGFONT:
982 {
983 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
984
985 /* from now on we always have an alias for MS Sans Serif */
986 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
987 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
988 lpLogFont->lfWidth = 0;
989 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
990 lpLogFont->lfWeight = FW_NORMAL;
991 lpLogFont->lfItalic = FALSE;
992 lpLogFont->lfStrikeOut = FALSE;
993 lpLogFont->lfUnderline = FALSE;
994 lpLogFont->lfCharSet = ANSI_CHARSET;
995 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
996 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
997 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
998 return TRUE;
999 }
1000 default:
1001 pvParamA = pvParam;
1002 uiParamA = uiParam;
1003 break;
1004 }
1005 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1006
1007 switch(uiAction) {
1008 case SPI_GETNONCLIENTMETRICS:
1009 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1010 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1011 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1012 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1013 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1014 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1015 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1016
1017 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1018 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1019 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1020
1021 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1022 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1023 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1024 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1025 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1026 break;
1027 }
1028#ifdef DEBUG
1029 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
1030#endif
1031 return(rc);
1032}
1033
1034/* Process and Thread Functions */
1035
1036//******************************************************************************
1037//DWORD idAttach; /* thread to attach */
1038//DWORD idAttachTo; /* thread to attach to */
1039//BOOL fAttach; /* attach or detach */
1040//******************************************************************************
1041BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1042{
1043#ifdef DEBUG
1044 WriteLog("USER32: AttachThreadInput, not implemented\n");
1045#endif
1046 return(TRUE);
1047}
1048//******************************************************************************
1049//TODO:How can we emulate this one in OS/2???
1050//******************************************************************************
1051DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
1052{
1053#ifdef DEBUG
1054 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
1055#endif
1056
1057 if(dwTimeOut == INFINITE) return(0);
1058
1059// DosSleep(dwTimeOut/16);
1060 return(0);
1061}
1062
1063/* Help Functions */
1064
1065BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
1066{
1067#ifdef DEBUG
1068 WriteLog("USER32: WinHelp not implemented %s\n", lpszHelp);
1069#endif
1070// hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1071// return O32_WinHelp(arg1, arg2, arg3, arg4);
1072
1073 return(TRUE);
1074}
1075//******************************************************************************
1076//******************************************************************************
1077BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
1078{
1079 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1080 BOOL rc;
1081
1082#ifdef DEBUG
1083 WriteLog("USER32: WinHelpW\n");
1084#endif
1085 rc = WinHelpA(arg1, astring, arg3, arg4);
1086 FreeAsciiString(astring);
1087 return rc;
1088}
1089
1090/* Keyboard and Input Functions */
1091
1092BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1093{
1094#ifdef DEBUG
1095 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
1096#endif
1097 return(TRUE);
1098}
1099//******************************************************************************
1100//SvL: 24-6-'97 - Added
1101//TODO: Not implemented
1102//******************************************************************************
1103WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1104{
1105 dprintf2(("USER32: GetAsyncKeyState Not implemented\n"));
1106 return 0;
1107}
1108/*****************************************************************************
1109 * Name : UINT WIN32API GetKBCodePage
1110 * Purpose : The GetKBCodePage function is provided for compatibility with
1111 * earlier versions of Windows. In the Win32 application programming
1112 * interface (API) it just calls the GetOEMCP function.
1113 * Parameters:
1114 * Variables :
1115 * Result : If the function succeeds, the return value is an OEM code-page
1116 * identifier, or it is the default identifier if the registry
1117 * value is not readable. For a list of OEM code-page identifiers,
1118 * see GetOEMCP.
1119 * Remark :
1120 * Status : UNTESTED
1121 *
1122 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1123 *****************************************************************************/
1124
1125UINT WIN32API GetKBCodePage(VOID)
1126{
1127 return (GetOEMCP());
1128}
1129//******************************************************************************
1130//******************************************************************************
1131int WIN32API GetKeyNameTextA( LPARAM lParam, LPSTR lpString, int nSize)
1132{
1133#ifdef DEBUG
1134 WriteLog("USER32: GetKeyNameTextA\n");
1135#endif
1136 return O32_GetKeyNameText(lParam,lpString,nSize);
1137}
1138//******************************************************************************
1139//******************************************************************************
1140int WIN32API GetKeyNameTextW( LPARAM lParam, LPWSTR lpString, int nSize)
1141{
1142#ifdef DEBUG
1143 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
1144#endif
1145 // NOTE: This will not work as is (needs UNICODE support)
1146 return 0;
1147// return O32_GetKeyNameText(arg1, arg2, arg3);
1148}
1149//******************************************************************************
1150//SvL: 24-6-'97 - Added
1151//******************************************************************************
1152SHORT WIN32API GetKeyState( int nVirtKey)
1153{
1154//SvL: Hehe. 32 MB logfile for Opera after a minute.
1155 dprintf2(("USER32: GetKeyState %d\n", nVirtKey));
1156 return O32_GetKeyState(nVirtKey);
1157}
1158/*****************************************************************************
1159 * Name : VOID WIN32API keybd_event
1160 * Purpose : The keybd_event function synthesizes a keystroke. The system
1161 * can use such a synthesized keystroke to generate a WM_KEYUP or
1162 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
1163 * the keybd_event function.
1164 * Parameters: BYTE bVk virtual-key code
1165
1166 * BYTE bScan hardware scan code
1167 * DWORD dwFlags flags specifying various function options
1168 * DWORD dwExtraInfo additional data associated with keystroke
1169 * Variables :
1170 * Result :
1171 * Remark :
1172 * Status : UNTESTED STUB
1173 *
1174 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1175 *****************************************************************************/
1176VOID WIN32API keybd_event (BYTE bVk,
1177 BYTE bScan,
1178 DWORD dwFlags,
1179 DWORD dwExtraInfo)
1180{
1181 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
1182 bVk,
1183 bScan,
1184 dwFlags,
1185 dwExtraInfo));
1186}
1187/*****************************************************************************
1188 * Name : HLK WIN32API LoadKeyboardLayoutA
1189 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1190 * the system. Several keyboard layouts can be loaded at a time, but
1191 * only one per process is active at a time. Loading multiple keyboard
1192 * layouts makes it possible to rapidly switch between layouts.
1193 * Parameters:
1194 * Variables :
1195 * Result : If the function succeeds, the return value is the handle of the
1196 * keyboard layout.
1197 * If the function fails, the return value is NULL. To get extended
1198 * error information, call GetLastError.
1199 * Remark :
1200 * Status : UNTESTED STUB
1201 *
1202 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1203 *****************************************************************************/
1204HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
1205 UINT Flags)
1206{
1207 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
1208 pwszKLID,
1209 Flags));
1210
1211 return (NULL);
1212}
1213/*****************************************************************************
1214 * Name : HLK WIN32API LoadKeyboardLayoutW
1215 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1216 * the system. Several keyboard layouts can be loaded at a time, but
1217 * only one per process is active at a time. Loading multiple keyboard
1218 * layouts makes it possible to rapidly switch between layouts.
1219 * Parameters:
1220 * Variables :
1221 * Result : If the function succeeds, the return value is the handle of the
1222 * keyboard layout.
1223 * If the function fails, the return value is NULL. To get extended
1224 * error information, call GetLastError.
1225 * Remark :
1226 * Status : UNTESTED STUB
1227 *
1228 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1229 *****************************************************************************/
1230HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
1231 UINT Flags)
1232{
1233 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
1234 pwszKLID,
1235 Flags));
1236
1237 return (NULL);
1238}
1239//******************************************************************************
1240//******************************************************************************
1241UINT WIN32API MapVirtualKeyA( UINT uCode, UINT uMapType)
1242{
1243#ifdef DEBUG
1244 WriteLog("USER32: MapVirtualKeyA\n");
1245#endif
1246 return O32_MapVirtualKey(uCode,uMapType);
1247}
1248//******************************************************************************
1249//******************************************************************************
1250UINT WIN32API MapVirtualKeyW( UINT uCode, UINT uMapType)
1251{
1252#ifdef DEBUG
1253 WriteLog("USER32: MapVirtualKeyW\n");
1254#endif
1255 // NOTE: This will not work as is (needs UNICODE support)
1256 return O32_MapVirtualKey(uCode,uMapType);
1257}
1258/*****************************************************************************
1259 * Name : UINT WIN32API MapVirtualKeyExA
1260 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1261 * code into a scan code or character value, or translates a scan
1262 * code into a virtual-key code. The function translates the codes
1263 * using the input language and physical keyboard layout identified
1264 * by the given keyboard layout handle.
1265 * Parameters:
1266 * Variables :
1267 * Result : The return value is either a scan code, a virtual-key code, or
1268 * a character value, depending on the value of uCode and uMapType.
1269 * If there is no translation, the return value is zero.
1270 * Remark :
1271 * Status : UNTESTED STUB
1272 *
1273 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1274 *****************************************************************************/
1275UINT WIN32API MapVirtualKeyExA(UINT uCode,
1276 UINT uMapType,
1277 HKL dwhkl)
1278{
1279 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
1280 uCode,
1281 uMapType,
1282 dwhkl));
1283
1284 return (0);
1285}
1286/*****************************************************************************
1287 * Name : UINT WIN32API MapVirtualKeyExW
1288 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1289 * code into a scan code or character value, or translates a scan
1290 * code into a virtual-key code. The function translates the codes
1291 * using the input language and physical keyboard layout identified
1292 * by the given keyboard layout handle.
1293 * Parameters:
1294 * Variables :
1295 * Result : The return value is either a scan code, a virtual-key code, or
1296 * a character value, depending on the value of uCode and uMapType.
1297 * If there is no translation, the return value is zero.
1298 * Remark :
1299 * Status : UNTESTED STUB
1300
1301 *
1302 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1303 *****************************************************************************/
1304UINT WIN32API MapVirtualKeyExW(UINT uCode,
1305 UINT uMapType,
1306 HKL dwhkl)
1307{
1308 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
1309 uCode,
1310 uMapType,
1311 dwhkl));
1312
1313 return (0);
1314}
1315/*****************************************************************************
1316 * Name : DWORD WIN32API OemKeyScan
1317 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
1318 * into the OEM scan codes and shift states. The function provides
1319 * information that allows a program to send OEM text to another
1320 * program by simulating keyboard input.
1321 * Parameters:
1322 * Variables :
1323 * Result :
1324 * Remark :
1325 * Status : UNTESTED STUB
1326 *
1327 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1328 *****************************************************************************/
1329DWORD WIN32API OemKeyScan(WORD wOemChar)
1330{
1331 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
1332 wOemChar));
1333
1334 return (wOemChar);
1335}
1336//******************************************************************************
1337//******************************************************************************
1338BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1339{
1340#ifdef DEBUG
1341 WriteLog("USER32: RegisterHotKey, not implemented\n");
1342#endif
1343 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1344 return(TRUE);
1345}
1346/*****************************************************************************
1347 * Name : int WIN32API ToAscii
1348 * Purpose : The ToAscii function translates the specified virtual-key code
1349 * and keyboard state to the corresponding Windows character or characters.
1350 * Parameters: UINT uVirtKey virtual-key code
1351 * UINT uScanCode scan code
1352 * PBYTE lpbKeyState address of key-state array
1353 * LPWORD lpwTransKey buffer for translated key
1354 * UINT fuState active-menu flag
1355 * Variables :
1356 * Result : 0 The specified virtual key has no translation for the current
1357 * state of the keyboard.
1358 * 1 One Windows character was copied to the buffer.
1359 * 2 Two characters were copied to the buffer. This usually happens
1360 * when a dead-key character (accent or diacritic) stored in the
1361 * keyboard layout cannot be composed with the specified virtual
1362 * key to form a single character.
1363 * Remark :
1364 * Status : UNTESTED STUB
1365 *
1366 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1367 *****************************************************************************/
1368int WIN32API ToAscii(UINT uVirtKey,
1369 UINT uScanCode,
1370 PBYTE lpbKeyState,
1371 LPWORD lpwTransKey,
1372 UINT fuState)
1373{
1374 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
1375 uVirtKey,
1376 uScanCode,
1377 lpbKeyState,
1378 lpwTransKey,
1379 fuState));
1380
1381 return (0);
1382}
1383/*****************************************************************************
1384 * Name : int WIN32API ToAsciiEx
1385 * Purpose : The ToAscii function translates the specified virtual-key code
1386 * and keyboard state to the corresponding Windows character or characters.
1387 * Parameters: UINT uVirtKey virtual-key code
1388 * UINT uScanCode scan code
1389 * PBYTE lpbKeyState address of key-state array
1390 * LPWORD lpwTransKey buffer for translated key
1391 * UINT fuState active-menu flag
1392 * HLK hlk keyboard layout handle
1393 * Variables :
1394 * Result : 0 The specified virtual key has no translation for the current
1395 * state of the keyboard.
1396 * 1 One Windows character was copied to the buffer.
1397 * 2 Two characters were copied to the buffer. This usually happens
1398 * when a dead-key character (accent or diacritic) stored in the
1399 * keyboard layout cannot be composed with the specified virtual
1400 * key to form a single character.
1401 * Remark :
1402 * Status : UNTESTED STUB
1403 *
1404 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1405 *****************************************************************************/
1406int WIN32API ToAsciiEx(UINT uVirtKey,
1407 UINT uScanCode,
1408 PBYTE lpbKeyState,
1409 LPWORD lpwTransKey,
1410 UINT fuState,
1411 HKL hkl)
1412{
1413 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1414 uVirtKey,
1415 uScanCode,
1416 lpbKeyState,
1417 lpwTransKey,
1418 fuState,
1419 hkl));
1420
1421 return (0);
1422}
1423/*****************************************************************************
1424 * Name : int WIN32API ToUnicode
1425 * Purpose : The ToUnicode function translates the specified virtual-key code
1426 * and keyboard state to the corresponding Unicode character or characters.
1427 * Parameters: UINT wVirtKey virtual-key code
1428 * UINT wScanCode scan code
1429 * PBYTE lpKeyState address of key-state array
1430 * LPWSTR pwszBuff buffer for translated key
1431 * int cchBuff size of translated key buffer
1432 * UINT wFlags set of function-conditioning flags
1433 * Variables :
1434 * Result : - 1 The specified virtual key is a dead-key character (accent or
1435 * diacritic). This value is returned regardless of the keyboard
1436 * layout, even if several characters have been typed and are
1437 * stored in the keyboard state. If possible, even with Unicode
1438 * keyboard layouts, the function has written a spacing version of
1439 * the dead-key character to the buffer specified by pwszBuffer.
1440 * For example, the function writes the character SPACING ACUTE
1441 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
1442 * 0 The specified virtual key has no translation for the current
1443 * state of the keyboard. Nothing was written to the buffer
1444 * specified by pwszBuffer.
1445 * 1 One character was written to the buffer specified by pwszBuffer.
1446 * 2 or more Two or more characters were written to the buffer specified by
1447 * pwszBuff. The most common cause for this is that a dead-key
1448 * character (accent or diacritic) stored in the keyboard layout
1449 * could not be combined with the specified virtual key to form a
1450 * single character.
1451 * Remark :
1452 * Status : UNTESTED STUB
1453 *
1454 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1455 *****************************************************************************/
1456int WIN32API ToUnicode(UINT uVirtKey,
1457 UINT uScanCode,
1458 PBYTE lpKeyState,
1459 LPWSTR pwszBuff,
1460 int cchBuff,
1461 UINT wFlags)
1462{
1463 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1464 uVirtKey,
1465 uScanCode,
1466 lpKeyState,
1467 pwszBuff,
1468 cchBuff,
1469 wFlags));
1470
1471 return (0);
1472}
1473/*****************************************************************************
1474 * Name : BOOL WIN32API UnloadKeyboardLayout
1475 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
1476 * Parameters: HKL hkl handle of keyboard layout
1477 * Variables :
1478 * Result : If the function succeeds, the return value is the handle of the
1479 * keyboard layout; otherwise, it is NULL. To get extended error
1480 * information, use the GetLastError function.
1481 * Remark :
1482 * Status : UNTESTED STUB
1483 *
1484 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1485 *****************************************************************************/
1486BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
1487{
1488 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
1489 hkl));
1490
1491 return (0);
1492}
1493//******************************************************************************
1494//******************************************************************************
1495BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1496{
1497#ifdef DEBUG
1498 WriteLog("USER32: UnregisterHotKey, not implemented\n");
1499#endif
1500 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1501
1502 return(TRUE);
1503}
1504//******************************************************************************
1505//SvL: 24-6-'97 - Added
1506//******************************************************************************
1507WORD WIN32API VkKeyScanA( char ch)
1508{
1509#ifdef DEBUG
1510 WriteLog("USER32: VkKeyScanA\n");
1511#endif
1512 return O32_VkKeyScan(ch);
1513}
1514//******************************************************************************
1515//******************************************************************************
1516WORD WIN32API VkKeyScanW( WCHAR wch)
1517{
1518#ifdef DEBUG
1519 WriteLog("USER32: VkKeyScanW\n");
1520#endif
1521 // NOTE: This will not work as is (needs UNICODE support)
1522 return O32_VkKeyScan((char)wch);
1523}
1524/*****************************************************************************
1525 * Name : SHORT WIN32API VkKeyScanExW
1526 * Purpose : The VkKeyScanEx function translates a character to the
1527 * corresponding virtual-key code and shift state. The function
1528 * translates the character using the input language and physical
1529 * keyboard layout identified by the given keyboard layout handle.
1530 * Parameters: UINT uChar character to translate
1531 * HKL hkl keyboard layout handle
1532 * Variables :
1533 * Result : see docs
1534 * Remark :
1535 * Status : UNTESTED STUB
1536 *
1537 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1538 *****************************************************************************/
1539WORD WIN32API VkKeyScanExW(WCHAR uChar,
1540 HKL hkl)
1541{
1542 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
1543 uChar,
1544 hkl));
1545
1546 return (uChar);
1547}
1548/*****************************************************************************
1549 * Name : SHORT WIN32API VkKeyScanExA
1550 * Purpose : The VkKeyScanEx function translates a character to the
1551 * corresponding virtual-key code and shift state. The function
1552 * translates the character using the input language and physical
1553 * keyboard layout identified by the given keyboard layout handle.
1554 * Parameters: UINT uChar character to translate
1555 * HKL hkl keyboard layout handle
1556 * Variables :
1557 * Result : see docs
1558 * Remark :
1559 * Status : UNTESTED STUB
1560 *
1561 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1562 *****************************************************************************/
1563WORD WIN32API VkKeyScanExA(CHAR uChar,
1564 HKL hkl)
1565{
1566 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
1567 uChar,
1568 hkl));
1569
1570 return (uChar);
1571}
1572
1573/* Button Functions */
1574
1575BOOL WIN32API CheckRadioButton( HWND hDlg, UINT nIDFirstButton, UINT nIDLastButton, UINT nIDCheckButton)
1576{
1577#ifdef DEBUG
1578 WriteLog("USER32: CheckRadioButton\n");
1579#endif
1580 //CB: check radio buttons in interval
1581 if (nIDFirstButton > nIDLastButton)
1582 {
1583 SetLastError(ERROR_INVALID_PARAMETER);
1584 return (FALSE);
1585 }
1586
1587 for (UINT x = nIDFirstButton;x <= nIDLastButton;x++)
1588 {
1589 SendDlgItemMessageA(hDlg,x,BM_SETCHECK,(x == nIDCheckButton) ? BST_CHECKED : BST_UNCHECKED,0);
1590 }
1591
1592 return (TRUE);
1593}
1594
1595/* Window Functions */
1596
1597/*****************************************************************************
1598 * Name : BOOL WIN32API AnyPopup
1599 * Purpose : The AnyPopup function indicates whether an owned, visible,
1600 * top-level pop-up, or overlapped window exists on the screen. The
1601 * function searches the entire Windows screen, not just the calling
1602 * application's client area.
1603 * Parameters: VOID
1604 * Variables :
1605 * Result : If a pop-up window exists, the return value is TRUE even if the
1606 * pop-up window is completely covered by other windows. Otherwise,
1607 * it is FALSE.
1608 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1609 * compatibility purposes. It is generally not useful.
1610 * Status : UNTESTED STUB
1611 *
1612 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1613 *****************************************************************************/
1614BOOL WIN32API AnyPopup(VOID)
1615{
1616 dprintf(("USER32:AnyPopup() not implemented.\n"));
1617
1618 return (FALSE);
1619}
1620
1621//******************************************************************************
1622//******************************************************************************
1623/*****************************************************************************
1624 * Name : BOOL WIN32API PaintDesktop
1625 * Purpose : The PaintDesktop function fills the clipping region in the
1626 * specified device context with the desktop pattern or wallpaper.
1627 * The function is provided primarily for shell desktops.
1628 * Parameters:
1629 * Variables :
1630 * Result : If the function succeeds, the return value is TRUE.
1631 * If the function fails, the return value is FALSE.
1632 * Remark :
1633 * Status : UNTESTED STUB
1634 *
1635 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1636 *****************************************************************************/
1637BOOL WIN32API PaintDesktop(HDC hdc)
1638{
1639 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
1640 hdc));
1641
1642 return (FALSE);
1643}
1644
1645/* Filled Shape Functions */
1646
1647
1648int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
1649{
1650#ifdef DEBUG
1651 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", lprc->left, lprc->top, lprc->right, lprc->bottom, hbr);
1652#endif
1653 return O32_FillRect(hDC,lprc,hbr);
1654}
1655//******************************************************************************
1656//******************************************************************************
1657int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr)
1658{
1659#ifdef DEBUG
1660 WriteLog("USER32: FrameRect\n");
1661#endif
1662 return O32_FrameRect(hDC,lprc,hbr);
1663}
1664//******************************************************************************
1665//******************************************************************************
1666BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
1667{
1668#ifdef DEBUG
1669 WriteLog("USER32: InvertRect\n");
1670#endif
1671 return O32_InvertRect(hDC,lprc);
1672}
1673
1674/* System Information Functions */
1675
1676int WIN32API GetKeyboardType( int nTypeFlag)
1677{
1678#ifdef DEBUG
1679 WriteLog("USER32: GetKeyboardType\n");
1680#endif
1681 return O32_GetKeyboardType(nTypeFlag);
1682}
1683
1684/* Message and Message Queue Functions */
1685
1686
1687/* Device Context Functions */
1688
1689
1690/* Window Station and Desktop Functions */
1691/*****************************************************************************
1692 * Name : HDESK WIN32API GetThreadDesktop
1693 * Purpose : The GetThreadDesktop function returns a handle to the desktop
1694 * associated with a specified thread.
1695 * Parameters: DWORD dwThreadId thread identifier
1696 * Variables :
1697 * Result : If the function succeeds, the return value is the handle of the
1698 * desktop associated with the specified thread.
1699 * Remark :
1700 * Status : UNTESTED STUB
1701 *
1702 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1703 *****************************************************************************/
1704HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
1705{
1706 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
1707 dwThreadId));
1708
1709 return (NULL);
1710}
1711
1712/*****************************************************************************
1713 * Name : BOOL WIN32API CloseDesktop
1714 * Purpose : The CloseDesktop function closes an open handle of a desktop
1715 * object. A desktop is a secure object contained within a window
1716 * station object. A desktop has a logical display surface and
1717 * contains windows, menus and hooks.
1718 * Parameters: HDESK hDesktop
1719 * Variables :
1720 * Result : If the function succeeds, the return value is TRUE.
1721 * If the functions fails, the return value is FALSE. To get
1722 * extended error information, call GetLastError.
1723 * Remark :
1724 * Status : UNTESTED STUB
1725 *
1726 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1727 *****************************************************************************/
1728BOOL WIN32API CloseDesktop(HDESK hDesktop)
1729{
1730 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1731 hDesktop));
1732
1733 return (FALSE);
1734}
1735/*****************************************************************************
1736 * Name : BOOL WIN32API CloseWindowStation
1737 * Purpose : The CloseWindowStation function closes an open window station handle.
1738 * Parameters: HWINSTA hWinSta
1739 * Variables :
1740 * Result :
1741 * Remark : 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 * Status : UNTESTED STUB
1745 *
1746 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1747 *****************************************************************************/
1748BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1749{
1750 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1751 hWinSta));
1752
1753 return (FALSE);
1754}
1755/*****************************************************************************
1756 * Name : HDESK WIN32API CreateDesktopA
1757 * Purpose : The CreateDesktop function creates a new desktop on the window
1758 * station associated with the calling process.
1759 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1760 * LPCTSTR lpszDevice name of display device to assign to the desktop
1761 * LPDEVMODE pDevMode reserved; must be NULL
1762 * DWORD dwFlags flags to control interaction with other applications
1763 * DWORD dwDesiredAccess specifies access of returned handle
1764 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1765 * Variables :
1766 * Result : If the function succeeds, the return value is a handle of the
1767 * newly created desktop.
1768 * If the function fails, the return value is NULL. To get extended
1769 * error information, call GetLastError.
1770 * Remark :
1771 * Status : UNTESTED STUB
1772 *
1773 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1774 *****************************************************************************/
1775HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1776 LPCTSTR lpszDevice,
1777 LPDEVMODEA pDevMode,
1778 DWORD dwFlags,
1779 DWORD dwDesiredAccess,
1780 LPSECURITY_ATTRIBUTES lpsa)
1781{
1782 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1783 lpszDesktop,
1784 lpszDevice,
1785 pDevMode,
1786 dwFlags,
1787 dwDesiredAccess,
1788 lpsa));
1789
1790 return (NULL);
1791}
1792/*****************************************************************************
1793 * Name : HDESK WIN32API CreateDesktopW
1794 * Purpose : The CreateDesktop function creates a new desktop on the window
1795 * station associated with the calling process.
1796 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1797 * LPCTSTR lpszDevice name of display device to assign to the desktop
1798 * LPDEVMODE pDevMode reserved; must be NULL
1799 * DWORD dwFlags flags to control interaction with other applications
1800 * DWORD dwDesiredAccess specifies access of returned handle
1801 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1802 * Variables :
1803 * Result : If the function succeeds, the return value is a handle of the
1804 * newly created desktop.
1805 * If the function fails, the return value is NULL. To get extended
1806 * error information, call GetLastError.
1807 * Remark :
1808 * Status : UNTESTED STUB
1809 *
1810 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1811 *****************************************************************************/
1812HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1813 LPCTSTR lpszDevice,
1814 LPDEVMODEW pDevMode,
1815 DWORD dwFlags,
1816 DWORD dwDesiredAccess,
1817 LPSECURITY_ATTRIBUTES lpsa)
1818{
1819 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1820 lpszDesktop,
1821 lpszDevice,
1822 pDevMode,
1823 dwFlags,
1824 dwDesiredAccess,
1825 lpsa));
1826
1827 return (NULL);
1828}
1829/*****************************************************************************
1830 * Name : HWINSTA WIN32API CreateWindowStationA
1831 * Purpose : The CreateWindowStation function creates a window station object.
1832 * It returns a handle that can be used to access the window station.
1833 * A window station is a secure object that contains a set of global
1834 * atoms, a clipboard, and a set of desktop objects.
1835 * Parameters: LPTSTR lpwinsta name of the new window station
1836 * DWORD dwReserved reserved; must be NULL
1837 * DWORD dwDesiredAccess specifies access of returned handle
1838 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1839 * Variables :
1840 * Result : If the function succeeds, the return value is the handle to the
1841 * newly created window station.
1842 * If the function fails, the return value is NULL. To get extended
1843 * error information, call GetLastError.
1844 * Remark :
1845 * Status : UNTESTED STUB
1846 *
1847 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1848 *****************************************************************************/
1849HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1850 DWORD dwReserved,
1851 DWORD dwDesiredAccess,
1852 LPSECURITY_ATTRIBUTES lpsa)
1853{
1854 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1855 lpWinSta,
1856 dwReserved,
1857 dwDesiredAccess,
1858 lpsa));
1859
1860 return (NULL);
1861}
1862/*****************************************************************************
1863 * Name : HWINSTA WIN32API CreateWindowStationW
1864 * Purpose : The CreateWindowStation function creates a window station object.
1865 * It returns a handle that can be used to access the window station.
1866 * A window station is a secure object that contains a set of global
1867 * atoms, a clipboard, and a set of desktop objects.
1868 * Parameters: LPTSTR lpwinsta name of the new window station
1869 * DWORD dwReserved reserved; must be NULL
1870 * DWORD dwDesiredAccess specifies access of returned handle
1871 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1872 * Variables :
1873 * Result : If the function succeeds, the return value is the handle to the
1874 * newly created window station.
1875 * If the function fails, the return value is NULL. To get extended
1876 * error information, call GetLastError.
1877 * Remark :
1878 * Status : UNTESTED STUB
1879 *
1880 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1881 *****************************************************************************/
1882HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
1883 DWORD dwReserved,
1884 DWORD dwDesiredAccess,
1885 LPSECURITY_ATTRIBUTES lpsa)
1886{
1887 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
1888 lpWinSta,
1889 dwReserved,
1890 dwDesiredAccess,
1891 lpsa));
1892
1893 return (NULL);
1894}
1895/*****************************************************************************
1896 * Name : BOOL WIN32API EnumDesktopWindows
1897 * Purpose : The EnumDesktopWindows function enumerates all windows in a
1898 * desktop by passing the handle of each window, in turn, to an
1899 * application-defined callback function.
1900 * Parameters: HDESK hDesktop handle of desktop to enumerate
1901 * WNDENUMPROC lpfn points to application's callback function
1902 * LPARAM lParam 32-bit value to pass to the callback function
1903 * Variables :
1904 * Result : If the function succeeds, the return value is TRUE.
1905 * If the function fails, the return value is FALSE. To get
1906 * extended error information, call GetLastError.
1907 * Remark :
1908 * Status : UNTESTED STUB
1909 *
1910 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1911 *****************************************************************************/
1912BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
1913 WNDENUMPROC lpfn,
1914 LPARAM lParam)
1915{
1916 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
1917 hDesktop,
1918 lpfn,
1919 lParam));
1920
1921 return (FALSE);
1922}
1923/*****************************************************************************
1924 * Name : BOOL WIN32API EnumDesktopsA
1925 * Purpose : The EnumDesktops function enumerates all desktops in the window
1926 * station assigned to the calling process. The function does so by
1927 * passing the name of each desktop, in turn, to an application-
1928 * defined callback function.
1929 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1930 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1931 * LPARAM lParam 32-bit value to pass to the callback function
1932 * Variables :
1933 * Result : If the function succeeds, the return value is TRUE.
1934 * If the function fails, the return value is FALSE. To get extended
1935 * error information, call GetLastError.
1936 * Remark :
1937 * Status : UNTESTED STUB
1938 *
1939 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1940 *****************************************************************************/
1941BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
1942 DESKTOPENUMPROCA lpEnumFunc,
1943 LPARAM lParam)
1944{
1945 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
1946 hWinSta,
1947 lpEnumFunc,
1948 lParam));
1949
1950 return (FALSE);
1951}
1952/*****************************************************************************
1953 * Name : BOOL WIN32API EnumDesktopsW
1954 * Purpose : The EnumDesktops function enumerates all desktops in the window
1955 * station assigned to the calling process. The function does so by
1956 * passing the name of each desktop, in turn, to an application-
1957 * defined callback function.
1958 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1959 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1960 * LPARAM lParam 32-bit value to pass to the callback function
1961 * Variables :
1962 * Result : If the function succeeds, the return value is TRUE.
1963 * If the function fails, the return value is FALSE. To get extended
1964 * error information, call GetLastError.
1965 * Remark :
1966 * Status : UNTESTED STUB
1967 *
1968 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1969 *****************************************************************************/
1970BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
1971 DESKTOPENUMPROCW lpEnumFunc,
1972 LPARAM lParam)
1973{
1974 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
1975 hWinSta,
1976 lpEnumFunc,
1977 lParam));
1978
1979 return (FALSE);
1980}
1981/*****************************************************************************
1982 * Name : BOOL WIN32API EnumWindowStationsA
1983 * Purpose : The EnumWindowStations function enumerates all windowstations
1984 * in the system by passing the name of each window station, in
1985 * turn, to an application-defined callback function.
1986 * Parameters:
1987 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1988 * LPARAM lParam 32-bit value to pass to the callback function
1989 * Result : If the function succeeds, the return value is TRUE.
1990 * If the function fails the return value is FALSE. To get extended
1991 * error information, call GetLastError.
1992 * Remark :
1993 * Status : UNTESTED STUB
1994 *
1995 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1996 *****************************************************************************/
1997BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
1998 LPARAM lParam)
1999{
2000 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
2001 lpEnumFunc,
2002 lParam));
2003
2004 return (FALSE);
2005}
2006/*****************************************************************************
2007 * Name : BOOL WIN32API EnumWindowStationsW
2008 * Purpose : The EnumWindowStations function enumerates all windowstations
2009 * in the system by passing the name of each window station, in
2010 * turn, to an application-defined callback function.
2011 * Parameters:
2012 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2013 * LPARAM lParam 32-bit value to pass to the callback function
2014 * Result : If the function succeeds, the return value is TRUE.
2015 * If the function fails the return value is FALSE. To get extended
2016 * error information, call GetLastError.
2017 * Remark :
2018 * Status : UNTESTED STUB
2019 *
2020 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2021 *****************************************************************************/
2022BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
2023 LPARAM lParam)
2024{
2025 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
2026 lpEnumFunc,
2027 lParam));
2028
2029 return (FALSE);
2030}
2031/*****************************************************************************
2032 * Name : HWINSTA WIN32API GetProcessWindowStation
2033 * Purpose : The GetProcessWindowStation function returns a handle of the
2034 * window station associated with the calling process.
2035 * Parameters:
2036 * Variables :
2037 * Result : If the function succeeds, the return value is a handle of the
2038 * window station associated with the calling process.
2039 * If the function fails, the return value is NULL. This can occur
2040 * if the calling process is not an application written for Windows
2041 * NT. To get extended error information, call GetLastError.
2042 * Remark :
2043 * Status : UNTESTED STUB
2044 *
2045 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2046 *****************************************************************************/
2047HWINSTA WIN32API GetProcessWindowStation(VOID)
2048{
2049 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
2050
2051 return (NULL);
2052}
2053/*****************************************************************************
2054 * Name : BOOL WIN32API GetUserObjectInformationA
2055 * Purpose : The GetUserObjectInformation function returns information about
2056 * a window station or desktop object.
2057 * Parameters: HANDLE hObj handle of object to get information for
2058 * int nIndex type of information to get
2059 * PVOID pvInfo points to buffer that receives the information
2060 * DWORD nLength size, in bytes, of pvInfo buffer
2061 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2062 * Variables :
2063 * Result : If the function succeeds, the return value is TRUE.
2064 * If the function fails, the return value is FALSE. To get extended
2065 * error information, call GetLastError.
2066 * Remark :
2067 * Status : UNTESTED STUB
2068 *
2069 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2070 *****************************************************************************/
2071BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2072 int nIndex,
2073 PVOID pvInfo,
2074 DWORD nLength,
2075 LPDWORD lpnLengthNeeded)
2076{
2077 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2078 hObj,
2079 nIndex,
2080 pvInfo,
2081 nLength,
2082 lpnLengthNeeded));
2083
2084 return (FALSE);
2085}
2086/*****************************************************************************
2087 * Name : BOOL WIN32API GetUserObjectInformationW
2088 * Purpose : The GetUserObjectInformation function returns information about
2089 * a window station or desktop object.
2090 * Parameters: HANDLE hObj handle of object to get information for
2091 * int nIndex type of information to get
2092 * PVOID pvInfo points to buffer that receives the information
2093 * DWORD nLength size, in bytes, of pvInfo buffer
2094 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2095 * Variables :
2096 * Result : If the function succeeds, the return value is TRUE.
2097 * If the function fails, the return value is FALSE. To get extended
2098 * error information, call GetLastError.
2099 * Remark :
2100 * Status : UNTESTED STUB
2101 *
2102 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2103 *****************************************************************************/
2104BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2105 int nIndex,
2106 PVOID pvInfo,
2107 DWORD nLength,
2108 LPDWORD lpnLengthNeeded)
2109{
2110 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2111 hObj,
2112 nIndex,
2113 pvInfo,
2114 nLength,
2115 lpnLengthNeeded));
2116
2117 return (FALSE);
2118}
2119/*****************************************************************************
2120 * Name : BOOL WIN32API GetUserObjectSecurity
2121 * Purpose : The GetUserObjectSecurity function retrieves security information
2122 * for the specified user object.
2123 * Parameters: HANDLE hObj handle of user object
2124 * SECURITY_INFORMATION * pSIRequested address of requested security information
2125 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2126 * DWORD nLength size of buffer for security descriptor
2127 * LPDWORD lpnLengthNeeded address of required size of buffer
2128 * Variables :
2129 * Result : If the function succeeds, the return value is TRUE.
2130 * If the function fails, the return value is FALSE. To get extended
2131 * error information, call GetLastError.
2132 * Remark :
2133 * Status : UNTESTED STUB
2134 *
2135 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2136 *****************************************************************************/
2137BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2138 SECURITY_INFORMATION * pSIRequested,
2139 LPSECURITY_DESCRIPTOR pSID,
2140 DWORD nLength,
2141 LPDWORD lpnLengthNeeded)
2142{
2143 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2144 hObj,
2145 pSIRequested,
2146 pSID,
2147 nLength,
2148 lpnLengthNeeded));
2149
2150 return (FALSE);
2151}
2152/*****************************************************************************
2153 * Name : HDESK WIN32API OpenDesktopA
2154 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2155 * A desktop is a secure object contained within a window station
2156 * object. A desktop has a logical display surface and contains
2157 * windows, menus and hooks.
2158 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2159 * DWORD dwFlags flags to control interaction with other applications
2160 * BOOL fInherit specifies whether returned handle is inheritable
2161 * DWORD dwDesiredAccess specifies access of returned handle
2162 * Variables :
2163 * Result : If the function succeeds, the return value is the handle to the
2164 * opened desktop.
2165 * If the function fails, the return value is NULL. To get extended
2166 * error information, call GetLastError.
2167 * Remark :
2168 * Status : UNTESTED STUB
2169 *
2170 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2171 *****************************************************************************/
2172HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2173 DWORD dwFlags,
2174 BOOL fInherit,
2175 DWORD dwDesiredAccess)
2176{
2177 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2178 lpszDesktopName,
2179 dwFlags,
2180 fInherit,
2181 dwDesiredAccess));
2182
2183 return (NULL);
2184}
2185/*****************************************************************************
2186 * Name : HDESK WIN32API OpenDesktopW
2187 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2188 * A desktop is a secure object contained within a window station
2189 * object. A desktop has a logical display surface and contains
2190 * windows, menus and hooks.
2191 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2192 * DWORD dwFlags flags to control interaction with other applications
2193 * BOOL fInherit specifies whether returned handle is inheritable
2194 * DWORD dwDesiredAccess specifies access of returned handle
2195 * Variables :
2196 * Result : If the function succeeds, the return value is the handle to the
2197 * opened desktop.
2198 * If the function fails, the return value is NULL. To get extended
2199 * error information, call GetLastError.
2200 * Remark :
2201 * Status : UNTESTED STUB
2202 *
2203 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2204 *****************************************************************************/
2205HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2206 DWORD dwFlags,
2207 BOOL fInherit,
2208 DWORD dwDesiredAccess)
2209{
2210 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2211 lpszDesktopName,
2212 dwFlags,
2213 fInherit,
2214 dwDesiredAccess));
2215
2216 return (NULL);
2217}
2218/*****************************************************************************
2219 * Name : HDESK WIN32API OpenInputDesktop
2220 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2221 * that receives user input. The input desktop is a desktop on the
2222 * window station associated with the logged-on user.
2223 * Parameters: DWORD dwFlags flags to control interaction with other applications
2224 * BOOL fInherit specifies whether returned handle is inheritable
2225 * DWORD dwDesiredAccess specifies access of returned handle
2226 * Variables :
2227 * Result : If the function succeeds, the return value is a handle of the
2228 * desktop that receives user input.
2229 * If the function fails, the return value is NULL. To get extended
2230 * error information, call GetLastError.
2231 * Remark :
2232 * Status : UNTESTED STUB
2233 *
2234 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2235 *****************************************************************************/
2236HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2237 BOOL fInherit,
2238 DWORD dwDesiredAccess)
2239{
2240 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2241 dwFlags,
2242 fInherit,
2243 dwDesiredAccess));
2244
2245 return (NULL);
2246}
2247/*****************************************************************************
2248 * Name : HWINSTA WIN32API OpenWindowStationA
2249 * Purpose : The OpenWindowStation function returns a handle to an existing
2250 * window station.
2251 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2252 * BOOL fInherit specifies whether returned handle is inheritable
2253 * DWORD dwDesiredAccess specifies access of returned handle
2254 * Variables :
2255 * Result : If the function succeeds, the return value is the handle to the
2256 * specified window station.
2257 * If the function fails, the return value is NULL. To get extended
2258 * error information, call GetLastError.
2259 * Remark :
2260 * Status : UNTESTED STUB
2261 *
2262 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2263 *****************************************************************************/
2264HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2265 BOOL fInherit,
2266 DWORD dwDesiredAccess)
2267{
2268 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2269 lpszWinStaName,
2270 fInherit,
2271 dwDesiredAccess));
2272
2273 return (NULL);
2274}
2275/*****************************************************************************
2276 * Name : HWINSTA WIN32API OpenWindowStationW
2277 * Purpose : The OpenWindowStation function returns a handle to an existing
2278 * window station.
2279 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2280 * BOOL fInherit specifies whether returned handle is inheritable
2281 * DWORD dwDesiredAccess specifies access of returned handle
2282 * Variables :
2283 * Result : If the function succeeds, the return value is the handle to the
2284 * specified window station.
2285 * If the function fails, the return value is NULL. To get extended
2286 * error information, call GetLastError.
2287
2288
2289 * Remark :
2290 * Status : UNTESTED STUB
2291 *
2292 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2293 *****************************************************************************/
2294HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2295 BOOL fInherit,
2296 DWORD dwDesiredAccess)
2297{
2298 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2299 lpszWinStaName,
2300 fInherit,
2301 dwDesiredAccess));
2302
2303 return (NULL);
2304}
2305/*****************************************************************************
2306 * Name : BOOL WIN32API SetProcessWindowStation
2307 * Purpose : The SetProcessWindowStation function assigns a window station
2308 * to the calling process. This enables the process to access
2309 * objects in the window station such as desktops, the clipboard,
2310 * and global atoms. All subsequent operations on the window station
2311 * use the access rights granted to hWinSta.
2312 * Parameters:
2313 * Variables :
2314 * Result : If the function succeeds, the return value is TRUE.
2315 * If the function fails, the return value is FALSE. To get extended
2316 * error information, call GetLastError.
2317 * Remark :
2318 * Status : UNTESTED STUB
2319 *
2320 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2321 *****************************************************************************/
2322BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2323{
2324 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2325 hWinSta));
2326
2327 return (FALSE);
2328}
2329/*****************************************************************************
2330 * Name : BOOL WIN32API SetThreadDesktop
2331 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2332 * thread. All subsequent operations on the desktop use the access
2333 * rights granted to hDesk.
2334 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
2335 * Variables :
2336 * Result : If the function succeeds, the return value is TRUE.
2337 * If the function fails, the return value is FALSE. To get extended
2338 * error information, call GetLastError.
2339 * Remark :
2340 * Status : UNTESTED STUB
2341 *
2342 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2343 *****************************************************************************/
2344BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
2345{
2346 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
2347 hDesktop));
2348
2349 return (FALSE);
2350}
2351/*****************************************************************************
2352 * Name : BOOL WIN32API SetUserObjectInformationA
2353 * Purpose : The SetUserObjectInformation function sets information about a
2354 * window station or desktop object.
2355 * Parameters: HANDLE hObject handle of the object for which to set information
2356 * int nIndex type of information to set
2357 * PVOID lpvInfo points to a buffer that contains the information
2358 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2359 * Variables :
2360 * Result : If the function succeeds, the return value is TRUE.
2361 * If the function fails the return value is FALSE. To get extended
2362 * error information, call GetLastError.
2363 * Remark :
2364 * Status : UNTESTED STUB
2365 *
2366 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2367 *****************************************************************************/
2368BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
2369 int nIndex,
2370 PVOID lpvInfo,
2371 DWORD cbInfo)
2372{
2373 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
2374 hObject,
2375 nIndex,
2376 lpvInfo,
2377 cbInfo));
2378
2379 return (FALSE);
2380}
2381/*****************************************************************************
2382 * Name : BOOL WIN32API SetUserObjectInformationW
2383 * Purpose : The SetUserObjectInformation function sets information about a
2384 * window station or desktop object.
2385 * Parameters: HANDLE hObject handle of the object for which to set information
2386 * int nIndex type of information to set
2387 * PVOID lpvInfo points to a buffer that contains the information
2388 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2389 * Variables :
2390 * Result : If the function succeeds, the return value is TRUE.
2391 * If the function fails the return value is FALSE. To get extended
2392 * error information, call GetLastError.
2393 * Remark :
2394 * Status : UNTESTED STUB
2395 *
2396 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2397 *****************************************************************************/
2398BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
2399 int nIndex,
2400 PVOID lpvInfo,
2401 DWORD cbInfo)
2402{
2403 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
2404 hObject,
2405 nIndex,
2406 lpvInfo,
2407 cbInfo));
2408
2409 return (FALSE);
2410}
2411/*****************************************************************************
2412 * Name : BOOL WIN32API SetUserObjectSecurity
2413 * Purpose : The SetUserObjectSecurity function sets the security of a user
2414 * object. This can be, for example, a window or a DDE conversation
2415 * Parameters: HANDLE hObject handle of user object
2416 * SECURITY_INFORMATION * psi address of security information
2417 * LPSECURITY_DESCRIPTOR psd address of security descriptor
2418 * Variables :
2419 * Result : If the function succeeds, the return value is TRUE.
2420 * If the function fails, the return value is FALSE. To get extended
2421 * error information, call GetLastError.
2422 * Remark :
2423 * Status : UNTESTED STUB
2424 *
2425 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2426 *****************************************************************************/
2427BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
2428 SECURITY_INFORMATION * psi,
2429 LPSECURITY_DESCRIPTOR psd)
2430{
2431 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
2432 hObject,
2433 psi,
2434 psd));
2435
2436 return (FALSE);
2437}
2438/*****************************************************************************
2439 * Name : BOOL WIN32API SwitchDesktop
2440 * Purpose : The SwitchDesktop function makes a desktop visible and activates
2441 * it. This enables the desktop to receive input from the user. The
2442 * calling process must have DESKTOP_SWITCHDESKTOP access to the
2443 * desktop for the SwitchDesktop function to succeed.
2444 * Parameters:
2445 * Variables :
2446 * Result : If the function succeeds, the return value is TRUE.
2447 * If the function fails, the return value is FALSE. To get extended
2448 * error information, call GetLastError.
2449 * Remark :
2450 * Status : UNTESTED STUB
2451 *
2452 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2453 *****************************************************************************/
2454BOOL WIN32API SwitchDesktop(HDESK hDesktop)
2455{
2456 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
2457 hDesktop));
2458
2459 return (FALSE);
2460}
2461
2462/* Debugging Functions */
2463
2464/*****************************************************************************
2465 * Name : VOID WIN32API SetDebugErrorLevel
2466 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
2467 * which Windows will generate debugging events and pass them to a debugger.
2468 * Parameters: DWORD dwLevel debugging error level
2469 * Variables :
2470 * Result :
2471 * Remark :
2472 * Status : UNTESTED STUB
2473 *
2474 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2475 *****************************************************************************/
2476VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
2477{
2478 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
2479 dwLevel));
2480}
2481
2482/* Hook Functions */
2483
2484/* CB: move to MDI */
2485
2486/* Drag'n'drop */
2487
2488/*****************************************************************************
2489 * Name : BOOL WIN32API DragObject
2490 * Purpose : Unknown
2491 * Parameters: Unknown
2492 * Variables :
2493 * Result :
2494 * Remark :
2495 * Status : UNTESTED UNKNOWN STUB
2496 *
2497 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2498 *****************************************************************************/
2499DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
2500{
2501 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2502 x1,
2503 x2,
2504 x3,
2505 x4,
2506 x5));
2507
2508 return (FALSE); /* default */
2509}
2510
2511/* Unknown */
2512
2513/*****************************************************************************
2514 * Name : BOOL WIN32API SetShellWindow
2515 * Purpose : Unknown
2516 * Parameters: Unknown
2517 * Variables :
2518 * Result :
2519 * Remark :
2520 * Status : UNTESTED UNKNOWN STUB
2521 *
2522 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2523 *****************************************************************************/
2524BOOL WIN32API SetShellWindow(DWORD x1)
2525{
2526 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
2527 x1));
2528
2529 return (FALSE); /* default */
2530}
2531/*****************************************************************************
2532 * Name : BOOL WIN32API PlaySoundEvent
2533 * Purpose : Unknown
2534 * Parameters: Unknown
2535 * Variables :
2536 * Result :
2537 * Remark :
2538 * Status : UNTESTED UNKNOWN STUB
2539 *
2540 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2541 *****************************************************************************/
2542BOOL WIN32API PlaySoundEvent(DWORD x1)
2543{
2544 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
2545 x1));
2546
2547 return (FALSE); /* default */
2548}
2549/*****************************************************************************
2550 * Name : BOOL WIN32API SetSysColorsTemp
2551 * Purpose : Unknown
2552 * Parameters: Unknown
2553 * Variables :
2554 * Result :
2555 * Remark :
2556 * Status : UNTESTED UNKNOWN STUB
2557 *
2558 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2559 *****************************************************************************/
2560BOOL WIN32API SetSysColorsTemp(void)
2561{
2562 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
2563
2564 return (FALSE); /* default */
2565}
2566/*****************************************************************************
2567 * Name : BOOL WIN32API RegisterNetworkCapabilities
2568 * Purpose : Unknown
2569 * Parameters: Unknown
2570 * Variables :
2571 * Result :
2572 * Remark :
2573 * Status : UNTESTED UNKNOWN STUB
2574 *
2575 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2576 *****************************************************************************/
2577BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
2578 DWORD x2)
2579{
2580 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
2581 x1,
2582 x2));
2583
2584 return (FALSE); /* default */
2585}
2586/*****************************************************************************
2587 * Name : BOOL WIN32API EndTask
2588 * Purpose : Unknown
2589 * Parameters: Unknown
2590 * Variables :
2591 * Result :
2592 * Remark :
2593 * Status : UNTESTED UNKNOWN STUB
2594 *
2595 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2596 *****************************************************************************/
2597BOOL WIN32API EndTask(DWORD x1,
2598 DWORD x2,
2599 DWORD x3)
2600{
2601 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
2602 x1,
2603 x2,
2604 x3));
2605
2606 return (FALSE); /* default */
2607}
2608/*****************************************************************************
2609 * Name : BOOL WIN32API GetNextQueueWindow
2610 * Purpose : Unknown
2611 * Parameters: Unknown
2612 * Variables :
2613 * Result :
2614 * Remark :
2615 * Status : UNTESTED UNKNOWN STUB
2616 *
2617 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2618 *****************************************************************************/
2619BOOL WIN32API GetNextQueueWindow(DWORD x1,
2620 DWORD x2)
2621{
2622 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
2623 x1,
2624 x2));
2625
2626 return (FALSE); /* default */
2627}
2628/*****************************************************************************
2629 * Name : BOOL WIN32API YieldTask
2630 * Purpose : Unknown
2631 * Parameters: Unknown
2632 * Variables :
2633 * Result :
2634 * Remark :
2635 * Status : UNTESTED UNKNOWN STUB
2636 *
2637 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2638 *****************************************************************************/
2639BOOL WIN32API YieldTask(void)
2640{
2641 dprintf(("USER32: YieldTask() not implemented.\n"));
2642
2643 return (FALSE); /* default */
2644}
2645/*****************************************************************************
2646 * Name : BOOL WIN32API WinOldAppHackoMatic
2647 * Purpose : Unknown
2648 * Parameters: Unknown
2649 * Variables :
2650 * Result :
2651 * Remark :
2652 * Status : UNTESTED UNKNOWN STUB
2653 *
2654 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2655 *****************************************************************************/
2656BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
2657{
2658 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
2659 x1));
2660
2661 return (FALSE); /* default */
2662}
2663/*****************************************************************************
2664 * Name : BOOL WIN32API RegisterSystemThread
2665 * Purpose : Unknown
2666 * Parameters: Unknown
2667 * Variables :
2668 * Result :
2669 * Remark :
2670 * Status : UNTESTED UNKNOWN STUB
2671 *
2672 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2673 *****************************************************************************/
2674BOOL WIN32API RegisterSystemThread(DWORD x1,
2675 DWORD x2)
2676{
2677 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
2678 x1,
2679 x2));
2680
2681 return (FALSE); /* default */
2682}
2683/*****************************************************************************
2684 * Name : BOOL WIN32API IsHungThread
2685 * Purpose : Unknown
2686 * Parameters: Unknown
2687 * Variables :
2688 * Result :
2689 * Remark :
2690 * Status : UNTESTED UNKNOWN STUB
2691 *
2692 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2693 *****************************************************************************/
2694BOOL WIN32API IsHungThread(DWORD x1)
2695{
2696 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
2697 x1));
2698
2699 return (FALSE); /* default */
2700}
2701/*****************************************************************************
2702 * Name : BOOL WIN32API UserSignalProc
2703 * Purpose : Unknown
2704 * Parameters: Unknown
2705 * Variables :
2706 * Result :
2707 * Remark :
2708 * Status : UNTESTED UNKNOWN STUB
2709 *
2710 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2711 *****************************************************************************/
2712BOOL WIN32API UserSignalProc(DWORD x1,
2713 DWORD x2,
2714 DWORD x3,
2715 DWORD x4)
2716{
2717 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2718 x1,
2719 x2,
2720 x3,
2721 x4));
2722
2723 return (FALSE); /* default */
2724}
2725/*****************************************************************************
2726 * Name : BOOL WIN32API GetShellWindow
2727 * Purpose : Unknown
2728 * Parameters: Unknown
2729 * Variables :
2730 * Result :
2731 * Remark :
2732 * Status : UNTESTED UNKNOWN STUB
2733 *
2734 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2735 *****************************************************************************/
2736HWND WIN32API GetShellWindow(void)
2737{
2738 dprintf(("USER32: GetShellWindow() not implemented.\n"));
2739
2740 return (0); /* default */
2741}
2742/***********************************************************************
2743 * RegisterTasklist32 [USER32.436]
2744 */
2745DWORD WIN32API RegisterTasklist (DWORD x)
2746{
2747 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
2748 x));
2749
2750 return TRUE;
2751}
2752
2753
Note: See TracBrowser for help on using the repository browser.