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("(%ld): 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 ClientThreadSetup ( VOID
)
238 GetRawInputDeviceInfoW(
253 CsrBroadcastSystemMessageExW(
255 LPDWORD lpdwRecipients
,
270 GetRawInputDeviceInfoA(
285 AlignRects(LPRECT rect
, DWORD b
, DWORD c
, DWORD d
)
297 PRAWINPUT
* paRawInput
,
301 if (cbSizeHeader
== sizeof(RAWINPUTHEADER
))
341 GetRawInputDeviceList(
342 PRAWINPUTDEVICELIST pRawInputDeviceList
,
346 if(pRawInputDeviceList
)
347 memset(pRawInputDeviceList
, 0, sizeof *pRawInputDeviceList
);
359 GetRegisteredRawInputDevices(
360 PRAWINPUTDEVICE pRawInputDevices
,
373 RegisterRawInputDevices(
374 PCRAWINPUTDEVICE pRawInputDevices
,
385 BOOL WINAPI
DisplayExitWindowsWarnings(ULONG flags
)
394 BOOL WINAPI
ReasonCodeNeedsBugID(ULONG reasoncode
)
403 BOOL WINAPI
ReasonCodeNeedsComment(ULONG reasoncode
)
412 BOOL WINAPI
CtxInitUser32(VOID
)
421 BOOL WINAPI
EnterReaderModeHelper(HWND hwnd
)
430 VOID WINAPI
InitializeLpkHooks(FARPROC
*hookfuncs
)
438 WORD WINAPI
InitializeWin32EntryTable(UCHAR
* EntryTablePlus0x1000
)
447 BOOL WINAPI
IsServerSideWindow(HWND wnd
)
456 HKL WINAPI
LoadKeyboardLayoutEx(DWORD unknown
,LPCWSTR pwszKLID
,UINT Flags
) //1st parameter unknown
465 VOID WINAPI
AllowForegroundActivation(VOID
)
473 VOID WINAPI
ShowStartGlass(DWORD unknown
)
481 BOOL WINAPI
DdeGetQualityOfService(HWND hWnd
, DWORD Reserved
, PSECURITY_QUALITY_OF_SERVICE pqosPrev
)
490 BOOL WINAPI
SetProcessDPIAware(VOID
)
499 BOOL WINAPI
CliImmSetHotKey(DWORD dwID
, UINT uModifiers
, UINT uVirtualKey
, HKL hKl
)
508 DWORD WINAPI
GetMenuIndex(HMENU hMenu
, HMENU hSubMenu
)
510 return NtUserGetMenuIndex(hMenu
, hSubMenu
);
516 DWORD WINAPI
UserRegisterWowHandlers(PVOID Unknown1
, PVOID Unknown2
)
524 BuildReasonArray(PVOID Pointer
)
532 CreateSystemThreads(DWORD dwUnknown
)
534 NtUserxCreateSystemThreads(dwUnknown
);
540 DestroyReasons(PVOID Pointer
)
548 DeviceEventWorker(DWORD dw1
, DWORD dw2
, DWORD dw3
, DWORD dw4
, DWORD dw5
)
556 GetCursorFrameInfo(HCURSOR hCursor
, LPCWSTR name
, DWORD istep
, PDWORD rate_jiffies
, INT
*num_steps
)
558 if (hCursor
) return NtUserGetCursorFrameInfo(hCursor
, istep
, rate_jiffies
, num_steps
);
560 return LoadImageW( NULL
, name
, IMAGE_CURSOR
, 0, 0, LR_DEFAULTSIZE
);
565 GetReasonTitleFromReasonCode(DWORD dw1
, DWORD dw2
, DWORD dw3
)
573 RecordShutdownReason(DWORD dw0
)
581 UserLpkPSMTextOut(DWORD dw1
, DWORD dw2
, DWORD dw3
, DWORD dw4
, DWORD dw5
, DWORD dw6
)
589 UserLpkTabbedTextOut(
609 Win32PoolAllocationStats(DWORD dw1
, DWORD dw2
, DWORD dw3
, DWORD dw4
, DWORD dw5
)