summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--TODO3
-rw-r--r--efl/edje/efl.edje.pyx6
-rw-r--r--include/efl.pxd8
-rw-r--r--tests/edje/test_01_basics.py10
4 files changed, 15 insertions, 12 deletions
diff --git a/TODO b/TODO
index a927ca5..13597ab 100644
--- a/TODO
+++ b/TODO
@@ -3,9 +3,6 @@ BUGS:
3 3
4* Evas: smart object doesn't work 4* Evas: smart object doesn't work
5 5
6* edje.color_class_list() is broken in C (disabled in edje/test_01_basics.py)
7* edje.text_class_list() is broken in C (disabled out in edje/test_01_basics.py)
8
9 6
10TODO: 7TODO:
11 8
diff --git a/efl/edje/efl.edje.pyx b/efl/edje/efl.edje.pyx
index cab35af..cbc7c4e 100644
--- a/efl/edje/efl.edje.pyx
+++ b/efl/edje/efl.edje.pyx
@@ -231,7 +231,7 @@ def color_class_list():
231 lst = edje_color_class_list() 231 lst = edje_color_class_list()
232 itr = lst 232 itr = lst
233 while itr: 233 while itr:
234 ret.append(<char*>itr.data) 234 ret.append(_touni(<char*>itr.data))
235 libc.stdlib.free(itr.data) 235 libc.stdlib.free(itr.data)
236 itr = itr.next 236 itr = itr.next
237 eina_list_free(lst) 237 eina_list_free(lst)
@@ -252,8 +252,8 @@ def text_class_list():
252 lst = edje_text_class_list() 252 lst = edje_text_class_list()
253 itr = lst 253 itr = lst
254 while itr: 254 while itr:
255 ret.append(<char*>itr.data) 255 ret.append(_touni(<char*>itr.data))
256 libc.stdlib.free(itr.data) 256 eina_stringshare_del(<Eina_Stringshare*>itr.data)
257 itr = itr.next 257 itr = itr.next
258 eina_list_free(lst) 258 eina_list_free(lst)
259 return ret 259 return ret
diff --git a/include/efl.pxd b/include/efl.pxd
index 3680859..62f7af6 100644
--- a/include/efl.pxd
+++ b/include/efl.pxd
@@ -18,6 +18,7 @@
18 18
19cdef extern from *: 19cdef extern from *:
20 ctypedef char* const_char_ptr "const char *" 20 ctypedef char* const_char_ptr "const char *"
21 ctypedef char const_char "const char"
21 ctypedef void const_void "const void" 22 ctypedef void const_void "const void"
22 23
23cdef extern from "stdlib.h": 24cdef extern from "stdlib.h":
@@ -57,6 +58,7 @@ cdef extern from "Eina.h":
57 # 58 #
58 ctypedef unsigned char Eina_Bool 59 ctypedef unsigned char Eina_Bool
59 ctypedef int Eina_Error 60 ctypedef int Eina_Error
61 ctypedef const_char Eina_Stringshare
60 62
61 #################################################################### 63 ####################################################################
62 # Structures 64 # Structures
@@ -99,6 +101,12 @@ cdef extern from "Eina.h":
99 101
100 Eina_Bool eina_iterator_next(Eina_Iterator *iterator, void **data) 102 Eina_Bool eina_iterator_next(Eina_Iterator *iterator, void **data)
101 void eina_iterator_free(Eina_Iterator *iterator) 103 void eina_iterator_free(Eina_Iterator *iterator)
104
105 Eina_Stringshare *eina_stringshare_add_length(const_char_ptr str, unsigned int slen)
106 Eina_Stringshare *eina_stringshare_add(const_char_ptr str)
107 void eina_stringshare_del(Eina_Stringshare *str)
108 Eina_Stringshare *eina_stringshare_ref(Eina_Stringshare *str)
109 int eina_stringshare_strlen(Eina_Stringshare *str)
102 110
103 Eina_List *eina_list_free(Eina_List *list) 111 Eina_List *eina_list_free(Eina_List *list)
104 Eina_List *eina_list_append(Eina_List *list, void *data) 112 Eina_List *eina_list_append(Eina_List *list, void *data)
diff --git a/tests/edje/test_01_basics.py b/tests/edje/test_01_basics.py
index 85f8baa..318a35a 100644
--- a/tests/edje/test_01_basics.py
+++ b/tests/edje/test_01_basics.py
@@ -38,7 +38,6 @@ class TestBasics(unittest.TestCase):
38 edje.collection_cache_set(32) 38 edje.collection_cache_set(32)
39 self.assertEqual(edje.collection_cache_get(), 32) 39 self.assertEqual(edje.collection_cache_get(), 32)
40 40
41 @unittest.skip("BROKEN ALSO IN C")
42 def testColorClasses(self): 41 def testColorClasses(self):
43 edje.color_class_set("MyColorClass", 42 edje.color_class_set("MyColorClass",
44 100, 150, 200, 255, 43 100, 150, 200, 255,
@@ -49,22 +48,21 @@ class TestBasics(unittest.TestCase):
49 101, 151, 201, 255, 48 101, 151, 201, 255,
50 102, 152, 202, 255)) 49 102, 152, 202, 255))
51 50
52 # THIS IS BROKEN ALSO IN C 51 self.assertEqual(edje.color_class_list(), ["MyColorClass"])
53 # self.assertEqual(edje.color_class_list(), ["MyColorClass"])
54 52
55 edje.color_class_del("MyColorClass") 53 edje.color_class_del("MyColorClass")
56 self.assertEqual(edje.color_class_get("MyColorClass"), 54 self.assertEqual(edje.color_class_get("MyColorClass"),
57 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) 55 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
58 self.assertEqual(edje.color_class_list(), []) 56 self.assertEqual(edje.color_class_list(), [])
59 57
60 @unittest.skip("BROKEN ALSO IN C")
61 def testTextClasses(self): 58 def testTextClasses(self):
62 edje.text_class_set("MyTextClass", "Sans", 12) 59 edje.text_class_set("MyTextClass", "Sans", 12)
60 edje.text_class_set("MySecondTextClass", "Sans", 6)
63 61
64 # THIS IS BROKEN ALSO IN C 62 self.assertEqual(edje.text_class_list(), ["MyTextClass", "MySecondTextClass"])
65 # self.assertEqual(edje.text_class_list(), ["MyTextClass"])
66 63
67 edje.text_class_del("MyTextClass") 64 edje.text_class_del("MyTextClass")
65 edje.text_class_del("MySecondTextClass")
68 self.assertEqual(edje.text_class_list(), []) 66 self.assertEqual(edje.text_class_list(), [])
69 67
70 def testAvailableModules(self): 68 def testAvailableModules(self):