[evolution] e-util-enums.h: Add EDateWeekday enum.



commit 8c903b93204d4ea1f72c588dda25643d608d6d2d
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Mar 6 10:16:59 2013 -0500

    e-util-enums.h: Add EDateWeekday enum.
    
    This enum type is intentionally compatible with GDateWeekday.
    It exists only because GLib does not provide a GEnumClass for
    GDateWeekday.  If that ever changes, this enum can go away.

 doc/reference/libeutil/libeutil-sections.txt |    1 +
 e-util/e-util-enums.h                        |   38 ++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/doc/reference/libeutil/libeutil-sections.txt b/doc/reference/libeutil/libeutil-sections.txt
index d681b4e..c09d885 100644
--- a/doc/reference/libeutil/libeutil-sections.txt
+++ b/doc/reference/libeutil/libeutil-sections.txt
@@ -2217,6 +2217,7 @@ EMenuToolButtonPrivate
 <SECTION>
 <FILE>e-misc-utils</FILE>
 <TITLE>Miscellaneous Utilities</TITLE>
+EDateWeekday
 EForeachFunc
 e_get_accels_filename
 e_show_uri
diff --git a/e-util/e-util-enums.h b/e-util/e-util-enums.h
index 71cacc6..d36ed77 100644
--- a/e-util/e-util-enums.h
+++ b/e-util/e-util-enums.h
@@ -48,6 +48,44 @@ typedef enum {
 } EActivityState;
 
 /**
+ * EDateWeekday:
+ * @E_DATE_BAD_WEEKDAY:
+ *   Invalid value
+ * @E_DATE_MONDAY:
+ *   Monday
+ * @E_DATE_TUESDAY:
+ *   Tuesday
+ * @E_DATE_WEDNESDAY:
+ *   Wednesday
+ * @E_DATE_THURSDAY:
+ *   Thursday
+ * @E_DATE_FRIDAY:
+ *   Friday
+ * @E_DATE_SATURDAY:
+ *   Saturday
+ * @E_DATE_SUNDAY:
+ *   Sunday
+ *
+ * Enumeration representing a day of the week; @E_DATE_MONDAY,
+ * @E_DATE_TUESDAY, etc.  @G_DATE_BAD_WEEKDAY is an invalid weekday.
+ *
+ * This enum type is intentionally compatible with #GDateWeekday.
+ * It exists only because GLib does not provide a #GEnumClass for
+ * #GDateWeekday.  If that ever changes, this enum can go away.
+ **/
+/* XXX Be pedantic with the value assignments to ensure compatibility. */
+typedef enum {
+       E_DATE_BAD_WEEKDAY = G_DATE_BAD_WEEKDAY,
+       E_DATE_MONDAY      = G_DATE_MONDAY,
+       E_DATE_TUESDAY     = G_DATE_TUESDAY,
+       E_DATE_WEDNESDAY   = G_DATE_WEDNESDAY,
+       E_DATE_THURSDAY    = G_DATE_THURSDAY,
+       E_DATE_FRIDAY      = G_DATE_FRIDAY,
+       E_DATE_SATURDAY    = G_DATE_SATURDAY,
+       E_DATE_SUNDAY      = G_DATE_SUNDAY
+} EDateWeekday;
+
+/**
  * EDurationType:
  * @E_DURATION_MINUTES:
  *   Duration value is in minutes.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]