aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/pyolian
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/pyolian')
-rw-r--r--src/scripts/pyolian/eolian.py20
-rw-r--r--src/scripts/pyolian/eolian_lib.py20
2 files changed, 40 insertions, 0 deletions
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index db4b35fad0..e3ce9d68e2 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -351,6 +351,14 @@ class Eolian_Unit(EolianBaseObject):
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))
@@ -465,6 +473,18 @@ class Eolian_State(Eolian_Unit):
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))
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py
index 26d631234c..e226bc1763 100644
--- a/src/scripts/pyolian/eolian_lib.py
+++ b/src/scripts/pyolian/eolian_lib.py
@@ -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