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
b84348c4
Commit
b84348c4
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
3c9f867f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
updown.c
dlls/comctl32/updown.c
+11
-11
No files found.
dlls/comctl32/updown.c
View file @
b84348c4
...
...
@@ -108,7 +108,7 @@ static void UPDOWN_DoAction (UPDOWN_INFO *infoPtr, int delta, int action);
* UPDOWN_IsBuddyEdit
* Tests if our buddy is an edit control.
*/
static
inline
BOOL
UPDOWN_IsBuddyEdit
(
UPDOWN_INFO
*
infoPtr
)
static
inline
BOOL
UPDOWN_IsBuddyEdit
(
const
UPDOWN_INFO
*
infoPtr
)
{
return
infoPtr
->
BuddyType
==
BUDDY_TYPE_EDIT
;
}
...
...
@@ -117,7 +117,7 @@ static inline BOOL UPDOWN_IsBuddyEdit(UPDOWN_INFO *infoPtr)
* UPDOWN_IsBuddyListbox
* Tests if our buddy is a listbox control.
*/
static
inline
BOOL
UPDOWN_IsBuddyListbox
(
UPDOWN_INFO
*
infoPtr
)
static
inline
BOOL
UPDOWN_IsBuddyListbox
(
const
UPDOWN_INFO
*
infoPtr
)
{
return
infoPtr
->
BuddyType
==
BUDDY_TYPE_LISTBOX
;
}
...
...
@@ -126,7 +126,7 @@ static inline BOOL UPDOWN_IsBuddyListbox(UPDOWN_INFO *infoPtr)
* UPDOWN_InBounds
* Tests if a given value 'val' is between the Min&Max limits
*/
static
BOOL
UPDOWN_InBounds
(
UPDOWN_INFO
*
infoPtr
,
int
val
)
static
BOOL
UPDOWN_InBounds
(
const
UPDOWN_INFO
*
infoPtr
,
int
val
)
{
if
(
infoPtr
->
MaxVal
>
infoPtr
->
MinVal
)
return
(
infoPtr
->
MinVal
<=
val
)
&&
(
val
<=
infoPtr
->
MaxVal
);
...
...
@@ -162,7 +162,7 @@ static BOOL UPDOWN_OffsetVal(UPDOWN_INFO *infoPtr, int delta)
* When we have a buddy set and that we are aligned on our buddy, we
* want to draw a sunken edge to make like we are part of that control.
*/
static
BOOL
UPDOWN_HasBuddyBorder
(
UPDOWN_INFO
*
infoPtr
)
static
BOOL
UPDOWN_HasBuddyBorder
(
const
UPDOWN_INFO
*
infoPtr
)
{
return
(
((
infoPtr
->
dwStyle
&
(
UDS_ALIGNLEFT
|
UDS_ALIGNRIGHT
))
!=
0
)
&&
UPDOWN_IsBuddyEdit
(
infoPtr
)
);
...
...
@@ -176,7 +176,7 @@ static BOOL UPDOWN_HasBuddyBorder(UPDOWN_INFO* infoPtr)
* FLAG_DECR to get the "decrement" rect (down or left)
* If both flags are pressent, the envelope is returned.
*/
static
void
UPDOWN_GetArrowRect
(
UPDOWN_INFO
*
infoPtr
,
RECT
*
rect
,
int
arrow
)
static
void
UPDOWN_GetArrowRect
(
const
UPDOWN_INFO
*
infoPtr
,
RECT
*
rect
,
int
arrow
)
{
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
Self
);
const
int
border
=
theme
?
DEFAULT_BUDDYBORDER_THEMED
:
DEFAULT_BUDDYBORDER
;
...
...
@@ -228,7 +228,7 @@ static void UPDOWN_GetArrowRect (UPDOWN_INFO* infoPtr, RECT *rect, int arrow)
* If it returns the up rect, it returns FLAG_INCR.
* If it returns the down rect, it returns FLAG_DECR.
*/
static
INT
UPDOWN_GetArrowFromPoint
(
UPDOWN_INFO
*
infoPtr
,
RECT
*
rect
,
POINT
pt
)
static
INT
UPDOWN_GetArrowFromPoint
(
const
UPDOWN_INFO
*
infoPtr
,
RECT
*
rect
,
POINT
pt
)
{
UPDOWN_GetArrowRect
(
infoPtr
,
rect
,
FLAG_INCR
);
if
(
PtInRect
(
rect
,
pt
))
return
FLAG_INCR
;
...
...
@@ -306,7 +306,7 @@ static BOOL UPDOWN_GetBuddyInt (UPDOWN_INFO *infoPtr)
* TRUE - if it set the caption of the buddy successfully
* FALSE - if an error occurred
*/
static
BOOL
UPDOWN_SetBuddyInt
(
UPDOWN_INFO
*
infoPtr
)
static
BOOL
UPDOWN_SetBuddyInt
(
const
UPDOWN_INFO
*
infoPtr
)
{
WCHAR
fmt
[
3
]
=
{
'%'
,
'd'
,
'\0'
};
WCHAR
txt
[
20
];
...
...
@@ -352,7 +352,7 @@ static BOOL UPDOWN_SetBuddyInt (UPDOWN_INFO *infoPtr)
*
* Draw buddy background for visual integration.
*/
static
BOOL
UPDOWN_DrawBuddyBackground
(
UPDOWN_INFO
*
infoPtr
,
HDC
hdc
)
static
BOOL
UPDOWN_DrawBuddyBackground
(
const
UPDOWN_INFO
*
infoPtr
,
HDC
hdc
)
{
RECT
br
;
HTHEME
buddyTheme
=
GetWindowTheme
(
infoPtr
->
Buddy
);
...
...
@@ -370,7 +370,7 @@ static BOOL UPDOWN_DrawBuddyBackground (UPDOWN_INFO *infoPtr, HDC hdc)
*
* Draw the arrows. The background need not be erased.
*/
static
LRESULT
UPDOWN_Draw
(
UPDOWN_INFO
*
infoPtr
,
HDC
hdc
)
static
LRESULT
UPDOWN_Draw
(
const
UPDOWN_INFO
*
infoPtr
,
HDC
hdc
)
{
BOOL
uPressed
,
uHot
,
dPressed
,
dHot
;
RECT
rect
;
...
...
@@ -437,7 +437,7 @@ static LRESULT UPDOWN_Draw (UPDOWN_INFO *infoPtr, HDC hdc)
* Asynchronous drawing (must ONLY be used in WM_PAINT).
* Calls UPDOWN_Draw.
*/
static
LRESULT
UPDOWN_Paint
(
UPDOWN_INFO
*
infoPtr
,
HDC
hdc
)
static
LRESULT
UPDOWN_Paint
(
const
UPDOWN_INFO
*
infoPtr
,
HDC
hdc
)
{
PAINTSTRUCT
ps
;
if
(
hdc
)
return
UPDOWN_Draw
(
infoPtr
,
hdc
);
...
...
@@ -650,7 +650,7 @@ static void UPDOWN_DoAction (UPDOWN_INFO *infoPtr, int delta, int action)
* Returns TRUE if it is enabled as well as its buddy (if any)
* FALSE otherwise
*/
static
BOOL
UPDOWN_IsEnabled
(
UPDOWN_INFO
*
infoPtr
)
static
BOOL
UPDOWN_IsEnabled
(
const
UPDOWN_INFO
*
infoPtr
)
{
if
(
!
IsWindowEnabled
(
infoPtr
->
Self
))
return
FALSE
;
...
...
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