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

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

WS_VISIBLE & scrollbar fixes

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