source: trunk/src/user32/new/user32.cpp@ 2335

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

single frame works now

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