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 {
43 typedef struct _Widget_Data Widget_Data;
50 Eina_List *sentinel; /* item containing the largest label string */
54 double interval, first_interval;
57 static const char *widtype = NULL;
58 static void _del_hook(Evas_Object *obj);
59 static void _theme_hook(Evas_Object *obj);
60 static void _sizing_eval(Evas_Object *obj);
61 static void _update_view(Evas_Object *obj);
62 static void _callbacks_set(Evas_Object *obj);
63 static void _flip_up(Widget_Data *wd);
64 static void _flip_down(Widget_Data *wd);
66 static const char SIG_SELECTED[] = "selected";
67 static const char SIG_UNDERFLOWED[] = "underflowed";
68 static const char SIG_OVERFLOWED[] = "overflowed";
69 static const Evas_Smart_Cb_Description _signals[] = {
71 {SIG_UNDERFLOWED, ""},
76 #define ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(it, ...) \
77 ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, __VA_ARGS__); \
80 ERR(""#it" has been DELETED.\n"); \
84 static Elm_Flipselector_Item *
85 _item_new(Evas_Object *obj, const char *label, Evas_Smart_Cb func, const void *data)
88 Elm_Flipselector_Item *it;
89 Widget_Data *wd = elm_widget_data_get(obj);
91 it = elm_widget_item_new(obj, Elm_Flipselector_Item);
96 if (len > wd->max_len)
99 it->label = eina_stringshare_add_length(label, len);
101 it->base.data = data;
103 /* TODO: no view here, but if one desires general contents in the
109 _item_free(Elm_Flipselector_Item *it)
111 eina_stringshare_del(it->label);
112 elm_widget_item_del(it);
116 _del_hook(Evas_Object *obj)
118 Elm_Flipselector_Item *item;
120 Widget_Data *wd = elm_widget_data_get(obj);
125 ERR("flipselector deleted while walking.\n");
127 EINA_LIST_FREE(wd->items, item)
130 if (wd->spin) ecore_timer_del(wd->spin);
135 _theme_hook(Evas_Object *obj)
140 wd = elm_widget_data_get(obj);
144 _elm_theme_object_set(obj, wd->base, "flipselector", "base",
145 elm_widget_style_get(obj));
146 edje_object_scale_set(wd->base,
147 elm_widget_scale_get(obj) * _elm_config->scale);
149 max_len = edje_object_data_get(wd->base, "max_len");
151 wd->max_len = MAX_LEN_DEFAULT;
154 wd->max_len = atoi(max_len);
156 wd->max_len = MAX_LEN_DEFAULT;
164 _sentinel_eval(Widget_Data *wd)
166 Elm_Flipselector_Item *it;
175 wd->sentinel = wd->items;
177 EINA_LIST_FOREACH(wd->items, l, it)
179 if (strlen(elm_flipselector_item_label_get(it)) >
180 strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel))))
185 /* TODO: create a flag to avoid looping here all times */
187 _flipselector_process_deletions(Widget_Data *wd)
189 Elm_Flipselector_Item *it;
191 Eina_Bool skip = EINA_TRUE;
192 Eina_Bool sentinel_eval = EINA_FALSE;
194 wd->walking++; /* avoid nested deletions */
196 EINA_LIST_FOREACH(wd->items, l, it)
201 if (wd->current == l)
203 if (wd->current == wd->sentinel)
204 sentinel_eval = EINA_TRUE;
206 wd->current = eina_list_prev(wd->current);
208 wd->items = eina_list_remove(wd->items, it);
211 wd->current = wd->items;
216 if (eina_list_count(wd->items) <= 1)
217 edje_object_signal_emit(wd->base, "elm,state,button,hidden", "elm");
219 edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
223 _update_view(wd->self);
232 _flipselector_walk(Widget_Data *wd)
236 ERR("walking was negative. fixed!\n");
243 _flipselector_unwalk(Widget_Data *wd)
248 ERR("walking became negative. fixed!\n");
255 _flipselector_process_deletions(wd);
259 _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type type, void *event_info)
261 Evas_Event_Key_Down *ev;
263 Eina_Bool is_up = EINA_TRUE;
265 if (type != EVAS_CALLBACK_KEY_DOWN)
268 wd = elm_widget_data_get(obj);
273 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
276 if (elm_widget_disabled_get(obj))
279 if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
281 else if ((strcmp(ev->keyname, "Up")) && (strcmp(ev->keyname, "KP_Up")))
284 if (wd->spin) ecore_timer_del(wd->spin);
286 /* TODO: if direction setting via API is not coming in, replace
287 these calls by flip_{next,prev} */
288 _flipselector_walk(wd);
293 _flipselector_unwalk(wd);
295 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
300 _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
302 Widget_Data *wd = elm_widget_data_get(obj);
306 /* FIXME: no treatment of this signal so far */
307 if (elm_widget_focus_get(obj))
309 edje_object_signal_emit(wd->base, "elm,action,focus", "elm");
310 evas_object_focus_set(wd->base, EINA_TRUE);
314 edje_object_signal_emit(wd->base, "elm,action,unfocus", "elm");
315 evas_object_focus_set(wd->base, EINA_FALSE);
320 _sizing_eval(Evas_Object *obj)
323 const char *tmp = NULL;
324 Evas_Coord minw = -1, minh = -1, w, h;
326 wd = elm_widget_data_get(obj);
330 elm_coords_finger_size_adjust(1, &minw, 2, &minh);
334 const char *label = \
335 elm_flipselector_item_label_get(DATA_GET(wd->sentinel));
337 tmp = edje_object_part_text_get(wd->base, "top");
338 edje_object_part_text_set(wd->base, "top", label);
341 edje_object_size_min_restricted_calc(wd->base, &minw, &minh, minw, minh);
342 elm_coords_finger_size_adjust(1, &minw, 2, &minh);
343 evas_object_size_hint_min_get(obj, &w, &h);
346 edje_object_part_text_set(wd->base, "top", tmp);
348 if (w > minw) minw = w;
349 if (h > minh) minh = h;
351 evas_object_size_hint_min_set(obj, minw, minh);
355 _update_view(Evas_Object *obj)
359 Elm_Flipselector_Item *item;
361 wd = elm_widget_data_get(obj);
366 item = DATA_GET(wd->current);
370 edje_object_part_text_set(wd->base, "top", label ? label : "");
371 edje_object_part_text_set(wd->base, "bottom", label ? label : "");
373 edje_object_message_signal_process(wd->base);
377 _changed(Widget_Data *wd)
379 Elm_Flipselector_Item *item;
381 item = DATA_GET(wd->current);
386 item->func((void *)item->base.data, item->base.widget, item);
388 evas_object_smart_callback_call(wd->self, SIG_SELECTED, item);
392 _send_msg(Widget_Data *wd, int flipside, char *label)
394 Edje_Message_String msg;
397 edje_object_message_send(wd->base, EDJE_MESSAGE_STRING, flipside, &msg);
398 edje_object_message_signal_process(wd->base);
404 _flip_up(Widget_Data *wd)
406 Elm_Flipselector_Item *item;
411 if (wd->current == wd->items)
413 wd->current = eina_list_last(wd->items);
414 evas_object_smart_callback_call(wd->self, SIG_UNDERFLOWED, NULL);
417 wd->current = eina_list_prev(wd->current);
419 item = DATA_GET(wd->current);
423 _send_msg(wd, MSG_FLIP_UP, (char *)item->label);
427 _signal_val_up(void *data)
429 Widget_Data *wd = elm_widget_data_get(data);
432 goto val_up_exit_on_error;
434 _flipselector_walk(wd);
436 if (wd->interval > FLIP_MIN_INTERVAL)
437 wd->interval = wd->interval / 1.05;
439 ecore_timer_interval_set(wd->spin, wd->interval);
443 _flipselector_unwalk(wd);
445 return ECORE_CALLBACK_RENEW;
447 val_up_exit_on_error:
448 return ECORE_CALLBACK_CANCEL;
452 _signal_val_up_start(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
454 Widget_Data *wd = elm_widget_data_get(data);
458 wd->interval = wd->first_interval;
461 ecore_timer_del(wd->spin);
462 wd->spin = ecore_timer_add(wd->interval, _signal_val_up, data);
464 _signal_val_up(data);
468 _flip_down(Widget_Data *wd)
470 Elm_Flipselector_Item *item;
475 wd->current = eina_list_next(wd->current);
478 wd->current = wd->items;
479 evas_object_smart_callback_call(wd->self, SIG_OVERFLOWED, NULL);
482 item = DATA_GET(wd->current);
486 _send_msg(wd, MSG_FLIP_DOWN, (char *)item->label);
490 _signal_val_down(void *data)
492 Widget_Data *wd = elm_widget_data_get(data);
495 goto val_down_exit_on_error;
497 _flipselector_walk(wd);
499 if (wd->interval > FLIP_MIN_INTERVAL)
500 wd->interval = wd->interval / 1.05;
501 ecore_timer_interval_set(wd->spin, wd->interval);
505 _flipselector_unwalk(wd);
507 return ECORE_CALLBACK_RENEW;
509 val_down_exit_on_error:
510 return ECORE_CALLBACK_CANCEL;
514 _signal_val_down_start(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
516 Widget_Data *wd = elm_widget_data_get(data);
520 wd->interval = wd->first_interval;
523 ecore_timer_del(wd->spin);
524 wd->spin = ecore_timer_add(wd->interval, _signal_val_down, data);
526 _signal_val_down(data);
530 _signal_val_change_stop(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
532 Widget_Data *wd = elm_widget_data_get(data);
537 ecore_timer_del(wd->spin);
542 _callbacks_set(Evas_Object *obj)
544 Widget_Data *wd = elm_widget_data_get(obj);
546 edje_object_signal_callback_add(wd->base, "elm,action,up,start",
547 "", _signal_val_up_start, obj);
548 edje_object_signal_callback_add(wd->base, "elm,action,up,stop",
549 "", _signal_val_change_stop, obj);
550 edje_object_signal_callback_add(wd->base, "elm,action,down,start",
551 "", _signal_val_down_start, obj);
552 edje_object_signal_callback_add(wd->base, "elm,action,down,stop",
553 "", _signal_val_change_stop, obj);
557 * Add a new flipselector to the parent.
559 * @param parent The parent object
560 * @return The new object or NULL, if it cannot be created
562 * @ingroup Flipselector
565 elm_flipselector_add(Evas_Object *parent)
571 ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
573 ELM_SET_WIDTYPE(widtype, "flipselector");
574 elm_widget_type_set(obj, "flipselector");
575 elm_widget_sub_object_add(parent, obj);
576 elm_widget_data_set(obj, wd);
578 elm_widget_del_hook_set(obj, _del_hook);
579 elm_widget_theme_hook_set(obj, _theme_hook);
580 /* TODO: elm_widget_disable_hook_set(obj, _disable_hook); */
582 elm_widget_can_focus_set(obj, EINA_TRUE);
583 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
584 elm_widget_event_hook_set(obj, _event_hook);
586 wd->base = edje_object_add(e);
587 elm_widget_resize_object_set(obj, wd->base);
591 wd->first_interval = FLIP_FIRST_INTERVAL;
595 evas_object_smart_callbacks_descriptions_set(obj, _signals);
600 * Select next item of a flipselector.
602 * @param obj The flipselector object
604 * @ingroup Flipselector
607 elm_flipselector_flip_next(Evas_Object *obj)
609 ELM_CHECK_WIDTYPE(obj, widtype);
611 Widget_Data *wd = elm_widget_data_get(obj);
615 if (wd->spin) ecore_timer_del(wd->spin);
617 _flipselector_walk(wd);
619 _flipselector_unwalk(wd);
623 * Select previous item of a flipselector.
625 * @param obj The flipselector object
627 * @ingroup Flipselector
630 elm_flipselector_flip_prev(Evas_Object *obj)
632 ELM_CHECK_WIDTYPE(obj, widtype);
634 Widget_Data *wd = elm_widget_data_get(obj);
638 if (wd->spin) ecore_timer_del(wd->spin);
640 _flipselector_walk(wd);
642 _flipselector_unwalk(wd);
646 * Append item to a flipselector.
648 * @param obj The flipselector object
649 * @param label The label of new item
650 * @param func Convenience function called when item selected
651 * @param data Data passed to @p func above
652 * @return A handle to the item added or NULL, on errors
654 * @note The maximum length of the label is going to be determined by
655 * the widget's theme. Strings larger than that value are going to be
658 * @ingroup Flipselector
660 EAPI Elm_Flipselector_Item *
661 elm_flipselector_item_append(Evas_Object *obj, const char *label, void (*func)(void *data, Evas_Object *obj, void *event_info), void *data)
663 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
665 Elm_Flipselector_Item *item;
668 wd = elm_widget_data_get(obj);
672 item = _item_new(obj, label, func, data);
676 wd->items = eina_list_append(wd->items, item);
678 wd->current = wd->items;
683 (strlen(elm_flipselector_item_label_get(item)) >
684 strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel)))))
686 wd->sentinel = eina_list_last(wd->items);
690 if (eina_list_count(wd->items) >= 2)
691 edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
697 * Prepend item to a flipselector.
699 * @param obj The flipselector object
700 * @param label The label of new item
701 * @param func Convenience function called when item selected
702 * @param data Data passed to @p func above
703 * @return A handle to the item added or NULL, on errors
705 * @note The maximum length of the label is going to be determined by
706 * the widget's theme. Strings larger than that value are going to be
709 * @ingroup Flipselector
711 EAPI Elm_Flipselector_Item *
712 elm_flipselector_item_prepend(Evas_Object *obj, const char *label, void (*func)(void *data, Evas_Object *obj, void *event_info), void *data)
714 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
716 Elm_Flipselector_Item *item;
719 wd = elm_widget_data_get(obj);
723 item = _item_new(obj, label, func, data);
727 wd->items = eina_list_prepend(wd->items, item);
729 wd->current = wd->items;
734 (strlen(elm_flipselector_item_label_get(item)) >
735 strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel)))))
737 wd->sentinel = wd->items;
741 if (eina_list_count(wd->items) >= 2)
742 edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
747 /* TODO: account for deleted items? */
749 * Get a list of items in the flipselector.
751 * @param obj The flipselector object
752 * @return The list of items, or NULL on errors.
754 * @ingroup Flipselector
756 EAPI const Eina_List *
757 elm_flipselector_items_get(const Evas_Object *obj)
759 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
761 Widget_Data *wd = elm_widget_data_get(obj);
769 * Get the first item in the flipselector
771 * @param obj The flipselector object
772 * @return The first item, or NULL if none
774 * @ingroup Flipselector
776 EAPI Elm_Flipselector_Item *
777 elm_flipselector_first_item_get(const Evas_Object *obj)
779 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
781 Elm_Flipselector_Item *it;
785 wd = elm_widget_data_get(obj);
786 if (!wd || !wd->items)
789 EINA_LIST_FOREACH(wd->items, l, it)
801 * Get the last item in the flipselector
803 * @param obj The flipselector object
804 * @return The last item, or NULL if none
806 * @ingroup Flipselector
808 EAPI Elm_Flipselector_Item *
809 elm_flipselector_last_item_get(const Evas_Object *obj)
811 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
813 Elm_Flipselector_Item *it;
817 wd = elm_widget_data_get(obj);
818 if (!wd || !wd->items)
821 EINA_LIST_REVERSE_FOREACH(wd->items, l, it)
833 * Get the selected item in a flipselector.
835 * @param obj The flipselector object
836 * @return The selected item, or NULL if none
838 * @ingroup Flipselector
840 EAPI Elm_Flipselector_Item *
841 elm_flipselector_selected_item_get(const Evas_Object *obj)
843 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
845 Widget_Data *wd = elm_widget_data_get(obj);
846 if (!wd || !wd->current)
849 return DATA_GET(wd->current);
853 * Set the selected state of an item
855 * This sets the selected state (EINA_TRUE selected, EINA_FALSE not selected)
856 * of the given item @p item.
857 * If a new item is selected the previosly selected will be unselected.
858 * If the item @p item is unselected, the first item will be selected.
860 * @param item The item
861 * @param selected The selected state
863 * @ingroup Flipselector
866 elm_flipselector_item_selected_set(Elm_Flipselector_Item *item, Eina_Bool selected)
868 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item);
870 Elm_Flipselector_Item *_item, *cur;
871 int flipside = MSG_FLIP_UP;
875 wd = elm_widget_data_get(item->base.widget);
879 cur = DATA_GET(wd->current);
880 if ((selected) && (cur == item))
883 _flipselector_walk(wd);
885 if ((!selected) && (cur == item))
887 EINA_LIST_FOREACH(wd->items, l, _item)
892 _send_msg(wd, MSG_FLIP_UP, (char *)_item->label);
896 _flipselector_unwalk(wd);
900 EINA_LIST_FOREACH(wd->items, l, _item)
903 flipside = MSG_FLIP_DOWN;
908 _send_msg(wd, flipside, (char *)item->label);
913 _flipselector_unwalk(wd);
917 * Get the selected state of @p item.
919 * @param item The flipselector item
920 * @return If true, the item is selected
922 * @ingroup Flipselector
925 elm_flipselector_item_selected_get(const Elm_Flipselector_Item *item)
927 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
930 wd = elm_widget_data_get(item->base.widget);
931 if (!wd) return EINA_FALSE;
932 return (eina_list_data_get(wd->current) == item);
936 * Delete a given item from a flipselector.
938 * @param item The item
940 * @ingroup Flipselector
943 elm_flipselector_item_del(Elm_Flipselector_Item *item)
945 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item);
949 wd = elm_widget_data_get(item->base.widget);
955 item->deleted = EINA_TRUE;
959 _flipselector_walk(wd);
961 wd->items = eina_list_remove(wd->items, item);
965 _flipselector_unwalk(wd);
969 * Get the label of a given flipselector item.
971 * @param item The item
972 * @return The label of a given item, or NULL if none
974 * @ingroup Flipselector
977 elm_flipselector_item_label_get(const Elm_Flipselector_Item *item)
979 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item, NULL);
981 Elm_Flipselector_Item *_item;
985 wd = elm_widget_data_get(item->base.widget);
986 if ((!wd) || (!wd->items))
989 EINA_LIST_FOREACH(wd->items, l, _item)
997 * Set the label of a given flipselector item.
999 * @param item The item
1000 * @param label The text label string in UTF-8
1002 * @ingroup Flipselector
1005 elm_flipselector_item_label_set(Elm_Flipselector_Item *item, const char *label)
1007 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item);
1012 if ((!item) || (!label))
1015 wd = elm_widget_data_get(item->base.widget);
1016 if ((!wd) || (!wd->items))
1019 l = eina_list_data_find_list(wd->items, item);
1023 eina_stringshare_del(item->label);
1024 item->label = eina_stringshare_add_length(label, wd->max_len);
1027 strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel))))
1030 if (wd->current == l)
1032 _update_view(item->base.widget);
1033 _sizing_eval(wd->self);
1040 * Gets the item before @p item in a flipselector.
1042 * @param item The item
1043 * @return The item before the item @p item
1045 * @ingroup Flipselector
1047 EAPI Elm_Flipselector_Item *
1048 elm_flipselector_item_prev_get(Elm_Flipselector_Item *item)
1050 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item, NULL);
1052 Elm_Flipselector_Item *_item;
1056 wd = elm_widget_data_get(item->base.widget);
1057 if ((!wd) || (!wd->items))
1060 EINA_LIST_FOREACH(wd->items, l, _item)
1063 l = eina_list_prev(l);
1073 * Gets the item after @p item in a flipselector.
1075 * @param item The item
1076 * @return The item after the item @p item
1078 * @ingroup Flipselector
1080 EAPI Elm_Flipselector_Item *
1081 elm_flipselector_item_next_get(Elm_Flipselector_Item *item)
1083 ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item, NULL);
1085 Elm_Flipselector_Item *_item;
1089 wd = elm_widget_data_get(item->base.widget);
1090 if ((!wd) || (!wd->items))
1093 EINA_LIST_FOREACH(wd->items, l, _item)
1096 l = eina_list_next(l);
1106 * Set the flipping interval for the flipselector.
1108 * @param obj The flipselector object
1109 * @param interval The interval value in seconds
1111 * The interval value is decreased while the user flips the widget up
1112 * or down repeatedly. The next interval value is the previous
1113 * interval / 1.05, so it speeds up a bit. Default value is 0.85
1116 * @ingroup Flipselector
1119 elm_flipselector_interval_set(Evas_Object *obj, double interval)
1121 ELM_CHECK_WIDTYPE(obj, widtype);
1123 Widget_Data *wd = elm_widget_data_get(obj);
1127 wd->first_interval = interval;
1131 * Get the flipping interval of the flipselector.
1133 * @param obj The flipselector object
1134 * @return The value of the first interval in seconds
1136 * The interval value is decreased while the user flips the widget up
1137 * or down repeatedly. The next interval value is the previous
1138 * interval / 1.05, so it speeds up a bit. Default value is 0.85
1141 * @ingroup Flipselector
1144 elm_flipselector_interval_get(const Evas_Object *obj)
1146 ELM_CHECK_WIDTYPE(obj, widtype) 0.0;
1148 Widget_Data *wd = elm_widget_data_get(obj);
1152 return wd->first_interval;