1 #include <Elementary.h>
5 * @addtogroup Flipselector Flipselector
7 * A flip selector is a widget to show a set of label items, one at a
8 * time, with an animation when one changes the current selection
9 * (like the flip of calendar sheets, in the default theme).
12 /* TODO: ideally, the default theme would use map{} blocks on the TEXT
13 parts to implement their fading in/out propertly (as in the clock
15 /* TODO: if one ever wants to extend it to receiving generic widgets
16 as items, be my guest. in this case, remember to implement the
17 items tooltip infra. */
18 /* TODO: implement disabled mode -- disable_hook() and stuff. */
19 /* TODO: fix default theme image borders for looong strings as item
21 /* TODO: set text elipsis on labels if one enforces mininum size on
22 * the overall widget less the required for displaying it. */
23 /* TODO: find a way to, in the default theme, to detect we are
24 * bootstrapping (receiving the 1st message) and populate the downmost
25 * TEXT parts with the same text as the upmost, where appropriate. */
27 #define FLIP_FIRST_INTERVAL (0.85)
28 #define FLIP_MIN_INTERVAL (0.1)
29 #define MSG_FLIP_DOWN (1)
30 #define MSG_FLIP_UP (2)
31 #define MAX_LEN_DEFAULT (50)
33 #define DATA_GET eina_list_data_get
35 struct _Elm_Flipselector_Item
44 typedef struct _Widget_Data Widget_Data;
52 Eina_List *sentinel; /* item containing the largest label string */
56 double interval, first_interval;
59 static const char *widtype = NULL;
60 static void _del_hook(Evas_Object *obj);
61 static void _theme_hook(Evas_Object *obj);
62 static void _sizing_eval(Evas_Object *obj);
63 static void _update_view(Evas_Object *obj);
64 static void _callbacks_set(Evas_Object *obj);
65 static void _flip_up(Widget_Data *wd);
66 static void _flip_down(Widget_Data *wd);
68 static const char SIG_SELECTED[] = "selected";
69 static const char SIG_UNDERFLOWED[] = "underflowed";
70 static const char SIG_OVERFLOWED[] = "overflowed";
71 static const Evas_Smart_Cb_Description _signals[] = {
73 {SIG_UNDERFLOWED, ""},
78 #define ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(it, ...) \
79 ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, __VA_ARGS__); \
82 ERR(""#it" has been DELETED.\n"); \
86 static Elm_Flipselector_Item *
87 _item_new(Evas_Object *obj, const char *label, Evas_Smart_Cb func, const void *data)
90 Elm_Flipselector_Item *it;
91 Widget_Data *wd = elm_widget_data_get(obj);
93 it = elm_widget_item_new(obj, Elm_Flipselector_Item);
98 if (len > wd->max_len)
101 it->label = eina_stringshare_add_length(label, len);
103 it->base.data = data;
105 /* TODO: no view here, but if one desires general contents in the
111 _item_free(Elm_Flipselector_Item *it)
113 eina_stringshare_del(it->label);
114 elm_widget_item_del(it);
118 _del_hook(Evas_Object *obj)
120 Elm_Flipselector_Item *item;
122 Widget_Data *wd = elm_widget_data_get(obj);
127 ERR("flipselector deleted while walking.\n");
129 EINA_LIST_FREE(wd->items, item)
132 if (wd->spin) ecore_timer_del(wd->spin);
137 _theme_hook(Evas_Object *obj)
142 wd = elm_widget_data_get(obj);
146 _elm_theme_object_set(obj, wd->base, "flipselector", "base",
147 elm_widget_style_get(obj));
148 edje_object_scale_set(wd->base,
149 elm_widget_scale_get(obj) * _elm_config->scale);
151 max_len = edje_object_data_get(wd->base, "max_len");
153 wd->max_len = MAX_LEN_DEFAULT;
156 wd->max_len = atoi(max_len);
158 wd->max_len = MAX_LEN_DEFAULT;
166 _sentinel_eval(Widget_Data *wd)
168 Elm_Flipselector_Item *it;
177 wd->sentinel = wd->items;
179 EINA_LIST_FOREACH(wd->items, l, it)
181 if (strlen(elm_flipselector_item_label_get(it)) >
182 strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel))))
187 /* TODO: create a flag to avoid looping here all times */
189 _flipselector_process_deletions(Widget_Data *wd)
191 Elm_Flipselector_Item *it;
193 Eina_Bool skip = EINA_TRUE;
194 Eina_Bool sentinel_eval = EINA_FALSE;
196 wd->walking++; /* avoid nested deletions */
198 EINA_LIST_FOREACH(wd->items, l, it)
203 if (wd->current == l)
205 if (wd->current == wd->sentinel)
206 sentinel_eval = EINA_TRUE;
208 wd->current = eina_list_prev(wd->current);
210 wd->items = eina_list_remove(wd->items, it);
213 wd->current = wd->items;
218 if (eina_list_count(wd->items) <= 1)
219 edje_object_signal_emit(wd->base, "elm,state,button,hidden", "elm");
221 edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
225 _update_view(wd->self);
234 _flipselector_walk(Widget_Data *wd)
238 ERR("walking was negative. fixed!\n");
245 _flipselector_unwalk(Widget_Data *wd)
250 ERR("walking became negative. fixed!\n");
257 _flipselector_process_deletions(wd);
261 _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type type, void *event_info)
263 Evas_Event_Key_Down *ev;
265 Eina_Bool is_up = EINA_TRUE;
267 if (type != EVAS_CALLBACK_KEY_DOWN)
270 wd = elm_widget_data_get(obj);
275 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
278 if (elm_widget_disabled_get(obj))
281 if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
283 else if ((strcmp(ev->keyname, "Up")) && (strcmp(ev->keyname, "KP_Up")))
286 if (wd->spin) ecore_timer_del(wd->spin);
288 /* TODO: if direction setting via API is not coming in, replace
289 these calls by flip_{next,prev} */
290 _flipselector_walk(wd);
295 _flipselector_unwalk(wd);
297 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
302 _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
304 Widget_Data *wd = elm_widget_data_get(obj);
308 /* FIXME: no treatment of this signal so far */
309 if (elm_widget_focus_get(obj))
311 edje_object_signal_emit(wd->base, "elm,action,focus", "elm");
312 evas_object_focus_set(wd->base, EINA_TRUE);
316 edje_object_signal_emit(wd->base, "elm,action,unfocus", "elm");
317 evas_object_focus_set(wd->base, EINA_FALSE);
322 _sizing_eval(Evas_Object *obj)
325 const char *tmp = NULL;
326 Evas_Coord minw = -1, minh = -1, w, h;
328 wd = elm_widget_data_get(obj);
332 elm_coords_finger_size_adjust(1, &minw, 2, &minh);
336 const char *label = \
337 elm_flipselector_item_label_get(DATA_GET(wd->sentinel));
339 tmp = edje_object_part_text_get(wd->base, "top");
340 edje_object_part_text_set(wd->base, "top", label);
343 edje_object_size_min_restricted_calc(wd->base, &minw, &minh, minw, minh);
344 elm_coords_finger_size_adjust(1, &minw, 2, &minh);
345 evas_object_size_hint_min_get(obj, &w, &h);
348 edje_object_part_text_set(wd->base, "top", tmp);
350 if (w > minw) minw = w;
351 if (h > minh) minh = h;
353 evas_object_size_hint_min_set(obj, minw, minh);
357 _update_view(Evas_Object *obj)
361 Elm_Flipselector_Item *item;
363 wd = elm_widget_data_get(obj);
368 item = DATA_GET(wd->current);
372 edje_object_part_text_set(wd->base, "top", label ? label : "");
373 edje_object_part_text_set(wd->base, "bottom", label ? label : "");
375 edje_object_message_signal_process(wd->base);
379 _changed(Widget_Data *wd)
381 Elm_Flipselector_Item *item;
383 item = DATA_GET(wd->current);
388 item->func((void *)item->base.data, item->base.widget, item);
390 evas_object_smart_callback_call(wd->self, SIG_SELECTED, item);
394 _send_msg(Widget_Data *wd, int flipside, char *label)
396 Edje_Message_String msg;
399 edje_object_message_send(wd->base, EDJE_MESSAGE_STRING, flipside, &msg);
400 edje_object_message_signal_process(wd->base);
406 _flip_up(Widget_Data *wd)
408 Elm_Flipselector_Item *item;
413 if (wd->current == wd->items)
415 wd->current = eina_list_last(wd->items);
416 evas_object_smart_callback_call(wd->self, SIG_UNDERFLOWED, NULL);
419 wd->current = eina_list_prev(wd->current);
421 item = DATA_GET(wd->current);
425 _send_msg(wd, MSG_FLIP_UP, (char *)item->label);
429 _signal_val_up(void *data)
431 Widget_Data *wd = elm_widget_data_get(data);
434 goto val_up_exit_on_error;
436 _flipselector_walk(wd);
438 if (wd->interval > FLIP_MIN_INTERVAL)
439 wd->interval = wd->interval / 1.05;
441 ecore_timer_interval_set(wd->spin, wd->interval);
445 _flipselector_unwalk(wd);
447 return ECORE_CALLBACK_RENEW;
449 val_up_exit_on_error:
450 return ECORE_CALLBACK_CANCEL;
454 _signal_val_up_start(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
456 Widget_Data *wd = elm_widget_data_get(data);
460 wd->interval = wd->first_interval;
463 ecore_timer_del(wd->spin);
464 wd->spin = ecore_timer_add(wd->interval, _signal_val_up, data);
466 _signal_val_up(data);
470 _flip_down(Widget_Data *wd)
472 Elm_Flipselector_Item *item;
477 wd->current = eina_list_next(wd->current);
480 wd->current = wd->items;
481 evas_object_smart_callback_call(wd->self, SIG_OVERFLOWED, NULL);
484 item = DATA_GET(wd->current);
488 _send_msg(wd, MSG_FLIP_DOWN, (char *)item->label);
492 _signal_val_down(void *data)
494 Widget_Data *wd = elm_widget_data_get(data);
497 goto val_down_exit_on_error;
499 _flipselector_walk(wd);
501 if (wd->interval > FLIP_MIN_INTERVAL)
502 wd->interval = wd->interval / 1.05;
503 ecore_timer_interval_set(wd->spin, wd->interval);
507 _flipselector_unwalk(wd);
509 return ECORE_CALLBACK_RENEW;
511 val_down_exit_on_error:
512 return ECORE_CALLBACK_CANCEL;
516 _signal_val_down_start(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
518 Widget_Data *wd = elm_widget_data_get(data);
522 wd->interval = wd->first_interval;
525 ecore_timer_del(wd->spin);
526 wd->spin = ecore_timer_add(wd->interval, _signal_val_down, data);
528 _signal_val_down(data);
532 _signal_val_change_stop(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
534 Widget_Data *wd = elm_widget_data_get(data);
539 ecore_timer_del(wd->spin);
544 _callbacks_set(Evas_Object *obj)
546 Widget_Data *wd = elm_widget_data_get(obj);
548 edje_object_signal_callback_add(wd->base, "elm,action,up,start",
549 "", _signal_val_up_start, obj);
550 edje_object_signal_callback_add(wd->base, "elm,action,up,stop",
551 "", _signal_val_change_stop, obj);
552 edje_object_signal_callback_add(wd->base, "elm,action,down,start",
553 "", _signal_val_down_start, obj);
554 edje_object_signal_callback_add(wd->base, "elm,action,down,stop",
555 "", _signal_val_change_stop, obj);
559 * Add a new flipselector to the parent.
561 * @param parent The parent object
562 * @return The new object or NULL, if it cannot be created
564 * @ingroup Flipselector
567 elm_flipselector_add(Evas_Object *parent)
573 ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
575 ELM_SET_WIDTYPE(widtype, "flipselector");
576 elm_widget_type_set(obj, "flipselector");
577 elm_widget_sub_object_add(parent, obj);
578 elm_widget_data_set(obj, wd);
580 elm_widget_del_hook_set(obj, _del_hook);
581 elm_widget_theme_hook_set(obj, _theme_hook);
582 /* TODO: elm_widget_disable_hook_set(obj, _disable_hook); */
584 elm_widget_can_focus_set(obj, EINA_TRUE);
585 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
586 elm_widget_event_hook_set(obj, _event_hook);
588 wd->base = edje_object_add(e);
589 elm_widget_resize_object_set(obj, wd->base);
593 wd->first_interval = FLIP_FIRST_INTERVAL;
597 evas_object_smart_callbacks_descriptions_set(obj, _signals);
602 * Select next item of a flipselector.
604 * @param obj The flipselector object
606 * @ingroup Flipselector
609 elm_flipselector_flip_next(Evas_Object *obj)
611 ELM_CHECK_WIDTYPE(obj, widtype);
613 Widget_Data *wd = elm_widget_data_get(obj);
617 if (wd->spin) ecore_timer_del(wd->spin);
619 _flipselector_walk(wd);
621 _flipselector_unwalk(wd);
625 * Select previous item of a flipselector.
627 * @param obj The flipselector object
629 * @ingroup Flipselector
632 elm_flipselector_flip_prev(Evas_Object *obj)
634 ELM_CHECK_WIDTYPE(obj, widtype);
636 Widget_Data *wd = elm_widget_data_get(obj);
640 if (wd->spin) ecore_timer_del(wd->spin);
642 _flipselector_walk(wd);
644 _flipselector_unwalk(wd);
648 * Append item to a flipselector.
650 * @param obj The flipselector object
651 * @param label The label of new item
652 * @param func Convenience function called when item selected
653 * @param data Data passed to @p func above
654 * @return A handle to the item added or NULL, on errors
656 * @note The maximum length of the label is going to be determined by
657 * the widget's theme. Strings larger than that value are going to be
660 * @ingroup Flipselector
662 EAPI Elm_Flipselector_Item *
663 elm_flipselector_item_append(Evas_Object *obj, const char *label, void (*func)(void *data, Evas_Object *obj, void *event_info), void *data)
665 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
667 Elm_Flipselector_Item *item;
670 wd = elm_widget_data_get(obj);
674 item = _item_new(obj, label, func, data);
678 wd->items = eina_list_append(wd->items, item);
680 wd->current = wd->items;
685 (strlen(elm_flipselector_item_label_get(item)) >
686 strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel)))))
688 wd->sentinel = eina_list_last(wd->items);
692 if (eina_list_count(wd->items) >= 2)
693 edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
699 * Prepend item to a flipselector.
701 * @param obj The flipselector object
702 * @param label The label of new item
703 * @param func Convenience function called when item selected
704 * @param data Data passed to @p func above
705 * @return A handle to the item added or NULL, on errors
707 * @note The maximum length of the label is going to be determined by
708 * the widget's theme. Strings larger than that value are going to be
711 * @ingroup Flipselector
713 EAPI Elm_Flipselector_Item *
714 elm_flipselector_item_prepend(Evas_Object *obj, const char *label, void (*func)(void *data, Evas_Object *obj, void *event_info), void *data)
716 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
718 Elm_Flipselector_Item *item;
721 wd = elm_widget_data_get(obj);
725 item = _item_new(obj, label, func, data);
729 wd->items = eina_list_prepend(wd->items, item);
731 wd->current = wd->items;
736 (strlen(elm_flipselector_item_label_get(item)) >
737 strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel)))))
739 wd->sentinel = wd->items;
743 if (eina_list_count(wd->items) >= 2)
744 edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
749 /* TODO: account for deleted items? */
751 * Get a list of items in the flipselector.
753 * @param obj The flipselector object
754 * @return The list of items, or NULL on errors.
756 * @ingroup Flipselector
758 EAPI const Eina_List *
759 elm_flipselector_items_get(const Evas_Object *obj)
761 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
763 Widget_Data *wd = elm_widget_data_get(obj);
771 * Get the first item in the flipselector
773 * @param obj The flipselector object
774 * @return The first item, or NULL if none
776 * @ingroup Flipselector
778 EAPI Elm_Flipselector_Item *
779 elm_flipselector_first_item_get(const Evas_Object *obj)
781 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
783 Elm_Flipselector_Item *it;
787 wd = elm_widget_data_get(obj);
788 if (!wd || !wd->items)
791 EINA_LIST_FOREACH(wd->items, l, it)
803 * Get the last item in the flipselector
805 * @param obj The flipselector object
806 * @return The last item, or NULL if none
808 * @ingroup Flipselector
810 EAPI Elm_Flipselector_Item *
811 elm_flipselector_last_item_get(const Evas_Object *obj)
813 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
815 Elm_Flipselector_Item *it;
819 wd = elm_widget_data_get(obj);
820 if (!wd || !wd->items)
823 EINA_LIST_REVERSE_FOREACH(wd->items, l, it)
835 * Get the selected item in a flipselector.
837 * @param obj The flipselector object
838 * @return The selected item, or NULL if none
840 * @ingroup Flipselector
842 EAPI Elm_Flipselector_Item *
843 elm_flipselector_selected_item_get(const Evas_Object *obj)
845 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
847 Widget_Data *wd = elm_widget_data_get(obj);
848 if (!wd || !wd->current)
851 return DATA_GET(wd->current);
855 * Set the selected state of an item
857 * This sets the selected state (EINA_TRUE selected, EINA_FALSE not selected)
858 * of the given item @p item.
859 * If a new item is selected the previosly selected will be unselected.
860 * If the item @p item is unselected, the first item will be selected.
862 * @param item The item
863 * @param selected The selected state
865 * @ingroup Flipselector
868 elm_flipselector_item_selected_set(Elm_Flipselector_Item *item, Eina_Bool selected)
870 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item);
872 Elm_Flipselector_Item *_item, *cur;
873 int flipside = MSG_FLIP_UP;
877 wd = elm_widget_data_get(item->base.widget);
881 cur = DATA_GET(wd->current);
882 if ((selected) && (cur == item))
885 _flipselector_walk(wd);
887 if ((!selected) && (cur == item))
889 EINA_LIST_FOREACH(wd->items, l, _item)
894 _send_msg(wd, MSG_FLIP_UP, (char *)_item->label);
898 _flipselector_unwalk(wd);
902 EINA_LIST_FOREACH(wd->items, l, _item)
905 flipside = MSG_FLIP_DOWN;
910 _send_msg(wd, flipside, (char *)item->label);
915 _flipselector_unwalk(wd);
919 * Get the selected state of @p item.
921 * @param item The flipselector item
922 * @return If true, the item is selected
924 * @ingroup Flipselector
927 elm_flipselector_item_selected_get(const Elm_Flipselector_Item *item)
929 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
932 wd = elm_widget_data_get(item->base.widget);
933 if (!wd) return EINA_FALSE;
934 return (eina_list_data_get(wd->current) == item);
938 * Delete a given item from a flipselector.
940 * @param item The item
942 * @ingroup Flipselector
945 elm_flipselector_item_del(Elm_Flipselector_Item *item)
947 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item);
951 wd = elm_widget_data_get(item->base.widget);
957 item->deleted = EINA_TRUE;
961 _flipselector_walk(wd);
963 wd->items = eina_list_remove(wd->items, item);
967 _flipselector_unwalk(wd);
971 * Get the label of a given flipselector item.
973 * @param item The item
974 * @return The label of a given item, or NULL if none
976 * @ingroup Flipselector
979 elm_flipselector_item_label_get(const Elm_Flipselector_Item *item)
981 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item, NULL);
983 Elm_Flipselector_Item *_item;
987 wd = elm_widget_data_get(item->base.widget);
988 if ((!wd) || (!wd->items))
991 EINA_LIST_FOREACH(wd->items, l, _item)
999 * Set the label of a given flipselector item.
1001 * @param item The item
1002 * @param label The text label string in UTF-8
1004 * @ingroup Flipselector
1007 elm_flipselector_item_label_set(Elm_Flipselector_Item *item, const char *label)
1009 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item);
1014 if ((!item) || (!label))
1017 wd = elm_widget_data_get(item->base.widget);
1018 if ((!wd) || (!wd->items))
1021 l = eina_list_data_find_list(wd->items, item);
1025 eina_stringshare_del(item->label);
1026 item->label = eina_stringshare_add_length(label, wd->max_len);
1029 strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel))))
1032 if (wd->current == l)
1034 _update_view(item->base.widget);
1035 _sizing_eval(wd->self);
1042 * Gets the item before @p item in a flipselector.
1044 * @param item The item
1045 * @return The item before the item @p item
1047 * @ingroup Flipselector
1049 EAPI Elm_Flipselector_Item *
1050 elm_flipselector_item_prev_get(Elm_Flipselector_Item *item)
1052 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item, NULL);
1054 Elm_Flipselector_Item *_item;
1058 wd = elm_widget_data_get(item->base.widget);
1059 if ((!wd) || (!wd->items))
1062 EINA_LIST_FOREACH(wd->items, l, _item)
1065 l = eina_list_prev(l);
1075 * Gets the item after @p item in a flipselector.
1077 * @param item The item
1078 * @return The item after the item @p item
1080 * @ingroup Flipselector
1082 EAPI Elm_Flipselector_Item *
1083 elm_flipselector_item_next_get(Elm_Flipselector_Item *item)
1085 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item, NULL);
1087 Elm_Flipselector_Item *_item;
1091 wd = elm_widget_data_get(item->base.widget);
1092 if ((!wd) || (!wd->items))
1095 EINA_LIST_FOREACH(wd->items, l, _item)
1098 l = eina_list_next(l);
1108 * Set the flipping interval for the flipselector.
1110 * @param obj The flipselector object
1111 * @param interval The interval value in seconds
1113 * The interval value is decreased while the user flips the widget up
1114 * or down repeatedly. The next interval value is the previous
1115 * interval / 1.05, so it speeds up a bit. Default value is 0.85
1118 * @ingroup Flipselector
1121 elm_flipselector_interval_set(Evas_Object *obj, double interval)
1123 ELM_CHECK_WIDTYPE(obj, widtype);
1125 Widget_Data *wd = elm_widget_data_get(obj);
1129 wd->first_interval = interval;
1133 * Get the flipping interval of the flipselector.
1135 * @param obj The flipselector object
1136 * @return The value of the first interval in seconds
1138 * The interval value is decreased while the user flips the widget up
1139 * or down repeatedly. The next interval value is the previous
1140 * interval / 1.05, so it speeds up a bit. Default value is 0.85
1143 * @ingroup Flipselector
1146 elm_flipselector_interval_get(const Evas_Object *obj)
1148 ELM_CHECK_WIDTYPE(obj, widtype) 0.0;
1150 Widget_Data *wd = elm_widget_data_get(obj);
1154 return wd->first_interval;