2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS user32.dll
4 * FILE: win32ss/user/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 WINE_DEFAULT_DEBUG_CHANNEL(user32
);
25 // Need to call NtQueryInformationProcess and send ProcessId not hProcess.
26 return NtUserWaitForInputIdle(hProcess
, dwMilliseconds
, FALSE
);
29 /******************************************************************************
30 * SetDebugErrorLevel [USER32.@]
31 * Sets the minimum error level for generating debugging events
34 * dwLevel [I] Debugging error level
40 SetDebugErrorLevel( DWORD dwLevel
)
42 FIXME("(%lu): stub\n", dwLevel
);
51 GetAppCompatFlags(HTASK hTask
)
53 PCLIENTINFO pci
= GetWin32ClientInfo();
55 return pci
->dwCompatFlags
;
63 GetAppCompatFlags2(HTASK hTask
)
65 PCLIENTINFO pci
= GetWin32ClientInfo();
67 return pci
->dwCompatFlags2
;
75 LoadLocalFonts ( VOID
)
85 LoadRemoteFonts ( VOID
)
95 RegisterSystemThread ( DWORD flags
, DWORD reserved
)
106 UserRealizePalette ( HDC hDC
)
108 return NtUserxRealizePalette(hDC
);
112 /*************************************************************************
113 * SetSysColorsTemp (USER32.@) (Wine 10/22/2008)
117 * Called by W98SE desk.cpl Control Panel Applet:
118 * handle = SetSysColorsTemp(ptr, ptr, nCount); ("set" call)
119 * result = SetSysColorsTemp(NULL, NULL, handle); ("restore" call)
121 * pPens is an array of COLORREF values, which seems to be used
122 * to indicate the color values to create new pens with.
124 * pBrushes is an array of solid brush handles (returned by a previous
125 * CreateSolidBrush), which seems to contain the brush handles to set
126 * for the system colors.
128 * n seems to be used for
129 * a) indicating the number of entries to operate on (length of pPens,
131 * b) passing the handle that points to the previously used color settings.
132 * I couldn't figure out in hell what kind of handle this is on
133 * Windows. I just use a heap handle instead. Shouldn't matter anyway.
136 * heap handle of our own copy of the current syscolors in case of
137 * "set" call, i.e. pPens, pBrushes != NULL.
138 * TRUE (unconditionally !) in case of "restore" call,
139 * i.e. pPens, pBrushes == NULL.
140 * FALSE in case of either pPens != NULL and pBrushes == NULL
141 * or pPens == NULL and pBrushes != NULL.
143 * I'm not sure whether this implementation is 100% correct. [AM]
146 static HPEN SysColorPens
[COLOR_MENUBAR
+ 1];
147 static HBRUSH SysColorBrushes
[COLOR_MENUBAR
+ 1];
151 SetSysColorsTemp(const COLORREF
*pPens
,
152 const HBRUSH
*pBrushes
,
157 if (pPens
&& pBrushes
) /* "set" call */
159 /* allocate our structure to remember old colors */
160 LPVOID pOldCol
= HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD
)+n
*sizeof(HPEN
)+n
*sizeof(HBRUSH
));
162 *(DWORD_PTR
*)p
= n
; p
= (char*)p
+ sizeof(DWORD
);
163 memcpy(p
, SysColorPens
, n
*sizeof(HPEN
)); p
= (char*)p
+ n
*sizeof(HPEN
);
164 memcpy(p
, SysColorBrushes
, n
*sizeof(HBRUSH
)); p
= (char*)p
+ n
*sizeof(HBRUSH
);
166 for (i
=0; i
< n
; i
++)
168 SysColorPens
[i
] = CreatePen( PS_SOLID
, 1, pPens
[i
] );
169 SysColorBrushes
[i
] = pBrushes
[i
];
172 return (DWORD_PTR
) pOldCol
;
174 if (!pPens
&& !pBrushes
) /* "restore" call */
176 LPVOID pOldCol
= (LPVOID
)n
;
178 DWORD nCount
= *(DWORD
*)p
;
179 p
= (char*)p
+ sizeof(DWORD
);
181 for (i
=0; i
< nCount
; i
++)
183 DeleteObject(SysColorPens
[i
]);
184 SysColorPens
[i
] = *(HPEN
*)p
; p
= (char*)p
+ sizeof(HPEN
);
186 for (i
=0; i
< nCount
; i
++)
188 SysColorBrushes
[i
] = *(HBRUSH
*)p
; p
= (char*)p
+ sizeof(HBRUSH
);
190 /* get rid of storage structure */
191 HeapFree(GetProcessHeap(), 0, pOldCol
);
203 GetInputDesktop ( VOID
)
214 GetAccCursorInfo ( PCURSORINFO pci
)
225 GetRawInputDeviceInfoW(
240 CsrBroadcastSystemMessageExW(
242 LPDWORD lpdwRecipients
,
257 GetRawInputDeviceInfoA(
272 AlignRects(LPRECT rect
, DWORD b
, DWORD c
, DWORD d
)
284 PRAWINPUT
* paRawInput
,
288 if (cbSizeHeader
== sizeof(RAWINPUTHEADER
))
329 GetRawInputDeviceList(
330 PRAWINPUTDEVICELIST pRawInputDeviceList
,
334 if(pRawInputDeviceList
)
335 memset(pRawInputDeviceList
, 0, sizeof *pRawInputDeviceList
);
349 GetRegisteredRawInputDevices(
350 PRAWINPUTDEVICE pRawInputDevices
,
364 RegisterRawInputDevices(
365 PCRAWINPUTDEVICE pRawInputDevices
,
376 BOOL WINAPI
DisplayExitWindowsWarnings(ULONG flags
)
385 BOOL WINAPI
ReasonCodeNeedsBugID(ULONG reasoncode
)
394 BOOL WINAPI
ReasonCodeNeedsComment(ULONG reasoncode
)
403 BOOL WINAPI
CtxInitUser32(VOID
)
412 BOOL WINAPI
EnterReaderModeHelper(HWND hwnd
)
421 VOID WINAPI
InitializeLpkHooks(FARPROC
*hookfuncs
)
429 WORD WINAPI
InitializeWin32EntryTable(UCHAR
* EntryTablePlus0x1000
)
438 BOOL WINAPI
IsServerSideWindow(HWND wnd
)
447 HKL WINAPI
LoadKeyboardLayoutEx(DWORD unknown
,LPCWSTR pwszKLID
,UINT Flags
) //1st parameter unknown
456 VOID WINAPI
AllowForegroundActivation(VOID
)
464 VOID WINAPI
ShowStartGlass(DWORD unknown
)
472 DWORD WINAPI
GetMenuIndex(HMENU hMenu
, HMENU hSubMenu
)
474 return NtUserGetMenuIndex(hMenu
, hSubMenu
);
480 DWORD WINAPI
UserRegisterWowHandlers(PVOID Unknown1
, PVOID Unknown2
)
488 BuildReasonArray(PVOID Pointer
)
496 CreateSystemThreads(DWORD Unused
)
498 /* Thread call for remote processes (non-CSRSS) only */
499 NtUserxCreateSystemThreads(TRUE
);
505 DestroyReasons(PVOID Pointer
)
513 DeviceEventWorker(DWORD dw1
, DWORD dw2
, DWORD dw3
, DWORD dw4
, DWORD dw5
)
521 GetReasonTitleFromReasonCode(DWORD dw1
, DWORD dw2
, DWORD dw3
)
532 * Determines whether the Shutdown Event Tracker is enabled.
534 * See http://undoc.airesoft.co.uk/user32.dll/IsSETEnabled.php
535 * for more information.
543 RecordShutdownReason(DWORD dw0
)
551 UserLpkPSMTextOut(DWORD dw1
, DWORD dw2
, DWORD dw3
, DWORD dw4
, DWORD dw5
, DWORD dw6
)
559 UserLpkTabbedTextOut(
579 Win32PoolAllocationStats(DWORD dw1
, DWORD dw2
, DWORD dw3
, DWORD dw4
, DWORD dw5
)