Merge "elementary/naviframe - reverted elm_layout -> edje_object"
[framework/uifw/elementary.git] / src / lib / elm_scroller.c
index 7b81478..40c04aa 100644 (file)
@@ -1,35 +1,7 @@
 #include <Elementary.h>
 #include "elm_priv.h"
+#include "els_scroller.h"
 
-/**
- * @defgroup Scroller Scroller
- *
- * A scroller holds a single object and "scrolls it around". This means that
- * it allows the user to use a scrollbar (or a finger) to drag the viewable
- * region around, allowing to move through a much larger object that is
- * contained in the scroller. The scroiller will always have a small minimum
- * size by default as it won't be limited by the contents of the scroller.
- *
- * Signals that you can add callbacks for are:
- *
- * edge,left - the left edge of the content has been reached
- *
- * edge,right - the right edge of the content has been reached
- *
- * edge,top - the top edge of the content has been reached
- *
- * edge,bottom - the bottom edge of the content has been reached
- *
- * scroll - the content has been scrolled (moved)
- *
- * scroll,anim,start - scrolling animation has started
- *
- * scroll,anim,stop - scrolling animation has stopped
- *
- * scroll,drag,start - dragging the contents around has started
- *
- * scroll,drag,stop - dragging the contents around has stopped
- */
 typedef struct _Widget_Data Widget_Data;
 
 struct _Widget_Data
@@ -129,17 +101,17 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
      }
    else if ((!strcmp(ev->keyname, "Prior")) || (!strcmp(ev->keyname, "KP_Prior")))
      {
-       if (page_y < 0)
-         y -= -(page_y * v_h) / 100;
-       else
-           y -= page_y;
+        if (page_y < 0)
+          y -= -(page_y * v_h) / 100;
+        else
+          y -= page_y;
      }
    else if ((!strcmp(ev->keyname, "Next")) || (!strcmp(ev->keyname, "KP_Next")))
      {
-       if (page_y < 0)
-         y += -(page_y * v_h) / 100;
-       else
-         y += page_y;
+        if (page_y < 0)
+          y += -(page_y * v_h) / 100;
+        else
+          y += page_y;
      }
    else return EINA_FALSE;
 
@@ -194,10 +166,10 @@ _theme_hook(Evas_Object *obj)
         const char *str;
 
         _mirrored_set(obj, elm_widget_mirrored_get(obj));
-        elm_smart_scroller_object_theme_set(obj, wd->scr, 
+        elm_smart_scroller_object_theme_set(obj, wd->scr,
                                             wd->widget_name, wd->widget_base,
                                             elm_widget_style_get(obj));
-//        edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
+        //        edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
         edj = elm_smart_scroller_edje_object_get(wd->scr);
         str = edje_object_data_get(edj, "focus_highlight");
         if ((str) && (!strcmp(str, "on")))
@@ -220,8 +192,11 @@ _elm_scroller_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, E
    cur = wd->content;
 
    /* Try Focus cycle in subitem */
-   if ((elm_widget_can_focus_get(cur)) || (elm_widget_child_can_focus_get(cur)))
-      return elm_widget_focus_next_get(cur, dir, next);
+   if (elm_widget_focus_get(obj))
+     {
+        if ((elm_widget_can_focus_get(cur)) || (elm_widget_child_can_focus_get(cur)))
+          return elm_widget_focus_next_get(cur, dir, next);
+     }
 
    /* Return */
    *next = (Evas_Object *)obj;
@@ -234,25 +209,25 @@ _signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
-        emission, source);
+                           emission, source);
 }
 
 static void
-_signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
+_signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    edje_object_signal_callback_add(elm_smart_scroller_edje_object_get(wd->scr),
-        emission, source, func_cb, data);
+                                   emission, source, func_cb, data);
 }
 
 static void
-_signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
+_signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    edje_object_signal_callback_del_full(
-        elm_smart_scroller_edje_object_get(wd->scr), emission, source,
-        func_cb, data);
+      elm_smart_scroller_edje_object_get(wd->scr), emission, source,
+      func_cb, data);
 }
 
 static void
