davemds pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=60e7e94889b35cf3ea548d9f60cc76140d5d6e28

commit 60e7e94889b35cf3ea548d9f60cc76140d5d6e28
Author: Dave Andreoli <[email protected]>
Date:   Sat Nov 22 15:21:00 2014 +0100

    New 1.12 API: edje_object_base_scale_get
    
    With proper test
---
 efl/edje/efl.edje_object.pxi | 14 ++++++++++++++
 include/efl.edje.pxd         |  1 +
 tests/edje/test_02_object.py |  5 +++++
 3 files changed, 20 insertions(+)

diff --git a/efl/edje/efl.edje_object.pxi b/efl/edje/efl.edje_object.pxi
index dddf916..ea7f519 100644
--- a/efl/edje/efl.edje_object.pxi
+++ b/efl/edje/efl.edje_object.pxi
@@ -376,6 +376,20 @@ cdef class Edje(Object):
     def scale_get(self):
         return edje_object_scale_get(self.obj)
 
+    property base_scale:
+        """ The base scale factor set in the edc collection.
+
+        :type: float
+
+        .. versionadded:: 1.12
+
+        """
+        def __get__(self):
+            return edje_object_base_scale_get(self.obj)
+
+    def base_scale_get(self):
+        return edje_object_base_scale_get(self.obj)
+
     property mirrored:
         """The RTL orientation for this object.
 
diff --git a/include/efl.edje.pxd b/include/efl.edje.pxd
index 2550cce..8e2d6f5 100644
--- a/include/efl.edje.pxd
+++ b/include/efl.edje.pxd
@@ -227,6 +227,7 @@ cdef extern from "Edje.h":
     Eina_Bool edje_object_preload(Evas_Object *obj, Eina_Bool cancel)
     Eina_Bool edje_object_scale_set(Evas_Object *obj, double scale)
     double edje_object_scale_get(Evas_Object *obj)
+    double edje_object_base_scale_get(Evas_Object *obj)
 
     void edje_object_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
     Eina_Bool edje_object_mirrored_get(Evas_Object *obj)
diff --git a/tests/edje/test_02_object.py b/tests/edje/test_02_object.py
index 0d354fd..98fe086 100644
--- a/tests/edje/test_02_object.py
+++ b/tests/edje/test_02_object.py
@@ -53,6 +53,11 @@ class TestEdjeObject(unittest.TestCase):
         self.assertIsNone(o.data_get("not_exist"))
         o.delete()
 
+    def testBaseScaleGet(self):
+        o = edje.Edje(self.canvas, file=theme_file, group="main")
+        self.assertEqual(o.base_scale_get(), 1.0)
+        o.delete()
+
     def testColorClasses(self):
         o = edje.Edje(self.canvas, file=theme_file, group="main")
         o.color_class_set("MyColorClass",

-- 


Reply via email to