summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-31 18:32:02 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-01 10:09:37 +0900
commitcfe8170624c51761932b48fd6bb57f1c52dcff93 (patch)
treeb3a2954b5ae38ffda91e21a43d572beed1da5735 /src/lib/elementary/efl_ui_win.c
parent74290355dab1efc80ced19e932e41fa29f7ae70b (diff)
win: Fixup doc & code of icon_object
Ref T5322
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_win.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 9df4c7245a..b06bdaafdc 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -3282,6 +3282,8 @@ _elm_win_xwin_update(Efl_Ui_Win_Data *sd)
3282 3282
3283 if (efl_isa(sd->icon, EFL_CANVAS_IMAGE_INTERNAL_CLASS)) 3283 if (efl_isa(sd->icon, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
3284 image = sd->icon; 3284 image = sd->icon;
3285 else if (efl_isa(sd->icon, EFL_UI_IMAGE_CLASS))
3286 image = elm_image_object_get(sd->icon);
3285 3287
3286 if (image) 3288 if (image)
3287 { 3289 {
@@ -4535,14 +4537,11 @@ _win_inlined_image_set(Efl_Ui_Win_Data *sd)
4535} 4537}
4536 4538
4537static void 4539static void
4538_elm_win_on_icon_del(void *data, 4540_elm_win_on_icon_del(void *data, const Efl_Event *ev)
4539 Evas *e EINA_UNUSED,
4540 Evas_Object *obj,
4541 void *event_info EINA_UNUSED)
4542{ 4541{
4543 ELM_WIN_DATA_GET(data, sd); 4542 ELM_WIN_DATA_GET(data, sd);
4544 4543
4545 if (sd->icon == obj) sd->icon = NULL; 4544 if (sd->icon == ev->object) sd->icon = NULL;
4546} 4545}
4547 4546
4548EOLIAN static void 4547EOLIAN static void
@@ -5489,15 +5488,23 @@ _efl_ui_win_role_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
5489EOLIAN static void 5488EOLIAN static void
5490_efl_ui_win_icon_object_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Object *icon) 5489_efl_ui_win_icon_object_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Object *icon)
5491{ 5490{
5491 if (icon && (!efl_isa(sd->icon, EFL_CANVAS_IMAGE_INTERNAL_CLASS) &&
5492 !efl_isa(sd->icon, EFL_UI_IMAGE_CLASS)))
5493 {
5494 ERR("Icon object type is not supported!");
5495 efl_del(icon);
5496 return;
5497 }
5498
5492 if (sd->icon) 5499 if (sd->icon)
5493 evas_object_event_callback_del_full(sd->icon, EVAS_CALLBACK_DEL, 5500 {
5494 _elm_win_on_icon_del, obj); 5501 efl_event_callback_del(sd->icon, EFL_EVENT_DEL, _elm_win_on_icon_del, obj);
5495 evas_object_del(sd->icon); 5502 efl_del(sd->icon);
5503 }
5496 sd->icon = icon; 5504 sd->icon = icon;
5497 if (sd->icon) 5505 if (sd->icon)
5498 { 5506 {
5499 evas_object_event_callback_add(sd->icon, EVAS_CALLBACK_DEL, 5507 efl_event_callback_add(sd->icon, EFL_EVENT_DEL, _elm_win_on_icon_del, obj);
5500 _elm_win_on_icon_del, obj);
5501 if (sd->frame_obj) 5508 if (sd->frame_obj)
5502 { 5509 {
5503 edje_object_part_swallow(sd->frame_obj, "elm.swallow.icon", sd->icon); 5510 edje_object_part_swallow(sd->frame_obj, "elm.swallow.icon", sd->icon);