@@ -278,8 +253,8 @@ static void
 _sizing_eval(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   Evas_Coord  vw, vh, minw, minh, maxw, maxh, w, h, vmw, vmh;
-   double xw, yw;
+   Evas_Coord  vw, vh, minw = 0, minh = 0, maxw = 0, maxh = 0, w, h, vmw, vmh;
+   double xw = 0.0, yw = 0.0;
 
    if (!wd) return;
    if (wd->content)
@@ -331,11 +306,11 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
    if (!wd) return;
    if (sub == wd->content)
      {
-       elm_widget_on_show_region_hook_set(wd->content, NULL, NULL);
-       evas_object_event_callback_del_full (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-           _changed_size_hints, obj);
-       wd->content = NULL;
-       _sizing_eval(obj);
+        elm_widget_on_show_region_hook_set(wd->content, NULL, NULL);
+        evas_object_event_callback_del_full (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                             _changed_size_hints, obj);
+        wd->content = NULL;
+        _sizing_eval(obj);
      }
    else if (sub == wd->scr)
      wd->scr = NULL;
@@ -441,14 +416,71 @@ _scroll_drag_stop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
    evas_object_smart_callback_call(data, SIG_SCROLL_DRAG_STOP, NULL);
 }
 
-/**
- * Add a new scroller to the parent
- *
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
- *
- * @ingroup Scroller
- */
+Evas_Object *
+_elm_scroller_edje_object_get(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return elm_smart_scroller_edje_object_get(wd->scr);
+}
+
+static void
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd;
+   if (part && strcmp(part, "default")) return;
+   wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->content == content) return;
+   if (wd->content) evas_object_del(wd->content);
+   wd->content = content;
+   if (content)
+     {
+        elm_widget_on_show_region_hook_set(content, _show_region_hook, obj);
+        elm_widget_sub_object_add(obj, content);
+        if (wd->scr)
+          elm_smart_scroller_child_set(wd->scr, content);
+        evas_object_event_callback_add(content,
+                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+     }
+   _sizing_eval(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd;
+   if (part && strcmp(part, "default")) return NULL;
+   wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return wd->content;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd;
+   Evas_Object *content;
+   if (part && strcmp(part, "default")) return NULL;
+   wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   content = wd->content;
+   elm_widget_sub_object_del(obj, wd->content);
+   evas_object_event_callback_del_full(wd->content,
+                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+   edje_object_part_unswallow(elm_smart_scroller_edje_object_get(wd->scr),
+                              wd->content);
+   wd->content = NULL;
+   return content;
+}
+
 EAPI Evas_Object *
 elm_scroller_add(Evas_Object *parent)
 {
@@ -457,12 +489,8 @@ elm_scroller_add(Evas_Object *parent)
    Widget_Data *wd;
    Evas_Coord minw, minh;
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
+   ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
 
-   wd = ELM_NEW(Widget_Data);
-   e = evas_object_evas_get(parent);
-   if (!e) return NULL;
-   obj = elm_widget_add(e);
    ELM_SET_WIDTYPE(widtype, "scroller");
    elm_widget_type_set(obj, "scroller");
    elm_widget_sub_object_add(parent, obj);
@@ -477,16 +505,19 @@ elm_scroller_add(Evas_Object *parent)
    elm_widget_can_focus_set(obj, EINA_TRUE);
    elm_widget_event_hook_set(obj, _event_hook);
    elm_widget_focus_region_hook_set(obj, _focus_region_hook);
+   elm_widget_content_set_hook_set(obj, _content_set_hook);
+   elm_widget_content_get_hook_set(obj, _content_get_hook);
+   elm_widget_content_unset_hook_set(obj, _content_unset_hook);
 
    wd->widget_name = eina_stringshare_add("scroller");
    wd->widget_base = eina_stringshare_add("base");
-   
+
    wd->scr = elm_smart_scroller_add(e);
    elm_smart_scroller_widget_set(wd->scr, obj);
    _theme_hook(obj);
    elm_widget_resize_object_set(obj, wd->scr);
    evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                 _changed_size_hints, obj);
+                                  _changed_size_hints, obj);
 
    edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), &minw, &minh);
    evas_object_size_hint_min_set(obj, minw, minh);
