From 4c8a0de75f402e6d7a28d6505f9f1ec3b6919172 Mon Sep 17 00:00:00 2001 From: Yakov Goldberg Date: Tue, 7 Jul 2015 14:31:53 +0300 Subject: [PATCH] elm_datetime: Move enums to elm_datetime.eo Move enums from elm_datetime_common.h to elm_datetime.eo in order to make them more accessible for bindings. --- src/lib/elm_datetime.eo | 25 +++++++++++++++++++++---- src/lib/elm_datetime_common.h | 15 --------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/lib/elm_datetime.eo b/src/lib/elm_datetime.eo index d6bd832b9..4f03b486b 100644 --- a/src/lib/elm_datetime.eo +++ b/src/lib/elm_datetime.eo @@ -1,3 +1,20 @@ +enum Elm.Datetime.Field_Type +{ + [[ + @addtogroup Datetime + Identifies a Datetime field, The widget supports 6 fields : Year, month, + Date, Hour, Minute, AM/PM + ]] + + legacy: elm_datetime; + year = 0, [[Indicates Year field.]] + month = 1, [[Indicates Month field.]] + date = 2, [[Indicates Date field.]] + hour = 3, [[Indicates Hour field.]] + minute = 4, [[Indicates Minute field.]] + ampm = 5, [[Indicates AM/PM field .]] +} + class Elm.Datetime (Elm.Layout) { eo_prefix: elm_obj_datetime; @@ -100,7 +117,7 @@ class Elm.Datetime (Elm.Layout) @ingroup Datetime */ params { - @in fieldtype: Elm_Datetime_Field_Type; /*@ Type of the field. #ELM_DATETIME_YEAR etc. */ + @in fieldtype: Elm.Datetime.Field_Type; /*@ Type of the field. #ELM_DATETIME_YEAR etc. */ @in min: int; /*@ Reference to field's minimum value */ @in max: int; /*@ Reference to field's maximum value */ } @@ -119,7 +136,7 @@ class Elm.Datetime (Elm.Layout) @see elm_datetime_field_limit_set() @ingroup Datetime */ params { - @in fieldtype: Elm_Datetime_Field_Type; /*@ Type of the field. #ELM_DATETIME_YEAR etc. */ + @in fieldtype: Elm.Datetime.Field_Type; /*@ Type of the field. #ELM_DATETIME_YEAR etc. */ @out min: int; /*@ Reference to field's minimum value */ @out max: int; /*@ Reference to field's maximum value */ } @@ -238,7 +255,7 @@ class Elm.Datetime (Elm.Layout) @ingroup Datetime */ params { - @in fieldtype: Elm_Datetime_Field_Type; /*@ Type of the field. #ELM_DATETIME_YEAR etc. */ + @in fieldtype: Elm.Datetime.Field_Type; /*@ Type of the field. #ELM_DATETIME_YEAR etc. */ @in visible: bool; /*@ @c EINA_TRUE field can be visible, @c EINA_FALSE otherwise. */ } } @@ -252,7 +269,7 @@ class Elm.Datetime (Elm.Layout) @ingroup Datetime */ return: bool; params { - @in fieldtype: Elm_Datetime_Field_Type; /*@ Type of the field. #ELM_DATETIME_YEAR etc */ + @in fieldtype: Elm.Datetime.Field_Type; /*@ Type of the field. #ELM_DATETIME_YEAR etc */ } } value_max_set { diff --git a/src/lib/elm_datetime_common.h b/src/lib/elm_datetime_common.h index 9244b105c..0115e0e17 100644 --- a/src/lib/elm_datetime_common.h +++ b/src/lib/elm_datetime_common.h @@ -3,21 +3,6 @@ * * @{ */ - -/** - * Identifies a Datetime field, The widget supports 6 fields : Year, month, - * Date, Hour, Minute, AM/PM - */ -typedef enum -{ - ELM_DATETIME_YEAR = 0, /**< Indicates Year field */ - ELM_DATETIME_MONTH = 1, /**< Indicates Month field */ - ELM_DATETIME_DATE = 2, /**< Indicates Date field */ - ELM_DATETIME_HOUR = 3, /**< Indicates Hour field */ - ELM_DATETIME_MINUTE = 4, /**< Indicates Minute field */ - ELM_DATETIME_AMPM = 5, /**< Indicates AM/PM field */ -} Elm_Datetime_Field_Type; - /* temporary until better solution is found: is here because of eolian */ typedef struct tm Elm_Datetime_Time; -- 2.34.1