---
 python-elementary/elementary/__init__.py           |   10 ++
 .../elementary/elementary.c_elementary_image.pxi   |  101 ++++++++++++++++++--
 .../include/elementary/c_elementary.pxd            |   15 ++-
 3 files changed, 116 insertions(+), 10 deletions(-)

diff --git a/python-elementary/elementary/__init__.py b/python-elementary/elementary/__init__.py
index d6a56fb..ab32b52 100644
--- a/python-elementary/elementary/__init__.py
+++ b/python-elementary/elementary/__init__.py
@@ -108,6 +108,16 @@ ELM_ILLUME_COMMAND_FOCUS_FORWARD = 1
 ELM_ILLUME_COMMAND_FOCUS_HOME = 2
 ELM_ILLUME_COMMAND_CLOSE = 3
 
+ELM_IMAGE_ORIENT_NONE = 0
+ELM_IMAGE_ORIENT_0 = 0
+ELM_IMAGE_ROTATE_90 = 1
+ELM_IMAGE_ROTATE_180 = 2
+ELM_IMAGE_ROTATE_270 = 3
+ELM_IMAGE_FLIP_HORIZONTAL = 4
+ELM_IMAGE_FLIP_VERTICAL = 5
+ELM_IMAGE_FLIP_TRANSPOSE = 6
+ELM_IMAGE_FLIP_TRANSVERSE = 7
+
 ELM_INPUT_PANEL_LANG_AUTOMATIC = 0
 ELM_INPUT_PANEL_LANG_ALPHABET = 1
 
diff --git a/python-elementary/elementary/elementary.c_elementary_image.pxi b/python-elementary/elementary/elementary.c_elementary_image.pxi
index 30c1cb5..8072a4e 100644
--- a/python-elementary/elementary/elementary.c_elementary_image.pxi
+++ b/python-elementary/elementary/elementary.c_elementary_image.pxi
@@ -24,40 +24,125 @@ cdef class Image(Object):
     def file_set(self, filename, group = ""):
         elm_image_file_set(self.obj, filename, group)
 
+    def file_get(self):
+        cdef const_char_ptr filename, group
+        elm_image_file_get(self.obj, &filename, &group)
+        return (filename, group)
+
     def smooth_set(self, smooth):
         elm_image_smooth_set(self.obj, smooth)
 
+    def smooth_get(self):
+        return bool(elm_image_smooth_get(self.obj))
+
+    property smooth:
+        def __get__(self):
+            return self.smooth_get()
+        def __set__(self, smooth):
+            self.smooth_set(smooth)
+
+    def object_size_get(self):
+        cdef int width, height
+        elm_image_object_size_get(self.obj, &width, &height)
+        return (width, height)
+
+    property object_size:
+        def __get__(self):
+            return self.object_size_get()
+
     def no_scale_set(self, no_scale):
         elm_image_no_scale_set(self.obj, no_scale)
 
-    def scale_set(self, scale_up, scale_down):
-        _METHOD_DEPRECATED(self, "resizable_set")
-        self.resizable_set(scale_up, scale_down)
+    def no_scale_get(self):
+        return bool(elm_image_no_scale_get(self.obj))
+
+    property no_scale:
+        def __get__(self):
+            return self.no_scale_get()
+        def __set__(self, no_scale):
+            self.no_scale_set(no_scale)
 
     def resizable_set(self, size_up, size_down):
         elm_image_resizable_set(self.obj, size_up, size_down)
 
+    def resizable_get(self):
+        cdef evas.c_evas.Eina_Bool size_up, size_down
+        elm_image_resizable_get(self.obj, &size_up, &size_down)
+        return (size_up, size_down)
+
+    property resizable:
+        def __get__(self):
+            return self.resizable_get()
+        def __set__(self, value):
+            self.resizable_set(*value)
+
     def fill_outside_set(self, fill_outside):
         elm_image_fill_outside_set(self.obj, fill_outside)
 
+    def fill_outside_get(self):
+        return bool(elm_image_fill_outside_get(self.obj))
+
+    property fill_outside:
+        def __get__(self):
+            return self.fill_outside_get()
+        def __set__(self, fill_outside):
+            self.fill_outside_set(fill_outside)
+
+    def preload_disabled_set(self, disabled):
+        elm_image_preload_disabled_set(self.obj, disabled)
+
     def prescale_set(self, size):
         elm_image_prescale_set(self.obj, size)
 
