user32: Simplify window procedure allocation for the builtin classes.

This commit is contained in:
Alexandre Julliard 2009-12-18 12:39:13 +01:00
parent 6b0cdc1922
commit d081a7352c
14 changed files with 15 additions and 29 deletions

View File

@ -162,8 +162,7 @@ const struct builtin_class_descr BUTTON_builtin_class =
{
buttonW, /* name */
CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_BUTTON), /* procW */
WINPROC_BUTTON, /* proc */
NB_EXTRA_BYTES, /* extra */
IDC_ARROW, /* cursor */
0 /* brush */

View File

@ -400,7 +400,7 @@ static void register_builtin( const struct builtin_class_descr *descr )
classPtr->hCursor = LoadCursorA( 0, (LPSTR)descr->cursor );
classPtr->hbrBackground = descr->brush;
classPtr->winproc = WINPROC_AllocProc( descr->procA, descr->procW );
classPtr->winproc = BUILTIN_WINPROC( descr->proc );
release_class_ptr( classPtr );
}

View File

@ -94,8 +94,7 @@ const struct builtin_class_descr COMBO_builtin_class =
{
comboboxW, /* name */
CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, /* style */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_COMBO), /* procW */
WINPROC_COMBO, /* proc */
sizeof(HEADCOMBO *), /* extra */
IDC_ARROW, /* cursor */
0 /* brush */

View File

@ -60,8 +60,7 @@ struct builtin_class_descr
{
LPCWSTR name; /* class name */
UINT style; /* class style */
WNDPROC procA; /* ASCII window procedure */
WNDPROC procW; /* Unicode window procedure */
enum builtin_winprocs proc;
INT extra; /* window extra bytes */
ULONG_PTR cursor; /* cursor id */
HBRUSH brush; /* brush or system color */

View File

@ -46,8 +46,7 @@ const struct builtin_class_descr DESKTOP_builtin_class =
{
(LPCWSTR)DESKTOP_CLASS_ATOM, /* name */
CS_DBLCLKS, /* style */
NULL, /* procA (winproc is Unicode only) */
BUILTIN_WINPROC(WINPROC_DESKTOP), /* procW */
WINPROC_DESKTOP, /* proc */
0, /* extra */
IDC_ARROW, /* cursor */
(HBRUSH)(COLOR_BACKGROUND+1) /* brush */

View File

@ -97,8 +97,7 @@ const struct builtin_class_descr DIALOG_builtin_class =
{
(LPCWSTR)DIALOG_CLASS_ATOM, /* name */
CS_SAVEBITS | CS_DBLCLKS, /* style */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_DIALOG), /* procW */
WINPROC_DIALOG, /* proc */
DLGWINDOWEXTRA, /* extra */
IDC_ARROW, /* cursor */
0 /* brush */

View File

@ -4978,8 +4978,7 @@ const struct builtin_class_descr EDIT_builtin_class =
{
editW, /* name */
CS_DBLCLKS | CS_PARENTDC, /* style */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_EDIT), /* procW */
WINPROC_EDIT, /* proc */
#ifdef __i386__
sizeof(EDITSTATE *) + sizeof(HLOCAL16), /* extra */
#else

View File

@ -45,8 +45,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class =
{
(LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */
0, /* style */
NULL, /* procA (winproc is Unicode only) */
BUILTIN_WINPROC(WINPROC_ICONTITLE), /* procW */
WINPROC_ICONTITLE, /* proc */
0, /* extra */
IDC_ARROW, /* cursor */
0 /* brush */

View File

@ -138,8 +138,7 @@ const struct builtin_class_descr LISTBOX_builtin_class =
{
listboxW, /* name */
CS_DBLCLKS /*| CS_PARENTDC*/, /* style */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_LISTBOX), /* procW */
WINPROC_LISTBOX, /* proc */
sizeof(LB_DESCR *), /* extra */
IDC_ARROW, /* cursor */
0 /* brush */
@ -154,8 +153,7 @@ const struct builtin_class_descr COMBOLBOX_builtin_class =
{
combolboxW, /* name */
CS_DBLCLKS | CS_SAVEBITS, /* style */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_LISTBOX), /* procW */
WINPROC_LISTBOX, /* proc */
sizeof(LB_DESCR *), /* extra */
IDC_ARROW, /* cursor */
0 /* brush */

View File

@ -186,8 +186,7 @@ const struct builtin_class_descr MDICLIENT_builtin_class =
{
mdiclientW, /* name */
0, /* style */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_MDICLIENT), /* procW */
WINPROC_MDICLIENT, /* proc */
sizeof(MDICLIENTINFO), /* extra */
IDC_ARROW, /* cursor */
(HBRUSH)(COLOR_APPWORKSPACE+1) /* brush */

View File

@ -194,8 +194,7 @@ const struct builtin_class_descr MENU_builtin_class =
{
(LPCWSTR)POPUPMENU_CLASS_ATOM, /* name */
CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */
NULL, /* procA (winproc is Unicode only) */
BUILTIN_WINPROC(WINPROC_MENU), /* procW */
WINPROC_MENU, /* proc */
sizeof(HMENU), /* extra */
IDC_ARROW, /* cursor */
(HBRUSH)(COLOR_MENU+1) /* brush */

View File

@ -96,8 +96,7 @@ const struct builtin_class_descr MESSAGE_builtin_class =
{
messageW, /* name */
0, /* style */
NULL, /* procA (winproc is Unicode only) */
BUILTIN_WINPROC(WINPROC_MESSAGE), /* procW */
WINPROC_MESSAGE, /* proc */
0, /* extra */
IDC_ARROW, /* cursor */
0 /* brush */

View File

@ -124,8 +124,7 @@ const struct builtin_class_descr SCROLL_builtin_class =
{
scrollbarW, /* name */
CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_SCROLLBAR), /* procW */
WINPROC_SCROLLBAR, /* proc */
sizeof(SCROLLBAR_INFO), /* extra */
IDC_ARROW, /* cursor */
0 /* brush */

View File

@ -102,8 +102,7 @@ const struct builtin_class_descr STATIC_builtin_class =
{
staticW, /* name */
CS_DBLCLKS | CS_PARENTDC, /* style */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_STATIC), /* procW */
WINPROC_STATIC, /* proc */
STATIC_EXTRA_BYTES, /* extra */
IDC_ARROW, /* cursor */
0 /* brush */