jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1dc9741d0fdca046bacbf79ef1b34d6252e6f555

commit 1dc9741d0fdca046bacbf79ef1b34d6252e6f555
Author: Ji-Youn Park <jy0703.p...@samsung.com>
Date:   Fri Apr 1 14:42:01 2016 +0830

        Elm_image: remove Elm_Image_Orient and orient property from EO.
---
 src/lib/elementary/elm_image.c        | 20 ++++++++++++---
 src/lib/elementary/elm_image.eo       | 35 ++-----------------------
 src/lib/elementary/elm_image_legacy.h | 48 ++++++++++++++++++++++++++++++++++-
 src/lib/elementary/elm_widget_image.h |  2 +-
 4 files changed, 67 insertions(+), 38 deletions(-)

diff --git a/src/lib/elementary/elm_image.c b/src/lib/elementary/elm_image.c
index c5ebf5f..35dbea9 100644
--- a/src/lib/elementary/elm_image.c
+++ b/src/lib/elementary/elm_image.c
@@ -1265,7 +1265,7 @@ _elm_image_efl_image_load_load_size_get(Eo *obj 
EINA_UNUSED, Elm_Image_Data *sd,
 }
 
 EOLIAN static void
-_elm_image_orient_set(Eo *obj, Elm_Image_Data *sd, Elm_Image_Orient orient)
+_elm_image_efl_image_orientation_set(Eo *obj, Elm_Image_Data *sd, 
Efl_Gfx_Orientation orient)
 {
    if (sd->edje) return;
    if (sd->orient == orient) return;
@@ -1275,8 +1275,8 @@ _elm_image_orient_set(Eo *obj, Elm_Image_Data *sd, 
Elm_Image_Orient orient)
    _elm_image_internal_sizing_eval(obj, sd);
 }
 
-EOLIAN static Elm_Image_Orient
-_elm_image_orient_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
+EOLIAN static Efl_Gfx_Orientation
+_elm_image_efl_image_orientation_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
 {
    return sd->orient;
 }
@@ -1672,4 +1672,18 @@ elm_image_preload_disabled_set(Evas_Object *obj, 
Eina_Bool disable)
     }
 }
 
+EAPI void
+elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient)
+{
+   efl_image_orientation_set(obj, (Efl_Gfx_Orientation) orient);
+}
+
+EAPI Elm_Image_Orient
+elm_image_orient_get(const Evas_Object *obj)
+{
+   return (Elm_Image_Orient) efl_image_orientation_get(obj);
+}
+
+
+
 #include "elm_image.eo.c"
diff --git a/src/lib/elementary/elm_image.eo b/src/lib/elementary/elm_image.eo
index a65eca8..9d12d95 100644
--- a/src/lib/elementary/elm_image.eo
+++ b/src/lib/elementary/elm_image.eo
@@ -1,26 +1,5 @@
 import evas_image;
 
