From: yoz Date: Tue, 7 Feb 2012 23:39:19 +0000 (+0000) Subject: elementary: add hooks text to elm_win, from Davide Andreoli. Thanks! X-Git-Tag: REL_F_I9500_20120323_1~17^2~782 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5243f1c85fe315e7ecea35704a29abc5d728621;p=framework%2Fuifw%2Felementary.git elementary: add hooks text to elm_win, from Davide Andreoli. Thanks! git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67743 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 3f32ef2..638b1d5 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -2765,6 +2765,25 @@ _elm_inwin_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas } static void +_elm_inwin_text_set_hook(Evas_Object *obj, const char *item, const char *text) +{ + Widget_Data *wd = elm_widget_data_get(obj); + + if (!wd || !item) return; + edje_object_part_text_set(wd->frm, item, text); + _sizing_eval(obj); +} + +static const char * +_elm_inwin_text_get_hook(const Evas_Object *obj, const char *item) +{ + Widget_Data *wd = elm_widget_data_get(obj); + + if (!item || !wd || !wd->frm) return NULL; + return edje_object_part_text_get(wd->frm, item); +} + +static void _sizing_eval(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); @@ -2819,6 +2838,8 @@ elm_win_inwin_add(Evas_Object *obj) elm_widget_del_hook_set(obj2, _del_hook); elm_widget_theme_hook_set(obj2, _theme_hook); elm_widget_focus_next_hook_set(obj2, _elm_inwin_focus_next_hook); + elm_widget_text_set_hook_set(obj2, _elm_inwin_text_set_hook); + elm_widget_text_get_hook_set(obj2, _elm_inwin_text_get_hook); elm_widget_can_focus_set(obj2, EINA_TRUE); elm_widget_highlight_ignore_set(obj2, EINA_TRUE);