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
b4ba6de6
Commit
b4ba6de6
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 NtUserShowScrollBar implementation from user32.
parent
f3c36f72
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
95 additions
and
30 deletions
+95
-30
listbox.c
dlls/user32/listbox.c
+1
-1
mdi.c
dlls/user32/mdi.c
+2
-2
scroll.c
dlls/user32/scroll.c
+0
-25
user32.spec
dlls/user32/user32.spec
+1
-1
Makefile.in
dlls/win32u/Makefile.in
+1
-0
gdiobj.c
dlls/win32u/gdiobj.c
+1
-0
scroll.c
dlls/win32u/scroll.c
+80
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-1
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
wrappers.c
dlls/win32u/wrappers.c
+6
-0
ntuser.h
include/ntuser.h
+1
-0
No files found.
dlls/user32/listbox.c
View file @
b4ba6de6
...
...
@@ -395,7 +395,7 @@ static void LISTBOX_UpdateScroll( LB_DESCR *descr )
}
else
{
ShowScrollBar
(
descr
->
self
,
SB_HORZ
,
FALSE
);
NtUser
ShowScrollBar
(
descr
->
self
,
SB_HORZ
,
FALSE
);
}
}
}
...
...
dlls/user32/mdi.c
View file @
b4ba6de6
...
...
@@ -1158,7 +1158,7 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
case
WM_MDITILE
:
ci
->
mdiFlags
|=
MDIF_NEEDUPDATE
;
ShowScrollBar
(
hwnd
,
SB_BOTH
,
FALSE
);
NtUser
ShowScrollBar
(
hwnd
,
SB_BOTH
,
FALSE
);
MDITile
(
hwnd
,
ci
,
wParam
);
ci
->
mdiFlags
&=
~
MDIF_NEEDUPDATE
;
return
0
;
...
...
@@ -1701,7 +1701,7 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
if
(
style
&
WS_MAXIMIZE
)
{
HeapFree
(
GetProcessHeap
(),
0
,
list
);
ShowScrollBar
(
hwnd
,
SB_BOTH
,
FALSE
);
NtUser
ShowScrollBar
(
hwnd
,
SB_BOTH
,
FALSE
);
return
;
}
if
(
style
&
WS_VISIBLE
)
...
...
dlls/user32/scroll.c
View file @
b4ba6de6
...
...
@@ -2004,31 +2004,6 @@ static BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar, BOOL fShowH, BOOL fShowV
/*************************************************************************
* ShowScrollBar (USER32.@)
*
* Shows or hides the scroll bar.
*
* PARAMS
* hwnd [I] Handle of window with scrollbar(s)
* nBar [I] One of SB_HORZ, SB_VERT, or SB_CTL
* fShow [I] TRUE = show, FALSE = hide
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
ShowScrollBar
(
HWND
hwnd
,
INT
nBar
,
BOOL
fShow
)
{
if
(
!
hwnd
)
return
FALSE
;
SCROLL_ShowScrollBar
(
hwnd
,
nBar
,
(
nBar
==
SB_VERT
)
?
0
:
fShow
,
(
nBar
==
SB_HORZ
)
?
0
:
fShow
);
return
TRUE
;
}
/*************************************************************************
* EnableScrollBar (USER32.@)
*
* Enables or disables the scroll bars.
...
...
dlls/user32/user32.spec
View file @
b4ba6de6
...
...
@@ -739,7 +739,7 @@
@ stdcall ShowCaret(long) NtUserShowCaret
@ stdcall -import ShowCursor(long) NtUserShowCursor
@ stdcall ShowOwnedPopups(long long)
@ stdcall ShowScrollBar(long long long)
@ stdcall ShowScrollBar(long long long)
NtUserShowScrollBar
@ stub ShowStartGlass
@ stdcall ShowWindow(long long) NtUserShowWindow
@ stdcall ShowWindowAsync(long long) NtUserShowWindowAsync
...
...
dlls/win32u/Makefile.in
View file @
b4ba6de6
...
...
@@ -45,6 +45,7 @@ C_SRCS = \
printdrv.c
\
rawinput.c
\
region.c
\
scroll.c
\
spy.c
\
syscall.c
\
sysparams.c
\
...
...
dlls/win32u/gdiobj.c
View file @
b4ba6de6
...
...
@@ -1236,6 +1236,7 @@ static struct unix_funcs unix_funcs =
NtUserSetWindowWord
,
NtUserShowCaret
,
NtUserShowCursor
,
NtUserShowScrollBar
,
NtUserShowWindow
,
NtUserShowWindowAsync
,
NtUserSystemParametersInfo
,
...
...
dlls/win32u/scroll.c
0 → 100644
View file @
b4ba6de6
/*
* Scrollbar control
*
* Copyright 1993 Martin Ayotte
* Copyright 1994, 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "win32u_private.h"
#include "ntuser_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
scroll
);
static
BOOL
show_scroll_bar
(
HWND
hwnd
,
int
bar
,
BOOL
show_horz
,
BOOL
show_vert
)
{
ULONG
old_style
,
set_bits
=
0
,
clear_bits
=
0
;
TRACE
(
"hwnd=%p bar=%d horz=%d, vert=%d
\n
"
,
hwnd
,
bar
,
show_horz
,
show_vert
);
switch
(
bar
)
{
case
SB_CTL
:
NtUserShowWindow
(
hwnd
,
show_horz
?
SW_SHOW
:
SW_HIDE
);
return
TRUE
;
case
SB_BOTH
:
case
SB_HORZ
:
if
(
show_horz
)
set_bits
|=
WS_HSCROLL
;
else
clear_bits
|=
WS_HSCROLL
;
if
(
bar
==
SB_HORZ
)
break
;
/* fall through */
case
SB_VERT
:
if
(
show_vert
)
set_bits
|=
WS_VSCROLL
;
else
clear_bits
|=
WS_VSCROLL
;
break
;
default:
return
FALSE
;
/* Nothing to do! */
}
old_style
=
set_window_style
(
hwnd
,
set_bits
,
clear_bits
);
if
((
old_style
&
clear_bits
)
!=
0
||
(
old_style
&
set_bits
)
!=
set_bits
)
{
/* frame has been changed, let the window redraw itself */
NtUserSetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOACTIVATE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
return
TRUE
;
}
return
FALSE
;
/* no frame changes */
}
/*************************************************************************
* NtUserShowScrollBar (win32u.@)
*/
BOOL
WINAPI
NtUserShowScrollBar
(
HWND
hwnd
,
INT
bar
,
BOOL
show
)
{
if
(
!
hwnd
)
return
FALSE
;
show_scroll_bar
(
hwnd
,
bar
,
bar
==
SB_VERT
?
0
:
show
,
bar
==
SB_HORZ
?
0
:
show
);
return
TRUE
;
}
dlls/win32u/win32u.spec
View file @
b4ba6de6
...
...
@@ -1259,7 +1259,7 @@
@ stdcall -syscall NtUserSetWindowsHookEx(ptr ptr long long ptr long)
@ stdcall NtUserShowCaret(long)
@ stdcall NtUserShowCursor(long)
@ st
ub NtUserShowScrollBar
@ st
dcall NtUserShowScrollBar(long long long)
@ stub NtUserShowSystemCursor
@ stdcall NtUserShowWindow(long long)
@ stdcall NtUserShowWindowAsync(long long)
...
...
dlls/win32u/win32u_private.h
View file @
b4ba6de6
...
...
@@ -310,6 +310,7 @@ struct unix_funcs
WORD
(
WINAPI
*
pNtUserSetWindowWord
)(
HWND
hwnd
,
INT
offset
,
WORD
newval
);
BOOL
(
WINAPI
*
pNtUserShowCaret
)(
HWND
hwnd
);
INT
(
WINAPI
*
pNtUserShowCursor
)(
BOOL
show
);
BOOL
(
WINAPI
*
pNtUserShowScrollBar
)(
HWND
hwnd
,
INT
bar
,
BOOL
show
);
BOOL
(
WINAPI
*
pNtUserShowWindow
)(
HWND
hwnd
,
INT
cmd
);
BOOL
(
WINAPI
*
pNtUserShowWindowAsync
)(
HWND
hwnd
,
INT
cmd
);
BOOL
(
WINAPI
*
pNtUserSystemParametersInfo
)(
UINT
action
,
UINT
val
,
PVOID
ptr
,
UINT
winini
);
...
...
dlls/win32u/wrappers.c
View file @
b4ba6de6
...
...
@@ -1334,6 +1334,12 @@ INT WINAPI NtUserShowCursor( BOOL show )
return
unix_funcs
->
pNtUserShowCursor
(
show
);
}
BOOL
WINAPI
NtUserShowScrollBar
(
HWND
hwnd
,
INT
bar
,
BOOL
show
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtUserShowScrollBar
(
hwnd
,
bar
,
show
);
}
BOOL
WINAPI
NtUserShowWindowAsync
(
HWND
hwnd
,
INT
cmd
)
{
if
(
!
unix_funcs
)
return
FALSE
;
...
...
include/ntuser.h
View file @
b4ba6de6
...
...
@@ -718,6 +718,7 @@ HWINEVENTHOOK WINAPI NtUserSetWinEventHook( DWORD event_min, DWORD event_max, HM
DWORD
pid
,
DWORD
tid
,
DWORD
flags
);
BOOL
WINAPI
NtUserShowCaret
(
HWND
hwnd
);
INT
WINAPI
NtUserShowCursor
(
BOOL
show
);
BOOL
WINAPI
NtUserShowScrollBar
(
HWND
hwnd
,
INT
bar
,
BOOL
show
);
BOOL
WINAPI
NtUserShowWindow
(
HWND
hwnd
,
INT
cmd
);
BOOL
WINAPI
NtUserShowWindowAsync
(
HWND
hwnd
,
INT
cmd
);
BOOL
WINAPI
NtUserSystemParametersInfo
(
UINT
action
,
UINT
val
,
void
*
ptr
,
UINT
winini
);
...
...
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