+    def prescale_get(self):
+        return elm_image_prescale_get(self.obj)
+
+    property prescale:
+        def __get__(self):
+            return self.prescale_get()
+        def __set__(self, prescale):
+            self.prescale_set(prescale)
+
     def orient_set(self, orientation):
         elm_image_orient_set(self.obj, orientation)
 
+    def orient_get(self):
+        return elm_image_orient_get(self.obj)
+
+    property orient:
+        def __get__(self):
+            return self.orient_get()
+        def __set__(self, orient):
+            self.orient_set(orient)
+
     def editable_set(self, editable):
         elm_image_editable_set(self.obj, editable)
 
+    def editable_get(self):
+        return bool(elm_image_editable_get(self.obj))
+
+    property editable:
+        def __get__(self):
+            return self.editable_get()
+        def __set__(self, editable):
+            self.editable_set(editable)
+
+    def object_get(self):
+        cdef c_evas.Evas_Object *o
+        o = elm_image_object_get(self.obj)
+        return <Object>o
+
     def aspect_fixed_set(self, fixed):
         elm_image_aspect_fixed_set(self.obj, fixed)
 
-    def object_size_get(self):
-        cdef int width
-        cdef int height
+    def aspect_fixed_get(self):
+        return bool(elm_image_aspect_fixed_get(self.obj))
 
-        elm_image_object_size_get(self.obj, &width, &height)
-        return (width, height)
+    property aspect_fixed:
+        def __get__(self):
+            return self.aspect_fixed_get()
+        def __set__(self, aspect_fixed):
+            self.aspect_fixed_set(aspect_fixed)
 
     def callback_clicked_add(self, func, *args, **kwargs):
         self._callback_add("clicked", func, *args, **kwargs)
diff --git a/python-elementary/include/elementary/c_elementary.pxd b/python-elementary/include/elementary/c_elementary.pxd
index a1f7479..0d1abef 100644
--- a/python-elementary/include/elementary/c_elementary.pxd
+++ b/python-elementary/include/elementary/c_elementary.pxd
@@ -794,17 +794,28 @@ cdef extern from "Elementary.h":
     void elm_icon_prescale_set(evas.c_evas.Evas_Object *obj, int size)
 
     # Image object
-    evas.c_evas.Evas_Object* elm_image_add(evas.c_evas.Evas_Object *parent)
+    evas.c_evas.Evas_Object *elm_image_add(evas.c_evas.Evas_Object *parent)
     evas.c_evas.Eina_Bool    elm_image_file_set(evas.c_evas.Evas_Object *obj, char *file, char *group)
+    void                     elm_image_file_get(evas.c_evas.Evas_Object *obj, char **file, char **group)
     void                     elm_image_smooth_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool smooth)
+    evas.c_evas.Eina_Bool    elm_image_smooth_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_image_object_size_get(evas.c_evas.Evas_Object *obj, int *w, int *h)
     void                     elm_image_no_scale_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool no_scale)
+    evas.c_evas.Eina_Bool    elm_image_no_scale_get(evas.c_evas.Evas_Object *obj)
     void                     elm_image_resizable_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool scale_up,evas.c_evas.Eina_Bool scale_down)
+    void                     elm_image_resizable_get(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool *scale_up,evas.c_evas.Eina_Bool *scale_down)
     void                     elm_image_fill_outside_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool fill_outside)
+    evas.c_evas.Eina_Bool    elm_image_fill_outside_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_image_preload_disabled_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool disabled)
     void                     elm_image_prescale_set(evas.c_evas.Evas_Object *obj, int size)
+    int                      elm_image_prescale_get(evas.c_evas.Evas_Object *obj)
     void                     elm_image_orient_set(evas.c_evas.Evas_Object *obj, Elm_Image_Orient orient)
+    Elm_Image_Orient         elm_image_orient_get(evas.c_evas.Evas_Object *obj)
     void                     elm_image_editable_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool editable)
+    evas.c_evas.Eina_Bool    elm_image_editable_get(evas.c_evas.Evas_Object *obj)
+    evas.c_evas.Evas_Object *elm_image_object_get(evas.c_evas.Evas_Object *obj)
     void                     elm_image_aspect_fixed_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool fixed)
-    void                     elm_image_object_size_get(evas.c_evas.Evas_Object *obj, int *w, int *h)
+    evas.c_evas.Eina_Bool    elm_image_aspect_fixed_get(evas.c_evas.Evas_Object *obj)
 
     # Button object
     evas.c_evas.Evas_Object *elm_button_add(evas.c_evas.Evas_Object *parent)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to