summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-05 17:00:37 -0500
committerCedric BAIL <cedric.bail@free.fr>2019-03-07 14:16:09 -0800
commitd6f280a42f4ca2b097d08f9701ac385cfc15bde1 (patch)
treeb901848b389ed6ef758a58a026a03fbc13ce772e /src
parent0c45b94decc4441b9fbea85db8f33b7dc91b7c81 (diff)
elm_prefs: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in efl and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8194
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Elementary.am5
-rw-r--r--src/lib/elementary/elm_prefs.c4
-rw-r--r--src/lib/elementary/elm_prefs.eo227
-rw-r--r--src/lib/elementary/elm_prefs_eo.c159
-rw-r--r--src/lib/elementary/elm_prefs_eo.h381
-rw-r--r--src/lib/elementary/elm_prefs_eo.legacy.c96
-rw-r--r--src/lib/elementary/elm_prefs_eo.legacy.h329
-rw-r--r--src/lib/elementary/elm_prefs_legacy.h2
-rw-r--r--src/lib/elementary/meson.build3
9 files changed, 974 insertions, 232 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index b39f7d6..3bca800 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -207,7 +207,6 @@ elm_legacy_eolian_files = \
207 lib/elementary/elm_actionslider_part.eo \ 207 lib/elementary/elm_actionslider_part.eo \
208 lib/elementary/elm_bubble_part.eo \ 208 lib/elementary/elm_bubble_part.eo \
209 lib/elementary/elm_fileselector_part.eo \ 209 lib/elementary/elm_fileselector_part.eo \
210 lib/elementary/elm_prefs.eo \
211 lib/elementary/elm_segment_control.eo \ 210 lib/elementary/elm_segment_control.eo \
212 lib/elementary/elm_segment_control_item.eo \ 211 lib/elementary/elm_segment_control_item.eo \
213 lib/elementary/elm_separator.eo \ 212 lib/elementary/elm_separator.eo \
@@ -379,6 +378,8 @@ lib/elementary/elm_plug_eo.legacy.c \
379lib/elementary/elm_popup_eo.c \ 378lib/elementary/elm_popup_eo.c \
380lib/elementary/elm_popup_eo.legacy.c \ 379lib/elementary/elm_popup_eo.legacy.c \
381lib/elementary/elm_popup_item_eo.c \ 380lib/elementary/elm_popup_item_eo.c \
381lib/elementary/elm_prefs_eo.c \
382lib/elementary/elm_prefs_eo.legacy.c \
382$(NULL) 383$(NULL)
383 384
384elm_legacy_eo_headers = \ 385elm_legacy_eo_headers = \
@@ -548,6 +549,8 @@ lib/elementary/elm_popup_eo.h \
548lib/elementary/elm_popup_eo.legacy.h \ 549lib/elementary/elm_popup_eo.legacy.h \
549lib/elementary/elm_popup_item_eo.h \ 550lib/elementary/elm_popup_item_eo.h \
550lib/elementary/elm_popup_item_eo.legacy.h \ 551lib/elementary/elm_popup_item_eo.legacy.h \
552lib/elementary/elm_prefs_eo.h \
553lib/elementary/elm_prefs_eo.legacy.h \
551$(NULL) 554$(NULL)
552 555
553 556
diff --git a/src/lib/elementary/elm_prefs.c b/src/lib/elementary/elm_prefs.c
index 9845579..edd2213 100644
--- a/src/lib/elementary/elm_prefs.c
+++ b/src/lib/elementary/elm_prefs.c
@@ -7,7 +7,7 @@
7#include <Elementary.h> 7#include <Elementary.h>
8 8
9#include "elm_priv.h" 9#include "elm_priv.h"
10#include "elm_prefs.eo.h" 10#include "elm_prefs_eo.h"
11#include "elm_widget_prefs.h" 11#include "elm_widget_prefs.h"
12#include "elm_prefs_edd.x" 12#include "elm_prefs_edd.x"
13 13
@@ -1860,4 +1860,4 @@ elm_prefs_file_get(const Eo *obj, const char **file, const char **page)
1860#define ELM_PREFS_EXTRA_OPS \ 1860#define ELM_PREFS_EXTRA_OPS \
1861 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_prefs) 1861 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_prefs)
1862 1862
1863#include "elm_prefs.eo.c" 1863#include "elm_prefs_eo.c"
diff --git a/src/lib/elementary/elm_prefs.eo b/src/lib/elementary/elm_prefs.eo
deleted file mode 100644
index e76e57d..0000000
--- a/src/lib/elementary/elm_prefs.eo
+++ /dev/null
@@ -1,227 +0,0 @@
1type Elm_Prefs_Data: __undefined_type; [[Elementary preferences data type]]
2type Elm_Prefs_Reset_Mode: __undefined_type; [[Elementary preferences reset mode type]]
3
4class Elm.Prefs extends Efl.Ui.Widget implements Efl.Ui.Legacy
5{
6 [[Elementary preferences class]]
7 legacy_prefix: elm_prefs;
8 eo_prefix: elm_obj_prefs;
9 event_prefix: elm_prefs;
10 methods {
11 @property data {
12 [[Set user data for a given prefs widget
13
14 Once a prefs widget is created, after elm_prefs_file_set() is
15 issued on it, all of its UI elements will get default values, when
16 declared on that file. To fetch an user's own, personal set of
17 those values, one gets to pair a prefs data handle to the
18 prefs widget. This is what this call is intended for.
19
20 Prefs data values from $prefs_data with keys matching the ones
21 present on the file passed on elm_prefs_file_set() to $obj will
22 have their values applied to the respective UI elements of the
23 widget.
24
25 When $obj dies, the values of the elements declared on its
26 $.epb file (the one set on elm_prefs_file_set()) marked as permanent
27 will be written back to prefs_data, if it is writable.
28 One is also able to make this writing event to take place
29 automatically after each UI element modification by using
30 elm_prefs_autosave_set().
31
32 Note: $obj will keep a reference of its own for $prefs_data,
33 but you should still unreference it by yourself, after the widget
34 is gone.
35
36 @since 1.8]]
37 set {
38 return: bool; [[$true, on success, $false otherwise]]
39 }
40 get {
41 }
42 values {
43 data: ptr(Elm_Prefs_Data) @nullable; [[A valid prefs_data handle]]
44 }
45 }
46 @property autosave {
47 [[Control whether a given prefs widget should save its values back (on
48 the user data file, if set) automatically on every UI element
49 changes.
50
51 If $autosave is $true, every call to
52 elm_prefs_item_value_set(), every
53 Elm_Prefs_Data_Event_Type.ELM_PREFS_DATA_EVENT_ITEM_CHANGED event
54 coming for its prefs data and every UI element direct value
55 changing will implicitly make the prefs values to be flushed back
56 to it prefs data. If a prefs data handle with no writing
57 permissions or no prefs data is set on $prefs, naturally nothing
58 will happen.
59
60 @since 1.8]]
61 set {
62 }
63 get {
64 }
65 values {
66 autosave: bool; [[$true to save automatically, $false otherwise.]]
67 }
68 }
69 reset {
70 [[Reset the values of a given prefs widget to a previous state.
71
72 As can be seen on #Elm_Prefs_Reset_Mode, there are two possible
73 actions to be taken by this call -- either to reset $prefs'
74 values to the defaults (declared on the $.epb file it is bound
75 to) or to reset to the state they were before the last modification
76 it got.
77
78 @since 1.8]]
79
80 params {
81 @in mode: Elm_Prefs_Reset_Mode; [[The reset mode to apply on $prefs]]
82 }
83 }
84 item_value_set {
85 [[Set the value on a given prefs widget's item.
86
87 This will change the value of item named $name programatically.
88
89 @since 1.8]]
90
91 return: bool; [[$true, on success, $false otherwise]]
92 params {
93 @in name: string; [[The name of the item (as declared in the prefs collection)]]
94 @in value: const(any_value_ptr); [[The value to set on the item. It should be typed as the item expects, preferably, or a conversion will take place]]
95 }
96 }
97 item_value_get @const {
98 [[Get the value of a given prefs widget's item.
99
100 This will retrieve the value of item named $name.
101
102 @since 1.8]]
103 return: bool; [[$true, on success, $false otherwise]]
104
105 params {
106 @in name: string; [[The name of the item (as declared in the prefs collection) to get value from]]
107 @out value: any_value; [[Where to store the value of the item. It will be overwritten and setup with the type the item is bound to]]
108 }
109 }
110 item_object_get {
111 [[Get the Elementary widget bound to a given prefs widget's item.
112
113 This will retrieve a handle to the real widget implementing a given
114 item of $prefs, <b>for read-only</b> actions.
115
116 Warning: You should never modify the state of the returned
117 widget, because it's meant to be managed by $prefs, solely.
118
119 @since 1.8]]
120
121 return: const(Efl.Canvas.Object); [[A valid widget handle, on success, or $NULL, otherwise]]
122 params {
123 @in name: string; [[The name of the item (as declared in the prefs collection) to get object from]]
124 }
125 }
126 item_disabled_set {
127 [[Set whether the widget bound to a given prefs widget's item is disabled or not.
128
129 @since 1.8]]
130
131 params {
132 @in name: string; [[The name of the item (as declared in the prefs collection) to act on]]
133 @in disabled: bool; [[$true, to make it disabled, $false otherwise]]
134 }
135 }
136 item_disabled_get @const {
137 [[Get whether the widget bound to a given prefs widget's item is disabled or not.
138
139 @since 1.8]]
140 return: bool; [[$true, if it is disabled, $false otherwise]]
141 params {
142 @in name: string; [[The name of the item (as declared in the prefs collection) to get disabled state from]]
143 }
144 }
145 item_swallow {
146 [["Swallows" an object into a SWALLOW item of a prefs widget.
147
148 @since 1.8]]
149
150 return: bool; [[$true, on success, $false otherwise]]
151 params {
152 @in name: string; [[The name of the SWALLOW item (as declared in the prefs collection)]]
153 @in child: Efl.Canvas.Object; [[The object to occupy the item]]
154 }
155 }
156 item_editable_set {
157 [[Set whether the widget bound to a given prefs widget's item is editable or not.
158
159 Note: Only $TEXT or $TEXTAREA items' default widgets implement
160 the 'editable' property. Custom registered widgets may as well
161 implement them.
162
163 @since 1.8]]
164
165 params {
166 @in name: string; [[The name of the item (as declared in the prefs collection) to act on]]
167 @in editable: bool; [[$true, to make it editable, $false otherwise]]
168 }
169 }
170 item_editable_get @const {
171 [[Get whether the widget bound to a given prefs widget's item is editable or not.
172
173 @since 1.8]]
174 return: bool; [[$true, if it is editable, $false otherwise]]
175 params {
176 @in name: string; [[The name of the item (as declared in the prefs collection) to get editable state from]]
177 }
178 }
179 item_unswallow {
180 [[Unswallow an object from a SWALLOW item of a prefs widget.
181
182 @since 1.8]]
183
184 return: Efl.Canvas.Object; [[The unswallowed object, or NULL on errors]]
185 params {
186 @in name: string; [[The name of the SWALLOW item (as declared in the prefs collection)]]
187 }
188 }
189 item_visible_set {
190 [[Set whether the widget bound to given prefs widget's item should be visible or not.
191
192 Each prefs item may have a default visibility state, declared on
193 the $.epb $prefs it was loaded with. By this call one may alter
194 that state, programatically.
195
196 @since 1.8]]
197
198 params {
199 @in name: string; [[The name of the item (as declared in the prefs collection) to change visibility of]]
200 @in visible: bool; [[$true, to make it visible, $false otherwise]]
201 }
202 }
203 item_visible_get @const {
204 [[Get whether the widget bound to a given prefs widget's item is visible or not.
205
206 @since 1.8]]
207 return: bool; [[$true, if it is visible, $false otherwise]]
208 params {
209 @in name: string; [[The name of the item (as declared in the prefs collection) to get visibility state from]]
210 }
211 }
212 }
213 implements {
214 class.constructor;
215 Efl.Object.constructor;
216 }
217 events {
218 page,changed: string; [[Called when page changed]]
219 page,saved: string; [[Called when page was saved]]
220 /* FIXME: Nobody emits this
221 page,reset; [[Called when page was reset]]
222 */
223 page,loaded: string; [[Called when page got loaded]]
224 item,changed: string; [[Called when item changed]]
225 action: string; [[Called when action was done]]
226 }
227}
diff --git a/src/lib/elementary/elm_prefs_eo.c b/src/lib/elementary/elm_prefs_eo.c
new file mode 100644
index 0000000..f56f214
--- /dev/null
+++ b/src/lib/elementary/elm_prefs_eo.c
@@ -0,0 +1,159 @@
1EWAPI const Efl_Event_Description _ELM_PREFS_EVENT_PAGE_CHANGED =
2 EFL_EVENT_DESCRIPTION("page,changed");
3EWAPI const Efl_Event_Description _ELM_PREFS_EVENT_PAGE_SAVED =
4 EFL_EVENT_DESCRIPTION("page,saved");
5EWAPI const Efl_Event_Description _ELM_PREFS_EVENT_PAGE_LOADED =
6 EFL_EVENT_DESCRIPTION("page,loaded");
7EWAPI const Efl_Event_Description _ELM_PREFS_EVENT_ITEM_CHANGED =
8 EFL_EVENT_DESCRIPTION("item,changed");
9EWAPI const Efl_Event_Description _ELM_PREFS_EVENT_ACTION =
10 EFL_EVENT_DESCRIPTION("action");
11
12Eina_Bool _elm_prefs_data_set(Eo *obj, Elm_Prefs_Data *pd, Elm_Prefs_Data *data);
13
14EOAPI EFL_FUNC_BODYV(elm_obj_prefs_data_set, Eina_Bool, 0, EFL_FUNC_CALL(data), Elm_Prefs_Data *data);
15
16Elm_Prefs_Data *_elm_prefs_data_get(const Eo *obj, Elm_Prefs_Data *pd);
17
18EOAPI EFL_FUNC_BODY_CONST(elm_obj_prefs_data_get, Elm_Prefs_Data *, NULL);
19
20void _elm_prefs_autosave_set(Eo *obj, Elm_Prefs_Data *pd, Eina_Bool autosave);
21
22
23static Eina_Error
24__eolian_elm_prefs_autosave_set_reflect(Eo *obj, Eina_Value val)
25{
26 Eina_Error r = 0; Eina_Bool cval;
27 if (!eina_value_bool_convert(&val, &cval))
28 {
29 r = EINA_ERROR_VALUE_FAILED;
30 goto end;
31 }
32 elm_obj_prefs_autosave_set(obj, cval);
33 end:
34 eina_value_flush(&val);
35 return r;
36}
37
38EOAPI EFL_VOID_FUNC_BODYV(elm_obj_prefs_autosave_set, EFL_FUNC_CALL(autosave), Eina_Bool autosave);
39
40Eina_Bool _elm_prefs_autosave_get(const Eo *obj, Elm_Prefs_Data *pd);
41
42
43static Eina_Value
44__eolian_elm_prefs_autosave_get_reflect(Eo *obj)
45{
46 Eina_Bool val = elm_obj_prefs_autosave_get(obj);
47 return eina_value_bool_init(val);
48}
49
50EOAPI EFL_FUNC_BODY_CONST(elm_obj_prefs_autosave_get, Eina_Bool, 0);
51
52void _elm_prefs_reset(Eo *obj, Elm_Prefs_Data *pd, Elm_Prefs_Reset_Mode mode);
53
54EOAPI EFL_VOID_FUNC_BODYV(elm_obj_prefs_reset, EFL_FUNC_CALL(mode), Elm_Prefs_Reset_Mode mode);
55
56Eina_Bool _elm_prefs_item_value_set(Eo *obj, Elm_Prefs_Data *pd, const char *name, const Eina_Value *value);
57
58EOAPI EFL_FUNC_BODYV(elm_obj_prefs_item_value_set, Eina_Bool, 0, EFL_FUNC_CALL(name, value), const char *name, const Eina_Value *value);
59
60Eina_Bool _elm_prefs_item_value_get(const Eo *obj, Elm_Prefs_Data *pd, const char *name, Eina_Value *value);
61
62EOAPI EFL_FUNC_BODYV_CONST(elm_obj_prefs_item_value_get, Eina_Bool, 0, EFL_FUNC_CALL(name, value), const char *name, Eina_Value *value);
63
64const Efl_Canvas_Object *_elm_prefs_item_object_get(Eo *obj, Elm_Prefs_Data *pd, const char *name);
65
66EOAPI EFL_FUNC_BODYV(elm_obj_prefs_item_object_get, const Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(name), const char *name);
67
68void _elm_prefs_item_disabled_set(Eo *obj, Elm_Prefs_Data *pd, const char *name, Eina_Bool disabled);
69
70EOAPI EFL_VOID_FUNC_BODYV(elm_obj_prefs_item_disabled_set, EFL_FUNC_CALL(name, disabled), const char *name, Eina_Bool disabled);
71
72Eina_Bool _elm_prefs_item_disabled_get(const Eo *obj, Elm_Prefs_Data *pd, const char *name);
73
74EOAPI EFL_FUNC_BODYV_CONST(elm_obj_prefs_item_disabled_get, Eina_Bool, 0, EFL_FUNC_CALL(name), const char *name);
75
76Eina_Bool _elm_prefs_item_swallow(Eo *obj, Elm_Prefs_Data *pd, const char *name, Efl_Canvas_Object *child);
77
78EOAPI EFL_FUNC_BODYV(elm_obj_prefs_item_swallow, Eina_Bool, 0, EFL_FUNC_CALL(name, child), const char *name, Efl_Canvas_Object *child);
79
80void _elm_prefs_item_editable_set(Eo *obj, Elm_Prefs_Data *pd, const char *name, Eina_Bool editable);
81
82EOAPI EFL_VOID_FUNC_BODYV(elm_obj_prefs_item_editable_set, EFL_FUNC_CALL(name, editable), const char *name, Eina_Bool editable);
83
84Eina_Bool _elm_prefs_item_editable_get(const Eo *obj, Elm_Prefs_Data *pd, const char *name);
85
86EOAPI EFL_FUNC_BODYV_CONST(elm_obj_prefs_item_editable_get, Eina_Bool, 0, EFL_FUNC_CALL(name), const char *name);
87
88Efl_Canvas_Object *_elm_prefs_item_unswallow(Eo *obj, Elm_Prefs_Data *pd, const char *name);
89
90EOAPI EFL_FUNC_BODYV(elm_obj_prefs_item_unswallow, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(name), const char *name);
91
92void _elm_prefs_item_visible_set(Eo *obj, Elm_Prefs_Data *pd, const char *name, Eina_Bool visible);
93
94EOAPI EFL_VOID_FUNC_BODYV(elm_obj_prefs_item_visible_set, EFL_FUNC_CALL(name, visible), const char *name, Eina_Bool visible);
95
96Eina_Bool _elm_prefs_item_visible_get(const Eo *obj, Elm_Prefs_Data *pd, const char *name);
97
98EOAPI EFL_FUNC_BODYV_CONST(elm_obj_prefs_item_visible_get, Eina_Bool, 0, EFL_FUNC_CALL(name), const char *name);
99
100Efl_Object *_elm_prefs_efl_object_constructor(Eo *obj, Elm_Prefs_Data *pd);
101
102
103static Eina_Bool
104_elm_prefs_class_initializer(Efl_Class *klass)
105{
106 const Efl_Object_Ops *opsp = NULL;
107
108 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
109
110#ifndef ELM_PREFS_EXTRA_OPS
111#define ELM_PREFS_EXTRA_OPS
112#endif
113
114 EFL_OPS_DEFINE(ops,
115 EFL_OBJECT_OP_FUNC(elm_obj_prefs_data_set, _elm_prefs_data_set),
116 EFL_OBJECT_OP_FUNC(elm_obj_prefs_data_get, _elm_prefs_data_get),
117 EFL_OBJECT_OP_FUNC(elm_obj_prefs_autosave_set, _elm_prefs_autosave_set),
118 EFL_OBJECT_OP_FUNC(elm_obj_prefs_autosave_get, _elm_prefs_autosave_get),
119 EFL_OBJECT_OP_FUNC(elm_obj_prefs_reset, _elm_prefs_reset),
120 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_value_set, _elm_prefs_item_value_set),
121 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_value_get, _elm_prefs_item_value_get),
122 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_object_get, _elm_prefs_item_object_get),
123 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_disabled_set, _elm_prefs_item_disabled_set),
124 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_disabled_get, _elm_prefs_item_disabled_get),
125 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_swallow, _elm_prefs_item_swallow),
126 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_editable_set, _elm_prefs_item_editable_set),
127 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_editable_get, _elm_prefs_item_editable_get),
128 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_unswallow, _elm_prefs_item_unswallow),
129 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_visible_set, _elm_prefs_item_visible_set),
130 EFL_OBJECT_OP_FUNC(elm_obj_prefs_item_visible_get, _elm_prefs_item_visible_get),
131 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_prefs_efl_object_constructor),
132 ELM_PREFS_EXTRA_OPS
133 );
134 opsp = &ops;
135
136 static const Efl_Object_Property_Reflection refl_table[] = {
137 {"autosave", __eolian_elm_prefs_autosave_set_reflect, __eolian_elm_prefs_autosave_get_reflect},
138 };
139 static const Efl_Object_Property_Reflection_Ops rops = {
140 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
141 };
142 ropsp = &rops;
143
144 return efl_class_functions_set(klass, opsp, ropsp);
145}
146
147static const Efl_Class_Description _elm_prefs_class_desc = {
148 EO_VERSION,
149 "Elm.Prefs",
150 EFL_CLASS_TYPE_REGULAR,
151 sizeof(Elm_Prefs_Data),
152 _elm_prefs_class_initializer,
153 _elm_prefs_class_constructor,
154 NULL
155};
156
157EFL_DEFINE_CLASS(elm_prefs_class_get, &_elm_prefs_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
158
159#include "elm_prefs_eo.legacy.c"
diff --git a/src/lib/elementary/elm_prefs_eo.h b/src/lib/elementary/elm_prefs_eo.h
new file mode 100644
index 0000000..5f6fad3
--- /dev/null
+++ b/src/lib/elementary/elm_prefs_eo.h
@@ -0,0 +1,381 @@
1#ifndef _ELM_PREFS_EO_H_
2#define _ELM_PREFS_EO_H_
3
4#ifndef _ELM_PREFS_EO_CLASS_TYPE
5#define _ELM_PREFS_EO_CLASS_TYPE
6
7typedef Eo Elm_Prefs;
8
9#endif
10
11#ifndef _ELM_PREFS_EO_TYPES
12#define _ELM_PREFS_EO_TYPES
13
14
15#endif
16/** Elementary preferences class
17 *
18 * @ingroup Elm_Prefs
19 */
20#define ELM_PREFS_CLASS elm_prefs_class_get()
21
22EWAPI const Efl_Class *elm_prefs_class_get(void);
23
24/**
25 * @brief Set user data for a given prefs widget
26 *
27 * Once a prefs widget is created, after elm_prefs_file_set() is issued on it,
28 * all of its UI elements will get default values, when declared on that file.
29 * To fetch an user's own, personal set of those values, one gets to pair a
30 * prefs data handle to the prefs widget. This is what this call is intended
31 * for.
32 *
33 * Prefs data values from @c prefs_data with keys matching the ones present on
34 * the file passed on elm_prefs_file_set() to @c obj will have their values
35 * applied to the respective UI elements of the widget.
36 *
37 * When @c obj dies, the values of the elements declared on its $.epb file (the
38 * one set on elm_prefs_file_set()) marked as permanent will be written back to
39 * prefs_data, if it is writable. One is also able to make this writing event
40 * to take place automatically after each UI element modification by using
41 * elm_prefs_autosave_set().
42 *
43 * @note @c obj will keep a reference of its own for @c prefs_data, but you
44 * should still unreference it by yourself, after the widget is gone.
45 *
46 * @param[in] obj The object.
47 * @param[in] data A valid prefs_data handle
48 *
49 * @return @c true, on success, @c false otherwise
50 *
51 * @since 1.8
52 *
53 * @ingroup Elm_Prefs
54 */
55EOAPI Eina_Bool elm_obj_prefs_data_set(Eo *obj, Elm_Prefs_Data *data);
56
57/**
58 * @brief Set user data for a given prefs widget
59 *
60 * Once a prefs widget is created, after elm_prefs_file_set() is issued on it,
61 * all of its UI elements will get default values, when declared on that file.
62 * To fetch an user's own, personal set of those values, one gets to pair a
63 * prefs data handle to the prefs widget. This is what this call is intended
64 * for.
65 *
66 * Prefs data values from @c prefs_data with keys matching the ones present on
67 * the file passed on elm_prefs_file_set() to @c obj will have their values
68 * applied to the respective UI elements of the widget.
69 *
70 * When @c obj dies, the values of the elements declared on its $.epb file (the
71 * one set on elm_prefs_file_set()) marked as permanent will be written back to
72 * prefs_data, if it is writable. One is also able to make this writing event
73 * to take place automatically after each UI element modification by using
74 * elm_prefs_autosave_set().
75 *
76 * @note @c obj will keep a reference of its own for @c prefs_data, but you
77 * should still unreference it by yourself, after the widget is gone.
78 *
79 * @param[in] obj The object.
80 *
81 * @return A valid prefs_data handle
82 *
83 * @since 1.8
84 *
85 * @ingroup Elm_Prefs
86 */
87EOAPI Elm_Prefs_Data *elm_obj_prefs_data_get(const Eo *obj);
88
89/**
90 * @brief Control whether a given prefs widget should save its values back (on
91 * the user data file, if set) automatically on every UI element changes.
92 *
93 * If @c autosave is @c true, every call to elm_prefs_item_value_set(), every
94 * Elm_Prefs_Data_Event_Type.ELM_PREFS_DATA_EVENT_ITEM_CHANGED event coming for
95 * its prefs data and every UI element direct value changing will implicitly
96 * make the prefs values to be flushed back to it prefs data. If a prefs data
97 * handle with no writing permissions or no prefs data is set on @c prefs,
98 * naturally nothing will happen.
99 *
100 * @param[in] obj The object.
101 * @param[in] autosave @c true to save automatically, @c false otherwise.
102 *
103 * @since 1.8
104 *
105 * @ingroup Elm_Prefs
106 */
107EOAPI void elm_obj_prefs_autosave_set(Eo *obj, Eina_Bool autosave);
108
109/**
110 * @brief Control whether a given prefs widget should save its values back (on
111 * the user data file, if set) automatically on every UI element changes.
112 *
113 * If @c autosave is @c true, every call to elm_prefs_item_value_set(), every
114 * Elm_Prefs_Data_Event_Type.ELM_PREFS_DATA_EVENT_ITEM_CHANGED event coming for
115 * its prefs data and every UI element direct value changing will implicitly
116 * make the prefs values to be flushed back to it prefs data. If a prefs data
117 * handle with no writing permissions or no prefs data is set on @c prefs,
118 * naturally nothing will happen.
119 *
120 * @param[in] obj The object.
121 *
122 * @return @c true to save automatically, @c false otherwise.
123 *
124 * @since 1.8
125 *
126 * @ingroup Elm_Prefs
127 */
128EOAPI Eina_Bool elm_obj_prefs_autosave_get(const Eo *obj);
129
130/**
131 * @brief Reset the values of a given prefs widget to a previous state.
132 *
133 * As can be seen on #Elm_Prefs_Reset_Mode, there are two possible actions to
134 * be taken by this call -- either to reset @c prefs' values to the defaults
135 * (declared on the $.epb file it is bound to) or to reset to the state they
136 * were before the last modification it got.
137 *
138 * @param[in] obj The object.
139 * @param[in] mode The reset mode to apply on @c prefs
140 *
141 * @since 1.8
142 *
143 * @ingroup Elm_Prefs
144 */
145EOAPI void elm_obj_prefs_reset(Eo *obj, Elm_Prefs_Reset_Mode mode);
146
147/**
148 * @brief Set the value on a given prefs widget's item.
149 *
150 * This will change the value of item named @c name programatically.
151 *
152 * @param[in] obj The object.
153 * @param[in] name The name of the item (as declared in the prefs collection)
154 * @param[in] value The value to set on the item. It should be typed as the
155 * item expects, preferably, or a conversion will take place
156 *
157 * @return @c true, on success, @c false otherwise
158 *
159 * @since 1.8
160 *
161 * @ingroup Elm_Prefs
162 */
163EOAPI Eina_Bool elm_obj_prefs_item_value_set(Eo *obj, const char *name, const Eina_Value *value);
164
165/**
166 * @brief Get the value of a given prefs widget's item.
167 *
168 * This will retrieve the value of item named @c name.
169 *
170 * @param[in] obj The object.
171 * @param[in] name The name of the item (as declared in the prefs collection)
172 * to get value from
173 * @param[out] value Where to store the value of the item. It will be
174 * overwritten and setup with the type the item is bound to
175 *
176 * @return @c true, on success, @c false otherwise
177 *
178 * @since 1.8
179 *
180 * @ingroup Elm_Prefs
181 */
182EOAPI Eina_Bool elm_obj_prefs_item_value_get(const Eo *obj, const char *name, Eina_Value *value);
183
184/**
185 * @brief Get the Elementary widget bound to a given prefs widget's item.
186 *
187 * This will retrieve a handle to the real widget implementing a given item of
188 * @c prefs, <b>for read-only</b> actions.
189 *
190 * @warning You should never modify the state of the returned widget, because
191 * it's meant to be managed by @c prefs, solely.
192 *
193 * @param[in] obj The object.
194 * @param[in] name The name of the item (as declared in the prefs collection)
195 * to get object from
196 *
197 * @return A valid widget handle, on success, or @c NULL, otherwise
198 *
199 * @since 1.8
200 *
201 * @ingroup Elm_Prefs
202 */
203EOAPI const Efl_Canvas_Object *elm_obj_prefs_item_object_get(Eo *obj, const char *name);
204
205/**
206 * @brief Set whether the widget bound to a given prefs widget's item is
207 * disabled or not.
208 *
209 * @param[in] obj The object.
210 * @param[in] name The name of the item (as declared in the prefs collection)
211 * to act on
212 * @param[in] disabled @c true, to make it disabled, @c false otherwise
213 *
214 * @since 1.8
215 *
216 * @ingroup Elm_Prefs
217 */
218EOAPI void elm_obj_prefs_item_disabled_set(Eo *obj, const char *name, Eina_Bool disabled);
219
220/**
221 * @brief Get whether the widget bound to a given prefs widget's item is
222 * disabled or not.
223 *
224 * @param[in] obj The object.
225 * @param[in] name The name of the item (as declared in the prefs collection)
226 * to get disabled state from
227 *
228 * @return @c true, if it is disabled, @c false otherwise
229 *
230 * @since 1.8
231 *
232 * @ingroup Elm_Prefs
233 */
234EOAPI Eina_Bool elm_obj_prefs_item_disabled_get(const Eo *obj, const char *name);
235
236/**
237 * @brief "Swallows" an object into a SWALLOW item of a prefs widget.
238 *
239 * @param[in] obj The object.
240 * @param[in] name The name of the SWALLOW item (as declared in the prefs
241 * collection)
242 * @param[in] child The object to occupy the item
243 *
244 * @return @c true, on success, @c false otherwise
245 *
246 * @since 1.8
247 *
248 * @ingroup Elm_Prefs
249 */
250EOAPI Eina_Bool elm_obj_prefs_item_swallow(Eo *obj, const char *name, Efl_Canvas_Object *child);
251
252/**
253 * @brief Set whether the widget bound to a given prefs widget's item is
254 * editable or not.
255 *
256 * @note Only @c TEXT or @c TEXTAREA items' default widgets implement the
257 * 'editable' property. Custom registered widgets may as well implement them.
258 *
259 * @param[in] obj The object.
260 * @param[in] name The name of the item (as declared in the prefs collection)
261 * to act on
262 * @param[in] editable @c true, to make it editable, @c false otherwise
263 *
264 * @since 1.8
265 *
266 * @ingroup Elm_Prefs
267 */
268EOAPI void elm_obj_prefs_item_editable_set(Eo *obj, const char *name, Eina_Bool editable);
269
270/**
271 * @brief Get whether the widget bound to a given prefs widget's item is
272 * editable or not.
273 *
274 * @param[in] obj The object.
275 * @param[in] name The name of the item (as declared in the prefs collection)
276 * to get editable state from
277 *
278 * @return @c true, if it is editable, @c false otherwise
279 *
280 * @since 1.8
281 *
282 * @ingroup Elm_Prefs
283 */
284EOAPI Eina_Bool elm_obj_prefs_item_editable_get(const Eo *obj, const char *name);
285
286/**
287 * @brief Unswallow an object from a SWALLOW item of a prefs widget.
288 *
289 * @param[in] obj The object.
290 * @param[in] name The name of the SWALLOW item (as declared in the prefs
291 * collection)
292 *
293 * @return The unswallowed object, or NULL on errors
294 *
295 * @since 1.8
296 *
297 * @ingroup Elm_Prefs
298 */
299EOAPI Efl_Canvas_Object *elm_obj_prefs_item_unswallow(Eo *obj, const char *name);
300
301/**
302 * @brief Set whether the widget bound to given prefs widget's item should be
303 * visible or not.
304 *
305 * Each prefs item may have a default visibility state, declared on the $.epb
306 * @c prefs it was loaded with. By this call one may alter that state,
307 * programatically.
308 *
309 * @param[in] obj The object.
310 * @param[in] name The name of the item (as declared in the prefs collection)
311 * to change visibility of
312 * @param[in] visible @c true, to make it visible, @c false otherwise
313 *
314 * @since 1.8
315 *
316 * @ingroup Elm_Prefs
317 */
318EOAPI void elm_obj_prefs_item_visible_set(Eo *obj, const char *name, Eina_Bool visible);
319
320/**
321 * @brief Get whether the widget bound to a given prefs widget's item is
322 * visible or not.
323 *
324 * @param[in] obj The object.
325 * @param[in] name The name of the item (as declared in the prefs collection)
326 * to get visibility state from
327 *
328 * @return @c true, if it is visible, @c false otherwise
329 *
330 * @since 1.8
331 *
332 * @ingroup Elm_Prefs
333 */
334EOAPI Eina_Bool elm_obj_prefs_item_visible_get(const Eo *obj, const char *name);
335
336EWAPI extern const Efl_Event_Description _ELM_PREFS_EVENT_PAGE_CHANGED;
337
338/** Called when page changed
339 * @return const char *
340 *
341 * @ingroup Elm_Prefs
342 */
343#define ELM_PREFS_EVENT_PAGE_CHANGED (&(_ELM_PREFS_EVENT_PAGE_CHANGED))
344
345EWAPI extern const Efl_Event_Description _ELM_PREFS_EVENT_PAGE_SAVED;
346
347/** Called when page was saved
348 * @return const char *
349 *
350 * @ingroup Elm_Prefs
351 */
352#define ELM_PREFS_EVENT_PAGE_SAVED (&(_ELM_PREFS_EVENT_PAGE_SAVED))
353
354EWAPI extern const Efl_Event_Description _ELM_PREFS_EVENT_PAGE_LOADED;
355
356/** Called when page got loaded
357 * @return const char *
358 *
359 * @ingroup Elm_Prefs
360 */
361#define ELM_PREFS_EVENT_PAGE_LOADED (&(_ELM_PREFS_EVENT_PAGE_LOADED))
362
363EWAPI extern const Efl_Event_Description _ELM_PREFS_EVENT_ITEM_CHANGED;
364
365/** Called when item changed
366 * @return const char *
367 *
368 * @ingroup Elm_Prefs
369 */
370#define ELM_PREFS_EVENT_ITEM_CHANGED (&(_ELM_PREFS_EVENT_ITEM_CHANGED))
371
372EWAPI extern const Efl_Event_Description _ELM_PREFS_EVENT_ACTION;
373
374/** Called when action was done
375 * @return const char *
376 *
377 * @ingroup Elm_Prefs
378 */
379#define ELM_PREFS_EVENT_ACTION (&(_ELM_PREFS_EVENT_ACTION))
380
381#endif
diff --git a/src/lib/elementary/elm_prefs_eo.legacy.c b/src/lib/elementary/elm_prefs_eo.legacy.c
new file mode 100644
index 0000000..2eef8f3
--- /dev/null
+++ b/src/lib/elementary/elm_prefs_eo.legacy.c
@@ -0,0 +1,96 @@
1
2EAPI Eina_Bool
3elm_prefs_data_set(Elm_Prefs *obj, Elm_Prefs_Data *data)
4{
5 return elm_obj_prefs_data_set(obj, data);
6}
7
8EAPI Elm_Prefs_Data *
9elm_prefs_data_get(const Elm_Prefs *obj)
10{
11 return elm_obj_prefs_data_get(obj);
12}
13
14EAPI void
15elm_prefs_autosave_set(Elm_Prefs *obj, Eina_Bool autosave)
16{
17 elm_obj_prefs_autosave_set(obj, autosave);
18}
19
20EAPI Eina_Bool
21elm_prefs_autosave_get(const Elm_Prefs *obj)
22{
23 return elm_obj_prefs_autosave_get(obj);
24}
25
26EAPI void
27elm_prefs_reset(Elm_Prefs *obj, Elm_Prefs_Reset_Mode mode)
28{
29 elm_obj_prefs_reset(obj, mode);
30}
31
32EAPI Eina_Bool
33elm_prefs_item_value_set(Elm_Prefs *obj, const char *name, const Eina_Value *value)
34{
35 return elm_obj_prefs_item_value_set(obj, name, value);
36}
37
38EAPI Eina_Bool
39elm_prefs_item_value_get(const Elm_Prefs *obj, const char *name, Eina_Value *value)
40{
41 return elm_obj_prefs_item_value_get(obj, name, value);
42}
43
44EAPI const Efl_Canvas_Object *
45elm_prefs_item_object_get(Elm_Prefs *obj, const char *name)
46{
47 return elm_obj_prefs_item_object_get(obj, name);
48}
49
50EAPI void
51elm_prefs_item_disabled_set(Elm_Prefs *obj, const char *name, Eina_Bool disabled)
52{
53 elm_obj_prefs_item_disabled_set(obj, name, disabled);
54}
55
56EAPI Eina_Bool
57elm_prefs_item_disabled_get(const Elm_Prefs *obj, const char *name)
58{
59 return elm_obj_prefs_item_disabled_get(obj, name);
60}
61
62EAPI Eina_Bool
63elm_prefs_item_swallow(Elm_Prefs *obj, const char *name, Efl_Canvas_Object *child)
64{
65 return elm_obj_prefs_item_swallow(obj, name, child);
66}
67
68EAPI void
69elm_prefs_item_editable_set(Elm_Prefs *obj, const char *name, Eina_Bool editable)
70{
71 elm_obj_prefs_item_editable_set(obj, name, editable);
72}
73
74EAPI Eina_Bool
75elm_prefs_item_editable_get(const Elm_Prefs *obj, const char *name)
76{
77 return elm_obj_prefs_item_editable_get(obj, name);
78}
79
80EAPI Efl_Canvas_Object *
81elm_prefs_item_unswallow(Elm_Prefs *obj, const char *name)
82{
83 return elm_obj_prefs_item_unswallow(obj, name);
84}
85
86EAPI void
87elm_prefs_item_visible_set(Elm_Prefs *obj, const char *name, Eina_Bool visible)
88{
89 elm_obj_prefs_item_visible_set(obj, name, visible);
90}
91
92EAPI Eina_Bool
93elm_prefs_item_visible_get(const Elm_Prefs *obj, const char *name)
94{
95 return elm_obj_prefs_item_visible_get(obj, name);
96}
diff --git a/src/lib/elementary/elm_prefs_eo.legacy.h b/src/lib/elementary/elm_prefs_eo.legacy.h
new file mode 100644
index 0000000..47fb914
--- /dev/null
+++ b/src/lib/elementary/elm_prefs_eo.legacy.h
@@ -0,0 +1,329 @@
1#ifndef _ELM_PREFS_EO_LEGACY_H_
2#define _ELM_PREFS_EO_LEGACY_H_
3
4#ifndef _ELM_PREFS_EO_CLASS_TYPE
5#define _ELM_PREFS_EO_CLASS_TYPE
6
7typedef Eo Elm_Prefs;
8
9#endif
10
11#ifndef _ELM_PREFS_EO_TYPES
12#define _ELM_PREFS_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Set user data for a given prefs widget
19 *
20 * Once a prefs widget is created, after elm_prefs_file_set() is issued on it,
21 * all of its UI elements will get default values, when declared on that file.
22 * To fetch an user's own, personal set of those values, one gets to pair a
23 * prefs data handle to the prefs widget. This is what this call is intended
24 * for.
25 *
26 * Prefs data values from @c prefs_data with keys matching the ones present on
27 * the file passed on elm_prefs_file_set() to @c obj will have their values
28 * applied to the respective UI elements of the widget.
29 *
30 * When @c obj dies, the values of the elements declared on its $.epb file (the
31 * one set on elm_prefs_file_set()) marked as permanent will be written back to
32 * prefs_data, if it is writable. One is also able to make this writing event
33 * to take place automatically after each UI element modification by using
34 * elm_prefs_autosave_set().
35 *
36 * @note @c obj will keep a reference of its own for @c prefs_data, but you
37 * should still unreference it by yourself, after the widget is gone.
38 *
39 * @param[in] obj The object.
40 * @param[in] data A valid prefs_data handle
41 *
42 * @return @c true, on success, @c false otherwise
43 *
44 * @since 1.8
45 *
46 * @ingroup Elm_Prefs_Group
47 */
48EAPI Eina_Bool elm_prefs_data_set(Elm_Prefs *obj, Elm_Prefs_Data *data);
49
50/**
51 * @brief Set user data for a given prefs widget
52 *
53 * Once a prefs widget is created, after elm_prefs_file_set() is issued on it,
54 * all of its UI elements will get default values, when declared on that file.
55 * To fetch an user's own, personal set of those values, one gets to pair a
56 * prefs data handle to the prefs widget. This is what this call is intended
57 * for.
58 *
59 * Prefs data values from @c prefs_data with keys matching the ones present on
60 * the file passed on elm_prefs_file_set() to @c obj will have their values
61 * applied to the respective UI elements of the widget.
62 *
63 * When @c obj dies, the values of the elements declared on its $.epb file (the
64 * one set on elm_prefs_file_set()) marked as permanent will be written back to
65 * prefs_data, if it is writable. One is also able to make this writing event
66 * to take place automatically after each UI element modification by using
67 * elm_prefs_autosave_set().
68 *
69 * @note @c obj will keep a reference of its own for @c prefs_data, but you
70 * should still unreference it by yourself, after the widget is gone.
71 *
72 * @param[in] obj The object.
73 *
74 * @return A valid prefs_data handle
75 *
76 * @since 1.8
77 *
78 * @ingroup Elm_Prefs_Group
79 */
80EAPI Elm_Prefs_Data *elm_prefs_data_get(const Elm_Prefs *obj);
81
82/**
83 * @brief Control whether a given prefs widget should save its values back (on
84 * the user data file, if set) automatically on every UI element changes.
85 *
86 * If @c autosave is @c true, every call to elm_prefs_item_value_set(), every
87 * Elm_Prefs_Data_Event_Type.ELM_PREFS_DATA_EVENT_ITEM_CHANGED event coming for
88 * its prefs data and every UI element direct value changing will implicitly
89 * make the prefs values to be flushed back to it prefs data. If a prefs data
90 * handle with no writing permissions or no prefs data is set on @c prefs,
91 * naturally nothing will happen.
92 *
93 * @param[in] obj The object.
94 * @param[in] autosave @c true to save automatically, @c false otherwise.
95 *
96 * @since 1.8
97 *
98 * @ingroup Elm_Prefs_Group
99 */
100EAPI void elm_prefs_autosave_set(Elm_Prefs *obj, Eina_Bool autosave);
101
102/**
103 * @brief Control whether a given prefs widget should save its values back (on
104 * the user data file, if set) automatically on every UI element changes.
105 *
106 * If @c autosave is @c true, every call to elm_prefs_item_value_set(), every
107 * Elm_Prefs_Data_Event_Type.ELM_PREFS_DATA_EVENT_ITEM_CHANGED event coming for
108 * its prefs data and every UI element direct value changing will implicitly
109 * make the prefs values to be flushed back to it prefs data. If a prefs data
110 * handle with no writing permissions or no prefs data is set on @c prefs,
111 * naturally nothing will happen.
112 *
113 * @param[in] obj The object.
114 *
115 * @return @c true to save automatically, @c false otherwise.
116 *
117 * @since 1.8
118 *
119 * @ingroup Elm_Prefs_Group
120 */
121EAPI Eina_Bool elm_prefs_autosave_get(const Elm_Prefs *obj);
122
123/**
124 * @brief Reset the values of a given prefs widget to a previous state.
125 *
126 * As can be seen on #Elm_Prefs_Reset_Mode, there are two possible actions to
127 * be taken by this call -- either to reset @c prefs' values to the defaults
128 * (declared on the $.epb file it is bound to) or to reset to the state they
129 * were before the last modification it got.
130 *
131 * @param[in] obj The object.
132 * @param[in] mode The reset mode to apply on @c prefs
133 *
134 * @since 1.8
135 *
136 * @ingroup Elm_Prefs_Group
137 */
138EAPI void elm_prefs_reset(Elm_Prefs *obj, Elm_Prefs_Reset_Mode mode);
139
140/**
141 * @brief Set the value on a given prefs widget's item.
142 *
143 * This will change the value of item named @c name programatically.
144 *
145 * @param[in] obj The object.
146 * @param[in] name The name of the item (as declared in the prefs collection)
147 * @param[in] value The value to set on the item. It should be typed as the
148 * item expects, preferably, or a conversion will take place
149 *
150 * @return @c true, on success, @c false otherwise
151 *
152 * @since 1.8
153 *
154 * @ingroup Elm_Prefs_Group
155 */
156EAPI Eina_Bool elm_prefs_item_value_set(Elm_Prefs *obj, const char *name, const Eina_Value *value);
157
158/**
159 * @brief Get the value of a given prefs widget's item.
160 *
161 * This will retrieve the value of item named @c name.
162 *
163 * @param[in] obj The object.
164 * @param[in] name The name of the item (as declared in the prefs collection)
165 * to get value from
166 * @param[out] value Where to store the value of the item. It will be
167 * overwritten and setup with the type the item is bound to
168 *
169 * @return @c true, on success, @c false otherwise
170 *
171 * @since 1.8
172 *
173 * @ingroup Elm_Prefs_Group
174 */
175EAPI Eina_Bool elm_prefs_item_value_get(const Elm_Prefs *obj, const char *name, Eina_Value *value);
176
177/**
178 * @brief Get the Elementary widget bound to a given prefs widget's item.
179 *
180 * This will retrieve a handle to the real widget implementing a given item of
181 * @c prefs, <b>for read-only</b> actions.
182 *
183 * @warning You should never modify the state of the returned widget, because
184 * it's meant to be managed by @c prefs, solely.
185 *
186 * @param[in] obj The object.
187 * @param[in] name The name of the item (as declared in the prefs collection)
188 * to get object from
189 *
190 * @return A valid widget handle, on success, or @c NULL, otherwise
191 *
192 * @since 1.8
193 *
194 * @ingroup Elm_Prefs_Group
195 */
196EAPI const Efl_Canvas_Object *elm_prefs_item_object_get(Elm_Prefs *obj, const char *name);
197
198/**
199 * @brief Set whether the widget bound to a given prefs widget's item is
200 * disabled or not.
201 *
202 * @param[in] obj The object.
203 * @param[in] name The name of the item (as declared in the prefs collection)
204 * to act on
205 * @param[in] disabled @c true, to make it disabled, @c false otherwise
206 *
207 * @since 1.8
208 *
209 * @ingroup Elm_Prefs_Group
210 */
211EAPI void elm_prefs_item_disabled_set(Elm_Prefs *obj, const char *name, Eina_Bool disabled);
212
213/**
214 * @brief Get whether the widget bound to a given prefs widget's item is
215 * disabled or not.
216 *
217 * @param[in] obj The object.
218 * @param[in] name The name of the item (as declared in the prefs collection)
219 * to get disabled state from
220 *
221 * @return @c true, if it is disabled, @c false otherwise
222 *
223 * @since 1.8
224 *
225 * @ingroup Elm_Prefs_Group
226 */
227EAPI Eina_Bool elm_prefs_item_disabled_get(const Elm_Prefs *obj, const char *name);
228
229/**
230 * @brief "Swallows" an object into a SWALLOW item of a prefs widget.
231 *
232 * @param[in] obj The object.
233 * @param[in] name The name of the SWALLOW item (as declared in the prefs
234 * collection)
235 * @param[in] child The object to occupy the item
236 *
237 * @return @c true, on success, @c false otherwise
238 *
239 * @since 1.8
240 *
241 * @ingroup Elm_Prefs_Group
242 */
243EAPI Eina_Bool elm_prefs_item_swallow(Elm_Prefs *obj, const char *name, Efl_Canvas_Object *child);
244
245/**
246 * @brief Set whether the widget bound to a given prefs widget's item is
247 * editable or not.
248 *
249 * @note Only @c TEXT or @c TEXTAREA items' default widgets implement the
250 * 'editable' property. Custom registered widgets may as well implement them.
251 *
252 * @param[in] obj The object.
253 * @param[in] name The name of the item (as declared in the prefs collection)
254 * to act on
255 * @param[in] editable @c true, to make it editable, @c false otherwise
256 *
257 * @since 1.8
258 *
259 * @ingroup Elm_Prefs_Group
260 */
261EAPI void elm_prefs_item_editable_set(Elm_Prefs *obj, const char *name, Eina_Bool editable);
262
263/**
264 * @brief Get whether the widget bound to a given prefs widget's item is
265 * editable or not.
266 *
267 * @param[in] obj The object.
268 * @param[in] name The name of the item (as declared in the prefs collection)
269 * to get editable state from
270 *
271 * @return @c true, if it is editable, @c false otherwise
272 *
273 * @since 1.8
274 *
275 * @ingroup Elm_Prefs_Group
276 */
277EAPI Eina_Bool elm_prefs_item_editable_get(const Elm_Prefs *obj, const char *name);
278
279/**
280 * @brief Unswallow an object from a SWALLOW item of a prefs widget.
281 *
282 * @param[in] obj The object.
283 * @param[in] name The name of the SWALLOW item (as declared in the prefs
284 * collection)
285 *
286 * @return The unswallowed object, or NULL on errors
287 *
288 * @since 1.8
289 *
290 * @ingroup Elm_Prefs_Group
291 */
292EAPI Efl_Canvas_Object *elm_prefs_item_unswallow(Elm_Prefs *obj, const char *name);
293
294/**
295 * @brief Set whether the widget bound to given prefs widget's item should be
296 * visible or not.
297 *
298 * Each prefs item may have a default visibility state, declared on the $.epb
299 * @c prefs it was loaded with. By this call one may alter that state,
300 * programatically.
301 *
302 * @param[in] obj The object.
303 * @param[in] name The name of the item (as declared in the prefs collection)
304 * to change visibility of
305 * @param[in] visible @c true, to make it visible, @c false otherwise
306 *
307 * @since 1.8
308 *
309 * @ingroup Elm_Prefs_Group
310 */
311EAPI void elm_prefs_item_visible_set(Elm_Prefs *obj, const char *name, Eina_Bool visible);
312
313/**
314 * @brief Get whether the widget bound to a given prefs widget's item is
315 * visible or not.
316 *
317 * @param[in] obj The object.
318 * @param[in] name The name of the item (as declared in the prefs collection)
319 * to get visibility state from
320 *
321 * @return @c true, if it is visible, @c false otherwise
322 *
323 * @since 1.8
324 *
325 * @ingroup Elm_Prefs_Group
326 */
327EAPI Eina_Bool elm_prefs_item_visible_get(const Elm_Prefs *obj, const char *name);
328
329#endif
diff --git a/src/lib/elementary/elm_prefs_legacy.h b/src/lib/elementary/elm_prefs_legacy.h
index d3c1785..e93d045 100644
--- a/src/lib/elementary/elm_prefs_legacy.h
+++ b/src/lib/elementary/elm_prefs_legacy.h
@@ -61,7 +61,7 @@ EAPI Eina_Bool elm_prefs_file_set(Eo *obj, const char *file, const char *page);
61 */ 61 */
62EAPI Eina_Bool elm_prefs_file_get(const Eo *obj, const char **file, const char **page); 62EAPI Eina_Bool elm_prefs_file_get(const Eo *obj, const char **file, const char **page);
63 63
64#include "elm_prefs.eo.legacy.h" 64#include "elm_prefs_eo.legacy.h"
65/** 65/**
66 * @} 66 * @}
67 */ 67 */
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 3b840e0..194804b 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -24,7 +24,6 @@ pub_legacy_eo_files = [
24 'elm_actionslider_part.eo', 24 'elm_actionslider_part.eo',
25 'elm_bubble_part.eo', 25 'elm_bubble_part.eo',
26 'elm_fileselector_part.eo', 26 'elm_fileselector_part.eo',
27 'elm_prefs.eo',
28 'elm_segment_control.eo', 27 'elm_segment_control.eo',
29 'elm_segment_control_item.eo', 28 'elm_segment_control_item.eo',
30 'elm_separator.eo', 29 'elm_separator.eo',
@@ -785,6 +784,8 @@ elementary_pub_headers = [
785 'elm_popup_eo.legacy.h', 784 'elm_popup_eo.legacy.h',
786 'elm_popup_item_eo.h', 785 'elm_popup_item_eo.h',
787 'elm_popup_item_eo.legacy.h', 786 'elm_popup_item_eo.legacy.h',
787 'elm_prefs_eo.h',
788 'elm_prefs_eo.legacy.h',
788] 789]
789 790
790elementary_header_src = [ 791elementary_header_src = [