Fixed some of the issues reported by winapi-check.
[wine] / include / monthcal.h
1 /*
2  * Month calendar class extra info
3  *
4  * Copyright 1998 Eric Kohl
5  * Copyright 1999 Alex Priem
6  */
7
8 #ifndef __WINE_MONTHCAL_H
9 #define __WINE_MONTHCAL_H
10
11 #define MC_SEL_LBUTUP           0                       /* Left button released */
12 #define MC_SEL_LBUTDOWN         1                       /* Left button pressed in calendar */
13 #define MC_PREVPRESSED      1           /* Prev month button pressed */
14 #define MC_NEXTPRESSED      2           /* Next month button pressed */
15 #define MC_NEXTMONTHDELAY       500                     /* when continuously pressing `next */
16                                                                                 /* month', wait 500 ms before going */
17                                                                                 /* to the next month */
18 #define MC_NEXTMONTHTIMER   1                   /* Timer ID's */
19 #define MC_PREVMONTHTIMER   2                   
20
21 typedef struct tagMONTHCAL_INFO
22 {
23     COLORREF bk;
24     COLORREF txt;
25     COLORREF titlebk;
26     COLORREF titletxt;
27     COLORREF monthbk;
28     COLORREF trailingtxt;
29         HFONT    hFont;
30         HFONT    hBoldFont;
31         int              textHeight;
32         int              textWidth;
33         int              firstDayplace; /* place of the first day of the current month */
34         int              delta;                         /* scroll rate; # of months that the */
35                           /* control moves when user clicks a scroll button */
36         int      visible;               /* # of months visible */
37         int      firstDay;              /* Start month calendar with firstDay's day */
38         int              monthRange;
39         MONTHDAYSTATE *monthdayState;
40         SYSTEMTIME todaysDate;
41         DWORD    currentMonth;
42         DWORD    currentYear;
43         int              status;                /* See MC_SEL flags */
44         int              curSelDay;         /* current selected day */
45         int              firstSelDay;   /* first selected day */
46         int              maxSelCount;
47         SYSTEMTIME minSel;
48         SYSTEMTIME maxSel;
49         DWORD   rangeValid;
50         SYSTEMTIME minDate;
51         SYSTEMTIME maxDate;
52                 
53         RECT    rcClient;                       /* rect for whole client area */
54         RECT    title;                          /* rect for the header above the calendar */
55         RECT    titlebtnnext;           /* the `next month' button in the header */
56         RECT    titlebtnprev;       /* the `prev month' button in the header */ 
57         RECT    titlemonth;                     /* the `month name' txt in the header */
58         RECT    titleyear;                      /* the `year number' txt in the header */
59         RECT    prevmonth;                      /* day numbers of the previous month */
60         RECT    nextmonth;                      /* day numbers of the next month */
61         RECT    days;                   /* week numbers at left side */
62         RECT    weeknums;                       /* week numbers at left side */
63         RECT    today;                          /* `today: xx/xx/xx' text rect */
64 } MONTHCAL_INFO, *LPMONTHCAL_INFO;
65
66
67 extern void MONTHCAL_CopyTime (const SYSTEMTIME *from, SYSTEMTIME *to);
68 extern int MONTHCAL_CalculateDayOfWeek (DWORD day, DWORD month, DWORD year);
69 extern char *daytxt[];
70 extern char *monthtxt[];
71 extern void MONTHCAL_Register (void);
72 extern void MONTHCAL_Unregister (void);
73
74 #endif  /* __WINE_MONTHCAL_H */