summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_part.eo
blob: 1f37e7e4ab4efa8664552b696e99b57f000f1590 (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
import efl_object;

interface Efl.Part
{
   [[Interface for objects supporting named parts.

     An object implementing this interface will be able to
     provide access to some of its sub-objects by name.
     This gives access to parts as defined in a widget's
     theme.

     Part proxy objects have a special lifetime that
     is limited to one and only one function call. This
     behavior is implemented in efl_part() which call
     Efl.Part.part_get(). Calling Efl.Part.part_get() directly
     should be avoided.

     In other words, the caller does not hold a reference
     to this proxy object. It may be possible, in languages
     that allow it, to get an extra reference to this part
     object and extend its lifetime to more than a single
     function call.

     In pseudo-code, this means only the following two
     use cases are supported:

       obj.func(part(obj, "part"), args)

     And:

       part = ref(part(obj, "part"))
       func1(part, args)
       func2(part, args)
       func3(part, args)
       unref(part)
   ]]
   methods {
      part_get @protected @const {
         [[Get a proxy object referring to a part of an object.
         ]]
         params {
            name: string; [[The part name.]]
         }
         return: Efl.Object; [[A (proxy) object, valid for a single call.]]
      }
   }
}