EAPI void elm_imageslider_prev(Evas_Object *obj);
EAPI void elm_imageslider_next(Evas_Object *obj);
+ /* Selection Info */
EAPI Evas_Object *elm_selectioninfo_add(Evas_Object *parent);
EAPI void elm_selectioninfo_content_set(Evas_Object *obj, Evas_Object *content);
EAPI void elm_selectioninfo_parent_set(Evas_Object *obj, Evas_Object *parent);
+ EAPI void elm_selectioninfo_timeout_set(Evas_Object *obj, int timeout);
+ EAPI void elm_selectioninfo_timer_init(Evas_Object *obj);
EAPI void elm_selectioninfo_check_state_set(Evas_Object *obj, Eina_Bool *state, int count);
EAPI int elm_selectioninfo_checked_count_get(Evas_Object *obj);
EAPI void elm_selectioninfo_label_set(Evas_Object *obj, char* text);
+ /* smart callback called:
+ * "selectioninfo,timeout" - when time out
+ */
+
#ifdef __cplusplus
}
#endif
Evas_Object* parent;
Eina_Bool* check_state;
int check_count;
+
+ int timeout;
+ Ecore_Timer *timer;
};
static const char *widtype = NULL;
if (!wd) return;
elm_selectioninfo_content_set(obj, NULL);
elm_selectioninfo_parent_set(obj, NULL);
+ if (wd->timer)
+ {
+ ecore_timer_del(wd->timer);
+ wd->timer = NULL;
+ }
free(wd);
}
_sizing_eval(obj);
}
+static Eina_Bool
+_timer_cb(void *data)
+{
+ Evas_Object *obj = data;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return ECORE_CALLBACK_CANCEL;
+ wd->timer = NULL;
+ evas_object_hide(obj);
+ evas_object_smart_callback_call(obj, "selectioninfo,timeout", NULL);
+ return ECORE_CALLBACK_CANCEL;
+}
+
+
static void
_show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_show(wd->selectioninfo);
+ if (wd->timer)
+ {
+ ecore_timer_del(wd->timer);
+ wd->timer = NULL;
+ }
+ if (wd->timeout > 0)
+ wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
}
static void
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_hide(wd->selectioninfo);
+ if (wd->timer)
+ {
+ ecore_timer_del(wd->timer);
+ wd->timer = NULL;
+ }
}
static void
}
/**
+ * Set the time before the selectioninfo window is hidden. <br>
+ * Set a value < 0 to disable the timer
+ *
+ * @param obj The selectioninfo object
+ * @param time the new timeout
+ *
+ * @ingroup Selectioninfo
+ */
+EAPI void
+elm_selectioninfo_timeout_set(Evas_Object *obj, int timeout)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ wd->timeout = timeout;
+ elm_selectioninfo_timer_init(obj);
+}
+
+/**
+ * Re-init the timer
+ * @param obj The selectioninfo object
+ *
+ * @ingroup Selctioninfo
+ */
+EAPI void
+elm_selectioninfo_timer_init(Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (wd->timer) ecore_timer_del(wd->timer);
+ wd->timer = NULL;
+ if (wd->timeout > 0)
+ wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
+}
+
+/**
* Set the check state to the selectioninfo
*
* @param obj The selectioninfo object