mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
Add gtk_calendar_day_is_marked() function
The marked state of calendar day is not accessible Fixes https://bugzilla.gnome.org/show_bug.cgi?id=627028
This commit is contained in:
parent
6afa615690
commit
f84707d6f9
@ -594,6 +594,7 @@ gtk_calendar_select_month
|
||||
gtk_calendar_select_day
|
||||
gtk_calendar_mark_day
|
||||
gtk_calendar_unmark_day
|
||||
gtk_calendar_get_day_is_marked
|
||||
gtk_calendar_clear_marks
|
||||
|
||||
<SUBSECTION>
|
||||
|
@ -554,6 +554,7 @@ gtk_button_set_use_underline
|
||||
#if IN_FILE(__GTK_CALENDAR_C__)
|
||||
gtk_calendar_clear_marks
|
||||
gtk_calendar_get_date
|
||||
gtk_calendar_get_day_is_marked
|
||||
gtk_calendar_get_detail_height_rows
|
||||
gtk_calendar_get_detail_width_chars
|
||||
gtk_calendar_get_display_options
|
||||
|
@ -4029,6 +4029,33 @@ gtk_calendar_mark_day (GtkCalendar *calendar,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_calendar_get_day_is_marked:
|
||||
* @calendar: a #GtkCalendar
|
||||
* @day: the day number between 1 and 31.
|
||||
*
|
||||
* Returns if the @day of the @calendar is already marked.
|
||||
*
|
||||
* Returns: whether the day is marked.
|
||||
*
|
||||
* Since: 3.0
|
||||
*/
|
||||
gboolean
|
||||
gtk_calendar_get_day_is_marked (GtkCalendar *calendar,
|
||||
guint day)
|
||||
{
|
||||
GtkCalendarPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_CALENDAR (calendar), FALSE);
|
||||
|
||||
priv = calendar->priv;
|
||||
|
||||
if (day >= 1 && day <= 31)
|
||||
return priv->marked_date[day - 1];
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_calendar_unmark_day:
|
||||
* @calendar: a #GtkCalendar.
|
||||
|
@ -157,6 +157,9 @@ void gtk_calendar_set_detail_height_rows (GtkCalendar *calendar,
|
||||
gint gtk_calendar_get_detail_width_chars (GtkCalendar *calendar);
|
||||
gint gtk_calendar_get_detail_height_rows (GtkCalendar *calendar);
|
||||
|
||||
gboolean gtk_calendar_get_day_is_marked (GtkCalendar *calendar,
|
||||
guint day);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_CALENDAR_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user