summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.h
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-02-04 12:19:08 +0100
committerMatthias Clasen <mclasen@redhat.com>2020-02-07 13:16:32 -0500
commit74cb1ca2f5dca5ac4052724f6a2f2e546ee6696a (patch)
treee5e7f2aea3a42a2f24359e6752984c5e8b3e2490 /gtk/gtkcalendar.h
parente94e70368542d42362d4b071e722992308cb945c (diff)
downloadgtk+-74cb1ca2f5dca5ac4052724f6a2f2e546ee6696a.tar.gz
calendar: Add accessors for display properties
Instead of having a display flags enum and bitfield, just add proper accessors for the properties, which is what we do everywhere else.
Diffstat (limited to 'gtk/gtkcalendar.h')
-rw-r--r--gtk/gtkcalendar.h37
1 files changed, 14 insertions, 23 deletions
diff --git a/gtk/gtkcalendar.h b/gtk/gtkcalendar.h
index a7bb609c48..bb4c04cd72 100644
--- a/gtk/gtkcalendar.h
+++ b/gtk/gtkcalendar.h
@@ -45,24 +45,6 @@ G_BEGIN_DECLS
typedef struct _GtkCalendar GtkCalendar;
-/**
- * GtkCalendarDisplayOptions:
- * @GTK_CALENDAR_SHOW_HEADING: Specifies that the month and year should be displayed.
- * @GTK_CALENDAR_SHOW_DAY_NAMES: Specifies that three letter day descriptions should be present.
- * @GTK_CALENDAR_NO_MONTH_CHANGE: Prevents the user from switching months with the calendar.
- * @GTK_CALENDAR_SHOW_WEEK_NUMBERS: Displays each week numbers of the current year, down the
- * left side of the calendar.
- *
- * These options can be used to influence the display and behaviour of a #GtkCalendar.
- */
-typedef enum
-{
- GTK_CALENDAR_SHOW_HEADING = 1 << 0,
- GTK_CALENDAR_SHOW_DAY_NAMES = 1 << 1,
- GTK_CALENDAR_NO_MONTH_CHANGE = 1 << 2,
- GTK_CALENDAR_SHOW_WEEK_NUMBERS = 1 << 3,
-} GtkCalendarDisplayOptions;
-
GDK_AVAILABLE_IN_ALL
GType gtk_calendar_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
@@ -85,13 +67,22 @@ void gtk_calendar_unmark_day (GtkCalendar *calendar,
GDK_AVAILABLE_IN_ALL
void gtk_calendar_clear_marks (GtkCalendar *calendar);
-
GDK_AVAILABLE_IN_ALL
-void gtk_calendar_set_display_options (GtkCalendar *calendar,
- GtkCalendarDisplayOptions flags);
+void gtk_calendar_set_show_week_numbers (GtkCalendar *self,
+ gboolean value);
+GDK_AVAILABLE_IN_ALL
+gboolean gtk_calendar_get_show_week_numbers (GtkCalendar *self);
GDK_AVAILABLE_IN_ALL
-GtkCalendarDisplayOptions
- gtk_calendar_get_display_options (GtkCalendar *calendar);
+void gtk_calendar_set_show_heading (GtkCalendar *self,
+ gboolean value);
+GDK_AVAILABLE_IN_ALL
+gboolean gtk_calendar_get_show_heading (GtkCalendar *self);
+GDK_AVAILABLE_IN_ALL
+void gtk_calendar_set_show_day_names (GtkCalendar *self,
+ gboolean value);
+GDK_AVAILABLE_IN_ALL
+gboolean gtk_calendar_get_show_day_names (GtkCalendar *self);
+
GDK_AVAILABLE_IN_ALL
void gtk_calendar_get_date (GtkCalendar *calendar,
guint *year,