summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.h
diff options
context:
space:
mode:
authorMathias Hasselmann <hasselmm@src.gnome.org>2007-12-27 20:41:08 +0000
committerMathias Hasselmann <hasselmm@src.gnome.org>2007-12-27 20:41:08 +0000
commitfdbf92ad90c2d5f6a21bb5013b081c07c45360a7 (patch)
tree7b701cb4e71701f58616fa345d091deb5bca1865 /gtk/gtkcalendar.h
parentb28fea94a0641e130431a2417fb598accc36b896 (diff)
downloadgtk+-fdbf92ad90c2d5f6a21bb5013b081c07c45360a7.tar.gz
Add infrastructure for GtkCalendar details. (#339540)
* gtk/gtkcalendar.c, gtk/gtkcalendar.h, gtk/gtk.symbols: Add "detail-width-chars" and "detail-height-rows" properties, and gtk_calendar_set_detail_func function. svn path=/trunk/; revision=19251
Diffstat (limited to 'gtk/gtkcalendar.h')
-rw-r--r--gtk/gtkcalendar.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/gtk/gtkcalendar.h b/gtk/gtkcalendar.h
index 3115e0ee0a..c6a0afbd4a 100644
--- a/gtk/gtkcalendar.h
+++ b/gtk/gtkcalendar.h
@@ -60,6 +60,28 @@ typedef enum
GTK_CALENDAR_WEEK_START_MONDAY = 1 << 4
} GtkCalendarDisplayOptions;
+/**
+ * GtkCalendarDetailFunc:
+ * @calendar: a #GtkCalendar.
+ * @year: the year for which details are needed.
+ * @month: the month for which details are needed.
+ * @day: the day of @month for which details are needed.
+ * @user_data: the data passed with gtk_calendar_set_detail_func().
+ *
+ * This kind of functions provide Pango markup with detail information for the
+ * specified day. Examples for such details are holidays or appointments. The
+ * function returns %NULL when no information is available.
+ *
+ * Since: 2.16
+ *
+ * Return value: Pango markup with details for the specified day, or %NULL.
+ */
+typedef G_CONST_RETURN gchar* (*GtkCalendarDetailFunc) (GtkCalendar *calendar,
+ guint year,
+ guint month,
+ guint day,
+ gpointer user_data);
+
struct _GtkCalendar
{
GtkWidget widget;
@@ -143,6 +165,20 @@ void gtk_calendar_get_date (GtkCalendar *calendar,
guint *year,
guint *month,
guint *day);
+
+void gtk_calendar_set_detail_func (GtkCalendar *calendar,
+ GtkCalendarDetailFunc func,
+ gpointer data,
+ GDestroyNotify destroy);
+
+void gtk_calendar_set_detail_width_chars (GtkCalendar *calendar,
+ gint chars);
+void gtk_calendar_set_detail_height_rows (GtkCalendar *calendar,
+ gint rows);
+
+gint gtk_calendar_get_detail_width_chars (GtkCalendar *calendar);
+gint gtk_calendar_get_detail_height_rows (GtkCalendar *calendar);
+
#ifndef GTK_DISABLE_DEPRECATED
void gtk_calendar_freeze (GtkCalendar *calendar);
void gtk_calendar_thaw (GtkCalendar *calendar);