---
 .../elementary/elementary.c_elementary_icon.pxi    |  167 ++++++++++++++++++--
 .../include/elementary/c_elementary.pxd            |   35 +++-
 2 files changed, 184 insertions(+), 18 deletions(-)

diff --git a/python-elementary/elementary/elementary.c_elementary_icon.pxi b/python-elementary/elementary/elementary.c_elementary_icon.pxi
index cfce0f9..c728419 100644
--- a/python-elementary/elementary/elementary.c_elementary_icon.pxi
+++ b/python-elementary/elementary/elementary.c_elementary_icon.pxi
@@ -42,29 +42,174 @@ cdef class Icon(Object):
         else:
             elm_icon_file_set(self.obj, filename, group)
 
-    def callback_clicked_add(self, func, *args, **kwargs):
-        self._callback_add("clicked", func, *args, **kwargs)
+    def file_get(self):
+        """Get the path of the image for the icon"""
+        cdef const_char_ptr filename, group
+        elm_icon_file_get(self.obj, &filename, &group)
+        return (filename, group)
 
-    def callback_clicked_del(self, func):
-        self._callback_del("clicked", func)
+    def thumb_set(self, filename, group = None):
+        """
+        Set the file that will be used, but use a generated thumbnail.
+
+        @parm: B{filename} Filename of the image
+        """
+        if group == None:
+            elm_icon_thumb_set(self.obj, filename, NULL)
+        else:
+            elm_icon_thumb_set(self.obj, filename, group)
+
+    def standard_set(self, name):
+        return bool(elm_icon_standard_set(self.obj, name))
+
+    def standard_get(self):
+        return elm_icon_standard_get(self.obj)
 
-    def standard_set(self,standard):
-        elm_icon_standard_set(self.obj,standard)
+    property standard:
+        def __get__(self):
+            return self.standard_get()
+        def __set__(self, standard):
+            self.standard_set(standard)
 
-    def smooth_set(self,smooth):
+    def smooth_set(self, smooth):
         elm_icon_smooth_set(self.obj,smooth)
 
+    def smooth_get(self):
+        return bool(elm_icon_smooth_get(self.obj))
+
+    property smooth:
+        def __get__(self):
+            return self.smooth_get()
+        def __set__(self, smooth):
+            self.smooth_set(smooth)
+
     def no_scale_set(self,no_scale):
         elm_icon_no_scale_set(self.obj,no_scale)
 
-    def scale_set(self,scale_up,scale_down):
-        elm_icon_resizable_set(self.obj,scale_up,scale_down)
+    def no_scale_get(self):
+        return bool(elm_icon_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, scale_up, scale_down):
+        elm_icon_resizable_set(self.obj, scale_up, scale_down)
+
+    def resizable_get(self):
+        cdef evas.c_evas.Eina_Bool scale_up, scale_down
+        elm_icon_resizable_get(self.obj, &scale_up, &scale_down)
+        return (scale_up, scale_down)
+
+    property resizable:
+        def __get__(self):
+            return self.resizable_get()
+        def __set__(self, resizable):
+            self.resizable_set(resizable)
 
-    def fill_outside_set(self,fill_outside):
-        elm_icon_fill_outside_set(self.obj,fill_outside)
+    def size_get(self):
+        cdef int w, h
+        elm_icon_size_get(self.obj, &w, &h)
+        return (w, h)
+
+    property size:
+        def __get__(self):
+            return self.size_get()
+
+    def fill_outside_set(self, fill_outside):
+        elm_icon_fill_outside_set(self.obj, fill_outside)
+
+    def fill_outside_get(self):
+        return bool(elm_icon_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 prescale_set(self, size):
         elm_icon_prescale_set(self.obj, size)
 
+    def prescale_get(self):
+        return elm_icon_prescale_get(self.obj)
+
+    property prescale:
+        def __get__(self):
+            return self.prescale_get()
+        def __set__(self, prescale):
+            self.prescale_set(prescale)
+
+    def object_get(self):
+        cdef c_evas.const_Evas_Object *o
+        o = elm_icon_object_get(self.obj)
+        return evas.c_evas._Object_from_instance(<long>o)
+
+    def order_lookup_set(self, order):
+        elm_icon_order_lookup_set(self.obj, order)
+
+    def order_lookup_get(self):
+        return elm_icon_order_lookup_get(self.obj)
+
+    property order_lookup:
+        def __get__(self):
+            return self.order_lookup_get()
+        def __set__(self, order_lookup):
+            self.order_lookup_set(order_lookup)
+
+    def preload_disabled_set(self, disabled):
+        elm_icon_preload_disabled_set(self.obj, disabled)
+
+    def animated_available_get(self):
+        return bool(elm_icon_animated_available_get(self.obj))
+
+    property animated_available:
+        def __get__(self):
+            return self.animated_available_get()
+
+    def animated_set(self, animated):
+        elm_icon_animated_set(self.obj, animated)
+
+    def animated_get(self):
+        return bool(elm_icon_animated_get(self.obj))
+
+    property animated:
+        def __get__(self):
+            return self.animated_get()
+        def __set__(self, animated):
+            self.animated_set(animated)
+
+    def animated_play_set(self, play):
+        elm_icon_animated_play_set(self.obj, play)
+
+    def animated_play_get(self):
+        return bool(elm_icon_animated_play_get(self.obj))
+
+    property animated_play:
+        def __get__(self):
+            return self.animated_play_get()
+        def __set__(self, animated_play):
+            self.animated_play_set(animated_play)
+
+    def aspect_fixed_set(self, fixed):
+        elm_icon_aspect_fixed_set(self.obj, fixed)
+
+    def aspect_fixed_get(self):
+        return bool(elm_icon_aspect_fixed_get(self.obj))
+
+    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)
+
+    def callback_clicked_del(self, func):
+        self._callback_del("clicked", func)
+
 
 _elm_widget_type_register("icon", Icon)