@@ -517,101 +548,24 @@ elm_scroller_add(Evas_Object *parent)
    return obj;
 }
 
-Evas_Object *
-_elm_scroller_edje_object_get(Evas_Object *obj)
-{
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return NULL;
-   return elm_smart_scroller_edje_object_get(wd->scr);
-}
-
-/**
- * Set the content of the scroller widget (the object to be scrolled around).
- *
- * Once the content object is set, a previously set one will be deleted.
- * If you want to keep that old content object, use the
- * elm_scroller_content_unset() function.
- *
- * @param obj The scroller object
- * @param content The new content object
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
-   if (wd->content == content) return;
-   if (wd->content) evas_object_del(wd->content);
-   wd->content = content;
-   if (content)
-     {
-       elm_widget_on_show_region_hook_set(content, _show_region_hook, obj);
-       elm_widget_sub_object_add(obj, content);
-        if (wd->scr)
-          elm_smart_scroller_child_set(wd->scr, content);
-       evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                      _changed_size_hints, obj);
-     }
-   _sizing_eval(obj);
+   _content_set_hook(obj, NULL, content);
 }
 
-/**
- * Get the content of the scroller widget
- *
- * Return the content object which is set for this widget
- *
- * @param obj The slider object
- * @return The content that is being used
- *
- * @ingroup Scroller
- */
 EAPI Evas_Object *
 elm_scroller_content_get(const Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return NULL;
-   return wd->content;
+   return _content_get_hook(obj, NULL);
 }
 
-/**
- * Unset the content of the scroller widget
- *
- * Unparent and return the content object which was set for this widget
- *
- * @param obj The slider object
- * @return The content that was being used
- *
- * @ingroup Scroller
- */
 EAPI Evas_Object *
 elm_scroller_content_unset(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   Evas_Object *content;
-   if (!wd) return NULL;
-   if (!wd->content) return NULL;
-   content = wd->content;
-   elm_widget_sub_object_del(obj, wd->content);
-   edje_object_part_unswallow(wd->scr, wd->content);
-   wd->content = NULL;
-   return content;
+   return _content_unset_hook(obj, NULL);
 }
 
