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
3dc6317f
Commit
3dc6317f
authored
Dec 15, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Turn the scrollbar winproc into a Wow handler.
parent
57e5c8f6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
40 deletions
+46
-40
controls.h
dlls/user32/controls.h
+3
-0
msg16.c
dlls/user32/msg16.c
+33
-0
scroll.c
dlls/user32/scroll.c
+4
-36
winproc.c
dlls/user32/winproc.c
+6
-4
No files found.
dlls/user32/controls.h
View file @
3dc6317f
...
...
@@ -65,6 +65,7 @@ struct wow_handlers16
LRESULT
(
*
combo_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
edit_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
listbox_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
scrollbar_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
};
struct
wow_handlers32
...
...
@@ -73,6 +74,7 @@ struct wow_handlers32
LRESULT
(
*
combo_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
edit_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
listbox_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
scrollbar_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
};
extern
struct
wow_handlers16
wow_handlers
DECLSPEC_HIDDEN
;
...
...
@@ -81,6 +83,7 @@ extern LRESULT ButtonWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDE
extern
LRESULT
ComboWndProc_common
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
)
DECLSPEC_HIDDEN
;
extern
LRESULT
EditWndProc_common
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
)
DECLSPEC_HIDDEN
;
extern
LRESULT
ListBoxWndProc_common
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
)
DECLSPEC_HIDDEN
;
extern
LRESULT
ScrollBarWndProc_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
,
...
...
dlls/user32/msg16.c
View file @
3dc6317f
...
...
@@ -1159,6 +1159,38 @@ static LRESULT listbox_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
}
/***********************************************************************
* scrollbar_proc16
*/
static
LRESULT
scrollbar_proc16
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
static
const
UINT
msg16_offset
=
SBM_SETPOS16
-
SBM_SETPOS
;
switch
(
msg
)
{
case
SBM_SETPOS16
:
case
SBM_GETPOS16
:
case
SBM_ENABLE_ARROWS16
:
msg
-=
msg16_offset
;
break
;
case
SBM_SETRANGE16
:
msg
=
wParam
?
SBM_SETRANGEREDRAW
:
SBM_SETRANGE
;
wParam
=
LOWORD
(
lParam
);
lParam
=
HIWORD
(
lParam
);
break
;
case
SBM_GETRANGE16
:
{
INT
min
,
max
;
wow_handlers32
.
scrollbar_proc
(
hwnd
,
SBM_GETRANGE
,
(
WPARAM
)
&
min
,
(
LPARAM
)
&
max
,
FALSE
);
return
MAKELRESULT
(
min
,
max
);
}
default:
return
wow_handlers32
.
scrollbar_proc
(
hwnd
,
msg
,
wParam
,
lParam
,
unicode
);
}
return
wow_handlers32
.
scrollbar_proc
(
hwnd
,
msg
,
wParam
,
lParam
,
FALSE
);
}
void
register_wow_handlers
(
void
)
{
static
const
struct
wow_handlers16
handlers16
=
...
...
@@ -1167,6 +1199,7 @@ void register_wow_handlers(void)
combo_proc16
,
edit_proc16
,
listbox_proc16
,
scrollbar_proc16
,
};
UserRegisterWowHandlers
(
&
handlers16
,
&
wow_handlers32
);
...
...
dlls/user32/scroll.c
View file @
3dc6317f
...
...
@@ -33,7 +33,6 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/winuser16.h"
#include "controls.h"
#include "win.h"
#include "wine/debug.h"
...
...
@@ -1401,9 +1400,9 @@ static BOOL SCROLL_SetScrollRange(HWND hwnd, INT nBar, INT minVal, INT maxVal)
/***********************************************************************
* ScrollBarWndProc
* ScrollBarWndProc
_common
*/
static
LRESULT
ScrollBarWndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
LRESULT
ScrollBarWndProc_common
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
if
(
!
IsWindow
(
hwnd
))
return
0
;
...
...
@@ -1576,42 +1575,11 @@ static LRESULT ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM
/***********************************************************************
* ScrollBarWndProc_wrapper16
*/
static
LRESULT
ScrollBarWndProc_wrapper16
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
static
const
UINT
msg16_offset
=
SBM_SETPOS16
-
SBM_SETPOS
;
switch
(
msg
)
{
case
SBM_SETPOS16
:
case
SBM_GETPOS16
:
case
SBM_ENABLE_ARROWS16
:
msg
-=
msg16_offset
;
break
;
case
SBM_SETRANGE16
:
msg
=
wParam
?
SBM_SETRANGEREDRAW
:
SBM_SETRANGE
;
wParam
=
LOWORD
(
lParam
);
lParam
=
HIWORD
(
lParam
);
break
;
case
SBM_GETRANGE16
:
{
INT
min
,
max
;
ScrollBarWndProc
(
hwnd
,
SBM_GETRANGE
,
(
WPARAM
)
&
min
,
(
LPARAM
)
&
max
,
FALSE
);
return
MAKELRESULT
(
min
,
max
);
}
default:
return
ScrollBarWndProc
(
hwnd
,
msg
,
wParam
,
lParam
,
unicode
);
}
return
ScrollBarWndProc
(
hwnd
,
msg
,
wParam
,
lParam
,
FALSE
);
}
/***********************************************************************
* ScrollBarWndProcA
*/
static
LRESULT
WINAPI
ScrollBarWndProcA
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
return
ScrollBarWndProc_wrapper16
(
hwnd
,
message
,
wParam
,
lParam
,
FALSE
);
return
wow_handlers
.
scrollbar_proc
(
hwnd
,
message
,
wParam
,
lParam
,
FALSE
);
}
...
...
@@ -1620,7 +1588,7 @@ static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT message, WPARAM wParam,
*/
static
LRESULT
WINAPI
ScrollBarWndProcW
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
return
ScrollBarWndProc_wrapper16
(
hwnd
,
message
,
wParam
,
lParam
,
TRUE
);
return
wow_handlers
.
scrollbar_proc
(
hwnd
,
message
,
wParam
,
lParam
,
TRUE
);
}
...
...
dlls/user32/winproc.c
View file @
3dc6317f
...
...
@@ -2388,10 +2388,11 @@ INT_PTR WINPROC_CallDlgProcW( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam,
*/
void
WINAPI
UserRegisterWowHandlers
(
const
struct
wow_handlers16
*
new
,
struct
wow_handlers32
*
orig
)
{
orig
->
button_proc
=
ButtonWndProc_common
;
orig
->
combo_proc
=
ComboWndProc_common
;
orig
->
edit_proc
=
EditWndProc_common
;
orig
->
listbox_proc
=
ListBoxWndProc_common
;
orig
->
button_proc
=
ButtonWndProc_common
;
orig
->
combo_proc
=
ComboWndProc_common
;
orig
->
edit_proc
=
EditWndProc_common
;
orig
->
listbox_proc
=
ListBoxWndProc_common
;
orig
->
scrollbar_proc
=
ScrollBarWndProc_common
;
wow_handlers
=
*
new
;
}
...
...
@@ -2402,4 +2403,5 @@ struct wow_handlers16 wow_handlers =
ComboWndProc_common
,
EditWndProc_common
,
ListBoxWndProc_common
,
ScrollBarWndProc_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