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_can_focus_get(cur)) || (elm_widget_child_can_focus_get(cur)))
196 return elm_widget_focus_next_get(cur, dir, next);
199 *next = (Evas_Object *)obj;
200 return !elm_widget_focus_get(obj);
204 _signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
206 Widget_Data *wd = elm_widget_data_get(obj);
208 edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
213 _signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
215 Widget_Data *wd = elm_widget_data_get(obj);
217 edje_object_signal_callback_add(elm_smart_scroller_edje_object_get(wd->scr),
218 emission, source, func_cb, data);
222 _signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
224 Widget_Data *wd = elm_widget_data_get(obj);
225 edje_object_signal_callback_del_full(
226 elm_smart_scroller_edje_object_get(wd->scr), emission, source,
231 _show_region_hook(void *data, Evas_Object *obj)
233 Widget_Data *wd = elm_widget_data_get(data);
234 Evas_Coord x, y, w, h;
236 elm_widget_show_region_get(obj, &x, &y, &w, &h);
238 elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
242 _focus_region_hook(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
244 Widget_Data *wd = elm_widget_data_get(obj);
246 elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
250 _sizing_eval(Evas_Object *obj)
252 Widget_Data *wd = elm_widget_data_get(obj);
253 Evas_Coord vw = 0, vh = 0, minw = 0, minh = 0, maxw = 0, maxh = 0, w, h, vmw, vmh;
254 double xw = 0.0, yw = 0.0;
259 evas_object_size_hint_min_get(wd->content, &minw, &minh);
260 evas_object_size_hint_max_get(wd->content, &maxw, &maxh);
261 evas_object_size_hint_weight_get(wd->content, &xw, &yw);
265 elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh);
268 if ((minw > 0) && (vw < minw)) vw = minw;
269 else if ((maxw > 0) && (vw > maxw)) vw = maxw;
271 else if (minw > 0) vw = minw;
274 if ((minh > 0) && (vh < minh)) vh = minh;
275 else if ((maxh > 0) && (vh > maxh)) vh = maxh;
277 else if (minh > 0) vh = minh;
278 if (wd->content) evas_object_resize(wd->content, vw, vh);
281 edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
282 if (wd->min_w) w = vmw + minw;
283 if (wd->min_h) h = vmh + minh;
284 evas_object_size_hint_max_get(obj, &maxw, &maxh);
285 if ((maxw > 0) && (w > maxw)) w = maxw;
286 if ((maxh > 0) && (h > maxh)) h = maxh;
287 evas_object_size_hint_min_set(obj, w, h);
292 _changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
298 _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
300 Widget_Data *wd = elm_widget_data_get(obj);
301 Evas_Object *sub = event_info;
304 if (sub == wd->content)
306 elm_widget_on_show_region_hook_set(wd->content, NULL, NULL);
307 evas_object_event_callback_del_full (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
308 _changed_size_hints, obj);
312 else if (sub == wd->scr)
317 _hold_on(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
319 Widget_Data *wd = elm_widget_data_get(obj);
323 elm_smart_scroller_hold_set(wd->scr, 1);
327 _hold_off(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
329 Widget_Data *wd = elm_widget_data_get(obj);
333 elm_smart_scroller_hold_set(wd->scr, 0);
337 _freeze_on(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
339 Widget_Data *wd = elm_widget_data_get(obj);
343 elm_smart_scroller_freeze_set(wd->scr, 1);
347 _freeze_off(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
349 Widget_Data *wd = elm_widget_data_get(obj);
353 elm_smart_scroller_freeze_set(wd->scr, 0);
357 _resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
363 _edge_left(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
365 evas_object_smart_callback_call(data, SIG_EDGE_LEFT, NULL);
369 _edge_right(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
371 evas_object_smart_callback_call(data, SIG_EDGE_RIGHT, NULL);
375 _edge_top(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
377 evas_object_smart_callback_call(data, SIG_EDGE_TOP, NULL);
381 _edge_bottom(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
383 evas_object_smart_callback_call(data, SIG_EDGE_BOTTOM, NULL);
387 _scroll(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
389 evas_object_smart_callback_call(data, SIG_SCROLL, NULL);
393 _scroll_anim_start(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
395 evas_object_smart_callback_call(data, SIG_SCROLL_ANIM_START, NULL);
399 _scroll_anim_stop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
401 evas_object_smart_callback_call(data, SIG_SCROLL_ANIM_STOP, NULL);
405 _scroll_drag_start(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
407 evas_object_smart_callback_call(data, SIG_SCROLL_DRAG_START, NULL);
411 _scroll_drag_stop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
413 evas_object_smart_callback_call(data, SIG_SCROLL_DRAG_STOP, NULL);
417 elm_scroller_add(Evas_Object *parent)
422 Evas_Coord minw, minh;
424 ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
426 ELM_SET_WIDTYPE(widtype, "scroller");
427 elm_widget_type_set(obj, "scroller");
428 elm_widget_sub_object_add(parent, obj);
429 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
430 elm_widget_data_set(obj, wd);
431 elm_widget_del_hook_set(obj, _del_hook);
432 elm_widget_theme_hook_set(obj, _theme_hook);
433 elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
434 elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
435 elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
436 elm_widget_focus_next_hook_set(obj, _elm_scroller_focus_next_hook);
437 elm_widget_can_focus_set(obj, EINA_TRUE);
438 elm_widget_event_hook_set(obj, _event_hook);
439 elm_widget_focus_region_hook_set(obj, _focus_region_hook);
441 wd->widget_name = eina_stringshare_add("scroller");
442 wd->widget_base = eina_stringshare_add("base");
444 wd->scr = elm_smart_scroller_add(e);
445 elm_smart_scroller_widget_set(wd->scr, obj);
447 elm_widget_resize_object_set(obj, wd->scr);
448 evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
449 _changed_size_hints, obj);
451 edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), &minw, &minh);
452 evas_object_size_hint_min_set(obj, minw, minh);
453 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, obj);
455 evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
456 evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
457 evas_object_smart_callback_add(obj, "scroll-hold-off", _hold_off, obj);
458 evas_object_smart_callback_add(obj, "scroll-freeze-on", _freeze_on, obj);
459 evas_object_smart_callback_add(obj, "scroll-freeze-off", _freeze_off, obj);
461 evas_object_smart_callback_add(wd->scr, "edge,left", _edge_left, obj);
462 evas_object_smart_callback_add(wd->scr, "edge,right", _edge_right, obj);
463 evas_object_smart_callback_add(wd->scr, "edge,top", _edge_top, obj);
464 evas_object_smart_callback_add(wd->scr, "edge,bottom", _edge_bottom, obj);
465 evas_object_smart_callback_add(wd->scr, "scroll", _scroll, obj);
466 evas_object_smart_callback_add(wd->scr, "animate,start", _scroll_anim_start, obj);
467 evas_object_smart_callback_add(wd->scr, "animate,stop", _scroll_anim_stop, obj);
468 evas_object_smart_callback_add(wd->scr, "drag,start", _scroll_drag_start, obj);
469 evas_object_smart_callback_add(wd->scr, "drag,stop", _scroll_drag_stop, obj);
473 // TODO: convert Elementary to subclassing of Evas_Smart_Class
474 // TODO: and save some bytes, making descriptions per-class and not instance!
475 evas_object_smart_callbacks_descriptions_set(obj, _signals);
476 _mirrored_set(obj, elm_widget_mirrored_get(obj));
481 _elm_scroller_edje_object_get(Evas_Object *obj)
483 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
484 Widget_Data *wd = elm_widget_data_get(obj);
485 if (!wd) return NULL;
486 return elm_smart_scroller_edje_object_get(wd->scr);
490 elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
492 ELM_CHECK_WIDTYPE(obj, widtype);
493 Widget_Data *wd = elm_widget_data_get(obj);
495 if (wd->content == content) return;
496 if (wd->content) evas_object_del(wd->content);
497 wd->content = content;
500 elm_widget_on_show_region_hook_set(content, _show_region_hook, obj);
501 elm_widget_sub_object_add(obj, content);
503 elm_smart_scroller_child_set(wd->scr, content);
504 evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
505 _changed_size_hints, obj);
511 elm_scroller_content_get(const Evas_Object *obj)
513 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
514 Widget_Data *wd = elm_widget_data_get(obj);
515 if (!wd) return NULL;
520 elm_scroller_content_unset(Evas_Object *obj)
522 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
523 Widget_Data *wd = elm_widget_data_get(obj);
524 Evas_Object *content;
525 if (!wd) return NULL;
526 if (!wd->content) return NULL;
527 content = wd->content;
528 elm_widget_sub_object_del(obj, wd->content);
529 edje_object_part_unswallow(elm_smart_scroller_edje_object_get(wd->scr), wd->content);
535 elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base)
537 ELM_CHECK_WIDTYPE(obj, widtype);
538 Widget_Data *wd = elm_widget_data_get(obj);
540 EINA_SAFETY_ON_NULL_RETURN(widget);
541 EINA_SAFETY_ON_NULL_RETURN(base);
542 if (eina_stringshare_replace(&wd->widget_name, widget) |
543 eina_stringshare_replace(&wd->widget_base, base))
548 elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h)
550 ELM_CHECK_WIDTYPE(obj, widtype);
551 Widget_Data *wd = elm_widget_data_get(obj);
559 elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
561 ELM_CHECK_WIDTYPE(obj, widtype);
562 Widget_Data *wd = elm_widget_data_get(obj);
563 if ((!wd) || (!wd->scr)) return;
564 elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
568 elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
570 ELM_CHECK_WIDTYPE(obj, widtype);
571 Widget_Data *wd = elm_widget_data_get(obj);
572 if ((!wd) || (!wd->scr)) return;
573 if ((policy_h >= ELM_SCROLLER_POLICY_LAST) ||
574 (policy_v >= ELM_SCROLLER_POLICY_LAST))
576 elm_smart_scroller_policy_set(wd->scr, policy_h, policy_v);
580 elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
582 ELM_CHECK_WIDTYPE(obj, widtype);
583 Widget_Data *wd = elm_widget_data_get(obj);
584 if ((!wd) || (!wd->scr)) return;
585 elm_smart_scroller_policy_get(wd->scr,
586 (Elm_Smart_Scroller_Policy *) policy_h,
587 (Elm_Smart_Scroller_Policy *) policy_v);
591 elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
593 ELM_CHECK_WIDTYPE(obj, widtype);
594 Widget_Data *wd = elm_widget_data_get(obj);
595 if ((!wd) || (!wd->scr)) return;
596 if ((x) || (y)) elm_smart_scroller_child_pos_get(wd->scr, x, y);
597 if ((w) || (h)) elm_smart_scroller_child_viewport_size_get(wd->scr, w, h);
601 elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
603 ELM_CHECK_WIDTYPE(obj, widtype);
604 Widget_Data *wd = elm_widget_data_get(obj);
606 evas_object_geometry_get(wd->content, NULL, NULL, w, h);
610 elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
612 ELM_CHECK_WIDTYPE(obj, widtype);
613 Widget_Data *wd = elm_widget_data_get(obj);
614 if ((!wd) || (!wd->scr)) return;
615 elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
619 elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
621 ELM_CHECK_WIDTYPE(obj, widtype);
622 Widget_Data *wd = elm_widget_data_get(obj);
624 elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce);
628 elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel)
630 ELM_CHECK_WIDTYPE(obj, widtype);
631 Widget_Data *wd = elm_widget_data_get(obj);
633 wd->pagerel_h = h_pagerel;
634 wd->pagerel_v = v_pagerel;
636 elm_smart_scroller_paging_set(wd->scr, wd->pagerel_h, wd->pagerel_v,
637 wd->pagesize_h, wd->pagesize_v);
641 elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize)
643 ELM_CHECK_WIDTYPE(obj, widtype);
644 Widget_Data *wd = elm_widget_data_get(obj);
646 wd->pagesize_h = h_pagesize;
647 wd->pagesize_v = v_pagesize;
649 elm_smart_scroller_paging_set(wd->scr, wd->pagerel_h, wd->pagerel_v,
650 wd->pagesize_h, wd->pagesize_v);
654 elm_scroller_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
656 ELM_CHECK_WIDTYPE(obj, widtype);
657 Widget_Data *wd = elm_widget_data_get(obj);
660 elm_smart_scroller_current_page_get(wd->scr, h_pagenumber, v_pagenumber);
664 elm_scroller_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
666 ELM_CHECK_WIDTYPE(obj, widtype);
667 Widget_Data *wd = elm_widget_data_get(obj);
670 elm_smart_scroller_last_page_get(wd->scr, h_pagenumber, v_pagenumber);
674 elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber)
676 ELM_CHECK_WIDTYPE(obj, widtype);
677 Widget_Data *wd = elm_widget_data_get(obj);
680 elm_smart_scroller_page_show(wd->scr, h_pagenumber, v_pagenumber);
684 elm_scroller_page_bring_in(Evas_Object *obj, int h_pagenumber, int v_pagenumber)
686 ELM_CHECK_WIDTYPE(obj, widtype);
687 Widget_Data *wd = elm_widget_data_get(obj);
690 elm_smart_scroller_page_bring_in(wd->scr, h_pagenumber, v_pagenumber);
694 elm_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
696 ELM_CHECK_WIDTYPE(obj, widtype);
697 Widget_Data *wd = elm_widget_data_get(obj);
698 if ((!wd) || (!wd->scr)) return;
699 elm_smart_scroller_region_bring_in(wd->scr, x, y, w, h);
703 elm_scroller_propagate_events_set(Evas_Object *obj, Eina_Bool propagation)
705 ELM_CHECK_WIDTYPE(obj, widtype);
706 Widget_Data *wd = elm_widget_data_get(obj);
709 evas_object_propagate_events_set(wd->scr, propagation);
713 elm_scroller_propagate_events_get(const Evas_Object *obj)
715 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
716 Widget_Data *wd = elm_widget_data_get(obj);
717 if (!wd) return EINA_FALSE;
719 return evas_object_propagate_events_get(wd->scr);