summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_config.eo
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-06-23 19:33:34 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-06-24 17:10:21 +0900
commit07613bf2f6ef322e6a4b9cf68249b3b8297788b7 (patch)
tree00b35a648a07a93ce81ed30fa5c0e9d09d4e091d /src/lib/efl/interfaces/efl_config.eo
parent8b8430214a6559a0a540b298b768e49a39f84113 (diff)
config: Simplify Efl.Config API, make C helpers only
This removes the mixin functions and uses static inline functions instead. Much cleaner, looks the same to C devs.
Diffstat (limited to 'src/lib/efl/interfaces/efl_config.eo')
-rw-r--r--src/lib/efl/interfaces/efl_config.eo91
1 files changed, 4 insertions, 87 deletions
diff --git a/src/lib/efl/interfaces/efl_config.eo b/src/lib/efl/interfaces/efl_config.eo
index 9726672..1d9722b 100644
--- a/src/lib/efl/interfaces/efl_config.eo
+++ b/src/lib/efl/interfaces/efl_config.eo
@@ -1,27 +1,9 @@
1mixin Efl.Config (Eo.Interface) 1interface Efl.Config ()
2{ 2{
3 [[A generic configuration interface, that holds key-value pairs.]] 3 [[A generic configuration interface, that holds key-value pairs.]]
4 data: null;
5 methods { 4 methods {
6 /* FIXME: make this a property -- @own is a problem */ 5 /* FIXME: make this a property -- @own is a problem */
7 /* 6 config_set {
8 @property config @virtual_pure {
9 [[Holds a generic value under a given key.
10
11 Most common value types are: string, int, uint, bool, double.
12 ]]
13 keys {
14 name: string;
15 }
16 values {
17 val: const(generic_value)*;
18 }
19 get {
20 return: free(own(generic_value *), eina_value_free);
21 }
22 }
23 */
24 config_set @virtual_pure {
25 params { 7 params {
26 name: string; 8 name: string;
27 val: const(generic_value)*; 9 val: const(generic_value)*;
@@ -29,84 +11,19 @@ mixin Efl.Config (Eo.Interface)
29 return: bool; [[$false in case of error: value type was invalid, the 11 return: bool; [[$false in case of error: value type was invalid, the
30 config can't be changed, config does not exist...]] 12 config can't be changed, config does not exist...]]
31 } 13 }
32 config_get @virtual_pure @const { 14 config_get @const {
33 params { 15 params {
34 name: string; 16 name: string;
35 } 17 }
36 return: free(own(generic_value *), eina_value_free); 18 return: free(own(generic_value *), eina_value_free);
37 } 19 }
38 config_list_get @virtual_pure @const { 20 config_list_get @const {
39 [[Returns a list of generic values under a given key.]] 21 [[Returns a list of generic values under a given key.]]
40 params { 22 params {
41 @in name: string; 23 @in name: string;
42 } 24 }
43 return: free(own(iterator<generic_value*>), eina_iterator_free); 25 return: free(own(iterator<generic_value*>), eina_iterator_free);
44 } 26 }
45 @property config_bool {
46 [[Helper for boolean properties (most useful in C).]]
47 keys {
48 name: string;
49 }
50 values {
51 val: bool;
52 }
53 get {}
54 set { return: bool; }
55 }
56 @property config_int {
57 [[Helper for int properties (most useful in C).]]
58 keys {
59 name: string;
60 }
61 values {
62 val: int;
63 }
64 get {}
65 set { return: bool; }
66 }
67 @property config_uint {
68 [[Helper for unsigned int properties (most useful in C).]]
69 keys {
70 name: string;
71 }
72 values {
73 val: uint;
74 }
75 get {}
76 set { return: bool; }
77 }
78 @property config_double {
79 [[Helper for double properties (most useful in C).]]
80 keys {
81 name: string;
82 }
83 values {
84 val: double;
85 }
86 get {}
87 set { return: bool; }
88 }
89 @property config_string {
90 [[Helper for string properties (most useful in C).]]
91 keys {
92 name: string;
93 }
94 values {
95 val: string;
96 }
97 set { return: bool; }
98 }
99 config_string_get {
100 [[Helper for string properties (most useful in C).]]
101 params {
102 name: string;
103 }
104 return: stringshare;
105 }
106 config_global_get @class {
107 [[Get a handle on the main configuration.]]
108 return: Efl.Config;
109 }
110 } 27 }
111} 28}
112 29