-/**
- * Set custom theme elements for the scroller
- * 
- * @param obj The scroller object
- * @param widget The widget name to use (default is "scroller")
- * @param base The base name to use (default is "base")
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base)
 {
@@ -625,19 +579,6 @@ elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget,
      _theme_hook(obj);
 }
 
-/**
- * Make the scroller minimum size limited to the minimum size of the content
- *
- * By default the scroller will be as small as its design allows, irrespective
- * of its content. This will make the scroller minimum size the right size
- * horizontally and/or vertically to perfectly fit its content.
- *
- * @param obj The scroller object
- * @param w Enable limiting minimum size horizontally
- * @param h Enable limiting minimum size vertically
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h)
 {
@@ -649,21 +590,6 @@ elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h)
    _sizing_eval(obj);
 }
 
-/**
- * Show a specific virtual region within the scroller content object
- *
- * This will ensure all (or part if it does not fit) of the designated
- * region in the virtual content object (0, 0 starting at the top-left of the
- * virtual content object) is shown within the scroller.
- *
- * @param obj The scroller object
- * @param x X coordinate of the region
- * @param y Y coordinate of the region
- * @param w Width of the region
- * @param h Height of the region
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 {
@@ -673,21 +599,6 @@ elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coor
    elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
 }
 
-/**
- * Set the scroller scrollbar policy
- *
- * This sets the scrollbar visibility policy for the given scroller.
- * ELM_SMART_SCROLLER_POLICY_AUTO means the scrollber is made visible if it
- * is needed, and otherwise kept hidden. ELM_SMART_SCROLLER_POLICY_ON turns
- * it on all the time, and ELM_SMART_SCROLLER_POLICY_OFF always keeps it off.
- * This applies respectively for the horizontal and vertical scrollbars.
- *
- * @param obj The scroller object
- * @param policy_h Horizontal scrollbar policy
- * @param policy_v Vertical scrollbar policy
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
 {
@@ -695,9 +606,9 @@ elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scro
    Widget_Data *wd = elm_widget_data_get(obj);
    const Elm_Scroller_Policy map[3] =
      {
-       ELM_SMART_SCROLLER_POLICY_AUTO,
-         ELM_SMART_SCROLLER_POLICY_ON,
-         ELM_SMART_SCROLLER_POLICY_OFF
+        ELM_SMART_SCROLLER_POLICY_AUTO,
+        ELM_SMART_SCROLLER_POLICY_ON,
+        ELM_SMART_SCROLLER_POLICY_OFF
      };
    if ((!wd) || (!wd->scr)) return;
    if ((policy_h >= 3) || (policy_v >= 3)) return;
@@ -715,21 +626,6 @@ elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, E
                                  (Elm_Smart_Scroller_Policy *) policy_v);
 }
 
-/**
- * Get the currently visible content region
- *
- * This gets the current region in the content object that is visible through
- * the scroller. Also see elm_scroller_region_show(). The region co-ordinates
- * are returned in the @p x, @p y, @p w, @p h values pointed to.
- *
- * @param obj The scroller object
- * @param x X coordinate of the region
- * @param y Y coordinate of the region
- * @param w Width of the region
- * @param h Height of the region
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 {
@@ -740,19 +636,6 @@ elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Ev
    if ((w) || (h)) elm_smart_scroller_child_viewport_size_get(wd->scr, w, h);
 }
 
-/**
- * Get the size of the content child object
- *
- * This gets the size of the child object of the scroller. Actually the
- * content of a scroller doesn't specifically need to be an actual object
- * as it can be virtual and defined purely by callbacks.
- *
- * @param obj The scroller object
- * @param w Width return
- * @param h Height return
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 {
@@ -762,20 +645,6 @@ elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h
    evas_object_geometry_get(wd->content, NULL, NULL, w, h);
 }
 
-/**
- * Set bouncing behavior
- *
- * When scrolling, the scroller may "bounce" when reaching an edge of the child
- * object. This is a visual way to indicate the end has been reached. This is
- * enabled by default for both axes. This will set if it is enabled for that
- * axis with the boolean parameters for each axis.
- *
- * @param obj The scroller object
- * @param h_bounce Will the scroller bounce horizontally or not
- * @param v_bounce Will the scroller bounce vertically or not
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
 {
@@ -785,15 +654,6 @@ elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce
    elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
 }
 
-/**
- * Get the bounce mode
- *
- * @param obj The Scroller object
- * @param h_bounce Allow bounce horizontally
- * @param v_bounce Allow bounce vertically
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
 {
@@ -803,26 +663,6 @@ elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *
    elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce);
 }
 
-/**
- * Set scroll page size relative to viewport size.
- *
- * The scroller is capable of limiting scrolling by the user to "pages". That
- * is to jump by and only show a "whole page" at a time as if the continuous
- * area of the scroller content is split into page sized pieces. This sets
- * the size of a page relative to the viewport of the scroller. 1.0 is "1
- * viewport" is size (horizontally or vertically). 0.0 turns it off in that
- * axis. This is mutually exclusive with page size
- * (see elm_scroller_page_size_set()  for more information). Likewise 0.5
- * is "half a viewport". Sane usable valus are normally between 0.0 and 1.0
- * including 1.0. If you only want 1 axis to be page "limited", use 0.0 for
- * the other axis.
- *
- * @param obj The scroller object
- * @param h_pagerel The horizontal page relative size
- * @param v_pagerel The vertical page relative size
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel)
 {
@@ -836,19 +676,6 @@ elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_page
                                    wd->pagesize_h, wd->pagesize_v);
 }
 
-/**
- * Set scroll page size.
- *
- * See also elm_scroller_page_relative_set(). This, instead of a page size
- * being relative to the viewport, sets it to an absolute fixed value, with
- * 0 turning it off for that axis.
- *
- * @param obj The scroller object
- * @param h_pagesize The horizontal page size
- * @param v_pagesize The vertical page size
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize)
 {
@@ -862,25 +689,46 @@ elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v
                                    wd->pagesize_h, wd->pagesize_v);
 }
 
-/**
- * Show a specific virtual region within the scroller content object.
- *
- * This will ensure all (or part if it does not fit) of the designated
- * region in the virtual content object (0, 0 starting at the top-left of the
- * virtual content object) is shown within the scroller. Unlike
- * elm_scroller_region_show(), this allow the scroller to "smoothly slide"
- * to this location (if configuration in general calls for transitions). It
- * may not jump immediately to the new location and make take a while and
- * show other content along the way.
- *
- * @param obj The scroller object
- * @param x X coordinate of the region
- * @param y Y coordinate of the region
- * @param w Width of the region
- * @param h Height of the region
- *
- * @ingroup Scroller
- */
+EAPI void
+elm_scroller_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->scr)
+     elm_smart_scroller_current_page_get(wd->scr, h_pagenumber, v_pagenumber);
+}
+
+EAPI void
+elm_scroller_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->scr)
+     elm_smart_scroller_last_page_get(wd->scr, h_pagenumber, v_pagenumber);
+}
+
+EAPI void
+elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->scr)
+     elm_smart_scroller_page_show(wd->scr, h_pagenumber, v_pagenumber);
+}
+
+EAPI void
+elm_scroller_page_bring_in(Evas_Object *obj, int h_pagenumber, int v_pagenumber)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->scr)
+     elm_smart_scroller_page_bring_in(wd->scr, h_pagenumber, v_pagenumber);
+}
+
 EAPI void
 elm_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 {
@@ -890,18 +738,6 @@ elm_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_
    elm_smart_scroller_region_bring_in(wd->scr, x, y, w, h);
 }
 
