summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_pack.eo
blob: 0c7b3304723214a772b68a1535a2e1855dbb3f5b (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
interface Efl.Pack extends Efl.Container
{
   [[Common interface for objects (containers) with multiple contents
     (sub-objects) which can be added and removed at runtime.

     @since 1.23
   ]]
   methods
   {
      pack_clear {
         [[Removes all packed sub-objects and unreferences them.]]
         return: bool; [[$true on success, $false otherwise.]]
      }
      unpack_all {
         [[Removes all packed sub-objects without unreferencing them.

           Use with caution.
         ]]
         return: bool; [[$true on success, $false otherwise.]]
      }
      unpack {
         [[Removes an existing sub-object from the container without deleting it.]]
         params {
            subobj: Efl.Gfx.Entity; [[The sub-object to unpack.]]
         }
         return: bool; [[$false if $subobj wasn't in the container or couldn't be removed.]]
      }
      pack {
         [[Adds a sub-object to this container.

           Depending on the container this will either fill in the default
           spot, replacing any already existing element or append to the end
           of the container if there is no default part.

           When this container is deleted, it will request deletion of the
           given $subobj. Use @.unpack to remove $subobj from this container
           without deleting it.
         ]]
         params {
            subobj: Efl.Gfx.Entity; [[The object to pack.]]
         }
         return: bool; [[$false if $subobj could not be packed.]]
      }
   }
}