Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
02e74fa8
Commit
02e74fa8
authored
Dec 15, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Implement UserRegisterWowHandlers function and add a handler for the button winproc.
parent
020c75b0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
26 deletions
+77
-26
button.c
dlls/user32/button.c
+3
-25
controls.h
dlls/user32/controls.h
+20
-0
msg16.c
dlls/user32/msg16.c
+34
-0
user16.c
dlls/user32/user16.c
+1
-0
user32.spec
dlls/user32/user32.spec
+1
-1
winproc.c
dlls/user32/winproc.c
+18
-0
No files found.
dlls/user32/button.c
View file @
02e74fa8
...
...
@@ -73,7 +73,6 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/winuser16.h"
#include "controls.h"
#include "win.h"
#include "user_private.h"
...
...
@@ -230,8 +229,7 @@ static void setup_clipping( HWND hwnd, HDC hdc )
/***********************************************************************
* ButtonWndProc_common
*/
static
LRESULT
ButtonWndProc_common
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
LRESULT
ButtonWndProc_common
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
RECT
rect
;
POINT
pt
;
...
...
@@ -548,32 +546,12 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg,
}
/***********************************************************************
* ButtonWndProc_wrapper16
*/
static
LRESULT
ButtonWndProc_wrapper16
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
static
const
UINT
msg16_offset
=
BM_GETCHECK16
-
BM_GETCHECK
;
switch
(
msg
)
{
case
BM_GETCHECK16
:
case
BM_SETCHECK16
:
case
BM_GETSTATE16
:
case
BM_SETSTATE16
:
case
BM_SETSTYLE16
:
return
ButtonWndProc_common
(
hwnd
,
msg
-
msg16_offset
,
wParam
,
lParam
,
FALSE
);
default:
return
ButtonWndProc_common
(
hwnd
,
msg
,
wParam
,
lParam
,
unicode
);
}
}
/***********************************************************************
* ButtonWndProcW
*/
static
LRESULT
WINAPI
ButtonWndProcW
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
!
IsWindow
(
hWnd
))
return
0
;
return
ButtonWndProc_wrapper16
(
hWnd
,
uMsg
,
wParam
,
lParam
,
TRUE
);
return
wow_handlers
.
button_proc
(
hWnd
,
uMsg
,
wParam
,
lParam
,
TRUE
);
}
...
...
@@ -583,7 +561,7 @@ static LRESULT WINAPI ButtonWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
static
LRESULT
WINAPI
ButtonWndProcA
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
!
IsWindow
(
hWnd
))
return
0
;
return
ButtonWndProc_wrapper16
(
hWnd
,
uMsg
,
wParam
,
lParam
,
FALSE
);
return
wow_handlers
.
button_proc
(
hWnd
,
uMsg
,
wParam
,
lParam
,
FALSE
);
}
...
...
dlls/user32/controls.h
View file @
02e74fa8
...
...
@@ -57,6 +57,26 @@ 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
;
/* Wow handlers */
struct
wow_handlers16
{
LRESULT
(
*
button_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
};
struct
wow_handlers32
{
LRESULT
(
*
button_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
};
extern
struct
wow_handlers16
wow_handlers
DECLSPEC_HIDDEN
;
extern
LRESULT
ButtonWndProc_common
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
)
DECLSPEC_HIDDEN
;
extern
void
register_wow_handlers
(
void
)
DECLSPEC_HIDDEN
;
extern
void
WINAPI
UserRegisterWowHandlers
(
const
struct
wow_handlers16
*
new
,
struct
wow_handlers32
*
orig
);
extern
WNDPROC
EDIT_winproc_handle
DECLSPEC_HIDDEN
;
/* Class functions */
...
...
dlls/user32/msg16.c
View file @
02e74fa8
...
...
@@ -23,12 +23,15 @@
#include "winerror.h"
#include "win.h"
#include "user_private.h"
#include "controls.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msg
);
DWORD
USER16_AlertableWait
=
0
;
static
struct
wow_handlers32
wow_handlers32
;
static
LRESULT
cwp_hook_callback
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
,
LRESULT
*
result
,
void
*
arg
)
{
...
...
@@ -584,3 +587,34 @@ BOOL16 WINAPI TranslateMDISysAccel16( HWND16 hwndClient, LPMSG16 msg )
}
return
0
;
}
/***********************************************************************
* button_proc16
*/
static
LRESULT
button_proc16
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
static
const
UINT
msg16_offset
=
BM_GETCHECK16
-
BM_GETCHECK
;
switch
(
msg
)
{
case
BM_GETCHECK16
:
case
BM_SETCHECK16
:
case
BM_GETSTATE16
:
case
BM_SETSTATE16
:
case
BM_SETSTYLE16
:
return
wow_handlers32
.
button_proc
(
hwnd
,
msg
-
msg16_offset
,
wParam
,
lParam
,
FALSE
);
default:
return
wow_handlers32
.
button_proc
(
hwnd
,
msg
,
wParam
,
lParam
,
unicode
);
}
}
void
register_wow_handlers
(
void
)
{
static
const
struct
wow_handlers16
handlers16
=
{
button_proc16
,
};
UserRegisterWowHandlers
(
&
handlers16
,
&
wow_handlers32
);
}
dlls/user32/user16.c
View file @
02e74fa8
...
...
@@ -1387,6 +1387,7 @@ BOOL WINAPI DllEntryPoint( DWORD reason, HINSTANCE16 inst, WORD ds,
if
(
USER_HeapSel
)
return
TRUE
;
/* already called */
USER_HeapSel
=
ds
;
register_wow_handlers
();
return
TRUE
;
}
...
...
dlls/user32/user32.spec
View file @
02e74fa8
...
...
@@ -738,7 +738,7 @@
# @ stub UserLpkPSMTextOut
# @ stub UserLpkTabbedTextOut
@ stdcall UserRealizePalette(long)
@ st
ub UserRegisterWowHandlers
@ st
dcall UserRegisterWowHandlers(ptr ptr)
# @ stub UserSetDeviceHoldState
@ stdcall UserSignalProc(long long long long)
# @ stub VRipOutput
...
...
dlls/user32/winproc.c
View file @
02e74fa8
...
...
@@ -2378,3 +2378,21 @@ INT_PTR WINPROC_CallDlgProcW( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam,
}
return
ret
;
}
/**********************************************************************
* UserRegisterWowHandlers (USER32.@)
*
* NOTE: no attempt has been made to be compatible here,
* the Windows function is most likely completely different.
*/
void
WINAPI
UserRegisterWowHandlers
(
const
struct
wow_handlers16
*
new
,
struct
wow_handlers32
*
orig
)
{
orig
->
button_proc
=
ButtonWndProc_common
;
wow_handlers
=
*
new
;
}
struct
wow_handlers16
wow_handlers
=
{
ButtonWndProc_common
,
};
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