1
2@c %start of fragment
3
4@deftp Class <gtk-calendar>
5Derives from @code{<gtk-widget>}.
6
7This class defines the following slots:
8
9@table @code
10@item year
11The selected year
12
13@item month
14The selected month (as a number between 0 and 11)
15
16@item day
17The selected day (as a number between 1 and 31, or 0 to unselect the currently
18selected day)
19
20@item show-heading
21If TRUE, a heading is displayed
22
23@item show-day-names
24If TRUE, day names are displayed
25
26@item no-month-change
27If TRUE, the selected month cannot be changed
28
29@item show-week-numbers
30If TRUE, week numbers are displayed
31
32@end table
33
34@end deftp
35
36@defop Signal <gtk-calendar> month-changed
37Emitted when the user clicks a button to change the selected month on a
38calendar.
39
40@end defop
41
42@defop Signal <gtk-calendar> day-selected
43Emitted when the user selects a day.
44
45@end defop
46
47@defop Signal <gtk-calendar> day-selected-double-click
48@end defop
49
50@defop Signal <gtk-calendar> prev-month
51@end defop
52
53@defop Signal <gtk-calendar> next-month
54@end defop
55
56@defop Signal <gtk-calendar> prev-year
57@end defop
58
59@defop Signal <gtk-calendar> next-year
60@end defop
61
62@deffn Function gtk-calendar-new  @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
63Creates a new calendar, with the current date being selected.
64
65@table @var
66@item ret
67a newly @code{<gtk-calendar>} widget
68
69@end table
70
71@end deffn
72
73@deffn Function gtk-calendar-select-month  (self@tie{}@code{<gtk-calendar>}) (month@tie{}@code{unsigned-int}) (year@tie{}@code{unsigned-int}) @result{}@tie{} (ret@tie{}@code{bool})
74@deffnx Method select-month
75Shifts the calendar to a different month.
76
77@table @var
78@item calendar
79a @code{<gtk-calendar>}
80
81@item month
82a month number between 0 and 11.
83
84@item year
85the year the month is in.
86
87@item ret
88@samp{@code{#t}}, always
89
90@end table
91
92@end deffn
93
94@deffn Function gtk-calendar-select-day  (self@tie{}@code{<gtk-calendar>}) (day@tie{}@code{unsigned-int})
95@deffnx Method select-day
96Selects a day from the current month.
97
98@table @var
99@item calendar
100a @code{<gtk-calendar>}.
101
102@item day
103the day number between 1 and 31, or 0 to unselect the currently selected day.
104
105@end table
106
107@end deffn
108
109@deffn Function gtk-calendar-mark-day  (self@tie{}@code{<gtk-calendar>}) (day@tie{}@code{unsigned-int}) @result{}@tie{} (ret@tie{}@code{bool})
110@deffnx Method mark-day
111Places a visual marker on a particular day.
112
113@table @var
114@item calendar
115a @code{<gtk-calendar>}
116
117@item day
118the day number to mark between 1 and 31.
119
120@item ret
121@samp{@code{#t}}, always
122
123@end table
124
125@end deffn
126
127@deffn Function gtk-calendar-unmark-day  (self@tie{}@code{<gtk-calendar>}) (day@tie{}@code{unsigned-int}) @result{}@tie{} (ret@tie{}@code{bool})
128@deffnx Method unmark-day
129Removes the visual marker from a particular day.
130
131@table @var
132@item calendar
133a @code{<gtk-calendar>}.
134
135@item day
136the day number to unmark between 1 and 31.
137
138@item ret
139@samp{@code{#t}}, always
140
141@end table
142
143@end deffn
144
145@deffn Function gtk-calendar-clear-marks  (self@tie{}@code{<gtk-calendar>})
146@deffnx Method clear-marks
147Remove all visual markers.
148
149@table @var
150@item calendar
151a @code{<gtk-calendar>}
152
153@end table
154
155@end deffn
156
157@deffn Function gtk-calendar-set-display-options  (self@tie{}@code{<gtk-calendar>}) (flags@tie{}@code{<gtk-calendar-display-options>})
158@deffnx Method set-display-options
159Sets display options (whether to display the heading and the month headings).
160
161@table @var
162@item calendar
163a @code{<gtk-calendar>}
164
165@item flags
166the display options to set
167
168@end table
169
170Since 2.4
171
172@end deffn
173
174@deffn Function gtk-calendar-get-date  (self@tie{}@code{<gtk-calendar>}) @result{}@tie{} (year@tie{}@code{unsigned-int}) (month@tie{}@code{unsigned-int}) (day@tie{}@code{unsigned-int})
175@deffnx Method get-date
176Obtains the selected date from a @code{<gtk-calendar>}.
177
178@table @var
179@item calendar
180a @code{<gtk-calendar>}
181
182@item year
183location to store the year number, or @samp{@code{#f}}
184
185@item month
186location to store the month number (between 0 and 11), or @samp{@code{#f}}
187
188@item day
189location to store the day number (between 1 and 31), or @samp{@code{#f}}
190
191@end table
192
193@end deffn
194
195@deffn Function gtk-calendar-freeze  (self@tie{}@code{<gtk-calendar>})
196@deffnx Method freeze
197@samp{gtk_calendar_freeze} has been deprecated since version 2.8 and should not
198be used in newly-written code.
199
200Does nothing. Previously locked the display of the calendar until it was thawed
201with @code{gtk-calendar-thaw}.
202
203@table @var
204@item calendar
205a @code{<gtk-calendar>}
206
207@end table
208
209@end deffn
210
211@deffn Function gtk-calendar-thaw  (self@tie{}@code{<gtk-calendar>})
212@deffnx Method thaw
213@samp{gtk_calendar_thaw} has been deprecated since version 2.8 and should not be
214used in newly-written code.
215
216Does nothing. Previously defrosted a calendar; all the changes made since the
217last @code{gtk-calendar-freeze} were displayed.
218
219@table @var
220@item calendar
221a @code{<gtk-calendar>}
222
223@end table
224
225@end deffn
226
227
228@c %end of fragment
229