summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2013-10-17 00:54:54 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-10-17 01:19:40 +0900
commit8f497603fa7d32c781030679417b40d7830fa416 (patch)
tree863695173917fed36b4ce7e88abb3aa686d43c93
parent12bbcd1a3a5c9e0a1a235166de2fca99dcfa5a0c (diff)
[elm_widget] Enable not to add resize object to or delete resize object from sub object when the resize object is set.
Summary: Add one more argument, 'Eina_Bool sub_object' to elm_widget_resize_object_set. If the argument, 'sub_object' is set as EINA_TRUE, the new resize object is added to the sub object and the previous resize object is deleted from the sub object. Reviewers: Hermet, seoz CC: Jaehyun_Cho, seoz, raster Differential Revision: https://phab.enlightenment.org/D265
-rw-r--r--src/lib/elc_naviframe.c4
-rw-r--r--src/lib/elm_box.c3
-rw-r--r--src/lib/elm_diskselector.c2
-rw-r--r--src/lib/elm_entry.c6
-rw-r--r--src/lib/elm_factory.c2
-rw-r--r--src/lib/elm_glview.c2
-rw-r--r--src/lib/elm_grid.c2
-rw-r--r--src/lib/elm_layout.c2
-rw-r--r--src/lib/elm_map.c2
-rw-r--r--src/lib/elm_mapbuf.c2
-rw-r--r--src/lib/elm_notify.c2
-rw-r--r--src/lib/elm_photo.c2
-rw-r--r--src/lib/elm_photocam.c2
-rw-r--r--src/lib/elm_plug.c2
-rw-r--r--src/lib/elm_prefs.c2
-rw-r--r--src/lib/elm_table.c2
-rw-r--r--src/lib/elm_thumb.c2
-rw-r--r--src/lib/elm_toolbar.c2
-rw-r--r--src/lib/elm_web.c2
-rw-r--r--src/lib/elm_web2.c2
-rw-r--r--src/lib/elm_widget.c24
-rw-r--r--src/lib/elm_widget.h7
22 files changed, 42 insertions, 36 deletions
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index 4f3543909..32f1f79aa 100644
--- a/src/lib/elc_naviframe.c
+++ b/src/lib/elc_naviframe.c
@@ -45,7 +45,7 @@ _resize_object_reset(Evas_Object *obj, Elm_Naviframe_Item *it,
45 //Recover previous smart members. 45 //Recover previous smart members.
46 if (prev_it) 46 if (prev_it)
47 { 47 {
48 elm_widget_resize_object_set(obj, NULL); 48 elm_widget_resize_object_set(obj, NULL, EINA_TRUE);
49 elm_widget_sub_object_add(obj, VIEW(prev_it)); 49 elm_widget_sub_object_add(obj, VIEW(prev_it));
50 evas_object_smart_member_add(VIEW(prev_it), obj); 50 evas_object_smart_member_add(VIEW(prev_it), obj);
51 } 51 }
@@ -54,7 +54,7 @@ _resize_object_reset(Evas_Object *obj, Elm_Naviframe_Item *it,
54 54
55 if (it) 55 if (it)
56 { 56 {
57 elm_widget_resize_object_set(obj, VIEW(it)); 57 elm_widget_resize_object_set(obj, VIEW(it), EINA_TRUE);
58 evas_object_raise(VIEW(it)); 58 evas_object_raise(VIEW(it));
59 } 59 }
60} 60}
diff --git a/src/lib/elm_box.c b/src/lib/elm_box.c
index f51f00bca..5937685a8 100644
--- a/src/lib/elm_box.c
+++ b/src/lib/elm_box.c
@@ -396,7 +396,8 @@ _elm_box_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
396{ 396{
397 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 397 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
398 elm_widget_resize_object_set(obj, 398 elm_widget_resize_object_set(obj,
399 evas_object_box_add(evas_object_evas_get(obj))); 399 evas_object_box_add(evas_object_evas_get(obj)),
400 EINA_TRUE);
400 401
401 evas_object_box_layout_set(wd->resize_obj, _elm_box_custom_layout, 402 evas_object_box_layout_set(wd->resize_obj, _elm_box_custom_layout,
402 obj, NULL); 403 obj, NULL);
diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c
index 35eed91c9..6308d52b9 100644
--- a/src/lib/elm_diskselector.c
+++ b/src/lib/elm_diskselector.c
@@ -1275,7 +1275,7 @@ _elm_diskselector_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1275 evas_event_freeze(evas); 1275 evas_event_freeze(evas);
1276 1276
1277 edje = edje_object_add(evas); 1277 edje = edje_object_add(evas);
1278 elm_widget_resize_object_set(obj, edje); 1278 elm_widget_resize_object_set(obj, edje, EINA_TRUE);
1279 1279
1280 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 1280 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
1281 1281
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index b259dcacc..0b472cd67 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -4757,7 +4757,7 @@ _scrollable_set(Eo *obj, void *_pd, va_list *list)
4757 /* we now must re-theme ourselves to a scroller decoration 4757 /* we now must re-theme ourselves to a scroller decoration
4758 * and move the entry looking object to be the content of the 4758 * and move the entry looking object to be the content of the
4759 * scrollable view */ 4759 * scrollable view */
4760 elm_widget_resize_object_set(obj, NULL); 4760 elm_widget_resize_object_set(obj, NULL, EINA_TRUE);
4761 elm_widget_sub_object_add(obj, sd->entry_edje); 4761 elm_widget_sub_object_add(obj, sd->entry_edje);
4762 4762
4763 if (!sd->scr_edje) 4763 if (!sd->scr_edje)
@@ -4776,7 +4776,7 @@ _scrollable_set(Eo *obj, void *_pd, va_list *list)
4776 evas_object_propagate_events_set(sd->scr_edje, EINA_TRUE); 4776 evas_object_propagate_events_set(sd->scr_edje, EINA_TRUE);
4777 } 4777 }
4778 4778
4779 elm_widget_resize_object_set(obj, sd->scr_edje); 4779 elm_widget_resize_object_set(obj, sd->scr_edje, EINA_TRUE);
4780 4780
4781 eo_do(obj, elm_scrollable_interface_objects_set(sd->scr_edje, sd->hit_rect)); 4781 eo_do(obj, elm_scrollable_interface_objects_set(sd->scr_edje, sd->hit_rect));
4782 4782
@@ -4795,7 +4795,7 @@ _scrollable_set(Eo *obj, void *_pd, va_list *list)
4795 eo_do(obj, elm_scrollable_interface_content_set(NULL)); 4795 eo_do(obj, elm_scrollable_interface_content_set(NULL));
4796 evas_object_hide(sd->scr_edje); 4796 evas_object_hide(sd->scr_edje);
4797 } 4797 }
4798 elm_widget_resize_object_set(obj, sd->entry_edje); 4798 elm_widget_resize_object_set(obj, sd->entry_edje, EINA_TRUE);
4799 4799
4800 if (sd->scr_edje) 4800 if (sd->scr_edje)
4801 elm_widget_sub_object_add(obj, sd->scr_edje); 4801 elm_widget_sub_object_add(obj, sd->scr_edje);
diff --git a/src/lib/elm_factory.c b/src/lib/elm_factory.c
index 14ef56bb0..a2ebe38da 100644
--- a/src/lib/elm_factory.c
+++ b/src/lib/elm_factory.c
@@ -258,7 +258,7 @@ _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
258 wd->content = content; 258 wd->content = content;
259 if (!content) return; 259 if (!content) return;
260 260
261 elm_widget_resize_object_set(obj, content); 261 elm_widget_resize_object_set(obj, content, EINA_TRUE);
262 evas_object_event_callback_add(content, EVAS_CALLBACK_DEL, _child_del, obj); 262 evas_object_event_callback_add(content, EVAS_CALLBACK_DEL, _child_del, obj);
263 evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS, 263 evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
264 _child_change, obj); 264 _child_change, obj);
diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c
index bc791d02e..c1f0a4ee2 100644
--- a/src/lib/elm_glview.c
+++ b/src/lib/elm_glview.c
@@ -205,7 +205,7 @@ _elm_glview_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
205 205
206 // Create image to render Evas_GL Surface 206 // Create image to render Evas_GL Surface
207 img = evas_object_image_filled_add(evas_object_evas_get(obj)); 207 img = evas_object_image_filled_add(evas_object_evas_get(obj));
208 elm_widget_resize_object_set(obj, img); 208 elm_widget_resize_object_set(obj, img, EINA_TRUE);
209 evas_object_image_size_set(img, 1, 1); 209 evas_object_image_size_set(img, 1, 1);
210 210
211 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 211 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
diff --git a/src/lib/elm_grid.c b/src/lib/elm_grid.c
index d1dc9c594..cd42724f6 100644
--- a/src/lib/elm_grid.c
+++ b/src/lib/elm_grid.c
@@ -137,7 +137,7 @@ _elm_grid_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
137 elm_widget_sub_object_parent_add(obj); 137 elm_widget_sub_object_parent_add(obj);
138 138
139 grid = evas_object_grid_add(evas_object_evas_get(obj)); 139 grid = evas_object_grid_add(evas_object_evas_get(obj));
140 elm_widget_resize_object_set(obj, grid); 140 elm_widget_resize_object_set(obj, grid, EINA_TRUE);
141 evas_object_grid_size_set(wd->resize_obj, 100, 100); 141 evas_object_grid_size_set(wd->resize_obj, 100, 100);
142 142
143 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 143 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c
index bf499fc50..b1851416f 100644
--- a/src/lib/elm_layout.c
+++ b/src/lib/elm_layout.c
@@ -718,7 +718,7 @@ _elm_layout_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
718 718
719 /* has to be there *before* parent's smart_add() */ 719 /* has to be there *before* parent's smart_add() */
720 edje = edje_object_add(evas_object_evas_get(obj)); 720 edje = edje_object_add(evas_object_evas_get(obj));
721 elm_widget_resize_object_set(obj, edje); 721 elm_widget_resize_object_set(obj, edje, EINA_TRUE);
722 722
723 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 723 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
724 724
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index dab41fb63..9520f97ee 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -3978,7 +3978,7 @@ _elm_map_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
3978 elm_widget_sub_object_parent_add(obj); 3978 elm_widget_sub_object_parent_add(obj);
3979 3979
3980 edje = edje_object_add(evas_object_evas_get(obj)); 3980 edje = edje_object_add(evas_object_evas_get(obj));
3981 elm_widget_resize_object_set(obj, edje); 3981 elm_widget_resize_object_set(obj, edje, EINA_TRUE);
3982 3982
3983 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 3983 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
3984 3984
diff --git a/src/lib/elm_mapbuf.c b/src/lib/elm_mapbuf.c
index 6c81f928d..678dd2f69 100644
--- a/src/lib/elm_mapbuf.c
+++ b/src/lib/elm_mapbuf.c
@@ -267,7 +267,7 @@ _elm_mapbuf_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
267{ 267{
268 Elm_Mapbuf_Smart_Data *priv = _pd; 268 Elm_Mapbuf_Smart_Data *priv = _pd;
269 Evas_Object *rect = evas_object_rectangle_add(evas_object_evas_get(obj)); 269 Evas_Object *rect = evas_object_rectangle_add(evas_object_evas_get(obj));
270 elm_widget_resize_object_set(obj, rect); 270 elm_widget_resize_object_set(obj, rect, EINA_TRUE);
271 271
272 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 272 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
273 elm_widget_sub_object_parent_add(obj); 273 elm_widget_sub_object_parent_add(obj);
diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c
index 912a001a7..b4a8c6407 100644
--- a/src/lib/elm_notify.c
+++ b/src/lib/elm_notify.c
@@ -728,7 +728,7 @@ _allow_events_set(Eo *obj, void *_pd, va_list *list)
728 { 728 {
729 sd->block_events = elm_layout_add(obj); 729 sd->block_events = elm_layout_add(obj);
730 _block_events_theme_apply(obj); 730 _block_events_theme_apply(obj);
731 elm_widget_resize_object_set(obj, sd->block_events); 731 elm_widget_resize_object_set(obj, sd->block_events, EINA_TRUE);
732 elm_layout_signal_callback_add 732 elm_layout_signal_callback_add
733 (sd->block_events, "elm,action,click", "elm", 733 (sd->block_events, "elm,action,click", "elm",
734 _block_area_clicked_cb, obj); 734 _block_area_clicked_cb, obj);
diff --git a/src/lib/elm_photo.c b/src/lib/elm_photo.c
index 9c2808905..c3a018922 100644
--- a/src/lib/elm_photo.c
+++ b/src/lib/elm_photo.c
@@ -283,7 +283,7 @@ _elm_photo_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
283 _sizing_eval(obj); 283 _sizing_eval(obj);
284 284
285 elm_widget_resize_object_set 285 elm_widget_resize_object_set
286 (obj, edje_object_add(evas_object_evas_get(obj))); 286 (obj, edje_object_add(evas_object_evas_get(obj)), EINA_TRUE);
287 287
288 elm_widget_theme_object_set 288 elm_widget_theme_object_set
289 (obj, wd->resize_obj, "photo", "base", "default"); 289 (obj, wd->resize_obj, "photo", "base", "default");
diff --git a/src/lib/elm_photocam.c b/src/lib/elm_photocam.c
index c90af48dc..2bd67f32f 100644
--- a/src/lib/elm_photocam.c
+++ b/src/lib/elm_photocam.c
@@ -1328,7 +1328,7 @@ _elm_photocam_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1328 elm_widget_sub_object_parent_add(obj); 1328 elm_widget_sub_object_parent_add(obj);
1329 1329
1330 edje = edje_object_add(evas_object_evas_get(obj)); 1330 edje = edje_object_add(evas_object_evas_get(obj));
1331 elm_widget_resize_object_set(obj, edje); 1331 elm_widget_resize_object_set(obj, edje, EINA_TRUE);
1332 1332
1333 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 1333 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
1334 1334
diff --git a/src/lib/elm_plug.c b/src/lib/elm_plug.c
index de282319b..5890a3e87 100644
--- a/src/lib/elm_plug.c
+++ b/src/lib/elm_plug.c
@@ -102,7 +102,7 @@ _elm_plug_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
102 p_obj = ecore_evas_extn_plug_new(ee); 102 p_obj = ecore_evas_extn_plug_new(ee);
103 if (!p_obj) return; 103 if (!p_obj) return;
104 104
105 elm_widget_resize_object_set(obj, p_obj); 105 elm_widget_resize_object_set(obj, p_obj, EINA_TRUE);
106 106
107 evas_object_event_callback_add 107 evas_object_event_callback_add
108 (wd->resize_obj, EVAS_CALLBACK_MOUSE_UP, _on_mouse_up, 108 (wd->resize_obj, EVAS_CALLBACK_MOUSE_UP, _on_mouse_up,
diff --git a/src/lib/elm_prefs.c b/src/lib/elm_prefs.c
index 28694a2ff..2d679a69c 100644
--- a/src/lib/elm_prefs.c
+++ b/src/lib/elm_prefs.c
@@ -1195,7 +1195,7 @@ _elm_prefs_file_set(Eo *obj, void *_pd, va_list *list)
1195 return; 1195 return;
1196 } 1196 }
1197 1197
1198 elm_widget_resize_object_set(obj, sd->root->w_obj); 1198 elm_widget_resize_object_set(obj, sd->root->w_obj, EINA_TRUE);
1199 1199
1200 _elm_prefs_values_get_default(sd->root, EINA_FALSE); 1200 _elm_prefs_values_get_default(sd->root, EINA_FALSE);
1201 1201
diff --git a/src/lib/elm_table.c b/src/lib/elm_table.c
index 5a005298f..9a8de5498 100644
--- a/src/lib/elm_table.c
+++ b/src/lib/elm_table.c
@@ -188,7 +188,7 @@ _elm_table_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
188 elm_widget_sub_object_parent_add(obj); 188 elm_widget_sub_object_parent_add(obj);
189 189
190 table = evas_object_table_add(evas_object_evas_get(obj)); 190 table = evas_object_table_add(evas_object_evas_get(obj));
191 elm_widget_resize_object_set(obj, table); 191 elm_widget_resize_object_set(obj, table, EINA_TRUE);
192 192
193 evas_object_event_callback_add 193 evas_object_event_callback_add
194 (table, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_size_hints_changed, obj); 194 (table, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_size_hints_changed, obj);
diff --git a/src/lib/elm_thumb.c b/src/lib/elm_thumb.c
index 43a19d829..bb2ccf04a 100644
--- a/src/lib/elm_thumb.c
+++ b/src/lib/elm_thumb.c
@@ -598,7 +598,7 @@ _elm_thumb_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
598 598
599 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 599 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
600 elm_widget_sub_object_parent_add(obj); 600 elm_widget_sub_object_parent_add(obj);
601 elm_widget_resize_object_set(obj, elm_layout_add(obj)); 601 elm_widget_resize_object_set(obj, elm_layout_add(obj), EINA_TRUE);
602 602
603 if (!elm_layout_theme_set(wd->resize_obj, "thumb", "base", 603 if (!elm_layout_theme_set(wd->resize_obj, "thumb", "base",
604 elm_widget_style_get(obj))) 604 elm_widget_style_get(obj)))
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 7d0c8d9c1..1672a4cec 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -2494,7 +2494,7 @@ _elm_toolbar_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
2494 elm_widget_sub_object_parent_add(obj); 2494 elm_widget_sub_object_parent_add(obj);
2495 2495
2496 edje = edje_object_add(evas_object_evas_get(obj)); 2496 edje = edje_object_add(evas_object_evas_get(obj));
2497 elm_widget_resize_object_set(obj, edje); 2497 elm_widget_resize_object_set(obj, edje, EINA_TRUE);
2498 2498
2499 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 2499 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
2500 2500
diff --git a/src/lib/elm_web.c b/src/lib/elm_web.c
index 39d40e975..c1cfe62e6 100644
--- a/src/lib/elm_web.c
+++ b/src/lib/elm_web.c
@@ -1145,7 +1145,7 @@ _elm_web_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1145 elm_object_text_set(resize_obj, "WebKit not supported!"); 1145 elm_object_text_set(resize_obj, "WebKit not supported!");
1146#endif 1146#endif
1147 1147
1148 elm_widget_resize_object_set(obj, resize_obj); 1148 elm_widget_resize_object_set(obj, resize_obj, EINA_TRUE);
1149 1149
1150 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 1150 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
1151 1151
diff --git a/src/lib/elm_web2.c b/src/lib/elm_web2.c
index 02764e35a..c192a709b 100644
--- a/src/lib/elm_web2.c
+++ b/src/lib/elm_web2.c
@@ -138,7 +138,7 @@ _elm_web_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
138 Evas_Object *resize_obj; 138 Evas_Object *resize_obj;
139 139
140 resize_obj = _view_add(obj); 140 resize_obj = _view_add(obj);
141 elm_widget_resize_object_set(obj, resize_obj); 141 elm_widget_resize_object_set(obj, resize_obj, EINA_TRUE);
142 142
143 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 143 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
144 144
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 9e15e6cf8..7f434ac5b 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -159,7 +159,7 @@ _on_sub_obj_del(void *data,
159 if (obj == sd->resize_obj) 159 if (obj == sd->resize_obj)
160 { 160 {
161 /* already dels sub object */ 161 /* already dels sub object */
162 elm_widget_resize_object_set(sd->obj, NULL); 162 elm_widget_resize_object_set(sd->obj, NULL, EINA_TRUE);
163 return; 163 return;
164 } 164 }
165 else if (obj == sd->hover_obj) 165 else if (obj == sd->hover_obj)
@@ -251,7 +251,7 @@ _elm_widget_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
251 Evas_Object *r_obj = priv->resize_obj; 251 Evas_Object *r_obj = priv->resize_obj;
252 priv->resize_obj = NULL; 252 priv->resize_obj = NULL;
253 253
254 elm_widget_resize_object_set(obj, r_obj); 254 elm_widget_resize_object_set(obj, r_obj, EINA_TRUE);
255 } 255 }
256} 256}
257 257
@@ -1190,21 +1190,24 @@ _elm_widget_sub_object_del(Eo *obj, void *_pd, va_list *list)
1190/* 1190/*
1191 * @internal 1191 * @internal
1192 * 1192 *
1193 * a resize object is a sub object with some more callbacks on it and 1193 * a resize object is a smart member of the parent.
1194 * a smart member of the parent 1194 * a resize object is added to and deleted from the sub object of the parent
1195 * if the third argument, Eina_Bool sub_obj, is set as EINA_TRUE.
1195 */ 1196 */
1196EAPI void 1197EAPI void
1197elm_widget_resize_object_set(Evas_Object *obj, 1198elm_widget_resize_object_set(Evas_Object *obj,
1198 Evas_Object *sobj) 1199 Evas_Object *sobj,
1200 Eina_Bool sub_obj)
1199{ 1201{
1200 ELM_WIDGET_CHECK(obj); 1202 ELM_WIDGET_CHECK(obj);
1201 eo_do(obj, elm_wdg_resize_object_set(sobj)); 1203 eo_do(obj, elm_wdg_resize_object_set(sobj, sub_obj));
1202} 1204}
1203 1205
1204static void 1206static void
1205_elm_widget_resize_object_set(Eo *obj, void *_pd, va_list *list) 1207_elm_widget_resize_object_set(Eo *obj, void *_pd, va_list *list)
1206{ 1208{
1207 Evas_Object *sobj = va_arg(*list, Evas_Object *); 1209 Evas_Object *sobj = va_arg(*list, Evas_Object *);
1210 Eina_Bool sub_obj = va_arg(*list, int);
1208 Evas_Object *parent; 1211 Evas_Object *parent;
1209 1212
1210 Elm_Widget_Smart_Data *sd = _pd; 1213 Elm_Widget_Smart_Data *sd = _pd;
@@ -1222,7 +1225,7 @@ _elm_widget_resize_object_set(Eo *obj, void *_pd, va_list *list)
1222 if (elm_widget_focus_get(sd->resize_obj)) _parents_unfocus(obj); 1225 if (elm_widget_focus_get(sd->resize_obj)) _parents_unfocus(obj);
1223 } 1226 }
1224 1227
1225 elm_widget_sub_object_del(obj, sd->resize_obj); 1228 if (sub_obj) elm_widget_sub_object_del(obj, sd->resize_obj);
1226 } 1229 }
1227 1230
1228 sd->resize_obj = sobj; 1231 sd->resize_obj = sobj;
@@ -1238,12 +1241,13 @@ _elm_widget_resize_object_set(Eo *obj, void *_pd, va_list *list)
1238 if (sdp) 1241 if (sdp)
1239 { 1242 {
1240 if (sdp->resize_obj == sobj) 1243 if (sdp->resize_obj == sobj)
1241 elm_widget_resize_object_set(parent, NULL); 1244 elm_widget_resize_object_set(parent, NULL, sub_obj);
1242 else 1245 else if (sub_obj)
1243 elm_widget_sub_object_del(parent, sobj); 1246 elm_widget_sub_object_del(parent, sobj);
1244 } 1247 }
1245 } 1248 }
1246 elm_widget_sub_object_add(obj, sobj); 1249 if (sub_obj) elm_widget_sub_object_add(obj, sobj);
1250
1247 evas_object_smart_member_add(sobj, obj); 1251 evas_object_smart_member_add(sobj, obj);
1248 1252
1249 _smart_reconfigure(sd); 1253 _smart_reconfigure(sd);
diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h
index 0bc885450..f426d5a55 100644
--- a/src/lib/elm_widget.h
+++ b/src/lib/elm_widget.h
@@ -131,7 +131,7 @@
131 * (priv->sub, "elm,action,click", "", _clicked_signal_cb, obj); 131 * (priv->sub, "elm,action,click", "", _clicked_signal_cb, obj);
132 * // set this sub object as the "resize object". widgets get 1 resize 132 * // set this sub object as the "resize object". widgets get 1 resize
133 * // object that is resized along with the object wrapper. 133 * // object that is resized along with the object wrapper.
134 * elm_widget_resize_object_set(obj, priv->sub); 134 * elm_widget_resize_object_set(obj, priv->sub, EINA_TRUE);
135 * } 135 * }
136 * 136 *
137 * static void 137 * static void
@@ -603,7 +603,7 @@ EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void
603EAPI Eina_Bool elm_widget_sub_object_parent_add(Evas_Object *sobj); 603EAPI Eina_Bool elm_widget_sub_object_parent_add(Evas_Object *sobj);
604EAPI Eina_Bool elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj); 604EAPI Eina_Bool elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj);
605EAPI Eina_Bool elm_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj); 605EAPI Eina_Bool elm_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj);
606EAPI void elm_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj); 606EAPI void elm_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj, Eina_Bool sub_obj);
607EAPI void elm_widget_hover_object_set(Evas_Object *obj, Evas_Object *sobj); 607EAPI void elm_widget_hover_object_set(Evas_Object *obj, Evas_Object *sobj);
608EAPI void elm_widget_signal_emit(Evas_Object *obj, const char *emission, const char *source); 608EAPI void elm_widget_signal_emit(Evas_Object *obj, const char *emission, const char *source);
609EAPI void elm_widget_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data); 609EAPI void elm_widget_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
@@ -1621,9 +1621,10 @@ typedef void * (*list_data_get_func_type)(const Eina_List * l);
1621 * No description supplied by the EAPI. 1621 * No description supplied by the EAPI.
1622 * 1622 *
1623 * @param[in] sobj 1623 * @param[in] sobj
1624 * @param[in] sub_object
1624 * 1625 *
1625 */ 1626 */
1626#define elm_wdg_resize_object_set(sobj) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_RESIZE_OBJECT_SET), EO_TYPECHECK(Evas_Object *, sobj) 1627#define elm_wdg_resize_object_set(sobj, sub_obj) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_RESIZE_OBJECT_SET), EO_TYPECHECK(Evas_Object *, sobj), EO_TYPECHECK(Eina_Bool, sub_obj)
1627 1628
1628/** 1629/**
1629 * @def elm_wdg_hover_object_set 1630 * @def elm_wdg_hover_object_set