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:15:39 -0800
commit5eb1d61459e64450e52b42d74d2e229bcb037f24 (patch)
tree06a6e9c72039e8f56a6559f797aa4e275c5a1b78 /src
parent56c234e7ad964f99d6f1b948c03eebb4350b6b4f (diff)
elm_label: 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/D8180
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Elementary.am5
-rw-r--r--src/lib/elementary/elm_label.c2
-rw-r--r--src/lib/elementary/elm_label.eo133
-rw-r--r--src/lib/elementary/elm_label_eo.c219
-rw-r--r--src/lib/elementary/elm_label_eo.h258
-rw-r--r--src/lib/elementary/elm_label_eo.legacy.c78
-rw-r--r--src/lib/elementary/elm_label_eo.legacy.h243
-rw-r--r--src/lib/elementary/elm_label_legacy.h2
-rw-r--r--src/lib/elementary/elm_view_form.c2
-rw-r--r--src/lib/elementary/elm_widget_label.h2
-rw-r--r--src/lib/elementary/meson.build3
11 files changed, 808 insertions, 139 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 6718c88..e2a26c9 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -186,7 +186,6 @@ elm_private_eolian_files = \
186# Legacy classes - not part of public EO API 186# Legacy classes - not part of public EO API
187elm_legacy_eolian_files = \ 187elm_legacy_eolian_files = \
188 lib/elementary/efl_ui_clock_legacy.eo \ 188 lib/elementary/efl_ui_clock_legacy.eo \
189 lib/elementary/elm_label.eo \
190 lib/elementary/elm_list.eo \ 189 lib/elementary/elm_list.eo \
191 lib/elementary/elm_map.eo \ 190 lib/elementary/elm_map.eo \
192 lib/elementary/elm_map_pan.eo \ 191 lib/elementary/elm_map_pan.eo \
@@ -363,6 +362,8 @@ lib/elementary/elm_index_item_eo.legacy.c \
363lib/elementary/elm_interface_fileselector_eo.c \ 362lib/elementary/elm_interface_fileselector_eo.c \
364lib/elementary/elm_inwin_eo.c \ 363lib/elementary/elm_inwin_eo.c \
365lib/elementary/elm_inwin_eo.legacy.c \ 364lib/elementary/elm_inwin_eo.legacy.c \
365lib/elementary/elm_label_eo.c \
366lib/elementary/elm_label_eo.legacy.c \
366$(NULL) 367$(NULL)
367 368
368elm_legacy_eo_headers = \ 369elm_legacy_eo_headers = \
@@ -492,6 +493,8 @@ lib/elementary/elm_interface_fileselector_eo.h \
492lib/elementary/elm_interface_fileselector_eo.legacy.h \ 493lib/elementary/elm_interface_fileselector_eo.legacy.h \
493lib/elementary/elm_inwin_eo.h \ 494lib/elementary/elm_inwin_eo.h \
494lib/elementary/elm_inwin_eo.legacy.h \ 495lib/elementary/elm_inwin_eo.legacy.h \
496lib/elementary/elm_label_eo.h \
497lib/elementary/elm_label_eo.legacy.h \
495$(NULL) 498$(NULL)
496 499
497 500
diff --git a/src/lib/elementary/elm_label.c b/src/lib/elementary/elm_label.c
index 06f6ba3..9e31e5a 100644
--- a/src/lib/elementary/elm_label.c
+++ b/src/lib/elementary/elm_label.c
@@ -632,4 +632,4 @@ ELM_PART_OVERRIDE_TEXT_SET(elm_label, ELM_LABEL, Elm_Label_Data)
632 ELM_LAYOUT_SIZING_EVAL_OPS(elm_label), \ 632 ELM_LAYOUT_SIZING_EVAL_OPS(elm_label), \
633 EFL_CANVAS_GROUP_ADD_OPS(elm_label) 633 EFL_CANVAS_GROUP_ADD_OPS(elm_label)
634 634
635#include "elm_label.eo.c" 635#include "elm_label_eo.c"
diff --git a/src/lib/elementary/elm_label.eo b/src/lib/elementary/elm_label.eo
deleted file mode 100644
index ab96ef4..0000000
--- a/src/lib/elementary/elm_label.eo
+++ /dev/null
@@ -1,133 +0,0 @@
1import elm_general;
2
3enum Elm.Label.Slide_Mode
4{
5 [[Slide mode of a label widget]]
6 none = 0, [[No slide effect.]]
7 auto, [[Slide only if the label area is bigger than the text width length.]]
8 always [[Slide always.]]
9}
10
11class Elm.Label extends Efl.Ui.Layout_Base implements Efl.Ui.Legacy
12{
13 [[Elementary label class]]
14 legacy_prefix: elm_label;
15 eo_prefix: elm_obj_label;
16 event_prefix: elm_label;
17 methods {
18 @property wrap_width {
19 [[Control wrap width of the label
20
21 This function sets the maximum width size hint of the label.
22
23 Warning: This is only relevant if the label is inside a container.]]
24 set {
25 }
26 get {
27 }
28 values {
29 w: int; [[The wrap width in pixels at a minimum where words need to wrap]]
30 }
31 }
32 @property slide_speed {
33 [[Control the slide speed of the label
34
35 Note: If you set the duration of the slide using @.slide_duration.set
36 you cannot get the correct speed using this function until the label
37 is actually rendered and resized.
38
39 See @.slide_duration.set]]
40 set {
41 }
42 get {
43 }
44 values {
45 speed: double; [[The speed of the slide animation in px per seconds]]
46 }
47 }
48 @property slide_mode {
49 [[Control the slide mode of the label widget.
50
51 By default, slide mode is none. Possible values for $mode are:
52 @Elm.Label.Slide_Mode.none - no slide effect
53 @Elm.Label.Slide_Mode.auto - slide only if the label area is bigger than
54 the text width length
55 @Elm.Label.Slide_Mode.always - slide always
56
57 Warning: @Elm.Label.Slide_Mode.auto, @Elm.Label.Slide_Mode.always only work
58 with the themes "slide_short", "slide_long" and "slide_bounce".
59 Warning: @Elm.Label.Slide_Mode.auto, @Elm.Label.Slide_Mode.always don't work
60 if the line wrap(elm_label_line_wrap_set()) or
61 ellipsis(elm_label_ellipsis_set()) is set.
62
63 @since 1.8]]
64 set {
65 }
66 get {
67 }
68 values {
69 mode: Elm.Label.Slide_Mode; [[The slide mode]]
70 }
71 }
72 @property slide_duration {
73 [[Control the slide duration of the label
74
75 Note: If you set the speed of the slide using @.slide_speed.set
76 you cannot get the correct duration using this function until the label
77 is actually rendered and resized.]]
78 set {
79 }
80 get {
81 }
82 values {
83 duration: double; [[The duration in seconds in moving text from slide begin position to slide end position]]
84 }
85 }
86 @property line_wrap {
87 [[Control the wrapping behavior of the label
88
89 By default no wrapping is done. Possible values for $wrap are:
90 $ELM_WRAP_NONE - No wrapping
91 $ELM_WRAP_CHAR - wrap between characters
92 $ELM_WRAP_WORD - wrap between words
93 $ELM_WRAP_MIXED - Word wrap, and if that fails, char wrap]]
94 set {
95 }
96 get {
97 }
98 values {
99 wrap: Elm.Wrap.Type; [[To wrap text or not]]
100 }
101 }
102 @property ellipsis {
103 [[Control the ellipsis behavior of the label
104
105 If set to true and the text doesn't fit in the label an ellipsis("...")
106 will be shown at the end of the widget.
107
108 Warning This doesn't work with slide(elm_label_slide_set()) or if the
109 chosen wrap method was $ELM_WRAP_WORD.]]
110 set {
111 }
112 get {
113 }
114 values {
115 ellipsis: bool; [[To ellipsis text or not]]
116 }
117 }
118 slide_go {
119 [[Start slide effect.
120
121 See @.slide_mode.set.]]
122 }
123 }
124 implements {
125 class.constructor;
126 Efl.Object.constructor;
127 Efl.Ui.Widget.theme_apply;
128 Efl.Part.part_get;
129 }
130 events {
131 slide,end: void; [[Called when slide stopped]]
132 }
133}
diff --git a/src/lib/elementary/elm_label_eo.c b/src/lib/elementary/elm_label_eo.c
new file mode 100644
index 0000000..f16ea83
--- /dev/null
+++ b/src/lib/elementary/elm_label_eo.c
@@ -0,0 +1,219 @@
1EWAPI const Efl_Event_Description _ELM_LABEL_EVENT_SLIDE_END =
2 EFL_EVENT_DESCRIPTION("slide,end");
3
4void _elm_label_wrap_width_set(Eo *obj, Elm_Label_Data *pd, int w);
5
6
7static Eina_Error
8__eolian_elm_label_wrap_width_set_reflect(Eo *obj, Eina_Value val)
9{
10 Eina_Error r = 0; int cval;
11 if (!eina_value_int_convert(&val, &cval))
12 {
13 r = EINA_ERROR_VALUE_FAILED;
14 goto end;
15 }
16 elm_obj_label_wrap_width_set(obj, cval);
17 end:
18 eina_value_flush(&val);
19 return r;
20}
21
22EOAPI EFL_VOID_FUNC_BODYV(elm_obj_label_wrap_width_set, EFL_FUNC_CALL(w), int w);
23
24int _elm_label_wrap_width_get(const Eo *obj, Elm_Label_Data *pd);
25
26
27static Eina_Value
28__eolian_elm_label_wrap_width_get_reflect(Eo *obj)
29{
30 int val = elm_obj_label_wrap_width_get(obj);
31 return eina_value_int_init(val);
32}
33
34EOAPI EFL_FUNC_BODY_CONST(elm_obj_label_wrap_width_get, int, 0);
35
36void _elm_label_slide_speed_set(Eo *obj, Elm_Label_Data *pd, double speed);
37
38
39static Eina_Error
40__eolian_elm_label_slide_speed_set_reflect(Eo *obj, Eina_Value val)
41{
42 Eina_Error r = 0; double cval;
43 if (!eina_value_double_convert(&val, &cval))
44 {
45 r = EINA_ERROR_VALUE_FAILED;
46 goto end;
47 }
48 elm_obj_label_slide_speed_set(obj, cval);
49 end:
50 eina_value_flush(&val);
51 return r;
52}
53
54EOAPI EFL_VOID_FUNC_BODYV(elm_obj_label_slide_speed_set, EFL_FUNC_CALL(speed), double speed);
55
56double _elm_label_slide_speed_get(const Eo *obj, Elm_Label_Data *pd);
57
58
59static Eina_Value
60__eolian_elm_label_slide_speed_get_reflect(Eo *obj)
61{
62 double val = elm_obj_label_slide_speed_get(obj);
63 return eina_value_double_init(val);
64}
65
66EOAPI EFL_FUNC_BODY_CONST(elm_obj_label_slide_speed_get, double, 0);
67
68void _elm_label_slide_mode_set(Eo *obj, Elm_Label_Data *pd, Elm_Label_Slide_Mode mode);
69
70EOAPI EFL_VOID_FUNC_BODYV(elm_obj_label_slide_mode_set, EFL_FUNC_CALL(mode), Elm_Label_Slide_Mode mode);
71
72Elm_Label_Slide_Mode _elm_label_slide_mode_get(const Eo *obj, Elm_Label_Data *pd);
73
74EOAPI EFL_FUNC_BODY_CONST(elm_obj_label_slide_mode_get, Elm_Label_Slide_Mode, 0);
75
76void _elm_label_slide_duration_set(Eo *obj, Elm_Label_Data *pd, double duration);
77
78
79static Eina_Error
80__eolian_elm_label_slide_duration_set_reflect(Eo *obj, Eina_Value val)
81{
82 Eina_Error r = 0; double cval;
83 if (!eina_value_double_convert(&val, &cval))
84 {
85 r = EINA_ERROR_VALUE_FAILED;
86 goto end;
87 }
88 elm_obj_label_slide_duration_set(obj, cval);
89 end:
90 eina_value_flush(&val);
91 return r;
92}
93
94EOAPI EFL_VOID_FUNC_BODYV(elm_obj_label_slide_duration_set, EFL_FUNC_CALL(duration), double duration);
95
96double _elm_label_slide_duration_get(const Eo *obj, Elm_Label_Data *pd);
97
98
99static Eina_Value
100__eolian_elm_label_slide_duration_get_reflect(Eo *obj)
101{
102 double val = elm_obj_label_slide_duration_get(obj);
103 return eina_value_double_init(val);
104}
105
106EOAPI EFL_FUNC_BODY_CONST(elm_obj_label_slide_duration_get, double, 0);
107
108void _elm_label_line_wrap_set(Eo *obj, Elm_Label_Data *pd, Elm_Wrap_Type wrap);
109
110EOAPI EFL_VOID_FUNC_BODYV(elm_obj_label_line_wrap_set, EFL_FUNC_CALL(wrap), Elm_Wrap_Type wrap);
111
112Elm_Wrap_Type _elm_label_line_wrap_get(const Eo *obj, Elm_Label_Data *pd);
113
114EOAPI EFL_FUNC_BODY_CONST(elm_obj_label_line_wrap_get, Elm_Wrap_Type, 0);
115
116void _elm_label_ellipsis_set(Eo *obj, Elm_Label_Data *pd, Eina_Bool ellipsis);
117
118
119static Eina_Error
120__eolian_elm_label_ellipsis_set_reflect(Eo *obj, Eina_Value val)
121{
122 Eina_Error r = 0; Eina_Bool cval;
123 if (!eina_value_bool_convert(&val, &cval))
124 {
125 r = EINA_ERROR_VALUE_FAILED;
126 goto end;
127 }
128 elm_obj_label_ellipsis_set(obj, cval);
129 end:
130 eina_value_flush(&val);
131 return r;
132}
133
134EOAPI EFL_VOID_FUNC_BODYV(elm_obj_label_ellipsis_set, EFL_FUNC_CALL(ellipsis), Eina_Bool ellipsis);
135
136Eina_Bool _elm_label_ellipsis_get(const Eo *obj, Elm_Label_Data *pd);
137
138
139static Eina_Value
140__eolian_elm_label_ellipsis_get_reflect(Eo *obj)
141{
142 Eina_Bool val = elm_obj_label_ellipsis_get(obj);
143 return eina_value_bool_init(val);
144}
145
146EOAPI EFL_FUNC_BODY_CONST(elm_obj_label_ellipsis_get, Eina_Bool, 0);
147
148void _elm_label_slide_go(Eo *obj, Elm_Label_Data *pd);
149
150EOAPI EFL_VOID_FUNC_BODY(elm_obj_label_slide_go);
151
152Efl_Object *_elm_label_efl_object_constructor(Eo *obj, Elm_Label_Data *pd);
153
154
155Eina_Error _elm_label_efl_ui_widget_theme_apply(Eo *obj, Elm_Label_Data *pd);
156
157
158Efl_Object *_elm_label_efl_part_part_get(const Eo *obj, Elm_Label_Data *pd, const char *name);
159
160
161static Eina_Bool
162_elm_label_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_LABEL_EXTRA_OPS
169#define ELM_LABEL_EXTRA_OPS
170#endif
171
172 EFL_OPS_DEFINE(ops,
173 EFL_OBJECT_OP_FUNC(elm_obj_label_wrap_width_set, _elm_label_wrap_width_set),
174 EFL_OBJECT_OP_FUNC(elm_obj_label_wrap_width_get, _elm_label_wrap_width_get),
175 EFL_OBJECT_OP_FUNC(elm_obj_label_slide_speed_set, _elm_label_slide_speed_set),
176 EFL_OBJECT_OP_FUNC(elm_obj_label_slide_speed_get, _elm_label_slide_speed_get),
177 EFL_OBJECT_OP_FUNC(elm_obj_label_slide_mode_set, _elm_label_slide_mode_set),
178 EFL_OBJECT_OP_FUNC(elm_obj_label_slide_mode_get, _elm_label_slide_mode_get),
179 EFL_OBJECT_OP_FUNC(elm_obj_label_slide_duration_set, _elm_label_slide_duration_set),
180 EFL_OBJECT_OP_FUNC(elm_obj_label_slide_duration_get, _elm_label_slide_duration_get),
181 EFL_OBJECT_OP_FUNC(elm_obj_label_line_wrap_set, _elm_label_line_wrap_set),
182 EFL_OBJECT_OP_FUNC(elm_obj_label_line_wrap_get, _elm_label_line_wrap_get),
183 EFL_OBJECT_OP_FUNC(elm_obj_label_ellipsis_set, _elm_label_ellipsis_set),
184 EFL_OBJECT_OP_FUNC(elm_obj_label_ellipsis_get, _elm_label_ellipsis_get),
185 EFL_OBJECT_OP_FUNC(elm_obj_label_slide_go, _elm_label_slide_go),
186 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_label_efl_object_constructor),
187 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_label_efl_ui_widget_theme_apply),
188 EFL_OBJECT_OP_FUNC(efl_part_get, _elm_label_efl_part_part_get),
189 ELM_LABEL_EXTRA_OPS
190 );
191 opsp = &ops;
192
193 static const Efl_Object_Property_Reflection refl_table[] = {
194 {"wrap_width", __eolian_elm_label_wrap_width_set_reflect, __eolian_elm_label_wrap_width_get_reflect},
195 {"slide_speed", __eolian_elm_label_slide_speed_set_reflect, __eolian_elm_label_slide_speed_get_reflect},
196 {"slide_duration", __eolian_elm_label_slide_duration_set_reflect, __eolian_elm_label_slide_duration_get_reflect},
197 {"ellipsis", __eolian_elm_label_ellipsis_set_reflect, __eolian_elm_label_ellipsis_get_reflect},
198 };
199 static const Efl_Object_Property_Reflection_Ops rops = {
200 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
201 };
202 ropsp = &rops;
203
204 return efl_class_functions_set(klass, opsp, ropsp);
205}
206
207static const Efl_Class_Description _elm_label_class_desc = {
208 EO_VERSION,
209 "Elm.Label",
210 EFL_CLASS_TYPE_REGULAR,
211 sizeof(Elm_Label_Data),
212 _elm_label_class_initializer,
213 _elm_label_class_constructor,
214 NULL
215};
216
217EFL_DEFINE_CLASS(elm_label_class_get, &_elm_label_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
218
219#include "elm_label_eo.legacy.c"
diff --git a/src/lib/elementary/elm_label_eo.h b/src/lib/elementary/elm_label_eo.h
new file mode 100644
index 0000000..56a0016
--- /dev/null
+++ b/src/lib/elementary/elm_label_eo.h
@@ -0,0 +1,258 @@
1#ifndef _ELM_LABEL_EO_H_
2#define _ELM_LABEL_EO_H_
3
4#ifndef _ELM_LABEL_EO_CLASS_TYPE
5#define _ELM_LABEL_EO_CLASS_TYPE
6
7typedef Eo Elm_Label;
8
9#endif
10
11#ifndef _ELM_LABEL_EO_TYPES
12#define _ELM_LABEL_EO_TYPES
13
14/** Slide mode of a label widget
15 *
16 * @ingroup Elm_Label
17 */
18typedef enum
19{
20 ELM_LABEL_SLIDE_MODE_NONE = 0, /**< No slide effect. */
21 ELM_LABEL_SLIDE_MODE_AUTO, /**< Slide only if the label area is bigger than
22 * the text width length. */
23 ELM_LABEL_SLIDE_MODE_ALWAYS /**< Slide always. */
24} Elm_Label_Slide_Mode;
25
26
27#endif
28/** Elementary label class
29 *
30 * @ingroup Elm_Label
31 */
32#define ELM_LABEL_CLASS elm_label_class_get()
33
34EWAPI const Efl_Class *elm_label_class_get(void);
35
36/**
37 * @brief Control wrap width of the label
38 *
39 * This function sets the maximum width size hint of the label.
40 *
41 * @warning This is only relevant if the label is inside a container.
42 *
43 * @param[in] obj The object.
44 * @param[in] w The wrap width in pixels at a minimum where words need to wrap
45 *
46 * @ingroup Elm_Label
47 */
48EOAPI void elm_obj_label_wrap_width_set(Eo *obj, int w);
49
50/**
51 * @brief Control wrap width of the label
52 *
53 * This function sets the maximum width size hint of the label.
54 *
55 * @warning This is only relevant if the label is inside a container.
56 *
57 * @param[in] obj The object.
58 *
59 * @return The wrap width in pixels at a minimum where words need to wrap
60 *
61 * @ingroup Elm_Label
62 */
63EOAPI int elm_obj_label_wrap_width_get(const Eo *obj);
64
65/**
66 * @brief Control the slide speed of the label
67 *
68 * @note If you set the duration of the slide using
69 * @ref elm_obj_label_slide_duration_set you cannot get the correct speed using
70 * this function until the label is actually rendered and resized.
71 *
72 * See @ref elm_obj_label_slide_duration_set
73 *
74 * @param[in] obj The object.
75 * @param[in] speed The speed of the slide animation in px per seconds
76 *
77 * @ingroup Elm_Label
78 */
79EOAPI void elm_obj_label_slide_speed_set(Eo *obj, double speed);
80
81/**
82 * @brief Control the slide speed of the label
83 *
84 * @note If you set the duration of the slide using
85 * @ref elm_obj_label_slide_duration_set you cannot get the correct speed using
86 * this function until the label is actually rendered and resized.
87 *
88 * See @ref elm_obj_label_slide_duration_set
89 *
90 * @param[in] obj The object.
91 *
92 * @return The speed of the slide animation in px per seconds
93 *
94 * @ingroup Elm_Label
95 */
96EOAPI double elm_obj_label_slide_speed_get(const Eo *obj);
97
98/**
99 * @brief Control the slide mode of the label widget.
100 *
101 * By default, slide mode is none. Possible values for @c mode are:
102 * @ref ELM_LABEL_SLIDE_MODE_NONE - no slide effect
103 * @ref ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than
104 * the text width length @ref ELM_LABEL_SLIDE_MODE_ALWAYS - slide always
105 *
106 * @warning @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
107 * only work with the themes "slide_short", "slide_long" and "slide_bounce".
108 * Warning: @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
109 * don't work if the line wrap(elm_label_line_wrap_set()) or
110 * ellipsis(elm_label_ellipsis_set()) is set.
111 *
112 * @param[in] obj The object.
113 * @param[in] mode The slide mode
114 *
115 * @since 1.8
116 *
117 * @ingroup Elm_Label
118 */
119EOAPI void elm_obj_label_slide_mode_set(Eo *obj, Elm_Label_Slide_Mode mode);
120
121/**
122 * @brief Control the slide mode of the label widget.
123 *
124 * By default, slide mode is none. Possible values for @c mode are:
125 * @ref ELM_LABEL_SLIDE_MODE_NONE - no slide effect
126 * @ref ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than
127 * the text width length @ref ELM_LABEL_SLIDE_MODE_ALWAYS - slide always
128 *
129 * @warning @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
130 * only work with the themes "slide_short", "slide_long" and "slide_bounce".
131 * Warning: @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
132 * don't work if the line wrap(elm_label_line_wrap_set()) or
133 * ellipsis(elm_label_ellipsis_set()) is set.
134 *
135 * @param[in] obj The object.
136 *
137 * @return The slide mode
138 *
139 * @since 1.8
140 *
141 * @ingroup Elm_Label
142 */
143EOAPI Elm_Label_Slide_Mode elm_obj_label_slide_mode_get(const Eo *obj);
144
145/**
146 * @brief Control the slide duration of the label
147 *
148 * @note If you set the speed of the slide using
149 * @ref elm_obj_label_slide_speed_set you cannot get the correct duration using
150 * this function until the label is actually rendered and resized.
151 *
152 * @param[in] obj The object.
153 * @param[in] duration The duration in seconds in moving text from slide begin
154 * position to slide end position
155 *
156 * @ingroup Elm_Label
157 */
158EOAPI void elm_obj_label_slide_duration_set(Eo *obj, double duration);
159
160/**
161 * @brief Control the slide duration of the label
162 *
163 * @note If you set the speed of the slide using
164 * @ref elm_obj_label_slide_speed_set you cannot get the correct duration using
165 * this function until the label is actually rendered and resized.
166 *
167 * @param[in] obj The object.
168 *
169 * @return The duration in seconds in moving text from slide begin position to
170 * slide end position
171 *
172 * @ingroup Elm_Label
173 */
174EOAPI double elm_obj_label_slide_duration_get(const Eo *obj);
175
176/**
177 * @brief Control the wrapping behavior of the label
178 *
179 * By default no wrapping is done. Possible values for @c wrap are:
180 * @c ELM_WRAP_NONE - No wrapping @c ELM_WRAP_CHAR - wrap between characters
181 * @c ELM_WRAP_WORD - wrap between words @c ELM_WRAP_MIXED - Word wrap, and if
182 * that fails, char wrap
183 *
184 * @param[in] obj The object.
185 * @param[in] wrap To wrap text or not
186 *
187 * @ingroup Elm_Label
188 */
189EOAPI void elm_obj_label_line_wrap_set(Eo *obj, Elm_Wrap_Type wrap);
190
191/**
192 * @brief Control the wrapping behavior of the label
193 *
194 * By default no wrapping is done. Possible values for @c wrap are:
195 * @c ELM_WRAP_NONE - No wrapping @c ELM_WRAP_CHAR - wrap between characters
196 * @c ELM_WRAP_WORD - wrap between words @c ELM_WRAP_MIXED - Word wrap, and if
197 * that fails, char wrap
198 *
199 * @param[in] obj The object.
200 *
201 * @return To wrap text or not
202 *
203 * @ingroup Elm_Label
204 */
205EOAPI Elm_Wrap_Type elm_obj_label_line_wrap_get(const Eo *obj);
206
207/**
208 * @brief Control the ellipsis behavior of the label
209 *
210 * If set to true and the text doesn't fit in the label an ellipsis("...") will
211 * be shown at the end of the widget.
212 *
213 * Warning This doesn't work with slide(elm_label_slide_set()) or if the chosen
214 * wrap method was @c ELM_WRAP_WORD.
215 *
216 * @param[in] obj The object.
217 * @param[in] ellipsis To ellipsis text or not
218 *
219 * @ingroup Elm_Label
220 */
221EOAPI void elm_obj_label_ellipsis_set(Eo *obj, Eina_Bool ellipsis);
222
223/**
224 * @brief Control the ellipsis behavior of the label
225 *
226 * If set to true and the text doesn't fit in the label an ellipsis("...") will
227 * be shown at the end of the widget.
228 *
229 * Warning This doesn't work with slide(elm_label_slide_set()) or if the chosen
230 * wrap method was @c ELM_WRAP_WORD.
231 *
232 * @param[in] obj The object.
233 *
234 * @return To ellipsis text or not
235 *
236 * @ingroup Elm_Label
237 */
238EOAPI Eina_Bool elm_obj_label_ellipsis_get(const Eo *obj);
239
240/**
241 * @brief Start slide effect.
242 *
243 * See @ref elm_obj_label_slide_mode_set.
244 * @param[in] obj The object.
245 *
246 * @ingroup Elm_Label
247 */
248EOAPI void elm_obj_label_slide_go(Eo *obj);
249
250EWAPI extern const Efl_Event_Description _ELM_LABEL_EVENT_SLIDE_END;
251
252/** Called when slide stopped
253 *
254 * @ingroup Elm_Label
255 */
256#define ELM_LABEL_EVENT_SLIDE_END (&(_ELM_LABEL_EVENT_SLIDE_END))
257
258#endif
diff --git a/src/lib/elementary/elm_label_eo.legacy.c b/src/lib/elementary/elm_label_eo.legacy.c
new file mode 100644
index 0000000..649b6d5
--- /dev/null
+++ b/src/lib/elementary/elm_label_eo.legacy.c
@@ -0,0 +1,78 @@
1
2EAPI void
3elm_label_wrap_width_set(Elm_Label *obj, int w)
4{
5 elm_obj_label_wrap_width_set(obj, w);
6}
7
8EAPI int
9elm_label_wrap_width_get(const Elm_Label *obj)
10{
11 return elm_obj_label_wrap_width_get(obj);
12}
13
14EAPI void
15elm_label_slide_speed_set(Elm_Label *obj, double speed)
16{
17 elm_obj_label_slide_speed_set(obj, speed);
18}
19
20EAPI double
21elm_label_slide_speed_get(const Elm_Label *obj)
22{
23 return elm_obj_label_slide_speed_get(obj);
24}
25
26EAPI void
27elm_label_slide_mode_set(Elm_Label *obj, Elm_Label_Slide_Mode mode)
28{
29 elm_obj_label_slide_mode_set(obj, mode);
30}
31
32EAPI Elm_Label_Slide_Mode
33elm_label_slide_mode_get(const Elm_Label *obj)
34{
35 return elm_obj_label_slide_mode_get(obj);
36}
37
38EAPI void
39elm_label_slide_duration_set(Elm_Label *obj, double duration)
40{
41 elm_obj_label_slide_duration_set(obj, duration);
42}
43
44EAPI double
45elm_label_slide_duration_get(const Elm_Label *obj)
46{
47 return elm_obj_label_slide_duration_get(obj);
48}
49
50EAPI void
51elm_label_line_wrap_set(Elm_Label *obj, Elm_Wrap_Type wrap)
52{
53 elm_obj_label_line_wrap_set(obj, wrap);
54}
55
56EAPI Elm_Wrap_Type
57elm_label_line_wrap_get(const Elm_Label *obj)
58{
59 return elm_obj_label_line_wrap_get(obj);
60}
61
62EAPI void
63elm_label_ellipsis_set(Elm_Label *obj, Eina_Bool ellipsis)
64{
65 elm_obj_label_ellipsis_set(obj, ellipsis);
66}
67
68EAPI Eina_Bool
69elm_label_ellipsis_get(const Elm_Label *obj)
70{
71 return elm_obj_label_ellipsis_get(obj);
72}
73
74EAPI void
75elm_label_slide_go(Elm_Label *obj)
76{
77 elm_obj_label_slide_go(obj);
78}
diff --git a/src/lib/elementary/elm_label_eo.legacy.h b/src/lib/elementary/elm_label_eo.legacy.h
new file mode 100644
index 0000000..126207a
--- /dev/null
+++ b/src/lib/elementary/elm_label_eo.legacy.h
@@ -0,0 +1,243 @@
1#ifndef _ELM_LABEL_EO_LEGACY_H_
2#define _ELM_LABEL_EO_LEGACY_H_
3
4#ifndef _ELM_LABEL_EO_CLASS_TYPE
5#define _ELM_LABEL_EO_CLASS_TYPE
6
7typedef Eo Elm_Label;
8
9#endif
10
11#ifndef _ELM_LABEL_EO_TYPES
12#define _ELM_LABEL_EO_TYPES
13
14/** Slide mode of a label widget
15 *
16 * @ingroup Elm_Label
17 */
18typedef enum
19{
20 ELM_LABEL_SLIDE_MODE_NONE = 0, /**< No slide effect. */
21 ELM_LABEL_SLIDE_MODE_AUTO, /**< Slide only if the label area is bigger than
22 * the text width length. */
23 ELM_LABEL_SLIDE_MODE_ALWAYS /**< Slide always. */
24} Elm_Label_Slide_Mode;
25
26
27#endif
28
29/**
30 * @brief Control wrap width of the label
31 *
32 * This function sets the maximum width size hint of the label.
33 *
34 * @warning This is only relevant if the label is inside a container.
35 *
36 * @param[in] obj The object.
37 * @param[in] w The wrap width in pixels at a minimum where words need to wrap
38 *
39 * @ingroup Elm_Label_Group
40 */
41EAPI void elm_label_wrap_width_set(Elm_Label *obj, int w);
42
43/**
44 * @brief Control wrap width of the label
45 *
46 * This function sets the maximum width size hint of the label.
47 *
48 * @warning This is only relevant if the label is inside a container.
49 *
50 * @param[in] obj The object.
51 *
52 * @return The wrap width in pixels at a minimum where words need to wrap
53 *
54 * @ingroup Elm_Label_Group
55 */
56EAPI int elm_label_wrap_width_get(const Elm_Label *obj);
57
58/**
59 * @brief Control the slide speed of the label
60 *
61 * @note If you set the duration of the slide using
62 * @ref elm_label_slide_duration_set you cannot get the correct speed using
63 * this function until the label is actually rendered and resized.
64 *
65 * See @ref elm_label_slide_duration_set
66 *
67 * @param[in] obj The object.
68 * @param[in] speed The speed of the slide animation in px per seconds
69 *
70 * @ingroup Elm_Label_Group
71 */
72EAPI void elm_label_slide_speed_set(Elm_Label *obj, double speed);
73
74/**
75 * @brief Control the slide speed of the label
76 *
77 * @note If you set the duration of the slide using
78 * @ref elm_label_slide_duration_set you cannot get the correct speed using
79 * this function until the label is actually rendered and resized.
80 *
81 * See @ref elm_label_slide_duration_set
82 *
83 * @param[in] obj The object.
84 *
85 * @return The speed of the slide animation in px per seconds
86 *
87 * @ingroup Elm_Label_Group
88 */
89EAPI double elm_label_slide_speed_get(const Elm_Label *obj);
90
91/**
92 * @brief Control the slide mode of the label widget.
93 *
94 * By default, slide mode is none. Possible values for @c mode are:
95 * @ref ELM_LABEL_SLIDE_MODE_NONE - no slide effect
96 * @ref ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than
97 * the text width length @ref ELM_LABEL_SLIDE_MODE_ALWAYS - slide always
98 *
99 * @warning @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
100 * only work with the themes "slide_short", "slide_long" and "slide_bounce".
101 * Warning: @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
102 * don't work if the line wrap(elm_label_line_wrap_set()) or
103 * ellipsis(elm_label_ellipsis_set()) is set.
104 *
105 * @param[in] obj The object.
106 * @param[in] mode The slide mode
107 *
108 * @since 1.8
109 *
110 * @ingroup Elm_Label_Group
111 */
112EAPI void elm_label_slide_mode_set(Elm_Label *obj, Elm_Label_Slide_Mode mode);
113
114/**
115 * @brief Control the slide mode of the label widget.
116 *
117 * By default, slide mode is none. Possible values for @c mode are:
118 * @ref ELM_LABEL_SLIDE_MODE_NONE - no slide effect
119 * @ref ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than
120 * the text width length @ref ELM_LABEL_SLIDE_MODE_ALWAYS - slide always
121 *
122 * @warning @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
123 * only work with the themes "slide_short", "slide_long" and "slide_bounce".
124 * Warning: @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
125 * don't work if the line wrap(elm_label_line_wrap_set()) or
126 * ellipsis(elm_label_ellipsis_set()) is set.
127 *
128 * @param[in] obj The object.
129 *
130 * @return The slide mode
131 *
132 * @since 1.8
133 *
134 * @ingroup Elm_Label_Group
135 */
136EAPI Elm_Label_Slide_Mode elm_label_slide_mode_get(const Elm_Label *obj);
137
138/**
139 * @brief Control the slide duration of the label
140 *
141 * @note If you set the speed of the slide using @ref elm_label_slide_speed_set
142 * you cannot get the correct duration using this function until the label is
143 * actually rendered and resized.
144 *
145 * @param[in] obj The object.
146 * @param[in] duration The duration in seconds in moving text from slide begin
147 * position to slide end position
148 *
149 * @ingroup Elm_Label_Group
150 */
151EAPI void elm_label_slide_duration_set(Elm_Label *obj, double duration);
152
153/**
154 * @brief Control the slide duration of the label
155 *
156 * @note If you set the speed of the slide using @ref elm_label_slide_speed_set
157 * you cannot get the correct duration using this function until the label is
158 * actually rendered and resized.
159 *
160 * @param[in] obj The object.
161 *
162 * @return The duration in seconds in moving text from slide begin position to
163 * slide end position
164 *
165 * @ingroup Elm_Label_Group
166 */
167EAPI double elm_label_slide_duration_get(const Elm_Label *obj);
168
169/**
170 * @brief Control the wrapping behavior of the label
171 *
172 * By default no wrapping is done. Possible values for @c wrap are:
173 * @c ELM_WRAP_NONE - No wrapping @c ELM_WRAP_CHAR - wrap between characters
174 * @c ELM_WRAP_WORD - wrap between words @c ELM_WRAP_MIXED - Word wrap, and if
175 * that fails, char wrap
176 *
177 * @param[in] obj The object.
178 * @param[in] wrap To wrap text or not
179 *
180 * @ingroup Elm_Label_Group
181 */
182EAPI void elm_label_line_wrap_set(Elm_Label *obj, Elm_Wrap_Type wrap);
183
184/**
185 * @brief Control the wrapping behavior of the label
186 *
187 * By default no wrapping is done. Possible values for @c wrap are:
188 * @c ELM_WRAP_NONE - No wrapping @c ELM_WRAP_CHAR - wrap between characters
189 * @c ELM_WRAP_WORD - wrap between words @c ELM_WRAP_MIXED - Word wrap, and if
190 * that fails, char wrap
191 *
192 * @param[in] obj The object.
193 *
194 * @return To wrap text or not
195 *
196 * @ingroup Elm_Label_Group
197 */
198EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Elm_Label *obj);
199
200/**
201 * @brief Control the ellipsis behavior of the label
202 *
203 * If set to true and the text doesn't fit in the label an ellipsis("...") will
204 * be shown at the end of the widget.
205 *
206 * Warning This doesn't work with slide(elm_label_slide_set()) or if the chosen
207 * wrap method was @c ELM_WRAP_WORD.
208 *
209 * @param[in] obj The object.
210 * @param[in] ellipsis To ellipsis text or not
211 *
212 * @ingroup Elm_Label_Group
213 */
214EAPI void elm_label_ellipsis_set(Elm_Label *obj, Eina_Bool ellipsis);
215
216/**
217 * @brief Control the ellipsis behavior of the label
218 *
219 * If set to true and the text doesn't fit in the label an ellipsis("...") will
220 * be shown at the end of the widget.
221 *
222 * Warning This doesn't work with slide(elm_label_slide_set()) or if the chosen
223 * wrap method was @c ELM_WRAP_WORD.
224 *
225 * @param[in] obj The object.
226 *
227 * @return To ellipsis text or not
228 *
229 * @ingroup Elm_Label_Group
230 */
231EAPI Eina_Bool elm_label_ellipsis_get(const Elm_Label *obj);
232
233/**
234 * @brief Start slide effect.
235 *
236 * See @ref elm_label_slide_mode_set.
237 * @param[in] obj The object.
238 *
239 * @ingroup Elm_Label_Group
240 */
241EAPI void elm_label_slide_go(Elm_Label *obj);
242
243#endif
diff --git a/src/lib/elementary/elm_label_legacy.h b/src/lib/elementary/elm_label_legacy.h
index f072006..afd0927 100644
--- a/src/lib/elementary/elm_label_legacy.h
+++ b/src/lib/elementary/elm_label_legacy.h
@@ -8,4 +8,4 @@
8 */ 8 */
9EAPI Evas_Object *elm_label_add(Evas_Object *parent); 9EAPI Evas_Object *elm_label_add(Evas_Object *parent);
10 10
11#include "elm_label.eo.legacy.h" 11#include "elm_label_eo.legacy.h"
diff --git a/src/lib/elementary/elm_view_form.c b/src/lib/elementary/elm_view_form.c
index b011cf1..23f20e4 100644
--- a/src/lib/elementary/elm_view_form.c
+++ b/src/lib/elementary/elm_view_form.c
@@ -11,7 +11,7 @@
11#include "elm_priv.h" 11#include "elm_priv.h"
12#include "elm_entry_eo.h" 12#include "elm_entry_eo.h"
13#include "elm_thumb.eo.h" 13#include "elm_thumb.eo.h"
14#include "elm_label.eo.h" 14#include "elm_label_eo.h"
15 15
16#include <assert.h> 16#include <assert.h>
17 17
diff --git a/src/lib/elementary/elm_widget_label.h b/src/lib/elementary/elm_widget_label.h
index 899a79e..949fcdf 100644
--- a/src/lib/elementary/elm_widget_label.h
+++ b/src/lib/elementary/elm_widget_label.h
@@ -5,7 +5,7 @@
5 5
6#include <Eio.h> 6#include <Eio.h>
7 7
8#include "elm_label.eo.h" 8#include "elm_label_eo.h"
9 9
10/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR 10/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
11 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT 11 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 8b2cde0..52da8ea 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -1,6 +1,5 @@
1pub_legacy_eo_files = [ 1pub_legacy_eo_files = [
2 'efl_ui_clock_legacy.eo', 2 'efl_ui_clock_legacy.eo',
3 'elm_label.eo',
4 'elm_list.eo', 3 'elm_list.eo',
5 'elm_map.eo', 4 'elm_map.eo',
6 'elm_map_pan.eo', 5 'elm_map_pan.eo',
@@ -765,6 +764,8 @@ elementary_pub_headers = [
765 'elm_interface_fileselector_eo.legacy.h', 764 'elm_interface_fileselector_eo.legacy.h',
766 'elm_inwin_eo.h', 765 'elm_inwin_eo.h',
767 'elm_inwin_eo.legacy.h', 766 'elm_inwin_eo.legacy.h',
767 'elm_label_eo.h',
768 'elm_label_eo.legacy.h',
768] 769]
769 770
770elementary_header_src = [ 771elementary_header_src = [