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

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

caret/cursor functions fixed

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