elementary/dayselector - trivial changes
[framework/uifw/elementary.git] / src / lib / elc_dayselector.h
1 /**
2  * @defgroup Dayselector Dayselector
3  *
4  * @image html img/widget/dayselector/preview-00.png
5  * @image latex img/widget/dayselector/preview-00.eps
6  *
7  * @brief <b>Dayselector widet:</b>
8  *
9  *"elm_dayselector" is a day selection widget. It displays all seven days of
10  * the week and allows the user to select multiple days.
11  *
12  * The selection can be toggle by just clicking on the day.
13  *
14  * Dayselector also provides the functionality to check whether a day is 
15  * selected or not.
16  *
17  * First day of the week is taken from config settings by default. It can be 
18  * altered by using the API elm_dayselector_week_start_set() API.
19  *
20  * APIs are provided for setting the duration of weekend  
21  * elm_dayselector_weekend_start_set() and elm_dayselector_weekend_length_set()
22  * does this job.
23  *
24  * Two styles of weekdays and weekends are supported in Dayselector.
25  * Application can emit signals on individual check objects for setting the 
26  * weekday, weekend styles.
27  *
28  * Once the weekend start day or weekend length changes, all the weekday & 
29  * weekend styles will be reset to default style. It's the application's 
30  * responsibility to set the styles again by sending corresponding signals.
31  *
32  * Supported elm_object_item common APIs.
33  *
34  * @li elm_object_part_text_set,
35  * @li elm_object_part_text_get,
36  * @li elm_object_part_content_set,
37  * @li elm_object_part_content_get,
38  * @li elm_object_part_content_unset
39  *
40  * @li "day0" indicates Sunday, "day1" indicates Monday etc. continues and so,
41  * "day6" indicates the Saturday part name.
42  *
43  * Application can change individual day display string by using the API
44  * elm_object_part_text_set().
45  *
46  * elm_object_part_content_set() API sets the individual day object only if
47  * the passed one is a Check widget.
48  *
49  * Check object representing a day can be set/get by the application by using
50  * the elm_object_part_content_set/get APIs thus providing a way to handle
51  * the different check styles for individual days.
52  *
53  * The widget emits the following signals:
54  * @li "dayselector,changed" - when the user changes the state of a day.
55  * @li "language,changed" - the program's launguage changed
56  *
57  * Available styles for dayselector are:
58  * @li default
59  *
60  * This example shows the usage of the widget.
61  * @li @ref dayselector_example
62  *
63  */
64
65 /**
66  * @addtogroup Dayselector
67  * @{
68  */
69
70 /**
71  * Identifies the day of the week.
72  * API can call the selection/unselection of day with this as a parameter.
73  *
74  * @see elm_dayselector_day_selected_set()
75  * @see elm_dayselector_day_selected_get()
76  */
77 typedef enum
78 {
79    ELM_DAYSELECTOR_SUN = 0,/**< indicates Sunday */
80    ELM_DAYSELECTOR_MON,    /**< indicates Monday */
81    ELM_DAYSELECTOR_TUE,    /**< indicates Tuesday */
82    ELM_DAYSELECTOR_WED,    /**< indicates Wednesday */
83    ELM_DAYSELECTOR_THU,    /**< indicates Thursday */
84    ELM_DAYSELECTOR_FRI,    /**< indicates Friday */
85    ELM_DAYSELECTOR_SAT,    /**< indicates Saturday */
86    ELM_DAYSELECTOR_MAX     /**< Sentinel value, @b don't use */
87 } Elm_Dayselector_Day;
88
89 /**
90  * Add the dayselector.
91  *
92  * @param parent Parent object
93  * @return New dayselector object or @c NULL, if it cannot be created
94  *
95  * @ingroup Dayselector
96  */
97 EAPI Evas_Object *elm_dayselector_add(Evas_Object *parent);
98
99 /**
100  * Set the state of given Dayselector_Day.
101  *
102  * @param obj Dayselector object
103  * @param day Dayselector_Day that the user want to set state.
104  * @param selected state of the day. @c EINA_TRUE is selected.
105  *
106  * @see Elm_Dayselector_Day
107  * @see elm_dayselector_day_selected_get()
108  *
109  */
110 EAPI void   elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected);
111
112 /**
113  * Get the state of given Dayselector_Day.
114  *
115  * @param obj Dayselector object
116  * @param day Dayselector_Day that the user want to know state.
117  * @return @c EINA_TRUE, if the Day is selected
118  *
119  * @see Elm_Dayselector_Day
120  * @see elm_dayselector_day_selected_set()
121  *
122  */
123 EAPI Eina_Bool   elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day);
124
125 /**
126  * Set the starting day of Dayselector.
127  *
128  * @param obj Dayselector object
129  * @param day Dayselector_Day the first day that the user wants to display.
130  *
131  * @see Elm_Dayselector_Day
132  * @see elm_dayselector_week_start_get()
133  *
134  */
135 EAPI void   elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
136
137 /**
138  * Get the starting day of Dayselector.
139  *
140  * @param obj Dayselector object
141  * @return Day from where Dayselector displays all the weekdays in order.
142  *
143  * @see Elm_Dayselector_Day
144  * @see elm_dayselector_week_start_set()
145  *
146  */
147 EAPI Elm_Dayselector_Day   elm_dayselector_week_start_get(const Evas_Object *obj);
148
149 /**
150  * Set the weekend starting day of Dayselector.
151  *
152  * @param obj Dayselector object
153  * @param day Dayselector_Day the first day from where weekend starts.
154  *
155  * @see Elm_Dayselector_Day
156  * @see elm_dayselector_weekend_start_get()
157  *
158  */
159 EAPI void   elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
160
161 /**
162  * Get the weekend starting day of Dayselector.
163  *
164  * @param obj Dayselector object
165  * @return Elm_Dayselector_Day Day from where weekend starts.
166  *
167  * @see Elm_Dayselector_Day
168  * @see elm_dayselector_weekend_start_set()
169  *
170  */
171 EAPI Elm_Dayselector_Day   elm_dayselector_weekend_start_get(const Evas_Object *obj);
172
173 /**
174  * Set the weekend length of Dayselector.
175  *
176  * @param obj Dayselector object
177  * @param length Weekend length, number of days as an integer.
178  *
179  * @see elm_dayselector_weekend_length_get()
180  *
181  */
182 EAPI void   elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length);
183
184 /**
185  * Get the weekend length of Dayselector.
186  *
187  * @param obj Dayselector object
188  * @return Number of days marked as a weekend.
189  *
190  * @see Elm_Dayselector_Day
191  * @see elm_dayselector_weekend_length_set()
192  *
193  */
194 EAPI unsigned int   elm_dayselector_weekend_length_get(const Evas_Object *obj);
195
196 /**
197  * @}
198  */