From e697500ad21886e2240c58927f93d76b12a76ca1 Mon Sep 17 00:00:00 2001 From: Myungjae Lee Date: Sat, 2 Oct 2010 14:22:33 +0900 Subject: [PATCH] [label] added sliding text feature --- src/lib/Elementary.h.in | 1 + src/lib/elm_label.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index d282e8e..91fe3c1 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -555,6 +555,7 @@ extern "C" { EAPI void elm_label_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a); EAPI void elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis); EAPI void elm_label_wrap_mode_set(Evas_Object *obj, Eina_Bool wrapmode); + EAPI void elm_label_slide_set(Evas_Object *obj, Eina_Bool slide); /* available styles: * default * marker diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c index 11de33e..bfd4c6d 100644 --- a/src/lib/elm_label.c +++ b/src/lib/elm_label.c @@ -836,3 +836,23 @@ elm_label_wrap_mode_set(Evas_Object *obj, Eina_Bool wrapmode) wd->changed = 1; _sizing_eval(obj); } + +/** + * Set the text slide of the label + * + * @param obj The label object + * @param slide To start slide or stop + * @ingroup Label + */ +EAPI void +elm_label_slide_set(Evas_Object *obj, Eina_Bool slide) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return; + + if (slide) + edje_object_signal_emit(wd->lbl, "elm,state,slide,start", "elm"); + else + edje_object_signal_emit(wd->lbl, "elm,state,slide,stop", "elm"); +} -- 2.7.4