Added 4 APIs about elm_object_scroll_lock_*.
authorDaniel Juyung Seo <juyung.seo@samsung.com>
Thu, 1 Jul 2010 16:06:40 +0000 (01:06 +0900)
committerDaniel Juyung Seo <juyung.seo@samsung.com>
Thu, 1 Jul 2010 16:06:40 +0000 (01:06 +0900)
src/lib/Elementary.h.in
src/lib/elm_main.c

index 8411f2f..e9d21ec 100644 (file)
@@ -285,6 +285,10 @@ extern "C" {
    EAPI void         elm_object_scroll_hold_pop(Evas_Object *obj);
    EAPI void         elm_object_scroll_freeze_push(Evas_Object *obj);
    EAPI void         elm_object_scroll_freeze_pop(Evas_Object *obj);
+   EAPI void         elm_object_scroll_lock_x_set(Evas_Object *obj, Eina_Bool lock);
+   EAPI void         elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock);
+   EAPI Eina_Bool    elm_object_scroll_lock_x_get(const Evas_Object *obj);
+   EAPI Eina_Bool    elm_object_scroll_lock_y_get(const Evas_Object *obj);
 
    EAPI void         elm_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coord *h);
 
index b752e1d..378265b 100644 (file)
@@ -1313,6 +1313,66 @@ elm_object_scroll_freeze_push(Evas_Object *obj)
 }
 
 /**
+ * Lock the scrolling of the given widget (and thus all parents)
+ *
+ * This locks the given object from scrolling in the X axis (and implicitly
+ * also locks all parent scrollers too from doing the same).
+ *
+ * @param obj The object
+ * @param lock The lock state (1 == locked, 0 == unlocked)
+ * @ingroup Scrollhints
+ */
+EAPI void
+elm_object_scroll_lock_x_set(Evas_Object *obj, Eina_Bool lock)
+{
+   elm_widget_drag_lock_x_set(obj, lock);
+}
+
+/**
+ * Lock the scrolling of the given widget (and thus all parents)
+ *
+ * This locks the given object from scrolling in the Y axis (and implicitly
+ * also locks all parent scrollers too from doing the same).
+ *
+ * @param obj The object
+ * @param lock The lock state (1 == locked, 0 == unlocked)
+ * @ingroup Scrollhints
+ */
+EAPI void
+elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock)
+{
+   elm_widget_drag_lock_y_set(obj, lock);
+}
+
+/**
+ * Get the scrolling lock of the given widget
+ *
+ * This gets the lock for X axis scrolling.
+ *
+ * @param obj The object
+ * @ingroup Scrollhints
+ */
+EAPI Eina_Bool
+elm_object_scroll_lock_x_get(const Evas_Object *obj)
+{
+   return elm_widget_drag_lock_x_get(obj);
+}
+
+/**
+ * Get the scrolling lock of the given widget
+ *
+ * This gets the lock for X axis scrolling.
+ *
+ * @param obj The object
+ * @ingroup Scrollhints
+ */
+EAPI Eina_Bool
+elm_object_scroll_lock_y_get(const Evas_Object *obj)
+{
+   return elm_widget_drag_lock_y_get(obj);
+}
+
+/**
  * Pop the scroll freeze by 1
  *
  * This decrements the scroll freeze count by one. If it is more than 0 it will