Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fc0753f9
Commit
fc0753f9
authored
Jul 29, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move register_desktop_class implementation from user32.
parent
8f3352ed
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
76 additions
and
40 deletions
+76
-40
class.c
dlls/user32/class.c
+0
-10
controls.h
dlls/user32/controls.h
+0
-3
desktop.c
dlls/user32/desktop.c
+0
-14
message.c
dlls/user32/message.c
+0
-12
user_main.c
dlls/user32/user_main.c
+0
-1
class.c
dlls/win32u/class.c
+73
-0
ntuser_private.h
dlls/win32u/ntuser_private.h
+1
-0
syscall.c
dlls/win32u/syscall.c
+2
-0
No files found.
dlls/user32/class.c
View file @
fc0753f9
...
...
@@ -333,16 +333,6 @@ BOOL WINAPI User32RegisterBuiltinClasses( const struct win_hook_params *params,
/***********************************************************************
* register_desktop_class
*/
void
register_desktop_class
(
void
)
{
register_builtin
(
&
DESKTOP_builtin_class
);
register_builtin
(
&
MESSAGE_builtin_class
);
}
/***********************************************************************
* RegisterClassA (USER32.@)
*
* Register a window class.
...
...
dlls/user32/controls.h
View file @
fc0753f9
...
...
@@ -39,13 +39,11 @@ extern const struct builtin_class_descr BUTTON_builtin_class DECLSPEC_HIDDEN;
extern
const
struct
builtin_class_descr
COMBO_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
COMBOLBOX_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
DIALOG_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
DESKTOP_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
EDIT_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
ICONTITLE_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
LISTBOX_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
MDICLIENT_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
MENU_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
MESSAGE_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
SCROLL_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
STATIC_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
IME_builtin_class
DECLSPEC_HIDDEN
;
...
...
@@ -102,7 +100,6 @@ extern LRESULT StaticWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDE
/* Class functions */
extern
ATOM
get_int_atom_value
(
UNICODE_STRING
*
name
)
DECLSPEC_HIDDEN
;
extern
void
register_desktop_class
(
void
)
DECLSPEC_HIDDEN
;
/* desktop */
extern
BOOL
update_wallpaper
(
const
WCHAR
*
wallpaper
,
const
WCHAR
*
pattern
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/desktop.c
View file @
fc0753f9
...
...
@@ -34,20 +34,6 @@ static SIZE bitmapSize;
static
BOOL
fTileWallPaper
;
/*********************************************************************
* desktop class descriptor
*/
const
struct
builtin_class_descr
DESKTOP_builtin_class
=
{
(
LPCWSTR
)
DESKTOP_CLASS_ATOM
,
/* name */
CS_DBLCLKS
,
/* style */
WINPROC_DESKTOP
,
/* proc */
0
,
/* extra */
0
,
/* cursor */
(
HBRUSH
)(
COLOR_BACKGROUND
+
1
)
/* brush */
};
/***********************************************************************
* DESKTOP_LoadBitmap
*/
...
...
dlls/user32/message.c
View file @
fc0753f9
...
...
@@ -47,18 +47,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msg
);
/* Message class descriptor */
const
struct
builtin_class_descr
MESSAGE_builtin_class
=
{
L"Message"
,
/* name */
0
,
/* style */
WINPROC_MESSAGE
,
/* proc */
0
,
/* extra */
0
,
/* cursor */
0
/* brush */
};
/* pack a pointer into a 32/64 portable format */
static
inline
ULONGLONG
pack_ptr
(
const
void
*
ptr
)
{
...
...
dlls/user32/user_main.c
View file @
fc0753f9
...
...
@@ -220,7 +220,6 @@ static BOOL process_attach(void)
dpiaware_init
();
winproc_init
();
register_desktop_class
();
/* Initialize system colors and metrics */
SYSPARAMS_Init
();
...
...
dlls/win32u/class.c
View file @
fc0753f9
...
...
@@ -60,6 +60,17 @@ typedef struct tagCLASS
struct
client_menu_name
menu_name
;
/* Default menu name */
}
CLASS
;
/* Built-in class descriptor */
struct
builtin_class_descr
{
const
char
*
name
;
/* class name */
UINT
style
;
/* class style */
INT
extra
;
/* window extra bytes */
ULONG_PTR
cursor
;
/* cursor id */
HBRUSH
brush
;
/* brush or system color */
enum
builtin_winprocs
proc
;
};
typedef
struct
tagWINDOWPROC
{
WNDPROC
procA
;
/* ANSI window proc */
...
...
@@ -1050,6 +1061,59 @@ BOOL needs_ime_window( HWND hwnd )
return
ret
;
}
static
const
struct
builtin_class_descr
desktop_builtin_class
=
{
.
name
=
MAKEINTRESOURCEA
(
DESKTOP_CLASS_ATOM
),
.
style
=
CS_DBLCLKS
,
.
proc
=
WINPROC_DESKTOP
,
.
brush
=
(
HBRUSH
)(
COLOR_BACKGROUND
+
1
),
};
static
const
struct
builtin_class_descr
message_builtin_class
=
{
.
name
=
"Message"
,
.
proc
=
WINPROC_MESSAGE
,
};
/***********************************************************************
* register_builtin
*
* Register a builtin control class.
* This allows having both ANSI and Unicode winprocs for the same class.
*/
static
void
register_builtin
(
const
struct
builtin_class_descr
*
descr
)
{
UNICODE_STRING
name
,
version
=
{
.
Length
=
0
};
struct
client_menu_name
menu_name
=
{
0
};
WCHAR
nameW
[
64
];
WNDCLASSEXW
class
=
{
.
cbSize
=
sizeof
(
class
),
.
hInstance
=
user32_module
,
.
style
=
descr
->
style
,
.
cbWndExtra
=
descr
->
extra
,
.
hbrBackground
=
descr
->
brush
,
.
lpfnWndProc
=
BUILTIN_WINPROC
(
descr
->
proc
),
};
if
(
descr
->
cursor
)
class
.
hCursor
=
LoadImageW
(
0
,
(
const
WCHAR
*
)
descr
->
cursor
,
IMAGE_CURSOR
,
0
,
0
,
LR_SHARED
|
LR_DEFAULTSIZE
);
if
(
IS_INTRESOURCE
(
descr
->
name
))
{
name
.
Buffer
=
(
WCHAR
*
)
descr
->
name
;
name
.
Length
=
name
.
MaximumLength
=
0
;
}
else
{
asciiz_to_unicode
(
nameW
,
descr
->
name
);
RtlInitUnicodeString
(
&
name
,
nameW
);
}
if
(
!
NtUserRegisterClassExWOW
(
&
class
,
&
name
,
&
version
,
&
menu_name
,
1
,
0
,
NULL
)
&&
class
.
hCursor
)
NtUserDestroyCursor
(
class
.
hCursor
,
0
);
}
static
void
register_builtins
(
void
)
{
void
*
ret_ptr
;
...
...
@@ -1065,3 +1129,12 @@ void register_builtin_classes(void)
static
pthread_once_t
init_once
=
PTHREAD_ONCE_INIT
;
pthread_once
(
&
init_once
,
register_builtins
);
}
/***********************************************************************
* register_desktop_class
*/
void
register_desktop_class
(
void
)
{
register_builtin
(
&
desktop_builtin_class
);
register_builtin
(
&
message_builtin_class
);
}
dlls/win32u/ntuser_private.h
View file @
fc0753f9
...
...
@@ -249,6 +249,7 @@ struct dce *get_class_dce( struct tagCLASS *class ) DECLSPEC_HIDDEN;
struct
dce
*
set_class_dce
(
struct
tagCLASS
*
class
,
struct
dce
*
dce
)
DECLSPEC_HIDDEN
;
BOOL
needs_ime_window
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
register_builtin_classes
(
void
)
DECLSPEC_HIDDEN
;
extern
void
register_desktop_class
(
void
)
DECLSPEC_HIDDEN
;
/* cursoricon.c */
HICON
alloc_cursoricon_handle
(
BOOL
is_icon
)
DECLSPEC_HIDDEN
;
...
...
dlls/win32u/syscall.c
View file @
fc0753f9
...
...
@@ -29,6 +29,7 @@
#include "windef.h"
#include "winnt.h"
#include "ntgdi_private.h"
#include "ntuser_private.h"
#include "ntuser.h"
#include "wine/unixlib.h"
...
...
@@ -318,6 +319,7 @@ static NTSTATUS init( void *dispatcher )
if
((
status
=
gdi_init
()))
return
status
;
winstation_init
();
sysparams_init
();
register_desktop_class
();
return
STATUS_SUCCESS
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment