summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2018-04-23 17:35:45 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2018-04-23 17:35:45 +0900
commit6428eb5f10479eba23e151398faa2921684ac472 (patch)
treedc2996e487ce0e14f0a0fc82dabaad1661630550
parent2d518a364fb1986ee0db0fbb45b371703319e9ac (diff)
efl_ui_pager: remove finalizedevs/eunue/pager
-rw-r--r--src/lib/elementary/efl_ui_pager.c59
-rw-r--r--src/lib/elementary/efl_ui_pager.eo1
2 files changed, 26 insertions, 34 deletions
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
index 4fae16ff0e..27e6da1bf2 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -281,30 +281,6 @@ _event_handler_del(Eo *obj, Efl_Ui_Pager_Data *pd)
281 pd->event = NULL; 281 pd->event = NULL;
282} 282}
283 283
284EOLIAN static Eo *
285_efl_ui_pager_efl_object_constructor(Eo *obj,
286 Efl_Ui_Pager_Data *pd)
287{
288 obj = efl_constructor(efl_super(obj, MY_CLASS));
289
290 elm_widget_sub_object_parent_add(obj);
291
292 pd->cnt = 0;
293 pd->loop = EFL_UI_PAGER_LOOP_DISABLED;
294
295 pd->curr.page = 0;
296 pd->curr.pos = 0.0;
297
298 pd->transition = NULL;
299
300 pd->page_spec.sz.w = -1;
301 pd->page_spec.sz.h = -1;
302
303 elm_widget_can_focus_set(obj, EINA_TRUE);
304
305 return obj;
306}
307
308static void 284static void
309_resize_cb(void *data, const Efl_Event *ev) 285_resize_cb(void *data, const Efl_Event *ev)
310{ 286{
@@ -352,26 +328,44 @@ _move_cb(void *data, const Efl_Event *ev)
352} 328}
353 329
354EOLIAN static Eo * 330EOLIAN static Eo *
355_efl_ui_pager_efl_object_finalize(Eo *obj, 331_efl_ui_pager_efl_object_constructor(Eo *obj,
356 Efl_Ui_Pager_Data *pd) 332 Efl_Ui_Pager_Data *pd)
357{ 333{
358 Efl_Ui_Theme_Apply theme_apply; 334 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
359 335
360 obj = efl_finalize(efl_super(obj, MY_CLASS)); 336 if (!elm_widget_theme_klass_get(obj))
337 elm_widget_theme_klass_set(obj, "pager");
361 338
362 theme_apply = efl_ui_layout_theme_set(obj, "pager", "base", 339 obj = efl_constructor(efl_super(obj, MY_CLASS));
363 efl_ui_widget_style_get(obj));
364 340
365 if (theme_apply == EFL_UI_THEME_APPLY_FAILED) 341 if (!elm_widget_theme_object_set(obj, wd->resize_obj,
342 elm_widget_theme_klass_get(obj),
343 elm_widget_theme_element_get(obj),
344 elm_widget_theme_style_get(obj)))
366 CRI("Failed to set layout!"); 345 CRI("Failed to set layout!");
367 346
347 elm_widget_sub_object_parent_add(obj);
348
349 pd->cnt = 0;
350 pd->loop = EFL_UI_PAGER_LOOP_DISABLED;
351
352 pd->curr.page = 0;
353 pd->curr.pos = 0.0;
354
355 pd->transition = NULL;
356 pd->indicator = NULL;
357
358 pd->page_spec.sz.w = -1;
359 pd->page_spec.sz.h = -1;
360
361 elm_widget_can_focus_set(obj, EINA_TRUE);
362
368 pd->page_root = efl_add(EFL_CANVAS_GROUP_CLASS, evas_object_evas_get(obj)); 363 pd->page_root = efl_add(EFL_CANVAS_GROUP_CLASS, evas_object_evas_get(obj));
369 efl_content_set(efl_part(obj, "page_root"), pd->page_root); 364 efl_content_set(efl_part(obj, "page_root"), pd->page_root);
370 365
371 efl_event_callback_add(pd->page_root, EFL_GFX_EVENT_RESIZE, _resize_cb, pd); 366 efl_event_callback_add(pd->page_root, EFL_GFX_EVENT_RESIZE, _resize_cb, pd);
372 efl_event_callback_add(pd->page_root, EFL_GFX_EVENT_MOVE, _move_cb, pd); 367 efl_event_callback_add(pd->page_root, EFL_GFX_EVENT_MOVE, _move_cb, pd);
373 368
374 /* default setting (no transition) */
375 pd->page_box = efl_add(EFL_UI_BOX_CLASS, obj); 369 pd->page_box = efl_add(EFL_UI_BOX_CLASS, obj);
376 efl_canvas_group_member_add(pd->page_root, pd->page_box); 370 efl_canvas_group_member_add(pd->page_root, pd->page_box);
377 371
@@ -386,7 +380,6 @@ _efl_ui_pager_efl_object_finalize(Eo *obj,
386 efl_canvas_group_member_add(pd->page_root, pd->backclip); 380 efl_canvas_group_member_add(pd->page_root, pd->backclip);
387 evas_object_static_clip_set(pd->backclip, EINA_TRUE); 381 evas_object_static_clip_set(pd->backclip, EINA_TRUE);
388 efl_gfx_visible_set(pd->backclip, EINA_FALSE); 382 efl_gfx_visible_set(pd->backclip, EINA_FALSE);
389 /* default setting end */
390 383
391 return obj; 384 return obj;
392} 385}
diff --git a/src/lib/elementary/efl_ui_pager.eo b/src/lib/elementary/efl_ui_pager.eo
index a9da1243e7..75d050dc1c 100644
--- a/src/lib/elementary/efl_ui_pager.eo
+++ b/src/lib/elementary/efl_ui_pager.eo
@@ -85,7 +85,6 @@ class Efl.Ui.Pager (Efl.Ui.Layout, Efl.Pack.Linear)
85 } 85 }
86 implements { 86 implements {
87 Efl.Object.constructor; 87 Efl.Object.constructor;
88 Efl.Object.finalize;
89 Efl.Container.content_count; 88 Efl.Container.content_count;
90 Efl.Pack.pack_clear; //TODO 89 Efl.Pack.pack_clear; //TODO
91 Efl.Pack.unpack_all; //TODO 90 Efl.Pack.unpack_all; //TODO