From 070880c0a257196341f73e296a08e68df03c0016 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 20 Mar 2008 14:30:42 +0000 Subject: [PATCH] patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com): - remove NtUserAcquireOrReleaseInputOwnership and NtUserSendMessageCallback - move ros specific types belonging to ros specific ntuser calls into ntuser.h near the respective prototypes - add a commented out GDI_DEBUG define to gdiobj.c svn path=/trunk/; revision=32726 --- reactos/dll/win32/user32/user32.def | 1 - reactos/dll/win32/user32/windows/input.c | 10 ---- reactos/dll/win32/user32/windows/message.c | 22 +++----- reactos/include/reactos/win32k/ntuser.h | 53 ++++++++++++++++++- reactos/include/reactos/win32k/ntusrtyp.h | 47 ---------------- .../subsystems/win32/win32k/ntuser/input.c | 7 --- .../subsystems/win32/win32k/ntuser/message.c | 13 ----- .../subsystems/win32/win32k/objects/gdiobj.c | 3 ++ reactos/subsystems/win32/win32k/w32ksvc.db | 2 - 9 files changed, 61 insertions(+), 97 deletions(-) diff --git a/reactos/dll/win32/user32/user32.def b/reactos/dll/win32/user32/user32.def index f4063360680..8fd784d81e8 100644 --- a/reactos/dll/win32/user32/user32.def +++ b/reactos/dll/win32/user32/user32.def @@ -521,7 +521,6 @@ PostQuitMessage@4 PostThreadMessageA@16 PostThreadMessageW@16 PrintWindow@12 -PrivateCsrssAcquireOrReleaseInputOwnership@4 PrivateCsrssRegisterPrimitive@0 PrivateCsrssManualGuiCheck@4 PrivateCsrssInitialized@0 diff --git a/reactos/dll/win32/user32/windows/input.c b/reactos/dll/win32/user32/windows/input.c index ee8a90d050f..daa645a8228 100644 --- a/reactos/dll/win32/user32/windows/input.c +++ b/reactos/dll/win32/user32/windows/input.c @@ -584,16 +584,6 @@ PrivateCsrssRegisterPrimitive(VOID) NtUserCallNoParam(NOPARAM_ROUTINE_REGISTER_PRIMITIVE); } -/* - * Another private call for CSRSS - */ -VOID -STDCALL -PrivateCsrssAcquireOrReleaseInputOwnership(BOOL Release) -{ - NtUserAcquireOrReleaseInputOwnership(Release); -} - /* * @implemented */ diff --git a/reactos/dll/win32/user32/windows/message.c b/reactos/dll/win32/user32/windows/message.c index 08b8b4fa655..6de14ec7147 100644 --- a/reactos/dll/win32/user32/windows/message.c +++ b/reactos/dll/win32/user32/windows/message.c @@ -1829,7 +1829,7 @@ SendMessageA(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam) /* - * @implemented + * @unimplemented */ BOOL STDCALL @@ -1841,18 +1841,13 @@ SendMessageCallbackA( SENDASYNCPROC lpCallBack, ULONG_PTR dwData) { - return NtUserSendMessageCallback( - hWnd, - Msg, - wParam, - lParam, - lpCallBack, - dwData); + UNIMPLEMENTED; + return FALSE; } /* - * @implemented + * @unimplemented */ BOOL STDCALL @@ -1864,13 +1859,8 @@ SendMessageCallbackW( SENDASYNCPROC lpCallBack, ULONG_PTR dwData) { - return NtUserSendMessageCallback( - hWnd, - Msg, - wParam, - lParam, - lpCallBack, - dwData); + UNIMPLEMENTED; + return FALSE; } diff --git a/reactos/include/reactos/win32k/ntuser.h b/reactos/include/reactos/win32k/ntuser.h index adcf86f0384..6fd749acfb1 100644 --- a/reactos/include/reactos/win32k/ntuser.h +++ b/reactos/include/reactos/win32k/ntuser.h @@ -2378,7 +2378,7 @@ typedef struct tagKMDDELPARAM /* NtUserBad -* ReactOS-specific NtUser calls which shouldn't exist. +* ReactOS-specific NtUser calls and their related structures, both which shouldn't exist. */ @@ -2522,6 +2522,34 @@ VOID NTAPI NtUserManualGuiCheck(LONG Check); + + +/* (other FocusedItem values give the position of the focused item) */ +#define NO_SELECTED_ITEM 0xffff + +typedef struct tagROSMENUINFO +{ + /* ----------- MENUINFO ----------- */ + DWORD cbSize; + DWORD fMask; + DWORD dwStyle; + UINT cyMax; + HBRUSH hbrBack; + DWORD dwContextHelpID; + ULONG_PTR dwMenuData; + /* ----------- Extra ----------- */ + HMENU Self; /* Handle of this menu */ + WORD Flags; /* Menu flags (MF_POPUP, MF_SYSMENU) */ + UINT FocusedItem; /* Currently focused item */ + UINT MenuItemCount; /* Number of items in the menu */ + HWND Wnd; /* Window containing the menu */ + WORD Width; /* Width of the whole menu */ + WORD Height; /* Height of the whole menu */ + HWND WndOwner; /* window receiving the messages for ownerdraw */ + BOOL TimeToHide; /* Request hiding when receiving a second click in the top-level menu item */ + SIZE maxBmpSize; /* Maximum size of the bitmap items in MIIM_BITMAP state */ +} ROSMENUINFO, *PROSMENUINFO; + BOOL NTAPI NtUserMenuInfo( @@ -2530,6 +2558,29 @@ NtUserMenuInfo( BOOL fsog ); + + +typedef struct tagROSMENUITEMINFO +{ + /* ----------- MENUITEMINFOW ----------- */ + UINT cbSize; + UINT fMask; + UINT fType; + UINT fState; + UINT wID; + HMENU hSubMenu; + HBITMAP hbmpChecked; + HBITMAP hbmpUnchecked; + DWORD dwItemData; + LPWSTR dwTypeData; + UINT cch; + HBITMAP hbmpItem; + /* ----------- Extra ----------- */ + RECT Rect; /* Item area (relative to menu window) */ + UINT XTab; /* X position of text after Tab */ + LPWSTR Text; /* Copy of the text pointer in MenuItem->Text */ +} ROSMENUITEMINFO, *PROSMENUITEMINFO; + BOOL NTAPI NtUserMenuItemInfo( diff --git a/reactos/include/reactos/win32k/ntusrtyp.h b/reactos/include/reactos/win32k/ntusrtyp.h index 0d8472f8bf9..d579e0d4711 100644 --- a/reactos/include/reactos/win32k/ntusrtyp.h +++ b/reactos/include/reactos/win32k/ntusrtyp.h @@ -120,51 +120,4 @@ typedef struct _THRDCARETINFO BYTE Showing; } THRDCARETINFO, *PTHRDCARETINFO; -typedef struct tagROSMENUINFO -{ - /* ----------- MENUINFO ----------- */ - DWORD cbSize; - DWORD fMask; - DWORD dwStyle; - UINT cyMax; - HBRUSH hbrBack; - DWORD dwContextHelpID; - ULONG_PTR dwMenuData; - /* ----------- Extra ----------- */ - HMENU Self; /* Handle of this menu */ - WORD Flags; /* Menu flags (MF_POPUP, MF_SYSMENU) */ - UINT FocusedItem; /* Currently focused item */ - UINT MenuItemCount; /* Number of items in the menu */ - HWND Wnd; /* Window containing the menu */ - WORD Width; /* Width of the whole menu */ - WORD Height; /* Height of the whole menu */ - HWND WndOwner; /* window receiving the messages for ownerdraw */ - BOOL TimeToHide; /* Request hiding when receiving a second click in the top-level menu item */ - SIZE maxBmpSize; /* Maximum size of the bitmap items in MIIM_BITMAP state */ -} ROSMENUINFO, *PROSMENUINFO; - -/* (other FocusedItem values give the position of the focused item) */ -#define NO_SELECTED_ITEM 0xffff - -typedef struct tagROSMENUITEMINFO -{ - /* ----------- MENUITEMINFOW ----------- */ - UINT cbSize; - UINT fMask; - UINT fType; - UINT fState; - UINT wID; - HMENU hSubMenu; - HBITMAP hbmpChecked; - HBITMAP hbmpUnchecked; - DWORD dwItemData; - LPWSTR dwTypeData; - UINT cch; - HBITMAP hbmpItem; - /* ----------- Extra ----------- */ - RECT Rect; /* Item area (relative to menu window) */ - UINT XTab; /* X position of text after Tab */ - LPWSTR Text; /* Copy of the text pointer in MenuItem->Text */ -} ROSMENUITEMINFO, *PROSMENUITEMINFO; - #endif diff --git a/reactos/subsystems/win32/win32k/ntuser/input.c b/reactos/subsystems/win32/win32k/ntuser/input.c index 2ef2b7f8aba..819b85593cf 100644 --- a/reactos/subsystems/win32/win32k/ntuser/input.c +++ b/reactos/subsystems/win32/win32k/ntuser/input.c @@ -832,13 +832,6 @@ KeyboardEscape: } -NTSTATUS STDCALL -NtUserAcquireOrReleaseInputOwnership(BOOLEAN Release) -{ - return STATUS_SUCCESS; -} - - NTSTATUS FASTCALL InitInputImpl(VOID) { diff --git a/reactos/subsystems/win32/win32k/ntuser/message.c b/reactos/subsystems/win32/win32k/ntuser/message.c index 1b96a2f476b..5538f52e2f8 100644 --- a/reactos/subsystems/win32/win32k/ntuser/message.c +++ b/reactos/subsystems/win32/win32k/ntuser/message.c @@ -1687,19 +1687,6 @@ CLEANUP: END_CLEANUP; } -BOOL STDCALL -NtUserSendMessageCallback(HWND hWnd, - UINT Msg, - WPARAM wParam, - LPARAM lParam, - SENDASYNCPROC lpCallBack, - ULONG_PTR dwData) -{ - UNIMPLEMENTED; - - return 0; -} - BOOL FASTCALL UserSendNotifyMessage(HWND hWnd, diff --git a/reactos/subsystems/win32/win32k/objects/gdiobj.c b/reactos/subsystems/win32/win32k/objects/gdiobj.c index 03d273a341a..ddc9401ad0f 100644 --- a/reactos/subsystems/win32/win32k/objects/gdiobj.c +++ b/reactos/subsystems/win32/win32k/objects/gdiobj.c @@ -30,6 +30,8 @@ /* FIXME include right header for KeRosDumpStackFrames */ VOID NTAPI KeRosDumpStackFrames(PULONG, ULONG); +//#define GDI_DEBUG + #ifdef GDI_DEBUG BOOLEAN STDCALL KiRosPrintAddress(PVOID Address); NTSYSAPI ULONG NTAPI RtlWalkFrameChain(OUT PVOID *Callers, IN ULONG Count, IN ULONG Flags); @@ -730,6 +732,7 @@ LockHandle: * The object is currently locked, so freeing is forbidden! */ DPRINT1("Object->cExclusiveLock = %d\n", Object->cExclusiveLock); + GDIDBG_TRACECALLER(); GDIDBG_TRACELOCKER(GDI_HANDLE_GET_INDEX(hObj)); ASSERT(FALSE); } diff --git a/reactos/subsystems/win32/win32k/w32ksvc.db b/reactos/subsystems/win32/win32k/w32ksvc.db index b5511e6eaef..7b258b29f6f 100644 --- a/reactos/subsystems/win32/win32k/w32ksvc.db +++ b/reactos/subsystems/win32/win32k/w32ksvc.db @@ -679,7 +679,6 @@ NtGdiSetViewportExtEx 4 NtGdiSetViewportOrgEx 4 NtGdiSetWindowExtEx 4 NtGdiSetWindowOrgEx 4 -NtUserAcquireOrReleaseInputOwnership 1 NtUserBuildMenuItemList 4 NtUserCreateCursorIconHandle 2 NtUserDereferenceWndProcHandle 2 @@ -714,7 +713,6 @@ NtUserMonitorFromWindow 2 NtUserRegisterClassEx 6 NtUserRegisterClipboardFormat 1 NtUserSendMessage 5 -NtUserSendMessageCallback 6 NtUserSendMessageTimeout 8 NtUserSendNotifyMessage 4 NtUserSetScrollBarInfo 3