forked from enlightenment/efl
pyolian: add support for object retrieval
This commit is contained in:
parent
f24fa691e7
commit
bee3114c2c
|
@ -350,6 +350,14 @@ class Eolian_Unit(EolianBaseObject):
|
|||
def file(self):
|
||||
return _str_to_py(lib.eolian_unit_file_get(self._obj))
|
||||
|
||||
@property
|
||||
def objects(self):
|
||||
return Iterator(Object, lib.eolian_unit_objects_get(self._obj))
|
||||
|
||||
def object_by_name_get(self, name):
|
||||
c_obj = lib.eolian_unit_object_by_name_get(self._obj, _str_to_bytes(name))
|
||||
return Object(c_obj) if c_obj else None
|
||||
|
||||
@property
|
||||
def classes(self):
|
||||
return Iterator(Class, lib.eolian_unit_classes_get(self._obj))
|
||||
|
@ -464,6 +472,18 @@ class Eolian_State(Eolian_Unit):
|
|||
def units(self):
|
||||
return Iterator(Eolian_Unit, lib.eolian_state_units_get(self._obj))
|
||||
|
||||
@property
|
||||
def objects(self):
|
||||
return Iterator(Object, lib.eolian_state_objects_get(self._obj))
|
||||
|
||||
def object_by_name_get(self, name):
|
||||
c_obj = lib.eolian_state_object_by_name_get(self._obj, _str_to_bytes(name))
|
||||
return Object(c_obj) if c_obj else None
|
||||
|
||||
def objects_by_file_get(self, file_name):
|
||||
return Iterator(Object,
|
||||
lib.eolian_state_objects_by_file_get(self._obj, _str_to_bytes(file_name)))
|
||||
|
||||
@property
|
||||
def classes(self):
|
||||
return Iterator(Class, lib.eolian_state_classes_get(self._obj))
|
||||
|
|
|
@ -93,6 +93,18 @@ lib.eolian_state_unit_by_file_get.restype = c_void_p
|
|||
lib.eolian_state_units_get.argtypes = [c_void_p,]
|
||||
lib.eolian_state_units_get.restype = c_void_p
|
||||
|
||||
# EAPI const Eolian_Object *eolian_state_object_by_name_get(const Eolian_State *state, const char *name);
|
||||
lib.eolian_state_object_by_name_get.argtypes = [c_void_p, c_char_p]
|
||||
lib.eolian_state_object_by_name_get.restype = c_void_p
|
||||
|
||||
# EAPI Eina_Iterator *eolian_state_objects_by_file_get(const Eolian_State *state, const char *file_name);
|
||||
lib.eolian_state_object_by_file_get.argtypes = [c_void_p, c_char_p]
|
||||
lib.eolian_state_object_by_file_get.restype = c_void_p
|
||||
|
||||
# EAPI Eina_Iterator *eolian_state_objects_get(const Eolian_State *state);
|
||||
lib.eolian_state_objects_get.argtypes = [c_void_p]
|
||||
lib.eolian_state_objects_get.restype = c_void_p
|
||||
|
||||
# EAPI const Eolian_Class *eolian_state_class_by_name_get(const Eolian_State *state, const char *class_name);
|
||||
lib.eolian_state_class_by_name_get.argtypes = [c_void_p, c_char_p]
|
||||
lib.eolian_state_class_by_name_get.restype = c_void_p
|
||||
|
@ -175,6 +187,14 @@ lib.eolian_unit_children_get.restype = c_void_p
|
|||
lib.eolian_unit_file_get.argtypes = [c_void_p,]
|
||||
lib.eolian_unit_file_get.restype = c_char_p
|
||||
|
||||
# EAPI const Eolian_Object *eolian_unit_object_by_name_get(const Eolian_Unit *unit, const char *name);
|
||||
lib.eolian_unit_object_by_name_get.argtypes = [c_void_p, c_char_p]
|
||||
lib.eolian_unit_object_by_name_get.restype = c_void_p
|
||||
|
||||
# EAPI Eina_Iterator *eolian_unit_objects_get(const Eolian_Unit *unit);
|
||||
lib.eolian_unit_objects_get.argtypes = [c_void_p]
|
||||
lib.eolian_unit_objects_get.restype = c_void_p
|
||||
|
||||
# EAPI const Eolian_Class *eolian_unit_class_by_name_get(const Eolian_Unit *unit, const char *class_name);
|
||||
lib.eolian_unit_class_by_name_get.argtypes = [c_void_p, c_char_p]
|
||||
lib.eolian_unit_class_by_name_get.restype = c_void_p
|
||||
|
|
Loading…
Reference in New Issue