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

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

lots of changes

File size: 132.9 KB
Line 
1/* $Id: user32.cpp,v 1.40 1999-10-13 14:24:25 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 <os2win.h>
26#include "misc.h"
27
28#include "user32.h"
29#include <winicon.h>
30#include "syscolor.h"
31
32#include <wchar.h>
33#include <stdlib.h>
34#include <string.h>
35#include <oslibwin.h>
36#include <win32wnd.h>
37#include <winuser.h>
38
39//undocumented stuff
40// WIN32API CalcChildScroll
41// WIN32API CascadeChildWindows
42// WIN32API ClientThreadConnect
43// WIN32API DragObject
44// WIN32API DrawFrame
45// WIN32API EditWndProc
46// WIN32API EndTask
47// WIN32API GetInputDesktop
48// WIN32API GetNextQueueWindow
49// WIN32API GetShellWindow
50// WIN32API InitSharedTable
51// WIN32API InitTask
52// WIN32API IsHungThread
53// WIN32API LockWindowStation
54// WIN32API ModifyAccess
55// WIN32API PlaySoundEvent
56// WIN32API RegisterLogonProcess
57// WIN32API RegisterNetworkCapabilities
58// WIN32API RegisterSystemThread
59// WIN32API SetDeskWallpaper
60// WIN32API SetDesktopBitmap
61// WIN32API SetInternalWindowPos
62// WIN32API SetLogonNotifyWindow
63// WIN32API SetShellWindow
64// WIN32API SetSysColorsTemp
65// WIN32API SetWindowFullScreenState
66// WIN32API SwitchToThisWindow
67// WIN32API SysErrorBox
68// WIN32API TileChildWindows
69// WIN32API UnlockWindowStation
70// WIN32API UserClientDllInitialize
71// WIN32API UserSignalProc
72// WIN32API WinOldAppHackoMatic
73// WIN32API WNDPROC_CALLBACK
74// WIN32API YieldTask
75
76/* Coordinate Transformation */
77
78inline void OS2ToWin32ScreenPos(POINT *dest,POINT *source)
79{
80 dest->x = source->x;
81 dest->y = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN)-1-source->y;
82}
83
84inline void Win32ToOS2ScreenPos(POINT *dest,POINT *source)
85{
86 OS2ToWin32ScreenPos(dest,source); //transform back
87}
88
89/* Rectangle Functions - parts from wine/windows/rect.c */
90
91BOOL WIN32API CopyRect( PRECT lprcDst, const RECT * lprcSrc)
92{
93// ddprintf(("USER32: CopyRect\n"));
94 if (!lprcDst || !lprcSrc) {
95 SetLastError(ERROR_INVALID_PARAMETER);
96 return FALSE;
97 }
98
99 memcpy(lprcDst,lprcSrc,sizeof(RECT));
100
101 return TRUE;
102}
103//******************************************************************************
104//******************************************************************************
105BOOL WIN32API EqualRect( const RECT *lprc1, const RECT *lprc2)
106{
107#ifdef DEBUG
108 WriteLog("USER32: EqualRect\n");
109#endif
110 if (!lprc1 || !lprc2)
111 {
112 SetLastError(ERROR_INVALID_PARAMETER);
113 return FALSE;
114 }
115
116 return (lprc1->left == lprc2->left &&
117 lprc1->right == lprc2->right &&
118 lprc1->top == lprc2->top &&
119 lprc1->bottom == lprc2->bottom);
120}
121//******************************************************************************
122//******************************************************************************
123BOOL WIN32API InflateRect( PRECT lprc, int dx, int dy)
124{
125#ifdef DEBUG
126 WriteLog("USER32: InflateRect\n");
127#endif
128 if (!lprc)
129 {
130 SetLastError(ERROR_INVALID_PARAMETER);
131 return FALSE;
132 }
133
134 lprc->left -= dx;
135 lprc->right += dx;
136 lprc->top -= dy;
137 lprc->bottom += dy;
138
139 return TRUE;
140}
141//******************************************************************************
142//******************************************************************************
143BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2)
144{
145#ifdef DEBUG
146//// WriteLog("USER32: IntersectRect\n");
147#endif
148 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
149 {
150 SetLastError(ERROR_INVALID_PARAMETER);
151 return FALSE;
152 }
153
154 if (IsRectEmpty(lprcSrc1) || IsRectEmpty(lprcSrc2) ||
155 (lprcSrc1->left >= lprcSrc2->right) || (lprcSrc2->left >= lprcSrc1->right) ||
156 (lprcSrc1->top >= lprcSrc2->bottom) || (lprcSrc2->top >= lprcSrc1->bottom))
157 {
158 SetLastError(ERROR_INVALID_PARAMETER);
159 SetRectEmpty(lprcDst);
160 return FALSE;
161 }
162 lprcDst->left = MAX(lprcSrc1->left,lprcSrc2->left);
163 lprcDst->right = MIN(lprcSrc1->right,lprcSrc2->right);
164 lprcDst->top = MAX(lprcSrc1->top,lprcSrc2->top);
165 lprcDst->bottom = MIN(lprcSrc1->bottom,lprcSrc2->bottom);
166
167 return TRUE;
168}
169//******************************************************************************
170//******************************************************************************
171BOOL WIN32API IsRectEmpty( const RECT * lprc)
172{
173 if (!lprc)
174 {
175 SetLastError(ERROR_INVALID_PARAMETER);
176 return FALSE;
177 }
178
179 return (lprc->left == lprc->right || lprc->top == lprc->bottom);
180}
181//******************************************************************************
182//******************************************************************************
183BOOL WIN32API OffsetRect( PRECT lprc, int x, int y)
184{
185#ifdef DEBUG
186//// WriteLog("USER32: OffsetRect\n");
187#endif
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#ifdef DEBUG1
206 WriteLog("USER32: PtInRect\n");
207#endif
208 if (!lprc)
209 {
210 SetLastError(ERROR_INVALID_PARAMETER);
211 return FALSE;
212 }
213
214 return (pt.x >= lprc->left &&
215 pt.x < lprc->right &&
216 pt.y >= lprc->top &&
217 pt.y < lprc->bottom);
218}
219//******************************************************************************
220//******************************************************************************
221BOOL WIN32API SetRect( PRECT lprc, int nLeft, int nTop, int nRight, int nBottom)
222{
223 if (!lprc)
224 {
225 SetLastError(ERROR_INVALID_PARAMETER);
226 return FALSE;
227 }
228
229 lprc->left = nLeft;
230 lprc->top = nTop;
231 lprc->right = nRight;
232 lprc->bottom = nBottom;
233
234 return TRUE;
235}
236//******************************************************************************
237//******************************************************************************
238BOOL WIN32API SetRectEmpty( PRECT lprc)
239{
240 if (!lprc)
241 {
242 SetLastError(ERROR_INVALID_PARAMETER);
243 return FALSE;
244 }
245
246 lprc->left = lprc->right = lprc->top = lprc->bottom = 0;
247
248 return TRUE;
249}
250//******************************************************************************
251//******************************************************************************
252BOOL WIN32API SubtractRect( PRECT lprcDest, const RECT * lprcSrc1, const RECT * lprcSrc2)
253{
254#ifdef DEBUG
255 WriteLog("USER32: SubtractRect");
256#endif
257 RECT tmp;
258
259 if (!lprcDest || !lprcSrc1 || !lprcSrc2)
260 {
261 SetLastError(ERROR_INVALID_PARAMETER);
262 return FALSE;
263 }
264
265 if (IsRectEmpty(lprcSrc1))
266 {
267 SetLastError(ERROR_INVALID_PARAMETER);
268 SetRectEmpty(lprcDest);
269 return FALSE;
270 }
271 *lprcDest = *lprcSrc1;
272 if (IntersectRect(&tmp,lprcSrc1,lprcSrc2))
273 {
274 if (EqualRect(&tmp,lprcDest))
275 {
276 SetRectEmpty(lprcDest);
277 return FALSE;
278 }
279 if ((tmp.top == lprcDest->top) && (tmp.bottom == lprcDest->bottom))
280 {
281 if (tmp.left == lprcDest->left) lprcDest->left = tmp.right;
282 else if (tmp.right == lprcDest->right) lprcDest->right = tmp.left;
283 }
284 else if ((tmp.left == lprcDest->left) && (tmp.right == lprcDest->right))
285 {
286 if (tmp.top == lprcDest->top) lprcDest->top = tmp.bottom;
287 else if (tmp.bottom == lprcDest->bottom) lprcDest->bottom = tmp.top;
288 }
289 }
290
291 return TRUE;
292}
293//******************************************************************************
294//******************************************************************************
295BOOL WIN32API UnionRect( PRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2)
296{
297#ifdef DEBUG
298 WriteLog("USER32: UnionRect\n");
299#endif
300 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
301 {
302 SetLastError(ERROR_INVALID_PARAMETER);
303 return FALSE;
304 }
305
306 if (IsRectEmpty(lprcSrc1))
307 {
308 if (IsRectEmpty(lprcSrc2))
309 {
310 SetLastError(ERROR_INVALID_PARAMETER);
311 SetRectEmpty(lprcDst);
312 return FALSE;
313 }
314 else *lprcDst = *lprcSrc2;
315 }
316 else
317 {
318 if (IsRectEmpty(lprcSrc2)) *lprcDst = *lprcSrc1;
319 else
320 {
321 lprcDst->left = MIN(lprcSrc1->left,lprcSrc2->left);
322 lprcDst->right = MAX(lprcSrc1->right,lprcSrc2->right);
323 lprcDst->top = MIN(lprcSrc1->top,lprcSrc2->top);
324 lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom);
325 }
326 }
327
328 return TRUE;
329}
330
331/* String Manipulation Functions */
332
333int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
334{
335 int rc;
336 va_list argptr;
337
338#ifdef DEBUG
339 WriteLog("USER32: wsprintfA\n");
340 WriteLog("USER32: %s\n", lpFmt);
341#endif
342 va_start(argptr, lpFmt);
343 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
344 va_end(argptr);
345#ifdef DEBUG
346 WriteLog("USER32: %s\n", lpOut);
347#endif
348 return(rc);
349}
350//******************************************************************************
351//******************************************************************************
352int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
353{
354 int rc;
355 char *lpFmtA;
356 char szOut[512];
357 va_list argptr;
358
359 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
360 lpOut,
361 lpFmt));
362
363 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
364
365 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
366 {
367 PCHAR pszTemp;
368 PCHAR pszTemp1;
369 ULONG ulStrings;
370 ULONG ulIndex; /* temporary string counter */
371
372 for (ulStrings = 0, /* determine number of placeholders */
373 pszTemp = lpFmtA;
374
375 (pszTemp != NULL) &&
376 (*pszTemp != 0);
377
378 ulStrings++)
379 {
380 pszTemp = strstr(pszTemp,
381 "%s");
382 if (pszTemp != NULL) /* skip 2 characters */
383 {
384 pszTemp++;
385 pszTemp++;
386 }
387 else
388 break; /* leave loop immediately */
389 }
390
391 if (ulStrings != 0) /* transformation required ? */
392 {
393 /* now reallocate lpFmt */
394 ulStrings += strlen(lpFmtA); /* calculate total string length */
395 pszTemp = lpFmtA; /* save string pointer */
396 pszTemp1 = lpFmtA; /* save string pointer */
397
398 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
399 lpFmtA = (char *)malloc(ulStrings + 1);
400 if (lpFmtA == NULL) /* check proper allocation */
401 return (0); /* raise error condition */
402
403 for (ulIndex = 0;
404 ulIndex <= ulStrings;
405 ulIndex++,
406 pszTemp++)
407 {
408 if ((pszTemp[0] == '%') &&
409 (pszTemp[1] == 's') )
410 {
411 /* replace %s by %ls */
412 lpFmtA[ulIndex++] = '%';
413 lpFmtA[ulIndex ] = 'l';
414 lpFmtA[ulIndex+1] = 's';
415 }
416 else
417 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
418 }
419
420 lpFmtA[ulStrings] = 0; /* string termination */
421
422 FreeAsciiString(pszTemp1); /* the original string is obsolete */
423 }
424 }
425
426 dprintf(("USER32: wsprintfW (%s).\n",
427 lpFmt));
428
429 va_start(argptr,
430 lpFmt);
431
432 rc = O32_wvsprintf(szOut,
433 lpFmtA,
434 argptr);
435
436 AsciiToUnicode(szOut,
437 lpOut);
438
439 FreeAsciiString(lpFmtA);
440 return(rc);
441}
442//******************************************************************************
443//******************************************************************************
444int WIN32API wvsprintfA( LPSTR lpOutput, LPCSTR lpFormat, va_list arglist)
445{
446#ifdef DEBUG
447 WriteLog("USER32: wvsprintfA\n");
448#endif
449 return O32_wvsprintf(lpOutput,lpFormat,(LPCVOID*)arglist);
450}
451//******************************************************************************
452//******************************************************************************
453int WIN32API wvsprintfW(LPWSTR lpOutput, LPCWSTR lpFormat, va_list arglist)
454{
455 int rc;
456 char szOut[256];
457 char *lpFmtA;
458
459 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFormat);
460#ifdef DEBUG
461 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
462 WriteLog("USER32: %s\n", lpFormat);
463#endif
464 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)arglist);
465
466 AsciiToUnicode(szOut, lpOutput);
467#ifdef DEBUG
468 WriteLog("USER32: %s\n", lpOutput);
469#endif
470 FreeAsciiString(lpFmtA);
471 return(rc);
472}
473
474/* Cursor Functions */
475
476BOOL WIN32API ClipCursor(const RECT * lpRect)
477{
478#ifdef DEBUG
479 WriteLog("USER32: ClipCursor\n");
480#endif
481 return O32_ClipCursor(lpRect);
482}
483//******************************************************************************
484//******************************************************************************
485HCURSOR WIN32API CreateCursor( HINSTANCE hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, const VOID *pvANDPlane, const VOID *pvXORPlane)
486{
487#ifdef DEBUG
488 WriteLog("USER32: CreateCursor\n");
489#endif
490 return O32_CreateCursor(hInst,xHotSpot,yHotSpot,nWidth,nHeight,pvANDPlane,pvXORPlane);
491}
492//******************************************************************************
493//******************************************************************************
494BOOL WIN32API DestroyCursor( HCURSOR hCursor)
495{
496#ifdef DEBUG
497 WriteLog("USER32: DestroyCursor\n");
498#endif
499 return O32_DestroyCursor(hCursor);
500}
501//******************************************************************************
502//******************************************************************************
503BOOL WIN32API GetClipCursor( LPRECT lpRect)
504{
505#ifdef DEBUG
506 WriteLog("USER32: GetClipCursor\n");
507#endif
508 return O32_GetClipCursor(lpRect);
509}
510//******************************************************************************
511//******************************************************************************
512HCURSOR WIN32API GetCursor(void)
513{
514#ifdef DEBUG
515//// WriteLog("USER32: GetCursor\n");
516#endif
517 return O32_GetCursor();
518}
519//******************************************************************************
520//******************************************************************************
521BOOL WIN32API GetCursorPos( PPOINT lpPoint)
522{
523 BOOL rc;
524 POINT point;
525#ifdef DEBUG
526//// WriteLog("USER32: GetCursorPos\n");
527#endif
528 if (!lpPoint) return FALSE;
529 if (OSLibWinQueryPointerPos(OSLIB_HWND_DESKTOP,&point)) //POINT == POINTL
530 {
531 OS2ToWin32ScreenPos(lpPoint,&point);
532 return TRUE;
533 } else return FALSE;
534}
535/*****************************************************************************
536 * Name : HCURSOR WIN32API LoadCursorFromFileA
537 * Purpose : The LoadCursorFromFile function creates a cursor based on data
538 * contained in a file. The file is specified by its name or by a
539 * system cursor identifier. The function returns a handle to the
540 * newly created cursor. Files containing cursor data may be in
541 * either cursor (.CUR) or animated cursor (.ANI) format.
542 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
543 * Variables :
544 * Result : If the function is successful, the return value is a handle to
545 * the new cursor.
546 * If the function fails, the return value is NULL. To get extended
547 * error information, call GetLastError. GetLastError may return
548 * the following
549 * Remark :
550 * Status : UNTESTED STUB
551 *
552 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
553 *****************************************************************************/
554HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
555{
556 if (!HIWORD(lpFileName))
557 {
558 return LoadCursorA(NULL,lpFileName);
559 } else
560 {
561 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
562 lpFileName));
563
564 return (NULL);
565 }
566}
567/*****************************************************************************
568 * Name : HCURSOR WIN32API LoadCursorFromFileW
569 * Purpose : The LoadCursorFromFile function creates a cursor based on data
570 * contained in a file. The file is specified by its name or by a
571 * system cursor identifier. The function returns a handle to the
572 * newly created cursor. Files containing cursor data may be in
573 * either cursor (.CUR) or animated cursor (.ANI) format.
574 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
575 * Variables :
576 * Result : If the function is successful, the return value is a handle to
577 * the new cursor.
578 * If the function fails, the return value is NULL. To get extended
579 * error information, call GetLastError. GetLastError may return
580 * the following
581 * Remark :
582 * Status : UNTESTED STUB
583 *
584 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
585 *****************************************************************************/
586HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
587{
588 if (!HIWORD(lpFileName))
589 {
590 return LoadCursorW(NULL,lpFileName);
591 } else
592 {
593 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
594 lpFileName));
595
596 return (NULL);
597 }
598}
599//******************************************************************************
600//******************************************************************************
601HCURSOR WIN32API SetCursor( HCURSOR hcur)
602{
603 HCURSOR rc;
604
605 rc = O32_SetCursor(hcur);
606 dprintf(("USER32: SetCursor %x (prev %x (%x))\n", hcur, rc, O32_GetCursor()));
607 return rc;
608}
609//******************************************************************************
610//******************************************************************************
611BOOL WIN32API SetCursorPos( int X, int Y)
612{
613#ifdef DEBUG
614 WriteLog("USER32: SetCursorPos\n");
615#endif
616 return O32_SetCursorPos(X,Y);
617}
618/*****************************************************************************
619 * Name : BOOL WIN32API SetSystemCursor
620 * Purpose : The SetSystemCursor function replaces the contents of the system
621 * cursor specified by dwCursorId with the contents of the cursor
622 * specified by hCursor, and then destroys hCursor. This function
623 * lets an application customize the system cursors.
624 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
625 * contents, then destroy this
626 * DWORD dwCursorID system cursor specified by its identifier
627 * Variables :
628 * Result : If the function succeeds, the return value is TRUE.
629 * If the function fails, the return value is FALSE. To get extended
630 * error information, call GetLastError.
631 * Remark :
632 * Status : UNTESTED STUB
633 *
634 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
635 *****************************************************************************/
636BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
637 DWORD dwCursorId)
638{
639 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not supported.\n",
640 hCursor,
641 dwCursorId));
642
643 return DestroyCursor(hCursor);
644}
645//******************************************************************************
646//******************************************************************************
647int WIN32API ShowCursor( BOOL bShow)
648{
649#ifdef DEBUG
650 WriteLog("USER32: ShowCursor\n");
651#endif
652 return O32_ShowCursor(bShow);
653}
654
655/* Mouse Input Functions */
656
657/*****************************************************************************
658 * Name : BOOL WIN32API DragDetect
659 * Purpose : The DragDetect function captures the mouse and tracks its movement
660 * Parameters: HWND hwnd
661 * POINT pt
662 * Variables :
663 * Result : If the user moved the mouse outside of the drag rectangle while
664 * holding the left button down, the return value is TRUE.
665 * If the user did not move the mouse outside of the drag rectangle
666 * while holding the left button down, the return value is FALSE.
667 * Remark :
668 * Status : UNTESTED STUB
669 *
670 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
671 *****************************************************************************/
672BOOL WIN32API DragDetect(HWND hwnd,
673 POINT pt)
674{
675 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
676 hwnd));
677
678 return (FALSE);
679}
680//******************************************************************************
681//******************************************************************************
682HWND WIN32API GetCapture(void)
683{
684#ifdef DEBUG
685 WriteLog("USER32: GetCapture\n");
686#endif
687 return Win32Window::OS2ToWin32Handle(O32_GetCapture());
688}
689//******************************************************************************
690//******************************************************************************
691UINT WIN32API GetDoubleClickTime(void)
692{
693#ifdef DEBUG
694 WriteLog("USER32: GetDoubleClickTime\n");
695#endif
696 return O32_GetDoubleClickTime();
697}
698/*****************************************************************************
699 * Name : VOID WIN32API mouse_event
700 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
701 * Parameters: DWORD dwFlags flags specifying various motion/click variants
702 * DWORD dx horizontal mouse position or position change
703 * DWORD dy vertical mouse position or position change
704 * DWORD cButtons unused, reserved for future use, set to zero
705 * DWORD dwExtraInfo 32 bits of application-defined information
706 * Variables :
707 * Result :
708 * Remark :
709 * Status : UNTESTED STUB
710 *
711 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
712 *****************************************************************************/
713VOID WIN32API mouse_event(DWORD dwFlags,
714 DWORD dx,
715 DWORD dy,
716 DWORD cButtons,
717 DWORD dwExtraInfo)
718{
719 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
720 dwFlags,
721 dx,
722 dy,
723 cButtons,
724 dwExtraInfo));
725}
726//******************************************************************************
727//******************************************************************************
728BOOL WIN32API ReleaseCapture(void)
729{
730#ifdef DEBUG
731 WriteLog("USER32: ReleaseCapture\n");
732#endif
733 return O32_ReleaseCapture();
734}
735//******************************************************************************
736//******************************************************************************
737HWND WIN32API SetCapture( HWND hwnd)
738{
739#ifdef DEBUG
740 WriteLog("USER32: SetCapture\n");
741#endif
742 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
743 return Win32Window::OS2ToWin32Handle(O32_SetCapture(hwnd));
744}
745//******************************************************************************
746//******************************************************************************
747BOOL WIN32API SetDoubleClickTime( UINT uInterval)
748{
749#ifdef DEBUG
750 WriteLog("USER32: SetDoubleClickTime\n");
751#endif
752 return O32_SetDoubleClickTime(uInterval);
753}
754//******************************************************************************
755//******************************************************************************
756BOOL WIN32API SwapMouseButton( BOOL fSwap)
757{
758#ifdef DEBUG
759 WriteLog("USER32: SwapMouseButton\n");
760#endif
761 return O32_SwapMouseButton(fSwap);
762}
763
764/* Error Functions */
765
766BOOL WIN32API ExitWindowsEx( UINT uFlags, DWORD dwReserved)
767{
768#ifdef DEBUG
769 WriteLog("USER32: ExitWindowsEx\n");
770#endif
771 return O32_ExitWindowsEx(uFlags,dwReserved);
772}
773//******************************************************************************
774//******************************************************************************
775BOOL WIN32API MessageBeep( UINT uType)
776{
777 INT flStyle;
778
779#ifdef DEBUG
780 WriteLog("USER32: MessageBeep\n");
781#endif
782
783 switch (uType)
784 {
785 case 0xFFFFFFFF:
786 OSLibDosBeep(500,50);
787 return TRUE;
788 case MB_ICONASTERISK:
789 flStyle = WAOS_NOTE;
790 break;
791 case MB_ICONEXCLAMATION:
792 flStyle = WAOS_WARNING;
793 break;
794 case MB_ICONHAND:
795 case MB_ICONQUESTION:
796 case MB_OK:
797 flStyle = WAOS_NOTE;
798 break;
799 default:
800 flStyle = WAOS_ERROR; //CB: should be right
801 break;
802 }
803 return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle);
804}
805//******************************************************************************
806//2nd parameter not used according to SDK (yet?)
807//******************************************************************************
808VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
809{
810#ifdef DEBUG
811 WriteLog("USER32: SetLastErrorEx\n");
812#endif
813 SetLastError(dwErrCode);
814}
815
816/* Accessibility Functions */
817
818int WIN32API GetSystemMetrics(int nIndex)
819{
820 int rc = 0;
821
822 switch(nIndex) {
823 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
824 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXICON);
825 //CB: return standard windows icon size?
826 //rc = 32;
827 break;
828 case SM_CYICONSPACING:
829 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYICON);
830 //read SM_CXICONSPACING comment
831 //rc = 32;
832 break;
833 case SM_PENWINDOWS:
834 rc = FALSE;
835 break;
836 case SM_DBCSENABLED:
837 rc = FALSE;
838 break;
839 case SM_CXEDGE: //size of 3D window edge (not supported)
840 rc = 1;
841 break;
842 case SM_CYEDGE:
843 rc = 1;
844 break;
845 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
846 //CB: replace with const
847 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
848 break;
849 case SM_CYMINSPACING:
850 //CB: replace with const
851 rc = GetSystemMetrics(SM_CYMINIMIZED);
852 break;
853 case SM_CXICON:
854 case SM_CYICON:
855 rc = 32; //CB: Win32: only 32x32, OS/2 32x32/40x40
856 // we must implement 32x32 for all screen resolutions
857 break;
858 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
859 rc = 16;
860 break;
861 case SM_CYSMICON:
862 rc = 16;
863 break;
864 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
865 rc = 8;
866 break;
867 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
868 rc = 16;
869 break;
870 case SM_CYSMSIZE:
871 rc = 16;
872 break;
873 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
874 rc = 16;
875 break;
876 case SM_CYMENUSIZE:
877 rc = 16;
878 break;
879 case SM_ARRANGE:
880 rc = ARW_BOTTOMLEFT | ARW_LEFT;
881 break;
882 case SM_CXMINIMIZED:
883 break;
884 case SM_CYMINIMIZED:
885 break;
886 case SM_CXMAXTRACK: //max window size
887 case SM_CXMAXIMIZED: //max toplevel window size
888 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
889 break;
890 case SM_CYMAXTRACK:
891 case SM_CYMAXIMIZED:
892 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
893 break;
894 case SM_NETWORK:
895 rc = 0x01; //TODO: default = yes
896 break;
897 case SM_CLEANBOOT:
898 rc = 0; //normal boot
899 break;
900 case SM_CXDRAG: //nr of pixels before drag becomes a real one
901 rc = 2;
902 break;
903 case SM_CYDRAG:
904 rc = 2;
905 break;
906 case SM_SHOWSOUNDS: //show instead of play sound
907 rc = FALSE;
908 break;
909 case SM_CXMENUCHECK:
910 rc = 4; //TODO
911 break;
912 case SM_CYMENUCHECK:
913 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYMENU);
914 break;
915 case SM_SLOWMACHINE:
916 rc = FALSE; //even a slow machine is fast with OS/2 :)
917 break;
918 case SM_MIDEASTENABLED:
919 rc = FALSE;
920 break;
921 case SM_CMETRICS:
922 //CB: replace with const
923 rc = O32_GetSystemMetrics(44); //Open32 changed this one
924 break;
925 default:
926 //better than nothing
927 rc = O32_GetSystemMetrics(nIndex);
928 break;
929 }
930#ifdef DEBUG
931 WriteLog("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc);
932#endif
933 return(rc);
934}
935//******************************************************************************
936/* Not support by Open32 (not included are the new win9x parameters):
937 case SPI_GETFASTTASKSWITCH:
938 case SPI_GETGRIDGRANULARITY:
939 case SPI_GETICONTITLELOGFONT:
940 case SPI_GETICONTITLEWRAP:
941 case SPI_GETMENUDROPALIGNMENT:
942 case SPI_ICONHORIZONTALSPACING:
943 case SPI_ICONVERTICALSPACING:
944 case SPI_LANGDRIVER:
945 case SPI_SETFASTTASKSWITCH:
946 case SPI_SETGRIDGRANULARITY:
947 case SPI_SETICONTITLELOGFONT:
948 case SPI_SETICONTITLEWRAP:
949 case SPI_SETMENUDROPALIGNMENT:
950 case SPI_GETSCREENSAVEACTIVE:
951 case SPI_GETSCREENSAVETIMEOUT:
952 case SPI_SETDESKPATTERN:
953 case SPI_SETDESKWALLPAPER:
954 case SPI_SETSCREENSAVEACTIVE:
955 case SPI_SETSCREENSAVETIMEOUT:
956*/
957//******************************************************************************
958BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
959{
960 BOOL rc = TRUE;
961 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
962
963 switch(uiAction) {
964 case SPI_SCREENSAVERRUNNING:
965 *(BOOL *)pvParam = FALSE;
966 break;
967 case SPI_GETDRAGFULLWINDOWS:
968 *(BOOL *)pvParam = FALSE;
969 break;
970 case SPI_GETNONCLIENTMETRICS:
971 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
972 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
973
974 //CB: fonts not handled by Open32, set to WarpSans
975 lstrcpyA(cmetric->lfCaptionFont.lfFaceName,"WarpSans");
976 cmetric->lfCaptionFont.lfHeight = 9;
977
978 lstrcpyA(cmetric->lfMenuFont.lfFaceName,"WarpSans");
979 cmetric->lfMenuFont.lfHeight = 9;
980
981 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
982 cmetric->lfStatusFont.lfHeight = 9;
983
984 lstrcpyA(cmetric->lfMessageFont.lfFaceName,"WarpSans");
985 cmetric->lfMessageFont.lfHeight = 9;
986
987 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
988 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
989 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
990 cmetric->iCaptionWidth = 32; //TODO
991 cmetric->iCaptionHeight = 16; //TODO
992 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
993 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
994 cmetric->iMenuWidth = 32; //TODO
995 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
996 break;
997 case SPI_GETICONTITLELOGFONT:
998 {
999 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
1000
1001 /* from now on we always have an alias for MS Sans Serif */
1002 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
1003 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
1004 lpLogFont->lfWidth = 0;
1005 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
1006 lpLogFont->lfWeight = FW_NORMAL;
1007 lpLogFont->lfItalic = FALSE;
1008 lpLogFont->lfStrikeOut = FALSE;
1009 lpLogFont->lfUnderline = FALSE;
1010 lpLogFont->lfCharSet = ANSI_CHARSET;
1011 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1012 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1013 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1014 break;
1015 }
1016 case SPI_GETBORDER:
1017 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
1018 break;
1019
1020 case SPI_GETWORKAREA:
1021 SetRect( (RECT *)pvParam, 0, 0,
1022 GetSystemMetrics( SM_CXSCREEN ),
1023 GetSystemMetrics( SM_CYSCREEN )
1024 );
1025 break;
1026
1027 case 104: //TODO: Undocumented
1028 rc = 16;
1029 break;
1030 default:
1031 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
1032 break;
1033 }
1034#ifdef DEBUG
1035 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
1036#endif
1037 return(rc);
1038}
1039//******************************************************************************
1040//TODO: Check for more options that have different structs for Unicode!!!!
1041//******************************************************************************
1042BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
1043{
1044 BOOL rc;
1045 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
1046 NONCLIENTMETRICSA clientMetricsA = {0};
1047 PVOID pvParamA;
1048 UINT uiParamA;
1049
1050 switch(uiAction) {
1051 case SPI_SETNONCLIENTMETRICS:
1052 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
1053 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
1054 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
1055 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
1056 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
1057 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
1058 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
1059 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
1060 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
1061 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
1062 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
1063 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
1064 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
1065 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
1066 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
1067 //no break
1068 case SPI_GETNONCLIENTMETRICS:
1069 uiParamA = sizeof(NONCLIENTMETRICSA);
1070 pvParamA = &clientMetricsA;
1071 break;
1072 case SPI_GETICONTITLELOGFONT:
1073 {
1074 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
1075
1076 /* from now on we always have an alias for MS Sans Serif */
1077 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
1078 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
1079 lpLogFont->lfWidth = 0;
1080 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
1081 lpLogFont->lfWeight = FW_NORMAL;
1082 lpLogFont->lfItalic = FALSE;
1083 lpLogFont->lfStrikeOut = FALSE;
1084 lpLogFont->lfUnderline = FALSE;
1085 lpLogFont->lfCharSet = ANSI_CHARSET;
1086 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1087 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1088 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1089 return TRUE;
1090 }
1091 default:
1092 pvParamA = pvParam;
1093 uiParamA = uiParam;
1094 break;
1095 }
1096 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1097
1098 switch(uiAction) {
1099 case SPI_GETNONCLIENTMETRICS:
1100 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1101 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1102 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1103 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1104 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1105 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1106 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1107
1108 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1109 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1110 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1111
1112 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1113 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1114 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1115 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1116 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1117 break;
1118 }
1119#ifdef DEBUG
1120 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
1121#endif
1122 return(rc);
1123}
1124
1125/* Timer Functions */
1126
1127#if 0
1128BOOL WIN32API KillTimer(HWND hWnd, UINT uIDEvent)
1129{
1130#ifdef DEBUG
1131 WriteLog("USER32: KillTimer\n");
1132#endif
1133 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
1134 //WinStopTimer
1135 //CB: replace
1136 return O32_KillTimer(hWnd,uIDEvent);
1137}
1138//******************************************************************************
1139//******************************************************************************
1140UINT WIN32API SetTimer( HWND hwnd, UINT idTimer, UINT uTimeout, TIMERPROC tmprc)
1141{
1142#ifdef DEBUG
1143 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
1144#endif
1145 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1146 //SvL: Write callback handler class for this one
1147 //CB: replace
1148 return O32_SetTimer(hwnd,idTimer,uTimeout,(TIMERPROC_O32)tmprc);
1149}
1150#endif
1151
1152/* Process and Thread Functions */
1153
1154//******************************************************************************
1155//DWORD idAttach; /* thread to attach */
1156//DWORD idAttachTo; /* thread to attach to */
1157//BOOL fAttach; /* attach or detach */
1158//******************************************************************************
1159BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1160{
1161#ifdef DEBUG
1162 WriteLog("USER32: AttachThreadInput, not implemented\n");
1163#endif
1164 return(TRUE);
1165}
1166//******************************************************************************
1167//TODO:How can we emulate this one in OS/2???
1168//******************************************************************************
1169DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
1170{
1171#ifdef DEBUG
1172 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
1173#endif
1174
1175 if(dwTimeOut == INFINITE) return(0);
1176
1177// DosSleep(dwTimeOut/16);
1178 return(0);
1179}
1180
1181/* Help Functions */
1182
1183DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
1184{
1185#ifdef DEBUG
1186 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
1187#endif
1188 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1189
1190 return(0);
1191}
1192//******************************************************************************
1193//******************************************************************************
1194BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
1195{
1196#ifdef DEBUG
1197 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
1198#endif
1199 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1200
1201 return(TRUE);
1202}
1203//******************************************************************************
1204//******************************************************************************
1205BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
1206{
1207#ifdef DEBUG
1208 WriteLog("USER32: WinHelp not implemented %s\n", lpszHelp);
1209#endif
1210// hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1211// return O32_WinHelp(arg1, arg2, arg3, arg4);
1212
1213 return(TRUE);
1214}
1215//******************************************************************************
1216//******************************************************************************
1217BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
1218{
1219 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1220 BOOL rc;
1221
1222#ifdef DEBUG
1223 WriteLog("USER32: WinHelpW\n");
1224#endif
1225 rc = WinHelpA(arg1, astring, arg3, arg4);
1226 FreeAsciiString(astring);
1227 return rc;
1228}
1229
1230/* Keyboard and Input Functions */
1231
1232BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1233{
1234#ifdef DEBUG
1235 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
1236#endif
1237 return(TRUE);
1238}
1239//******************************************************************************
1240//SvL: 24-6-'97 - Added
1241//TODO: Not implemented
1242//******************************************************************************
1243WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1244{
1245#ifdef DEBUG
1246//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1247#endif
1248 return 0;
1249}
1250/*****************************************************************************
1251 * Name : UINT WIN32API GetKBCodePage
1252 * Purpose : The GetKBCodePage function is provided for compatibility with
1253 * earlier versions of Windows. In the Win32 application programming
1254 * interface (API) it just calls the GetOEMCP function.
1255 * Parameters:
1256 * Variables :
1257 * Result : If the function succeeds, the return value is an OEM code-page
1258 * identifier, or it is the default identifier if the registry
1259 * value is not readable. For a list of OEM code-page identifiers,
1260 * see GetOEMCP.
1261 * Remark :
1262 * Status : UNTESTED
1263 *
1264 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1265 *****************************************************************************/
1266
1267UINT WIN32API GetKBCodePage(VOID)
1268{
1269 return (GetOEMCP());
1270}
1271/*****************************************************************************
1272 * Name : BOOL WIN32API GetKeyboardLayoutNameA
1273 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
1274 * active keyboard layout.
1275 * Parameters: LPTSTR pwszKLID address of buffer for layout name
1276 * Variables :
1277 * Result : If the function succeeds, the return value is TRUE.
1278 * If the function fails, the return value is FALSE. To get extended
1279 * error information, call GetLastError.
1280 * Remark :
1281 * Status : UNTESTED STUB
1282 *
1283 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1284 *****************************************************************************/
1285// @@@PH Win32 BOOL's are casted to INTs
1286INT WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
1287{
1288 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
1289 pwszKLID));
1290
1291 return(FALSE);
1292}
1293//******************************************************************************
1294//******************************************************************************
1295int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
1296{
1297#ifdef DEBUG
1298 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
1299#endif
1300 return(0);
1301}
1302//******************************************************************************
1303//******************************************************************************
1304HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
1305{
1306#ifdef DEBUG
1307 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
1308#endif
1309 return(0);
1310}
1311/*****************************************************************************
1312 * Name : BOOL WIN32API GetKeyboardLayoutNameW
1313 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
1314 * active keyboard layout.
1315 * Parameters: LPTSTR pwszKLID address of buffer for layout name
1316 * Variables :
1317 * Result : If the function succeeds, the return value is TRUE.
1318 * If the function fails, the return value is FALSE. To get extended
1319 * error information, call GetLastError.
1320 * Remark :
1321 * Status : UNTESTED STUB
1322 *
1323 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1324 *****************************************************************************/
1325// @@@PH Win32 BOOL's are casted to INTs
1326INT WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
1327{
1328 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
1329 pwszKLID));
1330
1331 return(FALSE);
1332}
1333//******************************************************************************
1334//******************************************************************************
1335BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
1336{
1337#ifdef DEBUG
1338 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
1339#endif
1340 memset(lpKeyState, 0, 256);
1341 return(TRUE);
1342}
1343//******************************************************************************
1344//******************************************************************************
1345int WIN32API GetKeyNameTextA( LPARAM lParam, LPSTR lpString, int nSize)
1346{
1347#ifdef DEBUG
1348 WriteLog("USER32: GetKeyNameTextA\n");
1349#endif
1350 return O32_GetKeyNameText(lParam,lpString,nSize);
1351}
1352//******************************************************************************
1353//******************************************************************************
1354int WIN32API GetKeyNameTextW( LPARAM lParam, LPWSTR lpString, int nSize)
1355{
1356#ifdef DEBUG
1357 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
1358#endif
1359 // NOTE: This will not work as is (needs UNICODE support)
1360 return 0;
1361// return O32_GetKeyNameText(arg1, arg2, arg3);
1362}
1363//******************************************************************************
1364//SvL: 24-6-'97 - Added
1365//******************************************************************************
1366SHORT WIN32API GetKeyState( int nVirtKey)
1367{
1368#ifdef DEBUG
1369 WriteLog("USER32: GetKeyState %d\n", nVirtKey);
1370#endif
1371 return O32_GetKeyState(nVirtKey);
1372}
1373/*****************************************************************************
1374 * Name : VOID WIN32API keybd_event
1375 * Purpose : The keybd_event function synthesizes a keystroke. The system
1376 * can use such a synthesized keystroke to generate a WM_KEYUP or
1377 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
1378 * the keybd_event function.
1379 * Parameters: BYTE bVk virtual-key code
1380
1381 * BYTE bScan hardware scan code
1382 * DWORD dwFlags flags specifying various function options
1383 * DWORD dwExtraInfo additional data associated with keystroke
1384 * Variables :
1385 * Result :
1386 * Remark :
1387 * Status : UNTESTED STUB
1388 *
1389 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1390 *****************************************************************************/
1391VOID WIN32API keybd_event (BYTE bVk,
1392 BYTE bScan,
1393 DWORD dwFlags,
1394 DWORD dwExtraInfo)
1395{
1396 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
1397 bVk,
1398 bScan,
1399 dwFlags,
1400 dwExtraInfo));
1401}
1402/*****************************************************************************
1403 * Name : HLK WIN32API LoadKeyboardLayoutA
1404 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1405 * the system. Several keyboard layouts can be loaded at a time, but
1406 * only one per process is active at a time. Loading multiple keyboard
1407 * layouts makes it possible to rapidly switch between layouts.
1408 * Parameters:
1409 * Variables :
1410 * Result : If the function succeeds, the return value is the handle of the
1411 * keyboard layout.
1412 * If the function fails, the return value is NULL. To get extended
1413 * error information, call GetLastError.
1414 * Remark :
1415 * Status : UNTESTED STUB
1416 *
1417 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1418 *****************************************************************************/
1419HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
1420 UINT Flags)
1421{
1422 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
1423 pwszKLID,
1424 Flags));
1425
1426 return (NULL);
1427}
1428/*****************************************************************************
1429 * Name : HLK WIN32API LoadKeyboardLayoutW
1430 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1431 * the system. Several keyboard layouts can be loaded at a time, but
1432 * only one per process is active at a time. Loading multiple keyboard
1433 * layouts makes it possible to rapidly switch between layouts.
1434 * Parameters:
1435 * Variables :
1436 * Result : If the function succeeds, the return value is the handle of the
1437 * keyboard layout.
1438 * If the function fails, the return value is NULL. To get extended
1439 * error information, call GetLastError.
1440 * Remark :
1441 * Status : UNTESTED STUB
1442 *
1443 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1444 *****************************************************************************/
1445HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
1446 UINT Flags)
1447{
1448 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
1449 pwszKLID,
1450 Flags));
1451
1452 return (NULL);
1453}
1454//******************************************************************************
1455//******************************************************************************
1456UINT WIN32API MapVirtualKeyA( UINT uCode, UINT uMapType)
1457{
1458#ifdef DEBUG
1459 WriteLog("USER32: MapVirtualKeyA\n");
1460#endif
1461 return O32_MapVirtualKey(uCode,uMapType);
1462}
1463//******************************************************************************
1464//******************************************************************************
1465UINT WIN32API MapVirtualKeyW( UINT uCode, UINT uMapType)
1466{
1467#ifdef DEBUG
1468 WriteLog("USER32: MapVirtualKeyW\n");
1469#endif
1470 // NOTE: This will not work as is (needs UNICODE support)
1471 return O32_MapVirtualKey(uCode,uMapType);
1472}
1473/*****************************************************************************
1474 * Name : UINT WIN32API MapVirtualKeyExA
1475 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1476 * code into a scan code or character value, or translates a scan
1477 * code into a virtual-key code. The function translates the codes
1478 * using the input language and physical keyboard layout identified
1479 * by the given keyboard layout handle.
1480 * Parameters:
1481 * Variables :
1482 * Result : The return value is either a scan code, a virtual-key code, or
1483 * a character value, depending on the value of uCode and uMapType.
1484 * If there is no translation, the return value is zero.
1485 * Remark :
1486 * Status : UNTESTED STUB
1487 *
1488 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1489 *****************************************************************************/
1490UINT WIN32API MapVirtualKeyExA(UINT uCode,
1491 UINT uMapType,
1492 HKL dwhkl)
1493{
1494 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
1495 uCode,
1496 uMapType,
1497 dwhkl));
1498
1499 return (0);
1500}
1501/*****************************************************************************
1502 * Name : UINT WIN32API MapVirtualKeyExW
1503 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1504 * code into a scan code or character value, or translates a scan
1505 * code into a virtual-key code. The function translates the codes
1506 * using the input language and physical keyboard layout identified
1507 * by the given keyboard layout handle.
1508 * Parameters:
1509 * Variables :
1510 * Result : The return value is either a scan code, a virtual-key code, or
1511 * a character value, depending on the value of uCode and uMapType.
1512 * If there is no translation, the return value is zero.
1513 * Remark :
1514 * Status : UNTESTED STUB
1515
1516 *
1517 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1518 *****************************************************************************/
1519UINT WIN32API MapVirtualKeyExW(UINT uCode,
1520 UINT uMapType,
1521 HKL dwhkl)
1522{
1523 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
1524 uCode,
1525 uMapType,
1526 dwhkl));
1527
1528 return (0);
1529}
1530/*****************************************************************************
1531 * Name : DWORD WIN32API OemKeyScan
1532 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
1533 * into the OEM scan codes and shift states. The function provides
1534 * information that allows a program to send OEM text to another
1535 * program by simulating keyboard input.
1536 * Parameters:
1537 * Variables :
1538 * Result :
1539 * Remark :
1540 * Status : UNTESTED STUB
1541 *
1542 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1543 *****************************************************************************/
1544DWORD WIN32API OemKeyScan(WORD wOemChar)
1545{
1546 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
1547 wOemChar));
1548
1549 return (wOemChar);
1550}
1551//******************************************************************************
1552//******************************************************************************
1553BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1554{
1555#ifdef DEBUG
1556 WriteLog("USER32: RegisterHotKey, not implemented\n");
1557#endif
1558 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1559 return(TRUE);
1560}
1561//******************************************************************************
1562//******************************************************************************
1563BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
1564{
1565#ifdef DEBUG
1566 WriteLog("USER32: SetKeyboardState, not implemented\n");
1567#endif
1568 return(TRUE);
1569}
1570/*****************************************************************************
1571 * Name : int WIN32API ToAscii
1572 * Purpose : The ToAscii function translates the specified virtual-key code
1573 * and keyboard state to the corresponding Windows character or characters.
1574 * Parameters: UINT uVirtKey virtual-key code
1575 * UINT uScanCode scan code
1576 * PBYTE lpbKeyState address of key-state array
1577 * LPWORD lpwTransKey buffer for translated key
1578 * UINT fuState active-menu flag
1579 * Variables :
1580 * Result : 0 The specified virtual key has no translation for the current
1581 * state of the keyboard.
1582 * 1 One Windows character was copied to the buffer.
1583 * 2 Two characters were copied to the buffer. This usually happens
1584 * when a dead-key character (accent or diacritic) stored in the
1585 * keyboard layout cannot be composed with the specified virtual
1586 * key to form a single character.
1587 * Remark :
1588 * Status : UNTESTED STUB
1589 *
1590 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1591 *****************************************************************************/
1592int WIN32API ToAscii(UINT uVirtKey,
1593 UINT uScanCode,
1594 PBYTE lpbKeyState,
1595 LPWORD lpwTransKey,
1596 UINT fuState)
1597{
1598 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
1599 uVirtKey,
1600 uScanCode,
1601 lpbKeyState,
1602 lpwTransKey,
1603 fuState));
1604
1605 return (0);
1606}
1607/*****************************************************************************
1608 * Name : int WIN32API ToAsciiEx
1609 * Purpose : The ToAscii function translates the specified virtual-key code
1610 * and keyboard state to the corresponding Windows character or characters.
1611 * Parameters: UINT uVirtKey virtual-key code
1612 * UINT uScanCode scan code
1613 * PBYTE lpbKeyState address of key-state array
1614 * LPWORD lpwTransKey buffer for translated key
1615 * UINT fuState active-menu flag
1616 * HLK hlk keyboard layout handle
1617 * Variables :
1618 * Result : 0 The specified virtual key has no translation for the current
1619 * state of the keyboard.
1620 * 1 One Windows character was copied to the buffer.
1621 * 2 Two characters were copied to the buffer. This usually happens
1622 * when a dead-key character (accent or diacritic) stored in the
1623 * keyboard layout cannot be composed with the specified virtual
1624 * key to form a single character.
1625 * Remark :
1626 * Status : UNTESTED STUB
1627 *
1628 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1629 *****************************************************************************/
1630int WIN32API ToAsciiEx(UINT uVirtKey,
1631 UINT uScanCode,
1632 PBYTE lpbKeyState,
1633 LPWORD lpwTransKey,
1634 UINT fuState,
1635 HKL hkl)
1636{
1637 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1638 uVirtKey,
1639 uScanCode,
1640 lpbKeyState,
1641 lpwTransKey,
1642 fuState,
1643 hkl));
1644
1645 return (0);
1646}
1647/*****************************************************************************
1648 * Name : int WIN32API ToUnicode
1649 * Purpose : The ToUnicode function translates the specified virtual-key code
1650 * and keyboard state to the corresponding Unicode character or characters.
1651 * Parameters: UINT wVirtKey virtual-key code
1652 * UINT wScanCode scan code
1653 * PBYTE lpKeyState address of key-state array
1654 * LPWSTR pwszBuff buffer for translated key
1655 * int cchBuff size of translated key buffer
1656 * UINT wFlags set of function-conditioning flags
1657 * Variables :
1658 * Result : - 1 The specified virtual key is a dead-key character (accent or
1659 * diacritic). This value is returned regardless of the keyboard
1660 * layout, even if several characters have been typed and are
1661 * stored in the keyboard state. If possible, even with Unicode
1662 * keyboard layouts, the function has written a spacing version of
1663 * the dead-key character to the buffer specified by pwszBuffer.
1664 * For example, the function writes the character SPACING ACUTE
1665 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
1666 * 0 The specified virtual key has no translation for the current
1667 * state of the keyboard. Nothing was written to the buffer
1668 * specified by pwszBuffer.
1669 * 1 One character was written to the buffer specified by pwszBuffer.
1670 * 2 or more Two or more characters were written to the buffer specified by
1671 * pwszBuff. The most common cause for this is that a dead-key
1672 * character (accent or diacritic) stored in the keyboard layout
1673 * could not be combined with the specified virtual key to form a
1674 * single character.
1675 * Remark :
1676 * Status : UNTESTED STUB
1677 *
1678 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1679 *****************************************************************************/
1680int WIN32API ToUnicode(UINT uVirtKey,
1681 UINT uScanCode,
1682 PBYTE lpKeyState,
1683 LPWSTR pwszBuff,
1684 int cchBuff,
1685 UINT wFlags)
1686{
1687 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1688 uVirtKey,
1689 uScanCode,
1690 lpKeyState,
1691 pwszBuff,
1692 cchBuff,
1693 wFlags));
1694
1695 return (0);
1696}
1697/*****************************************************************************
1698 * Name : BOOL WIN32API UnloadKeyboardLayout
1699 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
1700 * Parameters: HKL hkl handle of keyboard layout
1701 * Variables :
1702 * Result : If the function succeeds, the return value is the handle of the
1703 * keyboard layout; otherwise, it is NULL. To get extended error
1704 * information, use the GetLastError function.
1705 * Remark :
1706 * Status : UNTESTED STUB
1707 *
1708 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1709 *****************************************************************************/
1710BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
1711{
1712 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
1713 hkl));
1714
1715 return (0);
1716}
1717//******************************************************************************
1718//******************************************************************************
1719BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1720{
1721#ifdef DEBUG
1722 WriteLog("USER32: UnregisterHotKey, not implemented\n");
1723#endif
1724 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1725
1726 return(TRUE);
1727}
1728//******************************************************************************
1729//SvL: 24-6-'97 - Added
1730//******************************************************************************
1731WORD WIN32API VkKeyScanA( char ch)
1732{
1733#ifdef DEBUG
1734 WriteLog("USER32: VkKeyScanA\n");
1735#endif
1736 return O32_VkKeyScan(ch);
1737}
1738//******************************************************************************
1739//******************************************************************************
1740WORD WIN32API VkKeyScanW( WCHAR wch)
1741{
1742#ifdef DEBUG
1743 WriteLog("USER32: VkKeyScanW\n");
1744#endif
1745 // NOTE: This will not work as is (needs UNICODE support)
1746 return O32_VkKeyScan((char)wch);
1747}
1748/*****************************************************************************
1749 * Name : SHORT WIN32API VkKeyScanExW
1750 * Purpose : The VkKeyScanEx function translates a character to the
1751 * corresponding virtual-key code and shift state. The function
1752 * translates the character using the input language and physical
1753 * keyboard layout identified by the given keyboard layout handle.
1754 * Parameters: UINT uChar character to translate
1755 * HKL hkl keyboard layout handle
1756 * Variables :
1757 * Result : see docs
1758 * Remark :
1759 * Status : UNTESTED STUB
1760 *
1761 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1762 *****************************************************************************/
1763WORD WIN32API VkKeyScanExW(WCHAR uChar,
1764 HKL hkl)
1765{
1766 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
1767 uChar,
1768 hkl));
1769
1770 return (uChar);
1771}
1772/*****************************************************************************
1773 * Name : SHORT WIN32API VkKeyScanExA
1774 * Purpose : The VkKeyScanEx function translates a character to the
1775 * corresponding virtual-key code and shift state. The function
1776 * translates the character using the input language and physical
1777 * keyboard layout identified by the given keyboard layout handle.
1778 * Parameters: UINT uChar character to translate
1779 * HKL hkl keyboard layout handle
1780 * Variables :
1781 * Result : see docs
1782 * Remark :
1783 * Status : UNTESTED STUB
1784 *
1785 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1786 *****************************************************************************/
1787WORD WIN32API VkKeyScanExA(CHAR uChar,
1788 HKL hkl)
1789{
1790 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
1791 uChar,
1792 hkl));
1793
1794 return (uChar);
1795}
1796
1797/* Synchronization Functions */
1798
1799DWORD WIN32API MsgWaitForMultipleObjects( DWORD nCount, LPHANDLE pHandles, BOOL fWaitAll, DWORD dwMilliseconds, DWORD dwWakeMask)
1800{
1801#ifdef DEBUG
1802 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1803#endif
1804 return O32_MsgWaitForMultipleObjects(nCount,pHandles,fWaitAll,dwMilliseconds,dwWakeMask);
1805}
1806
1807/* Button Functions */
1808
1809BOOL WIN32API CheckRadioButton( HWND hDlg, UINT nIDFirstButton, UINT nIDLastButton, UINT nIDCheckButton)
1810{
1811#ifdef DEBUG
1812 WriteLog("USER32: CheckRadioButton\n");
1813#endif
1814 //CB: check radio buttons in interval
1815 if (nIDFirstButton > nIDLastButton)
1816 {
1817 SetLastError(ERROR_INVALID_PARAMETER);
1818 return (FALSE);
1819 }
1820
1821 for (UINT x = nIDFirstButton;x <= nIDLastButton;x++)
1822 {
1823 SendDlgItemMessageA(hDlg,x,BM_SETCHECK,(x == nIDCheckButton) ? BST_CHECKED : BST_UNCHECKED,0);
1824 }
1825
1826 return (TRUE);
1827}
1828
1829/* Window Functions */
1830
1831/*****************************************************************************
1832 * Name : BOOL WIN32API AnyPopup
1833 * Purpose : The AnyPopup function indicates whether an owned, visible,
1834 * top-level pop-up, or overlapped window exists on the screen. The
1835 * function searches the entire Windows screen, not just the calling
1836 * application's client area.
1837 * Parameters: VOID
1838 * Variables :
1839 * Result : If a pop-up window exists, the return value is TRUE even if the
1840 * pop-up window is completely covered by other windows. Otherwise,
1841 * it is FALSE.
1842 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1843 * compatibility purposes. It is generally not useful.
1844 * Status : UNTESTED STUB
1845 *
1846 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1847 *****************************************************************************/
1848BOOL WIN32API AnyPopup(VOID)
1849{
1850 dprintf(("USER32:AnyPopup() not implemented.\n"));
1851
1852 return (FALSE);
1853}
1854//******************************************************************************
1855//******************************************************************************
1856BOOL WIN32API EndDeferWindowPos( HDWP hWinPosInfo)
1857{
1858#ifdef DEBUG
1859 WriteLog("USER32: EndDeferWindowPos\n");
1860#endif
1861 return O32_EndDeferWindowPos(hWinPosInfo);
1862}
1863//******************************************************************************
1864//******************************************************************************
1865HWND WIN32API FindWindowW( LPCWSTR lpClassName, LPCWSTR lpWindowName)
1866{
1867 char *astring1 = UnicodeToAsciiString((LPWSTR)lpClassName);
1868 char *astring2 = UnicodeToAsciiString((LPWSTR)lpWindowName);
1869 HWND rc;
1870
1871#ifdef DEBUG
1872 WriteLog("USER32: FindWindowW\n");
1873#endif
1874 rc = O32_FindWindow(astring1, astring2);
1875 FreeAsciiString(astring1);
1876 FreeAsciiString(astring2);
1877 return rc;
1878}
1879//******************************************************************************
1880//******************************************************************************
1881HWND WIN32API GetForegroundWindow(void)
1882{
1883#ifdef DEBUG
1884 WriteLog("USER32: GetForegroundWindow\n");
1885#endif
1886 return Win32Window::OS2ToWin32Handle(O32_GetForegroundWindow());
1887}
1888//******************************************************************************
1889//******************************************************************************
1890HWND WIN32API GetLastActivePopup( HWND hWnd)
1891{
1892#ifdef DEBUG
1893 WriteLog("USER32: GetLastActivePopup\n");
1894#endif
1895 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
1896
1897 return Win32Window::OS2ToWin32Handle(O32_GetLastActivePopup(hWnd));
1898}
1899//******************************************************************************
1900//******************************************************************************
1901DWORD WIN32API GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
1902{
1903#ifdef DEBUG
1904 WriteLog("USER32: GetWindowThreadProcessId\n");
1905#endif
1906 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
1907
1908 return O32_GetWindowThreadProcessId(hWnd,lpdwProcessId);
1909}
1910
1911/* Painting and Drawing Functions */
1912
1913INT WIN32API ExcludeUpdateRgn( HDC hDC, HWND hWnd)
1914{
1915#ifdef DEBUG
1916 WriteLog("USER32: ExcludeUpdateRgn\n");
1917#endif
1918 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
1919
1920 return O32_ExcludeUpdateRgn(hDC,hWnd);
1921}
1922//******************************************************************************
1923//******************************************************************************
1924#if 0
1925int WIN32API GetUpdateRgn( HWND hWnd, HRGN hRgn, BOOL bErase)
1926{
1927#ifdef DEBUG
1928 WriteLog("USER32: GetUpdateRgn\n");
1929#endif
1930 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
1931
1932 return O32_GetUpdateRgn(hWnd,hRgn,bErase);
1933}
1934#endif
1935/*****************************************************************************
1936 * Name : int WIN32API GetWindowRgn
1937 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
1938 * Parameters: HWND hWnd handle to window whose window region is to be obtained
1939 * HRGN hRgn handle to region that receives a copy of the window region
1940 * Variables :
1941 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
1942 * Remark :
1943 * Status : UNTESTED STUB
1944 *
1945 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1946 *****************************************************************************/
1947
1948int WIN32API GetWindowRgn (HWND hWnd,
1949 HRGN hRgn)
1950{
1951 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
1952 hWnd,
1953 hRgn));
1954 //Attention: Win32 hwnd handle!
1955
1956 return (NULLREGION);
1957}
1958//******************************************************************************
1959//TODO: Not complete
1960//******************************************************************************
1961BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1962 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1963 int nHeight)
1964{
1965 BOOL rc;
1966 COLORREF curclr;
1967
1968#ifdef DEBUG
1969 WriteLog("USER32: GrayStringA, not completely implemented\n");
1970#endif
1971 if(lpOutputFunc == NULL && lpData == NULL) {
1972#ifdef DEBUG
1973 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1974#endif
1975 return(FALSE);
1976 }
1977 if(lpOutputFunc) {
1978 return(lpOutputFunc(hdc, lpData, nCount));
1979 }
1980 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1981 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
1982 SetTextColor(hdc, curclr);
1983
1984 return(rc);
1985}
1986//******************************************************************************
1987//******************************************************************************
1988BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1989 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1990 int nHeight)
1991{
1992 BOOL rc;
1993 char *astring;
1994 COLORREF curclr;
1995
1996#ifdef DEBUG
1997 WriteLog("USER32: GrayStringW, not completely implemented\n");
1998#endif
1999
2000 if(lpOutputFunc == NULL && lpData == NULL) {
2001#ifdef DEBUG
2002 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
2003#endif
2004 return(FALSE);
2005 }
2006 if(nCount == 0)
2007 nCount = UniStrlen((UniChar*)lpData);
2008
2009 if(lpOutputFunc) {
2010 return(lpOutputFunc(hdc, lpData, nCount));
2011 }
2012 astring = UnicodeToAsciiString((LPWSTR)lpData);
2013
2014 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
2015 rc = TextOutA(hdc, X, Y, astring, nCount);
2016 SetTextColor(hdc, curclr);
2017
2018 FreeAsciiString(astring);
2019 return(rc);
2020}
2021//******************************************************************************
2022//******************************************************************************
2023#if 0
2024BOOL WIN32API InvalidateRgn( HWND hWnd, HRGN hRgn, BOOL bErase)
2025{
2026#ifdef DEBUG
2027 WriteLog("USER32: InvalidateRgn\n");
2028#endif
2029 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
2030
2031 return O32_InvalidateRgn(hWnd,hRgn,bErase);
2032}
2033#endif
2034/*****************************************************************************
2035 * Name : BOOL WIN32API PaintDesktop
2036 * Purpose : The PaintDesktop function fills the clipping region in the
2037 * specified device context with the desktop pattern or wallpaper.
2038 * The function is provided primarily for shell desktops.
2039 * Parameters:
2040 * Variables :
2041 * Result : If the function succeeds, the return value is TRUE.
2042 * If the function fails, the return value is FALSE.
2043 * Remark :
2044 * Status : UNTESTED STUB
2045 *
2046 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2047 *****************************************************************************/
2048BOOL WIN32API PaintDesktop(HDC hdc)
2049{
2050 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
2051 hdc));
2052
2053 return (FALSE);
2054}
2055/*****************************************************************************
2056 * Name : int WIN32API SetWindowRgn
2057 * Purpose : The SetWindowRgn function sets the window region of a window. The
2058 * window region determines the area within the window where the
2059 * operating system permits drawing. The operating system does not
2060 * display any portion of a window that lies outside of the window region
2061 * Parameters: HWND hWnd handle to window whose window region is to be set
2062 * HRGN hRgn handle to region
2063 * BOOL bRedraw window redraw flag
2064 * Variables :
2065 * Result : If the function succeeds, the return value is non-zero.
2066 * If the function fails, the return value is zero.
2067 * Remark :
2068 * Status : UNTESTED STUB
2069 *
2070 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2071 *****************************************************************************/
2072
2073int WIN32API SetWindowRgn(HWND hWnd,
2074 HRGN hRgn,
2075 BOOL bRedraw)
2076{
2077 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
2078 hWnd,
2079 hRgn,
2080 bRedraw));
2081 //Attention: Win32 hwnd handle!
2082
2083 return (0);
2084}
2085//******************************************************************************
2086//******************************************************************************
2087BOOL WIN32API ValidateRect( HWND hwnd, const RECT * lprc)
2088{
2089#ifdef DEBUG
2090 WriteLog("USER32: ValidateRect\n");
2091#endif
2092 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
2093
2094 return O32_ValidateRect(hwnd,lprc);
2095}
2096//******************************************************************************
2097//******************************************************************************
2098BOOL WIN32API ValidateRgn( HWND hwnd, HRGN hrgn)
2099{
2100#ifdef DEBUG
2101 WriteLog("USER32: ValidateRgn\n");
2102#endif
2103 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
2104
2105 return O32_ValidateRgn(hwnd,hrgn);
2106}
2107
2108/* Filled Shape Functions */
2109
2110
2111int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
2112{
2113#ifdef DEBUG
2114 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", lprc->left, lprc->top, lprc->right, lprc->bottom, hbr);
2115#endif
2116 return O32_FillRect(hDC,lprc,hbr);
2117}
2118//******************************************************************************
2119//******************************************************************************
2120int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr)
2121{
2122#ifdef DEBUG
2123 WriteLog("USER32: FrameRect\n");
2124#endif
2125 return O32_FrameRect(hDC,lprc,hbr);
2126}
2127//******************************************************************************
2128//******************************************************************************
2129BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
2130{
2131#ifdef DEBUG
2132 WriteLog("USER32: InvertRect\n");
2133#endif
2134 return O32_InvertRect(hDC,lprc);
2135}
2136
2137/* System Information Functions */
2138
2139int WIN32API GetKeyboardType( int nTypeFlag)
2140{
2141#ifdef DEBUG
2142 WriteLog("USER32: GetKeyboardType\n");
2143#endif
2144 return O32_GetKeyboardType(nTypeFlag);
2145}
2146/*****************************************************************************
2147 * Name : HDESK WIN32API GetThreadDesktop
2148 * Purpose : The GetThreadDesktop function returns a handle to the desktop
2149 * associated with a specified thread.
2150 * Parameters: DWORD dwThreadId thread identifier
2151 * Variables :
2152 * Result : If the function succeeds, the return value is the handle of the
2153 * desktop associated with the specified thread.
2154 * Remark :
2155 * Status : UNTESTED STUB
2156 *
2157 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2158 *****************************************************************************/
2159HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
2160{
2161 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
2162 dwThreadId));
2163
2164 return (NULL);
2165}
2166
2167/* Message and Message Queue Functions */
2168
2169/*****************************************************************************
2170 * Name : BOOL WIN32API GetInputState
2171 * Purpose : The GetInputState function determines whether there are
2172 * mouse-button or keyboard messages in the calling thread's message queue.
2173 * Parameters:
2174 * Variables :
2175 * Result : If the queue contains one or more new mouse-button or keyboard
2176 * messages, the return value is TRUE.
2177 * If the function fails, the return value is FALSE.
2178 * Remark :
2179 * Status : UNTESTED STUB
2180 *
2181 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2182 *****************************************************************************/
2183BOOL WIN32API GetInputState(VOID)
2184{
2185 dprintf(("USER32:GetInputState () not implemented.\n"));
2186
2187 return (FALSE);
2188}
2189//******************************************************************************
2190//******************************************************************************
2191DWORD WIN32API GetQueueStatus( UINT flags)
2192{
2193#ifdef DEBUG
2194 WriteLog("USER32: GetQueueStatus\n");
2195#endif
2196 return O32_GetQueueStatus(flags);
2197}
2198
2199/* Font and Text Functions */
2200
2201DWORD WIN32API GetTabbedTextExtentA( HDC hDC, LPCSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions)
2202{
2203#ifdef DEBUG
2204 WriteLog("USER32: GetTabbedTextExtentA\n");
2205#endif
2206 return O32_GetTabbedTextExtent(hDC,lpString,nCount,nTabPositions,lpnTabStopPositions);
2207}
2208//******************************************************************************
2209//******************************************************************************
2210DWORD WIN32API GetTabbedTextExtentW( HDC hDC, LPCWSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions)
2211{
2212 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
2213 DWORD rc;
2214
2215#ifdef DEBUG
2216 WriteLog("USER32: GetTabbedTextExtentW\n");
2217#endif
2218 rc = O32_GetTabbedTextExtent(hDC,astring,nCount,nTabPositions,lpnTabStopPositions);
2219 FreeAsciiString(astring);
2220 return rc;
2221}
2222//******************************************************************************
2223//******************************************************************************
2224LONG WIN32API TabbedTextOutA( HDC hdc, int x, int y, LPCSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin)
2225{
2226#ifdef DEBUG
2227 WriteLog("USER32: TabbedTextOutA\n");
2228#endif
2229 return O32_TabbedTextOut(hdc,x,y,lpString,nCount,nTabPositions,lpnTabStopPositions,nTabOrigin);
2230}
2231//******************************************************************************
2232//******************************************************************************
2233LONG WIN32API TabbedTextOutW( HDC hdc, int x, int y, LPCWSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin)
2234{
2235 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
2236 LONG rc;
2237
2238#ifdef DEBUG
2239 WriteLog("USER32: TabbedTextOutW\n");
2240#endif
2241 rc = O32_TabbedTextOut(hdc,x,y,astring,nCount,nTabPositions,lpnTabStopPositions,nTabOrigin);
2242 FreeAsciiString(astring);
2243 return rc;
2244}
2245
2246/* Dialog Box Functions */
2247
2248BOOL WIN32API MapDialogRect( HWND hDlg, PRECT lpRect)
2249{
2250#ifdef DEBUG
2251 WriteLog("USER32: MapDialogRect\n");
2252#endif
2253 hDlg = Win32Window::Win32ToOS2Handle(hDlg);
2254
2255 return O32_MapDialogRect(hDlg,lpRect);
2256}
2257
2258/* Coordinate Space and Transformation Functions */
2259
2260int WIN32API MapWindowPoints( HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UINT cPoints)
2261{
2262#ifdef DEBUG
2263 WriteLog("USER32: MapWindowPoints\n");
2264#endif
2265 hWndFrom = Win32Window::Win32ToOS2Handle(hWndFrom);
2266 hWndTo = Win32Window::Win32ToOS2Handle(hWndTo);
2267
2268 return O32_MapWindowPoints(hWndFrom,hWndTo,lpPoints,cPoints);
2269}
2270//******************************************************************************
2271//******************************************************************************
2272BOOL WIN32API ScreenToClient (HWND hwnd, LPPOINT pt)
2273{
2274#ifdef DEBUG
2275 WriteLog("USER32: ScreenToClient\n");
2276#endif
2277 Win32BaseWindow *wnd;
2278 PRECT rcl;
2279
2280 if (!hwnd) return (TRUE);
2281 wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
2282 if (!wnd) return (TRUE);
2283
2284 rcl = wnd->getClientRect();
2285 pt->y = ScreenHeight - pt->y;
2286 OSLibWinMapWindowPoints (OSLIB_HWND_DESKTOP, wnd->getOS2WindowHandle(), (OSLIBPOINT *)pt, 1);
2287 pt->y = (rcl->bottom - rcl->top) - pt->y;
2288 return (TRUE);
2289}
2290
2291/* Scroll Bar Functions */
2292
2293#if 0
2294BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2295{
2296#ifdef DEBUG
2297 WriteLog("USER32: ScrollDC\n");
2298#endif
2299 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2300}
2301#endif
2302
2303/* Resource Functions */
2304
2305HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
2306{
2307#ifdef DEBUG
2308 WriteLog("USER32: CopyImage, not implemented\n");
2309#endif
2310 switch(uType) {
2311 case IMAGE_BITMAP:
2312 case IMAGE_CURSOR:
2313 case IMAGE_ICON:
2314 default:
2315#ifdef DEBUG
2316 WriteLog("USER32: CopyImage, unknown type\n");
2317#endif
2318 return(NULL);
2319 }
2320 return(NULL);
2321}
2322
2323/* Icon Functions */
2324
2325int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
2326{
2327#ifdef DEBUG
2328 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
2329#endif
2330 return(0);
2331}
2332//******************************************************************************
2333//******************************************************************************
2334int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
2335 int cxDesired, int cyDesired,
2336 UINT Flags)
2337{
2338#ifdef DEBUG
2339 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
2340#endif
2341 return(0);
2342}
2343
2344/* Device Context Functions */
2345
2346BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
2347{
2348#ifdef DEBUG
2349 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
2350#endif
2351 return(FALSE);
2352}
2353//******************************************************************************
2354//******************************************************************************
2355BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
2356{
2357#ifdef DEBUG
2358 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
2359#endif
2360 return(FALSE);
2361}
2362//******************************************************************************
2363//******************************************************************************
2364HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
2365{
2366#ifdef DEBUG
2367 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
2368#endif
2369 //Attention: Win32 hwnd!
2370
2371 return(0);
2372}
2373//******************************************************************************
2374//******************************************************************************
2375HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
2376{
2377#ifdef DEBUG
2378 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
2379#endif
2380 return(0);
2381}
2382//******************************************************************************
2383//******************************************************************************
2384HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
2385{
2386#ifdef DEBUG
2387 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
2388#endif
2389 return(0);
2390}
2391//******************************************************************************
2392//******************************************************************************
2393BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
2394{
2395#ifdef DEBUG
2396 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
2397#endif
2398 return(FALSE);
2399}
2400//******************************************************************************
2401//******************************************************************************
2402BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
2403 LPDEVMODEA lpDevMode)
2404{
2405#ifdef DEBUG
2406 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
2407#endif
2408 switch(iModeNum) {
2409 case 0:
2410 lpDevMode->dmBitsPerPel = 16;
2411 lpDevMode->dmPelsWidth = 768;
2412 lpDevMode->dmPelsHeight = 1024;
2413 lpDevMode->dmDisplayFlags = 0;
2414 lpDevMode->dmDisplayFrequency = 70;
2415 break;
2416 case 1:
2417 lpDevMode->dmBitsPerPel = 16;
2418 lpDevMode->dmPelsWidth = 640;
2419 lpDevMode->dmPelsHeight = 480;
2420 lpDevMode->dmDisplayFlags = 0;
2421 lpDevMode->dmDisplayFrequency = 70;
2422 break;
2423 default:
2424 return(FALSE);
2425 }
2426 return(TRUE);
2427}
2428/*****************************************************************************
2429 * Name : BOOL WIN32API EnumDisplaySettingsW
2430 * Purpose : The EnumDisplaySettings function obtains information about one
2431 * of a display device's graphics modes. You can obtain information
2432 * for all of a display device's graphics modes by making a series
2433 * of calls to this function.
2434 * Parameters: LPCTSTR lpszDeviceName specifies the display device
2435 * DWORD iModeNum specifies the graphics mode
2436 * LPDEVMODE lpDevMode points to structure to receive settings
2437 * Variables :
2438 * Result : If the function succeeds, the return value is TRUE.
2439 * If the function fails, the return value is FALSE.
2440 * Remark :
2441 * Status : UNTESTED STUB
2442 *
2443 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2444 *****************************************************************************/
2445BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
2446 DWORD iModeNum,
2447 LPDEVMODEW lpDevMode)
2448{
2449 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
2450 lpszDeviceName,
2451 iModeNum,
2452 lpDevMode));
2453
2454 return (EnumDisplaySettingsA(lpszDeviceName,
2455 iModeNum,
2456 (LPDEVMODEA)lpDevMode));
2457}
2458//******************************************************************************
2459//******************************************************************************
2460LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
2461{
2462#ifdef DEBUG
2463 if(lpDevMode) {
2464 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
2465 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
2466 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
2467 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
2468 }
2469#endif
2470 return(DISP_CHANGE_SUCCESSFUL);
2471}
2472/*****************************************************************************
2473 * Name : LONG WIN32API ChangeDisplaySettingsW
2474 * Purpose : The ChangeDisplaySettings function changes the display settings
2475 * to the specified graphics mode.
2476 * Parameters: LPDEVMODEW lpDevModeW
2477 * DWORD dwFlags
2478 * Variables :
2479 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
2480 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
2481 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
2482 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
2483 * DISP_CHANGE_BADMODE The graphics mode is not supported.
2484 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
2485 * Remark :
2486 * Status : UNTESTED STUB
2487 *
2488 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2489 *****************************************************************************/
2490LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
2491 DWORD dwFlags)
2492{
2493 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
2494 lpDevMode,
2495 dwFlags));
2496
2497 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
2498 dwFlags));
2499}
2500
2501/* Window Station and Desktop Functions */
2502
2503/*****************************************************************************
2504 * Name : BOOL WIN32API CloseDesktop
2505 * Purpose : The CloseDesktop function closes an open handle of a desktop
2506 * object. A desktop is a secure object contained within a window
2507 * station object. A desktop has a logical display surface and
2508 * contains windows, menus and hooks.
2509 * Parameters: HDESK hDesktop
2510 * Variables :
2511 * Result : If the function succeeds, the return value is TRUE.
2512 * If the functions fails, the return value is FALSE. To get
2513 * extended error information, call GetLastError.
2514 * Remark :
2515 * Status : UNTESTED STUB
2516 *
2517 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2518 *****************************************************************************/
2519BOOL WIN32API CloseDesktop(HDESK hDesktop)
2520{
2521 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
2522 hDesktop));
2523
2524 return (FALSE);
2525}
2526/*****************************************************************************
2527 * Name : BOOL WIN32API CloseWindowStation
2528 * Purpose : The CloseWindowStation function closes an open window station handle.
2529 * Parameters: HWINSTA hWinSta
2530 * Variables :
2531 * Result :
2532 * Remark : If the function succeeds, the return value is TRUE.
2533 * If the functions fails, the return value is FALSE. To get
2534 * extended error information, call GetLastError.
2535 * Status : UNTESTED STUB
2536 *
2537 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2538 *****************************************************************************/
2539BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
2540{
2541 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
2542 hWinSta));
2543
2544 return (FALSE);
2545}
2546/*****************************************************************************
2547 * Name : HDESK WIN32API CreateDesktopA
2548 * Purpose : The CreateDesktop function creates a new desktop on the window
2549 * station associated with the calling process.
2550 * Parameters: LPCTSTR lpszDesktop name of the new desktop
2551 * LPCTSTR lpszDevice name of display device to assign to the desktop
2552 * LPDEVMODE pDevMode reserved; must be NULL
2553 * DWORD dwFlags flags to control interaction with other applications
2554 * DWORD dwDesiredAccess specifies access of returned handle
2555 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
2556 * Variables :
2557 * Result : If the function succeeds, the return value is a handle of the
2558 * newly created desktop.
2559 * If the function fails, the return value is NULL. To get extended
2560 * error information, call GetLastError.
2561 * Remark :
2562 * Status : UNTESTED STUB
2563 *
2564 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2565 *****************************************************************************/
2566HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
2567 LPCTSTR lpszDevice,
2568 LPDEVMODEA pDevMode,
2569 DWORD dwFlags,
2570 DWORD dwDesiredAccess,
2571 LPSECURITY_ATTRIBUTES lpsa)
2572{
2573 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
2574 lpszDesktop,
2575 lpszDevice,
2576 pDevMode,
2577 dwFlags,
2578 dwDesiredAccess,
2579 lpsa));
2580
2581 return (NULL);
2582}
2583/*****************************************************************************
2584 * Name : HDESK WIN32API CreateDesktopW
2585 * Purpose : The CreateDesktop function creates a new desktop on the window
2586 * station associated with the calling process.
2587 * Parameters: LPCTSTR lpszDesktop name of the new desktop
2588 * LPCTSTR lpszDevice name of display device to assign to the desktop
2589 * LPDEVMODE pDevMode reserved; must be NULL
2590 * DWORD dwFlags flags to control interaction with other applications
2591 * DWORD dwDesiredAccess specifies access of returned handle
2592 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
2593 * Variables :
2594 * Result : If the function succeeds, the return value is a handle of the
2595 * newly created desktop.
2596 * If the function fails, the return value is NULL. To get extended
2597 * error information, call GetLastError.
2598 * Remark :
2599 * Status : UNTESTED STUB
2600 *
2601 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2602 *****************************************************************************/
2603HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
2604 LPCTSTR lpszDevice,
2605 LPDEVMODEW pDevMode,
2606 DWORD dwFlags,
2607 DWORD dwDesiredAccess,
2608 LPSECURITY_ATTRIBUTES lpsa)
2609{
2610 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
2611 lpszDesktop,
2612 lpszDevice,
2613 pDevMode,
2614 dwFlags,
2615 dwDesiredAccess,
2616 lpsa));
2617
2618 return (NULL);
2619}
2620/*****************************************************************************
2621 * Name : HWINSTA WIN32API CreateWindowStationA
2622 * Purpose : The CreateWindowStation function creates a window station object.
2623 * It returns a handle that can be used to access the window station.
2624 * A window station is a secure object that contains a set of global
2625 * atoms, a clipboard, and a set of desktop objects.
2626 * Parameters: LPTSTR lpwinsta name of the new window station
2627 * DWORD dwReserved reserved; must be NULL
2628 * DWORD dwDesiredAccess specifies access of returned handle
2629 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
2630 * Variables :
2631 * Result : If the function succeeds, the return value is the handle to the
2632 * newly created window station.
2633 * If the function fails, the return value is NULL. To get extended
2634 * error information, call GetLastError.
2635 * Remark :
2636 * Status : UNTESTED STUB
2637 *
2638 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2639 *****************************************************************************/
2640HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
2641 DWORD dwReserved,
2642 DWORD dwDesiredAccess,
2643 LPSECURITY_ATTRIBUTES lpsa)
2644{
2645 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
2646 lpWinSta,
2647 dwReserved,
2648 dwDesiredAccess,
2649 lpsa));
2650
2651 return (NULL);
2652}
2653/*****************************************************************************
2654 * Name : HWINSTA WIN32API CreateWindowStationW
2655 * Purpose : The CreateWindowStation function creates a window station object.
2656 * It returns a handle that can be used to access the window station.
2657 * A window station is a secure object that contains a set of global
2658 * atoms, a clipboard, and a set of desktop objects.
2659 * Parameters: LPTSTR lpwinsta name of the new window station
2660 * DWORD dwReserved reserved; must be NULL
2661 * DWORD dwDesiredAccess specifies access of returned handle
2662 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
2663 * Variables :
2664 * Result : If the function succeeds, the return value is the handle to the
2665 * newly created window station.
2666 * If the function fails, the return value is NULL. To get extended
2667 * error information, call GetLastError.
2668 * Remark :
2669 * Status : UNTESTED STUB
2670 *
2671 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2672 *****************************************************************************/
2673HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
2674 DWORD dwReserved,
2675 DWORD dwDesiredAccess,
2676 LPSECURITY_ATTRIBUTES lpsa)
2677{
2678 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
2679 lpWinSta,
2680 dwReserved,
2681 dwDesiredAccess,
2682 lpsa));
2683
2684 return (NULL);
2685}
2686/*****************************************************************************
2687 * Name : BOOL WIN32API EnumDesktopWindows
2688 * Purpose : The EnumDesktopWindows function enumerates all windows in a
2689 * desktop by passing the handle of each window, in turn, to an
2690 * application-defined callback function.
2691 * Parameters: HDESK hDesktop handle of desktop to enumerate
2692 * WNDENUMPROC lpfn points to application's callback function
2693 * LPARAM lParam 32-bit value to pass to the callback function
2694 * Variables :
2695 * Result : If the function succeeds, the return value is TRUE.
2696 * If the function fails, the return value is FALSE. To get
2697 * extended error information, call GetLastError.
2698 * Remark :
2699 * Status : UNTESTED STUB
2700 *
2701 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2702 *****************************************************************************/
2703BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
2704 WNDENUMPROC lpfn,
2705 LPARAM lParam)
2706{
2707 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
2708 hDesktop,
2709 lpfn,
2710 lParam));
2711
2712 return (FALSE);
2713}
2714/*****************************************************************************
2715 * Name : BOOL WIN32API EnumDesktopsA
2716 * Purpose : The EnumDesktops function enumerates all desktops in the window
2717 * station assigned to the calling process. The function does so by
2718 * passing the name of each desktop, in turn, to an application-
2719 * defined callback function.
2720 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2721 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2722 * LPARAM lParam 32-bit value to pass to the callback function
2723 * Variables :
2724 * Result : If the function succeeds, the return value is TRUE.
2725 * If the function fails, the return value is FALSE. To get extended
2726 * error information, call GetLastError.
2727 * Remark :
2728 * Status : UNTESTED STUB
2729 *
2730 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2731 *****************************************************************************/
2732BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
2733 DESKTOPENUMPROCA lpEnumFunc,
2734 LPARAM lParam)
2735{
2736 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
2737 hWinSta,
2738 lpEnumFunc,
2739 lParam));
2740
2741 return (FALSE);
2742}
2743/*****************************************************************************
2744 * Name : BOOL WIN32API EnumDesktopsW
2745 * Purpose : The EnumDesktops function enumerates all desktops in the window
2746 * station assigned to the calling process. The function does so by
2747 * passing the name of each desktop, in turn, to an application-
2748 * defined callback function.
2749 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2750 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2751 * LPARAM lParam 32-bit value to pass to the callback function
2752 * Variables :
2753 * Result : If the function succeeds, the return value is TRUE.
2754 * If the function fails, the return value is FALSE. To get extended
2755 * error information, call GetLastError.
2756 * Remark :
2757 * Status : UNTESTED STUB
2758 *
2759 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2760 *****************************************************************************/
2761BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
2762 DESKTOPENUMPROCW lpEnumFunc,
2763 LPARAM lParam)
2764{
2765 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
2766 hWinSta,
2767 lpEnumFunc,
2768 lParam));
2769
2770 return (FALSE);
2771}
2772/*****************************************************************************
2773 * Name : BOOL WIN32API EnumWindowStationsA
2774 * Purpose : The EnumWindowStations function enumerates all windowstations
2775 * in the system by passing the name of each window station, in
2776 * turn, to an application-defined callback function.
2777 * Parameters:
2778 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2779 * LPARAM lParam 32-bit value to pass to the callback function
2780 * Result : If the function succeeds, the return value is TRUE.
2781 * If the function fails the return value is FALSE. To get extended
2782 * error information, call GetLastError.
2783 * Remark :
2784 * Status : UNTESTED STUB
2785 *
2786 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2787 *****************************************************************************/
2788BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
2789 LPARAM lParam)
2790{
2791 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
2792 lpEnumFunc,
2793 lParam));
2794
2795 return (FALSE);
2796}
2797/*****************************************************************************
2798 * Name : BOOL WIN32API EnumWindowStationsW
2799 * Purpose : The EnumWindowStations function enumerates all windowstations
2800 * in the system by passing the name of each window station, in
2801 * turn, to an application-defined callback function.
2802 * Parameters:
2803 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2804 * LPARAM lParam 32-bit value to pass to the callback function
2805 * Result : If the function succeeds, the return value is TRUE.
2806 * If the function fails the return value is FALSE. To get extended
2807 * error information, call GetLastError.
2808 * Remark :
2809 * Status : UNTESTED STUB
2810 *
2811 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2812 *****************************************************************************/
2813BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
2814 LPARAM lParam)
2815{
2816 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
2817 lpEnumFunc,
2818 lParam));
2819
2820 return (FALSE);
2821}
2822/*****************************************************************************
2823 * Name : HWINSTA WIN32API GetProcessWindowStation
2824 * Purpose : The GetProcessWindowStation function returns a handle of the
2825 * window station associated with the calling process.
2826 * Parameters:
2827 * Variables :
2828 * Result : If the function succeeds, the return value is a handle of the
2829 * window station associated with the calling process.
2830 * If the function fails, the return value is NULL. This can occur
2831 * if the calling process is not an application written for Windows
2832 * NT. To get extended error information, call GetLastError.
2833 * Remark :
2834 * Status : UNTESTED STUB
2835 *
2836 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2837 *****************************************************************************/
2838HWINSTA WIN32API GetProcessWindowStation(VOID)
2839{
2840 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
2841
2842 return (NULL);
2843}
2844/*****************************************************************************
2845 * Name : BOOL WIN32API GetUserObjectInformationA
2846 * Purpose : The GetUserObjectInformation function returns information about
2847 * a window station or desktop object.
2848 * Parameters: HANDLE hObj handle of object to get information for
2849 * int nIndex type of information to get
2850 * PVOID pvInfo points to buffer that receives the information
2851 * DWORD nLength size, in bytes, of pvInfo buffer
2852 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2853 * Variables :
2854 * Result : If the function succeeds, the return value is TRUE.
2855 * If the function fails, the return value is FALSE. To get extended
2856 * error information, call GetLastError.
2857 * Remark :
2858 * Status : UNTESTED STUB
2859 *
2860 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2861 *****************************************************************************/
2862BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2863 int nIndex,
2864 PVOID pvInfo,
2865 DWORD nLength,
2866 LPDWORD lpnLengthNeeded)
2867{
2868 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2869 hObj,
2870 nIndex,
2871 pvInfo,
2872 nLength,
2873 lpnLengthNeeded));
2874
2875 return (FALSE);
2876}
2877/*****************************************************************************
2878 * Name : BOOL WIN32API GetUserObjectInformationW
2879 * Purpose : The GetUserObjectInformation function returns information about
2880 * a window station or desktop object.
2881 * Parameters: HANDLE hObj handle of object to get information for
2882 * int nIndex type of information to get
2883 * PVOID pvInfo points to buffer that receives the information
2884 * DWORD nLength size, in bytes, of pvInfo buffer
2885 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2886 * Variables :
2887 * Result : If the function succeeds, the return value is TRUE.
2888 * If the function fails, the return value is FALSE. To get extended
2889 * error information, call GetLastError.
2890 * Remark :
2891 * Status : UNTESTED STUB
2892 *
2893 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2894 *****************************************************************************/
2895BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2896 int nIndex,
2897 PVOID pvInfo,
2898 DWORD nLength,
2899 LPDWORD lpnLengthNeeded)
2900{
2901 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2902 hObj,
2903 nIndex,
2904 pvInfo,
2905 nLength,
2906 lpnLengthNeeded));
2907
2908 return (FALSE);
2909}
2910/*****************************************************************************
2911 * Name : BOOL WIN32API GetUserObjectSecurity
2912 * Purpose : The GetUserObjectSecurity function retrieves security information
2913 * for the specified user object.
2914 * Parameters: HANDLE hObj handle of user object
2915 * SECURITY_INFORMATION * pSIRequested address of requested security information
2916 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2917 * DWORD nLength size of buffer for security descriptor
2918 * LPDWORD lpnLengthNeeded address of required size of buffer
2919 * Variables :
2920 * Result : If the function succeeds, the return value is TRUE.
2921 * If the function fails, the return value is FALSE. To get extended
2922 * error information, call GetLastError.
2923 * Remark :
2924 * Status : UNTESTED STUB
2925 *
2926 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2927 *****************************************************************************/
2928BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2929 SECURITY_INFORMATION * pSIRequested,
2930 LPSECURITY_DESCRIPTOR pSID,
2931 DWORD nLength,
2932 LPDWORD lpnLengthNeeded)
2933{
2934 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2935 hObj,
2936 pSIRequested,
2937 pSID,
2938 nLength,
2939 lpnLengthNeeded));
2940
2941 return (FALSE);
2942}
2943/*****************************************************************************
2944 * Name : HDESK WIN32API OpenDesktopA
2945 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2946 * A desktop is a secure object contained within a window station
2947 * object. A desktop has a logical display surface and contains
2948 * windows, menus and hooks.
2949 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2950 * DWORD dwFlags flags to control interaction with other applications
2951 * BOOL fInherit specifies whether returned handle is inheritable
2952 * DWORD dwDesiredAccess specifies access of returned handle
2953 * Variables :
2954 * Result : If the function succeeds, the return value is the handle to the
2955 * opened desktop.
2956 * If the function fails, the return value is NULL. To get extended
2957 * error information, call GetLastError.
2958 * Remark :
2959 * Status : UNTESTED STUB
2960 *
2961 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2962 *****************************************************************************/
2963HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2964 DWORD dwFlags,
2965 BOOL fInherit,
2966 DWORD dwDesiredAccess)
2967{
2968 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2969 lpszDesktopName,
2970 dwFlags,
2971 fInherit,
2972 dwDesiredAccess));
2973
2974 return (NULL);
2975}
2976/*****************************************************************************
2977 * Name : HDESK WIN32API OpenDesktopW
2978 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2979 * A desktop is a secure object contained within a window station
2980 * object. A desktop has a logical display surface and contains
2981 * windows, menus and hooks.
2982 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2983 * DWORD dwFlags flags to control interaction with other applications
2984 * BOOL fInherit specifies whether returned handle is inheritable
2985 * DWORD dwDesiredAccess specifies access of returned handle
2986 * Variables :
2987 * Result : If the function succeeds, the return value is the handle to the
2988 * opened desktop.
2989 * If the function fails, the return value is NULL. To get extended
2990 * error information, call GetLastError.
2991 * Remark :
2992 * Status : UNTESTED STUB
2993 *
2994 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2995 *****************************************************************************/
2996HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2997 DWORD dwFlags,
2998 BOOL fInherit,
2999 DWORD dwDesiredAccess)
3000{
3001 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
3002 lpszDesktopName,
3003 dwFlags,
3004 fInherit,
3005 dwDesiredAccess));
3006
3007 return (NULL);
3008}
3009/*****************************************************************************
3010 * Name : HDESK WIN32API OpenInputDesktop
3011 * Purpose : The OpenInputDesktop function returns a handle to the desktop
3012 * that receives user input. The input desktop is a desktop on the
3013 * window station associated with the logged-on user.
3014 * Parameters: DWORD dwFlags flags to control interaction with other applications
3015 * BOOL fInherit specifies whether returned handle is inheritable
3016 * DWORD dwDesiredAccess specifies access of returned handle
3017 * Variables :
3018 * Result : If the function succeeds, the return value is a handle of the
3019 * desktop that receives user input.
3020 * If the function fails, the return value is NULL. To get extended
3021 * error information, call GetLastError.
3022 * Remark :
3023 * Status : UNTESTED STUB
3024 *
3025 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3026 *****************************************************************************/
3027HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
3028 BOOL fInherit,
3029 DWORD dwDesiredAccess)
3030{
3031 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
3032 dwFlags,
3033 fInherit,
3034 dwDesiredAccess));
3035
3036 return (NULL);
3037}
3038/*****************************************************************************
3039 * Name : HWINSTA WIN32API OpenWindowStationA
3040 * Purpose : The OpenWindowStation function returns a handle to an existing
3041 * window station.
3042 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
3043 * BOOL fInherit specifies whether returned handle is inheritable
3044 * DWORD dwDesiredAccess specifies access of returned handle
3045 * Variables :
3046 * Result : If the function succeeds, the return value is the handle to the
3047 * specified window station.
3048 * If the function fails, the return value is NULL. To get extended
3049 * error information, call GetLastError.
3050 * Remark :
3051 * Status : UNTESTED STUB
3052 *
3053 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3054 *****************************************************************************/
3055HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
3056 BOOL fInherit,
3057 DWORD dwDesiredAccess)
3058{
3059 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
3060 lpszWinStaName,
3061 fInherit,
3062 dwDesiredAccess));
3063
3064 return (NULL);
3065}
3066/*****************************************************************************
3067 * Name : HWINSTA WIN32API OpenWindowStationW
3068 * Purpose : The OpenWindowStation function returns a handle to an existing
3069 * window station.
3070 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
3071 * BOOL fInherit specifies whether returned handle is inheritable
3072 * DWORD dwDesiredAccess specifies access of returned handle
3073 * Variables :
3074 * Result : If the function succeeds, the return value is the handle to the
3075 * specified window station.
3076 * If the function fails, the return value is NULL. To get extended
3077 * error information, call GetLastError.
3078
3079
3080 * Remark :
3081 * Status : UNTESTED STUB
3082 *
3083 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3084 *****************************************************************************/
3085HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
3086 BOOL fInherit,
3087 DWORD dwDesiredAccess)
3088{
3089 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
3090 lpszWinStaName,
3091 fInherit,
3092 dwDesiredAccess));
3093
3094 return (NULL);
3095}
3096/*****************************************************************************
3097 * Name : BOOL WIN32API SetProcessWindowStation
3098 * Purpose : The SetProcessWindowStation function assigns a window station
3099 * to the calling process. This enables the process to access
3100 * objects in the window station such as desktops, the clipboard,
3101 * and global atoms. All subsequent operations on the window station
3102 * use the access rights granted to hWinSta.
3103 * Parameters:
3104 * Variables :
3105 * Result : If the function succeeds, the return value is TRUE.
3106 * If the function fails, the return value is FALSE. To get extended
3107 * error information, call GetLastError.
3108 * Remark :
3109 * Status : UNTESTED STUB
3110 *
3111 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3112 *****************************************************************************/
3113BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
3114{
3115 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
3116 hWinSta));
3117
3118 return (FALSE);
3119}
3120/*****************************************************************************
3121 * Name : BOOL WIN32API SetThreadDesktop
3122 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
3123 * thread. All subsequent operations on the desktop use the access
3124 * rights granted to hDesk.
3125 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
3126 * Variables :
3127 * Result : If the function succeeds, the return value is TRUE.
3128 * If the function fails, the return value is FALSE. To get extended
3129 * error information, call GetLastError.
3130 * Remark :
3131 * Status : UNTESTED STUB
3132 *
3133 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3134 *****************************************************************************/
3135BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
3136{
3137 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
3138 hDesktop));
3139
3140 return (FALSE);
3141}
3142/*****************************************************************************
3143 * Name : BOOL WIN32API SetUserObjectInformationA
3144 * Purpose : The SetUserObjectInformation function sets information about a
3145 * window station or desktop object.
3146 * Parameters: HANDLE hObject handle of the object for which to set information
3147 * int nIndex type of information to set
3148 * PVOID lpvInfo points to a buffer that contains the information
3149 * DWORD cbInfo size, in bytes, of lpvInfo buffer
3150 * Variables :
3151 * Result : If the function succeeds, the return value is TRUE.
3152 * If the function fails the return value is FALSE. To get extended
3153 * error information, call GetLastError.
3154 * Remark :
3155 * Status : UNTESTED STUB
3156 *
3157 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3158 *****************************************************************************/
3159BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
3160 int nIndex,
3161 PVOID lpvInfo,
3162 DWORD cbInfo)
3163{
3164 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
3165 hObject,
3166 nIndex,
3167 lpvInfo,
3168 cbInfo));
3169
3170 return (FALSE);
3171}
3172/*****************************************************************************
3173 * Name : BOOL WIN32API SetUserObjectInformationW
3174 * Purpose : The SetUserObjectInformation function sets information about a
3175 * window station or desktop object.
3176 * Parameters: HANDLE hObject handle of the object for which to set information
3177 * int nIndex type of information to set
3178 * PVOID lpvInfo points to a buffer that contains the information
3179 * DWORD cbInfo size, in bytes, of lpvInfo buffer
3180 * Variables :
3181 * Result : If the function succeeds, the return value is TRUE.
3182 * If the function fails the return value is FALSE. To get extended
3183 * error information, call GetLastError.
3184 * Remark :
3185 * Status : UNTESTED STUB
3186 *
3187 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3188 *****************************************************************************/
3189BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
3190 int nIndex,
3191 PVOID lpvInfo,
3192 DWORD cbInfo)
3193{
3194 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
3195 hObject,
3196 nIndex,
3197 lpvInfo,
3198 cbInfo));
3199
3200 return (FALSE);
3201}
3202/*****************************************************************************
3203 * Name : BOOL WIN32API SetUserObjectSecurity
3204 * Purpose : The SetUserObjectSecurity function sets the security of a user
3205 * object. This can be, for example, a window or a DDE conversation
3206 * Parameters: HANDLE hObject handle of user object
3207 * SECURITY_INFORMATION * psi address of security information
3208 * LPSECURITY_DESCRIPTOR psd address of security descriptor
3209 * Variables :
3210 * Result : If the function succeeds, the return value is TRUE.
3211 * If the function fails, the return value is FALSE. To get extended
3212 * error information, call GetLastError.
3213 * Remark :
3214 * Status : UNTESTED STUB
3215 *
3216 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3217 *****************************************************************************/
3218BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
3219 SECURITY_INFORMATION * psi,
3220 LPSECURITY_DESCRIPTOR psd)
3221{
3222 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
3223 hObject,
3224 psi,
3225 psd));
3226
3227 return (FALSE);
3228}
3229/*****************************************************************************
3230 * Name : BOOL WIN32API SwitchDesktop
3231 * Purpose : The SwitchDesktop function makes a desktop visible and activates
3232 * it. This enables the desktop to receive input from the user. The
3233 * calling process must have DESKTOP_SWITCHDESKTOP access to the
3234 * desktop for the SwitchDesktop function to succeed.
3235 * Parameters:
3236 * Variables :
3237 * Result : If the function succeeds, the return value is TRUE.
3238 * If the function fails, the return value is FALSE. To get extended
3239 * error information, call GetLastError.
3240 * Remark :
3241 * Status : UNTESTED STUB
3242 *
3243 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3244 *****************************************************************************/
3245BOOL WIN32API SwitchDesktop(HDESK hDesktop)
3246{
3247 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
3248 hDesktop));
3249
3250 return (FALSE);
3251}
3252
3253/* Debugging Functions */
3254
3255/*****************************************************************************
3256 * Name : VOID WIN32API SetDebugErrorLevel
3257 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
3258 * which Windows will generate debugging events and pass them to a debugger.
3259 * Parameters: DWORD dwLevel debugging error level
3260 * Variables :
3261 * Result :
3262 * Remark :
3263 * Status : UNTESTED STUB
3264 *
3265 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3266 *****************************************************************************/
3267VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
3268{
3269 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
3270 dwLevel));
3271}
3272
3273/* Hook Functions */
3274
3275/*****************************************************************************
3276 * Name : BOOL WIN32API SetWindowsHookW
3277 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
3278 * Win32-based applications should use the SetWindowsHookEx function.
3279 * Parameters:
3280 * Variables :
3281 * Result :
3282 * Remark : ARGH ! MICROSOFT !
3283 * Status : UNTESTED STUB
3284 *
3285 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3286 *****************************************************************************/
3287HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
3288
3289{
3290 return (FALSE);
3291}
3292
3293/* CB: move to ShowWindow() */
3294
3295/*****************************************************************************
3296 * Name : BOOL WIN32API ShowWindowAsync
3297 * Purpose : The ShowWindowAsync function sets the show state of a window
3298 * created by a different thread.
3299 * Parameters: HWND hwnd handle of window
3300 * int nCmdShow show state of window
3301 * Variables :
3302 * Result : If the window was previously visible, the return value is TRUE.
3303 * If the window was previously hidden, the return value is FALSE.
3304 * Remark :
3305 * Status : UNTESTED STUB
3306 *
3307 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3308 *****************************************************************************/
3309BOOL WIN32API ShowWindowAsync (HWND hWnd,
3310 int nCmdShow)
3311{
3312 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
3313 hWnd,
3314 nCmdShow));
3315
3316 return (FALSE);
3317}
3318
3319/* CB: move to MDI */
3320
3321/*****************************************************************************
3322 * Name : WORD WIN32API TileWindows
3323 * Purpose : The TileWindows function tiles the specified windows, or the child
3324 * windows of the specified parent window.
3325 * Parameters: HWND hwndParent handle of parent window
3326 * WORD wFlags types of windows not to arrange
3327 * LPCRECT lpRect rectangle to arrange windows in
3328 * WORD cChildrenb number of windows to arrange
3329 * const HWND *ahwndChildren array of window handles
3330 * Variables :
3331 * Result : If the function succeeds, the return value is the number of
3332 * windows arranged.
3333 * If the function fails, the return value is zero.
3334 * Remark :
3335 * Status : UNTESTED STUB
3336 *
3337 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3338 *****************************************************************************/
3339WORD WIN32API TileWindows(HWND hwndParent,
3340 UINT wFlags,
3341 const LPRECT lpRect,
3342 UINT cChildrenb,
3343 const HWND *ahwndChildren)
3344{
3345 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3346 hwndParent,
3347 wFlags,
3348 lpRect,
3349 cChildrenb,
3350 ahwndChildren));
3351
3352 return (0);
3353}
3354/*****************************************************************************
3355 * Name : BOOL WIN32API TileChildWindows
3356 * Purpose : Unknown
3357 * Parameters: Unknown
3358 * Variables :
3359 * Result :
3360 * Remark :
3361 * Status : UNTESTED UNKNOWN STUB
3362 *
3363 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3364 *****************************************************************************/
3365BOOL WIN32API TileChildWindows(DWORD x1,
3366 DWORD x2)
3367{
3368 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
3369 x1,
3370 x2));
3371
3372 return (FALSE); /* default */
3373}
3374/*****************************************************************************
3375 * Name : BOOL WIN32API CascadeChildWindows
3376 * Purpose : Unknown
3377 * Parameters: Unknown
3378 * Variables :
3379 * Result :
3380 * Remark :
3381 * Status : UNTESTED UNKNOWN STUB
3382 *
3383 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3384 *****************************************************************************/
3385BOOL WIN32API CascadeChildWindows(DWORD x1,
3386 DWORD x2)
3387{
3388 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
3389 x1,
3390 x2));
3391
3392 return (FALSE); /* default */
3393}
3394
3395/* Drag'n'drop */
3396
3397/*****************************************************************************
3398 * Name : BOOL WIN32API DragObject
3399 * Purpose : Unknown
3400 * Parameters: Unknown
3401 * Variables :
3402 * Result :
3403 * Remark :
3404 * Status : UNTESTED UNKNOWN STUB
3405 *
3406 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3407 *****************************************************************************/
3408DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
3409{
3410 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3411 x1,
3412 x2,
3413 x3,
3414 x4,
3415 x5));
3416
3417 return (FALSE); /* default */
3418}
3419
3420/* Unknown */
3421
3422/*****************************************************************************
3423 * Name : BOOL WIN32API SetShellWindow
3424 * Purpose : Unknown
3425 * Parameters: Unknown
3426 * Variables :
3427 * Result :
3428 * Remark :
3429 * Status : UNTESTED UNKNOWN STUB
3430 *
3431 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3432 *****************************************************************************/
3433BOOL WIN32API SetShellWindow(DWORD x1)
3434{
3435 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
3436 x1));
3437
3438 return (FALSE); /* default */
3439}
3440/*****************************************************************************
3441 * Name : BOOL WIN32API PlaySoundEvent
3442 * Purpose : Unknown
3443 * Parameters: Unknown
3444 * Variables :
3445 * Result :
3446 * Remark :
3447 * Status : UNTESTED UNKNOWN STUB
3448 *
3449 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3450 *****************************************************************************/
3451BOOL WIN32API PlaySoundEvent(DWORD x1)
3452{
3453 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
3454 x1));
3455
3456 return (FALSE); /* default */
3457}
3458/*****************************************************************************
3459 * Name : BOOL WIN32API SetSysColorsTemp
3460 * Purpose : Unknown
3461 * Parameters: Unknown
3462 * Variables :
3463 * Result :
3464 * Remark :
3465 * Status : UNTESTED UNKNOWN STUB
3466 *
3467 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3468 *****************************************************************************/
3469BOOL WIN32API SetSysColorsTemp(void)
3470{
3471 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
3472
3473 return (FALSE); /* default */
3474}
3475/*****************************************************************************
3476 * Name : BOOL WIN32API RegisterNetworkCapabilities
3477 * Purpose : Unknown
3478 * Parameters: Unknown
3479 * Variables :
3480 * Result :
3481 * Remark :
3482 * Status : UNTESTED UNKNOWN STUB
3483 *
3484 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3485 *****************************************************************************/
3486BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
3487 DWORD x2)
3488{
3489 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
3490 x1,
3491 x2));
3492
3493 return (FALSE); /* default */
3494}
3495/*****************************************************************************
3496 * Name : BOOL WIN32API EndTask
3497 * Purpose : Unknown
3498 * Parameters: Unknown
3499 * Variables :
3500 * Result :
3501 * Remark :
3502 * Status : UNTESTED UNKNOWN STUB
3503 *
3504 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3505 *****************************************************************************/
3506BOOL WIN32API EndTask(DWORD x1,
3507 DWORD x2,
3508 DWORD x3)
3509{
3510 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
3511 x1,
3512 x2,
3513 x3));
3514
3515 return (FALSE); /* default */
3516}
3517/*****************************************************************************
3518 * Name : BOOL WIN32API GetNextQueueWindow
3519 * Purpose : Unknown
3520 * Parameters: Unknown
3521 * Variables :
3522 * Result :
3523 * Remark :
3524 * Status : UNTESTED UNKNOWN STUB
3525 *
3526 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3527 *****************************************************************************/
3528BOOL WIN32API GetNextQueueWindow(DWORD x1,
3529 DWORD x2)
3530{
3531 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
3532 x1,
3533 x2));
3534
3535 return (FALSE); /* default */
3536}
3537/*****************************************************************************
3538 * Name : BOOL WIN32API YieldTask
3539 * Purpose : Unknown
3540 * Parameters: Unknown
3541 * Variables :
3542 * Result :
3543 * Remark :
3544 * Status : UNTESTED UNKNOWN STUB
3545 *
3546 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3547 *****************************************************************************/
3548BOOL WIN32API YieldTask(void)
3549{
3550 dprintf(("USER32: YieldTask() not implemented.\n"));
3551
3552 return (FALSE); /* default */
3553}
3554/*****************************************************************************
3555 * Name : BOOL WIN32API WinOldAppHackoMatic
3556 * Purpose : Unknown
3557 * Parameters: Unknown
3558 * Variables :
3559 * Result :
3560 * Remark :
3561 * Status : UNTESTED UNKNOWN STUB
3562 *
3563 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3564 *****************************************************************************/
3565BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
3566{
3567 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
3568 x1));
3569
3570 return (FALSE); /* default */
3571}
3572/*****************************************************************************
3573 * Name : BOOL WIN32API RegisterSystemThread
3574 * Purpose : Unknown
3575 * Parameters: Unknown
3576 * Variables :
3577 * Result :
3578 * Remark :
3579 * Status : UNTESTED UNKNOWN STUB
3580 *
3581 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3582 *****************************************************************************/
3583BOOL WIN32API RegisterSystemThread(DWORD x1,
3584 DWORD x2)
3585{
3586 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
3587 x1,
3588 x2));
3589
3590 return (FALSE); /* default */
3591}
3592/*****************************************************************************
3593 * Name : BOOL WIN32API IsHungThread
3594 * Purpose : Unknown
3595 * Parameters: Unknown
3596 * Variables :
3597 * Result :
3598 * Remark :
3599 * Status : UNTESTED UNKNOWN STUB
3600 *
3601 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3602 *****************************************************************************/
3603BOOL WIN32API IsHungThread(DWORD x1)
3604{
3605 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
3606 x1));
3607
3608 return (FALSE); /* default */
3609}
3610/*****************************************************************************
3611 * Name : BOOL WIN32API UserSignalProc
3612 * Purpose : Unknown
3613 * Parameters: Unknown
3614 * Variables :
3615 * Result :
3616 * Remark :
3617 * Status : UNTESTED UNKNOWN STUB
3618 *
3619 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3620 *****************************************************************************/
3621BOOL WIN32API UserSignalProc(DWORD x1,
3622 DWORD x2,
3623 DWORD x3,
3624 DWORD x4)
3625{
3626 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3627 x1,
3628 x2,
3629 x3,
3630 x4));
3631
3632 return (FALSE); /* default */
3633}
3634/*****************************************************************************
3635 * Name : BOOL WIN32API GetShellWindow
3636 * Purpose : Unknown
3637 * Parameters: Unknown
3638 * Variables :
3639 * Result :
3640 * Remark :
3641 * Status : UNTESTED UNKNOWN STUB
3642 *
3643 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3644 *****************************************************************************/
3645HWND WIN32API GetShellWindow(void)
3646{
3647 dprintf(("USER32: GetShellWindow() not implemented.\n"));
3648
3649 return (0); /* default */
3650}
3651/***********************************************************************
3652 * RegisterTasklist32 [USER32.436]
3653 */
3654DWORD WIN32API RegisterTasklist (DWORD x)
3655{
3656 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
3657 x));
3658
3659 return TRUE;
3660}
3661
3662
Note: See TracBrowser for help on using the repository browser.