summaryrefslogtreecommitdiff
path: root/src/lib/elm_dayselector.eo
blob: e2eacfce96897f5c2d11e1a3700f098ebb77a4ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
class Elm_Dayselector (Elm_Layout)
{
   eo_prefix: elm_obj_dayselector;
   properties {
      week_start {
         set {
            /*@
            Set the starting day of Dayselector.

            @see Elm_Dayselector_Day
            @see elm_dayselector_week_start_get()

            @ingroup Dayselector */
         }
         get {
            /*@
            Get the starting day of Dayselector.

            @return Day from where Dayselector displays all the weekdays in order.

            @see Elm_Dayselector_Day
            @see elm_dayselector_week_start_set()

            @ingroup Dayselector */
         }
         values {
            Elm_Dayselector_Day day; /*@ Dayselector_Day the first day that the user wants to display. */
         }
      }
      weekend_length {
         set {
            /*@
            Set the weekend length of Dayselector.

            @see elm_dayselector_weekend_length_get()

            @ingroup Dayselector */
         }
         get {
            /*@
            Get the weekend length of Dayselector.

            @return Number of days marked as a weekend.

            @see Elm_Dayselector_Day
            @see elm_dayselector_weekend_length_set()

            @ingroup Dayselector */
         }
         values {
            uint length; /*@ Weekend length, number of days as an integer. */
         }
      }
      weekend_start {
         set {
            /*@
            Set the weekend starting day of Dayselector.

            @see Elm_Dayselector_Day
            @see elm_dayselector_weekend_start_get()

            @ingroup Dayselector */
         }
         get {
            /*@
            Get the weekend starting day of Dayselector.

            @return Elm_Dayselector_Day Day from where weekend starts.

            @see Elm_Dayselector_Day
            @see elm_dayselector_weekend_start_set()

            @ingroup Dayselector */
         }
         values {
            Elm_Dayselector_Day day; /*@ Dayselector_Day the first day from where weekend starts. */
         }
      }
   }
   methods {
      weekdays_names_set {
         /*@
         Set weekdays names to be displayed by the Dayselector.

         By default or if @a weekdays is @c NULL, weekdays abbreviations get from system are displayed:
         E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"

         The first string should be related to Sunday, the second to Monday...

         The usage should be like this:
         @code
         const char *weekdays[] =
         {
         "Sunday", "Monday", "Tuesday", "Wednesday",
         "Thursday", "Friday", "Saturday"
         };
         elm_dayselector_wekdays_names_set(calendar, weekdays);
         @endcode

         @see elm_dayselector_weekdays_name_get()
         @see elm_dayselector_weekend_start_set()

         @since 1.8

         @ingroup Dayselector */

         params {
            @in const(char)* *weekdays; /*@ Array of seven strings to be used as weekday names.
            @warning It must have 7 elements, or it will access invalid memory.
            @warning The strings must be NULL terminated ('@\0'). */
         }
      }
      weekdays_names_get @const {
         /*@
         Get weekdays names displayed by the calendar.

         @return A list of seven strings to be used as weekday names.

         By default, weekdays abbreviations get from system are displayed:
         E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"
         The first string is related to Sunday, the second to Monday...

         @see elm_dayselector_weekdays_name_set()

         @since 1.8

         @ingroup Dayselector */
         return: Eina_List *;
      }
      day_selected_set {
         /*@
         Set the state of given Dayselector_Day.

         @see Elm_Dayselector_Day
         @see elm_dayselector_day_selected_get()

         @ingroup Dayselector */

         params {
            @in Elm_Dayselector_Day day; /*@ Dayselector_Day that the user want to set state. */
            @in bool selected; /*@ state of the day. @c EINA_TRUE is selected. */
         }
      }
      day_selected_get @const {
         /*@
         Get the state of given Dayselector_Day.

         @return @c EINA_TRUE, if the Day is selected

         @see Elm_Dayselector_Day
         @see elm_dayselector_day_selected_set()

         @ingroup Dayselector */
         return: bool;
         params {
            @in Elm_Dayselector_Day day; /*@ Dayselector_Day that the user want to know state. */
         }
      }
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Evas.Object_Smart.add;
      Evas.Object_Smart.del;
      Elm_Widget.theme_apply;
      Elm_Widget.focus_direction_manager_is;
      Elm_Widget.translate;
      Elm_Container.content_unset;
      Elm_Container.content_set;
      Elm_Layout.sizing_eval;
   }
   events {
      dayselector,changed;
      language,changed;
      access,changed;
   }

}