summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_pack_linear.eo
blob: 3ff3f017b66211b5b444a6a44bd5a93fb8a9beed (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import efl_orientation;

/* FIXME: Efl.Pack.Linear */
interface Efl.Pack_Linear (Efl.Pack)
{
   [[API for containers ]]
   legacy_prefix: null;
   eo_prefix: efl_pack;
   methods {
      pack_begin {
         [[Prepend an object at the beginning of this container.

           This is the same as @.pack_at($subobj, 0).
         ]]
         params {
            @in subobj: own(Efl.Gfx.Base *); [[Item to pack.]]
         }
         return: bool; [[$false if $subobj could not be packed]]
      }
      pack_end {
         [[Append object at the end of this container.

           This is the same as @.pack_at($subobj, -1).
         ]]
         params {
            @in subobj: own(Efl.Gfx.Base *); [[Item to pack.]]
         }
         return: bool; [[$false if $subobj could not be packed]]
      }
      pack_before {
         [[Prepend item before other sub object.]]
         params {
            @in subobj:   own(Efl.Gfx.Base *);   [[Item to pack.]]
            @in existing: const(Efl.Gfx.Base)*;  [[Item to refer to.]]
         }
         return: bool; [[$false if $existing could not be found or $subobj
                         could not be packed]]
      }
      pack_after {
         [[Append item after other sub object.]]
         params {
            @in subobj:   own(Efl.Gfx.Base *);   [[Item to pack.]]
            @in existing: const(Efl.Gfx.Base)*;  [[Item to refer to.]]
         }
         return: bool; [[$false if $existing could not be found or $subobj
                         could not be packed]]
      }
      pack_at {
          [[Inserts $subobj at the specified $index.

            Valid range: -$count to +$count. -1 refers to the last element.
            Out of range indices will trigger an append.
          ]]
          params {
             @in subobj: own(Efl.Gfx.Base *); [[Item to pack.]]
             @in index:  int;                 [[A position.]]
          }
          return: bool; [[$false if $subobj could not be packed]]
      }
      pack_content_get {
         [[Content at a given index in this container.

           Index -1 refers to the last item. The valid range is -(count - 1) to
           (count - 1).
         ]]
         params {
            index: int;
         }
         return: Efl.Gfx.Base *; [[The object contained at the given $index.]]
      }
      pack_index_get {
         [[Get the index of a child in this container.]]
         params {
            subobj: const(Efl.Gfx.Base)*; [[An object contained in this pack.]]
         }
         return: int(-1); [[-1 in case of failure, or the index of this item.]]
      }
      pack_unpack_at {
         [[Pop out item at specified $index.

           Equivalent to unpack(content_at($index)).
         ]]
         params {
            index: int;
         }
         return: Efl.Gfx.Base*; [[The child item if it could be removed.]]
      }
      @property pack_direction {
         [[Primary up/left/right/down orientation. Default is right.]]
         set {}
         get {}
         values {
            orient: Efl.Orient;
         }
      }
   }
}