summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2015-03-21 10:06:45 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2015-03-21 10:06:45 +0200
commit0266db28bdc943cec09d14220b16e257a5e13ff7 (patch)
treee495c84419eadcb7b939957fa1a4d2482d8cd929
parentc547f72374743ddf8bffe1bd3f63aebc6c0b04fd (diff)
Eo: Add the property 'parent'
-rw-r--r--efl/eo/efl.eo.pyx22
1 files changed, 12 insertions, 10 deletions
diff --git a/efl/eo/efl.eo.pyx b/efl/eo/efl.eo.pyx
index 604ea1e..43411a4 100644
--- a/efl/eo/efl.eo.pyx
+++ b/efl/eo/efl.eo.pyx
@@ -294,22 +294,24 @@ cdef class Eo(object):
294 """ 294 """
295 return bool(self.obj == NULL) 295 return bool(self.obj == NULL)
296 296
297 def parent_set(self, Eo parent): 297 property parent:
298 """Set the parent object. 298 """The parent object
299 299
300 :param parent: The object to set as parent. 300 :type: :class:`Eo`
301 :type parent: :class:`Eo`
302 301
303 """ 302 """
304 eo_do(self.obj, eo_parent_set(parent.obj)) 303 def __set__(self, Eo parent):
304 eo_do(self.obj, eo_parent_set(parent.obj))
305 305
306 def parent_get(self): 306 def __get__(self):
307 """Get the parent object. 307 cdef cEo *parent = NULL
308 parent = <cEo *>eo_do_ret(self.obj, parent, eo_parent_get())
309 return object_from_instance(parent)
308 310
309 :return: The parent object 311 def parent_set(self, Eo parent):
310 :rtype: :class:`Eo` 312 eo_do(self.obj, eo_parent_set(parent.obj))
311 313
312 """ 314 def parent_get(self):
313 cdef cEo *parent = NULL 315 cdef cEo *parent = NULL
314 parent = <cEo *>eo_do_ret(self.obj, parent, eo_parent_get()) 316 parent = <cEo *>eo_do_ret(self.obj, parent, eo_parent_get())
315 return object_from_instance(parent) 317 return object_from_instance(parent)