From: Jacek Caban jacek@codeweavers.com
--- dlls/user32/user_main.c | 19 ------------------- dlls/user32/user_private.h | 3 --- dlls/user32/winproc.c | 26 -------------------------- dlls/win32u/class.c | 6 ++++++ dlls/win32u/ntuser_private.h | 12 ++---------- dlls/win32u/sysparams.c | 6 ------ include/ntuser.h | 2 -- 7 files changed, 8 insertions(+), 66 deletions(-)
diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index d3940d4a95c..91f2891f198 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -39,8 +39,6 @@ WINE_DECLARE_DEBUG_CHANNEL(message);
HMODULE user32_module = 0;
-static DWORD exiting_thread_id; - extern void WDML_NotifyThreadDetach(void);
/*********************************************************************** @@ -241,15 +239,6 @@ static BOOL process_attach(void) }
-/********************************************************************** - * USER_IsExitingThread - */ -BOOL USER_IsExitingThread( DWORD tid ) -{ - return (tid == exiting_thread_id); -} - - /********************************************************************** * thread_detach */ @@ -257,15 +246,12 @@ static void thread_detach(void) { struct user_thread_info *thread_info = get_user_thread_info();
- exiting_thread_id = GetCurrentThreadId(); NtUserCallNoParam( NtUserExitingThread );
WDML_NotifyThreadDetach();
NtUserCallNoParam( NtUserThreadDetach ); HeapFree( GetProcessHeap(), 0, thread_info->wmchar_data ); - - exiting_thread_id = 0; }
@@ -380,11 +366,6 @@ const char *SPY_GetMsgName( UINT msg, HWND hwnd ) return (const char *)NtUserCallHwndParam( hwnd, msg, NtUserSpyGetMsgName ); }
-const char *SPY_GetVKeyName( WPARAM wparam ) -{ - return (const char *)NtUserCallOneParam( wparam, NtUserSpyGetVKeyName ); -} - void SPY_EnterMessage( INT flag, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) { if (TRACE_ON(message)) NtUserMessageCall( hwnd, msg, wparam, lparam, 0, NtUserSpyEnter, flag ); diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 3e2cebd99ae..d4a296f4bb7 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -77,7 +77,6 @@ extern HPEN SYSCOLOR_GetPen( INT index ) DECLSPEC_HIDDEN; extern HBRUSH SYSCOLOR_Get55AABrush(void) DECLSPEC_HIDDEN; extern void SYSPARAMS_Init(void) DECLSPEC_HIDDEN; extern void USER_CheckNotLock(void) DECLSPEC_HIDDEN; -extern BOOL USER_IsExitingThread( DWORD tid ) DECLSPEC_HIDDEN;
typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result, void *arg ); @@ -90,7 +89,6 @@ extern INT_PTR WINPROC_CallDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM extern INT_PTR WINPROC_CallDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; extern void winproc_init(void) DECLSPEC_HIDDEN; extern void dispatch_win_proc_params( struct win_proc_params *params ) DECLSPEC_HIDDEN; -extern void get_winproc_params( struct win_proc_params *params ) DECLSPEC_HIDDEN;
extern ATOM get_class_info( HINSTANCE instance, const WCHAR *name, WNDCLASSEXW *info, UNICODE_STRING *name_str, BOOL ansi ) DECLSPEC_HIDDEN; @@ -107,7 +105,6 @@ BOOL WINAPI User32RegisterBuiltinClasses( const struct win_hook_params *params, /* message spy definitions */
extern const char *SPY_GetMsgName( UINT msg, HWND hWnd ) DECLSPEC_HIDDEN; -extern const char *SPY_GetVKeyName(WPARAM wParam) DECLSPEC_HIDDEN; extern void SPY_EnterMessage( INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; extern void SPY_ExitMessage( INT iFlag, HWND hwnd, UINT msg, LRESULT lReturn, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index e71b222ce79..3b7927891b5 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -66,13 +66,6 @@ static inline void free_buffer( void *static_buffer, void *buffer ) if (buffer != static_buffer) HeapFree( GetProcessHeap(), 0, buffer ); }
-/* return the window proc for a given handle, or NULL for an invalid handle, - * or WINPROC_PROC16 for a handle to a 16-bit proc. */ -static inline WINDOWPROC *handle_to_proc( WNDPROC handle ) -{ - return (WINDOWPROC *)NtUserCallOneParam( HandleToUlong(handle), NtUserGetWinProcPtr ); -} - #ifdef __i386__ /* Some window procedures modify registers they shouldn't, or are not * properly declared stdcall; so we need a small assembly wrapper to @@ -1276,25 +1269,6 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size ) return TRUE; }
-void get_winproc_params( struct win_proc_params *params ) -{ - WINDOWPROC *proc = handle_to_proc( params->func ); - - if (!proc) - { - params->procW = params->procA = NULL; - } - else if (proc == WINPROC_PROC16) - { - params->procW = params->procA = WINPROC_PROC16; - } - else - { - params->procA = proc->procA; - params->procW = proc->procW; - } -} - BOOL WINAPI User32CallSendAsyncCallback( const struct send_async_params *params, ULONG size ) { params->callback( params->hwnd, params->msg, params->data, params->result ); diff --git a/dlls/win32u/class.c b/dlls/win32u/class.c index 5fa5436436b..eab65b72ef6 100644 --- a/dlls/win32u/class.c +++ b/dlls/win32u/class.c @@ -60,6 +60,12 @@ typedef struct tagCLASS struct client_menu_name menu_name; /* Default menu name */ } CLASS;
+typedef struct tagWINDOWPROC +{ + WNDPROC procA; /* ANSI window proc */ + WNDPROC procW; /* Unicode window proc */ +} WINDOWPROC; + static WINDOWPROC winproc_array[MAX_WINPROCS]; static UINT winproc_used = NB_BUILTIN_WINPROCS; static pthread_mutex_t winproc_lock = PTHREAD_MUTEX_INITIALIZER; diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h index ecb5ab82164..3ecd7424f77 100644 --- a/dlls/win32u/ntuser_private.h +++ b/dlls/win32u/ntuser_private.h @@ -106,8 +106,8 @@ typedef struct tagWND #define WIN_CHILDREN_MOVED 0x0040 /* children may have moved, ignore stored positions */ #define WIN_HAS_IME_WIN 0x0080 /* the window has been registered with imm32 */
-#define WND_OTHER_PROCESS ((WND *)1) /* returned by WIN_GetPtr on unknown window handles */ -#define WND_DESKTOP ((WND *)2) /* returned by WIN_GetPtr on the desktop window */ +#define WND_OTHER_PROCESS ((WND *)1) /* returned by get_win_ptr on unknown window handles */ +#define WND_DESKTOP ((WND *)2) /* returned by get_win_ptr on the desktop window */
/* check if hwnd is a broadcast magic handle */ static inline BOOL is_broadcast( HWND hwnd ) @@ -197,13 +197,6 @@ struct scroll_bar_win_data struct scroll_info info; };
-/* FIXME: make it private to class.c */ -typedef struct tagWINDOWPROC -{ - WNDPROC procA; /* ANSI window proc */ - WNDPROC procW; /* Unicode window proc */ -} WINDOWPROC; - #define WINPROC_HANDLE (~0u >> 16) #define BUILTIN_WINPROC(index) ((WNDPROC)(ULONG_PTR)((index) | (WINPROC_HANDLE << 16)))
@@ -243,7 +236,6 @@ extern void spy_exit_message( INT flag, HWND hwnd, UINT msg, /* class.c */ extern HINSTANCE user32_module DECLSPEC_HIDDEN; WNDPROC alloc_winproc( WNDPROC func, BOOL ansi ) DECLSPEC_HIDDEN; -WINDOWPROC *get_winproc_ptr( WNDPROC handle ) DECLSPEC_HIDDEN; BOOL is_winproc_unicode( WNDPROC proc, BOOL def_val ) DECLSPEC_HIDDEN; DWORD get_class_long( HWND hwnd, INT offset, BOOL ansi ) DECLSPEC_HIDDEN; WNDPROC get_class_winproc( struct tagCLASS *class ) DECLSPEC_HIDDEN; diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 3c1051b2d80..0a453f937c3 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -5031,9 +5031,6 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) case NtUserGetDeskPattern: return get_entry( &entry_DESKPATTERN, 256, (WCHAR *)arg );
- case NtUserGetWinProcPtr: - return (UINT_PTR)get_winproc_ptr( UlongToHandle(arg) ); - case NtUserLock: switch( arg ) { @@ -5042,9 +5039,6 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) default: user_check_not_lock(); return 0; }
- case NtUserSpyGetVKeyName: - return (UINT_PTR)debugstr_vkey_name( arg ); - default: FIXME( "invalid code %u\n", code ); return 0; diff --git a/include/ntuser.h b/include/ntuser.h index c223d1f2704..86e2d329eb9 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -922,9 +922,7 @@ enum NtUserCallOneParam_SetProcessDefaultLayout, /* temporary exports */ NtUserGetDeskPattern, - NtUserGetWinProcPtr, NtUserLock, - NtUserSpyGetVKeyName, };
static inline HDWP NtUserBeginDeferWindowPos( INT count )