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