summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2017-10-24 21:29:15 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-11-28 17:15:42 +0900
commita44e8cec395cb482e0f1668f16291198b0e0cd59 (patch)
tree2faac9df3fb232d6782a6a9f40f9dd185b4f9c6b
parentb85cebdb96aad217b50f90b6c08660ec0f31f4ac (diff)
efl_ui_popup: Replace group_add/del with constructor/destructor
-rw-r--r--src/lib/elementary/efl_ui_popup.c27
-rw-r--r--src/lib/elementary/efl_ui_popup.eo2
-rw-r--r--src/lib/elementary/efl_ui_popup_alert.c18
-rw-r--r--src/lib/elementary/efl_ui_popup_alert.eo2
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll.c24
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll.eo1
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_text.c24
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_text.eo1
-rw-r--r--src/lib/elementary/efl_ui_popup_anchor.c18
-rw-r--r--src/lib/elementary/efl_ui_popup_anchor.eo1
10 files changed, 67 insertions, 51 deletions
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index 6f225da034..7d59be8a7c 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -188,12 +188,14 @@ _efl_ui_popup_timeout_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
188 return pd->timeout; 188 return pd->timeout;
189} 189}
190 190
191EOLIAN static void 191EOLIAN static Eo *
192_efl_ui_popup_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Popup_Data *pd) 192_efl_ui_popup_efl_object_constructor(Eo *obj, Efl_Ui_Popup_Data *pd)
193{ 193{
194 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 194 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
195
196 obj = efl_constructor(efl_super(obj, MY_CLASS));
197 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
195 198
196 efl_canvas_group_add(efl_super(obj, MY_CLASS));
197 elm_widget_sub_object_parent_add(obj); 199 elm_widget_sub_object_parent_add(obj);
198 200
199 elm_widget_can_focus_set(obj, EINA_TRUE); 201 elm_widget_can_focus_set(obj, EINA_TRUE);
@@ -204,19 +206,25 @@ _efl_ui_popup_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Popup_Data *pd)
204 evas_object_smart_member_add(pd->event_bg, obj); 206 evas_object_smart_member_add(pd->event_bg, obj);
205 evas_object_stack_below(pd->event_bg, wd->resize_obj); 207 evas_object_stack_below(pd->event_bg, wd->resize_obj);
206 208
207 edje_object_signal_callback_add(pd->event_bg, "elm,action,clicked", "*", _bg_clicked_cb, obj); 209 edje_object_signal_callback_add(pd->event_bg, "elm,action,clicked", "*",
210 _bg_clicked_cb, obj);
208 211
209 pd->align = EFL_UI_POPUP_ALIGN_CENTER; 212 pd->align = EFL_UI_POPUP_ALIGN_CENTER;
213
214 return obj;
210} 215}
211 216
212EOLIAN static void 217EOLIAN static void
213_efl_ui_popup_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Data *pd) 218_efl_ui_popup_efl_object_destructor(Eo *obj, Efl_Ui_Popup_Data *pd)
214{ 219{
215 ELM_SAFE_DEL(pd->event_bg); 220 ELM_SAFE_DEL(pd->event_bg);
216 efl_event_callback_del(pd->win_parent, EFL_GFX_EVENT_RESIZE, _parent_geom_cb, obj);
217 efl_event_callback_del(pd->win_parent, EFL_GFX_EVENT_MOVE, _parent_geom_cb, obj);
218 221
219 efl_canvas_group_del(efl_super(obj, MY_CLASS)); 222 efl_event_callback_del(pd->win_parent, EFL_GFX_EVENT_RESIZE, _parent_geom_cb,
223 obj);
224 efl_event_callback_del(pd->win_parent, EFL_GFX_EVENT_MOVE, _parent_geom_cb,
225 obj);
226
227 efl_destructor(efl_super(obj, MY_CLASS));
220} 228}
221 229
222EOLIAN static void 230EOLIAN static void
@@ -277,7 +285,6 @@ _efl_ui_popup_bg_repeat_events_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
277/* Internal EO APIs and hidden overrides */ 285/* Internal EO APIs and hidden overrides */
278 286
279#define EFL_UI_POPUP_EXTRA_OPS \ 287#define EFL_UI_POPUP_EXTRA_OPS \
280 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_popup), \
281 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup) 288 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup)
282 289
283#include "efl_ui_popup.eo.c" 290#include "efl_ui_popup.eo.c"
diff --git a/src/lib/elementary/efl_ui_popup.eo b/src/lib/elementary/efl_ui_popup.eo
index cf70162e84..8f2a23778d 100644
--- a/src/lib/elementary/efl_ui_popup.eo
+++ b/src/lib/elementary/efl_ui_popup.eo
@@ -57,6 +57,8 @@ class Efl.Ui.Popup(Efl.Ui.Layout)
57 } 57 }
58 } 58 }
59 implements { 59 implements {
60 Efl.Object.constructor;
61 Efl.Object.destructor;
60 Efl.Gfx.position { set; } 62 Efl.Gfx.position { set; }
61 Efl.Gfx.visible { set; } 63 Efl.Gfx.visible { set; }
62 Elm.Widget.widget_parent { set; } 64 Elm.Widget.widget_parent { set; }
diff --git a/src/lib/elementary/efl_ui_popup_alert.c b/src/lib/elementary/efl_ui_popup_alert.c
index 64d1ff6b92..bfb2c3d4e2 100644
--- a/src/lib/elementary/efl_ui_popup_alert.c
+++ b/src/lib/elementary/efl_ui_popup_alert.c
@@ -212,19 +212,24 @@ _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, Efl_Ui_Popu
212 elm_layout_sizing_eval(obj); 212 elm_layout_sizing_eval(obj);
213} 213}
214 214
215EOLIAN static void 215EOLIAN static Eo *
216_efl_ui_popup_alert_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Popup_Alert_Data *pd EINA_UNUSED) 216_efl_ui_popup_alert_efl_object_constructor(Eo *obj,
217 Efl_Ui_Popup_Alert_Data *pd EINA_UNUSED)
217{ 218{
218 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 219 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
220
221 obj = efl_constructor(efl_super(obj, MY_CLASS));
222 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
219 223
220 efl_canvas_group_add(efl_super(obj, MY_CLASS));
221 elm_widget_sub_object_parent_add(obj); 224 elm_widget_sub_object_parent_add(obj);
222 225
223 elm_layout_theme_set(efl_super(obj, MY_CLASS), "popup", "base", "alert"); 226 elm_layout_theme_set(efl_super(obj, MY_CLASS), "popup", "base", "alert");
227
228 return obj;
224} 229}
225 230
226EOLIAN static void 231EOLIAN static void
227_efl_ui_popup_alert_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Alert_Data *pd) 232_efl_ui_popup_alert_efl_object_destructor(Eo *obj, Efl_Ui_Popup_Alert_Data *pd)
228{ 233{
229 if (pd->title_text) 234 if (pd->title_text)
230 { 235 {
@@ -232,7 +237,7 @@ _efl_ui_popup_alert_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Alert_Data
232 pd->title_text = NULL; 237 pd->title_text = NULL;
233 } 238 }
234 239
235 efl_canvas_group_del(efl_super(obj, MY_CLASS)); 240 efl_destructor(efl_super(obj, MY_CLASS));
236} 241}
237 242
238/* Efl.Part begin */ 243/* Efl.Part begin */
@@ -248,7 +253,6 @@ ELM_PART_OVERRIDE_TEXT_GET(efl_ui_popup_alert, EFL_UI_POPUP_ALERT, Efl_Ui_Popup_
248/* Efl.Part end */ 253/* Efl.Part end */
249 254
250#define EFL_UI_POPUP_ALERT_EXTRA_OPS \ 255#define EFL_UI_POPUP_ALERT_EXTRA_OPS \
251 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_popup_alert), \
252 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup_alert) 256 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup_alert)
253 257
254#include "efl_ui_popup_alert.eo.c" 258#include "efl_ui_popup_alert.eo.c"
diff --git a/src/lib/elementary/efl_ui_popup_alert.eo b/src/lib/elementary/efl_ui_popup_alert.eo
index 8929e1729d..42c55a47f5 100644
--- a/src/lib/elementary/efl_ui_popup_alert.eo
+++ b/src/lib/elementary/efl_ui_popup_alert.eo
@@ -21,6 +21,8 @@ class Efl.Ui.Popup.Alert(Efl.Ui.Popup)
21 } 21 }
22 } 22 }
23 implements { 23 implements {
24 Efl.Object.constructor;
25 Efl.Object.destructor;
24 Efl.Part.part; 26 Efl.Part.part;
25 } 27 }
26 events { 28 events {
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.c b/src/lib/elementary/efl_ui_popup_alert_scroll.c
index 7dc388bd97..ac57b3d6b4 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.c
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.c
@@ -182,27 +182,28 @@ _efl_ui_popup_alert_scroll_efl_gfx_size_hint_hint_max_set(Eo *obj, Efl_Ui_Popup_
182 elm_layout_sizing_eval(obj); 182 elm_layout_sizing_eval(obj);
183} 183}
184 184
185EOLIAN static void 185EOLIAN static Eo *
186_efl_ui_popup_alert_scroll_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd) 186_efl_ui_popup_alert_scroll_efl_object_constructor(Eo *obj,
187 Efl_Ui_Popup_Alert_Scroll_Data *pd)
187{ 188{
188 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 189 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
190
191 obj = efl_constructor(efl_super(obj, MY_CLASS));
192 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
189 193
190 efl_canvas_group_add(efl_super(obj, MY_CLASS));
191 elm_widget_sub_object_parent_add(obj); 194 elm_widget_sub_object_parent_add(obj);
192 195
193 pd->scroller = elm_scroller_add(obj); 196 pd->scroller = elm_scroller_add(obj);
194 elm_object_style_set(pd->scroller, "popup/no_inset_shadow"); 197 elm_object_style_set(pd->scroller, "popup/no_inset_shadow");
195 elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_AUTO); 198 elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_AUTO,
199 ELM_SCROLLER_POLICY_AUTO);
196 200
197 efl_content_set(efl_part(efl_super(obj, MY_CLASS), "elm.swallow.content"), pd->scroller); 201 efl_content_set(efl_part(efl_super(obj, MY_CLASS), "elm.swallow.content"),
202 pd->scroller);
198 203
199 pd->max_scroll = EINA_SIZE2D(-1, -1); 204 pd->max_scroll = EINA_SIZE2D(-1, -1);
200}
201 205
202EOLIAN static void 206 return obj;
203_efl_ui_popup_alert_scroll_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd EINA_UNUSED)
204{
205 efl_canvas_group_del(efl_super(obj, MY_CLASS));
206} 207}
207 208
208/* Efl.Part begin */ 209/* Efl.Part begin */
@@ -220,7 +221,6 @@ ELM_PART_OVERRIDE_TEXT_GET(efl_ui_popup_alert_scroll, EFL_UI_POPUP_ALERT_SCROLL,
220/* Internal EO APIs and hidden overrides */ 221/* Internal EO APIs and hidden overrides */
221 222
222#define EFL_UI_POPUP_ALERT_SCROLL_EXTRA_OPS \ 223#define EFL_UI_POPUP_ALERT_SCROLL_EXTRA_OPS \
223 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_popup_alert_scroll), \
224 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup_alert_scroll) 224 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup_alert_scroll)
225 225
226#include "efl_ui_popup_alert_scroll.eo.c" 226#include "efl_ui_popup_alert_scroll.eo.c"
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.eo b/src/lib/elementary/efl_ui_popup_alert_scroll.eo
index 69d3bbb9fe..b680f7644c 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.eo
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.eo
@@ -17,6 +17,7 @@ class Efl.Ui.Popup.Alert.Scroll(Efl.Ui.Popup.Alert)
17 } 17 }
18 } 18 }
19 implements { 19 implements {
20 Efl.Object.constructor;
20 Efl.Gfx.Size.Hint.hint_max { set; } 21 Efl.Gfx.Size.Hint.hint_max { set; }
21 Efl.Part.part; 22 Efl.Part.part;
22 } 23 }
diff --git a/src/lib/elementary/efl_ui_popup_alert_text.c b/src/lib/elementary/efl_ui_popup_alert_text.c
index e3acce5fbd..9bf90f121d 100644
--- a/src/lib/elementary/efl_ui_popup_alert_text.c
+++ b/src/lib/elementary/efl_ui_popup_alert_text.c
@@ -131,27 +131,28 @@ _efl_ui_popup_alert_text_efl_gfx_size_hint_hint_max_set(Eo *obj, Efl_Ui_Popup_Al
131 elm_layout_sizing_eval(obj); 131 elm_layout_sizing_eval(obj);
132} 132}
133 133
134EOLIAN static void 134EOLIAN static Eo *
135_efl_ui_popup_alert_text_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd) 135_efl_ui_popup_alert_text_efl_object_constructor(Eo *obj,
136 Efl_Ui_Popup_Alert_Text_Data *pd)
136{ 137{
137 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 138 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
139
140 obj = efl_constructor(efl_super(obj, MY_CLASS));
141 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
138 142
139 efl_canvas_group_add(efl_super(obj, MY_CLASS));
140 elm_widget_sub_object_parent_add(obj); 143 elm_widget_sub_object_parent_add(obj);
141 144
142 pd->scroller = elm_scroller_add(obj); 145 pd->scroller = elm_scroller_add(obj);
143 elm_object_style_set(pd->scroller, "popup/no_inset_shadow"); 146 elm_object_style_set(pd->scroller, "popup/no_inset_shadow");
144 elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); 147 elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_OFF,
148 ELM_SCROLLER_POLICY_AUTO);
145 149
146 efl_content_set(efl_part(efl_super(obj, MY_CLASS), "elm.swallow.content"), pd->scroller); 150 efl_content_set(efl_part(efl_super(obj, MY_CLASS), "elm.swallow.content"),
151 pd->scroller);
147 152
148 pd->max_scroll_h = -1; 153 pd->max_scroll_h = -1;
149}
150 154
151EOLIAN static void 155 return obj;
152_efl_ui_popup_alert_text_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd EINA_UNUSED)
153{
154 efl_canvas_group_del(efl_super(obj, MY_CLASS));
155} 156}
156 157
157/* Efl.Part begin */ 158/* Efl.Part begin */
@@ -169,7 +170,6 @@ ELM_PART_OVERRIDE_TEXT_GET(efl_ui_popup_alert_text, EFL_UI_POPUP_ALERT_TEXT, Efl
169/* Internal EO APIs and hidden overrides */ 170/* Internal EO APIs and hidden overrides */
170 171
171#define EFL_UI_POPUP_ALERT_TEXT_EXTRA_OPS \ 172#define EFL_UI_POPUP_ALERT_TEXT_EXTRA_OPS \
172 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_popup_alert_text), \
173 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup_alert_text) 173 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup_alert_text)
174 174
175#include "efl_ui_popup_alert_text.eo.c" 175#include "efl_ui_popup_alert_text.eo.c"
diff --git a/src/lib/elementary/efl_ui_popup_alert_text.eo b/src/lib/elementary/efl_ui_popup_alert_text.eo
index 988c727680..d26ac90749 100644
--- a/src/lib/elementary/efl_ui_popup_alert_text.eo
+++ b/src/lib/elementary/efl_ui_popup_alert_text.eo
@@ -16,6 +16,7 @@ class Efl.Ui.Popup.Alert.Text(Efl.Ui.Popup.Alert, Efl.Text)
16 } 16 }
17 } 17 }
18 implements { 18 implements {
19 Efl.Object.constructor;
19 Efl.Gfx.Size.Hint.hint_max { set;} 20 Efl.Gfx.Size.Hint.hint_max { set;}
20 Efl.Text.text { get; set; } 21 Efl.Text.text { get; set; }
21 Efl.Part.part; 22 Efl.Part.part;
diff --git a/src/lib/elementary/efl_ui_popup_anchor.c b/src/lib/elementary/efl_ui_popup_anchor.c
index e9a79b8380..d1b5672743 100644
--- a/src/lib/elementary/efl_ui_popup_anchor.c
+++ b/src/lib/elementary/efl_ui_popup_anchor.c
@@ -346,12 +346,15 @@ _efl_ui_popup_anchor_efl_ui_popup_align_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_An
346 return pd->align; 346 return pd->align;
347} 347}
348 348
349EOLIAN static void 349EOLIAN static Eo *
350_efl_ui_popup_anchor_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Popup_Anchor_Data *pd EINA_UNUSED) 350_efl_ui_popup_anchor_efl_object_constructor(Eo *obj,
351 Efl_Ui_Popup_Anchor_Data *pd)
351{ 352{
352 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 353 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
354
355 obj = efl_constructor(efl_super(obj, MY_CLASS));
356 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
353 357
354 efl_canvas_group_add(efl_super(obj, MY_CLASS));
355 elm_widget_sub_object_parent_add(obj); 358 elm_widget_sub_object_parent_add(obj);
356 359
357 pd->priority[0] = EFL_UI_POPUP_ALIGN_TOP; 360 pd->priority[0] = EFL_UI_POPUP_ALIGN_TOP;
@@ -359,16 +362,11 @@ _efl_ui_popup_anchor_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Popup_Anchor_Dat
359 pd->priority[2] = EFL_UI_POPUP_ALIGN_RIGHT; 362 pd->priority[2] = EFL_UI_POPUP_ALIGN_RIGHT;
360 pd->priority[3] = EFL_UI_POPUP_ALIGN_BOTTOM; 363 pd->priority[3] = EFL_UI_POPUP_ALIGN_BOTTOM;
361 pd->priority[4] = EFL_UI_POPUP_ALIGN_CENTER; 364 pd->priority[4] = EFL_UI_POPUP_ALIGN_CENTER;
362}
363 365
364EOLIAN static void 366 return obj;
365_efl_ui_popup_anchor_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Anchor_Data *pd EINA_UNUSED)
366{
367 efl_canvas_group_del(efl_super(obj, MY_CLASS));
368} 367}
369 368
370#define EFL_UI_POPUP_ANCHOR_EXTRA_OPS \ 369#define EFL_UI_POPUP_ANCHOR_EXTRA_OPS \
371 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_popup_anchor), \
372 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup_anchor) 370 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup_anchor)
373 371
374#include "efl_ui_popup_anchor.eo.c" 372#include "efl_ui_popup_anchor.eo.c"
diff --git a/src/lib/elementary/efl_ui_popup_anchor.eo b/src/lib/elementary/efl_ui_popup_anchor.eo
index f3957d098c..656f48c45b 100644
--- a/src/lib/elementary/efl_ui_popup_anchor.eo
+++ b/src/lib/elementary/efl_ui_popup_anchor.eo
@@ -33,6 +33,7 @@ class Efl.Ui.Popup.Anchor(Efl.Ui.Popup)
33 } 33 }
34 } 34 }
35 implements { 35 implements {
36 Efl.Object.constructor;
36 Efl.Gfx.position { set; } 37 Efl.Gfx.position { set; }
37 Efl.Ui.Popup.align { set; get; } 38 Efl.Ui.Popup.align { set; get; }
38 } 39 }