From 35f09ca0bd27020080665fb12d5dd1fe87672dc9 Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Mon, 17 Mar 2014 13:44:40 +0200 Subject: [PATCH] Eolian: Integration of Scrollable Interface --- src/lib/Makefile.am | 10 +- src/lib/elm_diskselector.c | 56 +-- src/lib/elm_entry.c | 56 +-- src/lib/elm_gengrid.c | 98 ++--- src/lib/elm_genlist.c | 114 ++--- src/lib/elm_interface_scrollable.c | 853 +++++++++--------------------------- src/lib/elm_interface_scrollable.eo | 591 +++++++++++++++++++++++++ src/lib/elm_interface_scrollable.h | 6 +- src/lib/elm_list.c | 54 +-- src/lib/elm_map.c | 36 +- src/lib/elm_photocam.c | 68 +-- src/lib/elm_scroller.c | 148 +++---- src/lib/elm_toolbar.c | 52 +-- src/lib/elm_widget.c | 24 +- 14 files changed, 1173 insertions(+), 993 deletions(-) create mode 100644 src/lib/elm_interface_scrollable.eo diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 5a2e0bf..bdb6973 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -529,15 +529,19 @@ BUILT_SOURCES = \ elm_container.eo.c \ elm_container.eo.h \ elm_layout.eo.c \ - elm_layout.eo.h + elm_layout.eo.h \ + elm_interface_scrollable.eo.c \ + elm_interface_scrollable.eo.h EXTRA_DIST += \ elm_widget.eo \ elm_container.eo \ - elm_layout.eo + elm_layout.eo \ + elm_interface_scrollable.eo nodist_includesunstable_HEADERS = \ elm_widget.eo.h \ elm_container.eo.h \ - elm_layout.eo.h + elm_layout.eo.h \ + elm_interface_scrollable.eo.h diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c index 86092de..320165e 100644 --- a/src/lib/elm_diskselector.c +++ b/src/lib/elm_diskselector.c @@ -265,7 +265,7 @@ _scroller_move(void *data) } evas_object_geometry_get(obj, NULL, &y, &w, &h); - eo_do(obj, elm_scrollable_interface_content_region_show(w / sd->display_item_num * i, y, w, h)); + eo_do(obj, elm_interface_scrollable_content_region_show(w / sd->display_item_num * i, y, w, h)); _item_select(dit); sd->init = EINA_TRUE; @@ -289,7 +289,7 @@ _resize_cb(void *data EINA_UNUSED, if ((sd->minw == -1) && (sd->minh == -1)) elm_coords_finger_size_adjust(6, &sd->minw, 1, &sd->minh); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); if (sd->items) { Elm_Diskselector_Item *it = sd->items->data; @@ -313,7 +313,7 @@ _resize_cb(void *data EINA_UNUSED, * (sd->item_count + eina_list_count(sd->left_blanks) + eina_list_count(sd->right_blanks)), h); - eo_do(obj, elm_scrollable_interface_paging_set(0, 0, (int)(w / sd->display_item_num), 0)); + eo_do(obj, elm_interface_scrollable_paging_set(0, 0, (int)(w / sd->display_item_num), 0)); if (!sd->scroller_move_idle_enterer) sd->scroller_move_idle_enterer = ecore_idle_enterer_before_add(_scroller_move, obj); @@ -616,7 +616,7 @@ _access_on_highlight_cb(void *data) x -= bx; y -= by; - eo_do(WIDGET(it), elm_scrollable_interface_region_bring_in(x, y, w, h)); + eo_do(WIDGET(it), elm_interface_scrollable_region_bring_in(x, y, w, h)); } static Elm_Diskselector_Item * @@ -1022,8 +1022,8 @@ _scroll_cb(Evas_Object *obj, _string_check(obj); eo_do(obj, - elm_scrollable_interface_content_pos_get(&x, &y), - elm_scrollable_interface_content_viewport_size_get(&w, &h)); + elm_interface_scrollable_content_pos_get(&x, &y), + elm_interface_scrollable_content_viewport_size_get(&w, &h)); if (sd->round) { evas_object_geometry_get(sd->main_box, NULL, NULL, &bw, NULL); @@ -1034,12 +1034,12 @@ _scroll_cb(Evas_Object *obj, if (sd->left_boundary_reached) return; sd->right_boundary_reached = EINA_TRUE; - eo_do(obj, elm_scrollable_interface_bounce_allow_get(&h_bounce, NULL)); + eo_do(obj, elm_interface_scrollable_bounce_allow_get(&h_bounce, NULL)); /* If scroller's bounce effect is disabled, add 1 pixel * to provide circular effect */ adjust_pixels = (_elm_config->thumbscroll_bounce_enable && h_bounce) ? 0 : 1; - eo_do(obj, elm_scrollable_interface_content_region_show + eo_do(obj, elm_interface_scrollable_content_region_show (x - x_boundary + adjust_pixels, y, w, h)); sd->left_boundary_reached = EINA_FALSE; } @@ -1048,12 +1048,12 @@ _scroll_cb(Evas_Object *obj, if (sd->right_boundary_reached) return; sd->left_boundary_reached = EINA_TRUE; - eo_do(obj, elm_scrollable_interface_bounce_allow_get(&h_bounce, NULL)); + eo_do(obj, elm_interface_scrollable_bounce_allow_get(&h_bounce, NULL)); /* If scroller's bounce effect is disabled, subtract 1 pixel * to provide circular effect */ adjust_pixels = (_elm_config->thumbscroll_bounce_enable && h_bounce) ? 0 : 1; - eo_do(obj, elm_scrollable_interface_content_region_show + eo_do(obj, elm_interface_scrollable_content_region_show (x + x_boundary - adjust_pixels, y, w, h)); sd->right_boundary_reached = EINA_FALSE; } @@ -1292,15 +1292,15 @@ _elm_diskselector_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) priv->len_side = 3; eo_do(obj, - elm_scrollable_interface_objects_set(edje, priv->hit_rect), + elm_interface_scrollable_objects_set(edje, priv->hit_rect), elm_obj_widget_theme_apply(NULL), - elm_scrollable_interface_policy_set(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF), - elm_scrollable_interface_bounce_allow_set(EINA_TRUE, EINA_FALSE), - elm_scrollable_interface_animate_start_cb_set(_scroll_animate_start_cb), - elm_scrollable_interface_animate_stop_cb_set(_scroll_animate_stop_cb), - elm_scrollable_interface_drag_start_cb_set(_scroll_drag_start_cb), - elm_scrollable_interface_drag_stop_cb_set(_scroll_drag_stop_cb), - elm_scrollable_interface_scroll_cb_set(_scroll_cb)); + elm_interface_scrollable_policy_set(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF), + elm_interface_scrollable_bounce_allow_set(EINA_TRUE, EINA_FALSE), + elm_interface_scrollable_animate_start_cb_set(_scroll_animate_start_cb), + elm_interface_scrollable_animate_stop_cb_set(_scroll_animate_stop_cb), + elm_interface_scrollable_drag_start_cb_set(_scroll_drag_start_cb), + elm_interface_scrollable_drag_stop_cb_set(_scroll_drag_stop_cb), + elm_interface_scrollable_scroll_cb_set(_scroll_cb)); evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize_cb, NULL); @@ -1315,7 +1315,7 @@ _elm_diskselector_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) elm_widget_sub_object_add(obj, priv->main_box); - eo_do(obj, elm_scrollable_interface_content_set(priv->main_box)); + eo_do(obj, elm_interface_scrollable_content_set(priv->main_box)); /* left blank */ blank = _blank_add(obj); @@ -1625,7 +1625,7 @@ elm_diskselector_bounce_set(Evas_Object *obj, { ELM_DISKSELECTOR_CHECK(obj); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(h_bounce, v_bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(h_bounce, v_bounce)); } EAPI void @@ -1635,7 +1635,7 @@ elm_diskselector_bounce_get(const Evas_Object *obj, { ELM_DISKSELECTOR_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_bounce_allow_get(h_bounce, v_bounce)); + eo_do((Eo *) obj, elm_interface_scrollable_bounce_allow_get(h_bounce, v_bounce)); } EAPI void @@ -1644,7 +1644,7 @@ elm_diskselector_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_v) { ELM_DISKSELECTOR_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_policy_get(policy_h, policy_v)); + eo_do((Eo *) obj, elm_interface_scrollable_policy_get(policy_h, policy_v)); } static void @@ -1655,7 +1655,7 @@ _scroller_policy_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list) Elm_Scroller_Policy *policy_h = va_arg(*list, Elm_Scroller_Policy *); Elm_Scroller_Policy *policy_v = va_arg(*list, Elm_Scroller_Policy *); - eo_do_super((Eo *)obj, MY_CLASS, elm_scrollable_interface_policy_get(&s_policy_h, &s_policy_v)); + eo_do_super((Eo *)obj, MY_CLASS, elm_interface_scrollable_policy_get(&s_policy_h, &s_policy_v)); if (policy_h) *policy_h = (Elm_Scroller_Policy)s_policy_h; if (policy_v) *policy_v = (Elm_Scroller_Policy)s_policy_v; } @@ -1666,7 +1666,7 @@ elm_diskselector_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_v) { ELM_DISKSELECTOR_CHECK(obj); - eo_do(obj, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do(obj, elm_interface_scrollable_policy_set(policy_h, policy_v)); } static void @@ -1679,7 +1679,7 @@ _scroller_policy_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) (policy_v >= ELM_SCROLLER_POLICY_LAST)) return; - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_policy_set(policy_h, policy_v)); } EAPI void @@ -1979,8 +1979,8 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_FOCUS_NEXT), _elm_diskselector_smart_focus_next), EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_ACCESS), _elm_diskselector_smart_access), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_SET), _scroller_policy_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_GET), _scroller_policy_get), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_POLICY_SET), _scroller_policy_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_POLICY_GET), _scroller_policy_get), EO_OP_FUNC(ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_GET), _round_enabled_get), EO_OP_FUNC(ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_SET), _round_enabled_set), @@ -2031,4 +2031,4 @@ static const Eo_Class_Description class_desc = { NULL }; -EO_DEFINE_CLASS(elm_obj_diskselector_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, ELM_SCROLLABLE_INTERFACE, NULL); +EO_DEFINE_CLASS(elm_obj_diskselector_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, NULL); diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index a193219..ef567c9 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -568,7 +568,7 @@ _elm_entry_smart_disable(Eo *obj, void *_pd, va_list *list) if (sd->scroll) { edje_object_signal_emit(sd->scr_edje, "elm,state,disabled", "elm"); - eo_do(obj, elm_scrollable_interface_freeze_set(EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_freeze_set(EINA_TRUE)); } sd->disabled = EINA_TRUE; } @@ -578,7 +578,7 @@ _elm_entry_smart_disable(Eo *obj, void *_pd, va_list *list) if (sd->scroll) { edje_object_signal_emit(sd->scr_edje, "elm,state,enabled", "elm"); - eo_do(obj, elm_scrollable_interface_freeze_set(EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_freeze_set(EINA_FALSE)); } sd->disabled = EINA_FALSE; sd->drop_format = _get_drop_format(obj); @@ -672,7 +672,7 @@ _elm_entry_smart_theme(Eo *obj, void *_pd, va_list *list) { Eina_Bool ok = EINA_FALSE; - eo_do(obj, elm_scrollable_interface_mirrored_set(elm_widget_mirrored_get(obj))); + eo_do(obj, elm_interface_scrollable_mirrored_set(elm_widget_mirrored_get(obj))); if (sd->single_line) ok = elm_widget_theme_object_set @@ -826,7 +826,7 @@ _elm_entry_smart_sizing_eval(Eo *obj, void *_pd, va_list *list EINA_UNUSED) { Evas_Coord vw = 0, vh = 0, w = 0, h = 0; - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); w = sd->ent_mw; h = sd->ent_mh; @@ -849,7 +849,7 @@ _elm_entry_smart_sizing_eval(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_resize(sd->scr_edje, resw, resh); edje_object_size_min_calc(sd->scr_edje, &vmw, &vmh); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); edje_object_size_min_restricted_calc (sd->entry_edje, &minw, &minh, vw, 0); elm_coords_finger_size_adjust(1, &minw, 1, &minh); @@ -907,7 +907,7 @@ _elm_entry_smart_sizing_eval(Eo *obj, void *_pd, va_list *list EINA_UNUSED) sd->ent_mh = minh; elm_coords_finger_size_adjust(1, &minw, 1, &minh); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); if (minw > vw) vw = minw; if (minh > vh) vh = minh; @@ -1031,7 +1031,7 @@ _show_region_hook(void *data EINA_UNUSED, elm_widget_show_region_get(obj, &x, &y, &w, &h); - eo_do(obj, elm_scrollable_interface_content_region_show(x, y, w, h)); + eo_do(obj, elm_interface_scrollable_content_region_show(x, y, w, h)); } static void @@ -3014,7 +3014,7 @@ _elm_entry_resize_internal(Evas_Object *obj) { Evas_Coord vw = 0, vh = 0; - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); if (vw < sd->ent_mw) vw = sd->ent_mw; if (vh < sd->ent_mh) vh = sd->ent_mh; evas_object_resize(sd->entry_edje, vw, vh); @@ -3270,7 +3270,7 @@ _elm_entry_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_show(priv->hit_rect); evas_object_repeat_events_set(priv->hit_rect, EINA_TRUE); - eo_do(obj, elm_scrollable_interface_objects_set(priv->entry_edje, priv->hit_rect)); + eo_do(obj, elm_interface_scrollable_objects_set(priv->entry_edje, priv->hit_rect)); edje_object_item_provider_set(priv->entry_edje, _item_get, obj); @@ -3440,7 +3440,7 @@ _elm_entry_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) } if (sd->scroll) - eo_do(obj, elm_scrollable_interface_content_viewport_resize_cb_set(NULL)); + eo_do(obj, elm_interface_scrollable_content_viewport_resize_cb_set(NULL)); elm_entry_anchor_hover_end(obj); elm_entry_anchor_hover_parent_set(obj, NULL); @@ -3651,10 +3651,10 @@ _single_line_set(Eo *obj, void *_pd, va_list *list) if (sd->scroll) { if (sd->single_line) - eo_do(obj, elm_scrollable_interface_policy_set(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF)); + eo_do(obj, elm_interface_scrollable_policy_set(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF)); else { - eo_do(obj, elm_scrollable_interface_policy_set(sd->policy_h, sd->policy_v)); + eo_do(obj, elm_interface_scrollable_policy_set(sd->policy_h, sd->policy_v)); } elm_layout_sizing_eval(obj); } @@ -5175,22 +5175,22 @@ _scrollable_set(Eo *obj, void *_pd, va_list *list) elm_widget_resize_object_set(obj, sd->scr_edje, EINA_TRUE); - eo_do(obj, elm_scrollable_interface_objects_set(sd->scr_edje, sd->hit_rect)); + eo_do(obj, elm_interface_scrollable_objects_set(sd->scr_edje, sd->hit_rect)); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(sd->h_bounce, sd->v_bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(sd->h_bounce, sd->v_bounce)); if (sd->single_line) - eo_do(obj, elm_scrollable_interface_policy_set(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF)); + eo_do(obj, elm_interface_scrollable_policy_set(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF)); else - eo_do(obj, elm_scrollable_interface_policy_set(sd->policy_h, sd->policy_v)); - eo_do(obj, elm_scrollable_interface_content_set(sd->entry_edje)); - eo_do(obj, elm_scrollable_interface_content_viewport_resize_cb_set(_elm_entry_content_viewport_resize_cb)); + eo_do(obj, elm_interface_scrollable_policy_set(sd->policy_h, sd->policy_v)); + eo_do(obj, elm_interface_scrollable_content_set(sd->entry_edje)); + eo_do(obj, elm_interface_scrollable_content_viewport_resize_cb_set(_elm_entry_content_viewport_resize_cb)); elm_widget_on_show_region_hook_set(obj, _show_region_hook, NULL); } else { if (sd->scr_edje) { - eo_do(obj, elm_scrollable_interface_content_set(NULL)); + eo_do(obj, elm_interface_scrollable_content_set(NULL)); evas_object_hide(sd->scr_edje); } elm_widget_resize_object_set(obj, sd->entry_edje, EINA_TRUE); @@ -5198,7 +5198,7 @@ _scrollable_set(Eo *obj, void *_pd, va_list *list) if (sd->scr_edje) elm_widget_sub_object_add(obj, sd->scr_edje); - eo_do(obj, elm_scrollable_interface_objects_set(sd->entry_edje, sd->hit_rect)); + eo_do(obj, elm_interface_scrollable_objects_set(sd->entry_edje, sd->hit_rect)); elm_widget_on_show_region_hook_set(obj, NULL, NULL); } @@ -5276,7 +5276,7 @@ elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy v) { ELM_ENTRY_CHECK(obj); - eo_do(obj, elm_scrollable_interface_policy_set(h, v)); + eo_do(obj, elm_interface_scrollable_policy_set(h, v)); } static void @@ -5288,7 +5288,7 @@ _scroller_policy_set(Eo *obj, void *_pd, va_list *list) sd->policy_h = h; sd->policy_v = v; - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_policy_set(sd->policy_h, sd->policy_v)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_policy_set(sd->policy_h, sd->policy_v)); } EAPI void @@ -5297,7 +5297,7 @@ elm_entry_bounce_set(Evas_Object *obj, Eina_Bool v_bounce) { ELM_ENTRY_CHECK(obj); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(h_bounce, v_bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(h_bounce, v_bounce)); } static void @@ -5309,7 +5309,7 @@ _bounce_set(Eo *obj, void *_pd, va_list *list) sd->h_bounce = h_bounce; sd->v_bounce = v_bounce; - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_bounce_allow_set(h_bounce, v_bounce)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_bounce_allow_set(h_bounce, v_bounce)); } EAPI void @@ -5318,7 +5318,7 @@ elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *v_bounce) { ELM_ENTRY_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_bounce_allow_get(h_bounce, v_bounce)); + eo_do((Eo *) obj, elm_interface_scrollable_bounce_allow_get(h_bounce, v_bounce)); } EAPI void @@ -5968,8 +5968,8 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_CONTENT_ALIASES_GET), _elm_entry_smart_content_aliases_get), EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_THEME_ENABLE), _elm_entry_smart_theme_enable), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ALLOW_SET), _bounce_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_SET), _scroller_policy_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_BOUNCE_ALLOW_SET), _bounce_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_POLICY_SET), _scroller_policy_set), EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_TEXT_STYLE_USER_PUSH), _text_style_user_push), EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_TEXT_STYLE_USER_POP), _text_style_user_pop), @@ -6177,4 +6177,4 @@ static const Eo_Class_Description class_desc = { NULL }; -EO_DEFINE_CLASS(elm_obj_entry_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_SCROLLABLE_INTERFACE, EVAS_SMART_CLICKABLE_INTERFACE, NULL); +EO_DEFINE_CLASS(elm_obj_entry_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, EVAS_SMART_CLICKABLE_INTERFACE, NULL); diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 63149da..a223af0 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -143,10 +143,10 @@ _item_show_region(void *data) switch (sd->scroll_to_type) { case ELM_GENGRID_ITEM_SCROLLTO_TOP: - eo_do(WIDGET(it), elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(WIDGET(it), elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); break; case ELM_GENGRID_ITEM_SCROLLTO_MIDDLE: - eo_do(WIDGET(it), elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(WIDGET(it), elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); it_xpos = it_xpos - ((vw - sd->item_width) / 2); it_ypos = it_ypos - ((vh - sd->item_height) / 2); break; @@ -158,13 +158,13 @@ _item_show_region(void *data) if (sd->show_region) { - eo_do(WIDGET(it), elm_scrollable_interface_content_region_show( + eo_do(WIDGET(it), elm_interface_scrollable_content_region_show( it_xpos, it_ypos, vw, vh)); sd->show_region = EINA_FALSE; } if (sd->bring_in) { - eo_do(WIDGET(it), elm_scrollable_interface_region_bring_in( + eo_do(WIDGET(it), elm_interface_scrollable_region_bring_in( it_xpos, it_ypos, vw, vh)); sd->bring_in = EINA_FALSE; } @@ -438,12 +438,12 @@ _long_press_cb(void *data) { sd->reorder_it = it; evas_object_raise(VIEW(it)); - eo_do(WIDGET(it), elm_scrollable_interface_hold_set(EINA_TRUE)); - eo_do(WIDGET(it), elm_scrollable_interface_bounce_allow_get( + eo_do(WIDGET(it), elm_interface_scrollable_hold_set(EINA_TRUE)); + eo_do(WIDGET(it), elm_interface_scrollable_bounce_allow_get( &(GG_IT(it)->wsd->old_h_bounce), &(GG_IT(it)->wsd->old_v_bounce))); - eo_do(WIDGET(it), elm_scrollable_interface_bounce_allow_set(EINA_FALSE, EINA_FALSE)); + eo_do(WIDGET(it), elm_interface_scrollable_bounce_allow_set(EINA_FALSE, EINA_FALSE)); edje_object_signal_emit(VIEW(it), "elm,state,reorder,enabled", "elm"); } @@ -590,8 +590,8 @@ _item_mouse_up_cb(void *data, sd->calc_job = ecore_job_add(_calc_job, sd->obj); - eo_do(WIDGET(it), elm_scrollable_interface_hold_set(EINA_FALSE)); - eo_do(WIDGET(it), elm_scrollable_interface_bounce_allow_set( + eo_do(WIDGET(it), elm_interface_scrollable_hold_set(EINA_FALSE)); + eo_do(WIDGET(it), elm_interface_scrollable_bounce_allow_set( GG_IT(it)->wsd->old_h_bounce, GG_IT(it)->wsd->old_v_bounce)); @@ -1729,10 +1729,10 @@ _elm_gengrid_smart_event(Eo *obj, void *_pd, va_list *list) if (!sd->items) return; eo_do(obj, - elm_scrollable_interface_content_pos_get(&x, &y), - elm_scrollable_interface_step_size_get(&step_x, &step_y), - elm_scrollable_interface_page_size_get(&page_x, &page_y), - elm_scrollable_interface_content_viewport_size_get(&v_w, &v_h)); + elm_interface_scrollable_content_pos_get(&x, &y), + elm_interface_scrollable_step_size_get(&step_x, &step_y), + elm_interface_scrollable_page_size_get(&page_x, &page_y), + elm_interface_scrollable_content_viewport_size_get(&v_w, &v_h)); if ((!strcmp(ev->key, "Left")) || ((!strcmp(ev->key, "KP_Left")) && (!ev->string))) @@ -1904,7 +1904,7 @@ _elm_gengrid_smart_event(Eo *obj, void *_pd, va_list *list) else return; ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if (ret) *ret = EINA_TRUE; } @@ -1975,7 +1975,7 @@ _mirrored_set(Evas_Object *obj, ELM_GENGRID_DATA_GET(obj, sd); - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_mirrored_set(rtl)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_mirrored_set(rtl)); if (!sd->items) return; it = ELM_GEN_ITEM_FROM_INLIST(sd->items); @@ -2267,7 +2267,7 @@ _elm_gengrid_clear(Evas_Object *obj, evas_object_size_hint_min_set(sd->pan_obj, sd->minw, sd->minh); evas_object_smart_callback_call(sd->pan_obj, "changed", NULL); } - eo_do(obj, elm_scrollable_interface_content_region_show(0, 0, 0, 0)); + eo_do(obj, elm_interface_scrollable_content_region_show(0, 0, 0, 0)); evas_event_thaw(evas_object_evas_get(obj)); evas_event_thaw_eval(evas_object_evas_get(obj)); } @@ -2395,25 +2395,25 @@ _elm_gengrid_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) elm_widget_style_get(obj))) CRI("Failed to set layout!"); - eo_do(obj, elm_scrollable_interface_objects_set(wd->resize_obj, priv->hit_rect)); + eo_do(obj, elm_interface_scrollable_objects_set(wd->resize_obj, priv->hit_rect)); priv->old_h_bounce = bounce; priv->old_v_bounce = bounce; - eo_do(obj, elm_scrollable_interface_bounce_allow_set(bounce, bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(bounce, bounce)); eo_do(obj, - elm_scrollable_interface_animate_start_cb_set + elm_interface_scrollable_animate_start_cb_set (_scroll_animate_start_cb), - elm_scrollable_interface_animate_stop_cb_set(_scroll_animate_stop_cb), - elm_scrollable_interface_drag_start_cb_set(_scroll_drag_start_cb), - elm_scrollable_interface_drag_stop_cb_set(_scroll_drag_stop_cb), - elm_scrollable_interface_edge_left_cb_set(_edge_left_cb), - elm_scrollable_interface_edge_right_cb_set(_edge_right_cb), - elm_scrollable_interface_edge_top_cb_set(_edge_top_cb), - elm_scrollable_interface_edge_bottom_cb_set(_edge_bottom_cb), - elm_scrollable_interface_scroll_cb_set(_scroll_cb), - elm_scrollable_interface_page_change_cb_set(_scroll_page_change_cb)); + elm_interface_scrollable_animate_stop_cb_set(_scroll_animate_stop_cb), + elm_interface_scrollable_drag_start_cb_set(_scroll_drag_start_cb), + elm_interface_scrollable_drag_stop_cb_set(_scroll_drag_stop_cb), + elm_interface_scrollable_edge_left_cb_set(_edge_left_cb), + elm_interface_scrollable_edge_right_cb_set(_edge_right_cb), + elm_interface_scrollable_edge_top_cb_set(_edge_top_cb), + elm_interface_scrollable_edge_bottom_cb_set(_edge_bottom_cb), + elm_interface_scrollable_scroll_cb_set(_scroll_cb), + elm_interface_scrollable_page_change_cb_set(_scroll_page_change_cb)); priv->align_x = 0.5; priv->align_y = 0.5; @@ -2429,7 +2429,7 @@ _elm_gengrid_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_smart_member_add(priv->stack, priv->pan_obj); evas_object_raise(priv->stack); - eo_do(obj, elm_scrollable_interface_extern_pan_set(priv->pan_obj)); + eo_do(obj, elm_interface_scrollable_extern_pan_set(priv->pan_obj)); } static void @@ -3427,7 +3427,7 @@ elm_gengrid_bounce_set(Evas_Object *obj, Eina_Bool v_bounce) { ELM_GENGRID_CHECK(obj); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(h_bounce, v_bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(h_bounce, v_bounce)); } static void @@ -3435,7 +3435,7 @@ _bounce_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) { Eina_Bool h_bounce = va_arg(*list, int); Eina_Bool v_bounce = va_arg(*list, int); - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_bounce_allow_set(!!h_bounce, !!v_bounce)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_bounce_allow_set(!!h_bounce, !!v_bounce)); } EAPI void @@ -3444,7 +3444,7 @@ elm_gengrid_bounce_get(const Evas_Object *obj, Eina_Bool *v_bounce) { ELM_GENGRID_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_bounce_allow_get(h_bounce, v_bounce)); + eo_do((Eo *) obj, elm_interface_scrollable_bounce_allow_get(h_bounce, v_bounce)); } EAPI void @@ -3465,8 +3465,8 @@ _page_relative_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) double h_pagerel = va_arg(*list, double); double v_pagerel = va_arg(*list, double); - eo_do((Eo *) obj, elm_scrollable_interface_paging_get(NULL, NULL, &pagesize_h, &pagesize_v)); - eo_do((Eo *) obj, elm_scrollable_interface_paging_set + eo_do((Eo *) obj, elm_interface_scrollable_paging_get(NULL, NULL, &pagesize_h, &pagesize_v)); + eo_do((Eo *) obj, elm_interface_scrollable_paging_set (h_pagerel, v_pagerel, pagesize_h, pagesize_v)); } @@ -3485,7 +3485,7 @@ _page_relative_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list) double *h_pagerel = va_arg(*list, double *); double *v_pagerel = va_arg(*list, double *); - eo_do((Eo *) obj, elm_scrollable_interface_paging_get(h_pagerel, v_pagerel, NULL, NULL)); + eo_do((Eo *) obj, elm_interface_scrollable_paging_get(h_pagerel, v_pagerel, NULL, NULL)); } EAPI void @@ -3506,8 +3506,8 @@ _page_size_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) Evas_Coord h_pagesize = va_arg(*list, Evas_Coord); Evas_Coord v_pagesize = va_arg(*list, Evas_Coord); - eo_do((Eo *) obj, elm_scrollable_interface_paging_get(&pagerel_h, &pagerel_v, NULL, NULL)); - eo_do((Eo *) obj, elm_scrollable_interface_paging_set + eo_do((Eo *) obj, elm_interface_scrollable_paging_get(&pagerel_h, &pagerel_v, NULL, NULL)); + eo_do((Eo *) obj, elm_interface_scrollable_paging_set (pagerel_h, pagerel_v, h_pagesize, v_pagesize)); } @@ -3517,7 +3517,7 @@ elm_gengrid_current_page_get(const Evas_Object *obj, int *v_pagenumber) { ELM_GENGRID_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_current_page_get(h_pagenumber, v_pagenumber)); + eo_do((Eo *) obj, elm_interface_scrollable_current_page_get(h_pagenumber, v_pagenumber)); } EAPI void @@ -3526,7 +3526,7 @@ elm_gengrid_last_page_get(const Evas_Object *obj, int *v_pagenumber) { ELM_GENGRID_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_last_page_get(h_pagenumber, v_pagenumber)); + eo_do((Eo *) obj, elm_interface_scrollable_last_page_get(h_pagenumber, v_pagenumber)); } EAPI void @@ -3535,7 +3535,7 @@ elm_gengrid_page_show(const Evas_Object *obj, int v_pagenumber) { ELM_GENGRID_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_page_show(h_pagenumber, v_pagenumber)); + eo_do((Eo *) obj, elm_interface_scrollable_page_show(h_pagenumber, v_pagenumber)); } EAPI void @@ -3544,7 +3544,7 @@ elm_gengrid_page_bring_in(const Evas_Object *obj, int v_pagenumber) { ELM_GENGRID_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_page_bring_in(h_pagenumber, v_pagenumber)); + eo_do((Eo *) obj, elm_interface_scrollable_page_bring_in(h_pagenumber, v_pagenumber)); } EAPI void @@ -3553,7 +3553,7 @@ elm_gengrid_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_v) { ELM_GENGRID_CHECK(obj); - eo_do(obj, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do(obj, elm_interface_scrollable_policy_set(policy_h, policy_v)); } static void @@ -3566,7 +3566,7 @@ _scroller_policy_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) (policy_v >= ELM_SCROLLER_POLICY_LAST)) return; - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_policy_set(policy_h, policy_v)); } EAPI void @@ -3575,7 +3575,7 @@ elm_gengrid_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_v) { ELM_GENGRID_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_policy_get(policy_h, policy_v)); + eo_do((Eo *) obj, elm_interface_scrollable_policy_get(policy_h, policy_v)); } static void @@ -3586,7 +3586,7 @@ _scroller_policy_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list) Elm_Scroller_Policy *policy_h = va_arg(*list, Elm_Scroller_Policy *); Elm_Scroller_Policy *policy_v = va_arg(*list, Elm_Scroller_Policy *); - eo_do_super((Eo *)obj, MY_CLASS, elm_scrollable_interface_policy_get(&s_policy_h, &s_policy_v)); + eo_do_super((Eo *)obj, MY_CLASS, elm_interface_scrollable_policy_get(&s_policy_h, &s_policy_v)); if (policy_h) *policy_h = (Elm_Scroller_Policy)s_policy_h; if (policy_v) *policy_v = (Elm_Scroller_Policy)s_policy_v; } @@ -4081,9 +4081,9 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_gengrid_smart_sizing_eval), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ALLOW_SET), _bounce_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_SET), _scroller_policy_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_GET), _scroller_policy_get), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_BOUNCE_ALLOW_SET), _bounce_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_POLICY_SET), _scroller_policy_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_POLICY_GET), _scroller_policy_get), EO_OP_FUNC(ELM_OBJ_GENGRID_ID(ELM_OBJ_GENGRID_SUB_ID_ITEM_SIZE_SET), _item_size_set), EO_OP_FUNC(ELM_OBJ_GENGRID_ID(ELM_OBJ_GENGRID_SUB_ID_ITEM_SIZE_GET), _item_size_get), @@ -4183,4 +4183,4 @@ static const Eo_Class_Description class_desc = { NULL }; -EO_DEFINE_CLASS(elm_obj_gengrid_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_SCROLLABLE_INTERFACE, EVAS_SMART_CLICKABLE_INTERFACE, NULL); +EO_DEFINE_CLASS(elm_obj_gengrid_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, EVAS_SMART_CLICKABLE_INTERFACE, NULL); diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index b16b7b5..e4d786a 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -313,9 +313,9 @@ _item_scroll(Elm_Genlist_Smart_Data *sd) break; } if (sd->bring_in) - eo_do(sd->obj, elm_scrollable_interface_region_bring_in(dx, dy, dw, dh)); + eo_do(sd->obj, elm_interface_scrollable_region_bring_in(dx, dy, dw, dh)); else - eo_do(sd->obj, elm_scrollable_interface_content_region_show + eo_do(sd->obj, elm_interface_scrollable_content_region_show (dx, dy, dw, dh)); it->item->show_me = EINA_FALSE; @@ -421,7 +421,7 @@ _calc_job(void *data) evas_object_geometry_get(sd->pan_obj, NULL, NULL, &ow, &sd->h); if (sd->mode == ELM_LIST_COMPRESS) - eo_do(sd->obj, elm_scrollable_interface_content_viewport_size_get + eo_do(sd->obj, elm_interface_scrollable_content_viewport_size_get (&vw, NULL)); if (sd->w != ow) sd->w = ow; @@ -513,7 +513,7 @@ _calc_job(void *data) it = sd->anchor_item; it_y = sd->anchor_y; - eo_do(sd->obj, elm_scrollable_interface_content_pos_set + eo_do(sd->obj, elm_interface_scrollable_content_pos_set (sd->pan_x, it->item->block->y + it->y + it_y, EINA_TRUE)); sd->anchor_item = it; @@ -583,7 +583,7 @@ _elm_genlist_smart_sizing_eval(Eo *obj, void *_pd, va_list *list EINA_UNUSED) { Evas_Coord vw = 0, vh = 0; - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); if ((vw != 0) && (vw != sd->prev_viewport_w)) { Item_Block *itb; @@ -2267,13 +2267,13 @@ _elm_genlist_pan_smart_calculate(Eo *obj EINA_UNUSED, void *_pd, va_list *list E _item_auto_scroll(sd); eo_do((sd)->obj, - elm_scrollable_interface_content_pos_get(&vx, &vy), - elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + elm_interface_scrollable_content_pos_get(&vx, &vy), + elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); if (sd->reorder_fast == 1) - eo_do((sd)->obj, elm_scrollable_interface_content_region_show(vx, vy - 10, vw, vh)); + eo_do((sd)->obj, elm_interface_scrollable_content_region_show(vx, vy - 10, vw, vh)); else if (sd->reorder_fast == -1) - eo_do((sd)->obj, elm_scrollable_interface_content_region_show(vx, vy + 10, vw, vh)); + eo_do((sd)->obj, elm_interface_scrollable_content_region_show(vx, vy + 10, vw, vh)); if (sd->focused_item) _elm_widget_focus_highlight_start(psd->wobj); @@ -2617,10 +2617,10 @@ _elm_genlist_smart_event(Eo *obj, void *_pd, va_list *list) if (!sd->items) return; eo_do(obj, - elm_scrollable_interface_content_pos_get(&x, &y), - elm_scrollable_interface_step_size_get(&step_x, &step_y), - elm_scrollable_interface_page_size_get(&page_x, &page_y), - elm_scrollable_interface_content_viewport_size_get(&v_w, &v_h)); + elm_interface_scrollable_content_pos_get(&x, &y), + elm_interface_scrollable_step_size_get(&step_x, &step_y), + elm_interface_scrollable_page_size_get(&page_x, &page_y), + elm_interface_scrollable_content_viewport_size_get(&v_w, &v_h)); if ((!strcmp(ev->key, "Left")) || ((!strcmp(ev->key, "KP_Left")) && (!ev->string))) @@ -2757,7 +2757,7 @@ _elm_genlist_smart_event(Eo *obj, void *_pd, va_list *list) if (y < 0) y = 0; if (y > pan_max_y) y = pan_max_y; - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if (ret) *ret = EINA_TRUE; } @@ -2938,7 +2938,7 @@ _mirrored_set(Evas_Object *obj, ELM_GENLIST_DATA_GET(obj, sd); _item_cache_zero(sd); - eo_do(obj, elm_scrollable_interface_mirrored_set(rtl)); + eo_do(obj, elm_interface_scrollable_mirrored_set(rtl)); } static void @@ -2994,7 +2994,7 @@ _show_region_hook(void *data EINA_UNUSED, //x & y are screen coordinates, Add with pan coordinates x += sd->pan_x; y += sd->pan_y; - eo_do(obj, elm_scrollable_interface_content_region_show(x, y, w, h)); + eo_do(obj, elm_interface_scrollable_content_region_show(x, y, w, h)); } static void @@ -3516,8 +3516,8 @@ _long_press_cb(void *data) else evas_object_stack_below(VIEW(it), sd->stack[1]); - eo_do(sd->obj, elm_scrollable_interface_hold_set(EINA_TRUE)); - eo_do(sd->obj, elm_scrollable_interface_bounce_allow_set + eo_do(sd->obj, elm_interface_scrollable_hold_set(EINA_TRUE)); + eo_do(sd->obj, elm_interface_scrollable_bounce_allow_set (EINA_FALSE, EINA_FALSE)); list = elm_genlist_realized_items_get @@ -4103,16 +4103,16 @@ _item_process_post(Elm_Genlist_Smart_Data *sd, it2 = sd->selected->data; if (!it2->item->block) return; - eo_do(sd->obj, elm_scrollable_interface_content_pos_get(NULL, &y)); + eo_do(sd->obj, elm_interface_scrollable_content_pos_get(NULL, &y)); evas_object_geometry_get(sd->pan_obj, NULL, NULL, NULL, &h); if ((it->y + it->item->block->y > y + h) || (it->y + it->item->block->y + it->item->h < y)) /* offscreen, just update */ - eo_do(sd->obj, elm_scrollable_interface_content_region_show + eo_do(sd->obj, elm_interface_scrollable_content_region_show (it2->x + it2->item->block->x, y, it2->item->block->w, h)); else - eo_do(sd->obj, elm_scrollable_interface_content_region_show + eo_do(sd->obj, elm_interface_scrollable_content_region_show (it->x + it->item->block->x, y + it->item->h, it->item->block->w, h)); } @@ -4388,8 +4388,8 @@ _item_mouse_up_cb(void *data, } edje_object_signal_emit(VIEW(it), "elm,state,reorder,disabled", "elm"); sd->reorder_it = sd->reorder_rel = NULL; - eo_do(sd->obj, elm_scrollable_interface_hold_set(EINA_FALSE)); - eo_do(sd->obj, elm_scrollable_interface_bounce_allow_set + eo_do(sd->obj, elm_interface_scrollable_hold_set(EINA_FALSE)); + eo_do(sd->obj, elm_interface_scrollable_bounce_allow_set (sd->h_bounce, sd->v_bounce)); } if (sd->longpressed) @@ -4496,7 +4496,7 @@ _scroll_hold_timer_cb(void *data) if (!data) return ECORE_CALLBACK_CANCEL; - eo_do(sd->obj, elm_scrollable_interface_hold_set(EINA_FALSE)); + eo_do(sd->obj, elm_interface_scrollable_hold_set(EINA_FALSE)); sd->scr_hold_timer = NULL; return ECORE_CALLBACK_CANCEL; @@ -5033,7 +5033,7 @@ _decorate_item_set(Elm_Gen_Item *it) it->item->nocache_once = EINA_TRUE; ELM_SAFE_FREE(sd->scr_hold_timer, ecore_timer_del); - eo_do(sd->obj, elm_scrollable_interface_hold_set(EINA_TRUE)); + eo_do(sd->obj, elm_interface_scrollable_hold_set(EINA_TRUE)); sd->scr_hold_timer = ecore_timer_add(SCR_HOLD_TIME, _scroll_hold_timer_cb, sd->obj); evas_event_freeze(evas_object_evas_get(sd->obj)); @@ -5100,27 +5100,27 @@ _elm_genlist_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) (obj, "genlist", "base", elm_widget_style_get(obj))) CRI("Failed to set layout!"); - eo_do(obj, elm_scrollable_interface_objects_set(wd->resize_obj, priv->hit_rect)); + eo_do(obj, elm_interface_scrollable_objects_set(wd->resize_obj, priv->hit_rect)); - eo_do(obj, elm_scrollable_interface_bounce_allow_set + eo_do(obj, elm_interface_scrollable_bounce_allow_set (EINA_FALSE, _elm_config->thumbscroll_bounce_enable)); priv->v_bounce = _elm_config->thumbscroll_bounce_enable; eo_do(obj, - elm_scrollable_interface_animate_start_cb_set(_scroll_animate_start_cb), - elm_scrollable_interface_animate_stop_cb_set(_scroll_animate_stop_cb), - elm_scrollable_interface_drag_start_cb_set(_scroll_drag_start_cb), - elm_scrollable_interface_drag_stop_cb_set(_scroll_drag_stop_cb), - elm_scrollable_interface_edge_left_cb_set(_edge_left_cb), - elm_scrollable_interface_edge_right_cb_set(_edge_right_cb), - elm_scrollable_interface_edge_top_cb_set(_edge_top_cb), - elm_scrollable_interface_edge_bottom_cb_set(_edge_bottom_cb), - elm_scrollable_interface_vbar_drag_cb_set(_vbar_drag_cb), - elm_scrollable_interface_vbar_press_cb_set(_vbar_press_cb), - elm_scrollable_interface_vbar_unpress_cb_set(_vbar_unpress_cb), - elm_scrollable_interface_hbar_drag_cb_set(_hbar_drag_cb), - elm_scrollable_interface_hbar_press_cb_set(_hbar_press_cb), - elm_scrollable_interface_hbar_unpress_cb_set(_hbar_unpress_cb)); + elm_interface_scrollable_animate_start_cb_set(_scroll_animate_start_cb), + elm_interface_scrollable_animate_stop_cb_set(_scroll_animate_stop_cb), + elm_interface_scrollable_drag_start_cb_set(_scroll_drag_start_cb), + elm_interface_scrollable_drag_stop_cb_set(_scroll_drag_stop_cb), + elm_interface_scrollable_edge_left_cb_set(_edge_left_cb), + elm_interface_scrollable_edge_right_cb_set(_edge_right_cb), + elm_interface_scrollable_edge_top_cb_set(_edge_top_cb), + elm_interface_scrollable_edge_bottom_cb_set(_edge_bottom_cb), + elm_interface_scrollable_vbar_drag_cb_set(_vbar_drag_cb), + elm_interface_scrollable_vbar_press_cb_set(_vbar_press_cb), + elm_interface_scrollable_vbar_unpress_cb_set(_vbar_unpress_cb), + elm_interface_scrollable_hbar_drag_cb_set(_hbar_drag_cb), + elm_interface_scrollable_hbar_press_cb_set(_hbar_press_cb), + elm_interface_scrollable_hbar_unpress_cb_set(_hbar_unpress_cb)); priv->mode = ELM_LIST_SCROLL; priv->max_items_per_block = MAX_ITEMS_PER_BLOCK; @@ -5140,7 +5140,7 @@ _elm_genlist_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_smart_member_add(priv->stack[i], priv->pan_obj); } - eo_do(obj, elm_scrollable_interface_extern_pan_set(priv->pan_obj)); + eo_do(obj, elm_interface_scrollable_extern_pan_set(priv->pan_obj)); edje_object_size_min_calc(wd->resize_obj, &minw, &minh); evas_object_size_hint_min_set(obj, minw, minh); @@ -5339,7 +5339,7 @@ _elm_genlist_clear(Evas_Object *obj, evas_object_smart_callback_call(sd->pan_obj, "changed", NULL); } elm_layout_sizing_eval(sd->obj); - eo_do(obj, elm_scrollable_interface_content_region_show(0, 0, 0, 0)); + eo_do(obj, elm_interface_scrollable_content_region_show(0, 0, 0, 0)); evas_event_thaw(evas_object_evas_get(sd->obj)); evas_event_thaw_eval(evas_object_evas_get(sd->obj)); } @@ -6695,7 +6695,7 @@ elm_genlist_item_show(Elm_Object_Item *item, if (_elm_genlist_item_coordinates_calc (item, type, EINA_FALSE, &x, &y, &w, &h)) - eo_do(WIDGET(item), elm_scrollable_interface_content_region_show + eo_do(WIDGET(item), elm_interface_scrollable_content_region_show (x, y, w, h)); } @@ -6709,7 +6709,7 @@ elm_genlist_item_bring_in(Elm_Object_Item *item, if (_elm_genlist_item_coordinates_calc (item, type, EINA_TRUE, &x, &y, &w, &h)) - eo_do(WIDGET(item), elm_scrollable_interface_region_bring_in(x, y, w, h)); + eo_do(WIDGET(item), elm_interface_scrollable_region_bring_in(x, y, w, h)); } EAPI void @@ -7116,7 +7116,7 @@ elm_genlist_bounce_set(Evas_Object *obj, Eina_Bool v_bounce) { ELM_GENLIST_CHECK(obj); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(h_bounce, v_bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(h_bounce, v_bounce)); } static void @@ -7128,7 +7128,7 @@ _bounce_set(Eo *obj, void *_pd, va_list *list) sd->h_bounce = !!h_bounce; sd->v_bounce = !!v_bounce; - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_bounce_allow_set + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_bounce_allow_set (sd->h_bounce, sd->v_bounce)); } @@ -7138,7 +7138,7 @@ elm_genlist_bounce_get(const Evas_Object *obj, Eina_Bool *v_bounce) { ELM_GENLIST_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_bounce_allow_get + eo_do((Eo *) obj, elm_interface_scrollable_bounce_allow_get (h_bounce, v_bounce)); } @@ -7267,7 +7267,7 @@ elm_genlist_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_v) { ELM_GENLIST_CHECK(obj); - eo_do(obj, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do(obj, elm_interface_scrollable_policy_set(policy_h, policy_v)); } static void @@ -7280,7 +7280,7 @@ _scroller_policy_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) (policy_v >= ELM_SCROLLER_POLICY_LAST)) return; - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_policy_set(policy_h, policy_v)); } EAPI void @@ -7289,7 +7289,7 @@ elm_genlist_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_v) { ELM_GENLIST_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_policy_get(policy_h, policy_v)); + eo_do((Eo *) obj, elm_interface_scrollable_policy_get(policy_h, policy_v)); } static void @@ -7300,7 +7300,7 @@ _scroller_policy_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list) Elm_Scroller_Policy *policy_h = va_arg(*list, Elm_Scroller_Policy *); Elm_Scroller_Policy *policy_v = va_arg(*list, Elm_Scroller_Policy *); - eo_do_super((Eo *)obj, MY_CLASS, elm_scrollable_interface_policy_get + eo_do_super((Eo *)obj, MY_CLASS, elm_interface_scrollable_policy_get (&s_policy_h, &s_policy_v)); if (policy_h) *policy_h = (Elm_Scroller_Policy)s_policy_h; if (policy_v) *policy_v = (Elm_Scroller_Policy)s_policy_v; @@ -7937,10 +7937,10 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_genlist_smart_sizing_eval), EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SUB_OBJECT_ADD_ENABLE), _elm_genlist_smart_layout_sub_object_add_enable), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ALLOW_SET), _bounce_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ALLOW_GET), _bounce_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_SET), _scroller_policy_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_GET), _scroller_policy_get), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_BOUNCE_ALLOW_SET), _bounce_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_BOUNCE_ALLOW_GET), _bounce_get), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_POLICY_SET), _scroller_policy_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_POLICY_GET), _scroller_policy_get), EO_OP_FUNC(ELM_OBJ_GENLIST_ID(ELM_OBJ_GENLIST_SUB_ID_ITEMS_COUNT), _items_count), EO_OP_FUNC(ELM_OBJ_GENLIST_ID(ELM_OBJ_GENLIST_SUB_ID_ITEM_APPEND), _item_append), @@ -8045,4 +8045,4 @@ static const Eo_Class_Description class_desc = { NULL }; -EO_DEFINE_CLASS(elm_obj_genlist_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_SCROLLABLE_INTERFACE, EVAS_SMART_CLICKABLE_INTERFACE, NULL); +EO_DEFINE_CLASS(elm_obj_genlist_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, EVAS_SMART_CLICKABLE_INTERFACE, NULL); diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c index 06290c6..586bc70 100644 --- a/src/lib/elm_interface_scrollable.c +++ b/src/lib/elm_interface_scrollable.c @@ -389,9 +389,7 @@ EO_DEFINE_CLASS(elm_obj_pan_eo_class_get, &_elm_pan_class_desc, EVAS_OBJ_SMART_C /* pan smart object on top, scroller interface on bottom */ /* ============================================================ */ -EAPI Eo_Op ELM_SCROLLABLE_INTERFACE_BASE_ID = EO_NOOP; - -#define MY_SCROLLABLE_INTERFACE ELM_SCROLLABLE_INTERFACE +#define MY_SCROLLABLE_INTERFACE ELM_INTERFACE_SCROLLABLE_CLASS #define MY_SCROLLABLE_INTERFACE_NAME "Elm_Interface_Scrollable" #define MY_SCROLLABLE_INTERFACE_NAME_LEGACY "elm_interface_scrollable" @@ -975,7 +973,7 @@ _elm_scroll_scroll_bar_read_and_update( eo_do(sid->pan_obj, elm_obj_pan_pos_min_get(&minx, &miny)); x = _round(vx * (double)mx + minx, 1); y = _round(vy * (double)my + miny, 1); - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); } static void @@ -1218,36 +1216,24 @@ _elm_scroll_edje_drag_h_cb(void *data, _elm_scroll_scroll_bar_read_and_update(sid); } -static void -_elm_scroll_content_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_size_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord *w, Evas_Coord *h) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord *w = va_arg(*list, Evas_Coord *); - Evas_Coord *h = va_arg(*list, Evas_Coord *); - eo_do(sid->pan_obj, elm_obj_pan_content_size_get(w, h)); } -static void -_elm_scroll_content_viewport_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_viewport_size_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord *w, Evas_Coord *h) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord *w = va_arg(*list, Evas_Coord *); - Evas_Coord *h = va_arg(*list, Evas_Coord *); - if (!sid->pan_obj || !sid->edje_obj) return; edje_object_calc_force(sid->edje_obj); evas_object_geometry_get(sid->pan_obj, NULL, NULL, w, h); } -static void -_elm_scroll_content_min_limit(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_min_limit(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool w, Eina_Bool h) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); - if (!sid->edje_obj) return; if (!sid->cb_func.content_min_limit) @@ -1272,7 +1258,7 @@ _elm_scroll_x_mirrored_get(const Evas_Object *obj, if (!sid->pan_obj) return 0; - eo_do((Eo *)obj, elm_scrollable_interface_content_viewport_size_get(&w, NULL)); + eo_do((Eo *)obj, elm_interface_scrollable_content_viewport_size_get(&w, NULL)); eo_do(sid->pan_obj, elm_obj_pan_content_size_get(&cw, &ch)); ret = (cw - (x + w)); @@ -1294,7 +1280,7 @@ _elm_scroll_wanted_coordinates_update(Elm_Scrollable_Smart_Interface_Data *sid, /* Update wx/y/w/h - and if the requested positions aren't legal * adjust a bit. */ - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get (&sid->ww, &sid->wh)); if (x < 0) sid->wx = 0; @@ -1317,7 +1303,7 @@ _elm_scroll_momentum_end(Elm_Scrollable_Smart_Interface_Data *sid) if (sid->down.momentum_animator) { Evas_Coord px, py; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&px, &py)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&px, &py)); _elm_scroll_wanted_coordinates_update(sid, px, py); ELM_SAFE_FREE(sid->down.momentum_animator, ecore_animator_del); @@ -1347,7 +1333,7 @@ _elm_scroll_bounce_x_animator(void *data) { dt = dt / _elm_config->thumbscroll_bounce_friction; odx = sid->down.b2x - sid->down.bx; - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get (&w, NULL)); if (!sid->down.momentum_animator && (w > abs(odx))) { @@ -1358,7 +1344,7 @@ _elm_scroll_bounce_x_animator(void *data) } if (dt > 1.0) dt = 1.0; p = 1.0 - ((1.0 - dt) * (1.0 - dt)); - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); dx = (odx * p); r = 1.0; if (sid->down.momentum_animator) @@ -1370,7 +1356,7 @@ _elm_scroll_bounce_x_animator(void *data) } x = sid->down.b2x + (int)((double)(dx - odx) * r); if (!sid->down.cancelled) - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if (dt >= 1.0) { if (sid->down.momentum_animator) @@ -1403,7 +1389,7 @@ _elm_scroll_bounce_y_animator(void *data) { dt = dt / _elm_config->thumbscroll_bounce_friction; ody = sid->down.b2y - sid->down.by; - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get (NULL, &h)); if (!sid->down.momentum_animator && (h > abs(ody))) { @@ -1414,7 +1400,7 @@ _elm_scroll_bounce_y_animator(void *data) } if (dt > 1.0) dt = 1.0; p = 1.0 - ((1.0 - dt) * (1.0 - dt)); - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); dy = (ody * p); r = 1.0; if (sid->down.momentum_animator) @@ -1426,7 +1412,7 @@ _elm_scroll_bounce_y_animator(void *data) } y = sid->down.b2y + (int)((double)(dy - ody) * r); if (!sid->down.cancelled) - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if (dt >= 1.0) { if (sid->down.momentum_animator) @@ -1524,29 +1510,20 @@ _elm_scroll_bounce_eval(Elm_Scrollable_Smart_Interface_Data *sid) } } -static void -_elm_scroll_content_pos_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_pos_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord *x, Evas_Coord *y) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord *x = va_arg(*list, Evas_Coord *); - Evas_Coord *y = va_arg(*list, Evas_Coord *); - if (!sid->pan_obj) return; eo_do(sid->pan_obj, elm_obj_pan_pos_get(x, y)); } -static void -_elm_scroll_content_pos_set(Eo *obj, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_pos_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord x, Evas_Coord y, Eina_Bool sig) { - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Eina_Bool sig = va_arg(*list, int); - Evas_Coord mx = 0, my = 0, px = 0, py = 0, spx = 0, spy = 0, minx = 0, miny = 0; double vx, vy; - Elm_Scrollable_Smart_Interface_Data *sid = _pd; if (!sid->edje_obj || !sid->pan_obj) return; @@ -1709,14 +1686,11 @@ _elm_scroll_content_pos_set(Eo *obj, void *_pd, va_list *list) _elm_direction_arrows_eval(sid); } -static void -_elm_scroll_mirrored_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_mirrored_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool mirrored) { Evas_Coord wx; - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool mirrored = va_arg(*list, int); - if (!sid->edje_obj) return; mirrored = !!mirrored; @@ -1732,7 +1706,7 @@ _elm_scroll_mirrored_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) else wx = sid->wx; - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(wx, sid->wy, EINA_FALSE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(wx, sid->wy, EINA_FALSE)); } /* returns TRUE when we need to move the scroller, FALSE otherwise. @@ -1830,33 +1804,22 @@ _elm_scroll_content_region_show_internal(Evas_Object *obj, return EINA_TRUE; } -static void -_elm_scroll_content_region_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_region_get(Eo *obj, Elm_Scrollable_Smart_Interface_Data *_pd EINA_UNUSED, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { - Evas_Coord *x = va_arg(*list, Evas_Coord *); - Evas_Coord *y = va_arg(*list, Evas_Coord *); - Evas_Coord *w = va_arg(*list, Evas_Coord *); - Evas_Coord *h = va_arg(*list, Evas_Coord *); - - eo_do(obj, elm_scrollable_interface_content_pos_get(x, y)); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(w, h)); + eo_do(obj, elm_interface_scrollable_content_pos_get(x, y)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(w, h)); } /* Set should be used for calculated positions, for example, when we move * because of an animation or because this is the correct position after * constraints. */ -static void -_elm_scroll_content_region_set(Eo *obj, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_region_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); - if (_elm_scroll_content_region_show_internal(obj, &x, &y, w, h)) { - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_FALSE)); sid->down.sx = x; sid->down.sy = y; sid->down.x = sid->down.history[0].x; @@ -1866,22 +1829,16 @@ _elm_scroll_content_region_set(Eo *obj, void *_pd, va_list *list) /* Set should be used for setting the wanted position, for example a * user scroll or moving the cursor in an entry. */ -static void -_elm_scroll_content_region_show(Eo *obj, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_region_show(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); - sid->wx = x; sid->wy = y; sid->ww = w; sid->wh = h; if (_elm_scroll_content_region_show_internal(obj, &x, &y, w, h)) { - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); sid->down.sx = x; sid->down.sy = y; sid->down.x = sid->down.history[0].x; @@ -1912,7 +1869,7 @@ _elm_scroll_wanted_region_set(Evas_Object *obj) if (sid->ww == -1) { - eo_do(obj, elm_scrollable_interface_content_viewport_size_get + eo_do(obj, elm_interface_scrollable_content_viewport_size_get (&ww, &wh)); } else @@ -1921,7 +1878,7 @@ _elm_scroll_wanted_region_set(Evas_Object *obj) wh = sid->wh; } - eo_do(obj, elm_scrollable_interface_content_region_set(wx, sid->wy, ww, wh)); + eo_do(obj, elm_interface_scrollable_content_region_set(wx, sid->wy, ww, wh)); } static void @@ -1952,7 +1909,7 @@ _elm_scroll_wheel_event_cb(void *data, return; else if (evas_key_modifier_is_set(ev->modifiers, "Shift")) direction = !direction; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); if ((sid->down.bounce_x_animator) || (sid->down.bounce_y_animator) || (sid->scrollto.x.animator) || (sid->scrollto.y.animator)) { @@ -1974,7 +1931,7 @@ _elm_scroll_wheel_event_cb(void *data, if (sid->content_info.resized) _elm_scroll_wanted_region_set(sid->obj); } - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); if (sid->pan_obj) eo_do(sid->pan_obj, elm_obj_pan_content_size_get(&cw, &ch)); if (!_paging_is_enabled(sid)) @@ -1997,12 +1954,12 @@ _elm_scroll_wheel_event_cb(void *data, if ((!sid->hold) && (!sid->freeze)) { _elm_scroll_wanted_coordinates_update(sid, x, y); - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); } } else { - eo_do(sid->obj, elm_scrollable_interface_current_page_get(&pagenumber_h, &pagenumber_v)); + eo_do(sid->obj, elm_interface_scrollable_current_page_get(&pagenumber_h, &pagenumber_v)); if (!direction) { if (ch > vh || cw <= vw) @@ -2088,7 +2045,7 @@ _elm_scroll_momentum_animator(void *data) sid->down.ay = dy; x = sid->down.sx - dx; y = sid->down.sy - dy; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&px, &py)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&px, &py)); if ((sid->down.bounce_x_animator) || (sid->down.bounce_x_hold)) { @@ -2101,7 +2058,7 @@ _elm_scroll_momentum_animator(void *data) sid->down.by = sid->down.by0 - dy + sid->down.b0y; y = py; } - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); _elm_scroll_wanted_coordinates_update(sid, x, y); eo_do(sid->pan_obj, elm_obj_pan_pos_max_get(&maxx, &maxy)); eo_do(sid->pan_obj, elm_obj_pan_pos_min_get(&minx, &miny)); @@ -2147,8 +2104,8 @@ _elm_scroll_page_x_get(Elm_Scrollable_Smart_Interface_Data *sid, if (!sid->pan_obj) return 0; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get(&w, &h)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get(&w, &h)); eo_do(sid->pan_obj, elm_obj_pan_content_size_get(&cw, &ch)); eo_do(sid->pan_obj, elm_obj_pan_pos_min_get(&minx, NULL)); @@ -2187,8 +2144,8 @@ _elm_scroll_page_y_get(Elm_Scrollable_Smart_Interface_Data *sid, if (!sid->pan_obj) return 0; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get(&w, &h)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get(&w, &h)); eo_do(sid->pan_obj, elm_obj_pan_content_size_get(&cw, &ch)); eo_do(sid->pan_obj, elm_obj_pan_pos_min_get(NULL, &miny)); @@ -2243,7 +2200,7 @@ _elm_scroll_scroll_to_x_animator(void *data) if (t >= sid->scrollto.x.t_end) { px = sid->scrollto.x.end; - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(px, py, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(px, py, EINA_TRUE)); sid->down.sx = px; sid->down.x = sid->down.history[0].x; sid->down.pdx = 0; @@ -2253,7 +2210,7 @@ _elm_scroll_scroll_to_x_animator(void *data) _elm_scroll_anim_stop(sid); return ECORE_CALLBACK_CANCEL; } - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(px, py, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(px, py, EINA_TRUE)); _elm_scroll_wanted_coordinates_update(sid, px, py); return ECORE_CALLBACK_RENEW; } @@ -2278,7 +2235,7 @@ _elm_scroll_scroll_to_y_animator(void *data) if (t >= sid->scrollto.y.t_end) { py = sid->scrollto.y.end; - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(px, py, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(px, py, EINA_TRUE)); sid->down.sy = py; sid->down.y = sid->down.history[0].y; sid->down.pdy = 0; @@ -2288,7 +2245,7 @@ _elm_scroll_scroll_to_y_animator(void *data) _elm_scroll_anim_stop(sid); return ECORE_CALLBACK_CANCEL; } - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(px, py, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(px, py, EINA_TRUE)); _elm_scroll_wanted_coordinates_update(sid, px, py); return ECORE_CALLBACK_RENEW; @@ -2307,11 +2264,11 @@ _elm_scroll_scroll_to_y(Elm_Scrollable_Smart_Interface_Data *sid, if (sid->freeze) return; if (t_in <= 0.0) { - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get (&w, &h)); y = pos_y; - eo_do(sid->obj, elm_scrollable_interface_content_region_set(x, y, w, h)); + eo_do(sid->obj, elm_interface_scrollable_content_region_set(x, y, w, h)); return; } t = ecore_loop_time_get(); @@ -2350,11 +2307,11 @@ _elm_scroll_scroll_to_x(Elm_Scrollable_Smart_Interface_Data *sid, if (sid->freeze) return; if (t_in <= 0.0) { - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get (&w, &h)); x = pos_x; - eo_do(sid->obj, elm_scrollable_interface_content_region_set + eo_do(sid->obj, elm_interface_scrollable_content_region_set (x, y, w, h)); return; } @@ -2554,7 +2511,7 @@ _elm_scroll_mouse_up_event_cb(void *data, } sid->down.anim_start = ecore_loop_time_get(); eo_do(sid->obj, - elm_scrollable_interface_content_pos_get(&x, &y)); + elm_interface_scrollable_content_pos_get(&x, &y)); sid->down.sx = x; sid->down.sy = y; sid->down.b0x = 0; @@ -2573,7 +2530,7 @@ _elm_scroll_mouse_up_event_cb(void *data, { Evas_Coord pgx, pgy; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get + eo_do(sid->obj, elm_interface_scrollable_content_pos_get (&x, &y)); if ((!sid->obj) || (!elm_widget_drag_child_locked_x_get @@ -2613,7 +2570,7 @@ _elm_scroll_mouse_up_event_cb(void *data, { Evas_Coord pgx, pgy; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get + eo_do(sid->obj, elm_interface_scrollable_content_pos_get (&x, &y)); if ((!sid->obj) || (!elm_widget_drag_child_locked_x_get @@ -2658,8 +2615,8 @@ _elm_scroll_mouse_up_event_cb(void *data, sid->down.want_dragged = EINA_FALSE; sid->down.dragged = EINA_FALSE; sid->down.now = EINA_FALSE; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); _elm_scroll_wanted_coordinates_update(sid, x, y); if (sid->content_info.resized) @@ -2752,7 +2709,7 @@ _elm_scroll_mouse_down_event_cb(void *data, sid->down.dir_y = EINA_FALSE; sid->down.x = ev->canvas.x; sid->down.y = ev->canvas.y; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); sid->down.sx = x; sid->down.sy = y; sid->down.locked = EINA_FALSE; @@ -3014,7 +2971,7 @@ _elm_scroll_hold_enterer(void *data) } } - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&ox, &oy)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&ox, &oy)); if (sid->down.dir_x) { if ((!sid->obj) || @@ -3033,7 +2990,7 @@ _elm_scroll_hold_enterer(void *data) _elm_scroll_smooth_debug_movetime_add(ox, oy); #endif - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(ox, oy, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(ox, oy, EINA_TRUE)); return EINA_FALSE; } @@ -3066,7 +3023,7 @@ _elm_scroll_on_hold_animator(void *data) (double)_elm_config->thumbscroll_hold_threshold * 2.0; vy = sid->down.onhold_vy * td * (double)_elm_config->thumbscroll_hold_threshold * 2.0; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&ox, &oy)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&ox, &oy)); x = ox; y = oy; @@ -3092,7 +3049,7 @@ _elm_scroll_on_hold_animator(void *data) } } - eo_do(sid->obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); } sid->down.onhold_tlast = t; @@ -3434,12 +3391,12 @@ _elm_scroll_page_adjust(Elm_Scrollable_Smart_Interface_Data *sid) if (!_paging_is_enabled(sid)) return; - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get(&w, &h)); + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get(&w, &h)); x = _elm_scroll_page_x_get(sid, 0, EINA_TRUE); y = _elm_scroll_page_y_get(sid, 0, EINA_TRUE); - eo_do(sid->obj, elm_scrollable_interface_content_region_set(x, y, w, h)); + eo_do(sid->obj, elm_interface_scrollable_content_region_set(x, y, w, h)); } static void @@ -3659,14 +3616,10 @@ _scroll_event_object_detach(Evas_Object *obj) _elm_scroll_mouse_move_event_cb, sid); } -static void -_elm_scroll_objects_set(Eo *obj, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_objects_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Object *edje_object, Evas_Object *hit_rectangle) { Evas_Coord mw, mh; - Evas_Object *edje_object = va_arg(*list, Evas_Object *); - Evas_Object *hit_rectangle = va_arg(*list, Evas_Object *); - - Elm_Scrollable_Smart_Interface_Data *sid = _pd; if (!edje_object || !hit_rectangle) return; @@ -3748,7 +3701,7 @@ _elm_scroll_pan_resized_cb(void *data, if (sid->cb_func.content_viewport_resize) { eo_do(sid->obj, - elm_scrollable_interface_content_viewport_size_get(&w, &h)); + elm_interface_scrollable_content_viewport_size_get(&w, &h)); sid->cb_func.content_viewport_resize(sid->obj, w, h); } } @@ -3791,15 +3744,12 @@ _elm_scroll_content_del_cb(void *data, _elm_scroll_scroll_bar_reset(sid); } -static void -_elm_scroll_content_set(Eo *obj, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Object *content) { Evas_Coord w, h; Evas_Object *o; - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Object *content = va_arg(*list, Evas_Object *); - if (!sid->edje_obj) return; if (sid->content) @@ -3839,15 +3789,12 @@ _elm_scroll_content_set(Eo *obj, void *_pd, va_list *list) _elm_scroll_scroll_bar_reset(sid); } -static void -_elm_scroll_extern_pan_set(Eo *obj, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_extern_pan_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Object *pan) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Object *pan = va_arg(*list, Evas_Object *); - if (!sid->edje_obj) return; - eo_do(obj, elm_scrollable_interface_content_set(NULL)); + eo_do(obj, elm_interface_scrollable_content_set(NULL)); if (sid->pan_obj) { @@ -3887,199 +3834,147 @@ _elm_scroll_extern_pan_set(Eo *obj, void *_pd, va_list *list) (sid->edje_obj, "elm.swallow.content", sid->pan_obj); } -static void -_elm_scroll_drag_start_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_drag_start_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb drag_start_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb drag_start_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.drag_start = drag_start_cb; } -static void -_elm_scroll_drag_stop_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_drag_stop_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb drag_stop_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb drag_stop_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.drag_stop = drag_stop_cb; } -static void -_elm_scroll_animate_start_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_animate_start_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb animate_start_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb animate_start_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.animate_start = animate_start_cb; } -static void -_elm_scroll_animate_stop_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_animate_stop_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb animate_stop_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb animate_stop_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.animate_stop = animate_stop_cb; } -static void -_elm_scroll_page_change_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_change_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb page_change_cb EINA_UNUSED) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb page_change_cb = - va_arg(*list, Elm_Interface_Scrollable_Cb); - sid->cb_func.page_change = page_change_cb; } -static void -_elm_scroll_scroll_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_scroll_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb scroll_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb scroll_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.scroll = scroll_cb; } -static void -_elm_scroll_scroll_left_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_scroll_left_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb scroll_left_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb scroll_left_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.scroll_left = scroll_left_cb; } -static void -_elm_scroll_scroll_right_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_scroll_right_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb scroll_right_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb scroll_right_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.scroll_right = scroll_right_cb; } -static void -_elm_scroll_scroll_up_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_scroll_up_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb scroll_up_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb scroll_up_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.scroll_up = scroll_up_cb; } -static void -_elm_scroll_scroll_down_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_scroll_down_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb scroll_down_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb scroll_down_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.scroll_down = scroll_down_cb; } -static void -_elm_scroll_edge_left_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_edge_left_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb edje_left_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb edje_left_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.edge_left = edje_left_cb; } -static void -_elm_scroll_edge_right_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_edge_right_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb edje_right_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb edje_right_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.edge_right = edje_right_cb; } -static void -_elm_scroll_edge_top_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_edge_top_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb edje_top_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb edje_top_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.edge_top = edje_top_cb; } -static void -_elm_scroll_edge_bottom_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_edge_bottom_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb edje_bottom_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb edje_bottom_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.edge_bottom = edje_bottom_cb; } -static void -_elm_scroll_vbar_drag_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_vbar_drag_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb vbar_drag_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb vbar_drag_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.vbar_drag = vbar_drag_cb; } -static void -_elm_scroll_vbar_press_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_vbar_press_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb vbar_press_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb vbar_press_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.vbar_press = vbar_press_cb; } -static void -_elm_scroll_vbar_unpress_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_vbar_unpress_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb vbar_unpress_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb vbar_unpress_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.vbar_unpress = vbar_unpress_cb; } -static void -_elm_scroll_hbar_drag_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_hbar_drag_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb hbar_drag_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb hbar_drag_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.hbar_drag = hbar_drag_cb; } -static void -_elm_scroll_hbar_press_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_hbar_press_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb hbar_press_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb hbar_press_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.hbar_press = hbar_press_cb; } -static void -_elm_scroll_hbar_unpress_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_hbar_unpress_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Cb hbar_unpress_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Cb hbar_unpress_cb = va_arg(*list, Elm_Interface_Scrollable_Cb); sid->cb_func.hbar_unpress = hbar_unpress_cb; } -static void -_elm_scroll_content_min_limit_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_min_limit_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Min_Limit_Cb min_limit_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Min_Limit_Cb min_limit_cb = va_arg(*list, Elm_Interface_Scrollable_Min_Limit_Cb); sid->cb_func.content_min_limit = min_limit_cb; } -static void -_elm_scroll_content_viewport_resize_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_content_viewport_resize_cb_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Interface_Scrollable_Resize_Cb viewport_resize_cb) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Interface_Scrollable_Resize_Cb viewport_resize_cb = va_arg(*list, Elm_Interface_Scrollable_Resize_Cb); sid->cb_func.content_viewport_resize = viewport_resize_cb; } -static void -_elm_scroll_momentum_animator_disabled_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static Eina_Bool +_elm_interface_scrollable_momentum_animator_disabled_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - - *ret = sid->momentum_animator_disabled; + return sid->momentum_animator_disabled; } -static void -_elm_scroll_momentum_animator_disabled_set(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static void +_elm_interface_scrollable_momentum_animator_disabled_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool disabled) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool disabled = va_arg(*list, int); - sid->momentum_animator_disabled = disabled; if (sid->momentum_animator_disabled) { @@ -4092,20 +3987,15 @@ _elm_scroll_momentum_animator_disabled_set(Eo *obj EINA_UNUSED, void *_pd EINA_U } } -static void -_elm_scroll_bounce_animator_disabled_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static Eina_Bool +_elm_interface_scrollable_bounce_animator_disabled_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - *ret = sid->bounce_animator_disabled; + return sid->bounce_animator_disabled; } -static void -_elm_scroll_bounce_animator_disabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_bounce_animator_disabled_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool disabled) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool disabled = va_arg(*list, int); - sid->bounce_animator_disabled = disabled; if (sid->bounce_animator_disabled) { @@ -4114,21 +4004,15 @@ _elm_scroll_bounce_animator_disabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list } } -static void -_elm_scroll_wheel_disabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Eina_Bool +_elm_interface_scrollable_wheel_disabled_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - - *ret = sid->wheel_disabled; + return sid->wheel_disabled; } -static void -_elm_scroll_wheel_disabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_wheel_disabled_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool disabled) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool disabled = va_arg(*list, int); - if (!sid->event_rect) return; if ((!sid->wheel_disabled) && (disabled)) @@ -4142,13 +4026,9 @@ _elm_scroll_wheel_disabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) sid->wheel_disabled = disabled; } -static void -_elm_scroll_step_size_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_step_size_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord x, Evas_Coord y) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - if (x < 1) x = 1; if (y < 1) y = 1; sid->step.x = x; @@ -4157,48 +4037,32 @@ _elm_scroll_step_size_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) _elm_scroll_scroll_bar_size_adjust(sid); } -static void -_elm_scroll_step_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_step_size_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord *x, Evas_Coord *y) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord *x = va_arg(*list, Evas_Coord *); - Evas_Coord *y = va_arg(*list, Evas_Coord *); - if (x) *x = sid->step.x; if (y) *y = sid->step.y; } -static void -_elm_scroll_page_size_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_size_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord x, Evas_Coord y) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - sid->page.x = x; sid->page.y = y; _elm_scroll_scroll_bar_size_adjust(sid); } -static void -_elm_scroll_page_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_size_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord *x, Evas_Coord *y) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord *x = va_arg(*list, Evas_Coord *); - Evas_Coord *y = va_arg(*list, Evas_Coord *); - if (x) *x = sid->page.x; if (y) *y = sid->page.y; } -static void -_elm_scroll_policy_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_policy_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Scroller_Policy hbar, Elm_Scroller_Policy vbar) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Scroller_Policy hbar = va_arg(*list, Elm_Scroller_Policy); - Elm_Scroller_Policy vbar = va_arg(*list, Elm_Scroller_Policy); - if (!sid->edje_obj) return; if ((sid->hbar_flags == hbar) && (sid->vbar_flags == vbar)) return; @@ -4211,74 +4075,50 @@ _elm_scroll_policy_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) _elm_direction_arrows_eval(sid); } -static void -_elm_scroll_policy_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_policy_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Scroller_Policy *hbar, Elm_Scroller_Policy *vbar) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Scroller_Policy *hbar = va_arg(*list, Elm_Scroller_Policy *); - Elm_Scroller_Policy *vbar = va_arg(*list, Elm_Scroller_Policy *); - if (hbar) *hbar = sid->hbar_flags; if (vbar) *vbar = sid->vbar_flags; } -static void -_elm_scroll_single_direction_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_single_direction_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Scroller_Single_Direction single_dir) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Scroller_Single_Direction single_dir = - va_arg(*list, Elm_Scroller_Single_Direction); - sid->one_direction_at_a_time = single_dir; } -static void -_elm_scroll_single_direction_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Elm_Scroller_Single_Direction +_elm_interface_scrollable_single_direction_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Scroller_Single_Direction *ret = - va_arg(*list, Elm_Scroller_Single_Direction *); - - *ret = sid->one_direction_at_a_time; + return sid->one_direction_at_a_time; } -static void -_elm_scroll_repeat_events_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_repeat_events_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool repeat_events) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool repeat_events = va_arg(*list, int); - if (sid->event_rect) evas_object_repeat_events_set(sid->event_rect, repeat_events); } -static void -_elm_scroll_repeat_events_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Eina_Bool +_elm_interface_scrollable_repeat_events_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - if (sid->event_rect) - *ret = evas_object_repeat_events_get(sid->event_rect); + return evas_object_repeat_events_get(sid->event_rect); else - *ret = EINA_TRUE; + return EINA_TRUE; } -static void -_elm_scroll_hold_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_hold_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool hold) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool hold = va_arg(*list, int); - sid->hold = hold; } -static void -_elm_scroll_freeze_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_freeze_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool freeze) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool freeze = va_arg(*list, int); - sid->freeze = freeze; if (sid->freeze) { @@ -4293,63 +4133,37 @@ _elm_scroll_freeze_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) _elm_scroll_bounce_eval(sid); } -static void -_elm_scroll_page_snap_allow_set(Eo *obj EINA_UNUSED, - void *_pd, - va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_snap_allow_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool horiz, Eina_Bool vert) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool horiz = va_arg(*list, int); - Eina_Bool vert = va_arg(*list, int); - sid->page_snap_horiz = !!horiz; sid->page_snap_vert = !!vert; } -static void -_elm_scroll_page_snap_allow_get(Eo *obj EINA_UNUSED, - void *_pd, - va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_snap_allow_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool *horiz, Eina_Bool *vert) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool *horiz = va_arg(*list, Eina_Bool *); - Eina_Bool *vert = va_arg(*list, Eina_Bool *); - if (horiz) *horiz = sid->page_snap_horiz; if (vert) *vert = sid->page_snap_vert; } -static void -_elm_scroll_bounce_allow_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_bounce_allow_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool horiz, Eina_Bool vert) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool horiz = va_arg(*list, int); - Eina_Bool vert= va_arg(*list, int); - sid->bounce_horiz = !!horiz; sid->bounce_vert = !!vert; } -static void -_elm_scroll_bounce_allow_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_bounce_allow_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool *horiz, Eina_Bool *vert) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Eina_Bool *horiz = va_arg(*list, Eina_Bool *); - Eina_Bool *vert= va_arg(*list, Eina_Bool *); - if (horiz) *horiz = sid->bounce_horiz; if (vert) *vert = sid->bounce_vert; } -static void -_elm_scroll_paging_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_paging_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, double pagerel_h, double pagerel_v, Evas_Coord pagesize_h, Evas_Coord pagesize_v) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - double pagerel_h = va_arg(*list, double); - double pagerel_v = va_arg(*list, double); - Evas_Coord pagesize_h = va_arg(*list, Evas_Coord); - Evas_Coord pagesize_v = va_arg(*list, Evas_Coord); - sid->pagerel_h = pagerel_h; sid->pagerel_v = pagerel_v; sid->pagesize_h = pagesize_h; @@ -4358,66 +4172,45 @@ _elm_scroll_paging_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) _elm_scroll_page_adjust(sid); } -static void -_elm_scroll_paging_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_paging_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, double *pagerel_h, double *pagerel_v, Evas_Coord *pagesize_h, Evas_Coord *pagesize_v) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - double *pagerel_h = va_arg(*list, double *); - double *pagerel_v = va_arg(*list, double *); - Evas_Coord *pagesize_h = va_arg(*list, Evas_Coord *); - Evas_Coord *pagesize_v = va_arg(*list, Evas_Coord *); - if (pagerel_h) *pagerel_h = sid->pagerel_h; if (pagerel_v) *pagerel_v = sid->pagerel_v; if (pagesize_h) *pagesize_h = sid->pagesize_h; if (pagesize_v) *pagesize_v = sid->pagesize_v; } -static void -_elm_scroll_page_relative_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_relative_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *_pd EINA_UNUSED, double h_pagerel, double v_pagerel) { Evas_Coord pagesize_h, pagesize_v; - double h_pagerel = va_arg(*list, double); - double v_pagerel = va_arg(*list, double); - - eo_do(obj, elm_scrollable_interface_paging_get(NULL, NULL, &pagesize_h, &pagesize_v)); + eo_do(obj, elm_interface_scrollable_paging_get(NULL, NULL, &pagesize_h, &pagesize_v)); - eo_do(obj, elm_scrollable_interface_paging_set(h_pagerel, v_pagerel, pagesize_h, pagesize_v)); + eo_do(obj, elm_interface_scrollable_paging_set(h_pagerel, v_pagerel, pagesize_h, pagesize_v)); } -static void -_elm_scroll_page_scroll_limit_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_scroll_limit_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, int page_limit_h, int page_limit_v) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - int page_limit_h = va_arg(*list, int); - int page_limit_v = va_arg(*list, int); - sid->page_limit_h = page_limit_h; sid->page_limit_v = page_limit_v; } -static void -_elm_scroll_page_scroll_limit_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_scroll_limit_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, int *page_limit_h, int *page_limit_v) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - int *page_limit_h = va_arg(*list, int *); - int *page_limit_v = va_arg(*list, int *); - if (page_limit_h) *page_limit_h = sid->page_limit_h; if (page_limit_v) *page_limit_v = sid->page_limit_v; } -static void -_elm_scroll_current_page_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_current_page_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, int *pagenumber_h, int *pagenumber_v) { Evas_Coord x, y; - int *pagenumber_h = va_arg(*list, int *); - int *pagenumber_v = va_arg(*list, int *); - - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&x, &y)); + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); if (pagenumber_h) { if (sid->pagesize_h > 0) @@ -4448,16 +4241,11 @@ _elm_scroll_current_page_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) } } -static void -_elm_scroll_last_page_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_last_page_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, int *pagenumber_h, int *pagenumber_v) { - int *pagenumber_h = va_arg(*list, int *); - int *pagenumber_v = va_arg(*list, int *); - Evas_Coord cw, ch; - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - if (!sid->pan_obj) return; eo_do(sid->pan_obj, elm_obj_pan_content_size_get(&cw, &ch)); @@ -4477,22 +4265,17 @@ _elm_scroll_last_page_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) } } -static void -_elm_scroll_page_show(Eo *obj, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_show(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, int pagenumber_h, int pagenumber_v) { - int pagenumber_h = va_arg(*list, int); - int pagenumber_v = va_arg(*list, int); - Evas_Coord w, h; Evas_Coord x = 0; Evas_Coord y = 0; - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - sid->current_page.x = _elm_scroll_page_x_get(sid, 0, EINA_FALSE); sid->current_page.y = _elm_scroll_page_y_get(sid, 0, EINA_FALSE); - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get(&w, &h)); + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get(&w, &h)); if (pagenumber_h >= 0) x = sid->pagesize_h * pagenumber_h; if (pagenumber_v >= 0) y = sid->pagesize_v * pagenumber_v; @@ -4502,7 +4285,7 @@ _elm_scroll_page_show(Eo *obj, void *_pd, va_list *list) sid->wh = h; if (_elm_scroll_content_region_show_internal(obj, &x, &y, w, h)) - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if ((sid->current_page.x != x) || (sid->current_page.y != y)) { @@ -4511,22 +4294,17 @@ _elm_scroll_page_show(Eo *obj, void *_pd, va_list *list) } } -static void -_elm_scroll_page_bring_in(Eo *obj, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_page_bring_in(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, int pagenumber_h, int pagenumber_v) { - int pagenumber_h = va_arg(*list, int); - int pagenumber_v = va_arg(*list, int); - Evas_Coord w, h; Evas_Coord x = 0; Evas_Coord y = 0; - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - sid->current_page.x = _elm_scroll_page_x_get(sid, 0, EINA_FALSE); sid->current_page.y = _elm_scroll_page_y_get(sid, 0, EINA_FALSE); - eo_do(sid->obj, elm_scrollable_interface_content_viewport_size_get(&w, &h)); + eo_do(sid->obj, elm_interface_scrollable_content_viewport_size_get(&w, &h)); if (pagenumber_h >= 0) x = sid->pagesize_h * pagenumber_h; if (pagenumber_v >= 0) y = sid->pagesize_v * pagenumber_v; if (_elm_scroll_content_region_show_internal(obj, &x, &y, w, h)) @@ -4542,15 +4320,9 @@ _elm_scroll_page_bring_in(Eo *obj, void *_pd, va_list *list) } } -static void -_elm_scroll_region_bring_in(Eo *obj, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_region_bring_in(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); - if (_elm_scroll_content_region_show_internal(obj, &x, &y, w, h)) { _elm_scroll_scroll_to_x(sid, _elm_config->bring_in_scroll_friction, x); @@ -4558,56 +4330,37 @@ _elm_scroll_region_bring_in(Eo *obj, void *_pd, va_list *list) } } -static void -_elm_scroll_gravity_set(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static void +_elm_interface_scrollable_gravity_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, double x, double y) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - double x = va_arg(*list, double); - double y = va_arg(*list, double); - if (!sid->pan_obj) return; eo_do(sid->pan_obj, elm_obj_pan_gravity_set(x, y)); } -static void -_elm_scroll_gravity_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static void +_elm_interface_scrollable_gravity_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, double *x, double *y) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - double *x = va_arg(*list, double *); - double *y = va_arg(*list, double *); - if (!sid->pan_obj) return; eo_do(sid->pan_obj, elm_obj_pan_gravity_get(x, y)); } -static void -_elm_scroll_movement_block_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_elm_interface_scrollable_movement_block_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Elm_Scroller_Movement_Block block) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - - Elm_Scroller_Movement_Block block = va_arg(*list, - Elm_Scroller_Movement_Block); - sid->block = block; } -static void -_elm_scroll_movement_block_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Elm_Scroller_Movement_Block +_elm_interface_scrollable_movement_block_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - Elm_Scroller_Movement_Block *block = va_arg(*list, - Elm_Scroller_Movement_Block *); - - *block = sid->block; + return sid->block; } -static void -_elm_scroll_interface_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) +EOLIAN static void +_elm_interface_scrollable_evas_smart_add(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; - memset(sid, 0, sizeof(*sid)); sid->obj = obj; @@ -4640,14 +4393,13 @@ _elm_scroll_interface_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) eo_do_super(obj, MY_SCROLLABLE_INTERFACE, evas_obj_smart_add()); } -static void -_elm_scroll_interface_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) +EOLIAN static void +_elm_interface_scrollable_evas_smart_del(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid) { - Elm_Scrollable_Smart_Interface_Data *sid = _pd; eo_do_super(obj, MY_SCROLLABLE_INTERFACE, evas_obj_smart_del()); - eo_do(obj, elm_scrollable_interface_content_set(NULL)); + eo_do(obj, elm_interface_scrollable_content_set(NULL)); if (!sid->extern_pan) evas_object_del(sid->pan_obj); ecore_idle_enterer_del(sid->down.hold_enterer); @@ -4660,187 +4412,16 @@ _elm_scroll_interface_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) ecore_animator_del(sid->scrollto.y.animator); } -static void -_elm_scroll_interface_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) +EOLIAN static void +_elm_interface_scrollable_constructor(Eo *obj, Elm_Scrollable_Smart_Interface_Data *class_data EINA_UNUSED) { eo_do_super(obj, MY_SCROLLABLE_INTERFACE, eo_constructor()); } -static void -_elm_scrollable_interface_constructor(Eo_Class *klass) +EOLIAN static void +_elm_interface_scrollable_class_constructor(Eo_Class *klass) { - const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _elm_scroll_interface_constructor), - EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _elm_scroll_interface_add), - EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_scroll_interface_del), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_OBJECTS_SET), _elm_scroll_objects_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_SET), _elm_scroll_content_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_EXTERN_PAN_SET), _elm_scroll_extern_pan_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_DRAG_START_CB_SET), _elm_scroll_drag_start_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_DRAG_STOP_CB_SET), _elm_scroll_drag_stop_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_ANIMATE_START_CB_SET), _elm_scroll_animate_start_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_ANIMATE_STOP_CB_SET), _elm_scroll_animate_stop_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_CB_SET), _elm_scroll_scroll_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_LEFT_CB_SET), _elm_scroll_scroll_left_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_RIGHT_CB_SET), _elm_scroll_scroll_right_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_UP_CB_SET), _elm_scroll_scroll_up_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_DOWN_CB_SET), _elm_scroll_scroll_down_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_EDGE_LEFT_CB_SET), _elm_scroll_edge_left_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_EDGE_RIGHT_CB_SET), _elm_scroll_edge_right_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_EDGE_TOP_CB_SET), _elm_scroll_edge_top_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_EDGE_BOTTOM_CB_SET), _elm_scroll_edge_bottom_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_VBAR_DRAG_CB_SET), _elm_scroll_vbar_drag_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_VBAR_PRESS_CB_SET), _elm_scroll_vbar_press_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_VBAR_UNPRESS_CB_SET), _elm_scroll_vbar_unpress_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_HBAR_DRAG_CB_SET), _elm_scroll_hbar_drag_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_HBAR_PRESS_CB_SET), _elm_scroll_hbar_press_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_HBAR_UNPRESS_CB_SET), _elm_scroll_hbar_unpress_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_MIN_LIMIT_CB_SET), _elm_scroll_content_min_limit_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_VIEWPORT_RESIZE_CB_SET), _elm_scroll_content_viewport_resize_cb_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_POS_SET), _elm_scroll_content_pos_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_POS_GET), _elm_scroll_content_pos_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_REGION_SHOW), _elm_scroll_content_region_show), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_REGION_SET), _elm_scroll_content_region_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_REGION_GET), _elm_scroll_content_region_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_SIZE_GET), _elm_scroll_content_size_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_VIEWPORT_SIZE_GET), _elm_scroll_content_viewport_size_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_MIN_LIMIT), _elm_scroll_content_min_limit), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_STEP_SIZE_SET), _elm_scroll_step_size_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_STEP_SIZE_GET), _elm_scroll_step_size_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SIZE_SET), _elm_scroll_page_size_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SIZE_GET), _elm_scroll_page_size_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_SET), _elm_scroll_policy_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_GET), _elm_scroll_policy_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_SET), _elm_scroll_single_direction_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_GET), _elm_scroll_single_direction_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_SET), _elm_scroll_repeat_events_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_GET), _elm_scroll_repeat_events_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_MIRRORED_SET), _elm_scroll_mirrored_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_HOLD_SET), _elm_scroll_hold_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_FREEZE_SET), _elm_scroll_freeze_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_BOUNCE_ALLOW_SET), _elm_scroll_page_snap_allow_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_BOUNCE_ALLOW_GET), _elm_scroll_page_snap_allow_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ALLOW_SET), _elm_scroll_bounce_allow_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ALLOW_GET), _elm_scroll_bounce_allow_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGING_SET), _elm_scroll_paging_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGING_GET), _elm_scroll_paging_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_RELATIVE_SET), _elm_scroll_page_relative_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SCROLL_LIMIT_SET), _elm_scroll_page_scroll_limit_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SCROLL_LIMIT_GET), _elm_scroll_page_scroll_limit_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_CURRENT_PAGE_GET), _elm_scroll_current_page_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_LAST_PAGE_GET), _elm_scroll_last_page_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SHOW), _elm_scroll_page_show), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_BRING_IN), _elm_scroll_page_bring_in), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_REGION_BRING_IN), _elm_scroll_region_bring_in), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_GRAVITY_SET), _elm_scroll_gravity_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_GRAVITY_GET), _elm_scroll_gravity_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_MOMENTUM_ANIMATOR_DISABLED_GET), _elm_scroll_momentum_animator_disabled_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_MOMENTUM_ANIMATOR_DISABLED_SET), _elm_scroll_momentum_animator_disabled_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ANIMATOR_DISABLED_SET), _elm_scroll_bounce_animator_disabled_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ANIMATOR_DISABLED_GET), _elm_scroll_bounce_animator_disabled_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_WHEEL_DISABLED_GET), _elm_scroll_wheel_disabled_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_WHEEL_DISABLED_SET), _elm_scroll_wheel_disabled_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_MOVEMENT_BLOCK_SET), _elm_scroll_movement_block_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_MOVEMENT_BLOCK_GET), _elm_scroll_movement_block_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_CHANGE_CB_SET), _elm_scroll_page_change_cb_set), - - EO_OP_FUNC_SENTINEL - }; - eo_class_funcs_set(klass, func_desc); - - evas_smart_legacy_type_register(MY_SCROLLABLE_INTERFACE_NAME_LEGACY, klass); -} - -static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_OBJECTS_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_EXTERN_PAN_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_DRAG_START_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_DRAG_STOP_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_ANIMATE_START_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_ANIMATE_STOP_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_LEFT_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_RIGHT_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_UP_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_SCROLL_DOWN_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_EDGE_LEFT_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_EDGE_RIGHT_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_EDGE_TOP_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_EDGE_BOTTOM_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_VBAR_DRAG_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_VBAR_PRESS_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_VBAR_UNPRESS_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_HBAR_DRAG_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_HBAR_PRESS_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_HBAR_UNPRESS_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_MIN_LIMIT_CB_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_VIEWPORT_RESIZE_CB_SET, - "When the viewport is resized, the callback is called."), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_POS_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_POS_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_REGION_SHOW, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_REGION_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_REGION_GET, "Get the currently visible content region."), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_SIZE_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_VIEWPORT_SIZE_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CONTENT_MIN_LIMIT, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_STEP_SIZE_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_STEP_SIZE_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SIZE_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SIZE_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_SET, "It decides whether the scrollable object propagates the events to content object or not."), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_GET, "It gets whether the scrollable object propagates the events to content object or not."), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_MIRRORED_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_HOLD_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_FREEZE_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_BOUNCE_ALLOW_SET, - "Enable/disable page bouncing, for paged scrollers, " - "on each axis."), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_BOUNCE_ALLOW_GET, - "Get wether page bouncing is enabled," - " for paged scrollers, on each axis"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ALLOW_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ALLOW_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGING_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGING_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_RELATIVE_SET, - "Set scroll page size relative to viewport size."), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SCROLL_LIMIT_SET, "Set the maxium of the movable page at a flicking"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SCROLL_LIMIT_GET, "Get the maxium of the movable page at a flicking"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_CURRENT_PAGE_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_LAST_PAGE_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SHOW, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_BRING_IN, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_REGION_BRING_IN, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_GRAVITY_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_GRAVITY_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_MOMENTUM_ANIMATOR_DISABLED_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_MOMENTUM_ANIMATOR_DISABLED_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ANIMATOR_DISABLED_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_BOUNCE_ANIMATOR_DISABLED_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_WHEEL_DISABLED_GET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_WHEEL_DISABLED_SET, "description here"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_MOVEMENT_BLOCK_SET, "Set movement block in a axis"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_MOVEMENT_BLOCK_GET, "Get the movement block"), - EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_CHANGE_CB_SET, - "Set a scroller page change callback function"), - EO_OP_DESCRIPTION_SENTINEL -}; - -static const Eo_Class_Description _elm_scrollable_interface_desc = { - EO_VERSION, - MY_SCROLLABLE_INTERFACE_NAME, - EO_CLASS_TYPE_MIXIN, - EO_CLASS_DESCRIPTION_OPS(&ELM_SCROLLABLE_INTERFACE_BASE_ID, op_desc, ELM_SCROLLABLE_INTERFACE_SUB_ID_LAST), - NULL, - sizeof(Elm_Scrollable_Smart_Interface_Data), - _elm_scrollable_interface_constructor, - NULL -}; + evas_smart_legacy_type_register(MY_SCROLLABLE_INTERFACE_NAME_LEGACY, klass); +} -EO_DEFINE_CLASS(elm_scrollable_interface_get, &_elm_scrollable_interface_desc, NULL, EVAS_SMART_SCROLLABLE_INTERFACE, NULL); +#include "elm_interface_scrollable.eo.c" diff --git a/src/lib/elm_interface_scrollable.eo b/src/lib/elm_interface_scrollable.eo new file mode 100644 index 0000000..5484361 --- /dev/null +++ b/src/lib/elm_interface_scrollable.eo @@ -0,0 +1,591 @@ +mixin Elm_Interface_Scrollable(Evas_Scrollable_Interface) +{ + eo_prefix: elm_interface_scrollable; + data: Elm_Scrollable_Smart_Interface_Data; + properties { + gravity { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + double x; + double y; + } + } + bounce_allow { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Eina_Bool horiz; + Eina_Bool vert; + } + } + wheel_disabled { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Eina_Bool disabled; + } + } + movement_block { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Scroller_Movement_Block block; + } + } + momentum_animator_disabled { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Eina_Bool disabled; + } + } + policy { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Scroller_Policy hbar; + Elm_Scroller_Policy vbar; + } + } + content_region { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Evas_Coord x; + Evas_Coord y; + Evas_Coord w; + Evas_Coord h; + } + } + repeat_events { + set { + /*@ It decides whether the scrollable object propagates the events to content object or not. */ + legacy null; + } + get { + /*@ It gets whether the scrollable object propagates the events to content object or not. */ + legacy null; + } + values { + Eina_Bool repeat_events; + } + } + page_size { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Evas_Coord x; + Evas_Coord y; + } + } + bounce_animator_disabled { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Eina_Bool disabled; + } + } + page_scroll_limit { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + int page_limit_h; + int page_limit_v; + } + } + page_snap_allow { + set { + /*@ Enable/disable page bouncing, for paged scrollers, on each axis. */ + legacy null; + } + get { + /*@ Get wether page bouncing is enabled, for paged scrollers, on each axis. */ + legacy null; + } + values { + Eina_Bool horiz; + Eina_Bool vert; + } + } + paging { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + double pagerel_h; + double pagerel_v; + Evas_Coord pagesize_h; + Evas_Coord pagesize_v; + } + } + single_direction { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Scroller_Single_Direction single_dir; + } + } + step_size { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Evas_Coord x; + Evas_Coord y; + } + } + scroll_up_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb scroll_up_cb; + } + } + hbar_drag_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb hbar_drag_cb; + } + } + drag_start_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb drag_start_cb; + } + } + freeze { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Eina_Bool freeze; + } + } + content_viewport_resize_cb { + set { + /*@ When the viewport is resized, the callback is called. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Resize_Cb viewport_resize_cb; + } + } + scroll_left_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb scroll_left_cb; + } + } + vbar_press_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb vbar_press_cb; + } + } + hbar_press_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb hbar_press_cb; + } + } + hbar_unpress_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb hbar_unpress_cb; + } + } + drag_stop_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb drag_stop_cb; + } + } + extern_pan { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Evas_Object *pan; + } + } + page_change_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb page_change_cb; + } + } + hold { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Eina_Bool hold; + } + } + animate_start_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb animate_start_cb; + } + } + scroll_down_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb scroll_down_cb; + } + } + page_relative { + set { + /*@ Set scroll page size relative to viewport size. */ + legacy null; + } + values { + double h_pagerel; + double v_pagerel; + } + } + scroll_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb scroll_cb; + } + } + animate_stop_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb animate_stop_cb; + } + } + mirrored { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Eina_Bool mirrored; + } + } + content_min_limit_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Min_Limit_Cb min_limit_cb; + } + } + scroll_right_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb scroll_right_cb; + } + } + content { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Evas_Object *content; + } + } + edge_left_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb edge_left_cb; + } + } + vbar_drag_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb vbar_drag_cb; + } + } + vbar_unpress_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb vbar_unpress_cb; + } + } + edge_bottom_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb edge_bottom_cb; + } + } + edge_right_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb edge_right_cb; + } + } + edge_top_cb { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Elm_Interface_Scrollable_Cb edge_top_cb; + } + } + objects { + set { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Evas_Object *edje_object; + Evas_Object *hit_rectangle; + } + } + last_page { + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + int pagenumber_h; + int pagenumber_v; + } + } + current_page { + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + int pagenumber_h; + int pagenumber_v; + } + } + content_viewport_size { + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Evas_Coord w; + Evas_Coord h; + } + } + content_size { + get { + /*@ No description supplied by the EAPI. */ + legacy null; + } + values { + Evas_Coord w; + Evas_Coord h; + } + } + } + methods { + content_pos_set { + /*@ No description supplied by the EAPI. */ + legacy null; + params { + @in Evas_Coord x; + @in Evas_Coord y; + @in Eina_Bool sig; + } + } + content_pos_get { + /*@ No description supplied by the EAPI. */ + legacy null; + params { + @out Evas_Coord x; + @out Evas_Coord y; + } + } + page_show { + /*@ No description supplied by the EAPI. */ + legacy null; + params { + @in int pagenumber_h; + @in int pagenumber_v; + } + } + region_bring_in { + /*@ No description supplied by the EAPI. */ + legacy null; + params { + @in Evas_Coord x; + @in Evas_Coord y; + @in Evas_Coord w; + @in Evas_Coord h; + } + } + page_bring_in { + /*@ No description supplied by the EAPI. */ + legacy null; + params { + @in int pagenumber_h; + @in int pagenumber_v; + } + } + content_region_show { + /*@ No description supplied by the EAPI. */ + legacy null; + params { + @in Evas_Coord x; + @in Evas_Coord y; + @in Evas_Coord w; + @in Evas_Coord h; + } + } + content_min_limit { + /*@ No description supplied by the EAPI. */ + legacy null; + params { + @in Eina_Bool w; + @in Eina_Bool h; + } + } + } + implements { + Eo_Base::constructor; + class::constructor; + Evas_Smart::add; + Evas_Smart::del; + } + events { + changed; + } + +} diff --git a/src/lib/elm_interface_scrollable.h b/src/lib/elm_interface_scrollable.h index f9dfdbd..5e3709a 100644 --- a/src/lib/elm_interface_scrollable.h +++ b/src/lib/elm_interface_scrollable.h @@ -141,6 +141,9 @@ enum */ #define elm_obj_pan_gravity_get(x, y) ELM_OBJ_PAN_ID(ELM_OBJ_PAN_SUB_ID_GRAVITY_GET), EO_TYPECHECK(double *, x), EO_TYPECHECK(double *, y) +#include "elm_interface_scrollable.eo.h" + +#if 0 #define ELM_SCROLLABLE_INTERFACE elm_scrollable_interface_get() const Eo_Class *elm_scrollable_interface_get(void) EINA_CONST; @@ -1042,6 +1045,7 @@ enum */ #define elm_scrollable_interface_page_change_cb_set(page_change_cb) ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_CHANGE_CB_SET), EO_TYPECHECK(Elm_Interface_Scrollable_Cb, page_change_cb) +#endif /** * Elementary scroller panning base smart data. @@ -1224,7 +1228,7 @@ struct _Elm_Scrollable_Smart_Interface_Data #define ELM_SCROLLABLE_CHECK(obj, ...) \ \ - if (!eo_isa(obj, ELM_SCROLLABLE_INTERFACE)) \ + if (!eo_isa(obj, ELM_INTERFACE_SCROLLABLE_CLASS)) \ { \ ERR("The object (%p) doesn't implement the Elementary scrollable" \ " interface", obj); \ diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index 893cef1..00273d5 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -326,10 +326,10 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list) if (!sd->items) return; eo_do(obj, - elm_scrollable_interface_content_pos_get(&x, &y), - elm_scrollable_interface_step_size_get(&step_x, &step_y), - elm_scrollable_interface_page_size_get(&page_x, &page_y), - elm_scrollable_interface_content_viewport_size_get(&v_w, &v_h)); + elm_interface_scrollable_content_pos_get(&x, &y), + elm_interface_scrollable_step_size_get(&step_x, &step_y), + elm_interface_scrollable_page_size_get(&page_x, &page_y), + elm_interface_scrollable_content_viewport_size_get(&v_w, &v_h)); /* TODO: fix logic for horizontal mode */ if ((!strcmp(ev->key, "Left")) || @@ -504,7 +504,7 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list) else return; ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if (ret) *ret = EINA_TRUE; } @@ -558,7 +558,7 @@ _elm_list_smart_sizing_eval(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_size_hint_max_get(sd->box, &maxw, &maxh); evas_object_size_hint_weight_get(sd->box, &xw, &yw); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); if (xw > 0.0) { if ((minw > 0) && (vw < minw)) vw = minw; @@ -919,7 +919,7 @@ _show_region_hook(void *data EINA_UNUSED, Evas_Coord x, y, w, h; elm_widget_show_region_get(obj, &x, &y, &w, &h); - eo_do(obj, elm_scrollable_interface_content_region_set(x, y, w, h)); + eo_do(obj, elm_interface_scrollable_content_region_set(x, y, w, h)); } static void @@ -959,7 +959,7 @@ _mirrored_set(Evas_Object *obj, ELM_LIST_DATA_GET(obj, sd); - eo_do(obj, elm_scrollable_interface_mirrored_set(rtl)); + eo_do(obj, elm_interface_scrollable_mirrored_set(rtl)); EINA_LIST_FOREACH(sd->items, n, it) edje_object_mirrored_set(VIEW(it), rtl); @@ -2002,12 +2002,12 @@ _elm_list_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_repeat_events_set(priv->hit_rect, EINA_TRUE); eo_do(obj, - elm_scrollable_interface_edge_left_cb_set(_edge_left_cb), - elm_scrollable_interface_edge_right_cb_set(_edge_right_cb), - elm_scrollable_interface_edge_top_cb_set(_edge_top_cb), - elm_scrollable_interface_edge_bottom_cb_set(_edge_bottom_cb), - elm_scrollable_interface_content_min_limit_cb_set(_elm_list_content_min_limit_cb), - elm_scrollable_interface_objects_set(wd->resize_obj, priv->hit_rect)); + elm_interface_scrollable_edge_left_cb_set(_edge_left_cb), + elm_interface_scrollable_edge_right_cb_set(_edge_right_cb), + elm_interface_scrollable_edge_top_cb_set(_edge_top_cb), + elm_interface_scrollable_edge_bottom_cb_set(_edge_bottom_cb), + elm_interface_scrollable_content_min_limit_cb_set(_elm_list_content_min_limit_cb), + elm_interface_scrollable_objects_set(wd->resize_obj, priv->hit_rect)); /* the scrollable interface may set this */ evas_object_event_callback_add @@ -2019,7 +2019,7 @@ _elm_list_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_size_hint_min_set(obj, minw, minh); evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize_cb, obj); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(EINA_FALSE, _elm_config->thumbscroll_bounce_enable)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(EINA_FALSE, _elm_config->thumbscroll_bounce_enable)); priv->box = elm_box_add(obj); evas_object_size_hint_weight_set(priv->box, EVAS_HINT_EXPAND, 0.0); @@ -2029,7 +2029,7 @@ _elm_list_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) elm_widget_on_show_region_hook_set(priv->box, _show_region_hook, obj); elm_widget_sub_object_add(obj, priv->box); - eo_do(obj, elm_scrollable_interface_content_set(priv->box)); + eo_do(obj, elm_interface_scrollable_content_set(priv->box)); evas_object_event_callback_add (priv->box, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb, obj); @@ -2304,13 +2304,13 @@ _horizontal_set(Eo *obj, void *_pd, va_list *list) { evas_object_size_hint_weight_set(sd->box, 0.0, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(sd->box, 0.0, EVAS_HINT_FILL); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(bounce, EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(bounce, EINA_FALSE)); } else { evas_object_size_hint_weight_set(sd->box, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(sd->box, EVAS_HINT_FILL, 0.0); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(EINA_FALSE, bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(EINA_FALSE, bounce)); } _elm_list_mode_set_internal(obj); @@ -2380,7 +2380,7 @@ elm_list_bounce_set(Evas_Object *obj, { ELM_LIST_CHECK(obj); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(h_bounce, v_bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(h_bounce, v_bounce)); } EAPI void @@ -2390,7 +2390,7 @@ elm_list_bounce_get(const Evas_Object *obj, { ELM_LIST_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_bounce_allow_get(h_bounce, v_bounce)); + eo_do((Eo *) obj, elm_interface_scrollable_bounce_allow_get(h_bounce, v_bounce)); } EAPI void @@ -2399,7 +2399,7 @@ elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_v) { ELM_LIST_CHECK(obj); - eo_do(obj, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do(obj, elm_interface_scrollable_policy_set(policy_h, policy_v)); } static void @@ -2412,7 +2412,7 @@ _scroller_policy_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) (policy_v >= ELM_SCROLLER_POLICY_LAST)) return; - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_policy_set(policy_h, policy_v)); } EAPI void @@ -2421,7 +2421,7 @@ elm_list_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_v) { ELM_LIST_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_policy_get(policy_h, policy_v)); + eo_do((Eo *) obj, elm_interface_scrollable_policy_get(policy_h, policy_v)); } EAPI void @@ -2818,7 +2818,7 @@ elm_list_item_show(Elm_Object_Item *it) x -= bx; y -= by; - eo_do(WIDGET(it), elm_scrollable_interface_content_region_show(x, y, w, h)); + eo_do(WIDGET(it), elm_interface_scrollable_content_region_show(x, y, w, h)); } EAPI void @@ -2836,7 +2836,7 @@ elm_list_item_bring_in(Elm_Object_Item *it) x -= bx; y -= by; - eo_do(WIDGET(it), elm_scrollable_interface_region_bring_in(x, y, w, h)); + eo_do(WIDGET(it), elm_interface_scrollable_region_bring_in(x, y, w, h)); } EAPI Evas_Object * @@ -3104,7 +3104,7 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_list_smart_sizing_eval), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_SET), _scroller_policy_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_POLICY_SET), _scroller_policy_set), EO_OP_FUNC(ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_GO), _go), EO_OP_FUNC(ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_SET), _multi_select_set), @@ -3181,4 +3181,4 @@ static const Eo_Class_Description class_desc = { NULL }; -EO_DEFINE_CLASS(elm_obj_list_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_SCROLLABLE_INTERFACE, NULL); +EO_DEFINE_CLASS(elm_obj_list_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, NULL); diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c index f13e515..6506131 100644 --- a/src/lib/elm_map.c +++ b/src/lib/elm_map.c @@ -487,8 +487,8 @@ _viewport_coord_get(Elm_Map_Smart_Data *sd, EINA_SAFETY_ON_NULL_RETURN(sd); - eo_do(sd->obj, elm_scrollable_interface_content_pos_get(&x, &y)); - eo_do(sd->obj, elm_scrollable_interface_content_viewport_size_get(&w, &h)); + eo_do(sd->obj, elm_interface_scrollable_content_pos_get(&x, &y)); + eo_do(sd->obj, elm_interface_scrollable_content_viewport_size_get(&w, &h)); if (w > sd->size.w) x -= ((w - sd->size.w) / 2); if (h > sd->size.h) y -= ((h - sd->size.h) / 2); @@ -1104,7 +1104,7 @@ _zoom_do(Elm_Map_Smart_Data *sd, if (y < 0) y = 0; else if (y > (sd->size.h - vh)) y = sd->size.h - vh; - eo_do(sd->obj, elm_scrollable_interface_content_region_show + eo_do(sd->obj, elm_interface_scrollable_content_region_show (x, y, vw, vh)); } @@ -3621,8 +3621,8 @@ _region_show_bring_in(Elm_Map_Smart_Data *wsd, double lon, double lat, Eina_Bool x = x - (w / 2); y = y - (h / 2); - if (bring_in) eo_do(wsd->obj, elm_scrollable_interface_region_bring_in(x, y, w, h)); - else eo_do(wsd->obj, elm_scrollable_interface_content_region_show(x, y, w, h)); + if (bring_in) eo_do(wsd->obj, elm_interface_scrollable_region_bring_in(x, y, w, h)); + else eo_do(wsd->obj, elm_interface_scrollable_content_region_show(x, y, w, h)); } static void @@ -3869,10 +3869,10 @@ _elm_map_smart_event(Eo *obj, void *_pd, va_list *list) if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; eo_do(obj, - elm_scrollable_interface_content_pos_get(&x, &y), - elm_scrollable_interface_step_size_get(&step_x, &step_y), - elm_scrollable_interface_page_size_get(&page_x, &page_y), - elm_scrollable_interface_content_viewport_size_get(NULL, &vh)); + elm_interface_scrollable_content_pos_get(&x, &y), + elm_interface_scrollable_step_size_get(&step_x, &step_y), + elm_interface_scrollable_page_size_get(&page_x, &page_y), + elm_interface_scrollable_content_viewport_size_get(NULL, &vh)); if ((!strcmp(ev->key, "Left")) || ((!strcmp(ev->key, "KP_Left")) && (!ev->string))) @@ -3925,7 +3925,7 @@ _elm_map_smart_event(Eo *obj, void *_pd, va_list *list) else return; ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if (ret) *ret = EINA_TRUE; } @@ -3968,9 +3968,9 @@ _elm_map_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) (obj, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb, obj); eo_do(obj, - elm_scrollable_interface_objects_set(edje, priv->hit_rect), - elm_scrollable_interface_wheel_disabled_set(EINA_TRUE), - elm_scrollable_interface_bounce_allow_set( + elm_interface_scrollable_objects_set(edje, priv->hit_rect), + elm_interface_scrollable_wheel_disabled_set(EINA_TRUE), + elm_interface_scrollable_bounce_allow_set( _elm_config->thumbscroll_bounce_enable, _elm_config->thumbscroll_bounce_enable)); @@ -3978,9 +3978,9 @@ _elm_map_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) _changed_size_hints_cb, obj); eo_do(obj, - elm_scrollable_interface_animate_start_cb_set(_scroll_animate_start_cb), - elm_scrollable_interface_animate_stop_cb_set(_scroll_animate_stop_cb), - elm_scrollable_interface_scroll_cb_set(_scroll_cb)); + elm_interface_scrollable_animate_start_cb_set(_scroll_animate_start_cb), + elm_interface_scrollable_animate_stop_cb_set(_scroll_animate_stop_cb), + elm_interface_scrollable_scroll_cb_set(_scroll_cb)); priv->pan_obj = eo_add(MY_PAN_CLASS, evas_object_evas_get(obj)); pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS); @@ -3988,7 +3988,7 @@ _elm_map_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) pan_data->wobj = obj; pan_data->wsd = priv; - eo_do(obj, elm_scrollable_interface_extern_pan_set(priv->pan_obj)); + eo_do(obj, elm_interface_scrollable_extern_pan_set(priv->pan_obj)); edje_object_size_min_calc(edje, &minw, &minh); evas_object_size_hint_min_set(obj, minw, minh); @@ -6086,4 +6086,4 @@ static const Eo_Class_Description class_desc = { NULL }; -EO_DEFINE_CLASS(elm_obj_map_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, ELM_SCROLLABLE_INTERFACE, NULL); +EO_DEFINE_CLASS(elm_obj_map_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, NULL); diff --git a/src/lib/elm_photocam.c b/src/lib/elm_photocam.c index 22386d1..0716bd7 100644 --- a/src/lib/elm_photocam.c +++ b/src/lib/elm_photocam.c @@ -185,7 +185,7 @@ _image_place(Evas_Object *obj, if (sd->show.show) { sd->show.show = EINA_FALSE; - eo_do(obj, elm_scrollable_interface_content_region_show + eo_do(obj, elm_interface_scrollable_content_region_show (sd->show.x, sd->show.y, sd->show.w, sd->show.h)); } } @@ -755,7 +755,7 @@ _zoom_do(Evas_Object *obj, sd->size.w = (sd->size.ow * (1.0 - t)) + (sd->size.nw * t); sd->size.h = (sd->size.oh * (1.0 - t)) + (sd->size.nh * t); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&ow, &oh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&ow, &oh)); xx = (sd->size.spos.x * sd->size.w) - (ow / 2); yy = (sd->size.spos.y * sd->size.h) - (oh / 2); if (xx < 0) xx = 0; @@ -990,10 +990,10 @@ _elm_photocam_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list) if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; eo_do(obj, - elm_scrollable_interface_content_pos_get(&x, &y), - elm_scrollable_interface_step_size_get(&step_x, &step_y), - elm_scrollable_interface_page_size_get(&page_x, &page_y), - elm_scrollable_interface_content_viewport_size_get(&v_w, &v_h)); + elm_interface_scrollable_content_pos_get(&x, &y), + elm_interface_scrollable_step_size_get(&step_x, &step_y), + elm_interface_scrollable_page_size_get(&page_x, &page_y), + elm_interface_scrollable_content_viewport_size_get(&v_w, &v_h)); if ((!strcmp(ev->key, "Left")) || ((!strcmp(ev->key, "KP_Left")) && (!ev->string))) @@ -1052,7 +1052,7 @@ _elm_photocam_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list) else return; ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if (ret) *ret = EINA_TRUE; } @@ -1072,7 +1072,7 @@ _bounce_eval(void *data) sd->zoom_g_layer = EINA_FALSE; sd->g_layer_zoom.bounce.animator = NULL; - eo_do(obj, elm_scrollable_interface_freeze_set(EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_freeze_set(EINA_FALSE)); return ECORE_CALLBACK_CANCEL; } @@ -1090,7 +1090,7 @@ _bounce_eval(void *data) sd->g_layer_zoom.imy = 0; sd->zoom_g_layer = EINA_FALSE; - eo_do(obj, elm_scrollable_interface_freeze_set(EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_freeze_set(EINA_FALSE)); _zoom_do(obj, 1.0); sd->g_layer_zoom.bounce.animator = NULL; @@ -1127,8 +1127,8 @@ _g_layer_zoom_do(Evas_Object *obj, sd->zoom = sd->g_layer_start / g_layer->zoom; sd->size.ow = sd->size.w; sd->size.oh = sd->size.h; - eo_do(obj, elm_scrollable_interface_content_pos_get(&rx, &ry)); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&rw, &rh)); + eo_do(obj, elm_interface_scrollable_content_pos_get(&rx, &ry)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&rw, &rh)); if ((rw <= 0) || (rh <= 0)) return; sd->size.nw = (double)sd->size.imw / sd->zoom; @@ -1187,10 +1187,10 @@ _g_layer_zoom_start_cb(void *data, ELM_SAFE_FREE(sd->g_layer_zoom.bounce.animator, ecore_animator_del); sd->zoom_g_layer = EINA_TRUE; - eo_do(obj, elm_scrollable_interface_freeze_set(EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_freeze_set(EINA_TRUE)); elm_photocam_image_region_get(obj, &x, &y, &w, &h); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&rw, &rh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&rw, &rh)); if (rw > sd->size.nw) marginx = (rw - sd->size.nw) / 2; @@ -1227,7 +1227,7 @@ _g_layer_zoom_end_cb(void *data, ELM_PHOTOCAM_DATA_GET(obj, sd); Evas_Coord rw, rh; - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&rw, &rh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&rw, &rh)); sd->g_layer_start = 1.0; if (sd->g_layer_zoom.imx || sd->g_layer_zoom.imy) @@ -1309,7 +1309,7 @@ _g_layer_zoom_end_cb(void *data, } else { - eo_do(obj, elm_scrollable_interface_freeze_set(EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_freeze_set(EINA_FALSE)); sd->zoom_g_layer = EINA_FALSE; } @@ -1346,16 +1346,16 @@ _elm_photocam_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) elm_widget_can_focus_set(obj, EINA_TRUE); - eo_do(obj, elm_scrollable_interface_objects_set(edje, priv->hit_rect)); + eo_do(obj, elm_interface_scrollable_objects_set(edje, priv->hit_rect)); eo_do(obj, - elm_scrollable_interface_animate_start_cb_set(_scroll_animate_start_cb), - elm_scrollable_interface_animate_stop_cb_set(_scroll_animate_stop_cb), - elm_scrollable_interface_drag_start_cb_set(_scroll_drag_start_cb), - elm_scrollable_interface_drag_stop_cb_set(_scroll_drag_stop_cb), - elm_scrollable_interface_scroll_cb_set(_scroll_cb)); + elm_interface_scrollable_animate_start_cb_set(_scroll_animate_start_cb), + elm_interface_scrollable_animate_stop_cb_set(_scroll_animate_stop_cb), + elm_interface_scrollable_drag_start_cb_set(_scroll_drag_start_cb), + elm_interface_scrollable_drag_stop_cb_set(_scroll_drag_stop_cb), + elm_interface_scrollable_scroll_cb_set(_scroll_cb)); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(bounce, bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(bounce, bounce)); priv->pan_obj = eo_add(MY_PAN_CLASS, evas_object_evas_get(obj)); pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS); @@ -1363,7 +1363,7 @@ _elm_photocam_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) pan_data->wobj = obj; pan_data->wsd = priv; - eo_do(obj, elm_scrollable_interface_extern_pan_set(priv->pan_obj)); + eo_do(obj, elm_interface_scrollable_extern_pan_set(priv->pan_obj)); priv->g_layer_start = 1.0; priv->zoom = 1; @@ -1700,8 +1700,8 @@ _zoom_set(Eo *obj, void *_pd, va_list *list) sd->zoom = zoom; sd->size.ow = sd->size.w; sd->size.oh = sd->size.h; - eo_do(obj, elm_scrollable_interface_content_pos_get(&rx, &ry)); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&rw, &rh)); + eo_do(obj, elm_interface_scrollable_content_pos_get(&rx, &ry)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&rw, &rh)); if ((rw <= 0) || (rh <= 0)) return; if (sd->mode == ELM_PHOTOCAM_ZOOM_MODE_MANUAL) @@ -2007,8 +2007,8 @@ _image_region_get(Eo *obj, void *_pd, va_list *list) int *h = va_arg(*list, int *); Elm_Photocam_Smart_Data *sd = _pd; - eo_do((Eo *)obj, elm_scrollable_interface_content_pos_get(&sx, &sy)); - eo_do((Eo *)obj, elm_scrollable_interface_content_viewport_size_get(&sw, &sh)); + eo_do((Eo *)obj, elm_interface_scrollable_content_pos_get(&sx, &sy)); + eo_do((Eo *)obj, elm_interface_scrollable_content_viewport_size_get(&sw, &sh)); if (sd->size.w > 0) { if (x) @@ -2097,7 +2097,7 @@ _image_region_show(Eo *obj, void *_pd, va_list *list) _zoom_do(obj, 1.0); evas_object_smart_callback_call(obj, SIG_ZOOM_STOP, NULL); } - eo_do(obj, elm_scrollable_interface_content_region_show(rx, ry, rw, rh)); + eo_do(obj, elm_interface_scrollable_content_region_show(rx, ry, rw, rh)); } EAPI void @@ -2108,7 +2108,7 @@ elm_photocam_image_region_bring_in(Evas_Object *obj, int h EINA_UNUSED) { ELM_PHOTOCAM_CHECK(obj); - eo_do(obj, elm_scrollable_interface_region_bring_in(x, y, w, h)); + eo_do(obj, elm_interface_scrollable_region_bring_in(x, y, w, h)); } static void @@ -2146,7 +2146,7 @@ _image_region_bring_in(Eo *obj, void *_pd, va_list *list) _zoom_do(obj, 1.0); evas_object_smart_callback_call(obj, SIG_ZOOM_STOP, NULL); } - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_region_bring_in(rx, ry, rw, rh)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_region_bring_in(rx, ry, rw, rh)); } EAPI void @@ -2227,7 +2227,7 @@ elm_photocam_bounce_set(Evas_Object *obj, { ELM_PHOTOCAM_CHECK(obj); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(h_bounce, v_bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(h_bounce, v_bounce)); } EAPI void @@ -2237,7 +2237,7 @@ elm_photocam_bounce_get(const Evas_Object *obj, { ELM_PHOTOCAM_CHECK(obj); - eo_do((Eo *)obj, elm_scrollable_interface_bounce_allow_get(h_bounce, v_bounce)); + eo_do((Eo *)obj, elm_interface_scrollable_bounce_allow_get(h_bounce, v_bounce)); } EAPI void @@ -2316,7 +2316,7 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_EVENT), _elm_photocam_smart_event), EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_ON_FOCUS), _elm_photocam_smart_on_focus), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_REGION_BRING_IN), _image_region_bring_in), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_REGION_BRING_IN), _image_region_bring_in), EO_OP_FUNC(ELM_OBJ_PHOTOCAM_ID(ELM_OBJ_PHOTOCAM_SUB_ID_FILE_SET), _file_set), EO_OP_FUNC(ELM_OBJ_PHOTOCAM_ID(ELM_OBJ_PHOTOCAM_SUB_ID_FILE_GET), _file_get), @@ -2369,4 +2369,4 @@ static const Eo_Class_Description class_desc = { NULL }; -EO_DEFINE_CLASS(elm_obj_photocam_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, ELM_SCROLLABLE_INTERFACE, NULL); +EO_DEFINE_CLASS(elm_obj_photocam_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, NULL); diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c index ad13a57..0198d4e 100644 --- a/src/lib/elm_scroller.c +++ b/src/lib/elm_scroller.c @@ -78,10 +78,10 @@ _elm_scroller_smart_event(Eo *obj, void *_pd, va_list *list) if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; eo_do(obj, - elm_scrollable_interface_content_pos_get(&x, &y), - elm_scrollable_interface_step_size_get(&step_x, &step_y), - elm_scrollable_interface_page_size_get(&page_x, &page_y), - elm_scrollable_interface_content_viewport_size_get(&v_w, &v_h)); + elm_interface_scrollable_content_pos_get(&x, &y), + elm_interface_scrollable_step_size_get(&step_x, &step_y), + elm_interface_scrollable_page_size_get(&page_x, &page_y), + elm_interface_scrollable_content_viewport_size_get(&v_w, &v_h)); eo_do(sd->content, evas_obj_position_get(&c_x, &c_y), evas_obj_size_get(&max_x, &max_y)); @@ -242,7 +242,7 @@ _elm_scroller_smart_event(Eo *obj, void *_pd, va_list *list) else return; ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if (ret) *ret = EINA_TRUE; } @@ -265,9 +265,9 @@ _elm_scroller_smart_activate(Eo *obj, void *_pd EINA_UNUSED, va_list *list) if (act == ELM_ACTIVATE_DEFAULT) return; eo_do(obj, - elm_scrollable_interface_content_pos_get(&x, &y), - elm_scrollable_interface_page_size_get(&page_x, &page_y), - elm_scrollable_interface_content_viewport_size_get(&v_w, &v_h)); + elm_interface_scrollable_content_pos_get(&x, &y), + elm_interface_scrollable_page_size_get(&page_x, &page_y), + elm_interface_scrollable_content_viewport_size_get(&v_w, &v_h)); if (act == ELM_ACTIVATE_UP) { @@ -298,7 +298,7 @@ _elm_scroller_smart_activate(Eo *obj, void *_pd EINA_UNUSED, va_list *list) x += page_x; } - eo_do(obj, elm_scrollable_interface_content_pos_set(x, y, EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); if (ret) *ret = EINA_TRUE; } @@ -319,7 +319,7 @@ _elm_scroller_smart_sizing_eval(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_size_hint_weight_get(sd->content, &xw, &yw); } - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); if (xw > 0.0) { if ((minw > 0) && (vw < minw)) @@ -361,7 +361,7 @@ static void _mirrored_set(Evas_Object *obj, Eina_Bool mirrored) { - eo_do(obj, elm_scrollable_interface_mirrored_set(mirrored)); + eo_do(obj, elm_interface_scrollable_mirrored_set(mirrored)); } static void @@ -451,7 +451,7 @@ _show_region_hook(void *data, Evas_Coord x, y, w, h; elm_widget_show_region_get(content_obj, &x, &y, &w, &h); - eo_do(data, elm_scrollable_interface_content_region_show(x, y, w, h)); + eo_do(data, elm_interface_scrollable_content_region_show(x, y, w, h)); } static void @@ -662,7 +662,7 @@ _elm_scroller_smart_content_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) elm_widget_on_show_region_hook_set(content, _show_region_hook, obj); elm_widget_sub_object_add(obj, content); - eo_do(obj, elm_scrollable_interface_content_set(content)); + eo_do(obj, elm_interface_scrollable_content_set(content)); } elm_layout_sizing_eval(obj); @@ -708,7 +708,7 @@ _elm_scroller_smart_content_unset(Eo *obj, void *_pd, va_list *list) int_ret = sd->content; if (ret) *ret = int_ret; elm_widget_sub_object_del(obj, sd->content); - eo_do(obj, elm_scrollable_interface_content_set(NULL)); + eo_do(obj, elm_interface_scrollable_content_set(NULL)); sd->content = NULL; } @@ -756,7 +756,7 @@ _elm_scroller_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_show(priv->hit_rect); evas_object_repeat_events_set(priv->hit_rect, EINA_TRUE); - eo_do(obj, elm_scrollable_interface_objects_set(wd->resize_obj, priv->hit_rect)); + eo_do(obj, elm_interface_scrollable_objects_set(wd->resize_obj, priv->hit_rect)); evas_object_event_callback_add (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints_cb, obj); @@ -766,29 +766,29 @@ _elm_scroller_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize_cb, obj); eo_do(obj, - elm_scrollable_interface_edge_left_cb_set(_edge_left_cb), - elm_scrollable_interface_edge_right_cb_set(_edge_right_cb), - elm_scrollable_interface_edge_top_cb_set(_edge_top_cb), - elm_scrollable_interface_edge_bottom_cb_set(_edge_bottom_cb), - elm_scrollable_interface_scroll_cb_set(_scroll_cb), - elm_scrollable_interface_scroll_left_cb_set(_scroll_left_cb), - elm_scrollable_interface_scroll_right_cb_set(_scroll_right_cb), - elm_scrollable_interface_scroll_up_cb_set(_scroll_up_cb), - elm_scrollable_interface_scroll_down_cb_set(_scroll_down_cb), - elm_scrollable_interface_animate_start_cb_set(_scroll_anim_start_cb), - elm_scrollable_interface_animate_stop_cb_set(_scroll_anim_stop_cb), - elm_scrollable_interface_drag_start_cb_set(_scroll_drag_start_cb), - elm_scrollable_interface_drag_stop_cb_set(_scroll_drag_stop_cb), - elm_scrollable_interface_vbar_drag_cb_set(_vbar_drag_cb), - elm_scrollable_interface_vbar_press_cb_set(_vbar_press_cb), - elm_scrollable_interface_vbar_unpress_cb_set(_vbar_unpress_cb), - elm_scrollable_interface_hbar_drag_cb_set(_hbar_drag_cb), - elm_scrollable_interface_hbar_press_cb_set(_hbar_press_cb), - elm_scrollable_interface_hbar_unpress_cb_set(_hbar_unpress_cb), - elm_scrollable_interface_page_change_cb_set(_page_change_cb), - elm_scrollable_interface_content_min_limit_cb_set + elm_interface_scrollable_edge_left_cb_set(_edge_left_cb), + elm_interface_scrollable_edge_right_cb_set(_edge_right_cb), + elm_interface_scrollable_edge_top_cb_set(_edge_top_cb), + elm_interface_scrollable_edge_bottom_cb_set(_edge_bottom_cb), + elm_interface_scrollable_scroll_cb_set(_scroll_cb), + elm_interface_scrollable_scroll_left_cb_set(_scroll_left_cb), + elm_interface_scrollable_scroll_right_cb_set(_scroll_right_cb), + elm_interface_scrollable_scroll_up_cb_set(_scroll_up_cb), + elm_interface_scrollable_scroll_down_cb_set(_scroll_down_cb), + elm_interface_scrollable_animate_start_cb_set(_scroll_anim_start_cb), + elm_interface_scrollable_animate_stop_cb_set(_scroll_anim_stop_cb), + elm_interface_scrollable_drag_start_cb_set(_scroll_drag_start_cb), + elm_interface_scrollable_drag_stop_cb_set(_scroll_drag_stop_cb), + elm_interface_scrollable_vbar_drag_cb_set(_vbar_drag_cb), + elm_interface_scrollable_vbar_press_cb_set(_vbar_press_cb), + elm_interface_scrollable_vbar_unpress_cb_set(_vbar_unpress_cb), + elm_interface_scrollable_hbar_drag_cb_set(_hbar_drag_cb), + elm_interface_scrollable_hbar_press_cb_set(_hbar_press_cb), + elm_interface_scrollable_hbar_unpress_cb_set(_hbar_unpress_cb), + elm_interface_scrollable_page_change_cb_set(_page_change_cb), + elm_interface_scrollable_content_min_limit_cb_set (_elm_scroller_content_min_limit_cb), - elm_scrollable_interface_content_viewport_resize_cb_set + elm_interface_scrollable_content_viewport_resize_cb_set (_elm_scroller_content_viewport_resize_cb)); } @@ -878,7 +878,7 @@ elm_scroller_content_min_limit(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_content_min_limit(w, h)); + eo_do(obj, elm_interface_scrollable_content_min_limit(w, h)); } EAPI void @@ -890,7 +890,7 @@ elm_scroller_region_show(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_content_region_show(x, y, w, h)); + eo_do(obj, elm_interface_scrollable_content_region_show(x, y, w, h)); } EAPI void @@ -899,7 +899,7 @@ elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_v) { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do(obj, elm_interface_scrollable_policy_set(policy_h, policy_v)); } static void @@ -912,7 +912,7 @@ _policy_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) (policy_v >= ELM_SCROLLER_POLICY_LAST)) return; - eo_do_super(obj, MY_CLASS, elm_scrollable_interface_policy_set(policy_h, policy_v)); + eo_do_super(obj, MY_CLASS, elm_interface_scrollable_policy_set(policy_h, policy_v)); } EAPI void @@ -922,7 +922,7 @@ elm_scroller_policy_get(const Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_policy_get(policy_h, policy_v)); + eo_do((Eo *) obj, elm_interface_scrollable_policy_get(policy_h, policy_v)); } EAPI void @@ -930,7 +930,7 @@ elm_scroller_single_direction_set(Evas_Object *obj, Elm_Scroller_Single_Direction single_dir) { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_single_direction_set(single_dir)); + eo_do(obj, elm_interface_scrollable_single_direction_set(single_dir)); } static void @@ -942,7 +942,7 @@ _single_direction_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) return; eo_do_super(obj, MY_CLASS, - elm_scrollable_interface_single_direction_set(single_dir)); + elm_interface_scrollable_single_direction_set(single_dir)); } EAPI Elm_Scroller_Single_Direction @@ -951,7 +951,7 @@ elm_scroller_single_direction_get(const Evas_Object *obj) ELM_SCROLLABLE_CHECK(obj, ELM_SCROLLER_SINGLE_DIRECTION_NONE); Elm_Scroller_Single_Direction single_dir; - eo_do((Eo *) obj, elm_scrollable_interface_single_direction_get(&single_dir)); + eo_do((Eo *) obj, elm_interface_scrollable_single_direction_get(&single_dir)); return single_dir; } @@ -962,7 +962,7 @@ _single_direction_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list) va_arg(*list, Elm_Scroller_Single_Direction *); eo_do_super(obj, MY_CLASS, - elm_scrollable_interface_single_direction_get(ret)); + elm_interface_scrollable_single_direction_get(ret)); } EAPI void @@ -973,7 +973,7 @@ elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *h) { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_content_region_get(x, y, w, h)); + eo_do((Eo *) obj, elm_interface_scrollable_content_region_get(x, y, w, h)); } EAPI void @@ -983,7 +983,7 @@ elm_scroller_child_size_get(const Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_content_size_get(w, h)); + eo_do((Eo *) obj, elm_interface_scrollable_content_size_get(w, h)); } EAPI void @@ -993,7 +993,7 @@ elm_scroller_page_snap_set(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_page_snap_allow_set + eo_do(obj, elm_interface_scrollable_page_snap_allow_set (page_snap_h, page_snap_v)); } @@ -1004,7 +1004,7 @@ elm_scroller_page_snap_get(const Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_page_snap_allow_get + eo_do((Eo *) obj, elm_interface_scrollable_page_snap_allow_get (page_snap_h, page_snap_v)); } @@ -1015,7 +1015,7 @@ elm_scroller_bounce_set(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(h_bounce, v_bounce)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(h_bounce, v_bounce)); } EAPI void @@ -1025,7 +1025,7 @@ elm_scroller_bounce_get(const Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_bounce_allow_get(h_bounce, v_bounce)); + eo_do((Eo *) obj, elm_interface_scrollable_bounce_allow_get(h_bounce, v_bounce)); } EAPI void @@ -1035,7 +1035,7 @@ elm_scroller_page_relative_set(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *)obj, elm_scrollable_interface_page_relative_set(h_pagerel, v_pagerel)); + eo_do((Eo *)obj, elm_interface_scrollable_page_relative_set(h_pagerel, v_pagerel)); } EAPI void @@ -1045,7 +1045,7 @@ elm_scroller_page_relative_get(const Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *)obj, elm_scrollable_interface_paging_get(h_pagerel, v_pagerel, NULL, NULL)); + eo_do((Eo *)obj, elm_interface_scrollable_paging_get(h_pagerel, v_pagerel, NULL, NULL)); } EAPI void @@ -1054,7 +1054,7 @@ elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord v_pagesize) { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_page_size_set(h_pagesize, v_pagesize)); + eo_do(obj, elm_interface_scrollable_page_size_set(h_pagesize, v_pagesize)); } static void @@ -1065,9 +1065,9 @@ _page_size_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) Evas_Coord h_pagesize = va_arg(*list, Evas_Coord); Evas_Coord v_pagesize = va_arg(*list, Evas_Coord); - eo_do(obj, elm_scrollable_interface_paging_get(&pagerel_h, &pagerel_v, NULL, NULL)); + eo_do(obj, elm_interface_scrollable_paging_get(&pagerel_h, &pagerel_v, NULL, NULL)); - eo_do(obj, elm_scrollable_interface_paging_set(pagerel_h, pagerel_v, h_pagesize, v_pagesize)); + eo_do(obj, elm_interface_scrollable_paging_set(pagerel_h, pagerel_v, h_pagesize, v_pagesize)); } EAPI void @@ -1077,7 +1077,7 @@ elm_scroller_page_size_get(const Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *)obj, elm_scrollable_interface_paging_get(NULL, NULL, h_pagesize, v_pagesize)); + eo_do((Eo *)obj, elm_interface_scrollable_paging_get(NULL, NULL, h_pagesize, v_pagesize)); } EAPI void @@ -1101,7 +1101,7 @@ _page_scroll_limit_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) if (page_limit_v < 1) page_limit_v = 9999; - eo_do(obj, elm_scrollable_interface_page_scroll_limit_set + eo_do(obj, elm_interface_scrollable_page_scroll_limit_set (page_limit_h, page_limit_v)); } @@ -1121,7 +1121,7 @@ _page_scroll_limit_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list) int *page_limit_h = va_arg(*list, int *); int *page_limit_v = va_arg(*list, int *); - eo_do(obj, elm_scrollable_interface_page_scroll_limit_get + eo_do(obj, elm_interface_scrollable_page_scroll_limit_get (page_limit_h, page_limit_v)); } @@ -1132,7 +1132,7 @@ elm_scroller_current_page_get(const Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_current_page_get(h_pagenumber, v_pagenumber)); + eo_do((Eo *) obj, elm_interface_scrollable_current_page_get(h_pagenumber, v_pagenumber)); } EAPI void @@ -1142,7 +1142,7 @@ elm_scroller_last_page_get(const Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_last_page_get(h_pagenumber, v_pagenumber)); + eo_do((Eo *) obj, elm_interface_scrollable_last_page_get(h_pagenumber, v_pagenumber)); } EAPI void @@ -1152,7 +1152,7 @@ elm_scroller_page_show(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_page_show(h_pagenumber, v_pagenumber)); + eo_do(obj, elm_interface_scrollable_page_show(h_pagenumber, v_pagenumber)); } EAPI void @@ -1162,7 +1162,7 @@ elm_scroller_page_bring_in(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_page_bring_in(h_pagenumber, v_pagenumber)); + eo_do(obj, elm_interface_scrollable_page_bring_in(h_pagenumber, v_pagenumber)); } EAPI void @@ -1174,7 +1174,7 @@ elm_scroller_region_bring_in(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_region_bring_in(x, y, w, h)); + eo_do(obj, elm_interface_scrollable_region_bring_in(x, y, w, h)); } EAPI void @@ -1184,7 +1184,7 @@ elm_scroller_gravity_set(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_gravity_set(x, y)); + eo_do(obj, elm_interface_scrollable_gravity_set(x, y)); } EAPI void @@ -1194,7 +1194,7 @@ elm_scroller_gravity_get(const Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do((Eo *) obj, elm_scrollable_interface_gravity_get(x, y)); + eo_do((Eo *) obj, elm_interface_scrollable_gravity_get(x, y)); } EAPI void @@ -1203,7 +1203,7 @@ elm_scroller_movement_block_set(Evas_Object *obj, { ELM_SCROLLABLE_CHECK(obj); - eo_do(obj, elm_scrollable_interface_movement_block_set(block)); + eo_do(obj, elm_interface_scrollable_movement_block_set(block)); } EAPI Elm_Scroller_Movement_Block @@ -1213,7 +1213,7 @@ elm_scroller_movement_block_get(const Evas_Object *obj) ELM_SCROLLABLE_CHECK(obj, ELM_SCROLLER_MOVEMENT_NO_BLOCK); - eo_do((Eo *) obj, elm_scrollable_interface_movement_block_get(&block)); + eo_do((Eo *) obj, elm_interface_scrollable_movement_block_get(&block)); return block; } @@ -1278,10 +1278,10 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_scroller_smart_sizing_eval), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_SET), _policy_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_SET), _single_direction_set), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_GET), _single_direction_get), - EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_PAGE_SIZE_SET), _page_size_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_POLICY_SET), _policy_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_SINGLE_DIRECTION_SET), _single_direction_set), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_SINGLE_DIRECTION_GET), _single_direction_get), + EO_OP_FUNC(ELM_INTERFACE_SCROLLABLE_ID(ELM_INTERFACE_SCROLLABLE_SUB_ID_PAGE_SIZE_SET), _page_size_set), EO_OP_FUNC(ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_CUSTOM_WIDGET_BASE_THEME_SET), _custom_widget_base_theme_set), EO_OP_FUNC(ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PAGE_SCROLL_LIMIT_SET), _page_scroll_limit_set), @@ -1315,4 +1315,4 @@ static const Eo_Class_Description class_desc = { NULL }; -EO_DEFINE_CLASS(elm_obj_scroller_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_SCROLLABLE_INTERFACE, NULL); +EO_DEFINE_CLASS(elm_obj_scroller_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, NULL); diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index a65eea3..e7be76b 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -199,7 +199,7 @@ _item_show(Elm_Toolbar_Item *it) evas_object_geometry_get(sd->bx, &bx, &by, NULL, NULL); evas_object_geometry_get(VIEW(it), &x, &y, &w, &h); - eo_do(WIDGET(it), elm_scrollable_interface_content_region_show + eo_do(WIDGET(it), elm_interface_scrollable_content_region_show (x - bx, y - by, w, h)); } @@ -292,7 +292,7 @@ _elm_toolbar_item_coordinates_calc(Elm_Toolbar_Item *item, ELM_TOOLBAR_DATA_GET(WIDGET(item), sd); eo_do(WIDGET(item), - elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); evas_object_geometry_get(sd->bx, &bx, &by, NULL, NULL); evas_object_geometry_get(VIEW(item), &ix, &iy, &iw, &ih); @@ -345,7 +345,7 @@ _resize_job(void *data) ELM_TOOLBAR_DATA_GET(obj, sd); sd->resize_job = NULL; - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); evas_object_size_hint_min_get(sd->bx, &mw, &mh); evas_object_geometry_get(sd->bx, NULL, NULL, &w, &h); @@ -506,14 +506,14 @@ _resize_job(void *data) { if (h > vh) _items_size_fit(obj, &h, vh); if (sd->item_count - sd->separator_count > 0) - eo_do(obj, elm_scrollable_interface_paging_set + eo_do(obj, elm_interface_scrollable_paging_set (0.0, 0.0, 0, (h / (sd->item_count - sd->separator_count)))); } else { if (w > vw) _items_size_fit(obj, &w, vw); if (sd->item_count - sd->separator_count > 0) - eo_do(obj, elm_scrollable_interface_paging_set + eo_do(obj, elm_interface_scrollable_paging_set (0.0, 0.0, (w / (sd->item_count - sd->separator_count)), 0)); } } @@ -714,7 +714,7 @@ _elm_toolbar_smart_event(Eo *obj, void *_pd, va_list *list) if (_elm_toolbar_item_coordinates_calc( sd->highlighted_item, ELM_TOOLBAR_ITEM_SCROLLTO_IN, &x, &y, &w, &h)) - eo_do(obj, elm_scrollable_interface_region_bring_in(x, y, w, h)); + eo_do(obj, elm_interface_scrollable_region_bring_in(x, y, w, h)); success: ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; @@ -1086,7 +1086,7 @@ _sizing_eval(Evas_Object *obj) evas_object_resize(wd->resize_obj, w, h); evas_object_size_hint_min_get(sd->bx, &minw_bx, &minh_bx); - eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh)); + eo_do(obj, elm_interface_scrollable_content_viewport_size_get(&vw, &vh)); if (sd->shrink_mode == ELM_TOOLBAR_SHRINK_NONE) { @@ -1759,7 +1759,7 @@ _mouse_up_reorder(Elm_Toolbar_Item *it, ELM_SAFE_FREE(it->proxy, evas_object_del); } - eo_do(obj, elm_scrollable_interface_hold_set(EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_hold_set(EINA_FALSE)); } static void @@ -1807,7 +1807,7 @@ _item_reorder_start(Elm_Toolbar_Item *item) evas_object_move(item->proxy, x, y); evas_object_show(item->proxy); - eo_do(WIDGET(item), elm_scrollable_interface_hold_set(EINA_TRUE)); + eo_do(WIDGET(item), elm_interface_scrollable_hold_set(EINA_TRUE)); } static Eina_Bool @@ -2498,20 +2498,20 @@ _elm_toolbar_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) elm_widget_can_focus_set(obj, EINA_TRUE); - eo_do(obj, elm_scrollable_interface_objects_set(edje, priv->hit_rect)); + eo_do(obj, elm_interface_scrollable_objects_set(edje, priv->hit_rect)); priv->standard_priority = -99999; eo_do(obj, - elm_scrollable_interface_bounce_allow_set + elm_interface_scrollable_bounce_allow_set (_elm_config->thumbscroll_bounce_enable, EINA_FALSE), - elm_scrollable_interface_policy_set + elm_interface_scrollable_policy_set (ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF), - elm_scrollable_interface_scroll_cb_set(_scroll_cb), - elm_scrollable_interface_animate_start_cb_set(_scroll_anim_start_cb), - elm_scrollable_interface_animate_stop_cb_set(_scroll_anim_stop_cb), - elm_scrollable_interface_drag_start_cb_set(_scroll_drag_start_cb), - elm_scrollable_interface_drag_stop_cb_set(_scroll_drag_stop_cb)); + elm_interface_scrollable_scroll_cb_set(_scroll_cb), + elm_interface_scrollable_animate_start_cb_set(_scroll_anim_start_cb), + elm_interface_scrollable_animate_stop_cb_set(_scroll_anim_stop_cb), + elm_interface_scrollable_drag_start_cb_set(_scroll_drag_start_cb), + elm_interface_scrollable_drag_stop_cb_set(_scroll_drag_stop_cb)); edje_object_signal_callback_add (edje, "elm,action,left", "elm", _elm_toolbar_action_left_cb, obj); @@ -2533,7 +2533,7 @@ _elm_toolbar_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_size_hint_align_set(priv->bx, priv->align, 0.5); evas_object_box_layout_set(priv->bx, _layout, obj, NULL); elm_widget_sub_object_add(obj, priv->bx); - eo_do(obj, elm_scrollable_interface_content_set(priv->bx)); + eo_do(obj, elm_interface_scrollable_content_set(priv->bx)); evas_object_show(priv->bx); priv->more = elm_layout_add(obj); @@ -3293,7 +3293,7 @@ _shrink_mode_set(Eo *obj, void *_pd, va_list *list) sd->shrink_mode = shrink_mode; bounce = (_elm_config->thumbscroll_bounce_enable) && (shrink_mode == ELM_TOOLBAR_SHRINK_SCROLL); - eo_do(obj, elm_scrollable_interface_bounce_allow_set(bounce, EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_bounce_allow_set(bounce, EINA_FALSE)); if (sd->more_item) { @@ -3304,25 +3304,25 @@ _shrink_mode_set(Eo *obj, void *_pd, va_list *list) if (shrink_mode == ELM_TOOLBAR_SHRINK_MENU) { elm_toolbar_homogeneous_set(obj, EINA_FALSE); - eo_do(obj, elm_scrollable_interface_policy_set + eo_do(obj, elm_interface_scrollable_policy_set (ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF)); sd->more_item = _item_new(obj, "more_menu", "More", NULL, NULL); } else if (shrink_mode == ELM_TOOLBAR_SHRINK_HIDE) { elm_toolbar_homogeneous_set(obj, EINA_FALSE); - eo_do(obj, elm_scrollable_interface_policy_set + eo_do(obj, elm_interface_scrollable_policy_set (ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF)); } else if (shrink_mode == ELM_TOOLBAR_SHRINK_EXPAND) { elm_toolbar_homogeneous_set(obj, EINA_FALSE); - eo_do(obj, elm_scrollable_interface_policy_set + eo_do(obj, elm_interface_scrollable_policy_set (ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF)); sd->more_item = _item_new(obj, "more_menu", "More", NULL, NULL); } else - eo_do(obj, elm_scrollable_interface_policy_set + eo_do(obj, elm_interface_scrollable_policy_set (ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF)); _sizing_eval(obj); @@ -3933,7 +3933,7 @@ elm_toolbar_item_show(Elm_Object_Item *it, Elm_Toolbar_Item_Scrollto_Type type) ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it); if (_elm_toolbar_item_coordinates_calc(item, type, &x, &y, &w, &h)) - eo_do(WIDGET(item), elm_scrollable_interface_content_region_show + eo_do(WIDGET(item), elm_interface_scrollable_content_region_show (x, y, w, h)); } @@ -3946,7 +3946,7 @@ elm_toolbar_item_bring_in(Elm_Object_Item *it, Elm_Toolbar_Item_Scrollto_Type ty ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it); if (_elm_toolbar_item_coordinates_calc(item, type, &x, &y, &w, &h)) - eo_do(WIDGET(item), elm_scrollable_interface_region_bring_in + eo_do(WIDGET(item), elm_interface_scrollable_region_bring_in (x, y, w, h)); } @@ -4048,4 +4048,4 @@ static const Eo_Class_Description class_desc = { NULL }; -EO_DEFINE_CLASS(elm_obj_toolbar_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, ELM_SCROLLABLE_INTERFACE, NULL); +EO_DEFINE_CLASS(elm_obj_toolbar_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, NULL); diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index 9d2f073..3e9b07f 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -78,7 +78,7 @@ _elm_scrollable_is(const Evas_Object *obj) { INTERNAL_ENTRY EINA_FALSE; return - eo_isa(obj, ELM_SCROLLABLE_INTERFACE); + eo_isa(obj, ELM_INTERFACE_SCROLLABLE_CLASS); } void @@ -629,7 +629,7 @@ _elm_widget_focus_region_show(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED) if (_elm_scrollable_is(o) && !elm_widget_disabled_get(o)) { - eo_do(o, elm_scrollable_interface_content_region_show(x, y, w, h)); + eo_do(o, elm_interface_scrollable_content_region_show(x, y, w, h)); if (!elm_widget_focus_region_get(o, &x, &y, &w, &h)) { @@ -2759,7 +2759,7 @@ _elm_widget_show_region_set(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Coord x, Ev if (_elm_scrollable_is(obj)) { - eo_do(obj, elm_scrollable_interface_content_pos_get(&nx, &ny)); + eo_do(obj, elm_interface_scrollable_content_pos_get(&nx, &ny)); x -= nx; y -= ny; } @@ -2846,7 +2846,7 @@ _elm_widget_parents_bounce_get(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, if (_elm_scrollable_is(parent_obj)) { - eo_do(parent_obj, elm_scrollable_interface_bounce_allow_get(&h, &v)); + eo_do(parent_obj, elm_interface_scrollable_bounce_allow_get(&h, &v)); if (h) *horiz = EINA_TRUE; if (v) *vert = EINA_TRUE; } @@ -2880,7 +2880,7 @@ _elm_widget_scroll_hold_push(Eo *obj, Elm_Widget_Smart_Data *sd) if (sd->scroll_hold == 1) { if (_elm_scrollable_is(obj)) - eo_do(obj, elm_scrollable_interface_hold_set(EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_hold_set(EINA_TRUE)); else { Eina_List *scr_children, *l; @@ -2889,7 +2889,7 @@ _elm_widget_scroll_hold_push(Eo *obj, Elm_Widget_Smart_Data *sd) scr_children = elm_widget_scrollable_children_get(obj); EINA_LIST_FOREACH(scr_children, l, child) { - eo_do(child, elm_scrollable_interface_hold_set(EINA_TRUE)); + eo_do(child, elm_interface_scrollable_hold_set(EINA_TRUE)); } eina_list_free(scr_children); } @@ -2905,7 +2905,7 @@ _elm_widget_scroll_hold_pop(Eo *obj, Elm_Widget_Smart_Data *sd) if (!sd->scroll_hold) { if (_elm_scrollable_is(obj)) - eo_do(obj, elm_scrollable_interface_hold_set(EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_hold_set(EINA_FALSE)); else { Eina_List *scr_children, *l; @@ -2914,7 +2914,7 @@ _elm_widget_scroll_hold_pop(Eo *obj, Elm_Widget_Smart_Data *sd) scr_children = elm_widget_scrollable_children_get(obj); EINA_LIST_FOREACH(scr_children, l, child) { - eo_do(child, elm_scrollable_interface_hold_set(EINA_FALSE)); + eo_do(child, elm_interface_scrollable_hold_set(EINA_FALSE)); } eina_list_free(scr_children); } @@ -2936,7 +2936,7 @@ _elm_widget_scroll_freeze_push(Eo *obj, Elm_Widget_Smart_Data *sd) if (sd->scroll_freeze == 1) { if (_elm_scrollable_is(obj)) - eo_do(obj, elm_scrollable_interface_freeze_set(EINA_TRUE)); + eo_do(obj, elm_interface_scrollable_freeze_set(EINA_TRUE)); else { Eina_List *scr_children, *l; @@ -2945,7 +2945,7 @@ _elm_widget_scroll_freeze_push(Eo *obj, Elm_Widget_Smart_Data *sd) scr_children = elm_widget_scrollable_children_get(obj); EINA_LIST_FOREACH(scr_children, l, child) { - eo_do(child, elm_scrollable_interface_freeze_set(EINA_TRUE)); + eo_do(child, elm_interface_scrollable_freeze_set(EINA_TRUE)); } eina_list_free(scr_children); } @@ -2961,7 +2961,7 @@ _elm_widget_scroll_freeze_pop(Eo *obj, Elm_Widget_Smart_Data *sd) if (!sd->scroll_freeze) { if (_elm_scrollable_is(obj)) - eo_do(obj, elm_scrollable_interface_freeze_set(EINA_FALSE)); + eo_do(obj, elm_interface_scrollable_freeze_set(EINA_FALSE)); else { Eina_List *scr_children, *l; @@ -2970,7 +2970,7 @@ _elm_widget_scroll_freeze_pop(Eo *obj, Elm_Widget_Smart_Data *sd) scr_children = elm_widget_scrollable_children_get(obj); EINA_LIST_FOREACH(scr_children, l, child) { - eo_do(child, elm_scrollable_interface_freeze_set(EINA_FALSE)); + eo_do(child, elm_interface_scrollable_freeze_set(EINA_FALSE)); } eina_list_free(scr_children); } -- 2.7.4