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
a7ff88c9
Commit
a7ff88c9
authored
Jun 28, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move set_standard_scroll_painted implementation from user32.
parent
22cab055
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
17 deletions
+50
-17
scroll.c
dlls/user32/scroll.c
+2
-11
user_main.c
dlls/user32/user_main.c
+1
-1
user_private.h
dlls/user32/user_private.h
+1
-1
dce.c
dlls/win32u/dce.c
+3
-3
ntuser_private.h
dlls/win32u/ntuser_private.h
+14
-1
scroll.c
dlls/win32u/scroll.c
+28
-0
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
No files found.
dlls/user32/scroll.c
View file @
a7ff88c9
...
...
@@ -31,16 +31,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
scroll
);
/* data for a single scroll bar */
typedef
struct
{
INT
curVal
;
/* Current scroll-bar value */
INT
minVal
;
/* Minimum scroll-bar value */
INT
maxVal
;
/* Maximum scroll-bar value */
INT
page
;
/* Page size of scroll bar (Win32) */
UINT
flags
;
/* EnableScrollBar flags */
BOOL
painted
;
/* Whether the scroll bar is painted by DefWinProc() */
}
SCROLLBAR_INFO
,
*
LPSCROLLBAR_INFO
;
typedef
struct
scroll_info
SCROLLBAR_INFO
,
*
LPSCROLLBAR_INFO
;
/* data for window that has (one or two) scroll bars */
typedef
struct
...
...
@@ -127,7 +118,7 @@ static inline BOOL SCROLL_ScrollInfoValid( LPCSCROLLINFO info )
* or NULL if failed (f.i. scroll bar does not exist yet)
* If alloc is TRUE and the struct does not exist yet, create it.
*/
static
SCROLLBAR_INFO
*
SCROLL_GetInternalInfo
(
HWND
hwnd
,
INT
nBar
,
BOOL
alloc
)
SCROLLBAR_INFO
*
SCROLL_GetInternalInfo
(
HWND
hwnd
,
INT
nBar
,
BOOL
alloc
)
{
SCROLLBAR_INFO
*
infoPtr
=
NULL
;
WND
*
wndPtr
=
WIN_GetPtr
(
hwnd
);
...
...
dlls/user32/user_main.c
View file @
a7ff88c9
...
...
@@ -159,9 +159,9 @@ static const struct user_callbacks user_funcs =
NtWaitForMultipleObjects
,
SCROLL_DrawNCScrollBar
,
free_win_ptr
,
SCROLL_GetInternalInfo
,
notify_ime
,
post_dde_message
,
SCROLL_SetStandardScrollPainted
,
unpack_dde_message
,
register_imm
,
unregister_imm
,
...
...
dlls/user32/user_private.h
View file @
a7ff88c9
...
...
@@ -179,6 +179,6 @@ LRESULT WINAPI USER_ScrollBarProc(HWND, UINT, WPARAM, LPARAM, BOOL) DECLSPEC_HID
void
WINAPI
USER_ScrollBarDraw
(
HWND
,
HDC
,
INT
,
enum
SCROLL_HITTEST
,
const
struct
SCROLL_TRACKING_INFO
*
,
BOOL
,
BOOL
,
RECT
*
,
INT
,
INT
,
INT
,
BOOL
)
DECLSPEC_HIDDEN
;
void
WINAPI
SCROLL_SetStandardScrollPainted
(
HWND
hwnd
,
INT
bar
,
BOOL
visible
);
struct
scroll_info
*
SCROLL_GetInternalInfo
(
HWND
hwnd
,
INT
nBar
,
BOOL
alloc
);
#endif
/* __WINE_USER_PRIVATE_H */
dlls/win32u/dce.c
View file @
a7ff88c9
...
...
@@ -1188,14 +1188,14 @@ static HRGN send_ncpaint( HWND hwnd, HWND *child, UINT *flags )
if
(
whole_rgn
)
/* NOTE: WM_NCPAINT allows wParam to be 1 */
{
if
(
(
*
flags
&
UPDATE_NONCLIENT
)
&&
user_callbacks
)
if
(
*
flags
&
UPDATE_NONCLIENT
)
{
/* Mark standard scroll bars as not painted before sending WM_NCPAINT */
style
=
get_window_long
(
hwnd
,
GWL_STYLE
);
if
(
style
&
WS_HSCROLL
)
user_callbacks
->
set_standard_scroll_painted
(
hwnd
,
SB_HORZ
,
FALSE
);
set_standard_scroll_painted
(
hwnd
,
SB_HORZ
,
FALSE
);
if
(
style
&
WS_VSCROLL
)
user_callbacks
->
set_standard_scroll_painted
(
hwnd
,
SB_VERT
,
FALSE
);
set_standard_scroll_painted
(
hwnd
,
SB_VERT
,
FALSE
);
send_message
(
hwnd
,
WM_NCPAINT
,
(
WPARAM
)
whole_rgn
,
0
);
}
...
...
dlls/win32u/ntuser_private.h
View file @
a7ff88c9
...
...
@@ -37,10 +37,10 @@ struct user_callbacks
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
void
(
CDECL
*
draw_nc_scrollbar
)(
HWND
hwnd
,
HDC
hdc
,
BOOL
draw_horizontal
,
BOOL
draw_vertical
);
void
(
CDECL
*
free_win_ptr
)(
struct
tagWND
*
win
);
struct
scroll_info
*
(
CDECL
*
get_scroll_info
)(
HWND
hwnd
,
INT
nBar
,
BOOL
alloc
);
void
(
CDECL
*
notify_ime
)(
HWND
hwnd
,
UINT
param
);
BOOL
(
CDECL
*
post_dde_message
)(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
DWORD
dest_tid
,
DWORD
type
);
void
(
WINAPI
*
set_standard_scroll_painted
)(
HWND
hwnd
,
INT
bar
,
BOOL
visible
);
BOOL
(
CDECL
*
unpack_dde_message
)(
HWND
hwnd
,
UINT
message
,
WPARAM
*
wparam
,
LPARAM
*
lparam
,
void
**
buffer
,
size_t
size
);
BOOL
(
WINAPI
*
register_imm
)(
HWND
hwnd
);
...
...
@@ -203,6 +203,19 @@ enum builtin_winprocs
NB_BUILTIN_AW_WINPROCS
=
WINPROC_DESKTOP
};
/* FIXME: make it private to scroll.c */
/* data for a single scroll bar */
struct
scroll_info
{
INT
curVal
;
/* Current scroll-bar value */
INT
minVal
;
/* Minimum scroll-bar value */
INT
maxVal
;
/* Maximum scroll-bar value */
INT
page
;
/* Page size of scroll bar (Win32) */
UINT
flags
;
/* EnableScrollBar flags */
BOOL
painted
;
/* Whether the scroll bar is painted by DefWinProc() */
};
/* FIXME: make it private to class.c */
typedef
struct
tagWINDOWPROC
{
...
...
dlls/win32u/scroll.c
View file @
a7ff88c9
...
...
@@ -30,6 +30,20 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
scroll
);
static
struct
scroll_info
*
get_scroll_info_ptr
(
HWND
hwnd
,
int
bar
,
BOOL
alloc
)
{
struct
scroll_info
*
ret
=
NULL
;
user_lock
();
if
(
user_callbacks
)
ret
=
user_callbacks
->
get_scroll_info
(
hwnd
,
bar
,
alloc
);
if
(
!
ret
)
user_unlock
();
return
ret
;
}
static
void
release_scroll_info_ptr
(
struct
scroll_info
*
info
)
{
user_unlock
();
}
static
BOOL
show_scroll_bar
(
HWND
hwnd
,
int
bar
,
BOOL
show_horz
,
BOOL
show_vert
)
{
ULONG
old_style
,
set_bits
=
0
,
clear_bits
=
0
;
...
...
@@ -83,6 +97,20 @@ LRESULT scroll_bar_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
}
}
void
set_standard_scroll_painted
(
HWND
hwnd
,
int
bar
,
BOOL
painted
)
{
struct
scroll_info
*
info
;
if
(
bar
!=
SB_HORZ
&&
bar
!=
SB_VERT
)
return
;
if
((
info
=
get_scroll_info_ptr
(
hwnd
,
bar
,
FALSE
)))
{
info
->
painted
=
painted
;
release_scroll_info_ptr
(
info
);
}
}
/*************************************************************************
* NtUserShowScrollBar (win32u.@)
*/
...
...
dlls/win32u/win32u_private.h
View file @
a7ff88c9
...
...
@@ -443,6 +443,7 @@ extern BOOL rawinput_device_get_usages( HANDLE handle, USHORT *usage_page, USHOR
/* scroll.c */
extern
LRESULT
scroll_bar_window_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
BOOL
ansi
)
DECLSPEC_HIDDEN
;
extern
void
set_standard_scroll_painted
(
HWND
hwnd
,
int
bar
,
BOOL
painted
)
DECLSPEC_HIDDEN
;
/* sysparams.c */
extern
BOOL
enable_thunk_lock
DECLSPEC_HIDDEN
;
...
...
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