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

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

Scrollbar changes

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