summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2015-03-05 20:21:45 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2015-03-05 21:07:38 +0200
commitd3357619f7d32f53a5df9683409ed67038466a7e (patch)
treecb22e0c2fb88b609448a8f04eb5476e16b46e0e6 /tests
parentded0c5fd06d6a8078c25b1d3fcad7f1a7e92813b (diff)
Evas: Bring back SmartObject
Possible TODO: support per-child delete cb like in C
Diffstat (limited to 'tests')
-rw-r--r--tests/evas/test_06_object_smart.py41
-rw-r--r--tests/evas/test_12_object_smart_as_factory.py5
2 files changed, 22 insertions, 24 deletions
diff --git a/tests/evas/test_06_object_smart.py b/tests/evas/test_06_object_smart.py
index b42508b..b8e4d95 100644
--- a/tests/evas/test_06_object_smart.py
+++ b/tests/evas/test_06_object_smart.py
@@ -4,27 +4,26 @@ from efl import evas
4import unittest 4import unittest
5 5
6 6
7#class MyObject(evas.SmartObject): 7class MyObject(evas.SmartObject):
8# def __init__(self, canvas, *args, **kargs): 8 def __init__(self, canvas, *args, **kargs):
9# evas.SmartObject.__init__(self, canvas, *args, **kargs) 9 evas.SmartObject.__init__(self, canvas, *args, **kargs)
10# w, h = self.size 10 w, h = self.size
11# w2 = w / 2 11 w2 = w / 2
12# h2 = h / 2 12 h2 = h / 2
13# self.r1 = evas.Rectangle(canvas, geometry=(0, 0, w2, h2), 13 self.r1 = evas.Rectangle(canvas, geometry=(0, 0, w2, h2),
14# color="#ff0000") 14 color="#ff0000")
15# self.member_add(self.r1) 15 self.member_add(self.r1)
16# 16
17# self.r2 = evas.Rectangle(canvas, geometry=(w2, h2, w2, h2), 17 self.r2 = evas.Rectangle(canvas, geometry=(w2, h2, w2, h2),
18# color="#00ff00") 18 color="#00ff00")
19# self.member_add(self.r2) 19 self.member_add(self.r2)
20# 20
21# def resize(self, w, h): 21 def resize(self, w, h):
22# w2 = w / 2 22 w2 = w / 2
23# h2 = h / 2 23 h2 = h / 2
24# self.r1.geometry = (0, 0, w2, h2) 24 self.r1.geometry = (0, 0, w2, h2)
25# self.r2.geometry = (w2, h2, w2, h2) 25 self.r2.geometry = (w2, h2, w2, h2)
26 26
27@unittest.skip("SmartObject disabled")
28class SmartObjectTest(unittest.TestCase): 27class SmartObjectTest(unittest.TestCase):
29 def setUp(self): 28 def setUp(self):
30 self.canvas = evas.Canvas(method="buffer", 29 self.canvas = evas.Canvas(method="buffer",
diff --git a/tests/evas/test_12_object_smart_as_factory.py b/tests/evas/test_12_object_smart_as_factory.py
index 377de8c..7b24fe5 100644
--- a/tests/evas/test_12_object_smart_as_factory.py
+++ b/tests/evas/test_12_object_smart_as_factory.py
@@ -4,10 +4,9 @@ from efl import evas
4import unittest 4import unittest
5 5
6 6
7# class MyObject(evas.SmartObject): 7class MyObject(evas.SmartObject):
8 # pass 8 pass
9 9
10@unittest.skip("SmartObject disabled")
11class CanvasFactory(unittest.TestCase): 10class CanvasFactory(unittest.TestCase):
12 def setUp(self): 11 def setUp(self):
13 self.canvas = evas.Canvas(method="buffer", 12 self.canvas = evas.Canvas(method="buffer",