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
);
57 return NtUserLockWindowUpdate(hWndLock
);
82 // Need to call NtQueryInformationProcess and send ProcessId not hProcess.
83 return NtUserWaitForInputIdle(hProcess
, dwMilliseconds
, FALSE
);
86 /******************************************************************************
87 * SetDebugErrorLevel [USER32.@]
88 * Sets the minimum error level for generating debugging events
91 * dwLevel [I] Debugging error level
97 SetDebugErrorLevel( DWORD dwLevel
)
99 DbgPrint("(%ld): stub\n", dwLevel
);
108 GetAppCompatFlags(HTASK hTask
)
110 PCLIENTINFO pci
= GetWin32ClientInfo();
112 return pci
->dwCompatFlags
;
120 GetAppCompatFlags2(HTASK hTask
)
122 PCLIENTINFO pci
= GetWin32ClientInfo();
124 return pci
->dwCompatFlags2
;
132 GetInternalWindowPos(
138 WINDOWPLACEMENT wndpl
;
140 if (GetWindowPlacement(hwnd
, &wndpl
))
142 if (rectWnd
) *rectWnd
= wndpl
.rcNormalPosition
;
143 if (ptIcon
) *ptIcon
= wndpl
.ptMinPosition
;
144 return wndpl
.showCmd
;
154 LoadLocalFonts ( VOID
)
164 LoadRemoteFonts ( VOID
)
174 SetInternalWindowPos(
189 RegisterSystemThread ( DWORD flags
, DWORD reserved
)
199 RegisterTasklist ( DWORD x
)
218 return NtUserDragObject(hwnd1
, hwnd2
, u1
, dw1
, hc1
);
229 UserRealizePalette ( HDC hDC
)
231 return NtUserCallOneParam((DWORD
) hDC
, ONEPARAM_ROUTINE_REALIZEPALETTE
);
235 /*************************************************************************
236 * SetSysColorsTemp (USER32.@) (Wine 10/22/2008)
240 * Called by W98SE desk.cpl Control Panel Applet:
241 * handle = SetSysColorsTemp(ptr, ptr, nCount); ("set" call)
242 * result = SetSysColorsTemp(NULL, NULL, handle); ("restore" call)
244 * pPens is an array of COLORREF values, which seems to be used
245 * to indicate the color values to create new pens with.
247 * pBrushes is an array of solid brush handles (returned by a previous
248 * CreateSolidBrush), which seems to contain the brush handles to set
249 * for the system colors.
251 * n seems to be used for
252 * a) indicating the number of entries to operate on (length of pPens,
254 * b) passing the handle that points to the previously used color settings.
255 * I couldn't figure out in hell what kind of handle this is on
256 * Windows. I just use a heap handle instead. Shouldn't matter anyway.
259 * heap handle of our own copy of the current syscolors in case of
260 * "set" call, i.e. pPens, pBrushes != NULL.
261 * TRUE (unconditionally !) in case of "restore" call,
262 * i.e. pPens, pBrushes == NULL.
263 * FALSE in case of either pPens != NULL and pBrushes == NULL
264 * or pPens == NULL and pBrushes != NULL.
266 * I'm not sure whether this implementation is 100% correct. [AM]
269 static HPEN SysColorPens
[COLOR_MENUBAR
+ 1];
270 static HBRUSH SysColorBrushes
[COLOR_MENUBAR
+ 1];
274 SetSysColorsTemp(const COLORREF
*pPens
,
275 const HBRUSH
*pBrushes
,
280 if (pPens
&& pBrushes
) /* "set" call */
282 /* allocate our structure to remember old colors */
283 LPVOID pOldCol
= HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD
)+n
*sizeof(HPEN
)+n
*sizeof(HBRUSH
));
285 *(DWORD
*)p
= n
; p
= (char*)p
+ sizeof(DWORD
);
286 memcpy(p
, SysColorPens
, n
*sizeof(HPEN
)); p
= (char*)p
+ n
*sizeof(HPEN
);
287 memcpy(p
, SysColorBrushes
, n
*sizeof(HBRUSH
)); p
= (char*)p
+ n
*sizeof(HBRUSH
);
289 for (i
=0; i
< n
; i
++)
291 SysColorPens
[i
] = CreatePen( PS_SOLID
, 1, pPens
[i
] );
292 SysColorBrushes
[i
] = pBrushes
[i
];
295 return (DWORD
) pOldCol
; /* FIXME: pointer truncation */
297 if (!pPens
&& !pBrushes
) /* "restore" call */
299 LPVOID pOldCol
= (LPVOID
)n
; /* FIXME: not 64-bit safe */
301 DWORD nCount
= *(DWORD
*)p
;
302 p
= (char*)p
+ sizeof(DWORD
);
304 for (i
=0; i
< nCount
; i
++)
306 DeleteObject(SysColorPens
[i
]);
307 SysColorPens
[i
] = *(HPEN
*)p
; p
= (char*)p
+ sizeof(HPEN
);
309 for (i
=0; i
< nCount
; i
++)
311 SysColorBrushes
[i
] = *(HBRUSH
*)p
; p
= (char*)p
+ sizeof(HBRUSH
);
313 /* get rid of storage structure */
314 HeapFree(GetProcessHeap(), 0, pOldCol
);
326 GetInputDesktop ( VOID
)
337 GetAccCursorInfo ( PCURSORINFO pci
)
348 ClientThreadSetup ( VOID
)
359 GetRawInputDeviceInfoW(
374 CsrBroadcastSystemMessageExW(
376 LPDWORD lpdwRecipients
,
391 GetRawInputDeviceInfoA(
406 AlignRects(LPRECT rect
, DWORD b
, DWORD c
, DWORD d
)
418 PRAWINPUT
* paRawInput
,
461 GetRawInputDeviceList(
462 PRAWINPUTDEVICELIST pRawInputDeviceList
,
466 if(pRawInputDeviceList
)
467 memset(pRawInputDeviceList
, 0, sizeof *pRawInputDeviceList
);
479 GetRegisteredRawInputDevices(
480 PRAWINPUTDEVICE pRawInputDevices
,
507 RegisterRawInputDevices(
508 PCRAWINPUTDEVICE pRawInputDevices
,
521 WINNLSGetIMEHotkey( HWND hwnd
)
532 WINNLSEnableIME( HWND hwnd
, BOOL enable
)
543 WINNLSGetEnableStatus( HWND hwnd
)
554 IMPSetIMEW( HWND hwnd
, LPIMEPROW ime
)
565 IMPQueryIMEW( LPIMEPROW ime
)
576 IMPGetIMEW( HWND hwnd
, LPIMEPROW ime
)
587 IMPSetIMEA( HWND hwnd
, LPIMEPROA ime
)
598 IMPQueryIMEA( LPIMEPROA ime
)
609 IMPGetIMEA( HWND hwnd
, LPIMEPROA ime
)
620 SendIMEMessageExW(HWND hwnd
,LPARAM lparam
)
631 SendIMEMessageExA(HWND hwnd
, LPARAM lparam
)
640 BOOL WINAPI
DisplayExitWindowsWarnings(ULONG flags
)
649 BOOL WINAPI
ReasonCodeNeedsBugID(ULONG reasoncode
)
658 BOOL WINAPI
ReasonCodeNeedsComment(ULONG reasoncode
)
667 BOOL WINAPI
CtxInitUser32(VOID
)
676 BOOL WINAPI
EnterReaderModeHelper(HWND hwnd
)
685 VOID WINAPI
InitializeLpkHooks(FARPROC
*hookfuncs
)
693 WORD WINAPI
InitializeWin32EntryTable(UCHAR
* EntryTablePlus0x1000
)
702 BOOL WINAPI
IsServerSideWindow(HWND wnd
)
708 typedef BOOL (CALLBACK
*THEME_HOOK_FUNC
) (DWORD state
,PVOID arg2
); //return type and 2nd parameter unknown
712 BOOL WINAPI
RegisterUserApiHook(HINSTANCE instance
,THEME_HOOK_FUNC proc
)
721 BOOL WINAPI
UnregisterUserApiHook(VOID
)
730 HKL WINAPI
LoadKeyboardLayoutEx(DWORD unknown
,LPCWSTR pwszKLID
,UINT Flags
) //1st parameter unknown
739 VOID WINAPI
AllowForegroundActivation(VOID
)
747 VOID WINAPI
ShowStartGlass(DWORD unknown
)
755 BOOL WINAPI
DdeGetQualityOfService(HWND hWnd
, DWORD Reserved
, PSECURITY_QUALITY_OF_SERVICE pqosPrev
)
765 DWORD WINAPI
User32InitializeImmEntryTable(PVOID p
)