forked from enlightenment/efl
Set signal emit hooks for entry, scroller and scrolled entry.
SVN revision: 49682
This commit is contained in:
parent
db550353a8
commit
64c0cbc955
|
@ -126,6 +126,16 @@ _disable_hook(Evas_Object *obj)
|
|||
elm_object_disabled_set(wd->entry, elm_widget_disabled_get(obj));
|
||||
}
|
||||
|
||||
static void
|
||||
_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
elm_object_signal_emit(wd->entry, emission, source);
|
||||
elm_object_signal_emit(wd->scroller, emission, source);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_entry_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
|
@ -251,6 +261,7 @@ elm_scrolled_entry_add(Evas_Object *parent)
|
|||
elm_widget_disable_hook_set(obj, _disable_hook);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
|
||||
|
||||
wd->scroller = elm_scroller_add(parent);
|
||||
elm_widget_resize_object_set(obj, wd->scroller);
|
||||
|
|
|
@ -355,6 +355,14 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
edje_object_signal_emit(wd->ent, emission, source);
|
||||
}
|
||||
|
||||
static void
|
||||
_hoversel_position(Evas_Object *obj)
|
||||
{
|
||||
|
@ -1274,6 +1282,7 @@ elm_entry_add(Evas_Object *parent)
|
|||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_disable_hook_set(obj, _disable_hook);
|
||||
elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
|
||||
wd->linewrap = EINA_TRUE;
|
||||
|
|
|
@ -96,6 +96,15 @@ _theme_hook(Evas_Object *obj)
|
|||
_sizing_eval(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
|
||||
emission, source);
|
||||
}
|
||||
|
||||
static void
|
||||
_show_region_hook(void *data, Evas_Object *obj)
|
||||
{
|
||||
|
@ -300,6 +309,7 @@ elm_scroller_add(Evas_Object *parent)
|
|||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
|
||||
|
||||
wd->widget_name = eina_stringshare_add("scroller");
|
||||
wd->widget_base = eina_stringshare_add("base");
|
||||
|
|
Loading…
Reference in New Issue