Author: tkreuzer Date: Wed Feb 2 13:15:26 2011 New Revision: 50590
URL: http://svn.reactos.org/svn/reactos?rev=50590&view=rev Log: [USER32] - Remove exports for IsProcess16Bit and IsSETEnabled - Redirect CalcMenuBar, PaintMenuBar and SetConsoleReserveKeys to NtUser* - Implement stubs for BuildReasonArray, CreateSystemThreads, DestroyReasons, DeviceEventWorker, GetCursorFrameInfo, GetReasonTitleFromReasonCode, RecordShutdownReason, UserLpkPSMTextOut, UserLpkTabbedTextOut, Win32PoolAllocationStats - Remove implementations of SetCursor, ClipCursor, GetClipCursor and HiliteMenuItem - Remove auto stub file from sources - Fix resource include path
Modified: branches/cmake-bringup/dll/win32/user32/CMakeLists.txt branches/cmake-bringup/dll/win32/user32/misc/stubs.c branches/cmake-bringup/dll/win32/user32/user32.rc branches/cmake-bringup/dll/win32/user32/user32.spec branches/cmake-bringup/dll/win32/user32/windows/cursoricon.c branches/cmake-bringup/dll/win32/user32/windows/menu.c
Modified: branches/cmake-bringup/dll/win32/user32/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/C... ============================================================================== --- branches/cmake-bringup/dll/win32/user32/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/user32/CMakeLists.txt [iso-8859-1] Wed Feb 2 13:15:26 2011 @@ -64,7 +64,6 @@ windows/window.c windows/winpos.c user32.rc - ${CMAKE_CURRENT_BINARY_DIR}/user32_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/user32.def)
add_library(user32 SHARED
Modified: branches/cmake-bringup/dll/win32/user32/misc/stubs.c URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/m... ============================================================================== --- branches/cmake-bringup/dll/win32/user32/misc/stubs.c [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/user32/misc/stubs.c [iso-8859-1] Wed Feb 2 13:15:26 2011 @@ -541,3 +541,94 @@ return 0; }
+BOOL +WINAPI +BuildReasonArray(PVOID Pointer) +{ + UNIMPLEMENTED; + return FALSE; +} + +VOID +WINAPI +CreateSystemThreads(DWORD dwUnknown) +{ + NtUserCallOneParam(dwUnknown, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS); +} + +BOOL +WINAPI +DestroyReasons(PVOID Pointer) +{ + UNIMPLEMENTED; + return FALSE; +} + +BOOL +WINAPI +DeviceEventWorker(DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4, DWORD dw5) +{ + UNIMPLEMENTED; + return FALSE; +} + +BOOL +WINAPI +GetCursorFrameInfo(DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4, DWORD dw5) +{ + UNIMPLEMENTED; + return FALSE; +} + +BOOL +WINAPI +GetReasonTitleFromReasonCode(DWORD dw1, DWORD dw2, DWORD dw3) +{ + UNIMPLEMENTED; + return FALSE; +} + +BOOL +WINAPI +RecordShutdownReason(DWORD dw0) +{ + UNIMPLEMENTED; + return FALSE; +} + +BOOL +WINAPI +UserLpkPSMTextOut(DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6) +{ + UNIMPLEMENTED; + return FALSE; +} + +BOOL +WINAPI +UserLpkTabbedTextOut( + DWORD dw1, + DWORD dw2, + DWORD dw3, + DWORD dw4, + DWORD dw5, + DWORD dw6, + DWORD dw7, + DWORD dw8, + DWORD dw9, + DWORD dw10, + DWORD dw11, + DWORD dw12) +{ + UNIMPLEMENTED; + return FALSE; +} + +BOOL +WINAPI +Win32PoolAllocationStats(DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4, DWORD dw5) +{ + UNIMPLEMENTED; + return FALSE; +} +
Modified: branches/cmake-bringup/dll/win32/user32/user32.rc URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/u... ============================================================================== --- branches/cmake-bringup/dll/win32/user32/user32.rc [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/user32/user32.rc [iso-8859-1] Wed Feb 2 13:15:26 2011 @@ -1,7 +1,7 @@ /* $Id$ */
#include <windows.h> -#include "resource.h" +#include "include/resource.h"
#define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ReactOS User API Client Dll\0"
Modified: branches/cmake-bringup/dll/win32/user32/user32.spec URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/u... ============================================================================== --- branches/cmake-bringup/dll/win32/user32/user32.spec [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/user32/user32.spec [iso-8859-1] Wed Feb 2 13:15:26 2011 @@ -20,8 +20,8 @@ @ stdcall BroadcastSystemMessageExA(long ptr long long long ptr) @ stdcall BroadcastSystemMessageExW(long ptr long long long ptr) @ stdcall BroadcastSystemMessageW(long ptr long long long) -@ stub BuildReasonArray -@ stub CalcMenuBar +@ stdcall BuildReasonArray(ptr) +@ stdcall CalcMenuBar(long long long long long) NtUserCalcMenuBar @ stdcall CallMsgFilter(ptr long) CallMsgFilterA @ stdcall CallMsgFilterA(ptr long) @ stdcall CallMsgFilterW(ptr long) @@ -94,7 +94,7 @@ @ stdcall CreateMDIWindowW(ptr ptr long long long long long long long long) @ stdcall CreateMenu() @ stdcall CreatePopupMenu() -@ stub CreateSystemThreads +@ stdcall CreateSystemThreads(long) @ stdcall CreateWindowExA(long str str long long long long long long long long ptr) @ stdcall CreateWindowExW(long wstr wstr long long long long long long long long ptr) @ stdcall CreateWindowStationA(str long long ptr) @@ -151,9 +151,9 @@ @ stdcall DestroyCursor(long) @ stdcall DestroyIcon(long) @ stdcall DestroyMenu(long) NtUserDestroyMenu -@ stub DestroyReasons +@ stdcall DestroyReasons(ptr) @ stdcall DestroyWindow(long) NtUserDestroyWindow -@ stub DeviceEventWorker +@ stdcall DeviceEventWorker(long long long long long) @ stdcall DialogBoxIndirectParamA(long ptr long ptr long) @ stdcall DialogBoxIndirectParamAorW(long ptr long ptr long long) @ stdcall DialogBoxIndirectParamW(long ptr long ptr long) @@ -201,7 +201,7 @@ @ stdcall EndMenu() @ stdcall EndPaint(long ptr) NtUserEndPaint @ stdcall EndTask(ptr long long) -@ stub EnterReaderModeHelper +@ stdcall EnterReaderModeHelper(ptr) @ stdcall EnumChildWindows(long ptr long) @ stdcall EnumClipboardFormats(long) @ stdcall EnumDesktopWindows(long ptr ptr) @@ -266,7 +266,7 @@ @ stdcall GetClipboardViewer() NtUserGetClipboardViewer @ stdcall GetComboBoxInfo(long ptr) ; Direct call NtUserGetComboBoxInfo @ stdcall GetCursor() -@ stub GetCursorFrameInfo +@ stdcall GetCursorFrameInfo(long long long long long) @ stdcall GetCursorInfo(ptr) NtUserGetCursorInfo @ stdcall GetCursorPos(ptr) @ stdcall GetDC(long) NtUserGetDC @@ -339,7 +339,7 @@ @ stdcall GetRawInputDeviceInfoA(ptr long ptr ptr) @ stdcall GetRawInputDeviceInfoW(ptr long ptr ptr) @ stdcall GetRawInputDeviceList(ptr ptr long) -@ stub GetReasonTitleFromReasonCode +@ stdcall GetReasonTitleFromReasonCode(long long long) @ stdcall GetRegisteredRawInputDevices(ptr ptr long) @ stdcall GetScrollBarInfo(long long ptr) NtUserGetScrollBarInfo @ stdcall GetScrollInfo(long long ptr) @@ -399,7 +399,7 @@ @ stdcall InSendMessageEx(ptr) @ stdcall InflateRect(ptr long long) @ stdcall InitializeLpkHooks(ptr) -@ stub InitializeWin32EntryTable +@ stdcall InitializeWin32EntryTable(ptr) @ stdcall InsertMenuA(long long long long ptr) @ stdcall InsertMenuItemA(long long long ptr) @ stdcall InsertMenuItemW(long long long ptr) @@ -427,9 +427,7 @@ @ stdcall IsHungAppWindow(long) @ stdcall IsIconic(long) @ stdcall IsMenu(long) -@ stub IsProcess16Bit @ stdcall IsRectEmpty(ptr) -@ stub IsSETEnabled @ stdcall IsServerSideWindow(long) @ stdcall IsWinEventHookInstalled(long) @ stdcall IsWindow(long) @@ -437,7 +435,7 @@ @ stdcall IsWindowInDestroy(long) @ stdcall IsWindowUnicode(long) @ stdcall IsWindowVisible(long) -@ stub IsWow64Message +# @ stub IsWow64Message @ stdcall IsZoomed(long) @ stdcall KillSystemTimer(long long) @ stdcall KillTimer(long long) NtUserKillTimer @@ -454,7 +452,7 @@ @ stdcall LoadImageA(long str long long long long) @ stdcall LoadImageW(long wstr long long long long) @ stdcall LoadKeyboardLayoutA(str long) -@ stub LoadKeyboardLayoutEx +@ stdcall LoadKeyboardLayoutEx(long ptr long) @ stdcall LoadKeyboardLayoutW(wstr long) @ stdcall LoadLocalFonts() @ stdcall LoadMenuA(long str) @@ -487,8 +485,8 @@ @ stdcall MessageBoxExW(long wstr wstr long long) @ stdcall MessageBoxIndirectA(ptr) @ stdcall MessageBoxIndirectW(ptr) -@ stub MessageBoxTimeoutA -@ stub MessageBoxTimeoutW +@ stdcall MessageBoxTimeoutA(ptr str str long long long) +@ stdcall MessageBoxTimeoutW(ptr wstr wstr long long long) @ stdcall MessageBoxW(long wstr wstr long) @ stdcall ModifyMenuA(long long long long ptr) @ stdcall ModifyMenuW(long long long long ptr) @@ -514,7 +512,7 @@ @ stdcall OpenWindowStationW(wstr long long) @ stdcall PackDDElParam(long long long) @ stdcall PaintDesktop(long) NtUserPaintDesktop -@ stub PaintMenuBar +@ stdcall PaintMenuBar(long long long long long long) NtUserPaintMenuBar @ stdcall PeekMessageA(ptr long long long long) @ stdcall PeekMessageW(ptr long long long long) @ stdcall PostMessageA(long long long long) @@ -533,9 +531,9 @@ @ stdcall RealGetWindowClass(long ptr long) RealGetWindowClassA @ stdcall RealGetWindowClassA(long ptr long) @ stdcall RealGetWindowClassW(long ptr long) -@ stub ReasonCodeNeedsBugID -@ stub ReasonCodeNeedsComment -@ stub RecordShutdownReason +@ stdcall ReasonCodeNeedsBugID(long) +@ stdcall ReasonCodeNeedsComment(long) +@ stdcall RecordShutdownReason(long) @ stdcall RedrawWindow(long ptr long long) NtUserRedrawWindow @ stdcall RegisterClassA(ptr) @ stdcall RegisterClassExA(ptr) @@ -547,7 +545,7 @@ @ stdcall RegisterDeviceNotificationW(long ptr long) @ stdcall RegisterHotKey(long long long long) NtUserRegisterHotKey @ stdcall RegisterLogonProcess(long long) -@ stub RegisterMessagePumpHook +@ stdcall RegisterMessagePumpHook(ptr) @ stdcall RegisterRawInputDevices(ptr long long) @ stdcall RegisterServicesProcess(long) @ stdcall RegisterShellHookWindow(long) @@ -593,7 +591,7 @@ @ stdcall SetClassWord(long long long) ; Direct call NtUserSetClassWord @ stdcall SetClipboardData(long long) @ stdcall SetClipboardViewer(long) NtUserSetClipboardViewer -@ stub SetConsoleReserveKeys +@ stdcall SetConsoleReserveKeys(long long) NtUserSetConsoleReserveKeys @ stdcall SetCursor(long) NtUserSetCursor @ stdcall SetCursorContents(ptr ptr) NtUserSetCursorContents @ stdcall SetCursorPos(long long) @@ -667,7 +665,7 @@ @ stdcall ShowStartGlass(long) @ stdcall ShowWindow(long long) NtUserShowWindow @ stdcall ShowWindowAsync(long long) NtUserShowWindowAsync -@ stub SoftModalMessageBox +@ stdcall SoftModalMessageBox(long) @ stdcall SubtractRect(ptr ptr ptr) @ stdcall SwapMouseButton(long) @ stdcall SwitchDesktop(long) NtUserSwitchDesktop @@ -690,7 +688,7 @@ @ stdcall TranslateAcceleratorW(long long ptr) @ stdcall TranslateMDISysAccel(long ptr) @ stdcall TranslateMessage(ptr) -@ stub TranslateMessageEx +@ stdcall TranslateMessageEx(ptr long) @ stdcall UnhookWinEvent(long) NtUserUnhookWinEvent @ stdcall UnhookWindowsHook(long ptr) @ stdcall UnhookWindowsHookEx(long) NtUserUnhookWindowsHookEx @@ -702,7 +700,7 @@ @ stdcall UnregisterClassW(wstr long) @ stdcall UnregisterDeviceNotification(long) @ stdcall UnregisterHotKey(long long) NtUserUnregisterHotKey -@ stub UnregisterMessagePumpHook +@ stdcall UnregisterMessagePumpHook() @ stdcall UnregisterUserApiHook() NtUserUnregisterUserApiHook @ stdcall UpdateLayeredWindow(long long ptr ptr long ptr long ptr long) @ stdcall UpdateLayeredWindowIndirect(long ptr) @@ -711,8 +709,8 @@ @ stdcall User32InitializeImmEntryTable(ptr) @ stdcall UserClientDllInitialize(long long ptr) DllMain @ stdcall UserHandleGrantAccess(ptr ptr long) NtUserUserHandleGrantAccess -@ stub UserLpkPSMTextOut -@ stub UserLpkTabbedTextOut +@ stdcall UserLpkPSMTextOut(long long long long long long) +@ stdcall UserLpkTabbedTextOut(long long long long long long long long long long long long) @ stdcall UserRealizePalette(long) @ stdcall UserRegisterWowHandlers(ptr ptr) @ stdcall ValidateRect(long ptr) NtUserValidateRect @@ -727,7 +725,7 @@ @ stdcall WINNLSGetIMEHotkey(long) @ stdcall WaitForInputIdle(long long) @ stdcall WaitMessage() NtUserWaitMessage -@ stub Win32PoolAllocationStats +@ stdcall Win32PoolAllocationStats(long long long long long) @ stdcall WinHelpA(long str long long) @ stdcall WinHelpW(long wstr long long) @ stdcall WindowFromDC(long)
Modified: branches/cmake-bringup/dll/win32/user32/windows/cursoricon.c URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/w... ============================================================================== --- branches/cmake-bringup/dll/win32/user32/windows/cursoricon.c [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/user32/windows/cursoricon.c [iso-8859-1] Wed Feb 2 13:15:26 2011 @@ -1245,19 +1245,6 @@ }
/*********************************************************************** - * SetCursor (USER32.@) - * - * Set the cursor shape. - * - * RETURNS - * A handle to the previous cursor shape. - */ -HCURSOR WINAPI /*DECLSPEC_HOTPATCH*/ SetCursor( HCURSOR hCursor /* [in] Handle of cursor to show */ ) -{ - return NtUserSetCursor(hCursor); -} - -/*********************************************************************** * ShowCursor (USER32.@) */ INT WINAPI /*DECLSPEC_HOTPATCH*/ ShowCursor( BOOL bShow ) @@ -1278,23 +1265,6 @@ return (HCURSOR)0; }
- -/*********************************************************************** - * ClipCursor (USER32.@) - */ -BOOL WINAPI /*DECLSPEC_HOTPATCH*/ ClipCursor( const RECT *rect ) -{ - return NtUserClipCursor((RECT *)rect); -} - - -/*********************************************************************** - * GetClipCursor (USER32.@) - */ -BOOL WINAPI /*DECLSPEC_HOTPATCH*/ GetClipCursor( RECT *rect ) -{ - return NtUserGetClipCursor(rect); -}
/*********************************************************************** @@ -1504,7 +1474,7 @@ return NULL; } } - else + else { mask = CreateBitmap( width, height * 2, 1, 1, NULL ); if(!mask) @@ -1775,7 +1745,7 @@ if (is_dib_monochrome(fix_info)) hbitmap = CreateBitmap(new_width, new_height, 1, 1, NULL); else - hbitmap = CreateCompatibleBitmap(screen_dc, new_width, new_height); + hbitmap = CreateCompatibleBitmap(screen_dc, new_width, new_height); }
orig_bm = SelectObject(screen_mem_dc, hbitmap); @@ -1985,7 +1955,7 @@ { /* Look if the colors of the DIB are black and white */
- monochrome = + monochrome = (bi->bmiColors[0].rgbRed == 0xff && bi->bmiColors[0].rgbGreen == 0xff && bi->bmiColors[0].rgbBlue == 0xff
Modified: branches/cmake-bringup/dll/win32/user32/windows/menu.c URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/w... ============================================================================== --- branches/cmake-bringup/dll/win32/user32/windows/menu.c [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/user32/windows/menu.c [iso-8859-1] Wed Feb 2 13:15:26 2011 @@ -777,7 +777,7 @@ mis.itemWidth = 0; SendMessageW( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)&mis ); /* Tests reveal that Windows ( Win95 thru WinXP) adds twice the average - * width of a menufont character to the width of an owner-drawn menu. + * width of a menufont character to the width of an owner-drawn menu. */ lpitem->Rect.right += mis.itemWidth + 2 * MenuCharSize.cx;
@@ -857,7 +857,7 @@ } if (menuBar) { txtheight = DrawTextW( hdc, lpitem->dwTypeData, -1, &rc, - DT_SINGLELINE|DT_CALCRECT); + DT_SINGLELINE|DT_CALCRECT); lpitem->Rect.right += rc.right - rc.left; itemheight = max( max( itemheight, txtheight), GetSystemMetrics( SM_CYMENU) - 1); @@ -1159,7 +1159,7 @@
SystemParametersInfoW (SPI_GETFLATMENU, 0, &flat_menu, 0); bkgnd = (menuBar && flat_menu) ? COLOR_MENUBAR : COLOR_MENU; - + /* Setup colors */
if (lpitem->fState & MF_HILITE) @@ -1319,7 +1319,7 @@ * Custom checkmark bitmaps are monochrome but not always 1bpp. */ if( !(MenuInfo->dwStyle & MNS_NOCHECK)) { - bm = (lpitem->fState & MF_CHECKED) ? lpitem->hbmpChecked : + bm = (lpitem->fState & MF_CHECKED) ? lpitem->hbmpChecked : lpitem->hbmpUnchecked; if (bm) /* we have a custom bitmap */ { @@ -1490,7 +1490,7 @@ if (MenuGetRosMenuInfo(&MenuInfo, hmenu) && MenuInfo.MenuItemCount) { UINT u; - + MenuInitRosMenuItemInfo(&ItemInfo);
for (u = 0; u < MenuInfo.MenuItemCount; u++) @@ -1855,7 +1855,7 @@ break;
case MM_GETMENUHANDLE: - case MN_GETHMENU: + case MN_GETHMENU: return GetWindowLongPtrA(Wnd, 0);
default: @@ -3480,7 +3480,7 @@ static BOOL FASTCALL MenuInitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags) { ROSMENUINFO MenuInfo; - + TRACE("hwnd=%p hmenu=%p\n", hWnd, hMenu);
HideCaret(0); @@ -3651,7 +3651,7 @@ BOOL ret = FALSE; ROSMENUINFO MenuInfo;
- if (!IsMenu(Menu)) + if (!IsMenu(Menu)) { SetLastError( ERROR_INVALID_MENU_HANDLE ); return FALSE; @@ -3838,10 +3838,10 @@ User32CallLoadMenuFromKernel(PVOID Arguments, ULONG ArgumentLength) { PLOADMENU_CALLBACK_ARGUMENTS Common; - LRESULT Result; + LRESULT Result;
Common = (PLOADMENU_CALLBACK_ARGUMENTS) Arguments; - + Result = (LRESULT)LoadMenuW( Common->hModule, IS_INTRESOURCE(Common->MenuName[0]) ? MAKEINTRESOURCE(Common->MenuName[0]) : @@ -4122,25 +4122,6 @@ return TRUE; }
-// So this one maybe one day it will be a callback! -BOOL WINAPI HiliteMenuItem( HWND hWnd, HMENU hMenu, UINT wItemID, - UINT wHilite ) -{ - ROSMENUINFO MenuInfo; - ROSMENUITEMINFO mii; - TRACE("(%p, %p, %04x, %04x);\n", hWnd, hMenu, wItemID, wHilite); - if (!hWnd) - { - SetLastError(ERROR_INVALID_WINDOW_HANDLE); - return FALSE; - } - if (!NtUserMenuItemInfo(hMenu, wItemID, wHilite, &mii, FALSE)) return FALSE; - if (!NtUserMenuInfo(hMenu, &MenuInfo, FALSE)) return FALSE; - if (MenuInfo.FocusedItem == wItemID) return TRUE; - MenuHideSubPopups( hWnd, &MenuInfo, FALSE, 0 ); - MenuSelectItem( hWnd, &MenuInfo, wItemID, TRUE, 0 ); - return TRUE; -}
/* * @implemented