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("(%lu): 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
;
77 LoadLocalFonts ( VOID
)
87 LoadRemoteFonts ( VOID
)
97 RegisterSystemThread ( DWORD flags
, DWORD reserved
)
108 UserRealizePalette ( HDC hDC
)
110 return NtUserxRealizePalette(hDC
);
114 /*************************************************************************
115 * SetSysColorsTemp (USER32.@) (Wine 10/22/2008)
119 * Called by W98SE desk.cpl Control Panel Applet:
120 * handle = SetSysColorsTemp(ptr, ptr, nCount); ("set" call)
121 * result = SetSysColorsTemp(NULL, NULL, handle); ("restore" call)
123 * pPens is an array of COLORREF values, which seems to be used
124 * to indicate the color values to create new pens with.
126 * pBrushes is an array of solid brush handles (returned by a previous
127 * CreateSolidBrush), which seems to contain the brush handles to set
128 * for the system colors.
130 * n seems to be used for
131 * a) indicating the number of entries to operate on (length of pPens,
133 * b) passing the handle that points to the previously used color settings.
134 * I couldn't figure out in hell what kind of handle this is on
135 * Windows. I just use a heap handle instead. Shouldn't matter anyway.
138 * heap handle of our own copy of the current syscolors in case of
139 * "set" call, i.e. pPens, pBrushes != NULL.
140 * TRUE (unconditionally !) in case of "restore" call,
141 * i.e. pPens, pBrushes == NULL.
142 * FALSE in case of either pPens != NULL and pBrushes == NULL
143 * or pPens == NULL and pBrushes != NULL.
145 * I'm not sure whether this implementation is 100% correct. [AM]
148 static HPEN SysColorPens
[COLOR_MENUBAR
+ 1];
149 static HBRUSH SysColorBrushes
[COLOR_MENUBAR
+ 1];
153 SetSysColorsTemp(const COLORREF
*pPens
,
154 const HBRUSH
*pBrushes
,
159 if (pPens
&& pBrushes
) /* "set" call */
161 /* allocate our structure to remember old colors */
162 LPVOID pOldCol
= HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD
)+n
*sizeof(HPEN
)+n
*sizeof(HBRUSH
));
164 *(DWORD_PTR
*)p
= n
; p
= (char*)p
+ sizeof(DWORD
);
165 memcpy(p
, SysColorPens
, n
*sizeof(HPEN
)); p
= (char*)p
+ n
*sizeof(HPEN
);
166 memcpy(p
, SysColorBrushes
, n
*sizeof(HBRUSH
)); p
= (char*)p
+ n
*sizeof(HBRUSH
);
168 for (i
=0; i
< n
; i
++)
170 SysColorPens
[i
] = CreatePen( PS_SOLID
, 1, pPens
[i
] );
171 SysColorBrushes
[i
] = pBrushes
[i
];
174 return (DWORD_PTR
) pOldCol
;
176 if (!pPens
&& !pBrushes
) /* "restore" call */
178 LPVOID pOldCol
= (LPVOID
)n
;
180 DWORD nCount
= *(DWORD
*)p
;
181 p
= (char*)p
+ sizeof(DWORD
);
183 for (i
=0; i
< nCount
; i
++)
185 DeleteObject(SysColorPens
[i
]);
186 SysColorPens
[i
] = *(HPEN
*)p
; p
= (char*)p
+ sizeof(HPEN
);
188 for (i
=0; i
< nCount
; i
++)
190 SysColorBrushes
[i
] = *(HBRUSH
*)p
; p
= (char*)p
+ sizeof(HBRUSH
);
192 /* get rid of storage structure */
193 HeapFree(GetProcessHeap(), 0, pOldCol
);
205 GetInputDesktop ( VOID
)
216 GetAccCursorInfo ( PCURSORINFO pci
)
227 GetRawInputDeviceInfoW(
242 CsrBroadcastSystemMessageExW(
244 LPDWORD lpdwRecipients
,
259 GetRawInputDeviceInfoA(
274 AlignRects(LPRECT rect
, DWORD b
, DWORD c
, DWORD d
)
286 PRAWINPUT
* paRawInput
,
290 if (cbSizeHeader
== sizeof(RAWINPUTHEADER
))
331 GetRawInputDeviceList(
332 PRAWINPUTDEVICELIST pRawInputDeviceList
,
336 if(pRawInputDeviceList
)
337 memset(pRawInputDeviceList
, 0, sizeof *pRawInputDeviceList
);
350 GetRegisteredRawInputDevices(
351 PRAWINPUTDEVICE pRawInputDevices
,
365 RegisterRawInputDevices(
366 PCRAWINPUTDEVICE pRawInputDevices
,
377 BOOL WINAPI
DisplayExitWindowsWarnings(ULONG flags
)
386 BOOL WINAPI
ReasonCodeNeedsBugID(ULONG reasoncode
)
395 BOOL WINAPI
ReasonCodeNeedsComment(ULONG reasoncode
)
404 BOOL WINAPI
CtxInitUser32(VOID
)
413 BOOL WINAPI
EnterReaderModeHelper(HWND hwnd
)
422 VOID WINAPI
InitializeLpkHooks(FARPROC
*hookfuncs
)
430 WORD WINAPI
InitializeWin32EntryTable(UCHAR
* EntryTablePlus0x1000
)
439 BOOL WINAPI
IsServerSideWindow(HWND wnd
)
448 HKL WINAPI
LoadKeyboardLayoutEx(DWORD unknown
,LPCWSTR pwszKLID
,UINT Flags
) //1st parameter unknown
457 VOID WINAPI
AllowForegroundActivation(VOID
)
465 VOID WINAPI
ShowStartGlass(DWORD unknown
)
473 BOOL WINAPI
DdeGetQualityOfService(HWND hWnd
, DWORD Reserved
, PSECURITY_QUALITY_OF_SERVICE pqosPrev
)
482 BOOL WINAPI
CliImmSetHotKey(DWORD dwID
, UINT uModifiers
, UINT uVirtualKey
, HKL hKl
)
491 DWORD WINAPI
GetMenuIndex(HMENU hMenu
, HMENU hSubMenu
)
493 return NtUserGetMenuIndex(hMenu
, hSubMenu
);
499 DWORD WINAPI
UserRegisterWowHandlers(PVOID Unknown1
, PVOID Unknown2
)
507 BuildReasonArray(PVOID Pointer
)
515 CreateSystemThreads(DWORD dwUnknown
)
517 NtUserxCreateSystemThreads(dwUnknown
);
523 DestroyReasons(PVOID Pointer
)
531 DeviceEventWorker(DWORD dw1
, DWORD dw2
, DWORD dw3
, DWORD dw4
, DWORD dw5
)
539 GetReasonTitleFromReasonCode(DWORD dw1
, DWORD dw2
, DWORD dw3
)
550 * Determines whether the Shutdown Event Tracker is enabled.
552 * See http://undoc.airesoft.co.uk/user32.dll/IsSETEnabled.php
553 * for more information.
561 RecordShutdownReason(DWORD dw0
)
569 UserLpkPSMTextOut(DWORD dw1
, DWORD dw2
, DWORD dw3
, DWORD dw4
, DWORD dw5
, DWORD dw6
)
577 UserLpkTabbedTextOut(
597 Win32PoolAllocationStats(DWORD dw1
, DWORD dw2
, DWORD dw3
, DWORD dw4
, DWORD dw5
)