1 #include <Elementary.h>
3 #include "els_scroller.h"
5 typedef struct _Widget_Data Widget_Data;
11 const char *widget_name, *widget_base;
14 double pagerel_h, pagerel_v;
15 Evas_Coord pagesize_h, pagesize_v;
18 static const char *widtype = NULL;
19 static void _del_hook(Evas_Object *obj);
20 static void _theme_hook(Evas_Object *obj);
21 static void _show_region_hook(void *data, Evas_Object *obj);
22 static void _sizing_eval(Evas_Object *obj);
23 static void _sub_del(void *data, Evas_Object *obj, void *event_info);
24 static void _on_focus_hook(void *data, Evas_Object *obj);
25 static Eina_Bool _event_hook(Evas_Object *obj, Evas_Object *src,
26 Evas_Callback_Type type, void *event_info);
29 static const char SIG_SCROLL[] = "scroll";
30 static const char SIG_SCROLL_ANIM_START[] = "scroll,anim,start";
31 static const char SIG_SCROLL_ANIM_STOP[] = "scroll,anim,stop";
32 static const char SIG_SCROLL_DRAG_START[] = "scroll,drag,start";
33 static const char SIG_SCROLL_DRAG_STOP[] = "scroll,drag,stop";
34 static const char SIG_EDGE_LEFT[] = "edge,left";
35 static const char SIG_EDGE_RIGHT[] = "edge,right";
36 static const char SIG_EDGE_TOP[] = "edge,top";
37 static const char SIG_EDGE_BOTTOM[] = "edge,bottom";
38 static const Evas_Smart_Cb_Description _signals[] = {
40 {SIG_SCROLL_ANIM_START, ""},
41 {SIG_SCROLL_ANIM_STOP, ""},
42 {SIG_SCROLL_DRAG_START, ""},
43 {SIG_SCROLL_DRAG_STOP, ""},
47 {SIG_EDGE_BOTTOM, ""},
52 _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type type, void *event_info)
54 if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE;
55 Evas_Event_Key_Down *ev = event_info;
56 Widget_Data *wd = elm_widget_data_get(obj);
57 if (!wd) return EINA_FALSE;
58 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
59 if (elm_widget_disabled_get(obj)) return EINA_FALSE;
63 Evas_Coord step_x = 0;
64 Evas_Coord step_y = 0;
69 Evas_Coord page_x = 0;
70 Evas_Coord page_y = 0;
72 elm_smart_scroller_child_pos_get(wd->scr, &x, &y);
73 elm_smart_scroller_step_size_get(wd->scr, &step_x, &step_y);
74 elm_smart_scroller_page_size_get(wd->scr, &page_x, &page_y);
75 elm_smart_scroller_child_viewport_size_get(wd->scr, &v_w, &v_h);
76 elm_scroller_child_size_get(obj, &max_x, &max_y);
78 if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
82 else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
86 else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
90 else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
94 else if ((!strcmp(ev->keyname, "Home")) || (!strcmp(ev->keyname, "KP_Home")))
98 else if ((!strcmp(ev->keyname, "End")) || (!strcmp(ev->keyname, "KP_End")))
102 else if ((!strcmp(ev->keyname, "Prior")) || (!strcmp(ev->keyname, "KP_Prior")))
105 y -= -(page_y * v_h) / 100;
109 else if ((!strcmp(ev->keyname, "Next")) || (!strcmp(ev->keyname, "KP_Next")))
112 y += -(page_y * v_h) / 100;
116 else return EINA_FALSE;
118 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
119 elm_smart_scroller_child_pos_set(wd->scr, x, y);
124 _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
126 Widget_Data *wd = elm_widget_data_get(obj);
128 if (elm_widget_focus_get(obj))
130 edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr), "elm,action,focus", "elm");
131 evas_object_focus_set(wd->scr, EINA_TRUE);
135 edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr), "elm,action,unfocus", "elm");
136 evas_object_focus_set(wd->scr, EINA_FALSE);
141 _del_hook(Evas_Object *obj)
143 Widget_Data *wd = elm_widget_data_get(obj);
149 _mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
151 Widget_Data *wd = elm_widget_data_get(obj);
154 elm_smart_scroller_mirrored_set(wd->scr, mirrored);
158 _theme_hook(Evas_Object *obj)
160 Widget_Data *wd = elm_widget_data_get(obj);
162 _elm_widget_mirrored_reload(obj);
168 _mirrored_set(obj, elm_widget_mirrored_get(obj));
169 elm_smart_scroller_object_theme_set(obj, wd->scr,
170 wd->widget_name, wd->widget_base,
171 elm_widget_style_get(obj));
172 // edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
173 edj = elm_smart_scroller_edje_object_get(wd->scr);
174 str = edje_object_data_get(edj, "focus_highlight");
175 if ((str) && (!strcmp(str, "on")))
176 elm_widget_highlight_in_theme_set(obj, EINA_TRUE);
178 elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
184 _elm_scroller_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next)
186 Widget_Data *wd = elm_widget_data_get(obj);
189 if ((!wd) || (!wd->content))
194 /* Try Focus cycle in subitem */
195 if (elm_widget_focus_get(obj))
197 if ((elm_widget_can_focus_get(cur)) || (elm_widget_child_can_focus_get(cur)))
198 return elm_widget_focus_next_get(cur, dir, next);
202 *next = (Evas_Object *)obj;
203 return !elm_widget_focus_get(obj);
207 _signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
209 Widget_Data *wd = elm_widget_data_get(obj);
211 edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
216 _signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
218 Widget_Data *wd = elm_widget_data_get(obj);
220 edje_object_signal_callback_add(elm_smart_scroller_edje_object_get(wd->scr),
221 emission, source, func_cb, data);
225 _signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
227 Widget_Data *wd = elm_widget_data_get(obj);
228 edje_object_signal_callback_del_full(
229 elm_smart_scroller_edje_object_get(wd->scr), emission, source,
234 _show_region_hook(void *data, Evas_Object *obj)
236 Widget_Data *wd = elm_widget_data_get(data);
237 Evas_Coord x, y, w, h;
239 elm_widget_show_region_get(obj, &x, &y, &w, &h);
241 elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
245 _focus_region_hook(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
247 Widget_Data *wd = elm_widget_data_get(obj);
249 elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
253 _sizing_eval(Evas_Object *obj)
255 Widget_Data *wd = elm_widget_data_get(obj);
256 Evas_Coord vw = 0, vh = 0, minw = 0, minh = 0, maxw = 0, maxh = 0, w, h, vmw, vmh;
257 double xw = 0.0, yw = 0.0;
262 evas_object_size_hint_min_get(wd->content, &minw, &minh);
263 evas_object_size_hint_max_get(wd->content, &maxw, &maxh);
264 evas_object_size_hint_weight_get(wd->content, &xw, &yw);
268 elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh);
271 if ((minw > 0) && (vw < minw)) vw = minw;
272 else if ((maxw > 0) && (vw > maxw)) vw = maxw;
274 else if (minw > 0) vw = minw;
277 if ((minh > 0) && (vh < minh)) vh = minh;
278 else if ((maxh > 0) && (vh > maxh)) vh = maxh;
280 else if (minh > 0) vh = minh;
281 if (wd->content) evas_object_resize(wd->content, vw, vh);
284 edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
285 if (wd->min_w) w = vmw + minw;
286 if (wd->min_h) h = vmh + minh;
287 evas_object_size_hint_max_get(obj, &maxw, &maxh);
288 if ((maxw > 0) && (w > maxw)) w = maxw;
289 if ((maxh > 0) && (h > maxh)) h = maxh;
290 evas_object_size_hint_min_set(obj, w, h);
295 _changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
301 _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
303 Widget_Data *wd = elm_widget_data_get(obj);
304 Evas_Object *sub = event_info;
307 if (sub == wd->content)
309 elm_widget_on_show_region_hook_set(wd->content, NULL, NULL);
310 evas_object_event_callback_del_full (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
311 _changed_size_hints, obj);
315 else if (sub == wd->scr)
320 _hold_on(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
322 Widget_Data *wd = elm_widget_data_get(obj);
326 elm_smart_scroller_hold_set(wd->scr, 1);
330 _hold_off(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
332 Widget_Data *wd = elm_widget_data_get(obj);
336 elm_smart_scroller_hold_set(wd->scr, 0);
340 _freeze_on(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
342 Widget_Data *wd = elm_widget_data_get(obj);
346 elm_smart_scroller_freeze_set(wd->scr, 1);
350 _freeze_off(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
352 Widget_Data *wd = elm_widget_data_get(obj);
356 elm_smart_scroller_freeze_set(wd->scr, 0);
360 _resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
366 _edge_left(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
368 evas_object_smart_callback_call(data, SIG_EDGE_LEFT, NULL);
372 _edge_right(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
374 evas_object_smart_callback_call(data, SIG_EDGE_RIGHT, NULL);
378 _edge_top(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
380 evas_object_smart_callback_call(data, SIG_EDGE_TOP, NULL);
384 _edge_bottom(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
386 evas_object_smart_callback_call(data, SIG_EDGE_BOTTOM, NULL);
390 _scroll(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
392 evas_object_smart_callback_call(data, SIG_SCROLL, NULL);
396 _scroll_anim_start(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
398 evas_object_smart_callback_call(data, SIG_SCROLL_ANIM_START, NULL);
402 _scroll_anim_stop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
404 evas_object_smart_callback_call(data, SIG_SCROLL_ANIM_STOP, NULL);
408 _scroll_drag_start(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
410 evas_object_smart_callback_call(data, SIG_SCROLL_DRAG_START, NULL);
414 _scroll_drag_stop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
416 evas_object_smart_callback_call(data, SIG_SCROLL_DRAG_STOP, NULL);
420 _elm_scroller_edje_object_get(Evas_Object *obj)
422 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
423 Widget_Data *wd = elm_widget_data_get(obj);
424 if (!wd) return NULL;
425 return elm_smart_scroller_edje_object_get(wd->scr);
429 _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
431 ELM_CHECK_WIDTYPE(obj, widtype);
433 if (part && strcmp(part, "default")) return;
434 wd = elm_widget_data_get(obj);
436 if (wd->content == content) return;
437 if (wd->content) evas_object_del(wd->content);
438 wd->content = content;
441 elm_widget_on_show_region_hook_set(content, _show_region_hook, obj);
442 elm_widget_sub_object_add(obj, content);
444 elm_smart_scroller_child_set(wd->scr, content);
445 evas_object_event_callback_add(content,
446 EVAS_CALLBACK_CHANGED_SIZE_HINTS,
447 _changed_size_hints, obj);
453 _content_get_hook(const Evas_Object *obj, const char *part)
455 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
457 if (part && strcmp(part, "default")) return NULL;
458 wd = elm_widget_data_get(obj);
459 if (!wd) return NULL;
464 _content_unset_hook(Evas_Object *obj, const char *part)
466 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
468 Evas_Object *content;
469 if (part && strcmp(part, "default")) return NULL;
470 wd = elm_widget_data_get(obj);
471 if (!wd) return NULL;
472 if (!wd->content) return NULL;
473 content = wd->content;
474 elm_widget_sub_object_del(obj, wd->content);
475 evas_object_event_callback_del_full(wd->content,
476 EVAS_CALLBACK_CHANGED_SIZE_HINTS,
477 _changed_size_hints, obj);
478 edje_object_part_unswallow(elm_smart_scroller_edje_object_get(wd->scr),
485 elm_scroller_add(Evas_Object *parent)
490 Evas_Coord minw, minh;
492 ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
494 ELM_SET_WIDTYPE(widtype, "scroller");
495 elm_widget_type_set(obj, "scroller");
496 elm_widget_sub_object_add(parent, obj);
497 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
498 elm_widget_data_set(obj, wd);
499 elm_widget_del_hook_set(obj, _del_hook);
500 elm_widget_theme_hook_set(obj, _theme_hook);
501 elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
502 elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
503 elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
504 elm_widget_focus_next_hook_set(obj, _elm_scroller_focus_next_hook);
505 elm_widget_can_focus_set(obj, EINA_TRUE);
506 elm_widget_event_hook_set(obj, _event_hook);
507 elm_widget_focus_region_hook_set(obj, _focus_region_hook);
508 elm_widget_content_set_hook_set(obj, _content_set_hook);
509 elm_widget_content_get_hook_set(obj, _content_get_hook);
510 elm_widget_content_unset_hook_set(obj, _content_unset_hook);
512 wd->widget_name = eina_stringshare_add("scroller");
513 wd->widget_base = eina_stringshare_add("base");
515 wd->scr = elm_smart_scroller_add(e);
516 elm_smart_scroller_widget_set(wd->scr, obj);
518 elm_widget_resize_object_set(obj, wd->scr);
519 evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
520 _changed_size_hints, obj);
522 edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), &minw, &minh);
523 evas_object_size_hint_min_set(obj, minw, minh);
524 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, obj);
526 evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
527 evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
528 evas_object_smart_callback_add(obj, "scroll-hold-off", _hold_off, obj);
529 evas_object_smart_callback_add(obj, "scroll-freeze-on", _freeze_on, obj);
530 evas_object_smart_callback_add(obj, "scroll-freeze-off", _freeze_off, obj);
532 evas_object_smart_callback_add(wd->scr, "edge,left", _edge_left, obj);
533 evas_object_smart_callback_add(wd->scr, "edge,right", _edge_right, obj);
534 evas_object_smart_callback_add(wd->scr, "edge,top", _edge_top, obj);
535 evas_object_smart_callback_add(wd->scr, "edge,bottom", _edge_bottom, obj);
536 evas_object_smart_callback_add(wd->scr, "scroll", _scroll, obj);
537 evas_object_smart_callback_add(wd->scr, "animate,start", _scroll_anim_start, obj);
538 evas_object_smart_callback_add(wd->scr, "animate,stop", _scroll_anim_stop, obj);
539 evas_object_smart_callback_add(wd->scr, "drag,start", _scroll_drag_start, obj);
540 evas_object_smart_callback_add(wd->scr, "drag,stop", _scroll_drag_stop, obj);
544 // TODO: convert Elementary to subclassing of Evas_Smart_Class
545 // TODO: and save some bytes, making descriptions per-class and not instance!
546 evas_object_smart_callbacks_descriptions_set(obj, _signals);
547 _mirrored_set(obj, elm_widget_mirrored_get(obj));
552 elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
554 _content_set_hook(obj, NULL, content);
558 elm_scroller_content_get(const Evas_Object *obj)
560 return _content_get_hook(obj, NULL);
564 elm_scroller_content_unset(Evas_Object *obj)
566 return _content_unset_hook(obj, NULL);
570 elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base)
572 ELM_CHECK_WIDTYPE(obj, widtype);
573 Widget_Data *wd = elm_widget_data_get(obj);
575 EINA_SAFETY_ON_NULL_RETURN(widget);
576 EINA_SAFETY_ON_NULL_RETURN(base);
577 if (eina_stringshare_replace(&wd->widget_name, widget) |
578 eina_stringshare_replace(&wd->widget_base, base))
583 elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h)
585 ELM_CHECK_WIDTYPE(obj, widtype);
586 Widget_Data *wd = elm_widget_data_get(obj);
594 elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
596 ELM_CHECK_WIDTYPE(obj, widtype);
597 Widget_Data *wd = elm_widget_data_get(obj);
598 if ((!wd) || (!wd->scr)) return;
599 elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
603 elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
605 ELM_CHECK_WIDTYPE(obj, widtype);
606 Widget_Data *wd = elm_widget_data_get(obj);
607 if ((!wd) || (!wd->scr)) return;
608 if ((policy_h >= ELM_SCROLLER_POLICY_LAST) ||
609 (policy_v >= ELM_SCROLLER_POLICY_LAST))
611 elm_smart_scroller_policy_set(wd->scr, policy_h, policy_v);
615 elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
617 ELM_CHECK_WIDTYPE(obj, widtype);
618 Widget_Data *wd = elm_widget_data_get(obj);
619 if ((!wd) || (!wd->scr)) return;
620 elm_smart_scroller_policy_get(wd->scr,
621 (Elm_Smart_Scroller_Policy *) policy_h,
622 (Elm_Smart_Scroller_Policy *) policy_v);
626 elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
628 ELM_CHECK_WIDTYPE(obj, widtype);
629 Widget_Data *wd = elm_widget_data_get(obj);
630 if ((!wd) || (!wd->scr)) return;
631 if ((x) || (y)) elm_smart_scroller_child_pos_get(wd->scr, x, y);
632 if ((w) || (h)) elm_smart_scroller_child_viewport_size_get(wd->scr, w, h);
636 elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
638 ELM_CHECK_WIDTYPE(obj, widtype);
639 Widget_Data *wd = elm_widget_data_get(obj);
641 evas_object_geometry_get(wd->content, NULL, NULL, w, h);
645 elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
647 ELM_CHECK_WIDTYPE(obj, widtype);
648 Widget_Data *wd = elm_widget_data_get(obj);
649 if ((!wd) || (!wd->scr)) return;
650 elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
654 elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
656 ELM_CHECK_WIDTYPE(obj, widtype);
657 Widget_Data *wd = elm_widget_data_get(obj);
659 elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce);
663 elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel)
665 ELM_CHECK_WIDTYPE(obj, widtype);
666 Widget_Data *wd = elm_widget_data_get(obj);
668 wd->pagerel_h = h_pagerel;
669 wd->pagerel_v = v_pagerel;
671 elm_smart_scroller_paging_set(wd->scr, wd->pagerel_h, wd->pagerel_v,
672 wd->pagesize_h, wd->pagesize_v);
676 elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize)
678 ELM_CHECK_WIDTYPE(obj, widtype);
679 Widget_Data *wd = elm_widget_data_get(obj);
681 wd->pagesize_h = h_pagesize;
682 wd->pagesize_v = v_pagesize;
684 elm_smart_scroller_paging_set(wd->scr, wd->pagerel_h, wd->pagerel_v,
685 wd->pagesize_h, wd->pagesize_v);
689 elm_scroller_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
691 ELM_CHECK_WIDTYPE(obj, widtype);
692 Widget_Data *wd = elm_widget_data_get(obj);
695 elm_smart_scroller_current_page_get(wd->scr, h_pagenumber, v_pagenumber);
699 elm_scroller_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
701 ELM_CHECK_WIDTYPE(obj, widtype);
702 Widget_Data *wd = elm_widget_data_get(obj);
705 elm_smart_scroller_last_page_get(wd->scr, h_pagenumber, v_pagenumber);
709 elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber)
711 ELM_CHECK_WIDTYPE(obj, widtype);
712 Widget_Data *wd = elm_widget_data_get(obj);
715 elm_smart_scroller_page_show(wd->scr, h_pagenumber, v_pagenumber);
719 elm_scroller_page_bring_in(Evas_Object *obj, int h_pagenumber, int v_pagenumber)
721 ELM_CHECK_WIDTYPE(obj, widtype);
722 Widget_Data *wd = elm_widget_data_get(obj);
725 elm_smart_scroller_page_bring_in(wd->scr, h_pagenumber, v_pagenumber);
729 elm_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
731 ELM_CHECK_WIDTYPE(obj, widtype);
732 Widget_Data *wd = elm_widget_data_get(obj);
733 if ((!wd) || (!wd->scr)) return;
734 elm_smart_scroller_region_bring_in(wd->scr, x, y, w, h);
738 elm_scroller_propagate_events_set(Evas_Object *obj, Eina_Bool propagation)
740 ELM_CHECK_WIDTYPE(obj, widtype);
741 Widget_Data *wd = elm_widget_data_get(obj);
745 elm_smart_scroller_propagate_events_set(wd->scr, propagation);
747 evas_object_propagate_events_set(wd->scr, propagation);
748 >>>>>>> remotes/origin/upstream
752 elm_scroller_propagate_events_get(const Evas_Object *obj)
754 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
755 Widget_Data *wd = elm_widget_data_get(obj);
756 if (!wd) return EINA_FALSE;
759 return elm_smart_scroller_propagate_events_get(wd->scr);
761 return evas_object_propagate_events_get(wd->scr);
762 >>>>>>> remotes/origin/upstream
766 elm_scroller_gravity_set(Evas_Object *obj, double x, double y)
768 ELM_CHECK_WIDTYPE(obj, widtype);
769 Widget_Data *wd = elm_widget_data_get(obj);
772 elm_smart_scroller_gravity_set(wd->scr, x, y);
776 elm_scroller_gravity_get(const Evas_Object *obj, double *x, double *y)
778 ELM_CHECK_WIDTYPE(obj, widtype);
779 Widget_Data *wd = elm_widget_data_get(obj);
782 elm_smart_scroller_gravity_get(wd->scr, x, y);
787 elm_scroller_page_move_set(Evas_Object *obj, Eina_Bool set)
792 >>>>>>> remotes/origin/upstream