2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS user32.dll
4 * FILE: lib/user32/misc/stubs.c
5 * PURPOSE: User32.dll stubs
6 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * NOTES: If you implement a function, remove it from this file
9 * 08-F05-2001 CSH Created
14 #include <wine/debug.h>
16 WINE_DEFAULT_DEBUG_CHANNEL(user32
);
27 // Need to call NtQueryInformationProcess and send ProcessId not hProcess.
28 return NtUserWaitForInputIdle(hProcess
, dwMilliseconds
, FALSE
);
31 /******************************************************************************
32 * SetDebugErrorLevel [USER32.@]
33 * Sets the minimum error level for generating debugging events
36 * dwLevel [I] Debugging error level
42 SetDebugErrorLevel( DWORD dwLevel
)
44 DbgPrint("(%ld): stub\n", dwLevel
);
53 GetAppCompatFlags(HTASK hTask
)
55 PCLIENTINFO pci
= GetWin32ClientInfo();
57 return pci
->dwCompatFlags
;
65 GetAppCompatFlags2(HTASK hTask
)
67 PCLIENTINFO pci
= GetWin32ClientInfo();
69 return pci
->dwCompatFlags2
;
83 WINDOWPLACEMENT wndpl
;
85 if (GetWindowPlacement(hwnd
, &wndpl
))
87 if (rectWnd
) *rectWnd
= wndpl
.rcNormalPosition
;
88 if (ptIcon
) *ptIcon
= wndpl
.ptMinPosition
;
99 LoadLocalFonts ( VOID
)
109 LoadRemoteFonts ( VOID
)
119 RegisterSystemThread ( DWORD flags
, DWORD reserved
)
130 UserRealizePalette ( HDC hDC
)
132 return NtUserCallOneParam((DWORD_PTR
) hDC
, ONEPARAM_ROUTINE_REALIZEPALETTE
);
136 /*************************************************************************
137 * SetSysColorsTemp (USER32.@) (Wine 10/22/2008)
141 * Called by W98SE desk.cpl Control Panel Applet:
142 * handle = SetSysColorsTemp(ptr, ptr, nCount); ("set" call)
143 * result = SetSysColorsTemp(NULL, NULL, handle); ("restore" call)
145 * pPens is an array of COLORREF values, which seems to be used
146 * to indicate the color values to create new pens with.
148 * pBrushes is an array of solid brush handles (returned by a previous
149 * CreateSolidBrush), which seems to contain the brush handles to set
150 * for the system colors.
152 * n seems to be used for
153 * a) indicating the number of entries to operate on (length of pPens,
155 * b) passing the handle that points to the previously used color settings.
156 * I couldn't figure out in hell what kind of handle this is on
157 * Windows. I just use a heap handle instead. Shouldn't matter anyway.
160 * heap handle of our own copy of the current syscolors in case of
161 * "set" call, i.e. pPens, pBrushes != NULL.
162 * TRUE (unconditionally !) in case of "restore" call,
163 * i.e. pPens, pBrushes == NULL.
164 * FALSE in case of either pPens != NULL and pBrushes == NULL
165 * or pPens == NULL and pBrushes != NULL.
167 * I'm not sure whether this implementation is 100% correct. [AM]
170 static HPEN SysColorPens
[COLOR_MENUBAR
+ 1];
171 static HBRUSH SysColorBrushes
[COLOR_MENUBAR
+ 1];
175 SetSysColorsTemp(const COLORREF
*pPens
,
176 const HBRUSH
*pBrushes
,
181 if (pPens
&& pBrushes
) /* "set" call */
183 /* allocate our structure to remember old colors */
184 LPVOID pOldCol
= HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD
)+n
*sizeof(HPEN
)+n
*sizeof(HBRUSH
));
186 *(DWORD
*)p
= n
; p
= (char*)p
+ sizeof(DWORD
);
187 memcpy(p
, SysColorPens
, n
*sizeof(HPEN
)); p
= (char*)p
+ n
*sizeof(HPEN
);
188 memcpy(p
, SysColorBrushes
, n
*sizeof(HBRUSH
)); p
= (char*)p
+ n
*sizeof(HBRUSH
);
190 for (i
=0; i
< n
; i
++)
192 SysColorPens
[i
] = CreatePen( PS_SOLID
, 1, pPens
[i
] );
193 SysColorBrushes
[i
] = pBrushes
[i
];
196 return PtrToLong(pOldCol
); /* FIXME: pointer truncation */
198 if (!pPens
&& !pBrushes
) /* "restore" call */
200 LPVOID pOldCol
= LongToPtr(n
); /* FIXME: not 64-bit safe */
202 DWORD nCount
= *(DWORD
*)p
;
203 p
= (char*)p
+ sizeof(DWORD
);
205 for (i
=0; i
< nCount
; i
++)
207 DeleteObject(SysColorPens
[i
]);
208 SysColorPens
[i
] = *(HPEN
*)p
; p
= (char*)p
+ sizeof(HPEN
);
210 for (i
=0; i
< nCount
; i
++)
212 SysColorBrushes
[i
] = *(HBRUSH
*)p
; p
= (char*)p
+ sizeof(HBRUSH
);
214 /* get rid of storage structure */
215 HeapFree(GetProcessHeap(), 0, pOldCol
);
227 GetInputDesktop ( VOID
)
238 GetAccCursorInfo ( PCURSORINFO pci
)
249 ClientThreadSetup ( VOID
)
260 GetRawInputDeviceInfoW(
275 CsrBroadcastSystemMessageExW(
277 LPDWORD lpdwRecipients
,
292 GetRawInputDeviceInfoA(
307 AlignRects(LPRECT rect
, DWORD b
, DWORD c
, DWORD d
)
319 PRAWINPUT
* paRawInput
,
362 GetRawInputDeviceList(
363 PRAWINPUTDEVICELIST pRawInputDeviceList
,
367 if(pRawInputDeviceList
)
368 memset(pRawInputDeviceList
, 0, sizeof *pRawInputDeviceList
);
380 GetRegisteredRawInputDevices(
381 PRAWINPUTDEVICE pRawInputDevices
,
408 RegisterRawInputDevices(
409 PCRAWINPUTDEVICE pRawInputDevices
,
420 BOOL WINAPI
DisplayExitWindowsWarnings(ULONG flags
)
429 BOOL WINAPI
ReasonCodeNeedsBugID(ULONG reasoncode
)
438 BOOL WINAPI
ReasonCodeNeedsComment(ULONG reasoncode
)
447 BOOL WINAPI
CtxInitUser32(VOID
)
456 BOOL WINAPI
EnterReaderModeHelper(HWND hwnd
)
465 VOID WINAPI
InitializeLpkHooks(FARPROC
*hookfuncs
)
473 WORD WINAPI
InitializeWin32EntryTable(UCHAR
* EntryTablePlus0x1000
)
482 BOOL WINAPI
IsServerSideWindow(HWND wnd
)
491 HKL WINAPI
LoadKeyboardLayoutEx(DWORD unknown
,LPCWSTR pwszKLID
,UINT Flags
) //1st parameter unknown
500 VOID WINAPI
AllowForegroundActivation(VOID
)
508 VOID WINAPI
ShowStartGlass(DWORD unknown
)
516 BOOL WINAPI
DdeGetQualityOfService(HWND hWnd
, DWORD Reserved
, PSECURITY_QUALITY_OF_SERVICE pqosPrev
)
525 BOOL WINAPI
SetProcessDPIAware(VOID
)
534 BOOL WINAPI
CliImmSetHotKey(DWORD dwID
, UINT uModifiers
, UINT uVirtualKey
, HKL hKl
)
543 DWORD WINAPI
GetMenuIndex(HMENU hMenu
, HMENU hSubMenu
)
552 DWORD WINAPI
UserRegisterWowHandlers(PVOID Unknown1
, PVOID Unknown2
)