summaryrefslogtreecommitdiff
path: root/efl/emotion
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2013-08-19 12:56:22 +0200
committerdavemds <dave@gurumeditation.it>2013-08-19 12:56:22 +0200
commitd53b481d4d96dc6f39c16e93803e3148f491bbf5 (patch)
tree221d8231a36ce689b7dc053a248993596348581b /efl/emotion
parent42376b27fcaa4a48ff392436af1593e5a9617d5f (diff)
PythonEFL: emotion_extension_may_play_get() does not need an obj instance, moved out of the Emotion class.
Diffstat (limited to 'efl/emotion')
-rw-r--r--efl/emotion/efl.emotion.pyx32
1 files changed, 15 insertions, 17 deletions
diff --git a/efl/emotion/efl.emotion.pyx b/efl/emotion/efl.emotion.pyx
index 72af527..fa39807 100644
--- a/efl/emotion/efl.emotion.pyx
+++ b/efl/emotion/efl.emotion.pyx
@@ -103,7 +103,6 @@ class EmotionModuleInitError(Exception):
103def init(): 103def init():
104 return emotion_init() 104 return emotion_init()
105 105
106
107def shutdown(): 106def shutdown():
108 return emotion_shutdown() 107 return emotion_shutdown()
109 108
@@ -127,6 +126,21 @@ def webcams_get():
127 itr = itr.next 126 itr = itr.next
128 return ret 127 return ret
129 128
129def extension_may_play_get(filename):
130 """ Do we have a chance to play that file?
131
132 This just actually look at the extention of the file, it doesn't check
133 the mime-type nor if the file is actually sane. So this is just an
134 hint for your application.
135
136 :param filename: A filename that we want to know if Emotion can play.
137 :type filename: str
138
139 """
140 if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
141 return bool(emotion_object_extension_may_play_get(
142 <const_char *>filename if filename is not None else NULL))
143
130 144
131cdef class Emotion(evasObject): 145cdef class Emotion(evasObject):
132 """ The emotion object 146 """ The emotion object
@@ -456,7 +470,6 @@ cdef class Emotion(evasObject):
456 def suspend_set(self, Emotion_Suspend a): 470 def suspend_set(self, Emotion_Suspend a):
457 emotion_object_suspend_set(self.obj, a) 471 emotion_object_suspend_set(self.obj, a)
458 472
459
460 property buffer_size: 473 property buffer_size:
461 """ The percentual size of the buffering cache. 474 """ The percentual size of the buffering cache.
462 475
@@ -999,21 +1012,6 @@ cdef class Emotion(evasObject):
999 """ 1012 """
1000 emotion_object_last_position_save(self.obj) 1013 emotion_object_last_position_save(self.obj)
1001 1014
1002 def extension_may_play_get(self, filename):
1003 """ Do we have a chance to play that file?
1004
1005 This just actually look at the extention of the file, it doesn't check
1006 the mime-type nor if the file is actually sane. So this is just an
1007 hint for your application.
1008
1009 :param filename: A filename that we want to know if Emotion can play.
1010 :type filename: str
1011
1012 """
1013 if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
1014 return bool(emotion_object_extension_may_play_get(
1015 <const_char *>filename if filename is not None else NULL))
1016
1017 def image_get(self): 1015 def image_get(self):
1018 """ Get the actual image object (:py:class:`efl.evas.Object`) of the 1016 """ Get the actual image object (:py:class:`efl.evas.Object`) of the
1019 emotion object. 1017 emotion object.