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

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

text output changes, desktop WM_GETTEXT fixed, scrollbar DC changes

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