1 #ifndef ELM_WIDGET_DAYSELECTOR_H
2 #define ELM_WIDGET_DAYSELECTOR_H
4 #include "Elementary.h"
5 #include "elm_dayselector_item.eo.h"
8 /* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
9 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
10 * FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK
19 * @section elm-dayselector-class The Elementary Dayselector Class
21 * Elementary, besides having the @ref Dayselector widget, exposes its
22 * foundation -- the Elementary Dayselector Class -- in order to create other
23 * widgets which are a dayselector with some more logic on top.
27 * Base layout smart data extended with dayselector instance data.
29 typedef struct _Elm_Dayselector_Data Elm_Dayselector_Data;
30 struct _Elm_Dayselector_Data
33 Elm_Dayselector_Day week_start;
34 Elm_Dayselector_Day weekend_start;
35 unsigned int weekend_len;
36 Eina_Bool weekdays_names_set : 1;
39 typedef struct _Elm_Dayselector_Item_Data Elm_Dayselector_Item_Data;
40 struct _Elm_Dayselector_Item_Data
42 Elm_Widget_Item_Data *base;
43 Elm_Dayselector_Day day;
44 const char *day_style;
51 #define ELM_DAYSELECTOR_DATA_GET(o, sd) \
52 Elm_Dayselector_Data * sd = eo_data_scope_get(o, ELM_DAYSELECTOR_CLASS)
54 #define ELM_DAYSELECTOR_DATA_GET_OR_RETURN(o, ptr) \
55 ELM_DAYSELECTOR_DATA_GET(o, ptr); \
56 if (EINA_UNLIKELY(!ptr)) \
58 CRI("No widget data for object %p (%s)", \
59 o, evas_object_type_get(o)); \
63 #define ELM_DAYSELECTOR_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
64 ELM_DAYSELECTOR_DATA_GET(o, ptr); \
65 if (EINA_UNLIKELY(!ptr)) \
67 CRI("No widget data for object %p (%s)", \
68 o, evas_object_type_get(o)); \
72 #define ELM_DAYSELECTOR_CHECK(obj) \
73 if (EINA_UNLIKELY(!eo_isa((obj), ELM_DAYSELECTOR_CLASS))) \
76 #define ELM_DAYSELECTOR_ITEM_DATA_GET(o, sd) \
77 Elm_Dayselector_Item_Data * sd = eo_data_scope_get(o, ELM_DAYSELECTOR_ITEM_CLASS)