summaryrefslogtreecommitdiff
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:15:10 -0800
commit5c41b53a3fbe3043a86e242e451113d79df84494 (patch)
tree6f518dcbbf61f8a0d58376776a1dafafb4ce9bf0
parentb65a1647592f7134288898e5ea66ce822e4ec781 (diff)
elm_diskselector: 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/D8165
-rw-r--r--src/Makefile_Elementary.am10
-rw-r--r--src/lib/elementary/elm_diskselector.c8
-rw-r--r--src/lib/elementary/elm_diskselector.eo213
-rw-r--r--src/lib/elementary/elm_diskselector_eo.c227
-rw-r--r--src/lib/elementary/elm_diskselector_eo.h232
-rw-r--r--src/lib/elementary/elm_diskselector_eo.legacy.c72
-rw-r--r--src/lib/elementary/elm_diskselector_eo.legacy.h223
-rw-r--r--src/lib/elementary/elm_diskselector_item.eo90
-rw-r--r--src/lib/elementary/elm_diskselector_item_eo.c109
-rw-r--r--src/lib/elementary/elm_diskselector_item_eo.h103
-rw-r--r--src/lib/elementary/elm_diskselector_item_eo.legacy.c24
-rw-r--r--src/lib/elementary/elm_diskselector_item_eo.legacy.h96
-rw-r--r--src/lib/elementary/elm_diskselector_legacy.h4
-rw-r--r--src/lib/elementary/meson.build6
14 files changed, 1104 insertions, 313 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 9f28146..866017b 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -238,8 +238,6 @@ elm_legacy_eolian_files = \
238 lib/elementary/elm_actionslider_part.eo \ 238 lib/elementary/elm_actionslider_part.eo \
239 lib/elementary/elm_bubble_part.eo \ 239 lib/elementary/elm_bubble_part.eo \
240 lib/elementary/elm_fileselector_part.eo \ 240 lib/elementary/elm_fileselector_part.eo \
241 lib/elementary/elm_diskselector.eo \
242 lib/elementary/elm_diskselector_item.eo \
243 lib/elementary/elm_fileselector_button.eo \ 241 lib/elementary/elm_fileselector_button.eo \
244 lib/elementary/elm_fileselector_entry.eo \ 242 lib/elementary/elm_fileselector_entry.eo \
245 lib/elementary/elm_flipselector.eo \ 243 lib/elementary/elm_flipselector.eo \
@@ -343,6 +341,10 @@ lib/elementary/elm_ctxpopup_item_eo.c \
343lib/elementary/elm_dayselector_eo.legacy.c \ 341lib/elementary/elm_dayselector_eo.legacy.c \
344lib/elementary/elm_dayselector_eo.c \ 342lib/elementary/elm_dayselector_eo.c \
345lib/elementary/elm_dayselector_item_eo.c \ 343lib/elementary/elm_dayselector_item_eo.c \
344lib/elementary/elm_diskselector_eo.legacy.c \
345lib/elementary/elm_diskselector_eo.c \
346lib/elementary/elm_diskselector_item_eo.legacy.c \
347lib/elementary/elm_diskselector_item_eo.c \
346lib/elementary/elm_hoversel_eo.c \ 348lib/elementary/elm_hoversel_eo.c \
347lib/elementary/elm_hoversel_item_eo.c \ 349lib/elementary/elm_hoversel_item_eo.c \
348lib/elementary/elm_hoversel_item_eo.legacy.c 350lib/elementary/elm_hoversel_item_eo.legacy.c
@@ -422,6 +424,10 @@ lib/elementary/elm_dayselector_eo.h \
422lib/elementary/elm_dayselector_eo.legacy.h \ 424lib/elementary/elm_dayselector_eo.legacy.h \
423lib/elementary/elm_dayselector_item_eo.h \ 425lib/elementary/elm_dayselector_item_eo.h \
424lib/elementary/elm_dayselector_item_eo.legacy.h \ 426lib/elementary/elm_dayselector_item_eo.legacy.h \
427lib/elementary/elm_diskselector_eo.h \
428lib/elementary/elm_diskselector_eo.legacy.h \
429lib/elementary/elm_diskselector_item_eo.h \
430lib/elementary/elm_diskselector_item_eo.legacy.h \
425lib/elementary/elm_hoversel_eo.h \ 431lib/elementary/elm_hoversel_eo.h \
426lib/elementary/elm_hoversel_eo.legacy.h \ 432lib/elementary/elm_hoversel_eo.legacy.h \
427lib/elementary/elm_hoversel_item_eo.h \ 433lib/elementary/elm_hoversel_item_eo.h \
diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c
index 3fce2c9..bbaa7e6 100644
--- a/src/lib/elementary/elm_diskselector.c
+++ b/src/lib/elementary/elm_diskselector.c
@@ -9,8 +9,8 @@
9 9
10#include <Elementary.h> 10#include <Elementary.h>
11#include "elm_priv.h" 11#include "elm_priv.h"
12#include "elm_diskselector.eo.h" 12#include "elm_diskselector_eo.h"
13#include "elm_diskselector_item.eo.h" 13#include "elm_diskselector_item_eo.h"
14#include "elm_widget_diskselector.h" 14#include "elm_widget_diskselector.h"
15#include "elm_interface_scrollable.h" 15#include "elm_interface_scrollable.h"
16 16
@@ -1789,5 +1789,5 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_diskselector, Elm_Diskselector_Data)
1789#define ELM_DISKSELECTOR_EXTRA_OPS \ 1789#define ELM_DISKSELECTOR_EXTRA_OPS \
1790 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_diskselector) 1790 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_diskselector)
1791 1791
1792#include "elm_diskselector.eo.c" 1792#include "elm_diskselector_eo.c"
1793#include "elm_diskselector_item.eo.c" 1793#include "elm_diskselector_item_eo.c"
diff --git a/src/lib/elementary/elm_diskselector.eo b/src/lib/elementary/elm_diskselector.eo
deleted file mode 100644
index acfb688..0000000
--- a/src/lib/elementary/elm_diskselector.eo
+++ /dev/null
@@ -1,213 +0,0 @@
1class Elm.Diskselector extends Efl.Ui.Widget implements Elm.Interface_Scrollable,
2 Efl.Access.Widget.Action,
3 Efl.Ui.Clickable, Efl.Ui.Scrollable,
4 Efl.Ui.Selectable, Efl.Ui.Legacy
5{
6 [[Elementary diskselector class]]
7 legacy_prefix: elm_diskselector;
8 eo_prefix: elm_obj_diskselector;
9 event_prefix: elm_diskselector;
10 methods {
11 @property side_text_max_length {
12 set {
13 [[Set the side labels max length.
14
15 Length is the number of characters of items' label that will be
16 visible when it's set on side positions. It will just crop
17 the string after defined size. E.g.:
18
19 An item with label "January" would be displayed on side position as
20 "Jan" if max length is set to 3, or "Janu", if this property
21 is set to 4.
22
23 When it's selected, the entire label will be displayed, except for
24 width restrictions. In this case label will be cropped and "..."
25 will be concatenated.
26
27 Default side label max length is 3.
28
29 This property will be applied over all items, included before or
30 later this function call.
31 ]]
32 }
33 get {
34 [[Get the side labels max length.
35
36 See also @.side_text_max_length.set for details.
37 ]]
38 }
39 values {
40 len: int; [[The max length defined for side labels.]]
41 }
42 }
43 @property round_enabled {
44 set {
45 [[Enable or disable round mode.
46
47 Disabled by default. If round mode is enabled the items list will
48 work like a circular list, so when the user reaches the last item,
49 the first one will popup.
50
51 See also @.round_enabled.get.
52 ]]
53 }
54 get {
55 [[Get a value whether round mode is enabled or not.
56
57 See also @.round_enabled.set for details.
58 ]]
59 }
60 values {
61 enabled: bool; [[$true to enable round mode or $false to
62 disable it.]]
63 }
64 }
65 @property display_item_num {
66 set {
67 [[Set the number of items to be displayed.
68
69 Default value is 3, and also it's the minimum. If $num is less
70 than 3, it will be set to 3.
71
72 Also, it can be set on theme, using data item $display_item_num
73 on group "elm/diskselector/item/X", where X is style set.
74 ]]
75 /* FIXME-doc
76 * E.g.:
77 * group { name: "elm/diskselector/item/X";
78 * data {
79 * item: "display_item_num" "5";
80 * }
81 */
82 }
83 get {
84 [[Get the number of items in the diskselector object.]]
85 }
86 values {
87 num: int; [[The number of items the diskselector will display.]]
88 }
89 }
90 @property first_item {
91 get {
92 [[Get the first item of the diskselector.
93
94 The list of items follows append order. So it will return the first
95 item appended to the widget that wasn't deleted.
96
97 See also @.item_append,
98 @.items.get.
99 ]]
100 return: Elm.Widget.Item; [[The first item, or $null if none.]]
101 }
102 }
103 @property items {
104 get {
105 [[Get a list of all the diskselector items.
106
107 See also @.item_append,
108 \@ref elm_object_item_del,
109 @.clear.
110 ]]
111 return: const(list<Elm.Widget.Item>); [[A $list of diskselector items, or $ull on failure.]]
112 }
113 }
114 @property last_item {
115 get {
116 [[Get the last item of the diskselector.
117
118 The list of items follows append order. So it will return last first
119 item appended to the widget that wasn't deleted.
120
121 See also @.item_append,
122 @.items.get.
123 ]]
124 return: Elm.Widget.Item; [[The last item, or $null if none.]]
125 }
126 }
127 @property selected_item {
128 get {
129 [[Get the selected item.
130
131
132 The selected item can be unselected with
133 @Elm.Diskselector.Item.selected.set, and the first item of
134 diskselector will be selected.
135
136 The selected item always will be centered on diskselector, with
137 full label displayed, i.e., max length set to side labels won't
138 apply on the selected item. More details on
139 @.side_text_max_length.set.
140 ]]
141 return: Elm.Widget.Item; [[The selected diskselector item.]]
142 }
143 }
144 item_append {
145 [[Appends a new item to the diskselector object.
146
147 A new item will be created and appended to the diskselector, i.e., will
148 be set as last item. Also, if there is no selected item, it will
149 be selected. This will always happens for the first appended item.
150
151 If no icon is set, label will be centered on item position, otherwise
152 the icon will be placed at left of the label, that will be shifted
153 to the right.
154
155 Items created with this method can be deleted with
156 \@ref elm_object_item_del.
157
158 Associated $data can be properly freed when item is deleted if a
159 callback function is set with \@ref elm_object_item_del_cb_set.
160
161 If a function is passed as argument, it will be called every time this item
162 is selected, i.e., the user stops the diskselector with this
163 item on center position. If such function isn't needed, just passing
164 $null as $func is enough. The same should be done for $data.
165
166 See also \@ref elm_object_item_del,
167 @.clear,
168 \@ref elm_icon_add.
169 ]]
170 /* FIXME-doc
171 * Simple example (with no function callback or data associated):
172 * @code
173 * disk = elm_diskselector_add(win);
174 * ic = elm_icon_add(win);
175 * elm_image_file_set(ic, "path/to/image", NULL);
176 * elm_icon_resizable_set(ic, true, true);
177 * elm_diskselector_item_append(disk, "label", ic, NULL, NULL);
178 * @endcode
179 */
180 return: Elm.Widget.Item; [[New item]]
181 params {
182 @in label: string; [[The label of the diskselector item.]]
183 @in icon: Efl.Canvas.Object @optional; [[The icon object to use at left side of the item. An
184 icon can be any Evas object, but usually it is an icon created
185 with elm_icon_add(). ]]
186 @in func: Evas_Smart_Cb @optional; [[The function to call when the item is selected.]]
187 @in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
188 }
189 }
190 clear {
191 [[Remove all diskselector's items.
192
193 See also \@ref elm_object_item_del,
194 @.item_append.
195 ]]
196 }
197 }
198 implements {
199 class.constructor;
200 Efl.Object.constructor;
201 Efl.Gfx.Entity.position { set; }
202 Efl.Gfx.Entity.size { set; }
203 Efl.Canvas.Group.group_member_add;
204 Efl.Ui.Widget.on_access_update;
205 Efl.Ui.Widget.theme_apply;
206 Efl.Ui.Focus.Object.on_focus_update;
207 Efl.Ui.L10n.translation_update;
208 Efl.Ui.Widget.widget_sub_object_del;
209 Efl.Ui.Widget.widget_input_event_handler;
210 Elm.Interface_Scrollable.policy { get; set; }
211 Efl.Access.Widget.Action.elm_actions { get; }
212 }
213}
diff --git a/src/lib/elementary/elm_diskselector_eo.c b/src/lib/elementary/elm_diskselector_eo.c
new file mode 100644
index 0000000..a016e72
--- /dev/null
+++ b/src/lib/elementary/elm_diskselector_eo.c
@@ -0,0 +1,227 @@
1
2void _elm_diskselector_side_text_max_length_set(Eo *obj, Elm_Diskselector_Data *pd, int len);
3
4
5static Eina_Error
6__eolian_elm_diskselector_side_text_max_length_set_reflect(Eo *obj, Eina_Value val)
7{
8 Eina_Error r = 0; int cval;
9 if (!eina_value_int_convert(&val, &cval))
10 {
11 r = EINA_ERROR_VALUE_FAILED;
12 goto end;
13 }
14 elm_obj_diskselector_side_text_max_length_set(obj, cval);
15 end:
16 eina_value_flush(&val);
17 return r;
18}
19
20EOAPI EFL_VOID_FUNC_BODYV(elm_obj_diskselector_side_text_max_length_set, EFL_FUNC_CALL(len), int len);
21
22int _elm_diskselector_side_text_max_length_get(const Eo *obj, Elm_Diskselector_Data *pd);
23
24
25static Eina_Value
26__eolian_elm_diskselector_side_text_max_length_get_reflect(Eo *obj)
27{
28 int val = elm_obj_diskselector_side_text_max_length_get(obj);
29 return eina_value_int_init(val);
30}
31
32EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_side_text_max_length_get, int, 0);
33
34void _elm_diskselector_round_enabled_set(Eo *obj, Elm_Diskselector_Data *pd, Eina_Bool enabled);
35
36
37static Eina_Error
38__eolian_elm_diskselector_round_enabled_set_reflect(Eo *obj, Eina_Value val)
39{
40 Eina_Error r = 0; Eina_Bool cval;
41 if (!eina_value_bool_convert(&val, &cval))
42 {
43 r = EINA_ERROR_VALUE_FAILED;
44 goto end;
45 }
46 elm_obj_diskselector_round_enabled_set(obj, cval);
47 end:
48 eina_value_flush(&val);
49 return r;
50}
51
52EOAPI EFL_VOID_FUNC_BODYV(elm_obj_diskselector_round_enabled_set, EFL_FUNC_CALL(enabled), Eina_Bool enabled);
53
54Eina_Bool _elm_diskselector_round_enabled_get(const Eo *obj, Elm_Diskselector_Data *pd);
55
56
57static Eina_Value
58__eolian_elm_diskselector_round_enabled_get_reflect(Eo *obj)
59{
60 Eina_Bool val = elm_obj_diskselector_round_enabled_get(obj);
61 return eina_value_bool_init(val);
62}
63
64EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_round_enabled_get, Eina_Bool, 0);
65
66void _elm_diskselector_display_item_num_set(Eo *obj, Elm_Diskselector_Data *pd, int num);
67
68
69static Eina_Error
70__eolian_elm_diskselector_display_item_num_set_reflect(Eo *obj, Eina_Value val)
71{
72 Eina_Error r = 0; int cval;
73 if (!eina_value_int_convert(&val, &cval))
74 {
75 r = EINA_ERROR_VALUE_FAILED;
76 goto end;
77 }
78 elm_obj_diskselector_display_item_num_set(obj, cval);
79 end:
80 eina_value_flush(&val);
81 return r;
82}
83
84EOAPI EFL_VOID_FUNC_BODYV(elm_obj_diskselector_display_item_num_set, EFL_FUNC_CALL(num), int num);
85
86int _elm_diskselector_display_item_num_get(const Eo *obj, Elm_Diskselector_Data *pd);
87
88
89static Eina_Value
90__eolian_elm_diskselector_display_item_num_get_reflect(Eo *obj)
91{
92 int val = elm_obj_diskselector_display_item_num_get(obj);
93 return eina_value_int_init(val);
94}
95
96EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_display_item_num_get, int, 0);
97
98Elm_Widget_Item *_elm_diskselector_first_item_get(const Eo *obj, Elm_Diskselector_Data *pd);
99
100EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_first_item_get, Elm_Widget_Item *, NULL);
101
102const Eina_List *_elm_diskselector_items_get(const Eo *obj, Elm_Diskselector_Data *pd);
103
104EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_items_get, const Eina_List *, NULL);
105
106Elm_Widget_Item *_elm_diskselector_last_item_get(const Eo *obj, Elm_Diskselector_Data *pd);
107
108EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_last_item_get, Elm_Widget_Item *, NULL);
109
110Elm_Widget_Item *_elm_diskselector_selected_item_get(const Eo *obj, Elm_Diskselector_Data *pd);
111
112EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_selected_item_get, Elm_Widget_Item *, NULL);
113
114Elm_Widget_Item *_elm_diskselector_item_append(Eo *obj, Elm_Diskselector_Data *pd, const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data);
115
116EOAPI EFL_FUNC_BODYV(elm_obj_diskselector_item_append, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(label, icon, func, data), const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data);
117
118void _elm_diskselector_clear(Eo *obj, Elm_Diskselector_Data *pd);
119
120EOAPI EFL_VOID_FUNC_BODY(elm_obj_diskselector_clear);
121
122Efl_Object *_elm_diskselector_efl_object_constructor(Eo *obj, Elm_Diskselector_Data *pd);
123
124
125void _elm_diskselector_efl_gfx_entity_position_set(Eo *obj, Elm_Diskselector_Data *pd, Eina_Position2D pos);
126
127
128void _elm_diskselector_efl_gfx_entity_size_set(Eo *obj, Elm_Diskselector_Data *pd, Eina_Size2D size);
129
130
131void _elm_diskselector_efl_canvas_group_group_member_add(Eo *obj, Elm_Diskselector_Data *pd, Efl_Canvas_Object *sub_obj);
132
133
134void _elm_diskselector_efl_ui_widget_on_access_update(Eo *obj, Elm_Diskselector_Data *pd, Eina_Bool enable);
135
136
137Eina_Error _elm_diskselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Diskselector_Data *pd);
138
139
140Eina_Bool _elm_diskselector_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Diskselector_Data *pd);
141
142
143void _elm_diskselector_efl_ui_l10n_translation_update(Eo *obj, Elm_Diskselector_Data *pd);
144
145
146Eina_Bool _elm_diskselector_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Diskselector_Data *pd, Efl_Canvas_Object *sub_obj);
147
148
149Eina_Bool _elm_diskselector_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Diskselector_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source);
150
151
152void _elm_diskselector_elm_interface_scrollable_policy_set(Eo *obj, Elm_Diskselector_Data *pd, Elm_Scroller_Policy hbar, Elm_Scroller_Policy vbar);
153
154
155void _elm_diskselector_elm_interface_scrollable_policy_get(const Eo *obj, Elm_Diskselector_Data *pd, Elm_Scroller_Policy *hbar, Elm_Scroller_Policy *vbar);
156
157
158const Efl_Access_Action_Data *_elm_diskselector_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Diskselector_Data *pd);
159
160
161static Eina_Bool
162_elm_diskselector_class_initializer(Efl_Class *klass)
163{
164 const Efl_Object_Ops *opsp = NULL;
165
166 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
167
168#ifndef ELM_DISKSELECTOR_EXTRA_OPS
169#define ELM_DISKSELECTOR_EXTRA_OPS
170#endif
171
172 EFL_OPS_DEFINE(ops,
173 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_side_text_max_length_set, _elm_diskselector_side_text_max_length_set),
174 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_side_text_max_length_get, _elm_diskselector_side_text_max_length_get),
175 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_round_enabled_set, _elm_diskselector_round_enabled_set),
176 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_round_enabled_get, _elm_diskselector_round_enabled_get),
177 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_display_item_num_set, _elm_diskselector_display_item_num_set),
178 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_display_item_num_get, _elm_diskselector_display_item_num_get),
179 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_first_item_get, _elm_diskselector_first_item_get),
180 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_items_get, _elm_diskselector_items_get),
181 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_last_item_get, _elm_diskselector_last_item_get),
182 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_selected_item_get, _elm_diskselector_selected_item_get),
183 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_item_append, _elm_diskselector_item_append),
184 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_clear, _elm_diskselector_clear),
185 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_diskselector_efl_object_constructor),
186 EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_diskselector_efl_gfx_entity_position_set),
187 EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_diskselector_efl_gfx_entity_size_set),
188 EFL_OBJECT_OP_FUNC(efl_canvas_group_member_add, _elm_diskselector_efl_canvas_group_group_member_add),
189 EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_diskselector_efl_ui_widget_on_access_update),
190 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_diskselector_efl_ui_widget_theme_apply),
191 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_on_focus_update, _elm_diskselector_efl_ui_focus_object_on_focus_update),
192 EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_diskselector_efl_ui_l10n_translation_update),
193 EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_diskselector_efl_ui_widget_widget_sub_object_del),
194 EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_diskselector_efl_ui_widget_widget_input_event_handler),
195 EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_set, _elm_diskselector_elm_interface_scrollable_policy_set),
196 EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_get, _elm_diskselector_elm_interface_scrollable_policy_get),
197 EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_diskselector_efl_access_widget_action_elm_actions_get),
198 ELM_DISKSELECTOR_EXTRA_OPS
199 );
200 opsp = &ops;
201
202 static const Efl_Object_Property_Reflection refl_table[] = {
203 {"side_text_max_length", __eolian_elm_diskselector_side_text_max_length_set_reflect, __eolian_elm_diskselector_side_text_max_length_get_reflect},
204 {"round_enabled", __eolian_elm_diskselector_round_enabled_set_reflect, __eolian_elm_diskselector_round_enabled_get_reflect},
205 {"display_item_num", __eolian_elm_diskselector_display_item_num_set_reflect, __eolian_elm_diskselector_display_item_num_get_reflect},
206 };
207 static const Efl_Object_Property_Reflection_Ops rops = {
208 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
209 };
210 ropsp = &rops;
211
212 return efl_class_functions_set(klass, opsp, ropsp);
213}
214
215static const Efl_Class_Description _elm_diskselector_class_desc = {
216 EO_VERSION,
217 "Elm.Diskselector",
218 EFL_CLASS_TYPE_REGULAR,
219 sizeof(Elm_Diskselector_Data),
220 _elm_diskselector_class_initializer,
221 _elm_diskselector_class_constructor,
222 NULL
223};
224
225EFL_DEFINE_CLASS(elm_diskselector_class_get, &_elm_diskselector_class_desc, EFL_UI_WIDGET_CLASS, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_SCROLLABLE_INTERFACE, EFL_UI_SELECTABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL);
226
227#include "elm_diskselector_eo.legacy.c"
diff --git a/src/lib/elementary/elm_diskselector_eo.h b/src/lib/elementary/elm_diskselector_eo.h
new file mode 100644
index 0000000..1c95bc1
--- /dev/null
+++ b/src/lib/elementary/elm_diskselector_eo.h
@@ -0,0 +1,232 @@
1#ifndef _ELM_DISKSELECTOR_EO_H_
2#define _ELM_DISKSELECTOR_EO_H_
3
4#ifndef _ELM_DISKSELECTOR_EO_CLASS_TYPE
5#define _ELM_DISKSELECTOR_EO_CLASS_TYPE
6
7typedef Eo Elm_Diskselector;
8
9#endif
10
11#ifndef _ELM_DISKSELECTOR_EO_TYPES
12#define _ELM_DISKSELECTOR_EO_TYPES
13
14
15#endif
16/** Elementary diskselector class
17 *
18 * @ingroup Elm_Diskselector
19 */
20#define ELM_DISKSELECTOR_CLASS elm_diskselector_class_get()
21
22EWAPI const Efl_Class *elm_diskselector_class_get(void);
23
24/**
25 * @brief Set the side labels max length.
26 *
27 * Length is the number of characters of items' label that will be visible when
28 * it's set on side positions. It will just crop the string after defined size.
29 * E.g.:
30 *
31 * An item with label "January" would be displayed on side position as "Jan" if
32 * max length is set to 3, or "Janu", if this property is set to 4.
33 *
34 * When it's selected, the entire label will be displayed, except for width
35 * restrictions. In this case label will be cropped and "..." will be
36 * concatenated.
37 *
38 * Default side label max length is 3.
39 *
40 * This property will be applied over all items, included before or later this
41 * function call.
42 *
43 * @param[in] obj The object.
44 * @param[in] len The max length defined for side labels.
45 *
46 * @ingroup Elm_Diskselector
47 */
48EOAPI void elm_obj_diskselector_side_text_max_length_set(Eo *obj, int len);
49
50/**
51 * @brief Get the side labels max length.
52 *
53 * See also @ref elm_obj_diskselector_side_text_max_length_set for details.
54 *
55 * @param[in] obj The object.
56 *
57 * @return The max length defined for side labels.
58 *
59 * @ingroup Elm_Diskselector
60 */
61EOAPI int elm_obj_diskselector_side_text_max_length_get(const Eo *obj);
62
63/**
64 * @brief Enable or disable round mode.
65 *
66 * Disabled by default. If round mode is enabled the items list will work like
67 * a circular list, so when the user reaches the last item, the first one will
68 * popup.
69 *
70 * See also @ref elm_obj_diskselector_round_enabled_get.
71 *
72 * @param[in] obj The object.
73 * @param[in] enabled @c true to enable round mode or @c false to disable it.
74 *
75 * @ingroup Elm_Diskselector
76 */
77EOAPI void elm_obj_diskselector_round_enabled_set(Eo *obj, Eina_Bool enabled);
78
79/**
80 * @brief Get a value whether round mode is enabled or not.
81 *
82 * See also @ref elm_obj_diskselector_round_enabled_set for details.
83 *
84 * @param[in] obj The object.
85 *
86 * @return @c true to enable round mode or @c false to disable it.
87 *
88 * @ingroup Elm_Diskselector
89 */
90EOAPI Eina_Bool elm_obj_diskselector_round_enabled_get(const Eo *obj);
91
92/**
93 * @brief Set the number of items to be displayed.
94 *
95 * Default value is 3, and also it's the minimum. If @c num is less than 3, it
96 * will be set to 3.
97 *
98 * Also, it can be set on theme, using data item @c display_item_num on group
99 * "elm/diskselector/item/X", where X is style set.
100 *
101 * @param[in] obj The object.
102 * @param[in] num The number of items the diskselector will display.
103 *
104 * @ingroup Elm_Diskselector
105 */
106EOAPI void elm_obj_diskselector_display_item_num_set(Eo *obj, int num);
107
108/**
109 * @brief Get the number of items in the diskselector object.
110 *
111 * @param[in] obj The object.
112 *
113 * @return The number of items the diskselector will display.
114 *
115 * @ingroup Elm_Diskselector
116 */
117EOAPI int elm_obj_diskselector_display_item_num_get(const Eo *obj);
118
119/**
120 * @brief Get the first item of the diskselector.
121 *
122 * The list of items follows append order. So it will return the first item
123 * appended to the widget that wasn't deleted.
124 *
125 * See also @ref elm_obj_diskselector_item_append,
126 * @ref elm_obj_diskselector_items_get.
127 *
128 * @param[in] obj The object.
129 *
130 * @return The first item, or @c null if none.
131 *
132 * @ingroup Elm_Diskselector
133 */
134EOAPI Elm_Widget_Item *elm_obj_diskselector_first_item_get(const Eo *obj);
135
136/**
137 * @brief Get a list of all the diskselector items.
138 *
139 * See also @ref elm_obj_diskselector_item_append, @ref elm_object_item_del,
140 * @ref elm_obj_diskselector_clear.
141 *
142 * @param[in] obj The object.
143 *
144 * @return A @c list of diskselector items, or @c ull on failure.
145 *
146 * @ingroup Elm_Diskselector
147 */
148EOAPI const Eina_List *elm_obj_diskselector_items_get(const Eo *obj);
149
150/**
151 * @brief Get the last item of the diskselector.
152 *
153 * The list of items follows append order. So it will return last first item
154 * appended to the widget that wasn't deleted.
155 *
156 * See also @ref elm_obj_diskselector_item_append,
157 * @ref elm_obj_diskselector_items_get.
158 *
159 * @param[in] obj The object.
160 *
161 * @return The last item, or @c null if none.
162 *
163 * @ingroup Elm_Diskselector
164 */
165EOAPI Elm_Widget_Item *elm_obj_diskselector_last_item_get(const Eo *obj);
166
167/**
168 * @brief Get the selected item.
169 *
170 * The selected item can be unselected with
171 * @ref elm_obj_diskselector_item_selected_set, and the first item of
172 * diskselector will be selected.
173 *
174 * The selected item always will be centered on diskselector, with full label
175 * displayed, i.e., max length set to side labels won't apply on the selected
176 * item. More details on @ref elm_obj_diskselector_side_text_max_length_set.
177 *
178 * @param[in] obj The object.
179 *
180 * @return The selected diskselector item.
181 *
182 * @ingroup Elm_Diskselector
183 */
184EOAPI Elm_Widget_Item *elm_obj_diskselector_selected_item_get(const Eo *obj);
185
186/**
187 * @brief Appends a new item to the diskselector object.
188 *
189 * A new item will be created and appended to the diskselector, i.e., will be
190 * set as last item. Also, if there is no selected item, it will be selected.
191 * This will always happens for the first appended item.
192 *
193 * If no icon is set, label will be centered on item position, otherwise the
194 * icon will be placed at left of the label, that will be shifted to the right.
195 *
196 * Items created with this method can be deleted with @ref elm_object_item_del.
197 *
198 * Associated @c data can be properly freed when item is deleted if a callback
199 * function is set with @ref elm_object_item_del_cb_set.
200 *
201 * If a function is passed as argument, it will be called every time this item
202 * is selected, i.e., the user stops the diskselector with this item on center
203 * position. If such function isn't needed, just passing @c null as @c func is
204 * enough. The same should be done for @c data.
205 *
206 * See also @ref elm_object_item_del, @ref elm_obj_diskselector_clear, @ref
207 * elm_icon_add.
208 *
209 * @param[in] obj The object.
210 * @param[in] label The label of the diskselector item.
211 * @param[in] icon The icon object to use at left side of the item. An icon can
212 * be any Evas object, but usually it is an icon created with elm_icon_add().
213 * @param[in] func The function to call when the item is selected.
214 * @param[in] data The data to associate with the item for related callbacks.
215 *
216 * @return New item
217 *
218 * @ingroup Elm_Diskselector
219 */
220EOAPI Elm_Widget_Item *elm_obj_diskselector_item_append(Eo *obj, const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data);
221
222/**
223 * @brief Remove all diskselector's items.
224 *
225 * See also @ref elm_object_item_del, @ref elm_obj_diskselector_item_append.
226 * @param[in] obj The object.
227 *
228 * @ingroup Elm_Diskselector
229 */
230EOAPI void elm_obj_diskselector_clear(Eo *obj);
231
232#endif
diff --git a/src/lib/elementary/elm_diskselector_eo.legacy.c b/src/lib/elementary/elm_diskselector_eo.legacy.c
new file mode 100644
index 0000000..eb4c1d9
--- /dev/null
+++ b/src/lib/elementary/elm_diskselector_eo.legacy.c
@@ -0,0 +1,72 @@
1
2EAPI void
3elm_diskselector_side_text_max_length_set(Elm_Diskselector *obj, int len)
4{
5 elm_obj_diskselector_side_text_max_length_set(obj, len);
6}
7
8EAPI int
9elm_diskselector_side_text_max_length_get(const Elm_Diskselector *obj)
10{
11 return elm_obj_diskselector_side_text_max_length_get(obj);
12}
13
14EAPI void
15elm_diskselector_round_enabled_set(Elm_Diskselector *obj, Eina_Bool enabled)
16{
17 elm_obj_diskselector_round_enabled_set(obj, enabled);
18}
19
20EAPI Eina_Bool
21elm_diskselector_round_enabled_get(const Elm_Diskselector *obj)
22{
23 return elm_obj_diskselector_round_enabled_get(obj);
24}
25
26EAPI void
27elm_diskselector_display_item_num_set(Elm_Diskselector *obj, int num)
28{
29 elm_obj_diskselector_display_item_num_set(obj, num);
30}
31
32EAPI int
33elm_diskselector_display_item_num_get(const Elm_Diskselector *obj)
34{
35 return elm_obj_diskselector_display_item_num_get(obj);
36}
37
38EAPI Elm_Widget_Item *
39elm_diskselector_first_item_get(const Elm_Diskselector *obj)
40{
41 return elm_obj_diskselector_first_item_get(obj);
42}
43
44EAPI const Eina_List *
45elm_diskselector_items_get(const Elm_Diskselector *obj)
46{
47 return elm_obj_diskselector_items_get(obj);
48}
49
50EAPI Elm_Widget_Item *
51elm_diskselector_last_item_get(const Elm_Diskselector *obj)
52{
53 return elm_obj_diskselector_last_item_get(obj);
54}
55
56EAPI Elm_Widget_Item *
57elm_diskselector_selected_item_get(const Elm_Diskselector *obj)
58{
59 return elm_obj_diskselector_selected_item_get(obj);
60}
61
62EAPI Elm_Widget_Item *
63elm_diskselector_item_append(Elm_Diskselector *obj, const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data)
64{
65 return elm_obj_diskselector_item_append(obj, label, icon, func, data);
66}
67
68EAPI void
69elm_diskselector_clear(Elm_Diskselector *obj)
70{
71 elm_obj_diskselector_clear(obj);
72}
diff --git a/src/lib/elementary/elm_diskselector_eo.legacy.h b/src/lib/elementary/elm_diskselector_eo.legacy.h
new file mode 100644
index 0000000..0f88848
--- /dev/null
+++ b/src/lib/elementary/elm_diskselector_eo.legacy.h
@@ -0,0 +1,223 @@
1#ifndef _ELM_DISKSELECTOR_EO_LEGACY_H_
2#define _ELM_DISKSELECTOR_EO_LEGACY_H_
3
4#ifndef _ELM_DISKSELECTOR_EO_CLASS_TYPE
5#define _ELM_DISKSELECTOR_EO_CLASS_TYPE
6
7typedef Eo Elm_Diskselector;
8
9#endif
10
11#ifndef _ELM_DISKSELECTOR_EO_TYPES
12#define _ELM_DISKSELECTOR_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Set the side labels max length.
19 *
20 * Length is the number of characters of items' label that will be visible when
21 * it's set on side positions. It will just crop the string after defined size.
22 * E.g.:
23 *
24 * An item with label "January" would be displayed on side position as "Jan" if
25 * max length is set to 3, or "Janu", if this property is set to 4.
26 *
27 * When it's selected, the entire label will be displayed, except for width
28 * restrictions. In this case label will be cropped and "..." will be
29 * concatenated.
30 *
31 * Default side label max length is 3.
32 *
33 * This property will be applied over all items, included before or later this
34 * function call.
35 *
36 * @param[in] obj The object.
37 * @param[in] len The max length defined for side labels.
38 *
39 * @ingroup Elm_Diskselector_Group
40 */
41EAPI void elm_diskselector_side_text_max_length_set(Elm_Diskselector *obj, int len);
42
43/**
44 * @brief Get the side labels max length.
45 *
46 * See also @ref elm_diskselector_side_text_max_length_set for details.
47 *
48 * @param[in] obj The object.
49 *
50 * @return The max length defined for side labels.
51 *
52 * @ingroup Elm_Diskselector_Group
53 */
54EAPI int elm_diskselector_side_text_max_length_get(const Elm_Diskselector *obj);
55
56/**
57 * @brief Enable or disable round mode.
58 *
59 * Disabled by default. If round mode is enabled the items list will work like
60 * a circular list, so when the user reaches the last item, the first one will
61 * popup.
62 *
63 * See also @ref elm_diskselector_round_enabled_get.
64 *
65 * @param[in] obj The object.
66 * @param[in] enabled @c true to enable round mode or @c false to disable it.
67 *
68 * @ingroup Elm_Diskselector_Group
69 */
70EAPI void elm_diskselector_round_enabled_set(Elm_Diskselector *obj, Eina_Bool enabled);
71
72/**
73 * @brief Get a value whether round mode is enabled or not.
74 *
75 * See also @ref elm_diskselector_round_enabled_set for details.
76 *
77 * @param[in] obj The object.
78 *
79 * @return @c true to enable round mode or @c false to disable it.
80 *
81 * @ingroup Elm_Diskselector_Group
82 */
83EAPI Eina_Bool elm_diskselector_round_enabled_get(const Elm_Diskselector *obj);
84
85/**
86 * @brief Set the number of items to be displayed.
87 *
88 * Default value is 3, and also it's the minimum. If @c num is less than 3, it
89 * will be set to 3.
90 *
91 * Also, it can be set on theme, using data item @c display_item_num on group
92 * "elm/diskselector/item/X", where X is style set.
93 *
94 * @param[in] obj The object.
95 * @param[in] num The number of items the diskselector will display.
96 *
97 * @ingroup Elm_Diskselector_Group
98 */
99EAPI void elm_diskselector_display_item_num_set(Elm_Diskselector *obj, int num);
100
101/**
102 * @brief Get the number of items in the diskselector object.
103 *
104 * @param[in] obj The object.
105 *
106 * @return The number of items the diskselector will display.
107 *
108 * @ingroup Elm_Diskselector_Group
109 */
110EAPI int elm_diskselector_display_item_num_get(const Elm_Diskselector *obj);
111
112/**
113 * @brief Get the first item of the diskselector.
114 *
115 * The list of items follows append order. So it will return the first item
116 * appended to the widget that wasn't deleted.
117 *
118 * See also @ref elm_diskselector_item_append, @ref elm_diskselector_items_get.
119 *
120 * @param[in] obj The object.
121 *
122 * @return The first item, or @c null if none.
123 *
124 * @ingroup Elm_Diskselector_Group
125 */
126EAPI Elm_Widget_Item *elm_diskselector_first_item_get(const Elm_Diskselector *obj);
127
128/**
129 * @brief Get a list of all the diskselector items.
130 *
131 * See also @ref elm_diskselector_item_append, @ref elm_object_item_del,
132 * @ref elm_diskselector_clear.
133 *
134 * @param[in] obj The object.
135 *
136 * @return A @c list of diskselector items, or @c ull on failure.
137 *
138 * @ingroup Elm_Diskselector_Group
139 */
140EAPI const Eina_List *elm_diskselector_items_get(const Elm_Diskselector *obj);
141
142/**
143 * @brief Get the last item of the diskselector.
144 *
145 * The list of items follows append order. So it will return last first item
146 * appended to the widget that wasn't deleted.
147 *
148 * See also @ref elm_diskselector_item_append, @ref elm_diskselector_items_get.
149 *
150 * @param[in] obj The object.
151 *
152 * @return The last item, or @c null if none.
153 *
154 * @ingroup Elm_Diskselector_Group
155 */
156EAPI Elm_Widget_Item *elm_diskselector_last_item_get(const Elm_Diskselector *obj);
157
158/**
159 * @brief Get the selected item.
160 *
161 * The selected item can be unselected with
162 * @ref elm_diskselector_item_selected_set, and the first item of diskselector
163 * will be selected.
164 *
165 * The selected item always will be centered on diskselector, with full label
166 * displayed, i.e., max length set to side labels won't apply on the selected
167 * item. More details on @ref elm_diskselector_side_text_max_length_set.
168 *
169 * @param[in] obj The object.
170 *
171 * @return The selected diskselector item.
172 *
173 * @ingroup Elm_Diskselector_Group
174 */
175EAPI Elm_Widget_Item *elm_diskselector_selected_item_get(const Elm_Diskselector *obj);
176
177/**
178 * @brief Appends a new item to the diskselector object.
179 *
180 * A new item will be created and appended to the diskselector, i.e., will be
181 * set as last item. Also, if there is no selected item, it will be selected.
182 * This will always happens for the first appended item.
183 *
184 * If no icon is set, label will be centered on item position, otherwise the
185 * icon will be placed at left of the label, that will be shifted to the right.
186 *
187 * Items created with this method can be deleted with @ref elm_object_item_del.
188 *
189 * Associated @c data can be properly freed when item is deleted if a callback
190 * function is set with @ref elm_object_item_del_cb_set.
191 *
192 * If a function is passed as argument, it will be called every time this item
193 * is selected, i.e., the user stops the diskselector with this item on center
194 * position. If such function isn't needed, just passing @c null as @c func is
195 * enough. The same should be done for @c data.
196 *
197 * See also @ref elm_object_item_del, @ref elm_diskselector_clear, @ref
198 * elm_icon_add.
199 *
200 * @param[in] obj The object.
201 * @param[in] label The label of the diskselector item.
202 * @param[in] icon The icon object to use at left side of the item. An icon can
203 * be any Evas object, but usually it is an icon created with elm_icon_add().
204 * @param[in] func The function to call when the item is selected.
205 * @param[in] data The data to associate with the item for related callbacks.
206 *
207 * @return New item
208 *
209 * @ingroup Elm_Diskselector_Group
210 */
211EAPI Elm_Widget_Item *elm_diskselector_item_append(Elm_Diskselector *obj, const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data);
212
213/**
214 * @brief Remove all diskselector's items.
215 *
216 * See also @ref elm_object_item_del, @ref elm_diskselector_item_append.
217 * @param[in] obj The object.
218 *
219 * @ingroup Elm_Diskselector_Group
220 */
221EAPI void elm_diskselector_clear(Elm_Diskselector *obj);
222
223#endif
diff --git a/src/lib/elementary/elm_diskselector_item.eo b/src/lib/elementary/elm_diskselector_item.eo
deleted file mode 100644
index 7653061..0000000
--- a/src/lib/elementary/elm_diskselector_item.eo
+++ /dev/null
@@ -1,90 +0,0 @@
1class Elm.Diskselector.Item extends Elm.Widget.Item implements Efl.Ui.Legacy
2{
3 [[Elementary diskselector item class]]
4 legacy_prefix: elm_diskselector_item;
5 eo_prefix: elm_obj_diskselector_item;
6 methods {
7 @property prev {
8 get {
9 [[Get the item before $item in diskselector.
10
11 The list of items follows append order. So it will return item appended
12 just before $item and that wasn't deleted.
13
14 If it is the first item, $null will be returned.
15 First item can be get by \@ref elm_diskselector_first_item_get.
16
17 See also \@ref elm_diskselector_item_append,
18 \@ref elm_diskselector_items_get.
19 ]]
20 }
21 values {
22 item: Elm.Widget.Item; [[The item before $item, or $null if none or on failure.]]
23 }
24 }
25 @property next {
26 get {
27 [[Get the item after $item in diskselector.
28
29 The list of items follows append order. So it will return item appended
30 just after $item and that wasn't deleted.
31
32 If it is the last item, $null will be returned.
33 Last item can be get by \@ref elm_diskselector_last_item_get.
34
35 See also \@ref elm_diskselector_item_append,
36 \@ref elm_diskselector_items_get.
37 ]]
38 }
39 values {
40 item: Elm.Widget.Item; [[The item after $item, or $null if none or on failure.]]
41 }
42 }
43 @property selected {
44 get {
45 [[Get whether the $item is selected or not.
46
47 See also \@ref elm_diskselector_selected_item_set for details,
48 \@ref elm_diskselector_item_selected_get.
49 ]]
50 }
51 set {
52 [[Set the selected state of an item.
53
54 This sets the selected state of the given $item as $true,
55 for selected and $false for not selected.
56
57 If a new item is selected the previously selected will be unselected.
58 Previously selected item can be get with function
59 \@ref elm_diskselector_selected_item_get.
60
61 If the $item is unselected, the first item of diskselector will
62 be selected.
63
64 Selected items will be visible on center position of diskselector.
65 So if it was on another position before selected, or was invisible,
66 diskselector will animate items until the selected item reaches center
67 position.
68
69 See also \@ref elm_diskselector_item_selected_get,
70 \@ref elm_diskselector_selected_item_get.
71 ]]
72 }
73 values {
74 selected: bool; [[The selected state]]
75 }
76 }
77 /* init { FIXME
78 params {
79 Evas_Smart_Cb func;
80 const(void_ptr) data;
81 }
82 }*/
83 }
84 implements {
85 Efl.Object.constructor;
86 Efl.Object.destructor;
87 Elm.Widget.Item.part_text { get; set; }
88 Elm.Widget.Item.part_content { get; set; }
89 }
90}
diff --git a/src/lib/elementary/elm_diskselector_item_eo.c b/src/lib/elementary/elm_diskselector_item_eo.c
new file mode 100644
index 0000000..806113c
--- /dev/null
+++ b/src/lib/elementary/elm_diskselector_item_eo.c
@@ -0,0 +1,109 @@
1
2Elm_Widget_Item *_elm_diskselector_item_prev_get(const Eo *obj, Elm_Diskselector_Item_Data *pd);
3
4EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_item_prev_get, Elm_Widget_Item *, NULL);
5
6Elm_Widget_Item *_elm_diskselector_item_next_get(const Eo *obj, Elm_Diskselector_Item_Data *pd);
7
8EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_item_next_get, Elm_Widget_Item *, NULL);
9
10void _elm_diskselector_item_selected_set(Eo *obj, Elm_Diskselector_Item_Data *pd, Eina_Bool selected);
11
12
13static Eina_Error
14__eolian_elm_diskselector_item_selected_set_reflect(Eo *obj, Eina_Value val)
15{
16 Eina_Error r = 0; Eina_Bool cval;
17 if (!eina_value_bool_convert(&val, &cval))
18 {
19 r = EINA_ERROR_VALUE_FAILED;
20 goto end;
21 }
22 elm_obj_diskselector_item_selected_set(obj, cval);
23 end:
24 eina_value_flush(&val);
25 return r;
26}
27
28EOAPI EFL_VOID_FUNC_BODYV(elm_obj_diskselector_item_selected_set, EFL_FUNC_CALL(selected), Eina_Bool selected);
29
30Eina_Bool _elm_diskselector_item_selected_get(const Eo *obj, Elm_Diskselector_Item_Data *pd);
31
32
33static Eina_Value
34__eolian_elm_diskselector_item_selected_get_reflect(Eo *obj)
35{
36 Eina_Bool val = elm_obj_diskselector_item_selected_get(obj);
37 return eina_value_bool_init(val);
38}
39
40EOAPI EFL_FUNC_BODY_CONST(elm_obj_diskselector_item_selected_get, Eina_Bool, 0);
41
42Efl_Object *_elm_diskselector_item_efl_object_constructor(Eo *obj, Elm_Diskselector_Item_Data *pd);
43
44
45void _elm_diskselector_item_efl_object_destructor(Eo *obj, Elm_Diskselector_Item_Data *pd);
46
47
48void _elm_diskselector_item_elm_widget_item_part_text_set(Eo *obj, Elm_Diskselector_Item_Data *pd, const char *part, const char *label);
49
50
51const char *_elm_diskselector_item_elm_widget_item_part_text_get(const Eo *obj, Elm_Diskselector_Item_Data *pd, const char *part);
52
53
54void _elm_diskselector_item_elm_widget_item_part_content_set(Eo *obj, Elm_Diskselector_Item_Data *pd, const char *part, Efl_Canvas_Object *content);
55
56
57Efl_Canvas_Object *_elm_diskselector_item_elm_widget_item_part_content_get(const Eo *obj, Elm_Diskselector_Item_Data *pd, const char *part);
58
59
60static Eina_Bool
61_elm_diskselector_item_class_initializer(Efl_Class *klass)
62{
63 const Efl_Object_Ops *opsp = NULL;
64
65 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
66
67#ifndef ELM_DISKSELECTOR_ITEM_EXTRA_OPS
68#define ELM_DISKSELECTOR_ITEM_EXTRA_OPS
69#endif
70
71 EFL_OPS_DEFINE(ops,
72 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_item_prev_get, _elm_diskselector_item_prev_get),
73 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_item_next_get, _elm_diskselector_item_next_get),
74 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_item_selected_set, _elm_diskselector_item_selected_set),
75 EFL_OBJECT_OP_FUNC(elm_obj_diskselector_item_selected_get, _elm_diskselector_item_selected_get),
76 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_diskselector_item_efl_object_constructor),
77 EFL_OBJECT_OP_FUNC(efl_destructor, _elm_diskselector_item_efl_object_destructor),
78 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_set, _elm_diskselector_item_elm_widget_item_part_text_set),
79 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_diskselector_item_elm_widget_item_part_text_get),
80 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_set, _elm_diskselector_item_elm_widget_item_part_content_set),
81 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_get, _elm_diskselector_item_elm_widget_item_part_content_get),
82 ELM_DISKSELECTOR_ITEM_EXTRA_OPS
83 );
84 opsp = &ops;
85
86 static const Efl_Object_Property_Reflection refl_table[] = {
87 {"selected", __eolian_elm_diskselector_item_selected_set_reflect, __eolian_elm_diskselector_item_selected_get_reflect},
88 };
89 static const Efl_Object_Property_Reflection_Ops rops = {
90 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
91 };
92 ropsp = &rops;
93
94 return efl_class_functions_set(klass, opsp, ropsp);
95}
96
97static const Efl_Class_Description _elm_diskselector_item_class_desc = {
98 EO_VERSION,
99 "Elm.Diskselector.Item",
100 EFL_CLASS_TYPE_REGULAR,
101 sizeof(Elm_Diskselector_Item_Data),
102 _elm_diskselector_item_class_initializer,
103 NULL,
104 NULL
105};
106
107EFL_DEFINE_CLASS(elm_diskselector_item_class_get, &_elm_diskselector_item_class_desc, ELM_WIDGET_ITEM_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
108
109#include "elm_diskselector_item_eo.legacy.c"
diff --git a/src/lib/elementary/elm_diskselector_item_eo.h b/src/lib/elementary/elm_diskselector_item_eo.h
new file mode 100644
index 0000000..d322b46
--- /dev/null
+++ b/src/lib/elementary/elm_diskselector_item_eo.h
@@ -0,0 +1,103 @@
1#ifndef _ELM_DISKSELECTOR_ITEM_EO_H_
2#define _ELM_DISKSELECTOR_ITEM_EO_H_
3
4#ifndef _ELM_DISKSELECTOR_ITEM_EO_CLASS_TYPE
5#define _ELM_DISKSELECTOR_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Diskselector_Item;
8
9#endif
10
11#ifndef _ELM_DISKSELECTOR_ITEM_EO_TYPES
12#define _ELM_DISKSELECTOR_ITEM_EO_TYPES
13
14
15#endif
16/** Elementary diskselector item class
17 *
18 * @ingroup Elm_Diskselector_Item
19 */
20#define ELM_DISKSELECTOR_ITEM_CLASS elm_diskselector_item_class_get()
21
22EWAPI const Efl_Class *elm_diskselector_item_class_get(void);
23
24/**
25 * @brief Get the item before @c item in diskselector.
26 *
27 * The list of items follows append order. So it will return item appended just
28 * before @c item and that wasn't deleted.
29 *
30 * If it is the first item, @c null will be returned. First item can be get by
31 * @ref elm_diskselector_first_item_get.
32 *
33 * See also @ref elm_diskselector_item_append, @ref elm_diskselector_items_get.
34 *
35 * @param[in] obj The object.
36 *
37 * @return The item before @c item, or @c null if none or on failure.
38 *
39 * @ingroup Elm_Diskselector_Item
40 */
41EOAPI Elm_Widget_Item *elm_obj_diskselector_item_prev_get(const Eo *obj);
42
43/**
44 * @brief Get the item after @c item in diskselector.
45 *
46 * The list of items follows append order. So it will return item appended just
47 * after @c item and that wasn't deleted.
48 *
49 * If it is the last item, @c null will be returned. Last item can be get by
50 * @ref elm_diskselector_last_item_get.
51 *
52 * See also @ref elm_diskselector_item_append, @ref elm_diskselector_items_get.
53 *
54 * @param[in] obj The object.
55 *
56 * @return The item after @c item, or @c null if none or on failure.
57 *
58 * @ingroup Elm_Diskselector_Item
59 */
60EOAPI Elm_Widget_Item *elm_obj_diskselector_item_next_get(const Eo *obj);
61
62/**
63 * @brief Set the selected state of an item.
64 *
65 * This sets the selected state of the given @c item as @c true, for selected
66 * and @c false for not selected.
67 *
68 * If a new item is selected the previously selected will be unselected.
69 * Previously selected item can be get with function @ref
70 * elm_diskselector_selected_item_get.
71 *
72 * If the @c item is unselected, the first item of diskselector will be
73 * selected.
74 *
75 * Selected items will be visible on center position of diskselector. So if it
76 * was on another position before selected, or was invisible, diskselector will
77 * animate items until the selected item reaches center position.
78 *
79 * See also @ref elm_diskselector_item_selected_get, @ref
80 * elm_diskselector_selected_item_get.
81 *
82 * @param[in] obj The object.
83 * @param[in] selected The selected state
84 *
85 * @ingroup Elm_Diskselector_Item
86 */
87EOAPI void elm_obj_diskselector_item_selected_set(Eo *obj, Eina_Bool selected);
88
89/**
90 * @brief Get whether the @c item is selected or not.
91 *
92 * See also @ref elm_diskselector_selected_item_set for details, @ref
93 * elm_diskselector_item_selected_get.
94 *
95 * @param[in] obj The object.
96 *
97 * @return The selected state
98 *
99 * @ingroup Elm_Diskselector_Item
100 */
101EOAPI Eina_Bool elm_obj_diskselector_item_selected_get(const Eo *obj);
102
103#endif
diff --git a/src/lib/elementary/elm_diskselector_item_eo.legacy.c b/src/lib/elementary/elm_diskselector_item_eo.legacy.c
new file mode 100644
index 0000000..f12cc63
--- /dev/null
+++ b/src/lib/elementary/elm_diskselector_item_eo.legacy.c
@@ -0,0 +1,24 @@
1
2EAPI Elm_Widget_Item *
3elm_diskselector_item_prev_get(const Elm_Diskselector_Item *obj)
4{
5 return elm_obj_diskselector_item_prev_get(obj);
6}
7
8EAPI Elm_Widget_Item *
9elm_diskselector_item_next_get(const Elm_Diskselector_Item *obj)
10{
11 return elm_obj_diskselector_item_next_get(obj);
12}
13
14EAPI void
15elm_diskselector_item_selected_set(Elm_Diskselector_Item *obj, Eina_Bool selected)
16{
17 elm_obj_diskselector_item_selected_set(obj, selected);
18}
19
20EAPI Eina_Bool
21elm_diskselector_item_selected_get(const Elm_Diskselector_Item *obj)
22{
23 return elm_obj_diskselector_item_selected_get(obj);
24}
diff --git a/src/lib/elementary/elm_diskselector_item_eo.legacy.h b/src/lib/elementary/elm_diskselector_item_eo.legacy.h
new file mode 100644
index 0000000..680cb58
--- /dev/null
+++ b/src/lib/elementary/elm_diskselector_item_eo.legacy.h
@@ -0,0 +1,96 @@
1#ifndef _ELM_DISKSELECTOR_ITEM_EO_LEGACY_H_
2#define _ELM_DISKSELECTOR_ITEM_EO_LEGACY_H_
3
4#ifndef _ELM_DISKSELECTOR_ITEM_EO_CLASS_TYPE
5#define _ELM_DISKSELECTOR_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Diskselector_Item;
8
9#endif
10
11#ifndef _ELM_DISKSELECTOR_ITEM_EO_TYPES
12#define _ELM_DISKSELECTOR_ITEM_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Get the item before @c item in diskselector.
19 *
20 * The list of items follows append order. So it will return item appended just
21 * before @c item and that wasn't deleted.
22 *
23 * If it is the first item, @c null will be returned. First item can be get by
24 * @ref elm_diskselector_first_item_get.
25 *
26 * See also @ref elm_diskselector_item_append, @ref elm_diskselector_items_get.
27 *
28 * @param[in] obj The object.
29 *
30 * @return The item before @c item, or @c null if none or on failure.
31 *
32 * @ingroup Elm_Diskselector_Item_Group
33 */
34EAPI Elm_Widget_Item *elm_diskselector_item_prev_get(const Elm_Diskselector_Item *obj);
35
36/**
37 * @brief Get the item after @c item in diskselector.
38 *
39 * The list of items follows append order. So it will return item appended just
40 * after @c item and that wasn't deleted.
41 *
42 * If it is the last item, @c null will be returned. Last item can be get by
43 * @ref elm_diskselector_last_item_get.
44 *
45 * See also @ref elm_diskselector_item_append, @ref elm_diskselector_items_get.
46 *
47 * @param[in] obj The object.
48 *
49 * @return The item after @c item, or @c null if none or on failure.
50 *
51 * @ingroup Elm_Diskselector_Item_Group
52 */
53EAPI Elm_Widget_Item *elm_diskselector_item_next_get(const Elm_Diskselector_Item *obj);
54
55/**
56 * @brief Set the selected state of an item.
57 *
58 * This sets the selected state of the given @c item as @c true, for selected
59 * and @c false for not selected.
60 *
61 * If a new item is selected the previously selected will be unselected.
62 * Previously selected item can be get with function @ref
63 * elm_diskselector_selected_item_get.
64 *
65 * If the @c item is unselected, the first item of diskselector will be
66 * selected.
67 *
68 * Selected items will be visible on center position of diskselector. So if it
69 * was on another position before selected, or was invisible, diskselector will
70 * animate items until the selected item reaches center position.
71 *
72 * See also @ref elm_diskselector_item_selected_get, @ref
73 * elm_diskselector_selected_item_get.
74 *
75 * @param[in] obj The object.
76 * @param[in] selected The selected state
77 *
78 * @ingroup Elm_Diskselector_Item_Group
79 */
80EAPI void elm_diskselector_item_selected_set(Elm_Diskselector_Item *obj, Eina_Bool selected);
81
82/**
83 * @brief Get whether the @c item is selected or not.
84 *
85 * See also @ref elm_diskselector_selected_item_set for details, @ref
86 * elm_diskselector_item_selected_get.
87 *
88 * @param[in] obj The object.
89 *
90 * @return The selected state
91 *
92 * @ingroup Elm_Diskselector_Item_Group
93 */
94EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Diskselector_Item *obj);
95
96#endif
diff --git a/src/lib/elementary/elm_diskselector_legacy.h b/src/lib/elementary/elm_diskselector_legacy.h
index 7ee5080..8f34c06 100644
--- a/src/lib/elementary/elm_diskselector_legacy.h
+++ b/src/lib/elementary/elm_diskselector_legacy.h
@@ -11,5 +11,5 @@
11 */ 11 */
12EAPI Evas_Object *elm_diskselector_add(Evas_Object *parent); 12EAPI Evas_Object *elm_diskselector_add(Evas_Object *parent);
13 13
14#include "elm_diskselector_item.eo.legacy.h" 14#include "elm_diskselector_item_eo.legacy.h"
15#include "elm_diskselector.eo.legacy.h" 15#include "elm_diskselector_eo.legacy.h"
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index ded37ef..33a15ce 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -52,8 +52,6 @@ pub_legacy_eo_files = [
52 'elm_actionslider_part.eo', 52 'elm_actionslider_part.eo',
53 'elm_bubble_part.eo', 53 'elm_bubble_part.eo',
54 'elm_fileselector_part.eo', 54 'elm_fileselector_part.eo',
55 'elm_diskselector.eo',
56 'elm_diskselector_item.eo',
57 'elm_fileselector_button.eo', 55 'elm_fileselector_button.eo',
58 'elm_fileselector_entry.eo', 56 'elm_fileselector_entry.eo',
59 'elm_flipselector.eo', 57 'elm_flipselector.eo',
@@ -738,6 +736,10 @@ elementary_pub_headers = [
738 'elm_dayselector_eo.legacy.h', 736 'elm_dayselector_eo.legacy.h',
739 'elm_dayselector_item_eo.h', 737 'elm_dayselector_item_eo.h',
740 'elm_dayselector_item_eo.legacy.h', 738 'elm_dayselector_item_eo.legacy.h',
739 'elm_diskselector_eo.h',
740 'elm_diskselector_eo.legacy.h',
741 'elm_diskselector_item_eo.h',
742 'elm_diskselector_item_eo.legacy.h',
741 'elm_hoversel_eo.h', 743 'elm_hoversel_eo.h',
742 'elm_hoversel_eo.legacy.h', 744 'elm_hoversel_eo.legacy.h',
743 'elm_hoversel_item_eo.h', 745 'elm_hoversel_item_eo.h',