From 5bc2f512b69c5d269193bb9f4e9173718b64a59f Mon Sep 17 00:00:00 2001 From: JinYong Park Date: Wed, 31 Jan 2018 17:06:54 +0900 Subject: [PATCH] popup: add block,clicked event to main layout for toast/small style only In wearable profile, toast/small style popup need extraordinary event callback For that style only, send block,clicked event when user touch in popup. @tizen_fix Change-Id: I3be25fd26e5dcd8acd685c9ed558cb4733b5d768 Signed-off-by: JinYong Park --- src/lib/elc_popup.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c index 5223ca7..ccdd098 100644 --- a/src/lib/elc_popup.c +++ b/src/lib/elc_popup.c @@ -137,6 +137,18 @@ _block_clicked_cb(void *data, return EINA_TRUE; } +/* TIZEN_ONLY(20180131): add block,clicked event to main layout + for wearable toast/small style only */ +static void +_block_area_clicked_cb(void *data, + Evas_Object *obj EINA_UNUSED, + const char *emission EINA_UNUSED, + const char *source EINA_UNUSED) +{ + eo_do(data, eo_event_callback_call(ELM_POPUP_EVENT_BLOCK_CLICKED, NULL)); +} +/* END */ + static Eina_Bool _timeout_cb(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) @@ -2125,6 +2137,12 @@ _elm_popup_evas_object_smart_add(Eo *obj, Elm_Popup_Data *priv) elm_widget_style_get(obj))) CRI("Failed to set layout!"); + /* TIZEN_ONLY(20180131): add block,clicked event to main layout + for wearable toast/small style only */ + elm_layout_signal_callback_add + (priv->main_layout, "elm,action,block,click", "elm", _block_area_clicked_cb, obj); + /* END */ + elm_object_content_set(priv->notify, priv->main_layout); evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _on_show, NULL); -- 2.7.4