diff --git a/python-elementary/include/elementary/c_elementary.pxd b/python-elementary/include/elementary/c_elementary.pxd
index 0d1abef..59aeecf 100644
--- a/python-elementary/include/elementary/c_elementary.pxd
+++ b/python-elementary/include/elementary/c_elementary.pxd
@@ -785,13 +785,34 @@ cdef extern from "Elementary.h":
 
     # Icon object
     evas.c_evas.Evas_Object *elm_icon_add(evas.c_evas.Evas_Object *parent)
-    void elm_icon_file_set(evas.c_evas.Evas_Object *obj, char *file, char *group)
-    void elm_icon_standard_set(evas.c_evas.Evas_Object *obj, char* name)
-    void elm_icon_smooth_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool smooth)
-    void elm_icon_no_scale_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool no_scale)
-    void elm_icon_resizable_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool scale_up, evas.c_evas.Eina_Bool scale_down)
-    void elm_icon_fill_outside_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool fill_outside)
-    void elm_icon_prescale_set(evas.c_evas.Evas_Object *obj, int size)
+    evas.c_evas.Eina_Bool    elm_icon_file_set(evas.c_evas.Evas_Object *obj, char *file, char *group)
+    #evas.c_evas.Eina_Bool    elm_icon_memfile_set(evas.c_evas.Evas_Object *obj, void *img, size_t size, char *format, char *key);
+    void                     *elm_icon_file_get(evas.c_evas.Evas_Object *obj, char **file, char **group)
+    void                     elm_icon_thumb_set(evas.c_evas.Evas_Object *obj, char *file, char *group)
+    evas.c_evas.Eina_Bool    elm_icon_standard_set(evas.c_evas.Evas_Object *obj, char* name)
+    char                    *elm_icon_standard_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_icon_smooth_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool smooth)
+    evas.c_evas.Eina_Bool    elm_icon_smooth_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_icon_no_scale_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool no_scale)
+    evas.c_evas.Eina_Bool    elm_icon_no_scale_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_icon_resizable_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool scale_up, evas.c_evas.Eina_Bool scale_down)
+    void                     elm_icon_resizable_get(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool *scale_up, evas.c_evas.Eina_Bool *scale_down)
+    void                     elm_icon_size_get(evas.c_evas.Evas_Object *obj, int *w, int *h)
+    void                     elm_icon_fill_outside_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool fill_outside)
+    evas.c_evas.Eina_Bool    elm_icon_fill_outside_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_icon_prescale_set(evas.c_evas.Evas_Object *obj, int size)
+    int                      elm_icon_prescale_get(evas.c_evas.Evas_Object *obj)
+    evas.c_evas.Evas_Object *elm_icon_object_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_icon_order_lookup_set(evas.c_evas.Evas_Object *obj, Elm_Icon_Lookup_Order order)
+    Elm_Icon_Lookup_Order    elm_icon_order_lookup_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_icon_preload_disabled_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool disabled)
+    evas.c_evas.Eina_Bool    elm_icon_animated_available_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_icon_animated_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool animated)
+    evas.c_evas.Eina_Bool    elm_icon_animated_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_icon_animated_play_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool play)
+    evas.c_evas.Eina_Bool    elm_icon_animated_play_get(evas.c_evas.Evas_Object *obj)
+    void                     elm_icon_aspect_fixed_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool fixed)
+    evas.c_evas.Eina_Bool    elm_icon_aspect_fixed_get(evas.c_evas.Evas_Object *obj)
 
     # Image object
     evas.c_evas.Evas_Object *elm_image_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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to