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
58ec9888
Commit
58ec9888
authored
Apr 02, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Apr 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Constify some variables.
parent
51ee4971
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
30 deletions
+29
-30
trackbar.c
dlls/comctl32/trackbar.c
+29
-30
No files found.
dlls/comctl32/trackbar.c
View file @
58ec9888
...
...
@@ -103,14 +103,14 @@ typedef struct
static
const
WCHAR
themeClass
[]
=
{
'T'
,
'r'
,
'a'
,
'c'
,
'k'
,
'b'
,
'a'
,
'r'
,
0
};
static
inline
int
notify_customdraw
(
TRACKBAR_INFO
*
infoPtr
,
NMCUSTOMDRAW
*
pnmcd
,
int
stage
)
notify_customdraw
(
const
TRACKBAR_INFO
*
infoPtr
,
NMCUSTOMDRAW
*
pnmcd
,
int
stage
)
{
pnmcd
->
dwDrawStage
=
stage
;
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
pnmcd
->
hdr
.
idFrom
,
(
LPARAM
)
pnmcd
);
}
static
LRESULT
notify_hdr
(
TRACKBAR_INFO
*
infoPtr
,
INT
code
,
LPNMHDR
pnmh
)
static
LRESULT
notify_hdr
(
const
TRACKBAR_INFO
*
infoPtr
,
INT
code
,
LPNMHDR
pnmh
)
{
LRESULT
result
;
...
...
@@ -127,14 +127,14 @@ static LRESULT notify_hdr(TRACKBAR_INFO *infoPtr, INT code, LPNMHDR pnmh)
return
result
;
}
static
inline
int
notify
(
TRACKBAR_INFO
*
infoPtr
,
INT
code
)
static
inline
int
notify
(
const
TRACKBAR_INFO
*
infoPtr
,
INT
code
)
{
NMHDR
nmh
;
return
notify_hdr
(
infoPtr
,
code
,
&
nmh
);
}
static
BOOL
notify_with_scroll
(
TRACKBAR_INFO
*
infoPtr
,
UINT
code
)
notify_with_scroll
(
const
TRACKBAR_INFO
*
infoPtr
,
UINT
code
)
{
BOOL
bVert
=
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
)
&
TBS_VERT
;
...
...
@@ -179,8 +179,7 @@ static void TRACKBAR_RecalculateTics (TRACKBAR_INFO *infoPtr)
(in range of trackbar) */
static
inline
LONG
TRACKBAR_ConvertPlaceToPosition
(
TRACKBAR_INFO
*
infoPtr
,
int
place
,
int
vertical
)
TRACKBAR_ConvertPlaceToPosition
(
const
TRACKBAR_INFO
*
infoPtr
,
int
place
,
int
vertical
)
{
double
range
,
width
,
pos
,
offsetthumb
;
...
...
@@ -207,7 +206,7 @@ TRACKBAR_ConvertPlaceToPosition (TRACKBAR_INFO *infoPtr, int place,
/* return: 0> prev, 0 none, >0 next */
static
LONG
TRACKBAR_GetAutoPageDirection
(
TRACKBAR_INFO
*
infoPtr
,
POINT
clickPoint
)
TRACKBAR_GetAutoPageDirection
(
const
TRACKBAR_INFO
*
infoPtr
,
POINT
clickPoint
)
{
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
);
RECT
pageRect
;
...
...
@@ -334,7 +333,7 @@ TRACKBAR_CalcChannel (TRACKBAR_INFO *infoPtr)
}
static
void
TRACKBAR_CalcThumb
(
TRACKBAR_INFO
*
infoPtr
,
LONG
lPos
,
RECT
*
thumb
)
TRACKBAR_CalcThumb
(
const
TRACKBAR_INFO
*
infoPtr
,
LONG
lPos
,
RECT
*
thumb
)
{
int
range
,
width
,
height
,
thumbwidth
;
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
);
...
...
@@ -381,13 +380,13 @@ TRACKBAR_UpdateThumb (TRACKBAR_INFO *infoPtr)
}
static
inline
void
TRACKBAR_InvalidateAll
(
TRACKBAR_INFO
*
infoPtr
)
TRACKBAR_InvalidateAll
(
const
TRACKBAR_INFO
*
infoPtr
)
{
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
}
static
void
TRACKBAR_InvalidateThumb
(
TRACKBAR_INFO
*
infoPtr
,
LONG
thumbPos
)
TRACKBAR_InvalidateThumb
(
const
TRACKBAR_INFO
*
infoPtr
,
LONG
thumbPos
)
{
RECT
rcThumb
;
...
...
@@ -397,7 +396,7 @@ TRACKBAR_InvalidateThumb (TRACKBAR_INFO *infoPtr, LONG thumbPos)
}
static
inline
void
TRACKBAR_InvalidateThumbMove
(
TRACKBAR_INFO
*
infoPtr
,
LONG
oldPos
,
LONG
newPos
)
TRACKBAR_InvalidateThumbMove
(
const
TRACKBAR_INFO
*
infoPtr
,
LONG
oldPos
,
LONG
newPos
)
{
TRACKBAR_InvalidateThumb
(
infoPtr
,
oldPos
);
if
(
newPos
!=
oldPos
)
...
...
@@ -405,7 +404,7 @@ TRACKBAR_InvalidateThumbMove (TRACKBAR_INFO *infoPtr, LONG oldPos, LONG newPos)
}
static
inline
BOOL
TRACKBAR_HasSelection
(
TRACKBAR_INFO
*
infoPtr
)
TRACKBAR_HasSelection
(
const
TRACKBAR_INFO
*
infoPtr
)
{
return
infoPtr
->
lSelMin
!=
infoPtr
->
lSelMax
;
}
...
...
@@ -468,7 +467,7 @@ TRACKBAR_AutoPage (TRACKBAR_INFO *infoPtr, POINT clickPoint)
/* Trackbar drawing code. I like my spaghetti done milanese. */
static
void
TRACKBAR_DrawChannel
(
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
DWORD
dwStyle
)
TRACKBAR_DrawChannel
(
const
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
DWORD
dwStyle
)
{
RECT
rcChannel
=
infoPtr
->
rcChannel
;
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwndSelf
);
...
...
@@ -491,7 +490,7 @@ TRACKBAR_DrawChannel (TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle)
}
static
void
TRACKBAR_DrawOneTic
(
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
LONG
ticPos
,
int
flags
)
TRACKBAR_DrawOneTic
(
const
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
LONG
ticPos
,
int
flags
)
{
int
x
,
y
,
ox
,
oy
,
range
,
side
,
indent
=
0
,
len
=
3
;
int
offsetthumb
;
...
...
@@ -566,7 +565,7 @@ TRACKBAR_DrawOneTic (TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos, int flags)
static
inline
void
TRACKBAR_DrawTic
(
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
LONG
ticPos
,
int
flags
)
TRACKBAR_DrawTic
(
const
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
LONG
ticPos
,
int
flags
)
{
if
((
flags
&
(
TBS_LEFT
|
TBS_TOP
))
||
(
flags
&
TBS_BOTH
))
TRACKBAR_DrawOneTic
(
infoPtr
,
hdc
,
ticPos
,
flags
|
TBS_LEFT
);
...
...
@@ -576,7 +575,7 @@ TRACKBAR_DrawTic (TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos, int flags)
}
static
void
TRACKBAR_DrawTics
(
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
DWORD
dwStyle
)
TRACKBAR_DrawTics
(
const
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
DWORD
dwStyle
)
{
unsigned
int
i
;
int
ticFlags
=
dwStyle
&
0x0f
;
...
...
@@ -615,7 +614,7 @@ TRACKBAR_DrawTics (TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle)
}
static
void
TRACKBAR_DrawThumb
(
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
DWORD
dwStyle
)
TRACKBAR_DrawThumb
(
const
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
,
DWORD
dwStyle
)
{
HBRUSH
oldbr
;
HPEN
oldpen
;
...
...
@@ -758,7 +757,7 @@ TRACKBAR_DrawThumb(TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle)
static
inline
void
TRACKBAR_ActivateToolTip
(
TRACKBAR_INFO
*
infoPtr
,
BOOL
fShow
)
TRACKBAR_ActivateToolTip
(
const
TRACKBAR_INFO
*
infoPtr
,
BOOL
fShow
)
{
TTTOOLINFOW
ti
;
...
...
@@ -773,7 +772,7 @@ TRACKBAR_ActivateToolTip (TRACKBAR_INFO *infoPtr, BOOL fShow)
static
void
TRACKBAR_UpdateToolTip
(
TRACKBAR_INFO
*
infoPtr
)
TRACKBAR_UpdateToolTip
(
const
TRACKBAR_INFO
*
infoPtr
)
{
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
);
WCHAR
buf
[
80
];
...
...
@@ -942,7 +941,7 @@ cleanup:
static
void
TRACKBAR_AlignBuddies
(
TRACKBAR_INFO
*
infoPtr
)
TRACKBAR_AlignBuddies
(
const
TRACKBAR_INFO
*
infoPtr
)
{
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
);
HWND
hwndParent
=
GetParent
(
infoPtr
->
hwndSelf
);
...
...
@@ -1023,7 +1022,7 @@ TRACKBAR_ClearTics (TRACKBAR_INFO *infoPtr, BOOL fRedraw)
static
inline
LRESULT
TRACKBAR_GetChannelRect
(
TRACKBAR_INFO
*
infoPtr
,
LPRECT
lprc
)
TRACKBAR_GetChannelRect
(
const
TRACKBAR_INFO
*
infoPtr
,
LPRECT
lprc
)
{
if
(
lprc
==
NULL
)
return
0
;
...
...
@@ -1037,7 +1036,7 @@ TRACKBAR_GetChannelRect (TRACKBAR_INFO *infoPtr, LPRECT lprc)
static
inline
LONG
TRACKBAR_GetNumTics
(
TRACKBAR_INFO
*
infoPtr
)
TRACKBAR_GetNumTics
(
const
TRACKBAR_INFO
*
infoPtr
)
{
if
(
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
)
&
TBS_NOTICKS
)
return
0
;
...
...
@@ -1049,7 +1048,7 @@ TRACKBAR_GetNumTics (TRACKBAR_INFO *infoPtr)
}
static
int
comp_tics
(
const
void
*
ap
,
const
void
*
bp
)
static
int
comp_tics
(
const
void
*
ap
,
const
void
*
bp
)
{
const
DWORD
a
=
*
(
const
DWORD
*
)
ap
;
const
DWORD
b
=
*
(
const
DWORD
*
)
bp
;
...
...
@@ -1062,7 +1061,7 @@ static int comp_tics(const void *ap, const void *bp)
static
inline
LONG
TRACKBAR_GetTic
(
TRACKBAR_INFO
*
infoPtr
,
INT
iTic
)
TRACKBAR_GetTic
(
const
TRACKBAR_INFO
*
infoPtr
,
INT
iTic
)
{
if
((
iTic
<
0
)
||
(
iTic
>=
infoPtr
->
uNumTics
)
||
!
infoPtr
->
tics
)
return
-
1
;
...
...
@@ -1073,7 +1072,7 @@ TRACKBAR_GetTic (TRACKBAR_INFO *infoPtr, INT iTic)
static
inline
LONG
TRACKBAR_GetTicPos
(
TRACKBAR_INFO
*
infoPtr
,
INT
iTic
)
TRACKBAR_GetTicPos
(
const
TRACKBAR_INFO
*
infoPtr
,
INT
iTic
)
{
LONG
range
,
width
,
pos
,
tic
;
int
offsetthumb
;
...
...
@@ -1393,7 +1392,7 @@ TRACKBAR_InitializeThumb (TRACKBAR_INFO *infoPtr)
static
LRESULT
TRACKBAR_Create
(
HWND
hwnd
,
LPCREATESTRUCTW
lpcs
)
TRACKBAR_Create
(
HWND
hwnd
,
const
CREATESTRUCTW
*
lpcs
)
{
TRACKBAR_INFO
*
infoPtr
;
DWORD
dwStyle
;
...
...
@@ -1525,7 +1524,7 @@ TRACKBAR_LButtonUp (TRACKBAR_INFO *infoPtr, DWORD fwKeys, INT x, INT y)
static
LRESULT
TRACKBAR_CaptureChanged
(
TRACKBAR_INFO
*
infoPtr
)
TRACKBAR_CaptureChanged
(
const
TRACKBAR_INFO
*
infoPtr
)
{
notify_with_scroll
(
infoPtr
,
TB_ENDTRACK
);
return
0
;
...
...
@@ -1570,7 +1569,7 @@ TRACKBAR_Size (TRACKBAR_INFO *infoPtr, DWORD fwSizeType, INT nWidth, INT nHeight
static
LRESULT
TRACKBAR_Timer
(
TRACKBAR_INFO
*
infoPtr
,
INT
wTimerID
,
TIMERPROC
*
tmrpc
)
TRACKBAR_Timer
(
TRACKBAR_INFO
*
infoPtr
,
INT
wTimerID
,
const
TIMERPROC
*
tmrpc
)
{
if
(
infoPtr
->
flags
&
TB_AUTO_PAGE
)
{
POINT
pt
;
...
...
@@ -1583,7 +1582,7 @@ TRACKBAR_Timer (TRACKBAR_INFO *infoPtr, INT wTimerID, TIMERPROC *tmrpc)
/* update theme after a WM_THEMECHANGED message */
static
LRESULT
theme_changed
(
TRACKBAR_INFO
*
infoPtr
)
static
LRESULT
theme_changed
(
const
TRACKBAR_INFO
*
infoPtr
)
{
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwndSelf
);
CloseThemeData
(
theme
);
...
...
@@ -1713,7 +1712,7 @@ TRACKBAR_KeyDown (TRACKBAR_INFO *infoPtr, INT nVirtKey, DWORD lKeyData)
static
inline
BOOL
TRACKBAR_KeyUp
(
TRACKBAR_INFO
*
infoPtr
,
INT
nVirtKey
,
DWORD
lKeyData
)
TRACKBAR_KeyUp
(
const
TRACKBAR_INFO
*
infoPtr
,
INT
nVirtKey
,
DWORD
lKeyData
)
{
switch
(
nVirtKey
)
{
case
VK_LEFT
:
...
...
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