Commit f44cb11a authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

comctl32: Constify some variables.

parent bd51f1c9
...@@ -68,7 +68,7 @@ typedef struct tagSMOOTHSCROLLSTRUCT { ...@@ -68,7 +68,7 @@ typedef struct tagSMOOTHSCROLLSTRUCT {
* Currently only scrolls ONCE. The comctl32 implementation uses GetTickCount * Currently only scrolls ONCE. The comctl32 implementation uses GetTickCount
* and what else to do smooth scrolling. * and what else to do smooth scrolling.
*/ */
BOOL WINAPI SmoothScrollWindow( SMOOTHSCROLLSTRUCT *smooth ) { BOOL WINAPI SmoothScrollWindow( const SMOOTHSCROLLSTRUCT *smooth ) {
LPRECT lpupdaterect = smooth->lpupdaterect; LPRECT lpupdaterect = smooth->lpupdaterect;
HRGN hrgnupdate = smooth->hrgnupdate; HRGN hrgnupdate = smooth->hrgnupdate;
RECT tmprect; RECT tmprect;
......
...@@ -168,7 +168,7 @@ STATUSBAR_DrawSizeGrip (HTHEME theme, HDC hdc, LPRECT lpRect) ...@@ -168,7 +168,7 @@ STATUSBAR_DrawSizeGrip (HTHEME theme, HDC hdc, LPRECT lpRect)
static void static void
STATUSBAR_DrawPart (STATUS_INFO *infoPtr, HDC hdc, STATUSWINDOWPART *part, int itemID) STATUSBAR_DrawPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
{ {
RECT r = part->bound; RECT r = part->bound;
UINT border = BDR_SUNKENOUTER; UINT border = BDR_SUNKENOUTER;
...@@ -215,7 +215,7 @@ STATUSBAR_DrawPart (STATUS_INFO *infoPtr, HDC hdc, STATUSWINDOWPART *part, int i ...@@ -215,7 +215,7 @@ STATUSBAR_DrawPart (STATUS_INFO *infoPtr, HDC hdc, STATUSWINDOWPART *part, int i
static void static void
STATUSBAR_RefreshPart (STATUS_INFO *infoPtr, HDC hdc, STATUSWINDOWPART *part, int itemID) STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
{ {
HBRUSH hbrBk; HBRUSH hbrBk;
HFONT hOldFont; HFONT hOldFont;
...@@ -357,7 +357,7 @@ STATUSBAR_SetPartBounds (STATUS_INFO *infoPtr) ...@@ -357,7 +357,7 @@ STATUSBAR_SetPartBounds (STATUS_INFO *infoPtr)
static LRESULT static LRESULT
STATUSBAR_Relay2Tip (STATUS_INFO *infoPtr, UINT uMsg, STATUSBAR_Relay2Tip (const STATUS_INFO *infoPtr, UINT uMsg,
WPARAM wParam, LPARAM lParam) WPARAM wParam, LPARAM lParam)
{ {
MSG msg; MSG msg;
...@@ -375,7 +375,7 @@ STATUSBAR_Relay2Tip (STATUS_INFO *infoPtr, UINT uMsg, ...@@ -375,7 +375,7 @@ STATUSBAR_Relay2Tip (STATUS_INFO *infoPtr, UINT uMsg,
static BOOL static BOOL
STATUSBAR_GetBorders (STATUS_INFO *infoPtr, INT out[]) STATUSBAR_GetBorders (const STATUS_INFO *infoPtr, INT out[])
{ {
TRACE("\n"); TRACE("\n");
out[0] = infoPtr->horizontalBorder; out[0] = infoPtr->horizontalBorder;
...@@ -387,7 +387,7 @@ STATUSBAR_GetBorders (STATUS_INFO *infoPtr, INT out[]) ...@@ -387,7 +387,7 @@ STATUSBAR_GetBorders (STATUS_INFO *infoPtr, INT out[])
static BOOL static BOOL
STATUSBAR_SetBorders (STATUS_INFO *infoPtr, INT in[]) STATUSBAR_SetBorders (STATUS_INFO *infoPtr, const INT in[])
{ {
TRACE("\n"); TRACE("\n");
infoPtr->horizontalBorder = in[0]; infoPtr->horizontalBorder = in[0];
...@@ -400,7 +400,7 @@ STATUSBAR_SetBorders (STATUS_INFO *infoPtr, INT in[]) ...@@ -400,7 +400,7 @@ STATUSBAR_SetBorders (STATUS_INFO *infoPtr, INT in[])
static HICON static HICON
STATUSBAR_GetIcon (STATUS_INFO *infoPtr, INT nPart) STATUSBAR_GetIcon (const STATUS_INFO *infoPtr, INT nPart)
{ {
TRACE("%d\n", nPart); TRACE("%d\n", nPart);
/* MSDN says: "simple parts are indexed with -1" */ /* MSDN says: "simple parts are indexed with -1" */
...@@ -415,7 +415,7 @@ STATUSBAR_GetIcon (STATUS_INFO *infoPtr, INT nPart) ...@@ -415,7 +415,7 @@ STATUSBAR_GetIcon (STATUS_INFO *infoPtr, INT nPart)
static INT static INT
STATUSBAR_GetParts (STATUS_INFO *infoPtr, INT num_parts, INT parts[]) STATUSBAR_GetParts (const STATUS_INFO *infoPtr, INT num_parts, INT parts[])
{ {
INT i; INT i;
...@@ -430,7 +430,7 @@ STATUSBAR_GetParts (STATUS_INFO *infoPtr, INT num_parts, INT parts[]) ...@@ -430,7 +430,7 @@ STATUSBAR_GetParts (STATUS_INFO *infoPtr, INT num_parts, INT parts[])
static BOOL static BOOL
STATUSBAR_GetRect (STATUS_INFO *infoPtr, INT nPart, LPRECT rect) STATUSBAR_GetRect (const STATUS_INFO *infoPtr, INT nPart, LPRECT rect)
{ {
TRACE("part %d\n", nPart); TRACE("part %d\n", nPart);
if(nPart >= infoPtr->numParts || nPart < 0) if(nPart >= infoPtr->numParts || nPart < 0)
...@@ -524,7 +524,7 @@ STATUSBAR_GetTextLength (STATUS_INFO *infoPtr, INT nPart) ...@@ -524,7 +524,7 @@ STATUSBAR_GetTextLength (STATUS_INFO *infoPtr, INT nPart)
} }
static LRESULT static LRESULT
STATUSBAR_GetTipTextA (STATUS_INFO *infoPtr, INT id, LPSTR tip, INT size) STATUSBAR_GetTipTextA (const STATUS_INFO *infoPtr, INT id, LPSTR tip, INT size)
{ {
TRACE("\n"); TRACE("\n");
if (tip) { if (tip) {
...@@ -546,7 +546,7 @@ STATUSBAR_GetTipTextA (STATUS_INFO *infoPtr, INT id, LPSTR tip, INT size) ...@@ -546,7 +546,7 @@ STATUSBAR_GetTipTextA (STATUS_INFO *infoPtr, INT id, LPSTR tip, INT size)
static LRESULT static LRESULT
STATUSBAR_GetTipTextW (STATUS_INFO *infoPtr, INT id, LPWSTR tip, INT size) STATUSBAR_GetTipTextW (const STATUS_INFO *infoPtr, INT id, LPWSTR tip, INT size)
{ {
TRACE("\n"); TRACE("\n");
if (tip) { if (tip) {
...@@ -793,7 +793,7 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style, ...@@ -793,7 +793,7 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style,
static LRESULT static LRESULT
STATUSBAR_SetTipTextA (STATUS_INFO *infoPtr, INT id, LPSTR text) STATUSBAR_SetTipTextA (const STATUS_INFO *infoPtr, INT id, LPSTR text)
{ {
TRACE("part %d: \"%s\"\n", id, text); TRACE("part %d: \"%s\"\n", id, text);
if (infoPtr->hwndToolTip) { if (infoPtr->hwndToolTip) {
...@@ -811,7 +811,7 @@ STATUSBAR_SetTipTextA (STATUS_INFO *infoPtr, INT id, LPSTR text) ...@@ -811,7 +811,7 @@ STATUSBAR_SetTipTextA (STATUS_INFO *infoPtr, INT id, LPSTR text)
static LRESULT static LRESULT
STATUSBAR_SetTipTextW (STATUS_INFO *infoPtr, INT id, LPWSTR text) STATUSBAR_SetTipTextW (const STATUS_INFO *infoPtr, INT id, LPWSTR text)
{ {
TRACE("part %d: \"%s\"\n", id, debugstr_w(text)); TRACE("part %d: \"%s\"\n", id, debugstr_w(text));
if (infoPtr->hwndToolTip) { if (infoPtr->hwndToolTip) {
...@@ -892,7 +892,7 @@ STATUSBAR_WMDestroy (STATUS_INFO *infoPtr) ...@@ -892,7 +892,7 @@ STATUSBAR_WMDestroy (STATUS_INFO *infoPtr)
static LRESULT static LRESULT
STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate) STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate)
{ {
STATUS_INFO *infoPtr; STATUS_INFO *infoPtr;
NONCLIENTMETRICSW nclm; NONCLIENTMETRICSW nclm;
...@@ -1048,7 +1048,7 @@ create_fail: ...@@ -1048,7 +1048,7 @@ create_fail:
/* in contrast to SB_GETTEXT*, WM_GETTEXT handles the text /* in contrast to SB_GETTEXT*, WM_GETTEXT handles the text
* of the first part only (usual behaviour) */ * of the first part only (usual behaviour) */
static INT static INT
STATUSBAR_WMGetText (STATUS_INFO *infoPtr, INT size, LPWSTR buf) STATUSBAR_WMGetText (const STATUS_INFO *infoPtr, INT size, LPWSTR buf)
{ {
INT len; INT len;
...@@ -1074,7 +1074,7 @@ STATUSBAR_WMGetText (STATUS_INFO *infoPtr, INT size, LPWSTR buf) ...@@ -1074,7 +1074,7 @@ STATUSBAR_WMGetText (STATUS_INFO *infoPtr, INT size, LPWSTR buf)
static BOOL static BOOL
STATUSBAR_WMNCHitTest (STATUS_INFO *infoPtr, INT x, INT y) STATUSBAR_WMNCHitTest (const STATUS_INFO *infoPtr, INT x, INT y)
{ {
if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP) { if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP) {
RECT rect; RECT rect;
...@@ -1125,7 +1125,7 @@ STATUSBAR_WMSetFont (STATUS_INFO *infoPtr, HFONT font, BOOL redraw) ...@@ -1125,7 +1125,7 @@ STATUSBAR_WMSetFont (STATUS_INFO *infoPtr, HFONT font, BOOL redraw)
static BOOL static BOOL
STATUSBAR_WMSetText (STATUS_INFO *infoPtr, LPCSTR text) STATUSBAR_WMSetText (const STATUS_INFO *infoPtr, LPCSTR text)
{ {
STATUSWINDOWPART *part; STATUSWINDOWPART *part;
int len; int len;
...@@ -1190,7 +1190,7 @@ STATUSBAR_WMSize (STATUS_INFO *infoPtr, WORD flags) ...@@ -1190,7 +1190,7 @@ STATUSBAR_WMSize (STATUS_INFO *infoPtr, WORD flags)
/* update theme after a WM_THEMECHANGED message */ /* update theme after a WM_THEMECHANGED message */
static LRESULT theme_changed (STATUS_INFO* infoPtr) static LRESULT theme_changed (const STATUS_INFO* infoPtr)
{ {
HTHEME theme = GetWindowTheme (infoPtr->Self); HTHEME theme = GetWindowTheme (infoPtr->Self);
CloseThemeData (theme); CloseThemeData (theme);
...@@ -1211,7 +1211,7 @@ STATUSBAR_NotifyFormat (STATUS_INFO *infoPtr, HWND from, INT cmd) ...@@ -1211,7 +1211,7 @@ STATUSBAR_NotifyFormat (STATUS_INFO *infoPtr, HWND from, INT cmd)
static LRESULT static LRESULT
STATUSBAR_SendNotify (STATUS_INFO *infoPtr, UINT code) STATUSBAR_SendNotify (const STATUS_INFO *infoPtr, UINT code)
{ {
NMHDR nmhdr; NMHDR nmhdr;
......
...@@ -427,7 +427,7 @@ LPSTR WINAPI StrStrIA(LPCSTR lpszStr, LPCSTR lpszSearch) ...@@ -427,7 +427,7 @@ LPSTR WINAPI StrStrIA(LPCSTR lpszStr, LPCSTR lpszSearch)
* The signed integer value represented by the string, or 0 if no integer is * The signed integer value represented by the string, or 0 if no integer is
* present. * present.
*/ */
INT WINAPI StrToIntA (LPSTR lpszStr) INT WINAPI StrToIntA (LPCSTR lpszStr)
{ {
return atoi(lpszStr); return atoi(lpszStr);
} }
...@@ -449,7 +449,7 @@ LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch) ...@@ -449,7 +449,7 @@ LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
* *
* See StrToIntA. * See StrToIntA.
*/ */
INT WINAPI StrToIntW (LPWSTR lpString) INT WINAPI StrToIntW (LPCWSTR lpString)
{ {
return atoiW(lpString); return atoiW(lpString);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment