Colorselector: Item_signal_emit_hook added.

Summary:
Issue: If application has to preselect an item, or change item properties by customizing theme
there is no option provided for the same.
Solution: Add item_signal_emit_hook.
Signed-off by: Shilpa Singh <shilpa.singh@samsung.com>

Test Plan:
Send a signal to item and verify UI
Elm_Object_Item *item = elm_colorselector_palette_color_add(cs, 133, 100, 255, 255);
elm_object_item_signal_emit(item, "elm,state,selected", "elm");

Reviewers: seoz, Hermet

Reviewed By: seoz

CC: govi

Differential Revision: https://phab.enlightenment.org/D504
This commit is contained in:
Daniel Juyung Seo 2014-02-04 00:30:37 +09:00
parent e5f8b9f9dd
commit 5a787bf58a
1 changed files with 10 additions and 0 deletions

View File

@ -1372,6 +1372,14 @@ _item_resize(void *data EINA_UNUSED,
elm_layout_sizing_eval(obj);
}
static void
_item_signal_emit_hook(Elm_Object_Item *it,
const char *emission,
const char *source)
{
elm_object_signal_emit(VIEW(it), emission, source);
}
static Elm_Color_Item *
_item_new(Evas_Object *obj)
{
@ -1404,6 +1412,8 @@ _item_new(Evas_Object *obj)
(item->color_obj, EVAS_CALLBACK_MOUSE_UP, _on_color_released, item);
elm_object_part_content_set(VIEW(item), "color_obj", item->color_obj);
elm_widget_item_signal_emit_hook_set(item, _item_signal_emit_hook);
_item_sizing_eval(item);
evas_object_show(VIEW(item));