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 @@
#include "winuser.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 */
struct builtin_class_descr
{
......
......@@ -328,7 +328,7 @@ static struct dce *get_window_dce( HWND hwnd )
*
* 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;
......
......@@ -135,12 +135,14 @@ static void dpiaware_init(void)
static const struct user_callbacks user_funcs =
{
CopyImage,
GetDesktopWindow,
GetWindowRect,
IsChild,
RedrawWindow,
SendMessageTimeoutW,
WindowFromDC,
free_dce,
MSG_SendInternalMessageTimeout,
};
......
......@@ -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 BOOL FOCUS_MouseActivate( HWND hwnd ) 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 HDC get_display_dc(void) DECLSPEC_HIDDEN;
extern void release_display_dc( HDC hdc ) DECLSPEC_HIDDEN;
......
......@@ -1165,6 +1165,7 @@ static struct unix_funcs unix_funcs =
NtUserEnumDisplayMonitors,
NtUserEnumDisplaySettings,
NtUserGetAsyncKeyState,
NtUserGetClassInfoEx,
NtUserGetCursorInfo,
NtUserGetDisplayConfigBufferSizes,
NtUserGetIconInfo,
......@@ -1175,6 +1176,7 @@ static struct unix_funcs unix_funcs =
NtUserGetUpdatedClipboardFormats,
NtUserIsClipboardFormatAvailable,
NtUserMapVirtualKeyEx,
NtUserRegisterClassExWOW,
NtUserRegisterHotKey,
NtUserScrollDC,
NtUserSelectPalette,
......@@ -1186,6 +1188,7 @@ static struct unix_funcs unix_funcs =
NtUserSystemParametersInfo,
NtUserSystemParametersInfoForDpi,
NtUserToUnicodeEx,
NtUserUnregisterClass,
NtUserUnregisterHotKey,
NtUserVkKeyScanEx,
......
......@@ -25,14 +25,18 @@
#include "ntuser.h"
#include "wine/list.h"
struct dce;
struct user_callbacks
{
HANDLE (WINAPI *pCopyImage)( HANDLE, UINT, INT, INT, UINT );
HWND (WINAPI *pGetDesktopWindow)(void);
BOOL (WINAPI *pGetWindowRect)( HWND hwnd, LPRECT rect );
BOOL (WINAPI *pIsChild)( HWND, HWND );
BOOL (WINAPI *pRedrawWindow)( HWND, const RECT*, HRGN, UINT );
LRESULT (WINAPI *pSendMessageTimeoutW)( HWND, UINT, WPARAM, LPARAM, UINT, UINT, PDWORD_PTR );
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 );
};
......@@ -169,6 +173,13 @@ typedef struct tagWINDOWPROC
#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
{
struct list entry; /* Entry in class list */
......
......@@ -898,7 +898,7 @@
@ stub NtUserGetCPD
@ stub NtUserGetCaretBlinkTime
@ stub NtUserGetCaretPos
@ stub NtUserGetClassInfoEx
@ stdcall NtUserGetClassInfoEx(ptr ptr ptr ptr long)
@ stdcall -syscall NtUserGetClassName(long long ptr)
@ stub NtUserGetClipCursor
@ stub NtUserGetClipboardAccessToken
......@@ -1122,7 +1122,7 @@
@ stub NtUserRealWaitMessageEx
@ stub NtUserRedrawWindow
@ stub NtUserRegisterBSDRWindow
@ stub NtUserRegisterClassExWOW
@ stdcall NtUserRegisterClassExWOW(ptr ptr ptr ptr long long long)
@ stub NtUserRegisterDManipHook
@ stub NtUserRegisterEdgy
@ stub NtUserRegisterErrorReportingDialog
......@@ -1288,7 +1288,7 @@
@ stdcall -syscall NtUserUnhookWindowsHookEx(long)
@ stub NtUserUnloadKeyboardLayout
@ stub NtUserUnlockWindowStation
@ stub NtUserUnregisterClass
@ stdcall NtUserUnregisterClass(ptr ptr ptr)
@ stdcall NtUserUnregisterHotKey(long long)
@ stub NtUserUnregisterSessionPort
@ stub NtUserUnregisterUserApiHook
......
......@@ -203,6 +203,8 @@ struct unix_funcs
BOOL (WINAPI *pNtUserEnumDisplaySettings)( UNICODE_STRING *device, DWORD mode,
DEVMODEW *dev_mode, DWORD flags );
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 );
LONG (WINAPI *pNtUserGetDisplayConfigBufferSizes)( UINT32 flags, UINT32 *num_path_info,
UINT32 *num_mode_info );
......@@ -215,6 +217,10 @@ struct unix_funcs
BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size );
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
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 *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
HRGN ret_update_rgn, RECT *update_rect );
......@@ -230,6 +236,8 @@ struct unix_funcs
UINT winini, UINT dpi );
INT (WINAPI *pNtUserToUnicodeEx)( UINT virt, UINT scan, const BYTE *state,
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 );
WORD (WINAPI *pNtUserVkKeyScanEx)( WCHAR chr, HKL layout );
......
......@@ -795,6 +795,13 @@ SHORT WINAPI NtUserGetAsyncKeyState( INT 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 )
{
if (!unix_funcs) return FALSE;
......@@ -857,6 +864,14 @@ UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL 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 )
{
if (!unix_funcs) return FALSE;
......@@ -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 );
}
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 )
{
if (!unix_funcs) return FALSE;
......
......@@ -264,6 +264,8 @@ HICON WINAPI NtUserFindExistingCursorIcon( UNICODE_STRING *module, UNICODE_STR
void *desc );
SHORT WINAPI NtUserGetAsyncKeyState( INT key );
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 NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen );
HWND WINAPI NtUserGetClipboardOwner(void);
......@@ -312,6 +314,9 @@ HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK acc
BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, 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 NtUserRemoveClipboardFormatListener( HWND hwnd );
HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str );
......@@ -340,6 +345,8 @@ INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
WCHAR *str, int size, UINT flags, HKL layout );
BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook );
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 );
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