summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_prefs_eo.legacy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_prefs_eo.legacy.h')
-rw-r--r--src/lib/elementary/elm_prefs_eo.legacy.h329
1 files changed, 329 insertions, 0 deletions
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