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

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

dprintf2 addition + Rene Pronk's mnemonics changes

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