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:43 -0800
commit3bedd6ba554c298fef9826220a88a58adda243d0 (patch)
treed511f9bb07f859c9535a4f3b9166fcfb66db660f /src
parent3448b7933f1e8d3db75ca894a8c7f6aede52b014 (diff)
elm_mapbuf: 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/D8182
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Elementary.am5
-rw-r--r--src/lib/elementary/elm_mapbuf.c4
-rw-r--r--src/lib/elementary/elm_mapbuf.eo128
-rw-r--r--src/lib/elementary/elm_mapbuf_eo.c230
-rw-r--r--src/lib/elementary/elm_mapbuf_eo.h188
-rw-r--r--src/lib/elementary/elm_mapbuf_eo.legacy.c60
-rw-r--r--src/lib/elementary/elm_mapbuf_eo.legacy.h181
-rw-r--r--src/lib/elementary/elm_mapbuf_legacy.h2
-rw-r--r--src/lib/elementary/meson.build3
9 files changed, 668 insertions, 133 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index dc9610a..27e8d8b 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -220,7 +220,6 @@ elm_legacy_eolian_files = \
220 lib/elementary/elm_actionslider_part.eo \ 220 lib/elementary/elm_actionslider_part.eo \
221 lib/elementary/elm_bubble_part.eo \ 221 lib/elementary/elm_bubble_part.eo \
222 lib/elementary/elm_fileselector_part.eo \ 222 lib/elementary/elm_fileselector_part.eo \
223 lib/elementary/elm_mapbuf.eo \
224 lib/elementary/elm_naviframe.eo \ 223 lib/elementary/elm_naviframe.eo \
225 lib/elementary/elm_naviframe_item.eo \ 224 lib/elementary/elm_naviframe_item.eo \
226 lib/elementary/elm_photo.eo \ 225 lib/elementary/elm_photo.eo \
@@ -366,6 +365,8 @@ lib/elementary/elm_list_eo.c \
366lib/elementary/elm_list_eo.legacy.c \ 365lib/elementary/elm_list_eo.legacy.c \
367lib/elementary/elm_list_item_eo.c \ 366lib/elementary/elm_list_item_eo.c \
368lib/elementary/elm_list_item_eo.legacy.c \ 367lib/elementary/elm_list_item_eo.legacy.c \
368lib/elementary/elm_mapbuf_eo.c \
369lib/elementary/elm_mapbuf_eo.legacy.c \
369$(NULL) 370$(NULL)
370 371
371elm_legacy_eo_headers = \ 372elm_legacy_eo_headers = \
@@ -501,6 +502,8 @@ lib/elementary/elm_list_eo.h \
501lib/elementary/elm_list_eo.legacy.h \ 502lib/elementary/elm_list_eo.legacy.h \
502lib/elementary/elm_list_item_eo.h \ 503lib/elementary/elm_list_item_eo.h \
503lib/elementary/elm_list_item_eo.legacy.h \ 504lib/elementary/elm_list_item_eo.legacy.h \
505lib/elementary/elm_mapbuf_eo.h \
506lib/elementary/elm_mapbuf_eo.legacy.h \
504$(NULL) 507$(NULL)
505 508
506 509
diff --git a/src/lib/elementary/elm_mapbuf.c b/src/lib/elementary/elm_mapbuf.c
index 12b13fa..46796c1 100644
--- a/src/lib/elementary/elm_mapbuf.c
+++ b/src/lib/elementary/elm_mapbuf.c
@@ -10,7 +10,7 @@
10#include "elm_priv.h" 10#include "elm_priv.h"
11#include "elm_widget_mapbuf.h" 11#include "elm_widget_mapbuf.h"
12#include "elm_widget_container.h" 12#include "elm_widget_container.h"
13#include "elm_mapbuf.eo.h" 13#include "elm_mapbuf_eo.h"
14 14
15#include "elm_mapbuf_part.eo.h" 15#include "elm_mapbuf_part.eo.h"
16#include "elm_part_helper.h" 16#include "elm_part_helper.h"
@@ -456,4 +456,4 @@ ELM_PART_CONTENT_DEFAULT_GET(elm_mapbuf, "default")
456 ELM_PART_CONTENT_DEFAULT_OPS(elm_mapbuf), \ 456 ELM_PART_CONTENT_DEFAULT_OPS(elm_mapbuf), \
457 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_mapbuf) 457 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_mapbuf)
458 458
459#include "elm_mapbuf.eo.c" 459#include "elm_mapbuf_eo.c"
diff --git a/src/lib/elementary/elm_mapbuf.eo b/src/lib/elementary/elm_mapbuf.eo
deleted file mode 100644
index 1f59bb8..0000000
--- a/src/lib/elementary/elm_mapbuf.eo
+++ /dev/null
@@ -1,128 +0,0 @@
1class Elm.Mapbuf extends Efl.Ui.Widget implements Efl.Content, Efl.Ui.Legacy
2{
3 [[Elementary mapbuf class]]
4 legacy_prefix: elm_mapbuf;
5 eo_prefix: elm_private_mapbuf;
6 methods {
7 @property auto {
8 set {
9 [[Set or unset auto flag for map rendering.
10
11 When a ampbuf object has "auto mode" enabled, then it will
12 enable and disable map mode based on current visibility.
13 Mapbuf will track if you show or hide it AND if the object
14 is inside the canvas viewport or not when it is moved or
15 resized. Note that if you turn automode off, then map mode
16 will be in a disabled state at this point. When you turn it
17 on for the first time, the current state will be evaluated
18 base on current properties of the mapbuf object.
19
20 Auto mode is disabled by default.
21 ]]
22 }
23 get {
24 [[Get a value whether auto mode is enabled or not.]]
25 }
26 values {
27 on: bool; [[The auto mode state.]]
28 }
29 }
30 @property smooth {
31 set {
32 [[Enable or disable smooth map rendering.
33
34 This sets smoothing for map rendering. If the object is a
35 type that has its own smoothing settings, then both the
36 smooth settings for this object and the map must be turned off.
37
38 By default smooth maps are enabled.
39 ]]
40 }
41 get {
42 [[Get a value whether smooth map rendering is enabled or not.]]
43 }
44 values {
45 smooth: bool; [[The smooth mode state.]]
46 }
47 }
48 @property alpha {
49 set {
50 [[Set or unset alpha flag for map rendering.
51
52 This sets alpha flag for map rendering. If the object is a
53 type that has its own alpha settings, then this will take
54 precedence. Only image objects have this currently. It stops
55 alpha blending of the map area, and is useful if you know the
56 object and/or all sub-objects is 100% solid.
57
58 Alpha is enabled by default.
59 ]]
60 }
61 get {
62 [[Get a value whether alpha blending is enabled or not.]]
63 }
64 values {
65 alpha: bool; [[The alpha state.]]
66 }
67 }
68 @property enabled {
69 set {
70 [[Enable or disable the map.
71
72 This enables the map that is set or disables it. On enable,
73 the object geometry will be saved, and the new geometry will
74 change (position and size) to reflect the map geometry set.
75
76 Also, when enabled, alpha and smooth states will be used, so
77 if the content isn't solid, alpha should be enabled, for
78 example, otherwise a black rectangle will fill the content.
79
80 When disabled, the stored map will be freed and geometry prior
81 to enabling the map will be restored.
82
83 It's disabled by default.
84 ]]
85 }
86 get {
87 [[Get a value whether map is enabled or not.]]
88 }
89 values {
90 enabled: bool; [[The enabled state.]]
91 }
92 }
93 @property point_color {
94 [[The color of a point (vertex) in the mapbuf.
95
96 This represents the color of the vertex in the mapbuf. Colors will
97 be linearly interpolated between vertex points through the mapbuf.
98 Color will multiply the "texture" pixels (like GL_MODULATE in
99 OpenGL). The default color of a vertex in a mapbuf is white
100 solid (255, 255, 255, 255) which means it will have no effect on
101 modifying the texture pixels.
102
103 @since 1.9
104 ]]
105 keys {
106 idx: int; [[Index of point to change, from 0 to 3.]]
107 }
108 values {
109 r: int; [[Red (0 - 255)]]
110 g: int; [[Green (0 - 255)]]
111 b: int; [[Blue (0 - 255)]]
112 a: int; [[Alpha (0 - 255)]]
113 }
114 }
115 }
116 implements {
117 class.constructor;
118 Efl.Object.constructor;
119 Efl.Gfx.Entity.visible { set; }
120 Efl.Gfx.Entity.position { set; }
121 Efl.Gfx.Entity.size { set; }
122 Efl.Ui.Widget.theme_apply;
123 Efl.Ui.Widget.widget_sub_object_del;
124 Efl.Content.content { get; set; }
125 Efl.Content.content_unset;
126 Efl.Part.part_get;
127 }
128}
diff --git a/src/lib/elementary/elm_mapbuf_eo.c b/src/lib/elementary/elm_mapbuf_eo.c
new file mode 100644
index 0000000..a480b77
--- /dev/null
+++ b/src/lib/elementary/elm_mapbuf_eo.c
@@ -0,0 +1,230 @@
1
2void _elm_mapbuf_auto_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool on);
3
4
5static Eina_Error
6__eolian_elm_mapbuf_auto_set_reflect(Eo *obj, Eina_Value val)
7{
8 Eina_Error r = 0; Eina_Bool cval;
9 if (!eina_value_bool_convert(&val, &cval))
10 {
11 r = EINA_ERROR_VALUE_FAILED;
12 goto end;
13 }
14 elm_private_mapbuf_auto_set(obj, cval);
15 end:
16 eina_value_flush(&val);
17 return r;
18}
19
20EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_auto_set, EFL_FUNC_CALL(on), Eina_Bool on);
21
22Eina_Bool _elm_mapbuf_auto_get(const Eo *obj, Elm_Mapbuf_Data *pd);
23
24
25static Eina_Value
26__eolian_elm_mapbuf_auto_get_reflect(Eo *obj)
27{
28 Eina_Bool val = elm_private_mapbuf_auto_get(obj);
29 return eina_value_bool_init(val);
30}
31
32EOAPI EFL_FUNC_BODY_CONST(elm_private_mapbuf_auto_get, Eina_Bool, 0);
33
34void _elm_mapbuf_smooth_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool smooth);
35
36
37static Eina_Error
38__eolian_elm_mapbuf_smooth_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_private_mapbuf_smooth_set(obj, cval);
47 end:
48 eina_value_flush(&val);
49 return r;
50}
51
52EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_smooth_set, EFL_FUNC_CALL(smooth), Eina_Bool smooth);
53
54Eina_Bool _elm_mapbuf_smooth_get(const Eo *obj, Elm_Mapbuf_Data *pd);
55
56
57static Eina_Value
58__eolian_elm_mapbuf_smooth_get_reflect(Eo *obj)
59{
60 Eina_Bool val = elm_private_mapbuf_smooth_get(obj);
61 return eina_value_bool_init(val);
62}
63
64EOAPI EFL_FUNC_BODY_CONST(elm_private_mapbuf_smooth_get, Eina_Bool, 0);
65
66void _elm_mapbuf_alpha_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool alpha);
67
68
69static Eina_Error
70__eolian_elm_mapbuf_alpha_set_reflect(Eo *obj, Eina_Value val)
71{
72 Eina_Error r = 0; Eina_Bool cval;
73 if (!eina_value_bool_convert(&val, &cval))
74 {
75 r = EINA_ERROR_VALUE_FAILED;
76 goto end;
77 }
78 elm_private_mapbuf_alpha_set(obj, cval);
79 end:
80 eina_value_flush(&val);
81 return r;
82}
83
84EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_alpha_set, EFL_FUNC_CALL(alpha), Eina_Bool alpha);
85
86Eina_Bool _elm_mapbuf_alpha_get(const Eo *obj, Elm_Mapbuf_Data *pd);
87
88
89static Eina_Value
90__eolian_elm_mapbuf_alpha_get_reflect(Eo *obj)
91{
92 Eina_Bool val = elm_private_mapbuf_alpha_get(obj);
93 return eina_value_bool_init(val);
94}
95
96EOAPI EFL_FUNC_BODY_CONST(elm_private_mapbuf_alpha_get, Eina_Bool, 0);
97
98void _elm_mapbuf_enabled_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool enabled);
99
100
101static Eina_Error
102__eolian_elm_mapbuf_enabled_set_reflect(Eo *obj, Eina_Value val)
103{
104 Eina_Error r = 0; Eina_Bool cval;
105 if (!eina_value_bool_convert(&val, &cval))
106 {
107 r = EINA_ERROR_VALUE_FAILED;
108 goto end;
109 }
110 elm_private_mapbuf_enabled_set(obj, cval);
111 end:
112 eina_value_flush(&val);
113 return r;
114}
115
116EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_enabled_set, EFL_FUNC_CALL(enabled), Eina_Bool enabled);
117
118Eina_Bool _elm_mapbuf_enabled_get(const Eo *obj, Elm_Mapbuf_Data *pd);
119
120
121static Eina_Value
122__eolian_elm_mapbuf_enabled_get_reflect(Eo *obj)
123{
124 Eina_Bool val = elm_private_mapbuf_enabled_get(obj);
125 return eina_value_bool_init(val);
126}
127
128EOAPI EFL_FUNC_BODY_CONST(elm_private_mapbuf_enabled_get, Eina_Bool, 0);
129
130void _elm_mapbuf_point_color_set(Eo *obj, Elm_Mapbuf_Data *pd, int idx, int r, int g, int b, int a);
131
132EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_point_color_set, EFL_FUNC_CALL(idx, r, g, b, a), int idx, int r, int g, int b, int a);
133
134void _elm_mapbuf_point_color_get(const Eo *obj, Elm_Mapbuf_Data *pd, int idx, int *r, int *g, int *b, int *a);
135
136EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_private_mapbuf_point_color_get, EFL_FUNC_CALL(idx, r, g, b, a), int idx, int *r, int *g, int *b, int *a);
137
138Efl_Object *_elm_mapbuf_efl_object_constructor(Eo *obj, Elm_Mapbuf_Data *pd);
139
140
141void _elm_mapbuf_efl_gfx_entity_visible_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool v);
142
143
144void _elm_mapbuf_efl_gfx_entity_position_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Position2D pos);
145
146
147void _elm_mapbuf_efl_gfx_entity_size_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Size2D size);
148
149
150Eina_Error _elm_mapbuf_efl_ui_widget_theme_apply(Eo *obj, Elm_Mapbuf_Data *pd);
151
152
153Eina_Bool _elm_mapbuf_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Mapbuf_Data *pd, Efl_Canvas_Object *sub_obj);
154
155
156Eina_Bool _elm_mapbuf_efl_content_content_set(Eo *obj, Elm_Mapbuf_Data *pd, Efl_Gfx_Entity *content);
157
158
159Efl_Gfx_Entity *_elm_mapbuf_efl_content_content_get(const Eo *obj, Elm_Mapbuf_Data *pd);
160
161
162Efl_Gfx_Entity *_elm_mapbuf_efl_content_content_unset(Eo *obj, Elm_Mapbuf_Data *pd);
163
164
165Efl_Object *_elm_mapbuf_efl_part_part_get(const Eo *obj, Elm_Mapbuf_Data *pd, const char *name);
166
167
168static Eina_Bool
169_elm_mapbuf_class_initializer(Efl_Class *klass)
170{
171 const Efl_Object_Ops *opsp = NULL;
172
173 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
174
175#ifndef ELM_MAPBUF_EXTRA_OPS
176#define ELM_MAPBUF_EXTRA_OPS
177#endif
178
179 EFL_OPS_DEFINE(ops,
180 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_auto_set, _elm_mapbuf_auto_set),
181 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_auto_get, _elm_mapbuf_auto_get),
182 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_smooth_set, _elm_mapbuf_smooth_set),
183 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_smooth_get, _elm_mapbuf_smooth_get),
184 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_alpha_set, _elm_mapbuf_alpha_set),
185 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_alpha_get, _elm_mapbuf_alpha_get),
186 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_enabled_set, _elm_mapbuf_enabled_set),
187 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_enabled_get, _elm_mapbuf_enabled_get),
188 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_point_color_set, _elm_mapbuf_point_color_set),
189 EFL_OBJECT_OP_FUNC(elm_private_mapbuf_point_color_get, _elm_mapbuf_point_color_get),
190 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_mapbuf_efl_object_constructor),
191 EFL_OBJECT_OP_FUNC(efl_gfx_entity_visible_set, _elm_mapbuf_efl_gfx_entity_visible_set),
192 EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_mapbuf_efl_gfx_entity_position_set),
193 EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_mapbuf_efl_gfx_entity_size_set),
194 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_mapbuf_efl_ui_widget_theme_apply),
195 EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_mapbuf_efl_ui_widget_widget_sub_object_del),
196 EFL_OBJECT_OP_FUNC(efl_content_set, _elm_mapbuf_efl_content_content_set),
197 EFL_OBJECT_OP_FUNC(efl_content_get, _elm_mapbuf_efl_content_content_get),
198 EFL_OBJECT_OP_FUNC(efl_content_unset, _elm_mapbuf_efl_content_content_unset),
199 EFL_OBJECT_OP_FUNC(efl_part_get, _elm_mapbuf_efl_part_part_get),
200 ELM_MAPBUF_EXTRA_OPS
201 );
202 opsp = &ops;
203
204 static const Efl_Object_Property_Reflection refl_table[] = {
205 {"auto", __eolian_elm_mapbuf_auto_set_reflect, __eolian_elm_mapbuf_auto_get_reflect},
206 {"smooth", __eolian_elm_mapbuf_smooth_set_reflect, __eolian_elm_mapbuf_smooth_get_reflect},
207 {"alpha", __eolian_elm_mapbuf_alpha_set_reflect, __eolian_elm_mapbuf_alpha_get_reflect},
208 {"enabled", __eolian_elm_mapbuf_enabled_set_reflect, __eolian_elm_mapbuf_enabled_get_reflect},
209 };
210 static const Efl_Object_Property_Reflection_Ops rops = {
211 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
212 };
213 ropsp = &rops;
214
215 return efl_class_functions_set(klass, opsp, ropsp);
216}
217
218static const Efl_Class_Description _elm_mapbuf_class_desc = {
219 EO_VERSION,
220 "Elm.Mapbuf",
221 EFL_CLASS_TYPE_REGULAR,
222 sizeof(Elm_Mapbuf_Data),
223 _elm_mapbuf_class_initializer,
224 _elm_mapbuf_class_constructor,
225 NULL
226};
227
228EFL_DEFINE_CLASS(elm_mapbuf_class_get, &_elm_mapbuf_class_desc, EFL_UI_WIDGET_CLASS, EFL_CONTENT_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL);
229
230#include "elm_mapbuf_eo.legacy.c"
diff --git a/src/lib/elementary/elm_mapbuf_eo.h b/src/lib/elementary/elm_mapbuf_eo.h
new file mode 100644
index 0000000..b9ba3f2
--- /dev/null
+++ b/src/lib/elementary/elm_mapbuf_eo.h
@@ -0,0 +1,188 @@
1#ifndef _ELM_MAPBUF_EO_H_
2#define _ELM_MAPBUF_EO_H_
3
4#ifndef _ELM_MAPBUF_EO_CLASS_TYPE
5#define _ELM_MAPBUF_EO_CLASS_TYPE
6
7typedef Eo Elm_Mapbuf;
8
9#endif
10
11#ifndef _ELM_MAPBUF_EO_TYPES
12#define _ELM_MAPBUF_EO_TYPES
13
14
15#endif
16/** Elementary mapbuf class
17 *
18 * @ingroup Elm_Mapbuf
19 */
20#define ELM_MAPBUF_CLASS elm_mapbuf_class_get()
21
22EWAPI const Efl_Class *elm_mapbuf_class_get(void);
23
24/**
25 * @brief Set or unset auto flag for map rendering.
26 *
27 * When a ampbuf object has "auto mode" enabled, then it will enable and
28 * disable map mode based on current visibility. Mapbuf will track if you show
29 * or hide it AND if the object is inside the canvas viewport or not when it is
30 * moved or resized. Note that if you turn automode off, then map mode will be
31 * in a disabled state at this point. When you turn it on for the first time,
32 * the current state will be evaluated base on current properties of the mapbuf
33 * object.
34 *
35 * Auto mode is disabled by default.
36 *
37 * @param[in] obj The object.
38 * @param[in] on The auto mode state.
39 *
40 * @ingroup Elm_Mapbuf
41 */
42EOAPI void elm_private_mapbuf_auto_set(Eo *obj, Eina_Bool on);
43
44/**
45 * @brief Get a value whether auto mode is enabled or not.
46 *
47 * @param[in] obj The object.
48 *
49 * @return The auto mode state.
50 *
51 * @ingroup Elm_Mapbuf
52 */
53EOAPI Eina_Bool elm_private_mapbuf_auto_get(const Eo *obj);
54
55/**
56 * @brief Enable or disable smooth map rendering.
57 *
58 * This sets smoothing for map rendering. If the object is a type that has its
59 * own smoothing settings, then both the smooth settings for this object and
60 * the map must be turned off.
61 *
62 * By default smooth maps are enabled.
63 *
64 * @param[in] obj The object.
65 * @param[in] smooth The smooth mode state.
66 *
67 * @ingroup Elm_Mapbuf
68 */
69EOAPI void elm_private_mapbuf_smooth_set(Eo *obj, Eina_Bool smooth);
70
71/**
72 * @brief Get a value whether smooth map rendering is enabled or not.
73 *
74 * @param[in] obj The object.
75 *
76 * @return The smooth mode state.
77 *
78 * @ingroup Elm_Mapbuf
79 */
80EOAPI Eina_Bool elm_private_mapbuf_smooth_get(const Eo *obj);
81
82/**
83 * @brief Set or unset alpha flag for map rendering.
84 *
85 * This sets alpha flag for map rendering. If the object is a type that has its
86 * own alpha settings, then this will take precedence. Only image objects have
87 * this currently. It stops alpha blending of the map area, and is useful if
88 * you know the object and/or all sub-objects is 100% solid.
89 *
90 * Alpha is enabled by default.
91 *
92 * @param[in] obj The object.
93 * @param[in] alpha The alpha state.
94 *
95 * @ingroup Elm_Mapbuf
96 */
97EOAPI void elm_private_mapbuf_alpha_set(Eo *obj, Eina_Bool alpha);
98
99/**
100 * @brief Get a value whether alpha blending is enabled or not.
101 *
102 * @param[in] obj The object.
103 *
104 * @return The alpha state.
105 *
106 * @ingroup Elm_Mapbuf
107 */
108EOAPI Eina_Bool elm_private_mapbuf_alpha_get(const Eo *obj);
109
110/**
111 * @brief Enable or disable the map.
112 *
113 * This enables the map that is set or disables it. On enable, the object
114 * geometry will be saved, and the new geometry will change (position and size)
115 * to reflect the map geometry set.
116 *
117 * Also, when enabled, alpha and smooth states will be used, so if the content
118 * isn't solid, alpha should be enabled, for example, otherwise a black
119 * rectangle will fill the content.
120 *
121 * When disabled, the stored map will be freed and geometry prior to enabling
122 * the map will be restored.
123 *
124 * It's disabled by default.
125 *
126 * @param[in] obj The object.
127 * @param[in] enabled The enabled state.
128 *
129 * @ingroup Elm_Mapbuf
130 */
131EOAPI void elm_private_mapbuf_enabled_set(Eo *obj, Eina_Bool enabled);
132
133/**
134 * @brief Get a value whether map is enabled or not.
135 *
136 * @param[in] obj The object.
137 *
138 * @return The enabled state.
139 *
140 * @ingroup Elm_Mapbuf
141 */
142EOAPI Eina_Bool elm_private_mapbuf_enabled_get(const Eo *obj);
143
144/**
145 * @brief The color of a point (vertex) in the mapbuf.
146 *
147 * This represents the color of the vertex in the mapbuf. Colors will be
148 * linearly interpolated between vertex points through the mapbuf. Color will
149 * multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
150 * color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
151 * means it will have no effect on modifying the texture pixels.
152 *
153 * @param[in] obj The object.
154 * @param[in] idx Index of point to change, from 0 to 3.
155 * @param[in] r Red (0 - 255)
156 * @param[in] g Green (0 - 255)
157 * @param[in] b Blue (0 - 255)
158 * @param[in] a Alpha (0 - 255)
159 *
160 * @since 1.9
161 *
162 * @ingroup Elm_Mapbuf
163 */
164EOAPI void elm_private_mapbuf_point_color_set(Eo *obj, int idx, int r, int g, int b, int a);
165
166/**
167 * @brief The color of a point (vertex) in the mapbuf.
168 *
169 * This represents the color of the vertex in the mapbuf. Colors will be
170 * linearly interpolated between vertex points through the mapbuf. Color will
171 * multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
172 * color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
173 * means it will have no effect on modifying the texture pixels.
174 *
175 * @param[in] obj The object.
176 * @param[in] idx Index of point to change, from 0 to 3.
177 * @param[out] r Red (0 - 255)
178 * @param[out] g Green (0 - 255)
179 * @param[out] b Blue (0 - 255)
180 * @param[out] a Alpha (0 - 255)
181 *
182 * @since 1.9
183 *
184 * @ingroup Elm_Mapbuf
185 */
186EOAPI void elm_private_mapbuf_point_color_get(const Eo *obj, int idx, int *r, int *g, int *b, int *a);
187
188#endif
diff --git a/src/lib/elementary/elm_mapbuf_eo.legacy.c b/src/lib/elementary/elm_mapbuf_eo.legacy.c
new file mode 100644
index 0000000..e285cbc
--- /dev/null
+++ b/src/lib/elementary/elm_mapbuf_eo.legacy.c
@@ -0,0 +1,60 @@
1
2EAPI void
3elm_mapbuf_auto_set(Elm_Mapbuf *obj, Eina_Bool on)
4{
5 elm_private_mapbuf_auto_set(obj, on);
6}
7
8EAPI Eina_Bool
9elm_mapbuf_auto_get(const Elm_Mapbuf *obj)
10{
11 return elm_private_mapbuf_auto_get(obj);
12}
13
14EAPI void
15elm_mapbuf_smooth_set(Elm_Mapbuf *obj, Eina_Bool smooth)
16{
17 elm_private_mapbuf_smooth_set(obj, smooth);
18}
19
20EAPI Eina_Bool
21elm_mapbuf_smooth_get(const Elm_Mapbuf *obj)
22{
23 return elm_private_mapbuf_smooth_get(obj);
24}
25
26EAPI void
27elm_mapbuf_alpha_set(Elm_Mapbuf *obj, Eina_Bool alpha)
28{
29 elm_private_mapbuf_alpha_set(obj, alpha);
30}
31
32EAPI Eina_Bool
33elm_mapbuf_alpha_get(const Elm_Mapbuf *obj)
34{
35 return elm_private_mapbuf_alpha_get(obj);
36}
37
38EAPI void
39elm_mapbuf_enabled_set(Elm_Mapbuf *obj, Eina_Bool enabled)
40{
41 elm_private_mapbuf_enabled_set(obj, enabled);
42}
43
44EAPI Eina_Bool
45elm_mapbuf_enabled_get(const Elm_Mapbuf *obj)
46{
47 return elm_private_mapbuf_enabled_get(obj);
48}
49
50EAPI void
51elm_mapbuf_point_color_set(Elm_Mapbuf *obj, int idx, int r, int g, int b, int a)
52{
53 elm_private_mapbuf_point_color_set(obj, idx, r, g, b, a);
54}
55
56EAPI void
57elm_mapbuf_point_color_get(const Elm_Mapbuf *obj, int idx, int *r, int *g, int *b, int *a)
58{
59 elm_private_mapbuf_point_color_get(obj, idx, r, g, b, a);
60}
diff --git a/src/lib/elementary/elm_mapbuf_eo.legacy.h b/src/lib/elementary/elm_mapbuf_eo.legacy.h
new file mode 100644
index 0000000..c139e1d
--- /dev/null
+++ b/src/lib/elementary/elm_mapbuf_eo.legacy.h
@@ -0,0 +1,181 @@
1#ifndef _ELM_MAPBUF_EO_LEGACY_H_
2#define _ELM_MAPBUF_EO_LEGACY_H_
3
4#ifndef _ELM_MAPBUF_EO_CLASS_TYPE
5#define _ELM_MAPBUF_EO_CLASS_TYPE
6
7typedef Eo Elm_Mapbuf;
8
9#endif
10
11#ifndef _ELM_MAPBUF_EO_TYPES
12#define _ELM_MAPBUF_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Set or unset auto flag for map rendering.
19 *
20 * When a ampbuf object has "auto mode" enabled, then it will enable and
21 * disable map mode based on current visibility. Mapbuf will track if you show
22 * or hide it AND if the object is inside the canvas viewport or not when it is
23 * moved or resized. Note that if you turn automode off, then map mode will be
24 * in a disabled state at this point. When you turn it on for the first time,
25 * the current state will be evaluated base on current properties of the mapbuf
26 * object.
27 *
28 * Auto mode is disabled by default.
29 *
30 * @param[in] obj The object.
31 * @param[in] on The auto mode state.
32 *
33 * @ingroup Elm_Mapbuf_Group
34 */
35EAPI void elm_mapbuf_auto_set(Elm_Mapbuf *obj, Eina_Bool on);
36
37/**
38 * @brief Get a value whether auto mode is enabled or not.
39 *
40 * @param[in] obj The object.
41 *
42 * @return The auto mode state.
43 *
44 * @ingroup Elm_Mapbuf_Group
45 */
46EAPI Eina_Bool elm_mapbuf_auto_get(const Elm_Mapbuf *obj);
47
48/**
49 * @brief Enable or disable smooth map rendering.
50 *
51 * This sets smoothing for map rendering. If the object is a type that has its
52 * own smoothing settings, then both the smooth settings for this object and
53 * the map must be turned off.
54 *
55 * By default smooth maps are enabled.
56 *
57 * @param[in] obj The object.
58 * @param[in] smooth The smooth mode state.
59 *
60 * @ingroup Elm_Mapbuf_Group
61 */
62EAPI void elm_mapbuf_smooth_set(Elm_Mapbuf *obj, Eina_Bool smooth);
63
64/**
65 * @brief Get a value whether smooth map rendering is enabled or not.
66 *
67 * @param[in] obj The object.
68 *
69 * @return The smooth mode state.
70 *
71 * @ingroup Elm_Mapbuf_Group
72 */
73EAPI Eina_Bool elm_mapbuf_smooth_get(const Elm_Mapbuf *obj);
74
75/**
76 * @brief Set or unset alpha flag for map rendering.
77 *
78 * This sets alpha flag for map rendering. If the object is a type that has its
79 * own alpha settings, then this will take precedence. Only image objects have
80 * this currently. It stops alpha blending of the map area, and is useful if
81 * you know the object and/or all sub-objects is 100% solid.
82 *
83 * Alpha is enabled by default.
84 *
85 * @param[in] obj The object.
86 * @param[in] alpha The alpha state.
87 *
88 * @ingroup Elm_Mapbuf_Group
89 */
90EAPI void elm_mapbuf_alpha_set(Elm_Mapbuf *obj, Eina_Bool alpha);
91
92/**
93 * @brief Get a value whether alpha blending is enabled or not.
94 *
95 * @param[in] obj The object.
96 *
97 * @return The alpha state.
98 *
99 * @ingroup Elm_Mapbuf_Group
100 */
101EAPI Eina_Bool elm_mapbuf_alpha_get(const Elm_Mapbuf *obj);
102
103/**
104 * @brief Enable or disable the map.
105 *
106 * This enables the map that is set or disables it. On enable, the object
107 * geometry will be saved, and the new geometry will change (position and size)
108 * to reflect the map geometry set.
109 *
110 * Also, when enabled, alpha and smooth states will be used, so if the content
111 * isn't solid, alpha should be enabled, for example, otherwise a black
112 * rectangle will fill the content.
113 *
114 * When disabled, the stored map will be freed and geometry prior to enabling
115 * the map will be restored.
116 *
117 * It's disabled by default.
118 *
119 * @param[in] obj The object.
120 * @param[in] enabled The enabled state.
121 *
122 * @ingroup Elm_Mapbuf_Group
123 */
124EAPI void elm_mapbuf_enabled_set(Elm_Mapbuf *obj, Eina_Bool enabled);
125
126/**
127 * @brief Get a value whether map is enabled or not.
128 *
129 * @param[in] obj The object.
130 *
131 * @return The enabled state.
132 *
133 * @ingroup Elm_Mapbuf_Group
134 */
135EAPI Eina_Bool elm_mapbuf_enabled_get(const Elm_Mapbuf *obj);
136
137/**
138 * @brief The color of a point (vertex) in the mapbuf.
139 *
140 * This represents the color of the vertex in the mapbuf. Colors will be
141 * linearly interpolated between vertex points through the mapbuf. Color will
142 * multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
143 * color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
144 * means it will have no effect on modifying the texture pixels.
145 *
146 * @param[in] obj The object.
147 * @param[in] idx Index of point to change, from 0 to 3.
148 * @param[in] r Red (0 - 255)
149 * @param[in] g Green (0 - 255)
150 * @param[in] b Blue (0 - 255)
151 * @param[in] a Alpha (0 - 255)
152 *
153 * @since 1.9
154 *
155 * @ingroup Elm_Mapbuf_Group
156 */
157EAPI void elm_mapbuf_point_color_set(Elm_Mapbuf *obj, int idx, int r, int g, int b, int a);
158
159/**
160 * @brief The color of a point (vertex) in the mapbuf.
161 *
162 * This represents the color of the vertex in the mapbuf. Colors will be
163 * linearly interpolated between vertex points through the mapbuf. Color will
164 * multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
165 * color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
166 * means it will have no effect on modifying the texture pixels.
167 *
168 * @param[in] obj The object.
169 * @param[in] idx Index of point to change, from 0 to 3.
170 * @param[out] r Red (0 - 255)
171 * @param[out] g Green (0 - 255)
172 * @param[out] b Blue (0 - 255)
173 * @param[out] a Alpha (0 - 255)
174 *
175 * @since 1.9
176 *
177 * @ingroup Elm_Mapbuf_Group
178 */
179EAPI void elm_mapbuf_point_color_get(const Elm_Mapbuf *obj, int idx, int *r, int *g, int *b, int *a);
180
181#endif
diff --git a/src/lib/elementary/elm_mapbuf_legacy.h b/src/lib/elementary/elm_mapbuf_legacy.h
index bc56b1d..5c659a8 100644
--- a/src/lib/elementary/elm_mapbuf_legacy.h
+++ b/src/lib/elementary/elm_mapbuf_legacy.h
@@ -11,4 +11,4 @@
11 */ 11 */
12EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent); 12EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent);
13 13
14#include "elm_mapbuf.eo.legacy.h" \ No newline at end of file 14#include "elm_mapbuf_eo.legacy.h" \ No newline at end of file
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 5880680..d16831a 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -34,7 +34,6 @@ pub_legacy_eo_files = [
34 'elm_actionslider_part.eo', 34 'elm_actionslider_part.eo',
35 'elm_bubble_part.eo', 35 'elm_bubble_part.eo',
36 'elm_fileselector_part.eo', 36 'elm_fileselector_part.eo',
37 'elm_mapbuf.eo',
38 'elm_naviframe.eo', 37 'elm_naviframe.eo',
39 'elm_naviframe_item.eo', 38 'elm_naviframe_item.eo',
40 'elm_photo.eo', 39 'elm_photo.eo',
@@ -768,6 +767,8 @@ elementary_pub_headers = [
768 'elm_list_eo.legacy.h', 767 'elm_list_eo.legacy.h',
769 'elm_list_item_eo.h', 768 'elm_list_item_eo.h',
770 'elm_list_item_eo.legacy.h', 769 'elm_list_item_eo.legacy.h',
770 'elm_mapbuf_eo.h',
771 'elm_mapbuf_eo.legacy.h',
771] 772]
772 773
773elementary_header_src = [ 774elementary_header_src = [