Commit 7c76aa05 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move class management implementation from user32.

parent b1b04700
...@@ -24,13 +24,6 @@ ...@@ -24,13 +24,6 @@
#include "winuser.h" #include "winuser.h"
#include "../win32u/ntuser_private.h" #include "../win32u/ntuser_private.h"
/* Built-in class names (see _Undocumented_Windows_ p.418) */
#define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
#define DESKTOP_CLASS_ATOM MAKEINTATOM(32769) /* Desktop */
#define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
#define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
#define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
/* Built-in class descriptor */ /* Built-in class descriptor */
struct builtin_class_descr struct builtin_class_descr
{ {
......
...@@ -328,7 +328,7 @@ static struct dce *get_window_dce( HWND hwnd ) ...@@ -328,7 +328,7 @@ static struct dce *get_window_dce( HWND hwnd )
* *
* Free a class or window DCE. * Free a class or window DCE.
*/ */
void free_dce( struct dce *dce, HWND hwnd ) void WINAPI free_dce( struct dce *dce, HWND hwnd )
{ {
struct dce *dce_to_free = NULL; struct dce *dce_to_free = NULL;
......
...@@ -135,12 +135,14 @@ static void dpiaware_init(void) ...@@ -135,12 +135,14 @@ static void dpiaware_init(void)
static const struct user_callbacks user_funcs = static const struct user_callbacks user_funcs =
{ {
CopyImage,
GetDesktopWindow, GetDesktopWindow,
GetWindowRect, GetWindowRect,
IsChild, IsChild,
RedrawWindow, RedrawWindow,
SendMessageTimeoutW, SendMessageTimeoutW,
WindowFromDC, WindowFromDC,
free_dce,
MSG_SendInternalMessageTimeout, MSG_SendInternalMessageTimeout,
}; };
......
...@@ -113,7 +113,7 @@ extern void create_offscreen_window_surface( const RECT *visible_rect, struct wi ...@@ -113,7 +113,7 @@ extern void create_offscreen_window_surface( const RECT *visible_rect, struct wi
extern void CLIPBOARD_ReleaseOwner( HWND hwnd ) DECLSPEC_HIDDEN; extern void CLIPBOARD_ReleaseOwner( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECLSPEC_HIDDEN; extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECLSPEC_HIDDEN;
extern void free_dce( struct dce *dce, HWND hwnd ) DECLSPEC_HIDDEN; extern void WINAPI free_dce( struct dce *dce, HWND hwnd ) DECLSPEC_HIDDEN;
extern void invalidate_dce( struct tagWND *win, const RECT *rect ) DECLSPEC_HIDDEN; extern void invalidate_dce( struct tagWND *win, const RECT *rect ) DECLSPEC_HIDDEN;
extern HDC get_display_dc(void) DECLSPEC_HIDDEN; extern HDC get_display_dc(void) DECLSPEC_HIDDEN;
extern void release_display_dc( HDC hdc ) DECLSPEC_HIDDEN; extern void release_display_dc( HDC hdc ) DECLSPEC_HIDDEN;
......
...@@ -1165,6 +1165,7 @@ static struct unix_funcs unix_funcs = ...@@ -1165,6 +1165,7 @@ static struct unix_funcs unix_funcs =
NtUserEnumDisplayMonitors, NtUserEnumDisplayMonitors,
NtUserEnumDisplaySettings, NtUserEnumDisplaySettings,
NtUserGetAsyncKeyState, NtUserGetAsyncKeyState,
NtUserGetClassInfoEx,
NtUserGetCursorInfo, NtUserGetCursorInfo,
NtUserGetDisplayConfigBufferSizes, NtUserGetDisplayConfigBufferSizes,
NtUserGetIconInfo, NtUserGetIconInfo,
...@@ -1175,6 +1176,7 @@ static struct unix_funcs unix_funcs = ...@@ -1175,6 +1176,7 @@ static struct unix_funcs unix_funcs =
NtUserGetUpdatedClipboardFormats, NtUserGetUpdatedClipboardFormats,
NtUserIsClipboardFormatAvailable, NtUserIsClipboardFormatAvailable,
NtUserMapVirtualKeyEx, NtUserMapVirtualKeyEx,
NtUserRegisterClassExWOW,
NtUserRegisterHotKey, NtUserRegisterHotKey,
NtUserScrollDC, NtUserScrollDC,
NtUserSelectPalette, NtUserSelectPalette,
...@@ -1186,6 +1188,7 @@ static struct unix_funcs unix_funcs = ...@@ -1186,6 +1188,7 @@ static struct unix_funcs unix_funcs =
NtUserSystemParametersInfo, NtUserSystemParametersInfo,
NtUserSystemParametersInfoForDpi, NtUserSystemParametersInfoForDpi,
NtUserToUnicodeEx, NtUserToUnicodeEx,
NtUserUnregisterClass,
NtUserUnregisterHotKey, NtUserUnregisterHotKey,
NtUserVkKeyScanEx, NtUserVkKeyScanEx,
......
...@@ -25,14 +25,18 @@ ...@@ -25,14 +25,18 @@
#include "ntuser.h" #include "ntuser.h"
#include "wine/list.h" #include "wine/list.h"
struct dce;
struct user_callbacks struct user_callbacks
{ {
HANDLE (WINAPI *pCopyImage)( HANDLE, UINT, INT, INT, UINT );
HWND (WINAPI *pGetDesktopWindow)(void); HWND (WINAPI *pGetDesktopWindow)(void);
BOOL (WINAPI *pGetWindowRect)( HWND hwnd, LPRECT rect ); BOOL (WINAPI *pGetWindowRect)( HWND hwnd, LPRECT rect );
BOOL (WINAPI *pIsChild)( HWND, HWND ); BOOL (WINAPI *pIsChild)( HWND, HWND );
BOOL (WINAPI *pRedrawWindow)( HWND, const RECT*, HRGN, UINT ); BOOL (WINAPI *pRedrawWindow)( HWND, const RECT*, HRGN, UINT );
LRESULT (WINAPI *pSendMessageTimeoutW)( HWND, UINT, WPARAM, LPARAM, UINT, UINT, PDWORD_PTR ); LRESULT (WINAPI *pSendMessageTimeoutW)( HWND, UINT, WPARAM, LPARAM, UINT, UINT, PDWORD_PTR );
HWND (WINAPI *pWindowFromDC)( HDC ); HWND (WINAPI *pWindowFromDC)( HDC );
void (WINAPI *free_dce)( struct dce *dce, HWND hwnd );
LRESULT (WINAPI *send_ll_message)( DWORD, DWORD, UINT, WPARAM, LPARAM, UINT, UINT, PDWORD_PTR ); LRESULT (WINAPI *send_ll_message)( DWORD, DWORD, UINT, WPARAM, LPARAM, UINT, UINT, PDWORD_PTR );
}; };
...@@ -169,6 +173,13 @@ typedef struct tagWINDOWPROC ...@@ -169,6 +173,13 @@ typedef struct tagWINDOWPROC
#define MAX_ATOM_LEN 255 #define MAX_ATOM_LEN 255
/* Built-in class names (see _Undocumented_Windows_ p.418) */
#define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
#define DESKTOP_CLASS_ATOM MAKEINTATOM(32769) /* Desktop */
#define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
#define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
#define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
typedef struct tagCLASS typedef struct tagCLASS
{ {
struct list entry; /* Entry in class list */ struct list entry; /* Entry in class list */
......
...@@ -898,7 +898,7 @@ ...@@ -898,7 +898,7 @@
@ stub NtUserGetCPD @ stub NtUserGetCPD
@ stub NtUserGetCaretBlinkTime @ stub NtUserGetCaretBlinkTime
@ stub NtUserGetCaretPos @ stub NtUserGetCaretPos
@ stub NtUserGetClassInfoEx @ stdcall NtUserGetClassInfoEx(ptr ptr ptr ptr long)
@ stdcall -syscall NtUserGetClassName(long long ptr) @ stdcall -syscall NtUserGetClassName(long long ptr)
@ stub NtUserGetClipCursor @ stub NtUserGetClipCursor
@ stub NtUserGetClipboardAccessToken @ stub NtUserGetClipboardAccessToken
...@@ -1122,7 +1122,7 @@ ...@@ -1122,7 +1122,7 @@
@ stub NtUserRealWaitMessageEx @ stub NtUserRealWaitMessageEx
@ stub NtUserRedrawWindow @ stub NtUserRedrawWindow
@ stub NtUserRegisterBSDRWindow @ stub NtUserRegisterBSDRWindow
@ stub NtUserRegisterClassExWOW @ stdcall NtUserRegisterClassExWOW(ptr ptr ptr ptr long long long)
@ stub NtUserRegisterDManipHook @ stub NtUserRegisterDManipHook
@ stub NtUserRegisterEdgy @ stub NtUserRegisterEdgy
@ stub NtUserRegisterErrorReportingDialog @ stub NtUserRegisterErrorReportingDialog
...@@ -1288,7 +1288,7 @@ ...@@ -1288,7 +1288,7 @@
@ stdcall -syscall NtUserUnhookWindowsHookEx(long) @ stdcall -syscall NtUserUnhookWindowsHookEx(long)
@ stub NtUserUnloadKeyboardLayout @ stub NtUserUnloadKeyboardLayout
@ stub NtUserUnlockWindowStation @ stub NtUserUnlockWindowStation
@ stub NtUserUnregisterClass @ stdcall NtUserUnregisterClass(ptr ptr ptr)
@ stdcall NtUserUnregisterHotKey(long long) @ stdcall NtUserUnregisterHotKey(long long)
@ stub NtUserUnregisterSessionPort @ stub NtUserUnregisterSessionPort
@ stub NtUserUnregisterUserApiHook @ stub NtUserUnregisterUserApiHook
......
...@@ -203,6 +203,8 @@ struct unix_funcs ...@@ -203,6 +203,8 @@ struct unix_funcs
BOOL (WINAPI *pNtUserEnumDisplaySettings)( UNICODE_STRING *device, DWORD mode, BOOL (WINAPI *pNtUserEnumDisplaySettings)( UNICODE_STRING *device, DWORD mode,
DEVMODEW *dev_mode, DWORD flags ); DEVMODEW *dev_mode, DWORD flags );
SHORT (WINAPI *pNtUserGetAsyncKeyState)( INT key ); SHORT (WINAPI *pNtUserGetAsyncKeyState)( INT key );
ATOM (WINAPI *pNtUserGetClassInfoEx)( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
struct client_menu_name *menu_name, BOOL ansi );
BOOL (WINAPI *pNtUserGetCursorInfo)( CURSORINFO *info ); BOOL (WINAPI *pNtUserGetCursorInfo)( CURSORINFO *info );
LONG (WINAPI *pNtUserGetDisplayConfigBufferSizes)( UINT32 flags, UINT32 *num_path_info, LONG (WINAPI *pNtUserGetDisplayConfigBufferSizes)( UINT32 flags, UINT32 *num_path_info,
UINT32 *num_mode_info ); UINT32 *num_mode_info );
...@@ -215,6 +217,10 @@ struct unix_funcs ...@@ -215,6 +217,10 @@ struct unix_funcs
BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size ); BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size );
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format ); BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout ); UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout );
ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name,
UNICODE_STRING *version,
struct client_menu_name *client_menu_name,
DWORD fnid, DWORD flags, DWORD *wow );
BOOL (WINAPI *pNtUserRegisterHotKey)( HWND hwnd, INT id, UINT modifiers, UINT vk ); BOOL (WINAPI *pNtUserRegisterHotKey)( HWND hwnd, INT id, UINT modifiers, UINT vk );
BOOL (WINAPI *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip, BOOL (WINAPI *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
HRGN ret_update_rgn, RECT *update_rect ); HRGN ret_update_rgn, RECT *update_rect );
...@@ -230,6 +236,8 @@ struct unix_funcs ...@@ -230,6 +236,8 @@ struct unix_funcs
UINT winini, UINT dpi ); UINT winini, UINT dpi );
INT (WINAPI *pNtUserToUnicodeEx)( UINT virt, UINT scan, const BYTE *state, INT (WINAPI *pNtUserToUnicodeEx)( UINT virt, UINT scan, const BYTE *state,
WCHAR *str, int size, UINT flags, HKL layout ); WCHAR *str, int size, UINT flags, HKL layout );
BOOL (WINAPI *pNtUserUnregisterClass)( UNICODE_STRING *name, HINSTANCE instance,
struct client_menu_name *client_menu_name );
BOOL (WINAPI *pNtUserUnregisterHotKey)( HWND hwnd, INT id ); BOOL (WINAPI *pNtUserUnregisterHotKey)( HWND hwnd, INT id );
WORD (WINAPI *pNtUserVkKeyScanEx)( WCHAR chr, HKL layout ); WORD (WINAPI *pNtUserVkKeyScanEx)( WCHAR chr, HKL layout );
......
...@@ -795,6 +795,13 @@ SHORT WINAPI NtUserGetAsyncKeyState( INT key ) ...@@ -795,6 +795,13 @@ SHORT WINAPI NtUserGetAsyncKeyState( INT key )
return unix_funcs->pNtUserGetAsyncKeyState( key ); return unix_funcs->pNtUserGetAsyncKeyState( key );
} }
ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
struct client_menu_name *menu_name, BOOL ansi )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserGetClassInfoEx( instance, name, wc, menu_name, ansi );
}
BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info ) BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info )
{ {
if (!unix_funcs) return FALSE; if (!unix_funcs) return FALSE;
...@@ -857,6 +864,14 @@ UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout ) ...@@ -857,6 +864,14 @@ UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout )
return unix_funcs->pNtUserMapVirtualKeyEx( code, type, layout ); return unix_funcs->pNtUserMapVirtualKeyEx( code, type, layout );
} }
ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version,
struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags,
DWORD *wow )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserRegisterClassExWOW( wc, name, version, client_menu_name, fnid, flags, wow );
}
BOOL WINAPI NtUserRegisterHotKey( HWND hwnd, INT id, UINT modifiers, UINT vk ) BOOL WINAPI NtUserRegisterHotKey( HWND hwnd, INT id, UINT modifiers, UINT vk )
{ {
if (!unix_funcs) return FALSE; if (!unix_funcs) return FALSE;
...@@ -926,6 +941,13 @@ INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state, ...@@ -926,6 +941,13 @@ INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
return unix_funcs->pNtUserToUnicodeEx( virt, scan, state, str, size, flags, layout ); return unix_funcs->pNtUserToUnicodeEx( virt, scan, state, str, size, flags, layout );
} }
BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance,
struct client_menu_name *client_menu_name )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserUnregisterClass( name, instance, client_menu_name );
}
BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id ) BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id )
{ {
if (!unix_funcs) return FALSE; if (!unix_funcs) return FALSE;
......
...@@ -264,6 +264,8 @@ HICON WINAPI NtUserFindExistingCursorIcon( UNICODE_STRING *module, UNICODE_STR ...@@ -264,6 +264,8 @@ HICON WINAPI NtUserFindExistingCursorIcon( UNICODE_STRING *module, UNICODE_STR
void *desc ); void *desc );
SHORT WINAPI NtUserGetAsyncKeyState( INT key ); SHORT WINAPI NtUserGetAsyncKeyState( INT key );
ULONG WINAPI NtUserGetAtomName( ATOM atom, UNICODE_STRING *name ); ULONG WINAPI NtUserGetAtomName( ATOM atom, UNICODE_STRING *name );
ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
struct client_menu_name *menu_name, BOOL ansi );
INT WINAPI NtUserGetClassName( HWND hwnd, BOOL real, UNICODE_STRING *name ); INT WINAPI NtUserGetClassName( HWND hwnd, BOOL real, UNICODE_STRING *name );
INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen ); INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen );
HWND WINAPI NtUserGetClipboardOwner(void); HWND WINAPI NtUserGetClipboardOwner(void);
...@@ -312,6 +314,9 @@ HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK acc ...@@ -312,6 +314,9 @@ HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK acc
BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len ); BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access ); HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access );
HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access ); HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access );
ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version,
struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags,
DWORD *wow );
BOOL WINAPI NtUserRegisterHotKey( HWND hwnd, INT id, UINT modifiers, UINT vk ); BOOL WINAPI NtUserRegisterHotKey( HWND hwnd, INT id, UINT modifiers, UINT vk );
BOOL WINAPI NtUserRemoveClipboardFormatListener( HWND hwnd ); BOOL WINAPI NtUserRemoveClipboardFormatListener( HWND hwnd );
HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str ); HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str );
...@@ -340,6 +345,8 @@ INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state, ...@@ -340,6 +345,8 @@ INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
WCHAR *str, int size, UINT flags, HKL layout ); WCHAR *str, int size, UINT flags, HKL layout );
BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook ); BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook );
BOOL WINAPI NtUserUnhookWindowsHookEx( HHOOK handle ); BOOL WINAPI NtUserUnhookWindowsHookEx( HHOOK handle );
BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance,
struct client_menu_name *client_menu_name );
BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id ); BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id );
WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout ); WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment