Commit d081a735 authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Simplify window procedure allocation for the builtin classes.

parent 6b0cdc19
...@@ -162,8 +162,7 @@ const struct builtin_class_descr BUTTON_builtin_class = ...@@ -162,8 +162,7 @@ const struct builtin_class_descr BUTTON_builtin_class =
{ {
buttonW, /* name */ buttonW, /* name */
CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */
NULL, /* procA */ WINPROC_BUTTON, /* proc */
BUILTIN_WINPROC(WINPROC_BUTTON), /* procW */
NB_EXTRA_BYTES, /* extra */ NB_EXTRA_BYTES, /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
0 /* brush */ 0 /* brush */
......
...@@ -400,7 +400,7 @@ static void register_builtin( const struct builtin_class_descr *descr ) ...@@ -400,7 +400,7 @@ static void register_builtin( const struct builtin_class_descr *descr )
classPtr->hCursor = LoadCursorA( 0, (LPSTR)descr->cursor ); classPtr->hCursor = LoadCursorA( 0, (LPSTR)descr->cursor );
classPtr->hbrBackground = descr->brush; classPtr->hbrBackground = descr->brush;
classPtr->winproc = WINPROC_AllocProc( descr->procA, descr->procW ); classPtr->winproc = BUILTIN_WINPROC( descr->proc );
release_class_ptr( classPtr ); release_class_ptr( classPtr );
} }
......
...@@ -94,8 +94,7 @@ const struct builtin_class_descr COMBO_builtin_class = ...@@ -94,8 +94,7 @@ const struct builtin_class_descr COMBO_builtin_class =
{ {
comboboxW, /* name */ comboboxW, /* name */
CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, /* style */ CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, /* style */
NULL, /* procA */ WINPROC_COMBO, /* proc */
BUILTIN_WINPROC(WINPROC_COMBO), /* procW */
sizeof(HEADCOMBO *), /* extra */ sizeof(HEADCOMBO *), /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
0 /* brush */ 0 /* brush */
......
...@@ -60,8 +60,7 @@ struct builtin_class_descr ...@@ -60,8 +60,7 @@ struct builtin_class_descr
{ {
LPCWSTR name; /* class name */ LPCWSTR name; /* class name */
UINT style; /* class style */ UINT style; /* class style */
WNDPROC procA; /* ASCII window procedure */ enum builtin_winprocs proc;
WNDPROC procW; /* Unicode window procedure */
INT extra; /* window extra bytes */ INT extra; /* window extra bytes */
ULONG_PTR cursor; /* cursor id */ ULONG_PTR cursor; /* cursor id */
HBRUSH brush; /* brush or system color */ HBRUSH brush; /* brush or system color */
......
...@@ -46,8 +46,7 @@ const struct builtin_class_descr DESKTOP_builtin_class = ...@@ -46,8 +46,7 @@ const struct builtin_class_descr DESKTOP_builtin_class =
{ {
(LPCWSTR)DESKTOP_CLASS_ATOM, /* name */ (LPCWSTR)DESKTOP_CLASS_ATOM, /* name */
CS_DBLCLKS, /* style */ CS_DBLCLKS, /* style */
NULL, /* procA (winproc is Unicode only) */ WINPROC_DESKTOP, /* proc */
BUILTIN_WINPROC(WINPROC_DESKTOP), /* procW */
0, /* extra */ 0, /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
(HBRUSH)(COLOR_BACKGROUND+1) /* brush */ (HBRUSH)(COLOR_BACKGROUND+1) /* brush */
......
...@@ -97,8 +97,7 @@ const struct builtin_class_descr DIALOG_builtin_class = ...@@ -97,8 +97,7 @@ const struct builtin_class_descr DIALOG_builtin_class =
{ {
(LPCWSTR)DIALOG_CLASS_ATOM, /* name */ (LPCWSTR)DIALOG_CLASS_ATOM, /* name */
CS_SAVEBITS | CS_DBLCLKS, /* style */ CS_SAVEBITS | CS_DBLCLKS, /* style */
NULL, /* procA */ WINPROC_DIALOG, /* proc */
BUILTIN_WINPROC(WINPROC_DIALOG), /* procW */
DLGWINDOWEXTRA, /* extra */ DLGWINDOWEXTRA, /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
0 /* brush */ 0 /* brush */
......
...@@ -4978,8 +4978,7 @@ const struct builtin_class_descr EDIT_builtin_class = ...@@ -4978,8 +4978,7 @@ const struct builtin_class_descr EDIT_builtin_class =
{ {
editW, /* name */ editW, /* name */
CS_DBLCLKS | CS_PARENTDC, /* style */ CS_DBLCLKS | CS_PARENTDC, /* style */
NULL, /* procA */ WINPROC_EDIT, /* proc */
BUILTIN_WINPROC(WINPROC_EDIT), /* procW */
#ifdef __i386__ #ifdef __i386__
sizeof(EDITSTATE *) + sizeof(HLOCAL16), /* extra */ sizeof(EDITSTATE *) + sizeof(HLOCAL16), /* extra */
#else #else
......
...@@ -45,8 +45,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class = ...@@ -45,8 +45,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class =
{ {
(LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */ (LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */
0, /* style */ 0, /* style */
NULL, /* procA (winproc is Unicode only) */ WINPROC_ICONTITLE, /* proc */
BUILTIN_WINPROC(WINPROC_ICONTITLE), /* procW */
0, /* extra */ 0, /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
0 /* brush */ 0 /* brush */
......
...@@ -138,8 +138,7 @@ const struct builtin_class_descr LISTBOX_builtin_class = ...@@ -138,8 +138,7 @@ const struct builtin_class_descr LISTBOX_builtin_class =
{ {
listboxW, /* name */ listboxW, /* name */
CS_DBLCLKS /*| CS_PARENTDC*/, /* style */ CS_DBLCLKS /*| CS_PARENTDC*/, /* style */
NULL, /* procA */ WINPROC_LISTBOX, /* proc */
BUILTIN_WINPROC(WINPROC_LISTBOX), /* procW */
sizeof(LB_DESCR *), /* extra */ sizeof(LB_DESCR *), /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
0 /* brush */ 0 /* brush */
...@@ -154,8 +153,7 @@ const struct builtin_class_descr COMBOLBOX_builtin_class = ...@@ -154,8 +153,7 @@ const struct builtin_class_descr COMBOLBOX_builtin_class =
{ {
combolboxW, /* name */ combolboxW, /* name */
CS_DBLCLKS | CS_SAVEBITS, /* style */ CS_DBLCLKS | CS_SAVEBITS, /* style */
NULL, /* procA */ WINPROC_LISTBOX, /* proc */
BUILTIN_WINPROC(WINPROC_LISTBOX), /* procW */
sizeof(LB_DESCR *), /* extra */ sizeof(LB_DESCR *), /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
0 /* brush */ 0 /* brush */
......
...@@ -186,8 +186,7 @@ const struct builtin_class_descr MDICLIENT_builtin_class = ...@@ -186,8 +186,7 @@ const struct builtin_class_descr MDICLIENT_builtin_class =
{ {
mdiclientW, /* name */ mdiclientW, /* name */
0, /* style */ 0, /* style */
NULL, /* procA */ WINPROC_MDICLIENT, /* proc */
BUILTIN_WINPROC(WINPROC_MDICLIENT), /* procW */
sizeof(MDICLIENTINFO), /* extra */ sizeof(MDICLIENTINFO), /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
(HBRUSH)(COLOR_APPWORKSPACE+1) /* brush */ (HBRUSH)(COLOR_APPWORKSPACE+1) /* brush */
......
...@@ -194,8 +194,7 @@ const struct builtin_class_descr MENU_builtin_class = ...@@ -194,8 +194,7 @@ const struct builtin_class_descr MENU_builtin_class =
{ {
(LPCWSTR)POPUPMENU_CLASS_ATOM, /* name */ (LPCWSTR)POPUPMENU_CLASS_ATOM, /* name */
CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */ CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */
NULL, /* procA (winproc is Unicode only) */ WINPROC_MENU, /* proc */
BUILTIN_WINPROC(WINPROC_MENU), /* procW */
sizeof(HMENU), /* extra */ sizeof(HMENU), /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
(HBRUSH)(COLOR_MENU+1) /* brush */ (HBRUSH)(COLOR_MENU+1) /* brush */
......
...@@ -96,8 +96,7 @@ const struct builtin_class_descr MESSAGE_builtin_class = ...@@ -96,8 +96,7 @@ const struct builtin_class_descr MESSAGE_builtin_class =
{ {
messageW, /* name */ messageW, /* name */
0, /* style */ 0, /* style */
NULL, /* procA (winproc is Unicode only) */ WINPROC_MESSAGE, /* proc */
BUILTIN_WINPROC(WINPROC_MESSAGE), /* procW */
0, /* extra */ 0, /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
0 /* brush */ 0 /* brush */
......
...@@ -124,8 +124,7 @@ const struct builtin_class_descr SCROLL_builtin_class = ...@@ -124,8 +124,7 @@ const struct builtin_class_descr SCROLL_builtin_class =
{ {
scrollbarW, /* name */ scrollbarW, /* name */
CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */
NULL, /* procA */ WINPROC_SCROLLBAR, /* proc */
BUILTIN_WINPROC(WINPROC_SCROLLBAR), /* procW */
sizeof(SCROLLBAR_INFO), /* extra */ sizeof(SCROLLBAR_INFO), /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
0 /* brush */ 0 /* brush */
......
...@@ -102,8 +102,7 @@ const struct builtin_class_descr STATIC_builtin_class = ...@@ -102,8 +102,7 @@ const struct builtin_class_descr STATIC_builtin_class =
{ {
staticW, /* name */ staticW, /* name */
CS_DBLCLKS | CS_PARENTDC, /* style */ CS_DBLCLKS | CS_PARENTDC, /* style */
NULL, /* procA */ WINPROC_STATIC, /* proc */
BUILTIN_WINPROC(WINPROC_STATIC), /* procW */
STATIC_EXTRA_BYTES, /* extra */ STATIC_EXTRA_BYTES, /* extra */
IDC_ARROW, /* cursor */ IDC_ARROW, /* cursor */
0 /* brush */ 0 /* brush */
......
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