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 (NtUserGetWindowPlacement(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 SetInternalWindowPos(
165 RegisterSystemThread ( DWORD flags
, DWORD reserved
)
176 UserRealizePalette ( HDC hDC
)
178 return NtUserCallOneParam((DWORD
) hDC
, ONEPARAM_ROUTINE_REALIZEPALETTE
);
182 /*************************************************************************
183 * SetSysColorsTemp (USER32.@) (Wine 10/22/2008)
187 * Called by W98SE desk.cpl Control Panel Applet:
188 * handle = SetSysColorsTemp(ptr, ptr, nCount); ("set" call)
189 * result = SetSysColorsTemp(NULL, NULL, handle); ("restore" call)
191 * pPens is an array of COLORREF values, which seems to be used
192 * to indicate the color values to create new pens with.
194 * pBrushes is an array of solid brush handles (returned by a previous
195 * CreateSolidBrush), which seems to contain the brush handles to set
196 * for the system colors.
198 * n seems to be used for
199 * a) indicating the number of entries to operate on (length of pPens,
201 * b) passing the handle that points to the previously used color settings.
202 * I couldn't figure out in hell what kind of handle this is on
203 * Windows. I just use a heap handle instead. Shouldn't matter anyway.
206 * heap handle of our own copy of the current syscolors in case of
207 * "set" call, i.e. pPens, pBrushes != NULL.
208 * TRUE (unconditionally !) in case of "restore" call,
209 * i.e. pPens, pBrushes == NULL.
210 * FALSE in case of either pPens != NULL and pBrushes == NULL
211 * or pPens == NULL and pBrushes != NULL.
213 * I'm not sure whether this implementation is 100% correct. [AM]
216 static HPEN SysColorPens
[COLOR_MENUBAR
+ 1];
217 static HBRUSH SysColorBrushes
[COLOR_MENUBAR
+ 1];
221 SetSysColorsTemp(const COLORREF
*pPens
,
222 const HBRUSH
*pBrushes
,
227 if (pPens
&& pBrushes
) /* "set" call */
229 /* allocate our structure to remember old colors */
230 LPVOID pOldCol
= HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD
)+n
*sizeof(HPEN
)+n
*sizeof(HBRUSH
));
232 *(DWORD
*)p
= n
; p
= (char*)p
+ sizeof(DWORD
);
233 memcpy(p
, SysColorPens
, n
*sizeof(HPEN
)); p
= (char*)p
+ n
*sizeof(HPEN
);
234 memcpy(p
, SysColorBrushes
, n
*sizeof(HBRUSH
)); p
= (char*)p
+ n
*sizeof(HBRUSH
);
236 for (i
=0; i
< n
; i
++)
238 SysColorPens
[i
] = CreatePen( PS_SOLID
, 1, pPens
[i
] );
239 SysColorBrushes
[i
] = pBrushes
[i
];
242 return (DWORD
) pOldCol
; /* FIXME: pointer truncation */
244 if (!pPens
&& !pBrushes
) /* "restore" call */
246 LPVOID pOldCol
= (LPVOID
)n
; /* FIXME: not 64-bit safe */
248 DWORD nCount
= *(DWORD
*)p
;
249 p
= (char*)p
+ sizeof(DWORD
);
251 for (i
=0; i
< nCount
; i
++)
253 DeleteObject(SysColorPens
[i
]);
254 SysColorPens
[i
] = *(HPEN
*)p
; p
= (char*)p
+ sizeof(HPEN
);
256 for (i
=0; i
< nCount
; i
++)
258 SysColorBrushes
[i
] = *(HBRUSH
*)p
; p
= (char*)p
+ sizeof(HBRUSH
);
260 /* get rid of storage structure */
261 HeapFree(GetProcessHeap(), 0, pOldCol
);
273 GetInputDesktop ( VOID
)
284 GetAccCursorInfo ( PCURSORINFO pci
)
295 ClientThreadSetup ( VOID
)
306 GetRawInputDeviceInfoW(
321 CsrBroadcastSystemMessageExW(
323 LPDWORD lpdwRecipients
,
338 GetRawInputDeviceInfoA(
353 AlignRects(LPRECT rect
, DWORD b
, DWORD c
, DWORD d
)
365 PRAWINPUT
* paRawInput
,
408 GetRawInputDeviceList(
409 PRAWINPUTDEVICELIST pRawInputDeviceList
,
413 if(pRawInputDeviceList
)
414 memset(pRawInputDeviceList
, 0, sizeof *pRawInputDeviceList
);
426 GetRegisteredRawInputDevices(
427 PRAWINPUTDEVICE pRawInputDevices
,
454 RegisterRawInputDevices(
455 PCRAWINPUTDEVICE pRawInputDevices
,
468 WINNLSGetIMEHotkey( HWND hwnd
)
479 WINNLSEnableIME( HWND hwnd
, BOOL enable
)
490 WINNLSGetEnableStatus( HWND hwnd
)
501 IMPSetIMEW( HWND hwnd
, LPIMEPROW ime
)
512 IMPQueryIMEW( LPIMEPROW ime
)
523 IMPGetIMEW( HWND hwnd
, LPIMEPROW ime
)
534 IMPSetIMEA( HWND hwnd
, LPIMEPROA ime
)
545 IMPQueryIMEA( LPIMEPROA ime
)
556 IMPGetIMEA( HWND hwnd
, LPIMEPROA ime
)
567 SendIMEMessageExW(HWND hwnd
,LPARAM lparam
)
578 SendIMEMessageExA(HWND hwnd
, LPARAM lparam
)
587 BOOL WINAPI
DisplayExitWindowsWarnings(ULONG flags
)
596 BOOL WINAPI
ReasonCodeNeedsBugID(ULONG reasoncode
)
605 BOOL WINAPI
ReasonCodeNeedsComment(ULONG reasoncode
)
614 BOOL WINAPI
CtxInitUser32(VOID
)
623 BOOL WINAPI
EnterReaderModeHelper(HWND hwnd
)
632 VOID WINAPI
InitializeLpkHooks(FARPROC
*hookfuncs
)
640 WORD WINAPI
InitializeWin32EntryTable(UCHAR
* EntryTablePlus0x1000
)
649 BOOL WINAPI
IsServerSideWindow(HWND wnd
)
655 typedef BOOL (CALLBACK
*THEME_HOOK_FUNC
) (DWORD state
,PVOID arg2
); //return type and 2nd parameter unknown
659 BOOL WINAPI
RegisterUserApiHook(HINSTANCE instance
,THEME_HOOK_FUNC proc
)
668 BOOL WINAPI
UnregisterUserApiHook(VOID
)
677 HKL WINAPI
LoadKeyboardLayoutEx(DWORD unknown
,LPCWSTR pwszKLID
,UINT Flags
) //1st parameter unknown
686 VOID WINAPI
AllowForegroundActivation(VOID
)
694 VOID WINAPI
ShowStartGlass(DWORD unknown
)
702 BOOL WINAPI
DdeGetQualityOfService(HWND hWnd
, DWORD Reserved
, PSECURITY_QUALITY_OF_SERVICE pqosPrev
)
712 DWORD WINAPI
User32InitializeImmEntryTable(PVOID p
)