summaryrefslogtreecommitdiff
path: root/src/lib/ecore/efl_model_container.eo
blob: a3305d4cf829ca51a4fad0b2254471a3a3c177d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import eina_types;

class Efl.Model.Container (Efl.Object, Efl.Model)
{
   [[
     Class used to create data models from Eina containers.

     Each container supplied represent a series of property values, each item
     being the property value for a child object (@Efl.Model.Container.Item).

     The data in the given containers are copied and stored internally.

     Several containers can be supplied, and the number of allocated children is
     based on the container with the biggest size.
   ]]
   methods {
      child_property_value_type_get {
         [[Gets the type of the given property.]]
         params {
            name: string; [[Property name]]
         }
         return: ptr(const(Eina.Value.Type)); [[Property type]]
      }
      child_property_values_get {
         [[Gets the values for the given property.]]
         params {
            name: string; [[Property name]]
         }
         return: free(own(iterator<void_ptr>), eina_iterator_free) @warn_unused;
         [[The currently wrapped values]]
      }
      child_property_add {
         [[Adds the given property to child objects and supply the values.

           Each item will represent the value of the given property in the
           respective child within the data model.

           New children objects are allocated as necessary.

           Value type is required for compatibility with the @Efl.Model API.]]
         params {
            name: string; [[Property name]]
            type: ptr(const(Eina.Value.Type)); [[Property type]]
            values: own(iterator<const(void_ptr)>); [[Values to be added]]
         }
         return: bool; [[$true on success, $false otherwise]]
      }
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.destructor;
      Efl.Model.properties { get; }
      Efl.Model.property_set;
      Efl.Model.property_get;
      Efl.Model.child_add;
      Efl.Model.child_del;
      Efl.Model.children_slice_get;
      Efl.Model.children_count_get;
   }
}