-enum Elm.Image_Orient
-{
-   [[
-     Using Evas_Image_Orient enums.
-     @since 1.14
-   ]]
-   legacy: elm_image;
-   orient_none     =  Evas.Image_Orient.orient_none,
-   orient_0        =  Evas.Image_Orient.orient_0,
-   rotate_90       =  Evas.Image_Orient.orient_90,
-   orient_90       =  Evas.Image_Orient.orient_90,
-   rotate_180      =  Evas.Image_Orient.orient_180,
-   orient_180      =  Evas.Image_Orient.orient_180,
-   rotate_270      =  Evas.Image_Orient.orient_270,
-   orient_270      =  Evas.Image_Orient.orient_270,
-   flip_horizontal =  Evas.Image_Orient.flip_horizontal,
-   flip_vertical   =  Evas.Image_Orient.flip_vertical,
-   flip_transpose  =  Evas.Image_Orient.flip_transpose,
-   flip_transverse =  Evas.Image_Orient.flip_transverse
-}
-
 struct Elm.Image_Progress
 {
    [[
@@ -128,18 +107,6 @@ class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, 
Evas.Clickable_Interface,
             fixed: bool; [[$true if the image should retain the aspect, $false 
otherwise.]]
          }
       }
-      @property orient {
-         [[Contrtol the image orientation.
-
-           This function allows to rotate or flip the given image.]]
-         set {
-         }
-         get {
-         }
-         values {
-            orient: Elm.Image_Orient; [[The image orientation Elm.Image.Orient 
Default is #ELM_IMAGE_ORIENT_NONE.]]
-         }
-      }
       @property resizable {
          [[Control if the object is (up/down) resizable.
 
@@ -200,6 +167,8 @@ class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, 
Evas.Clickable_Interface,
       Efl.Image_Load.load_size.get;
       Efl.Image.smooth_scale.set;
       Efl.Image.smooth_scale.get;
+      Efl.Image.orientation.set;
+      Efl.Image.orientation.get;
       Efl.Player.playable.get;
       Efl.Player.play.set;
       Efl.Player.play.get;
diff --git a/src/lib/elementary/elm_image_legacy.h 
b/src/lib/elementary/elm_image_legacy.h
index 373d4e5..dddbb71 100644
--- a/src/lib/elementary/elm_image_legacy.h
+++ b/src/lib/elementary/elm_image_legacy.h
@@ -372,6 +372,52 @@ EAPI Eina_Bool elm_image_fill_outside_get(const 
Evas_Object *obj);
  *
  * @ingroup Elm_Image
  */
-
 EAPI void elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disabled);
+
+/** Using Evas_Image_Orient enums.
+ *
+ * @since 1.14
+ *
+ * @ingroup Elm_Image
+ */
+typedef enum _Elm_Image_Orient_Type
+{
+  ELM_IMAGE_ORIENT_NONE = 0 /* Evas.Image_Orient.orient_none */,
+  ELM_IMAGE_ORIENT_0 = 0 /* Evas.Image_Orient.orient_0 */,
+  ELM_IMAGE_ROTATE_90 = 1 /* Evas.Image_Orient.orient_90 */,
+  ELM_IMAGE_ORIENT_90 = 1 /* Evas.Image_Orient.orient_90 */,
+  ELM_IMAGE_ROTATE_180 = 2 /* Evas.Image_Orient.orient_180 */,
+  ELM_IMAGE_ORIENT_180 = 2 /* Evas.Image_Orient.orient_180 */,
+  ELM_IMAGE_ROTATE_270 = 3 /* Evas.Image_Orient.orient_270 */,
+  ELM_IMAGE_ORIENT_270 = 3 /* Evas.Image_Orient.orient_270 */,
+  ELM_IMAGE_FLIP_HORIZONTAL = 4 /* Evas.Image_Orient.flip_horizontal */,
+  ELM_IMAGE_FLIP_VERTICAL = 5 /* Evas.Image_Orient.flip_vertical */,
+  ELM_IMAGE_FLIP_TRANSPOSE = 6 /* Evas.Image_Orient.flip_transpose */,
+  ELM_IMAGE_FLIP_TRANSVERSE = 7 /* Evas.Image_Orient.flip_transverse */
+} Elm_Image_Orient;
+
+/**
+ * @brief Contrtol the image orientation.
+ *
+ * This function allows to rotate or flip the given image.
+ *
+ * @param[in] orient The image orientation Elm.Image.Orient Default is
+ * #ELM_IMAGE_ORIENT_NONE.
+ *
+ * @ingroup Elm_Image
+ */
+EAPI void elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient);
+
+/**
+ * @brief Contrtol the image orientation.
+ *
+ * This function allows to rotate or flip the given image.
+ *
+ * @return The image orientation Elm.Image.Orient Default is
+ * #ELM_IMAGE_ORIENT_NONE.
+ *
+ * @ingroup Elm_Image
+ */
+EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj);
+
 #include "elm_image.eo.legacy.h"
diff --git a/src/lib/elementary/elm_widget_image.h 
b/src/lib/elementary/elm_widget_image.h
index 7836d90..1439824 100644
--- a/src/lib/elementary/elm_widget_image.h
+++ b/src/lib/elementary/elm_widget_image.h
@@ -61,7 +61,7 @@ struct _Elm_Image_Data
    int                   frame_count;
    int                   cur_frame;
 
-   Elm_Image_Orient      orient;
+   Efl_Gfx_Orientation   orient;
 
    struct {
       Ecore_Thread      *th;

-- 


Reply via email to