Commit f84707d6 authored by Javier Jardón's avatar Javier Jardón

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
parent 6afa6156
...@@ -594,6 +594,7 @@ gtk_calendar_select_month ...@@ -594,6 +594,7 @@ gtk_calendar_select_month
gtk_calendar_select_day gtk_calendar_select_day
gtk_calendar_mark_day gtk_calendar_mark_day
gtk_calendar_unmark_day gtk_calendar_unmark_day
gtk_calendar_get_day_is_marked
gtk_calendar_clear_marks gtk_calendar_clear_marks
<SUBSECTION> <SUBSECTION>
......
...@@ -554,6 +554,7 @@ gtk_button_set_use_underline ...@@ -554,6 +554,7 @@ gtk_button_set_use_underline
#if IN_FILE(__GTK_CALENDAR_C__) #if IN_FILE(__GTK_CALENDAR_C__)
gtk_calendar_clear_marks gtk_calendar_clear_marks
gtk_calendar_get_date gtk_calendar_get_date
gtk_calendar_get_day_is_marked
gtk_calendar_get_detail_height_rows gtk_calendar_get_detail_height_rows
gtk_calendar_get_detail_width_chars gtk_calendar_get_detail_width_chars
gtk_calendar_get_display_options gtk_calendar_get_display_options
......
...@@ -4029,6 +4029,33 @@ gtk_calendar_mark_day (GtkCalendar *calendar, ...@@ -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: * gtk_calendar_unmark_day:
* @calendar: a #GtkCalendar. * @calendar: a #GtkCalendar.
......
...@@ -157,6 +157,9 @@ void gtk_calendar_set_detail_height_rows (GtkCalendar *calendar, ...@@ -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_width_chars (GtkCalendar *calendar);
gint gtk_calendar_get_detail_height_rows (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 G_END_DECLS
#endif /* __GTK_CALENDAR_H__ */ #endif /* __GTK_CALENDAR_H__ */
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