summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_observable.eo
blob: 2ac6ed750b143195ca78d5ec2a58ee9e95072063 (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
import efl_types;

struct @free(efl_observable_tuple_free) Efl.Observable_Tuple
{
   [[This type describes an observable touple]]
   key: string; [[Touple key]]
   data: iterator<Efl.Observer> @owned; [[Touple data]]
}

class @beta Efl.Observable extends Efl.Object {
   [[Efl observable class]]
   methods {
      observer_add {
         [[Add an observer to a group of observers.

           Note: Observers that observe this observable are grouped by the $key
           and an observer can belong to multiple groups at the same time.

           @since 1.19]]
         params {
            @in key: string; [[A key to classify observer groups]]
            @in obs: Efl.Observer; [[An observer object]]
         }
      }
      observer_del {
         [[Delete an observer from a group of observers.

           See also @.observer_add().

           @since 1.19]]
         params {
            @in key: string; [[A key to classify observer groups]]
            @in obs: Efl.Observer; [[An observer object]]
         }
      }
      observer_clean {
         [[Clear an observer from all groups of observers.

           @since 1.19]]
         params {
            @in obs: Efl.Observer; [[An observer object]]
         }
      }
      observers_iterator_new {
         [[Return a new iterator associated with a group of observers.

           @since 1.19]]
         return: iterator<Efl.Observer> @owned; [[Iterator for observers group]]
         params {
            @in key: string; [[A key to classify observer groups]]
         }
      }
      observers_update {
         [[Update all observers in a group by calling their update() method.

           @since 1.19]]
         params {
            @in key: string; [[A key to classify observer groups]]
            @in data: void_ptr; [[Required data to update observer]]
         }
      }
      iterator_tuple_new {
         [[Return a new iterator associated to this observable.

           @since 1.19]]
         return: iterator<ptr(Efl.Observable_Tuple)> @owned; [[Iterator for observer]]
      }
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.destructor;
   }
}