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

comctl32: Constify some variables.

parent 81a95ff6
......@@ -189,7 +189,7 @@ static int MONTHCAL_CalculateDayOfWeek(DWORD day, DWORD month, DWORD year)
/* From a given point, calculate the row (weekpos), column(daypos)
and day in the calendar. day== 0 mean the last day of tha last month
*/
static int MONTHCAL_CalcDayFromPos(MONTHCAL_INFO *infoPtr, int x, int y,
static int MONTHCAL_CalcDayFromPos(const MONTHCAL_INFO *infoPtr, int x, int y,
int *daypos,int *weekpos)
{
int retval, firstDay;
......@@ -214,7 +214,7 @@ static int MONTHCAL_CalcDayFromPos(MONTHCAL_INFO *infoPtr, int x, int y,
/* day is the day of the month, 1 == 1st day of the month */
/* sets x and y to be the position of the day */
/* x == day, y == week where(0,0) == firstDay, 1st week */
static void MONTHCAL_CalcDayXY(MONTHCAL_INFO *infoPtr, int day, int month,
static void MONTHCAL_CalcDayXY(const MONTHCAL_INFO *infoPtr, int day, int month,
int *x, int *y)
{
int firstDay, prevMonth;
......@@ -243,7 +243,7 @@ static void MONTHCAL_CalcDayXY(MONTHCAL_INFO *infoPtr, int day, int month,
/* x: column(day), y: row(week) */
static void MONTHCAL_CalcDayRect(MONTHCAL_INFO *infoPtr, RECT *r, int x, int y)
static void MONTHCAL_CalcDayRect(const MONTHCAL_INFO *infoPtr, RECT *r, int x, int y)
{
r->left = infoPtr->days.left + x * infoPtr->width_increment;
r->right = r->left + infoPtr->width_increment;
......@@ -255,7 +255,7 @@ static void MONTHCAL_CalcDayRect(MONTHCAL_INFO *infoPtr, RECT *r, int x, int y)
/* sets the RECT struct r to the rectangle around the day and month */
/* day is the day value of the month(1 == 1st), month is the month */
/* value(january == 1, december == 12) */
static inline void MONTHCAL_CalcPosFromDay(MONTHCAL_INFO *infoPtr,
static inline void MONTHCAL_CalcPosFromDay(const MONTHCAL_INFO *infoPtr,
int day, int month, RECT *r)
{
int x, y;
......@@ -267,7 +267,7 @@ static inline void MONTHCAL_CalcPosFromDay(MONTHCAL_INFO *infoPtr,
/* day is the day in the month(1 == 1st of the month) */
/* month is the month value(1 == january, 12 == december) */
static void MONTHCAL_CircleDay(MONTHCAL_INFO *infoPtr, HDC hdc, int day, int month)
static void MONTHCAL_CircleDay(const MONTHCAL_INFO *infoPtr, HDC hdc, int day, int month)
{
HPEN hRedPen = CreatePen(PS_SOLID, 2, RGB(255, 0, 0));
HPEN hOldPen2 = SelectObject(hdc, hRedPen);
......@@ -318,7 +318,7 @@ static void MONTHCAL_CircleDay(MONTHCAL_INFO *infoPtr, HDC hdc, int day, int mon
}
static void MONTHCAL_DrawDay(MONTHCAL_INFO *infoPtr, HDC hdc, int day, int month,
static void MONTHCAL_DrawDay(const MONTHCAL_INFO *infoPtr, HDC hdc, int day, int month,
int x, int y, int bold)
{
static const WCHAR fmtW[] = { '%','d',0 };
......@@ -387,7 +387,7 @@ static void MONTHCAL_DrawDay(MONTHCAL_INFO *infoPtr, HDC hdc, int day, int month
}
static void paint_button (MONTHCAL_INFO *infoPtr, HDC hdc, BOOL btnNext,
static void paint_button (const MONTHCAL_INFO *infoPtr, HDC hdc, BOOL btnNext,
BOOL pressed, RECT* r)
{
HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
......@@ -426,7 +426,7 @@ static void paint_button (MONTHCAL_INFO *infoPtr, HDC hdc, BOOL btnNext,
}
static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, PAINTSTRUCT* ps)
static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps)
{
static const WCHAR todayW[] = { 'T','o','d','a','y',':',0 };
static const WCHAR fmt1W[] = { '%','s',' ','%','l','d',0 };
......@@ -773,7 +773,7 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, PAINTSTRUCT* ps)
static LRESULT
MONTHCAL_GetMinReqRect(MONTHCAL_INFO *infoPtr, LPARAM lParam)
MONTHCAL_GetMinReqRect(const MONTHCAL_INFO *infoPtr, LPARAM lParam)
{
LPRECT lpRect = (LPRECT) lParam;
......@@ -796,7 +796,7 @@ MONTHCAL_GetMinReqRect(MONTHCAL_INFO *infoPtr, LPARAM lParam)
static LRESULT
MONTHCAL_GetColor(MONTHCAL_INFO *infoPtr, WPARAM wParam)
MONTHCAL_GetColor(const MONTHCAL_INFO *infoPtr, WPARAM wParam)
{
TRACE("\n");
......@@ -859,7 +859,7 @@ MONTHCAL_SetColor(MONTHCAL_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
static LRESULT
MONTHCAL_GetMonthDelta(MONTHCAL_INFO *infoPtr)
MONTHCAL_GetMonthDelta(const MONTHCAL_INFO *infoPtr)
{
TRACE("\n");
......@@ -883,7 +883,7 @@ MONTHCAL_SetMonthDelta(MONTHCAL_INFO *infoPtr, WPARAM wParam)
static LRESULT
MONTHCAL_GetFirstDayOfWeek(MONTHCAL_INFO *infoPtr)
MONTHCAL_GetFirstDayOfWeek(const MONTHCAL_INFO *infoPtr)
{
return infoPtr->firstDay;
}
......@@ -919,7 +919,7 @@ MONTHCAL_SetFirstDayOfWeek(MONTHCAL_INFO *infoPtr, LPARAM lParam)
static LRESULT
MONTHCAL_GetMonthRange(MONTHCAL_INFO *infoPtr)
MONTHCAL_GetMonthRange(const MONTHCAL_INFO *infoPtr)
{
TRACE("\n");
......@@ -928,7 +928,7 @@ MONTHCAL_GetMonthRange(MONTHCAL_INFO *infoPtr)
static LRESULT
MONTHCAL_GetMaxTodayWidth(MONTHCAL_INFO *infoPtr)
MONTHCAL_GetMaxTodayWidth(const MONTHCAL_INFO *infoPtr)
{
return(infoPtr->todayrect.right - infoPtr->todayrect.left);
}
......@@ -1003,7 +1003,7 @@ MONTHCAL_GetRange(HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT
MONTHCAL_SetDayState(MONTHCAL_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
MONTHCAL_SetDayState(const MONTHCAL_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
int i, iMonths = (int)wParam;
......@@ -1018,7 +1018,7 @@ MONTHCAL_SetDayState(MONTHCAL_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
}
static LRESULT
MONTHCAL_GetCurSel(MONTHCAL_INFO *infoPtr, LPARAM lParam)
MONTHCAL_GetCurSel(const MONTHCAL_INFO *infoPtr, LPARAM lParam)
{
SYSTEMTIME *lpSel = (SYSTEMTIME *) lParam;
......@@ -1057,7 +1057,7 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, LPARAM lParam)
static LRESULT
MONTHCAL_GetMaxSelCount(MONTHCAL_INFO *infoPtr)
MONTHCAL_GetMaxSelCount(const MONTHCAL_INFO *infoPtr)
{
return infoPtr->maxSelCount;
}
......@@ -1077,7 +1077,7 @@ MONTHCAL_SetMaxSelCount(MONTHCAL_INFO *infoPtr, WPARAM wParam)
static LRESULT
MONTHCAL_GetSelRange(MONTHCAL_INFO *infoPtr, LPARAM lParam)
MONTHCAL_GetSelRange(const MONTHCAL_INFO *infoPtr, LPARAM lParam)
{
SYSTEMTIME *lprgSysTimeArray = (SYSTEMTIME *) lParam;
......@@ -1123,7 +1123,7 @@ MONTHCAL_SetSelRange(MONTHCAL_INFO *infoPtr, LPARAM lParam)
static LRESULT
MONTHCAL_GetToday(MONTHCAL_INFO *infoPtr, LPARAM lParam)
MONTHCAL_GetToday(const MONTHCAL_INFO *infoPtr, LPARAM lParam)
{
SYSTEMTIME *lpToday = (SYSTEMTIME *) lParam;
......@@ -1154,7 +1154,7 @@ MONTHCAL_SetToday(MONTHCAL_INFO *infoPtr, LPARAM lParam)
static LRESULT
MONTHCAL_HitTest(MONTHCAL_INFO *infoPtr, LPARAM lParam)
MONTHCAL_HitTest(const MONTHCAL_INFO *infoPtr, LPARAM lParam)
{
PMCHITTESTINFO lpht = (PMCHITTESTINFO)lParam;
UINT x,y;
......@@ -1693,7 +1693,7 @@ MONTHCAL_Paint(MONTHCAL_INFO *infoPtr, WPARAM wParam)
static LRESULT
MONTHCAL_KillFocus(MONTHCAL_INFO *infoPtr)
MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr)
{
TRACE("\n");
......@@ -1704,7 +1704,7 @@ MONTHCAL_KillFocus(MONTHCAL_INFO *infoPtr)
static LRESULT
MONTHCAL_SetFocus(MONTHCAL_INFO *infoPtr)
MONTHCAL_SetFocus(const MONTHCAL_INFO *infoPtr)
{
TRACE("\n");
......@@ -1821,7 +1821,7 @@ static LRESULT MONTHCAL_Size(MONTHCAL_INFO *infoPtr, int Width, int Height)
return 0;
}
static LRESULT MONTHCAL_GetFont(MONTHCAL_INFO *infoPtr)
static LRESULT MONTHCAL_GetFont(const MONTHCAL_INFO *infoPtr)
{
return (LRESULT)infoPtr->hFont;
}
......@@ -1847,7 +1847,7 @@ static LRESULT MONTHCAL_SetFont(MONTHCAL_INFO *infoPtr, HFONT hFont, BOOL redraw
}
/* update theme after a WM_THEMECHANGED message */
static LRESULT theme_changed (MONTHCAL_INFO* infoPtr)
static LRESULT theme_changed (const MONTHCAL_INFO* infoPtr)
{
HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
CloseThemeData (theme);
......
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