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

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

message fixes

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