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
);
25 LPMOUSEMOVEPOINT lppt
,
26 LPMOUSEMOVEPOINT lpptBuf
,
30 if((cbSize
!= sizeof(MOUSEMOVEPOINT
)) || (nBufPoints
< 0) || (nBufPoints
> 64))
32 SetLastError(ERROR_INVALID_PARAMETER
);
38 SetLastError(ERROR_NOACCESS
);
44 SetLastError(ERROR_POINT_NOT_FOUND
);
58 // Need to call NtQueryInformationProcess and send ProcessId not hProcess.
59 return NtUserWaitForInputIdle(hProcess
, dwMilliseconds
, FALSE
);
62 /******************************************************************************
63 * SetDebugErrorLevel [USER32.@]
64 * Sets the minimum error level for generating debugging events
67 * dwLevel [I] Debugging error level
73 SetDebugErrorLevel( DWORD dwLevel
)
75 DbgPrint("(%ld): stub\n", dwLevel
);
84 GetAppCompatFlags(HTASK hTask
)
86 PCLIENTINFO pci
= GetWin32ClientInfo();
88 return pci
->dwCompatFlags
;
96 GetAppCompatFlags2(HTASK hTask
)
98 PCLIENTINFO pci
= GetWin32ClientInfo();
100 return pci
->dwCompatFlags2
;
108 GetInternalWindowPos(
114 WINDOWPLACEMENT wndpl
;
116 if (GetWindowPlacement(hwnd
, &wndpl
))
118 if (rectWnd
) *rectWnd
= wndpl
.rcNormalPosition
;
119 if (ptIcon
) *ptIcon
= wndpl
.ptMinPosition
;
120 return wndpl
.showCmd
;
130 LoadLocalFonts ( VOID
)
140 LoadRemoteFonts ( VOID
)
150 RegisterSystemThread ( DWORD flags
, DWORD reserved
)
161 UserRealizePalette ( HDC hDC
)
163 return NtUserCallOneParam((DWORD
) hDC
, ONEPARAM_ROUTINE_REALIZEPALETTE
);
167 /*************************************************************************
168 * SetSysColorsTemp (USER32.@) (Wine 10/22/2008)
172 * Called by W98SE desk.cpl Control Panel Applet:
173 * handle = SetSysColorsTemp(ptr, ptr, nCount); ("set" call)
174 * result = SetSysColorsTemp(NULL, NULL, handle); ("restore" call)
176 * pPens is an array of COLORREF values, which seems to be used
177 * to indicate the color values to create new pens with.
179 * pBrushes is an array of solid brush handles (returned by a previous
180 * CreateSolidBrush), which seems to contain the brush handles to set
181 * for the system colors.
183 * n seems to be used for
184 * a) indicating the number of entries to operate on (length of pPens,
186 * b) passing the handle that points to the previously used color settings.
187 * I couldn't figure out in hell what kind of handle this is on
188 * Windows. I just use a heap handle instead. Shouldn't matter anyway.
191 * heap handle of our own copy of the current syscolors in case of
192 * "set" call, i.e. pPens, pBrushes != NULL.
193 * TRUE (unconditionally !) in case of "restore" call,
194 * i.e. pPens, pBrushes == NULL.
195 * FALSE in case of either pPens != NULL and pBrushes == NULL
196 * or pPens == NULL and pBrushes != NULL.
198 * I'm not sure whether this implementation is 100% correct. [AM]
201 static HPEN SysColorPens
[COLOR_MENUBAR
+ 1];
202 static HBRUSH SysColorBrushes
[COLOR_MENUBAR
+ 1];
206 SetSysColorsTemp(const COLORREF
*pPens
,
207 const HBRUSH
*pBrushes
,
212 if (pPens
&& pBrushes
) /* "set" call */
214 /* allocate our structure to remember old colors */
215 LPVOID pOldCol
= HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD
)+n
*sizeof(HPEN
)+n
*sizeof(HBRUSH
));
217 *(DWORD
*)p
= n
; p
= (char*)p
+ sizeof(DWORD
);
218 memcpy(p
, SysColorPens
, n
*sizeof(HPEN
)); p
= (char*)p
+ n
*sizeof(HPEN
);
219 memcpy(p
, SysColorBrushes
, n
*sizeof(HBRUSH
)); p
= (char*)p
+ n
*sizeof(HBRUSH
);
221 for (i
=0; i
< n
; i
++)
223 SysColorPens
[i
] = CreatePen( PS_SOLID
, 1, pPens
[i
] );
224 SysColorBrushes
[i
] = pBrushes
[i
];
227 return (DWORD
) pOldCol
; /* FIXME: pointer truncation */
229 if (!pPens
&& !pBrushes
) /* "restore" call */
231 LPVOID pOldCol
= (LPVOID
)n
; /* FIXME: not 64-bit safe */
233 DWORD nCount
= *(DWORD
*)p
;
234 p
= (char*)p
+ sizeof(DWORD
);
236 for (i
=0; i
< nCount
; i
++)
238 DeleteObject(SysColorPens
[i
]);
239 SysColorPens
[i
] = *(HPEN
*)p
; p
= (char*)p
+ sizeof(HPEN
);
241 for (i
=0; i
< nCount
; i
++)
243 SysColorBrushes
[i
] = *(HBRUSH
*)p
; p
= (char*)p
+ sizeof(HBRUSH
);
245 /* get rid of storage structure */
246 HeapFree(GetProcessHeap(), 0, pOldCol
);
258 GetInputDesktop ( VOID
)
269 GetAccCursorInfo ( PCURSORINFO pci
)
280 ClientThreadSetup ( VOID
)
291 GetRawInputDeviceInfoW(
306 CsrBroadcastSystemMessageExW(
308 LPDWORD lpdwRecipients
,
323 GetRawInputDeviceInfoA(
338 AlignRects(LPRECT rect
, DWORD b
, DWORD c
, DWORD d
)
350 PRAWINPUT
* paRawInput
,
393 GetRawInputDeviceList(
394 PRAWINPUTDEVICELIST pRawInputDeviceList
,
398 if(pRawInputDeviceList
)
399 memset(pRawInputDeviceList
, 0, sizeof *pRawInputDeviceList
);
411 GetRegisteredRawInputDevices(
412 PRAWINPUTDEVICE pRawInputDevices
,
439 RegisterRawInputDevices(
440 PCRAWINPUTDEVICE pRawInputDevices
,
451 BOOL WINAPI
DisplayExitWindowsWarnings(ULONG flags
)
460 BOOL WINAPI
ReasonCodeNeedsBugID(ULONG reasoncode
)
469 BOOL WINAPI
ReasonCodeNeedsComment(ULONG reasoncode
)
478 BOOL WINAPI
CtxInitUser32(VOID
)
487 BOOL WINAPI
EnterReaderModeHelper(HWND hwnd
)
496 VOID WINAPI
InitializeLpkHooks(FARPROC
*hookfuncs
)
504 WORD WINAPI
InitializeWin32EntryTable(UCHAR
* EntryTablePlus0x1000
)
513 BOOL WINAPI
IsServerSideWindow(HWND wnd
)
519 typedef BOOL (CALLBACK
*THEME_HOOK_FUNC
) (DWORD state
,PVOID arg2
); //return type and 2nd parameter unknown
523 BOOL WINAPI
RegisterUserApiHook(HINSTANCE instance
,THEME_HOOK_FUNC proc
)
532 BOOL WINAPI
UnregisterUserApiHook(VOID
)
541 HKL WINAPI
LoadKeyboardLayoutEx(DWORD unknown
,LPCWSTR pwszKLID
,UINT Flags
) //1st parameter unknown
550 VOID WINAPI
AllowForegroundActivation(VOID
)
558 VOID WINAPI
ShowStartGlass(DWORD unknown
)
566 BOOL WINAPI
DdeGetQualityOfService(HWND hWnd
, DWORD Reserved
, PSECURITY_QUALITY_OF_SERVICE pqosPrev
)
575 BOOL WINAPI
SetProcessDPIAware(VOID
)
584 BOOL WINAPI
CliImmSetHotKey(DWORD dwID
, UINT uModifiers
, UINT uVirtualKey
, HKL hKl
)
593 DWORD WINAPI
GetMenuIndex(HMENU hMenu
, HMENU hSubMenu
)
602 DWORD WINAPI
UserRegisterWowHandlers(PVOID Unknown1
, PVOID Unknown2
)