-
-/**
- * Set event propagation on a scroller
- *
- * This enables or disabled event propagation from the scroller content to
- * the scroller and its parent. By default event propagation is disabled.
- * 
- * @param obj The scroller object
- * @param propagation If propagation is enabled or not
- *
- * @ingroup Scroller
- */
 EAPI void
 elm_scroller_propagate_events_set(Evas_Object *obj, Eina_Bool propagation)
 {
@@ -909,20 +745,9 @@ elm_scroller_propagate_events_set(Evas_Object *obj, Eina_Bool propagation)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
 
-   evas_object_propagate_events_set(wd->scr, propagation);
+   elm_smart_scroller_propagate_events_set(wd->scr, propagation);
 }
 
-/**
- * Get event propagation for a scroller
- *
- * This gets the event propagation for a scroller. See 
- * elm_scroller_propagate_events_set() for more information
- * 
- * @param obj The scroller object
- * @return The propagation state
- *
- * @ingroup Scroller
- */
 EAPI Eina_Bool
 elm_scroller_propagate_events_get(const Evas_Object *obj)
 {
@@ -930,5 +755,31 @@ elm_scroller_propagate_events_get(const Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return EINA_FALSE;
 
-   return evas_object_propagate_events_get(wd->scr);
+   return elm_smart_scroller_propagate_events_get(wd->scr);
+}
+
+EAPI void
+elm_scroller_gravity_set(Evas_Object *obj, double x, double y)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   elm_smart_scroller_gravity_set(wd->scr, x, y);
+}
+
+EAPI void
+elm_scroller_gravity_get(const Evas_Object *obj, double *x, double *y)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   elm_smart_scroller_gravity_get(wd->scr, x, y);
+}
+
+EAPI void
+elm_scroller_page_move_set(Evas_Object *obj, Eina_Bool set)
+{
+   return ;
 }