Elementary ui-mirroring: move elm_widget_mirrored_* functions to elm_widget.h.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 10 Feb 2011 08:29:24 +0000 (08:29 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 10 Feb 2011 08:29:24 +0000 (08:29 +0000)
and created elm_object_mirrored wrappers for them.

git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@56893 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/Elementary.h.in
src/lib/elm_main.c
src/lib/elm_widget.h

index f221460..90ffd56 100644 (file)
@@ -272,14 +272,14 @@ extern "C" {
 
    EAPI void         elm_object_scale_set(Evas_Object *obj, double scale) EINA_ARG_NONNULL(1);
    EAPI double       elm_object_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool    elm_object_mirrored_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI void         elm_object_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool    elm_object_mirrored_automatic_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI void         elm_object_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic) EINA_ARG_NONNULL(1);
    EAPI void         elm_object_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
    EAPI const char  *elm_object_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
    EAPI void         elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1);
    EAPI Eina_Bool    elm_object_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool    elm_widget_mirrored_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI void         elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool    elm_widget_mirrored_automatic_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI void         elm_widget_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic) EINA_ARG_NONNULL(1);
 
    EAPI Eina_Bool    elm_object_widget_check(const Evas_Object *obj) EINA_ARG_NONNULL(1);
    EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
index 34e6887..c8ca6b9 100644 (file)
@@ -1059,6 +1059,72 @@ elm_policy_get(unsigned int policy)
 }
 
 /**
+ * @defgroup UI-Mirroring Selective Widget mirroring
+ *
+ * These functions allow you to set ui-miroring on specific widgets or whe
+ * whole interface. Widgets can be in one of two modes, automatic and manual.
+ * Automatic means they'll be changed according to the system mirroring mode
+ * and manual means only explicit changes will matter. You are not supposed to
+ * change mirroring state of a widget set to automatic, will mostly work, but
+ * the behavior is not really defined.
+ */
+
+/**
+ * Returns the widget's mirrored mode.
+ *
+ * @param obj The widget.
+ * @return mirrored mode of the object.
+ *
+ **/
+EAPI Eina_Bool
+elm_object_mirrored_get(const Evas_Object *obj)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
+   return elm_widget_mirrored_get(obj);
+}
+
+/**
+ * Sets the widget's mirrored mode.
+ *
+ * @param obj The widget.
+ * @param mirrored EINA_TRUE to set mirrored mode. EINA_FALSE to unset.
+ */
+EAPI void
+elm_object_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
+{
+   EINA_SAFETY_ON_NULL_RETURN(obj);
+   elm_widget_mirrored_set(obj, mirrored);
+}
+
+/**
+ * Returns the widget's mirrored mode setting.
+ *
+ * @param obj The widget.
+ * @return mirrored mode setting of the object.
+ *
+ **/
+EAPI Eina_Bool
+elm_object_mirrored_automatic_get(const Evas_Object *obj)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
+   return elm_widget_mirrored_automatic_get(obj);
+}
+
+/**
+ * Sets the widget's mirrored mode setting.
+ * When widget in automatic mode, it follows the system mirrored mode set by
+ * elm_mirrored_set().
+ * @param obj The widget.
+ * @param automatic EINA_TRUE for auto mirrored mode. EINA_FALSE for manual.
+ */
+EAPI void
+elm_object_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic)
+{
+   EINA_SAFETY_ON_NULL_RETURN(obj);
+   elm_widget_mirrored_automatic_set(obj, automatic);
+}
+
+/**
  * @defgroup Scaling Selective Widget Scaling
  *
  * Different widgets can be scaled independently. These functions allow you to
index bb25156..98a17f5 100644 (file)
@@ -277,6 +277,10 @@ EAPI void             elm_widget_scroll_freeze_pop(Evas_Object *obj);
 EAPI int              elm_widget_scroll_freeze_get(const Evas_Object *obj);
 EAPI void             elm_widget_scale_set(Evas_Object *obj, double scale);
 EAPI double           elm_widget_scale_get(const Evas_Object *obj);
+EAPI Eina_Bool        elm_widget_mirrored_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI void             elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool        elm_widget_mirrored_automatic_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI void             elm_widget_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic) EINA_ARG_NONNULL(1);
 EAPI void             elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th);
 EAPI Elm_Theme       *elm_widget_theme_get(const Evas_Object *obj);
 EAPI void             elm_widget_style_set(Evas_Object *obj, const char *style);