This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository efl.
View the commit online.
commit 0fc70e2eeffe9f93d5f643be377f3f751dbf6e87
Author: Cedric BAIL <[email protected]>
AuthorDate: Sun Nov 15 12:27:22 2026 -0600
efl_mono: the model child answers for all of Efl.Model
Efl.Mono_Model_Internal_Child implemented five of the members of
Efl.Model and left children_count and children_slice_get out. Eolian
only checks for unimplemented functions on a class that is not beta,
which is why this stood, and anyone asking a model child how many
children it has called into nothing.
A child is a leaf: it has no children, and answers that way.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
src/lib/efl_mono/efl_mono_model_internal.c | 16 +++++++++++
src/lib/efl_mono/efl_mono_model_internal_child.eo | 2 ++
src/tests/efl_mono/Model.cs | 35 +++++++++++++++++++++++
3 files changed, 53 insertions(+)
diff --git a/src/lib/efl_mono/efl_mono_model_internal.c b/src/lib/efl_mono/efl_mono_model_internal.c
index ddf74af7c4..66196eb889 100644
--- a/src/lib/efl_mono/efl_mono_model_internal.c
+++ b/src/lib/efl_mono/efl_mono_model_internal.c
@@ -255,5 +255,21 @@ _efl_mono_model_internal_child_efl_model_properties_get(const Eo *obj EINA_UNUSE
return eina_array_iterator_new (pd->model_pd->properties_names);
}
+/* A child is a leaf: it carries the properties of one row and has no children. */
+static unsigned int
+_efl_mono_model_internal_child_efl_model_children_count_get(const Eo *obj EINA_UNUSED, Efl_Mono_Model_Internal_Child_Data *pd EINA_UNUSED)
+{
+ return 0;
+}
+
+static Eina_Future *
+_efl_mono_model_internal_child_efl_model_children_slice_get(Eo *obj, Efl_Mono_Model_Internal_Child_Data *pd EINA_UNUSED, unsigned int start EINA_UNUSED, unsigned int count EINA_UNUSED)
+{
+ Eina_Value array = EINA_VALUE_EMPTY;
+
+ eina_value_array_setup(&array, EINA_VALUE_TYPE_OBJECT, 0);
+ return efl_loop_future_resolved(obj, array);
+}
+
#include "efl_mono_model_internal.eo.c"
#include "efl_mono_model_internal_child.eo.c"
diff --git a/src/lib/efl_mono/efl_mono_model_internal_child.eo b/src/lib/efl_mono/efl_mono_model_internal_child.eo
index b8bf3ac1be..ba39553ec2 100644
--- a/src/lib/efl_mono/efl_mono_model_internal_child.eo
+++ b/src/lib/efl_mono/efl_mono_model_internal_child.eo
@@ -10,5 +10,7 @@ class @beta Efl.Mono_Model_Internal_Child extends Efl.Loop_Consumer implements E
Efl.Model.properties { get; }
Efl.Model.property { get; set; }
Efl.Model.child_add;
+ Efl.Model.children_count { get; }
+ Efl.Model.children_slice_get;
}
}
diff --git a/src/tests/efl_mono/Model.cs b/src/tests/efl_mono/Model.cs
index aeb6e8737f..f558a6c777 100644
--- a/src/tests/efl_mono/Model.cs
+++ b/src/tests/efl_mono/Model.cs
@@ -65,6 +65,41 @@ public static class TestModel {
task.Wait();
}
+ internal static async Task ModelChildIsALeafAsync (Efl.Loop loop)
+ {
+ var veggies = CreateModel(loop);
+
+ try
+ {
+ using (Eina.Value rows = await veggies.GetChildrenSliceAsync(0, 1).ConfigureAwait(false))
+ {
+ var child = (Efl.IModel)rows[0];
+ Test.AssertEquals(0, (int)child.ChildrenCount);
+
+ using (Eina.Value children = await child.GetChildrenSliceAsync(0, 1).ConfigureAwait(false))
+ {
+ Test.AssertEquals(Eina.ValueType.Array, children.GetValueType());
+ Test.AssertEquals(0, children.Count());
+ }
+ }
+ }
+ finally
+ {
+ loop.End();
+ veggies.Dispose();
+ }
+ }
+
+ public static void model_child_is_a_leaf ()
+ {
+ Efl.Loop loop = Efl.App.AppMain;
+ Task task = ModelChildIsALeafAsync(loop);
+
+ loop.Begin();
+
+ task.Wait();
+ }
+
public static void factory_test ()
{
string propertyBound = null;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.