summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_config.eo
blob: 97266723c8a11da3bdda97127dacbb3089c54adb (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
mixin Efl.Config (Eo.Interface)
{
   [[A generic configuration interface, that holds key-value pairs.]]
   data: null;
   methods {
      /* FIXME: make this a property -- @own is a problem */
      /*
      @property config @virtual_pure {
         [[Holds a generic value under a given key.

           Most common value types are: string, int, uint, bool, double.
         ]]
         keys {
            name: string;
         }
         values {
            val: const(generic_value)*;
         }
         get {
            return: free(own(generic_value *), eina_value_free);
         }
      }
      */
      config_set @virtual_pure {
         params {
            name: string;
            val: const(generic_value)*;
         }
         return: bool; [[$false in case of error: value type was invalid, the
                         config can't be changed, config does not exist...]]
      }
      config_get @virtual_pure @const {
         params {
            name: string;
         }
         return: free(own(generic_value *), eina_value_free);
      }
      config_list_get @virtual_pure @const {
         [[Returns a list of generic values under a given key.]]
         params {
            @in name: string;
         }
         return: free(own(iterator<generic_value*>), eina_iterator_free);
      }
      @property config_bool {
         [[Helper for boolean properties (most useful in C).]]
         keys {
            name: string;
         }
         values {
            val: bool;
         }
         get {}
         set { return: bool; }
      }
      @property config_int {
         [[Helper for int properties (most useful in C).]]
         keys {
            name: string;
         }
         values {
            val: int;
         }
         get {}
         set { return: bool; }
      }
      @property config_uint {
         [[Helper for unsigned int properties (most useful in C).]]
         keys {
            name: string;
         }
         values {
            val: uint;
         }
         get {}
         set { return: bool; }
      }
      @property config_double {
         [[Helper for double properties (most useful in C).]]
         keys {
            name: string;
         }
         values {
            val: double;
         }
         get {}
         set { return: bool; }
      }
      @property config_string {
         [[Helper for string properties (most useful in C).]]
         keys {
            name: string;
         }
         values {
            val: string;
         }
         set { return: bool; }
      }
      config_string_get {
         [[Helper for string properties (most useful in C).]]
         params {
            name: string;
         }
         return: stringshare;
      }
      config_global_get @class {
         [[Get a handle on the main configuration.]]
         return: Efl.Config;
      }
   }
}

/* NOTES:
 - Elm_Color_Class list -> no need to return the struct, only the name matters
                           but also provide func to get desc from name
 - Elm_Color_Overlay -> see with Jee-Yong and his color patch (common intf)
 - elm_config_font_overlay_set -> ?
 - what else?
*/