summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJee-Yong Um <jc9.um@samsung.com>2017-11-08 19:04:26 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-08 19:17:59 +0900
commit2f838acd4ef0f3f914bb5d03081aef2fd1f412b5 (patch)
tree09798675bf1d50eca0498e4213f0eae47527fe7d /src
parentd5dbcdabd14c1ddf01f22b4865487ecce272c055 (diff)
Efl: add class interfaces (color/text/size)
Summary: implement Efl.Gfx.Class interface Reviewers: jpeg, cedric Subscribers: taxi2se, herdsman Differential Revision: https://phab.enlightenment.org/D4403
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Edje.am1
-rw-r--r--src/Makefile_Efl.am3
-rw-r--r--src/lib/edje/Edje_Eo.h1
-rw-r--r--src/lib/edje/Edje_Legacy.h143
-rw-r--r--src/lib/edje/edje_global.eo12
-rw-r--r--src/lib/edje/edje_main.c5
-rw-r--r--src/lib/edje/edje_object.eo226
-rw-r--r--src/lib/edje/edje_private.h2
-rw-r--r--src/lib/edje/edje_smart.c10
-rw-r--r--src/lib/edje/edje_types.eot9
-rw-r--r--src/lib/edje/edje_util.c231
-rw-r--r--src/lib/efl/Efl.h3
-rw-r--r--src/lib/efl/interfaces/efl_gfx_color_class.eo85
-rw-r--r--src/lib/efl/interfaces/efl_gfx_size_class.eo49
-rw-r--r--src/lib/efl/interfaces/efl_gfx_text_class.eo43
-rw-r--r--src/lib/efl/interfaces/efl_gfx_types.eot8
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c4
-rw-r--r--src/lib/efl/interfaces/efl_text_properties.eo4
18 files changed, 545 insertions, 294 deletions
diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index b4299f171e..cf7d9f2655 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -5,6 +5,7 @@ edje_eolian_files = \
5 lib/edje/efl_canvas_layout_calc.eo \ 5 lib/edje/efl_canvas_layout_calc.eo \
6 lib/edje/efl_canvas_layout_signal.eo \ 6 lib/edje/efl_canvas_layout_signal.eo \
7 lib/edje/efl_canvas_layout_group.eo \ 7 lib/edje/efl_canvas_layout_group.eo \
8 lib/edje/edje_global.eo \
8 lib/edje/edje_object.eo \ 9 lib/edje/edje_object.eo \
9 lib/edje/efl_canvas_layout_part.eo \ 10 lib/edje/efl_canvas_layout_part.eo \
10 lib/edje/efl_canvas_layout_part_box.eo \ 11 lib/edje/efl_canvas_layout_part_box.eo \
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index c4e866aaa3..f9cdc7fe3c 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -76,6 +76,9 @@ efl_eolian_files = \
76 lib/efl/interfaces/efl_ui_menu.eo \ 76 lib/efl/interfaces/efl_ui_menu.eo \
77 lib/efl/interfaces/efl_ui_autorepeat.eo \ 77 lib/efl/interfaces/efl_ui_autorepeat.eo \
78 lib/efl/interfaces/efl_ui_format.eo \ 78 lib/efl/interfaces/efl_ui_format.eo \
79 lib/efl/interfaces/efl_gfx_color_class.eo \
80 lib/efl/interfaces/efl_gfx_text_class.eo \
81 lib/efl/interfaces/efl_gfx_size_class.eo \
79 $(efl_eolian_legacy_files) \ 82 $(efl_eolian_legacy_files) \
80 $(NULL) 83 $(NULL)
81 84
diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h
index 877f3bea07..37c5db5ce0 100644
--- a/src/lib/edje/Edje_Eo.h
+++ b/src/lib/edje/Edje_Eo.h
@@ -3,6 +3,7 @@
3#include "efl_canvas_layout_calc.eo.h" 3#include "efl_canvas_layout_calc.eo.h"
4#include "efl_canvas_layout_signal.eo.h" 4#include "efl_canvas_layout_signal.eo.h"
5#include "efl_canvas_layout_group.eo.h" 5#include "efl_canvas_layout_group.eo.h"
6#include "edje_global.eo.h"
6#include "edje_object.eo.h" 7#include "edje_object.eo.h"
7#include "edje_edit.eo.h" 8#include "edje_edit.eo.h"
8 9
diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index 24a913675f..edd30e25da 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -1213,6 +1213,147 @@ EAPI Eina_Bool edje_object_color_class_set(Evas_Object *obj, const char * color_
1213EAPI Eina_Bool edje_object_color_class_get(const Evas_Object *obj, const char * color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3); 1213EAPI Eina_Bool edje_object_color_class_get(const Evas_Object *obj, const char * color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3);
1214 1214
1215/** 1215/**
1216 * @brief Delete the object color class.
1217 *
1218 * This function deletes any values at the object level for the specified
1219 * object and color class.
1220 *
1221 * Deleting the color class will revert it to the values defined by
1222 * edje_color_class_set() or the color class defined in the theme file.
1223 *
1224 * Deleting the color class will emit the signal "color_class,del" for the
1225 * given Edje object.
1226 *
1227 * @param[in] color_class The color class to be deleted.
1228 *
1229 * @ingroup Edje_Object
1230 */
1231EAPI void edje_object_color_class_del(Evas_Object *obj, const char *color_class);
1232
1233/**
1234 * @brief Delete all color classes defined in object level.
1235 *
1236 * This function deletes any color classes defined in object level.
1237 * Clearing color classes will revert the color of all edje parts to
1238 * the values defined in global level or theme file.
1239 *
1240 * @return @c true, on success or @c false, on error
1241 *
1242 * @since 1.17.0
1243 *
1244 * @ingroup Edje_Object
1245 */
1246EAPI Eina_Bool edje_object_color_class_clear(const Evas_Object *obj);
1247
1248/**
1249 * @brief Sets Edje text class.
1250 *
1251 * This function sets the text class for the Edje.
1252 *
1253 * @param[in] text_class The text class name
1254 * @param[in] font Font name
1255 * @param[in] size Font Size
1256 *
1257 * @return @c true, on success or @c false, on error
1258 *
1259 * @ingroup Edje_Object
1260 */
1261EAPI Eina_Bool edje_object_text_class_set(Evas_Object *obj, const char * text_class, const char *font, Evas_Font_Size size);
1262
1263/**
1264 * @brief Gets font and font size from edje text class.
1265 *
1266 * This function gets the font and the font size from the object text class.
1267 * The font string will only be valid until the text class is changed or the
1268 * edje object is deleted.
1269 *
1270 * @param[in] text_class The text class name
1271 * @param[out] font Font name
1272 * @param[out] size Font Size
1273 *
1274 * @return @c true, on success or @c false, on error
1275 *
1276 * @ingroup Edje_Object
1277 */
1278EAPI Eina_Bool edje_object_text_class_get(const Evas_Object *obj, const char * text_class, const char **font, Evas_Font_Size *size);
1279
1280/**
1281 * @brief Delete the object text class.
1282 *
1283 * This function deletes any values at the object level for the specified
1284 * object and text class.
1285 *
1286 * Deleting the text class will revert it to the values defined by
1287 * edje_text_class_set() or the text class defined in the theme file.
1288 *
1289 * @param[in] text_class The color class to be deleted.
1290 *
1291 * @since 1.17
1292 *
1293 * @ingroup Edje_Object
1294 */
1295EAPI void edje_object_text_class_del(Evas_Object *obj, const char *text_class);
1296
1297/**
1298 * @brief Sets the object size class.
1299 *
1300 * This function sets the min and max values for an object level size class.
1301 * This will make all edje parts in the specified object that have the
1302 * specified size class update their min and max size with given values.
1303 *
1304 * @param[in] size_class The size class name
1305 * @param[in] minw The min width
1306 * @param[in] minh The min height
1307 * @param[in] maxw The max width
1308 * @param[in] maxh The max height
1309 *
1310 * @return @c true, on success or @c false, on error
1311 *
1312 * @since 1.17
1313 *
1314 * @ingroup Edje_Object
1315 */
1316EAPI Eina_Bool edje_object_size_class_set(Evas_Object *obj, const char * size_class, int minw, int minh, int maxw, int maxh);
1317
1318/**
1319 * @brief Gets the object size class.
1320 *
1321 * This function gets the min and max values for an object level size class.
1322 * These values will only be valid until the size class is changed or the edje
1323 * object is deleted.
1324 *
1325 * @param[in] size_class The size class name
1326 * @param[out] minw The min width
1327 * @param[out] minh The min height
1328 * @param[out] maxw The max width
1329 * @param[out] maxh The max height
1330 *
1331 * @return @c true, on success or @c false, on error
1332 *
1333 * @since 1.17
1334 *
1335 * @ingroup Edje_Object
1336 */
1337EAPI Eina_Bool edje_object_size_class_get(const Evas_Object *obj, const char * size_class, int *minw, int *minh, int *maxw, int *maxh);
1338
1339/**
1340 * @brief Delete the object size class.
1341 *
1342 * This function deletes any values at the object level for the specified
1343 * object and size class.
1344 *
1345 * Deleting the size class will revert it to the values defined by
1346 * edje_size_class_set() or the color class defined in the theme file.
1347 *
1348 * @param[in] size_class Size class name
1349 *
1350 * @since 1.17
1351 *
1352 * @ingroup Edje_Object
1353 */
1354EAPI void edje_object_size_class_del(Evas_Object *obj, const char *size_class);
1355
1356/**
1216 * @brief Enables selection if the entry is an EXPLICIT selection mode type. 1357 * @brief Enables selection if the entry is an EXPLICIT selection mode type.
1217 * 1358 *
1218 * The default is to not allow selection. This function only affects user 1359 * The default is to not allow selection. This function only affects user
@@ -1224,7 +1365,7 @@ EAPI Eina_Bool edje_object_color_class_get(const Evas_Object *obj, const char *
1224 * 1365 *
1225 * @ingroup Edje_Object 1366 * @ingroup Edje_Object
1226 */ 1367 */
1227EAPI void edje_object_part_text_select_allow_set(const Edje_Object *obj, const char *part, Eina_Bool allow); 1368EAPI void edje_object_part_text_select_allow_set(const Evas_Object *obj, const char *part, Eina_Bool allow);
1228 1369
1229/** 1370/**
1230 * @brief Sets the RTL orientation for this object. 1371 * @brief Sets the RTL orientation for this object.
diff --git a/src/lib/edje/edje_global.eo b/src/lib/edje/edje_global.eo
new file mode 100644
index 0000000000..07ebba5130
--- /dev/null
+++ b/src/lib/edje/edje_global.eo
@@ -0,0 +1,12 @@
1class Edje.Global (Efl.Object, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class, Efl.Gfx.Size_Class)
2{
3 data: null;
4 implements {
5 Efl.Gfx.Color_Class.color_class { get; set; }
6 Efl.Gfx.Color_Class.color_class_del;
7 Efl.Gfx.Text_Class.text_class { get; set; }
8 Efl.Gfx.Text_Class.text_class_del;
9 Efl.Gfx.Size_Class.size_class { get; set; }
10 Efl.Gfx.Size_Class.size_class_del;
11 }
12}
diff --git a/src/lib/edje/edje_main.c b/src/lib/edje/edje_main.c
index 3c6adeb840..f5980cc67e 100644
--- a/src/lib/edje/edje_main.c
+++ b/src/lib/edje/edje_main.c
@@ -81,6 +81,7 @@ edje_init(void)
81 } 81 }
82 82
83 _edje_scale = FROM_DOUBLE(1.0); 83 _edje_scale = FROM_DOUBLE(1.0);
84 _edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, NULL);
84 85
85 _edje_edd_init(); 86 _edje_edd_init();
86 _edje_text_init(); 87 _edje_text_init();
@@ -140,6 +141,8 @@ shutdown_all:
140 _edje_text_class_hash_free(); 141 _edje_text_class_hash_free();
141 _edje_size_class_hash_free(); 142 _edje_size_class_hash_free();
142 _edje_edd_shutdown(); 143 _edje_edd_shutdown();
144 efl_del(_edje_global_obj);
145 _edje_global_obj = NULL;
143 efreet_shutdown(); 146 efreet_shutdown();
144shutdown_evas: 147shutdown_evas:
145 evas_shutdown(); 148 evas_shutdown();
@@ -192,6 +195,8 @@ _edje_shutdown_core(void)
192 _edje_text_class_hash_free(); 195 _edje_text_class_hash_free();
193 _edje_size_class_hash_free(); 196 _edje_size_class_hash_free();
194 _edje_edd_shutdown(); 197 _edje_edd_shutdown();
198 efl_del(_edje_global_obj);
199 _edje_global_obj = NULL;
195 200
196 eina_cow_del(_edje_calc_params_map_cow); 201 eina_cow_del(_edje_calc_params_map_cow);
197 eina_cow_del(_edje_calc_params_physics_cow); 202 eina_cow_del(_edje_calc_params_physics_cow);
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index b1e1f062db..895f06d0cd 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -5,7 +5,8 @@ import edje_types;
5class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part, 5class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
6 Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc, 6 Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc,
7 Efl.Canvas.Layout_Signal, Efl.Canvas.Layout_Group, 7 Efl.Canvas.Layout_Signal, Efl.Canvas.Layout_Group,
8 Efl.Player) 8 Efl.Player, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class,
9 Efl.Gfx.Size_Class)
9{ 10{
10 [[Edje object class]] 11 [[Edje object class]]
11 legacy_prefix: edje_object; 12 legacy_prefix: edje_object;
@@ -101,221 +102,6 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
101 } 102 }
102 } 103 }
103 104
104 /* CLASS APIS BEGIN -------------------------------------------------- */
105 @property global_color_class @class {
106 set {
107 [[Sets Edje color class.
108
109 This function sets the color values for a process level color
110 class. This will cause all edje parts in the current process that
111 have the specified color class to have their colors multiplied by
112 these values. (Object level color classes set by
113 edje_object_color_class_set() will override the values set by this
114 function).
115
116 Setting color emits a signal "color_class,set" with source being
117 the given color class in all objects.
118
119 Note: unlike Evas, Edje colors are not pre-multiplied. That is,
120 half-transparent white is 255 255 255 128.]]
121 legacy: null;
122 return: bool; [[$true on success, $false otherwise]]
123 }
124 get {
125 [[Gets Edje color class.
126
127 This function gets the color values for a process level color
128 class. This value is the globally set and not per-object, that is,
129 the value that would be used by objects if they did not override with
130 @.color_class.set().
131
132 See also, @.global_color_class.set()
133
134 Note: unlike Evas, Edje colors are not pre-multiplied. That is,
135 half-transparent white is 255 255 255 128.]]
136 legacy: null;
137 return: bool; [[$true if found or $false if not found and all values
138 are zeored.]]
139 }
140 keys {
141 color_class: string; [[The name of color class]]
142 mode: Edje.Color_Class.Mode; [[Edje color class mode]]
143 }
144 values {
145 r: int; [[Object Red value]]
146 g: int; [[Object Green value]]
147 b: int; [[Object Blue value]]
148 a: int; [[Object Alpha value]]
149 }
150 }
151 @property color_class {
152 set {
153 [[Sets the object color class.
154
155 This function sets the color values for an object level color
156 class. This will cause all edje parts in the specified object that
157 have the specified color class to have their colors multiplied by
158 these values.
159
160 The first color is the object, the second is the text outline, and
161 the third is the text shadow. (Note that the second two only apply
162 to text parts).
163
164 Setting color emits a signal "color_class,set" with source being
165 the given color.
166
167 Note: unlike Evas, Edje colors are not pre-multiplied. That is,
168 half-transparent white is 255 255 255 128.]]
169 legacy: null;
170 return: bool; [[$true on success, $false otherwise]]
171 }
172 get {
173 [[Gets the object color class.
174
175 This function gets the color values for an object level color
176 class. If no explicit object color is set, then global values will
177 be used.
178
179 The first color is the object, the second is the text outline, and
180 the third is the text shadow. (Note that the second two only apply
181 to text parts).
182
183 Note: unlike Evas, Edje colors are not pre-multiplied. That is,
184 half-transparent white is 255 255 255 128.]]
185 legacy: null;
186 return: bool; [[$true if found or $false if not found and all
187 values are zeroed.]]
188 }
189 keys {
190 color_class: string; [[The name of color class]]
191 mode: Edje.Color_Class.Mode; [[Edje color class mode]]
192 }
193 values {
194 r: int; [[Object Red value]]
195 g: int; [[Object Green value]]
196 b: int; [[Object Blue value]]
197 a: int; [[Object Alpha value]]
198 }
199 }
200 @property color_class_description {
201 get {
202 [[Gets the description of an object color class.
203
204 This function gets the description of a color class in use by an object.]]
205 return: string; [[The description of the target color class or $null if not found]]
206 }
207 keys {
208 color_class: string; [[Color class description]]
209 }
210 }
211 color_class_clear @const {
212 [[Clears object color classes.
213
214 @since 1.17.0]]
215 return: bool; [[$true on success, or $false on error]]
216 }
217 color_class_del {
218 [[Deletes the object color class.
219
220 This function deletes any values at the object level for the
221 specified object and color class.
222
223 Deleting the color class will revert it to the values
224 defined by edje_color_class_set() or the color class
225 defined in the theme file.
226
227 Deleting the color class will emit the signal "color_class,del"
228 for the given Edje object.]]
229 params {
230 @in color_class: string; [[The color class to be deleted.]]
231 }
232 }
233 @property text_class {
234 set {
235 [[Sets Edje text class.
236
237 This function sets the text class for the Edje.]]
238 return: bool; [[$true on success, or $false on error]]
239 }
240 get {
241 [[Gets font and font size from edje text class.
242
243 This function gets the font and the font size from the object
244 text class. The font string will only be valid until the text
245 class is changed or the edje object is deleted.]]
246 return: bool; [[$true on success, or $false on error]]
247 }
248 keys {
249 text_class: string; [[The text class name]]
250 }
251 values {
252 font: string; [[Font name]]
253 size: int; [[Font Size]]
254 }
255 }
256 text_class_del {
257 [[Deletes the object text class.
258
259 This function deletes any values at the object level for the
260 specified object and text class.
261
262 Deleting the text class will revert it to the values
263 defined by edje_text_class_set() or the text class
264 defined in the theme file.
265
266 @since 1.17]]
267 params {
268 @in text_class: string; [[The color class to be deleted.]]
269 }
270 }
271 @property size_class {
272 set {
273 [[Sets the object size class.
274
275 This function sets the min and max values for an object level size
276 class. This will make all edje parts in the specified object that
277 have the specified size class update their min and max size with given values.
278
279 @since 1.17]]
280 return: bool; [[$true on success, or $false on error]]
281 }
282 get {
283 [[Gets the object size class.
284
285 This function gets the min and max values for an object level size
286 class. These values will only be valid until the size class is changed
287 or the edje object is deleted.
288
289 @since 1.17]]
290 return: bool; [[$true on success, or $false on error]]
291 }
292 keys {
293 size_class: string; [[The size class name]]
294 }
295 values {
296 minw: int; [[The min width]]
297 minh: int; [[The min height]]
298 maxw: int; [[The max width]]
299 maxh: int; [[The max height]]
300 }
301 }
302 size_class_del {
303 [[Deletes the object size class.
304
305 This function deletes any values at the object level for the
306 specified object and size class.
307
308 Deleting the size class will revert it to the values
309 defined by edje_size_class_set() or the color class
310 defined in the theme file.
311
312 @since 1.17]]
313 params {
314 @in size_class: string; [[Size class name]]
315 }
316 }
317 /* CLASS APIS END ---------------------------------------------------- */
318
319 access_part_iterate @beta { 105 access_part_iterate @beta {
320 [[Iterates over all accessibility-enabled part names.]] 106 [[Iterates over all accessibility-enabled part names.]]
321 legacy: null; 107 legacy: null;
@@ -391,6 +177,14 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
391 Efl.Object.debug_name_override; 177 Efl.Object.debug_name_override;
392 Efl.Canvas.Object.no_render { set; } 178 Efl.Canvas.Object.no_render { set; }
393 Efl.Canvas.Object.paragraph_direction { set; } 179 Efl.Canvas.Object.paragraph_direction { set; }
180 Efl.Gfx.Color_Class.color_class { get; set; }
181 Efl.Gfx.Color_Class.color_class_description { get; }
182 Efl.Gfx.Color_Class.color_class_del;
183 Efl.Gfx.Color_Class.color_class_clear;
184 Efl.Gfx.Text_Class.text_class { get; set; }
185 Efl.Gfx.Text_Class.text_class_del;
186 Efl.Gfx.Size_Class.size_class { get; set; }
187 Efl.Gfx.Size_Class.size_class_del;
394 Efl.Canvas.Group.group_calculate; 188 Efl.Canvas.Group.group_calculate;
395 Efl.Canvas.Layout_Calc.calc_auto_update_hints { get; set; } 189 Efl.Canvas.Layout_Calc.calc_auto_update_hints { get; set; }
396 Efl.Canvas.Layout_Calc.calc_size_min; 190 Efl.Canvas.Layout_Calc.calc_size_min;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 5063b0080b..369dddc55a 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2348,6 +2348,8 @@ const Eina_Inarray *edje_match_signal_source_hash_get(const char *signal,
2348void edje_match_signal_source_free(Edje_Signal_Source_Char *key, void *data); 2348void edje_match_signal_source_free(Edje_Signal_Source_Char *key, void *data);
2349void _edje_signal_callback_matches_unref(Edje_Signal_Callback_Matches *m); 2349void _edje_signal_callback_matches_unref(Edje_Signal_Callback_Matches *m);
2350 2350
2351extern Edje_Global *_edje_global_obj;
2352
2351// FIXME remove below 3 eapi decls when edje_convert goes 2353// FIXME remove below 3 eapi decls when edje_convert goes
2352EAPI void _edje_edd_init(void); 2354EAPI void _edje_edd_init(void);
2353EAPI void _edje_data_font_list_desc_make(Eet_Data_Descriptor **_font_list_edd, Eet_Data_Descriptor **_font_edd); 2355EAPI void _edje_data_font_list_desc_make(Eet_Data_Descriptor **_font_list_edd, Eet_Data_Descriptor **_font_edd);
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 8b01b4eb03..fd1e2470b2 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -536,6 +536,15 @@ _edje_object_efl_player_play_speed_get(Eo *obj EINA_UNUSED, Edje *pd)
536 return 1.0/pd->duration_scale; 536 return 1.0/pd->duration_scale;
537} 537}
538 538
539EOLIAN static Efl_Object *
540_edje_object_efl_object_provider_find(Eo *obj, Edje *ed EINA_UNUSED, const Efl_Class *klass)
541{
542 if (klass == EDJE_GLOBAL_CLASS)
543 return _edje_global_obj;
544
545 return efl_provider_find(efl_super(obj, EDJE_OBJECT_CLASS), klass);
546}
547
539/* Internal EO APIs and hidden overrides */ 548/* Internal EO APIs and hidden overrides */
540 549
541#define EDJE_OBJECT_EXTRA_OPS \ 550#define EDJE_OBJECT_EXTRA_OPS \
@@ -543,6 +552,7 @@ _edje_object_efl_player_play_speed_get(Eo *obj EINA_UNUSED, Edje *pd)
543 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _edje_object_efl_object_dbg_info_get) 552 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _edje_object_efl_object_dbg_info_get)
544 553
545#include "edje_object.eo.c" 554#include "edje_object.eo.c"
555#include "edje_global.eo.c"
546#include "efl_canvas_layout_calc.eo.c" 556#include "efl_canvas_layout_calc.eo.c"
547#include "efl_canvas_layout_signal.eo.c" 557#include "efl_canvas_layout_signal.eo.c"
548#include "efl_canvas_layout_group.eo.c" 558#include "efl_canvas_layout_group.eo.c"
diff --git a/src/lib/edje/edje_types.eot b/src/lib/edje/edje_types.eot
index ca09839c3a..885798ac41 100644
--- a/src/lib/edje/edje_types.eot
+++ b/src/lib/edje/edje_types.eot
@@ -134,15 +134,6 @@ enum Edje.Input_Panel.Layout {
134 134
135struct Edje.Perspective; [[Perspective info for maps inside edje objects]] 135struct Edje.Perspective; [[Perspective info for maps inside edje objects]]
136 136
137enum Edje.Color_Class.Mode {
138 [[Selector to access one color among the colors belonging to a color class.
139
140 @since 1.18]]
141 color = 0, [[The default color. For instance, the color of the text itself.]]
142 color2, [[The 2nd color. For instance, the outline of the text.]]
143 color3 [[The 3rd color. For instance, the shadow of the text.]]
144}
145
146/* FIXME-cb: Ignore cb types that should be fixed. */ 137/* FIXME-cb: Ignore cb types that should be fixed. */
147type Edje.Signal_Cb: __undefined_type; [[Edje signal callback type]] 138type Edje.Signal_Cb: __undefined_type; [[Edje signal callback type]]
148type Edje.Markup_Filter_Cb: __undefined_type; [[Edje markup filter callback type]] 139type Edje.Markup_Filter_Cb: __undefined_type; [[Edje markup filter callback type]]
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 1b772d4be7..da6d413411 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -16,6 +16,8 @@ struct _Edje_Box_Layout
16 char name[]; 16 char name[];
17}; 17};
18 18
19Edje_Global *_edje_global_obj = NULL;
20
19static Eina_Hash *_edje_color_class_hash = NULL; 21static Eina_Hash *_edje_color_class_hash = NULL;
20static Eina_Hash *_edje_text_class_hash = NULL; 22static Eina_Hash *_edje_text_class_hash = NULL;
21static Eina_Hash *_edje_size_class_hash = NULL; 23static Eina_Hash *_edje_size_class_hash = NULL;
@@ -500,7 +502,7 @@ _edje_object_efl_canvas_layout_calc_calc_thaw(Eo *obj EINA_UNUSED, Edje *ed)
500} 502}
501 503
502static Eina_Bool 504static Eina_Bool
503_edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Color_Class_Mode mode, int r, int g, int b, int a, Eina_Bool *need_update) 505_edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Efl_Gfx_Color_Class_Layer layer, int r, int g, int b, int a, Eina_Bool *need_update)
504{ 506{
505 Edje_Color_Class *cc; 507 Edje_Color_Class *cc;
506 508
@@ -523,9 +525,9 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
523 cc = eina_hash_find(hash, color_class); 525 cc = eina_hash_find(hash, color_class);
524 if (cc) 526 if (cc)
525 { 527 {
526 switch (mode) 528 switch (layer)
527 { 529 {
528 case EDJE_COLOR_CLASS_MODE_COLOR: 530 case EFL_GFX_COLOR_CLASS_LAYER_NORMAL:
529 if ((cc->r == r) && (cc->g == g) && 531 if ((cc->r == r) && (cc->g == g) &&
530 (cc->b == b) && (cc->a == a)) 532 (cc->b == b) && (cc->a == a))
531 { 533 {
@@ -534,7 +536,7 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
534 } 536 }
535 break; 537 break;
536 538
537 case EDJE_COLOR_CLASS_MODE_COLOR2: 539 case EFL_GFX_COLOR_CLASS_LAYER_OUTLINE:
538 if ((cc->r2 == r) && (cc->g2 == g) && 540 if ((cc->r2 == r) && (cc->g2 == g) &&
539 (cc->b2 == b) && (cc->a2 == a)) 541 (cc->b2 == b) && (cc->a2 == a))
540 { 542 {
@@ -543,7 +545,7 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
543 } 545 }
544 break; 546 break;
545 547
546 case EDJE_COLOR_CLASS_MODE_COLOR3: 548 case EFL_GFX_COLOR_CLASS_LAYER_SHADOW:
547 if ((cc->r3 == r) && (cc->g3 == g) && 549 if ((cc->r3 == r) && (cc->g3 == g) &&
548 (cc->b3 == b) && (cc->a3 == a)) 550 (cc->b3 == b) && (cc->a3 == a))
549 { 551 {
@@ -571,23 +573,23 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
571 eina_hash_direct_add(hash, cc->name, cc); 573 eina_hash_direct_add(hash, cc->name, cc);
572 } 574 }
573 575
574 switch (mode) 576 switch (layer)
575 { 577 {
576 case EDJE_COLOR_CLASS_MODE_COLOR: 578 case EFL_GFX_COLOR_CLASS_LAYER_NORMAL:
577 cc->r = r; 579 cc->r = r;
578 cc->g = g; 580 cc->g = g;
579 cc->b = b; 581 cc->b = b;
580 cc->a = a; 582 cc->a = a;
581 break; 583 break;
582 584
583 case EDJE_COLOR_CLASS_MODE_COLOR2: 585 case EFL_GFX_COLOR_CLASS_LAYER_OUTLINE:
584 cc->r2 = r; 586 cc->r2 = r;
585 cc->g2 = g; 587 cc->g2 = g;
586 cc->b2 = b; 588 cc->b2 = b;
587 cc->a2 = a; 589 cc->a2 = a;
588 break; 590 break;
589 591
590 case EDJE_COLOR_CLASS_MODE_COLOR3: 592 case EFL_GFX_COLOR_CLASS_LAYER_SHADOW:
591 cc->r3 = r; 593 cc->r3 = r;
592 cc->g3 = g; 594 cc->g3 = g;
593 cc->b3 = b; 595 cc->b3 = b;
@@ -601,27 +603,27 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
601} 603}
602 604
603static Eina_Bool 605static Eina_Bool
604_edje_color_class_get_internal(Edje_Color_Class *cc, Edje_Color_Class_Mode mode, int *r, int *g, int *b, int *a) 606_edje_color_class_get_internal(Edje_Color_Class *cc, Efl_Gfx_Color_Class_Layer layer, int *r, int *g, int *b, int *a)
605{ 607{
606 if (cc) 608 if (cc)
607 { 609 {
608 switch (mode) 610 switch (layer)
609 { 611 {
610 case EDJE_COLOR_CLASS_MODE_COLOR: 612 case EFL_GFX_COLOR_CLASS_LAYER_NORMAL:
611 if (r) *r = cc->r; 613 if (r) *r = cc->r;
612 if (g) *g = cc->g; 614 if (g) *g = cc->g;
613 if (b) *b = cc->b; 615 if (b) *b = cc->b;
614 if (a) *a = cc->a; 616 if (a) *a = cc->a;
615 break; 617 break;
616 618
617 case EDJE_COLOR_CLASS_MODE_COLOR2: 619 case EFL_GFX_COLOR_CLASS_LAYER_OUTLINE:
618 if (r) *r = cc->r2; 620 if (r) *r = cc->r2;
619 if (g) *g = cc->g2; 621 if (g) *g = cc->g2;
620 if (b) *b = cc->b2; 622 if (b) *b = cc->b2;
621 if (a) *a = cc->a2; 623 if (a) *a = cc->a2;
622 break; 624 break;
623 625
624 case EDJE_COLOR_CLASS_MODE_COLOR3: 626 case EFL_GFX_COLOR_CLASS_LAYER_SHADOW:
625 if (r) *r = cc->r3; 627 if (r) *r = cc->r3;
626 if (g) *g = cc->g3; 628 if (g) *g = cc->g3;
627 if (b) *b = cc->b3; 629 if (b) *b = cc->b3;
@@ -644,18 +646,18 @@ _edje_color_class_get_internal(Edje_Color_Class *cc, Edje_Color_Class_Mode mode,
644EAPI Eina_Bool 646EAPI Eina_Bool
645edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3) 647edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
646{ 648{
647 Eina_Bool int_ret; 649 Eina_Bool int_ret = EINA_TRUE;
648 650
649 int_ret = edje_obj_global_color_class_set(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR, r, g, b, a); 651 int_ret &= efl_gfx_color_class_set(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_NORMAL, r, g, b, a);
650 int_ret &= edje_obj_global_color_class_set(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR2, r2, g2, b2, a2); 652 int_ret &= efl_gfx_color_class_set(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_OUTLINE, r2, g2, b2, a2);
651 int_ret &= edje_obj_global_color_class_set(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR3, r3, g3, b3, a3); 653 int_ret &= efl_gfx_color_class_set(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_SHADOW, r3, g3, b3, a3);
652 654
653 return int_ret; 655 return int_ret;
654} 656}
655 657
656EOLIAN Eina_Bool 658EOLIAN Eina_Bool
657_edje_object_global_color_class_set(Efl_Class *klass EINA_UNUSED, void *pd EINA_UNUSED, 659_edje_global_efl_gfx_color_class_color_class_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
658 const char *color_class, Edje_Color_Class_Mode mode, int r, int g, int b, int a) 660 const char *color_class, Efl_Gfx_Color_Class_Layer layer, int r, int g, int b, int a)
659{ 661{
660 Eina_Bool int_ret; 662 Eina_Bool int_ret;
661 Eina_Bool need_update = EINA_FALSE; 663 Eina_Bool need_update = EINA_FALSE;
@@ -663,7 +665,7 @@ _edje_object_global_color_class_set(Efl_Class *klass EINA_UNUSED, void *pd EINA_
663 if (!_edje_color_class_hash) 665 if (!_edje_color_class_hash)
664 _edje_color_class_hash = eina_hash_string_superfast_new(NULL); 666 _edje_color_class_hash = eina_hash_string_superfast_new(NULL);
665 667
666 int_ret = _edje_color_class_set_internal(_edje_color_class_hash, color_class, mode, r, g, b, a, &need_update); 668 int_ret = _edje_color_class_set_internal(_edje_color_class_hash, color_class, layer, r, g, b, a, &need_update);
667 669
668 if ((int_ret) && (need_update)) 670 if ((int_ret) && (need_update))
669 efl_observable_observers_update(_edje_color_class_member, color_class, "color_class,set"); 671 efl_observable_observers_update(_edje_color_class_member, color_class, "color_class,set");
@@ -674,18 +676,18 @@ _edje_object_global_color_class_set(Efl_Class *klass EINA_UNUSED, void *pd EINA_
674EAPI Eina_Bool 676EAPI Eina_Bool
675edje_color_class_get(const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3) 677edje_color_class_get(const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3)
676{ 678{
677 Eina_Bool int_ret; 679 Eina_Bool int_ret = EINA_TRUE;
678 680
679 int_ret = edje_obj_global_color_class_get(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR, r, g, b, a); 681 int_ret &= efl_gfx_color_class_get(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_NORMAL, r, g, b, a);
680 int_ret &= edje_obj_global_color_class_get(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR2, r2, g2, b2, a2); 682 int_ret &= efl_gfx_color_class_get(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_OUTLINE, r2, g2, b2, a2);
681 int_ret &= edje_obj_global_color_class_get(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR3, r3, g3, b3, a3); 683 int_ret &= efl_gfx_color_class_get(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_SHADOW, r3, g3, b3, a3);
682 684
683 return int_ret; 685 return int_ret;
684} 686}
685 687
686EOLIAN Eina_Bool 688EOLIAN Eina_Bool
687_edje_object_global_color_class_get(Efl_Class *klass EINA_UNUSED, void *pd EINA_UNUSED, 689_edje_global_efl_gfx_color_class_color_class_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
688 const char *color_class, Edje_Color_Class_Mode mode, int *r, int *g, int *b, int *a) 690 const char *color_class, Efl_Gfx_Color_Class_Layer layer, int *r, int *g, int *b, int *a)
689{ 691{
690 Edje_Color_Class *cc; 692 Edje_Color_Class *cc;
691 693
@@ -694,12 +696,18 @@ _edje_object_global_color_class_get(Efl_Class *klass EINA_UNUSED, void *pd EINA_
694 else 696 else
695 cc = eina_hash_find(_edje_color_class_hash, color_class); 697 cc = eina_hash_find(_edje_color_class_hash, color_class);
696 698
697 return _edje_color_class_get_internal(cc, mode, r, g, b, a); 699 return _edje_color_class_get_internal(cc, layer, r, g, b, a);
698} 700}
699 701
700EAPI void 702EAPI void
701edje_color_class_del(const char *color_class) 703edje_color_class_del(const char *color_class)
702{ 704{
705 efl_gfx_color_class_del(_edje_global_obj, color_class);
706}
707
708EOLIAN void
709_edje_global_efl_gfx_color_class_color_class_del(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *color_class)
710{
703 Edje_Color_Class *cc; 711 Edje_Color_Class *cc;
704 712
705 if (!color_class) return; 713 if (!color_class) return;
@@ -826,22 +834,22 @@ _edje_color_class_list_foreach(const Eina_Hash *hash EINA_UNUSED, const void *ke
826EAPI Eina_Bool 834EAPI Eina_Bool
827edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3) 835edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
828{ 836{
829 Eina_Bool int_ret; 837 Eina_Bool int_ret = EINA_TRUE;
830 838
831 int_ret = edje_obj_color_class_set(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR, r, g, b, a); 839 int_ret &= efl_gfx_color_class_set(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_NORMAL, r, g, b, a);
832 int_ret &= edje_obj_color_class_set(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR2, r2, g2, b2, a2); 840 int_ret &= efl_gfx_color_class_set(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_OUTLINE, r2, g2, b2, a2);
833 int_ret &= edje_obj_color_class_set(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR3, r3, g3, b3, a3); 841 int_ret &= efl_gfx_color_class_set(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_SHADOW, r3, g3, b3, a3);
834 842
835 return int_ret; 843 return int_ret;
836} 844}
837 845
838EOLIAN Eina_Bool 846EOLIAN Eina_Bool
839_edje_object_color_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class, Edje_Color_Class_Mode mode, int r, int g, int b, int a) 847_edje_object_efl_gfx_color_class_color_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class, Efl_Gfx_Color_Class_Layer layer, int r, int g, int b, int a)
840{ 848{
841 Eina_Bool int_ret; 849 Eina_Bool int_ret;
842 Eina_Bool need_update; 850 Eina_Bool need_update;
843 851
844 int_ret = _edje_color_class_set_internal(ed->color_classes, color_class, mode, r, g, b, a, &need_update); 852 int_ret = _edje_color_class_set_internal(ed->color_classes, color_class, layer, r, g, b, a, &need_update);
845 853
846 if ((int_ret) && (need_update)) 854 if ((int_ret) && (need_update))
847 { 855 {
@@ -860,8 +868,8 @@ _edje_object_color_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
860 ((rp->type == EDJE_RP_TYPE_SWALLOW) && 868 ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
861 (rp->typedata.swallow)) && 869 (rp->typedata.swallow)) &&
862 (rp->typedata.swallow->swallowed_object)) 870 (rp->typedata.swallow->swallowed_object))
863 edje_obj_color_class_set(rp->typedata.swallow->swallowed_object, 871 efl_gfx_color_class_set(rp->typedata.swallow->swallowed_object,
864 color_class, mode, r, g, b, a); 872 color_class, layer, r, g, b, a);
865 } 873 }
866 874
867 _edje_recalc(ed); 875 _edje_recalc(ed);
@@ -874,17 +882,17 @@ _edje_object_color_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
874EAPI Eina_Bool 882EAPI Eina_Bool
875edje_object_color_class_get(const Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3) 883edje_object_color_class_get(const Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3)
876{ 884{
877 Eina_Bool int_ret; 885 Eina_Bool int_ret = EINA_TRUE;
878 886
879 int_ret = edje_obj_color_class_get(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR, r, g, b, a); 887 int_ret &= efl_gfx_color_class_get(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_NORMAL, r, g, b, a);
880 int_ret &= edje_obj_color_class_get(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR2, r2, g2, b2, a2); 888 int_ret &= efl_gfx_color_class_get(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_OUTLINE, r2, g2, b2, a2);
881 int_ret &= edje_obj_color_class_get(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR3, r3, g3, b3, a3); 889 int_ret &= efl_gfx_color_class_get(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_SHADOW, r3, g3, b3, a3);
882 890
883 return int_ret; 891 return int_ret;
884} 892}
885 893
886EOLIAN Eina_Bool 894EOLIAN Eina_Bool
887_edje_object_color_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class, Edje_Color_Class_Mode mode, int *r, int *g, int *b, int *a) 895_edje_object_efl_gfx_color_class_color_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class, Efl_Gfx_Color_Class_Layer layer, int *r, int *g, int *b, int *a)
888{ 896{
889 Edje_Color_Class *cc; 897 Edje_Color_Class *cc;
890 898
@@ -893,18 +901,30 @@ _edje_object_color_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
893 else 901 else
894 cc = _edje_color_class_find(ed, color_class); 902 cc = _edje_color_class_find(ed, color_class);
895 903
896 return _edje_color_class_get_internal(cc, mode, r, g, b, a); 904 return _edje_color_class_get_internal(cc, layer, r, g, b, a);
905}
906
907EAPI const char *
908edje_objcet_color_class_description_get(const Evas_Object *obj, const char *color_class)
909{
910 return efl_gfx_color_class_description_get(obj, color_class);
897} 911}
898 912
899EOLIAN Eina_Stringshare * 913EOLIAN const char *
900_edje_object_color_class_description_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class) 914_edje_object_efl_gfx_color_class_color_class_description_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class)
901{ 915{
902 Edje_Color_Class *cc = _edje_color_class_find(ed, color_class); 916 Edje_Color_Class *cc = _edje_color_class_find(ed, color_class);
903 return cc ? cc->desc : NULL; 917 return cc ? cc->desc : NULL;
904} 918}
905 919
920EAPI void
921edje_object_color_class_del(Evas_Object *obj, const char *color_class)
922{
923 efl_gfx_color_class_del(obj, color_class);
924}
925
906EOLIAN void 926EOLIAN void
907_edje_object_color_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class) 927_edje_object_efl_gfx_color_class_color_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class)
908{ 928{
909 Edje_Color_Class *cc = NULL; 929 Edje_Color_Class *cc = NULL;
910 unsigned short i; 930 unsigned short i;
@@ -922,7 +942,7 @@ _edje_object_color_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
922 ((rp->type == EDJE_RP_TYPE_SWALLOW) && 942 ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
923 (rp->typedata.swallow)) && 943 (rp->typedata.swallow)) &&
924 (rp->typedata.swallow->swallowed_object)) 944 (rp->typedata.swallow->swallowed_object))
925 edje_object_color_class_del(rp->typedata.swallow->swallowed_object, color_class); 945 efl_gfx_color_class_del(rp->typedata.swallow->swallowed_object, color_class);
926 } 946 }
927 947
928 ed->dirty = EINA_TRUE; 948 ed->dirty = EINA_TRUE;
@@ -934,17 +954,22 @@ _edje_object_color_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
934 _edje_emit(ed, "color_class,del", color_class); 954 _edje_emit(ed, "color_class,del", color_class);
935} 955}
936 956
937EOLIAN Eina_Bool 957EAPI Eina_Bool
938_edje_object_color_class_clear(const Eo *obj EINA_UNUSED, Edje *ed) 958edje_object_color_class_clear(const Evas_Object *obj)
959{
960 efl_gfx_color_class_clear((Eo *)obj);
961
962 return EINA_TRUE;
963}
964
965EOLIAN void
966_edje_object_efl_gfx_color_class_color_class_clear(Eo *obj EINA_UNUSED, Edje *ed)
939{ 967{
940 Edje_List_Foreach_Data fdata; 968 Edje_List_Foreach_Data fdata;
941 Edje_Color_Class *cc = NULL; 969 Edje_Color_Class *cc = NULL;
942 Eina_List *l; 970 Eina_List *l;
943 char *color_class; 971 char *color_class;
944 unsigned short i; 972 unsigned short i;
945 Eina_Bool int_ret = EINA_TRUE;
946
947 if (!ed) return EINA_FALSE;
948 973
949 memset(&fdata, 0, sizeof(Edje_List_Foreach_Data)); 974 memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
950 eina_hash_foreach(ed->color_classes, _edje_color_class_list_foreach, &fdata); 975 eina_hash_foreach(ed->color_classes, _edje_color_class_list_foreach, &fdata);
@@ -961,7 +986,7 @@ _edje_object_color_class_clear(const Eo *obj EINA_UNUSED, Edje *ed)
961 ((rp->type == EDJE_RP_TYPE_SWALLOW) && 986 ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
962 (rp->typedata.swallow)) && 987 (rp->typedata.swallow)) &&
963 (rp->typedata.swallow->swallowed_object)) 988 (rp->typedata.swallow->swallowed_object))
964 int_ret &= edje_object_color_class_clear(rp->typedata.swallow->swallowed_object); 989 efl_gfx_color_class_clear(rp->typedata.swallow->swallowed_object);
965 } 990 }
966 991
967 ed->dirty = EINA_TRUE; 992 ed->dirty = EINA_TRUE;
@@ -976,8 +1001,6 @@ _edje_object_color_class_clear(const Eo *obj EINA_UNUSED, Edje *ed)
976 _edje_emit(ed, "color_class,del", color_class); 1001 _edje_emit(ed, "color_class,del", color_class);
977 free(color_class); 1002 free(color_class);
978 } 1003 }
979
980 return int_ret;
981} 1004}
982 1005
983typedef struct _Edje_File_Color_Class_Iterator Edje_File_Color_Class_Iterator; 1006typedef struct _Edje_File_Color_Class_Iterator Edje_File_Color_Class_Iterator;
@@ -1057,6 +1080,13 @@ on_error:
1057EAPI Eina_Bool 1080EAPI Eina_Bool
1058edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size size) 1081edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size size)
1059{ 1082{
1083 return efl_gfx_text_class_set(_edje_global_obj, text_class, font, (Efl_Font_Size)size);
1084}
1085
1086EOLIAN Eina_Bool
1087_edje_global_efl_gfx_text_class_text_class_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
1088 const char *text_class, const char *font, Efl_Font_Size size)
1089{
1060 Edje_Text_Class *tc; 1090 Edje_Text_Class *tc;
1061 1091
1062 if (!text_class) return EINA_FALSE; 1092 if (!text_class) return EINA_FALSE;
@@ -1101,6 +1131,13 @@ edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size siz
1101EAPI Eina_Bool 1131EAPI Eina_Bool
1102edje_text_class_get(const char *text_class, const char **font, Evas_Font_Size *size) 1132edje_text_class_get(const char *text_class, const char **font, Evas_Font_Size *size)
1103{ 1133{
1134 return efl_gfx_text_class_get(_edje_global_obj, text_class, font, (Efl_Font_Size *)size);
1135}
1136
1137EOLIAN Eina_Bool
1138_edje_global_efl_gfx_text_class_text_class_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
1139 const char *text_class, const char **font, Efl_Font_Size *size)
1140{
1104 Edje_Text_Class *tc; 1141 Edje_Text_Class *tc;
1105 1142
1106 if (!text_class) return EINA_FALSE; 1143 if (!text_class) return EINA_FALSE;
@@ -1125,6 +1162,12 @@ edje_text_class_get(const char *text_class, const char **font, Evas_Font_Size *s
1125EAPI void 1162EAPI void
1126edje_text_class_del(const char *text_class) 1163edje_text_class_del(const char *text_class)
1127{ 1164{
1165 efl_gfx_text_class_del(_edje_global_obj, text_class);
1166}
1167
1168EOLIAN void
1169_edje_global_efl_gfx_text_class_text_class_del(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *text_class)
1170{
1128 Edje_Text_Class *tc; 1171 Edje_Text_Class *tc;
1129 1172
1130 if (!text_class) return; 1173 if (!text_class) return;
@@ -1237,8 +1280,14 @@ _edje_text_class_list_foreach(const Eina_Hash *hash EINA_UNUSED, const void *key
1237 return EINA_TRUE; 1280 return EINA_TRUE;
1238} 1281}
1239 1282
1283EAPI Eina_Bool
1284edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size)
1285{
1286 return efl_gfx_text_class_set(obj, text_class, font, (Efl_Font_Size)size);
1287}
1288
1240EOLIAN Eina_Bool 1289EOLIAN Eina_Bool
1241_edje_object_text_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class, const char *font, Evas_Font_Size size) 1290_edje_object_efl_gfx_text_class_text_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class, const char *font, Efl_Font_Size size)
1242{ 1291{
1243 Edje_Text_Class *tc = NULL; 1292 Edje_Text_Class *tc = NULL;
1244 unsigned short i; 1293 unsigned short i;
@@ -1292,8 +1341,8 @@ _edje_object_text_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *text_clas
1292 ((rp->type == EDJE_RP_TYPE_SWALLOW) && 1341 ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
1293 (rp->typedata.swallow)) && 1342 (rp->typedata.swallow)) &&
1294 (rp->typedata.swallow->swallowed_object)) 1343 (rp->typedata.swallow->swallowed_object))
1295 edje_object_text_class_set(rp->typedata.swallow->swallowed_object, 1344 efl_gfx_text_class_set(rp->typedata.swallow->swallowed_object,
1296 text_class, font, size); 1345 text_class, font, size);
1297 } 1346 }
1298 1347
1299 efl_observer_update(obj, _edje_text_class_member, text_class, NULL); 1348 efl_observer_update(obj, _edje_text_class_member, text_class, NULL);
@@ -1301,8 +1350,14 @@ _edje_object_text_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *text_clas
1301 return EINA_TRUE; 1350 return EINA_TRUE;
1302} 1351}
1303 1352
1353EAPI Eina_Bool
1354edje_object_text_class_get(const Evas_Object *obj, const char *text_class, const char **font, Evas_Font_Size *size)
1355{
1356 return efl_gfx_text_class_get(obj, text_class, font, (Efl_Font_Size *)size);
1357}
1358
1304EOLIAN Eina_Bool 1359EOLIAN Eina_Bool
1305_edje_object_text_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class, const char **font, Evas_Font_Size *size) 1360_edje_object_efl_gfx_text_class_text_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class, const char **font, Efl_Font_Size *size)
1306{ 1361{
1307 Edje_Text_Class *tc = _edje_text_class_find(ed, text_class); 1362 Edje_Text_Class *tc = _edje_text_class_find(ed, text_class);
1308 1363
@@ -1321,8 +1376,14 @@ _edje_object_text_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *text_clas
1321 return EINA_TRUE; 1376 return EINA_TRUE;
1322} 1377}
1323 1378
1379EAPI void
1380edje_object_text_class_del(Evas_Object *obj, const char *text_class)
1381{
1382 efl_gfx_text_class_del(obj, text_class);
1383}
1384
1324EOLIAN void 1385EOLIAN void
1325_edje_object_text_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class) 1386_edje_object_efl_gfx_text_class_text_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class)
1326{ 1387{
1327 Edje_Text_Class *tc = NULL; 1388 Edje_Text_Class *tc = NULL;
1328 unsigned short i; 1389 unsigned short i;
@@ -1340,7 +1401,7 @@ _edje_object_text_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *text_clas
1340 ((rp->type == EDJE_RP_TYPE_SWALLOW) && 1401 ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
1341 (rp->typedata.swallow)) && 1402 (rp->typedata.swallow)) &&
1342 (rp->typedata.swallow->swallowed_object)) 1403 (rp->typedata.swallow->swallowed_object))
1343 edje_object_text_class_del(rp->typedata.swallow->swallowed_object, text_class); 1404 efl_gfx_text_class_del(rp->typedata.swallow->swallowed_object, text_class);
1344 } 1405 }
1345 1406
1346 efl_observer_update(obj, _edje_text_class_member, text_class, NULL); 1407 efl_observer_update(obj, _edje_text_class_member, text_class, NULL);
@@ -1423,6 +1484,13 @@ on_error:
1423EAPI Eina_Bool 1484EAPI Eina_Bool
1424edje_size_class_set(const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh) 1485edje_size_class_set(const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh)
1425{ 1486{
1487 return efl_gfx_size_class_set(_edje_global_obj, size_class, minw, minh, maxw, maxh);
1488}
1489
1490EOLIAN Eina_Bool
1491_edje_global_efl_gfx_size_class_size_class_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *size_class,
1492 Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh)
1493{
1426 Edje_Size_Class *sc; 1494 Edje_Size_Class *sc;
1427 1495
1428 if (!size_class) return EINA_FALSE; 1496 if (!size_class) return EINA_FALSE;
@@ -1470,6 +1538,13 @@ edje_size_class_set(const char *size_class, Evas_Coord minw, Evas_Coord minh, Ev
1470EAPI Eina_Bool 1538EAPI Eina_Bool
1471edje_size_class_get(const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh) 1539edje_size_class_get(const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh)
1472{ 1540{
1541 return efl_gfx_size_class_get(_edje_global_obj, size_class, minw, minh, maxw, maxh);
1542}
1543
1544EOLIAN Eina_Bool
1545_edje_global_efl_gfx_size_class_size_class_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *size_class,
1546 Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh)
1547{
1473 Edje_Size_Class *sc; 1548 Edje_Size_Class *sc;
1474 1549
1475 if (!size_class) return EINA_FALSE; 1550 if (!size_class) return EINA_FALSE;
@@ -1498,6 +1573,12 @@ edje_size_class_get(const char *size_class, Evas_Coord *minw, Evas_Coord *minh,
1498EAPI void 1573EAPI void
1499edje_size_class_del(const char *size_class) 1574edje_size_class_del(const char *size_class)
1500{ 1575{
1576 efl_gfx_size_class_del(_edje_global_obj, size_class);
1577}
1578
1579EOLIAN void
1580_edje_global_efl_gfx_size_class_size_class_del(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *size_class)
1581{
1501 Edje_Size_Class *sc; 1582 Edje_Size_Class *sc;
1502 1583
1503 if (!size_class) return; 1584 if (!size_class) return;
@@ -1609,8 +1690,14 @@ _edje_size_class_list_foreach(const Eina_Hash *hash EINA_UNUSED, const void *key
1609 return EINA_TRUE; 1690 return EINA_TRUE;
1610} 1691}
1611 1692
1693EAPI Eina_Bool
1694edje_object_size_class_set(Evas_Object *obj, const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh)
1695{
1696 return efl_gfx_size_class_set(obj, size_class, minw, minh, maxw, maxh);
1697}
1698
1612EOLIAN Eina_Bool 1699EOLIAN Eina_Bool
1613_edje_object_size_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh) 1700_edje_object_efl_gfx_size_class_size_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh)
1614{ 1701{
1615 Edje_Size_Class *sc = NULL; 1702 Edje_Size_Class *sc = NULL;
1616 unsigned short i; 1703 unsigned short i;
@@ -1662,8 +1749,8 @@ _edje_object_size_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *size_clas
1662 ((rp->type == EDJE_RP_TYPE_SWALLOW) && 1749 ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
1663 (rp->typedata.swallow)) && 1750 (rp->typedata.swallow)) &&
1664 (rp->typedata.swallow->swallowed_object)) 1751 (rp->typedata.swallow->swallowed_object))
1665 edje_object_size_class_set(rp->typedata.swallow->swallowed_object, 1752 efl_gfx_size_class_set(rp->typedata.swallow->swallowed_object,
1666 size_class, minw, minh, maxw, maxh); 1753 size_class, minw, minh, maxw, maxh);
1667 } 1754 }
1668 1755
1669 efl_observable_observers_update(_edje_size_class_member, size_class, NULL); 1756 efl_observable_observers_update(_edje_size_class_member, size_class, NULL);
@@ -1671,8 +1758,14 @@ _edje_object_size_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *size_clas
1671 return EINA_TRUE; 1758 return EINA_TRUE;
1672} 1759}
1673 1760
1761EAPI Eina_Bool
1762edje_object_size_class_get(const Evas_Object *obj, const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh)
1763{
1764 return efl_gfx_size_class_get(obj, size_class, minw, minh, maxw, maxh);
1765}
1766
1674EOLIAN Eina_Bool 1767EOLIAN Eina_Bool
1675_edje_object_size_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh) 1768_edje_object_efl_gfx_size_class_size_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh)
1676{ 1769{
1677 Edje_Size_Class *sc = _edje_size_class_find(ed, size_class); 1770 Edje_Size_Class *sc = _edje_size_class_find(ed, size_class);
1678 1771
@@ -1695,8 +1788,14 @@ _edje_object_size_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *size_clas
1695 return EINA_TRUE; 1788 return EINA_TRUE;
1696} 1789}
1697 1790
1791EAPI void
1792edje_object_size_class_del(Evas_Object *obj, const char *size_class)
1793{
1794 efl_gfx_size_class_del(obj, size_class);
1795}
1796
1698EOLIAN void 1797EOLIAN void
1699_edje_object_size_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class) 1798_edje_object_efl_gfx_size_class_size_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class)
1700{ 1799{
1701 Edje_Size_Class *sc = NULL; 1800 Edje_Size_Class *sc = NULL;
1702 unsigned short i; 1801 unsigned short i;
@@ -1714,7 +1813,7 @@ _edje_object_size_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *size_clas
1714 ((rp->type == EDJE_RP_TYPE_SWALLOW) && 1813 ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
1715 (rp->typedata.swallow)) && 1814 (rp->typedata.swallow)) &&
1716 (rp->typedata.swallow->swallowed_object)) 1815 (rp->typedata.swallow->swallowed_object))
1717 edje_object_size_class_del(rp->typedata.swallow->swallowed_object, size_class); 1816 efl_gfx_size_class_del(rp->typedata.swallow->swallowed_object, size_class);
1718 } 1817 }
1719 1818
1720 efl_observable_observers_update(_edje_size_class_member, size_class, NULL); 1819 efl_observable_observers_update(_edje_size_class_member, size_class, NULL);
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index e4c76495fe..32b43717b5 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -124,6 +124,9 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
124#include "interfaces/efl_gfx_gradient_radial.eo.h" 124#include "interfaces/efl_gfx_gradient_radial.eo.h"
125#include "interfaces/efl_gfx_filter.eo.h" 125#include "interfaces/efl_gfx_filter.eo.h"
126#include "interfaces/efl_gfx_size_hint.eo.h" 126#include "interfaces/efl_gfx_size_hint.eo.h"
127#include "interfaces/efl_gfx_color_class.eo.h"
128#include "interfaces/efl_gfx_text_class.eo.h"
129#include "interfaces/efl_gfx_size_class.eo.h"
127 130
128/* Input events */ 131/* Input events */
129#include "interfaces/efl_input_types.eot.h" 132#include "interfaces/efl_input_types.eot.h"
diff --git a/src/lib/efl/interfaces/efl_gfx_color_class.eo b/src/lib/efl/interfaces/efl_gfx_color_class.eo
new file mode 100644
index 0000000000..0f9b89badc
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_gfx_color_class.eo
@@ -0,0 +1,85 @@
1import efl_gfx_types;
2
3interface Efl.Gfx.Color_Class
4{
5 methods {
6 @property color_class {
7 set {
8 [[Set the color of color class.
9
10 This function sets the color values for a color class. This will
11 cause all edje parts in the specified object that have the specified
12 color class to have their colors multiplied by these values.
13
14 The first color is the object, the second is the text outline, and
15 the third is the text shadow. (Note that the second two only apply
16 to text parts).
17
18 Setting color emits a signal "color_class,set" with source being
19 the given color.
20
21 Note: These color values are expected to be premultiplied by \@p a.]]
22 return: bool;
23 }
24 get {
25 [[Get the color of color class.
26
27 This function gets the color values for a color class. If no explicit
28 object color is set, then global values will be used.
29
30 The first color is the object, the second is the text outline, and
31 the third is the text shadow. (Note that the second two only apply
32 to text parts).
33
34 Note: These color values are expected to be premultiplied by \@p a.]]
35 return: bool;
36 }
37 keys {
38 color_class: string; [[The name of color class]]
39 layer: Efl.Gfx.Color_Class.Layer @optional; [[The layer to set the color]]
40 }
41 values {
42 r: int; [[The intensity of the red color]]
43 g: int; [[The intensity of the green color]]
44 b: int; [[The intensity of the blue color]]
45 a: int; [[The alpha value]]
46 }
47 }
48 @property color_class_description {
49 get {
50 [[Get the description of a color class.
51
52 This function gets the description of a color class in use by an object.]]
53 }
54 keys {
55 color_class: string; [[The name of color class]]
56 }
57 values {
58 description: string; [[The description of the target color class or $null if not found]]
59 }
60 }
61 color_class_del {
62 [[Delete the color class.
63
64 This function deletes any values for the specified color class.
65
66 Deleting the color class will revert it to the values defined
67 by @.color_class.set() or the color class defined in the theme file.
68
69 Deleting the color class will emit the signal "color_class,del"
70 for the given Edje object.]]
71 params {
72 @in color_class: string; [[The name of color_class]]
73 }
74 }
75 color_class_clear {
76 [[Delete all color classes defined in object level.
77
78 This function deletes any color classes defined in object level.
79 Clearing color classes will revert the color of all edje parts to
80 the values defined in global level or theme file.
81
82 @since 1.17.0]]
83 }
84 }
85}
diff --git a/src/lib/efl/interfaces/efl_gfx_size_class.eo b/src/lib/efl/interfaces/efl_gfx_size_class.eo
new file mode 100644
index 0000000000..1fa3dad5da
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_gfx_size_class.eo
@@ -0,0 +1,49 @@
1interface Efl.Gfx.Size_Class
2{
3 methods {
4 @property size_class {
5 set {
6 [[Set width and height of size class.
7
8 This function sets width and height for a size class.
9 This will make all edje parts in the specified object that have
10 the specified size class update their size with given values.
11
12 @since 1.17]]
13 return: bool; [[$true, on success or $false, on error]]
14 }
15 get {
16 [[Get width and height of size class.
17
18 This function gets width and height for a size class.
19 These values will only be valid until the size class is changed
20 or the edje object is deleted.
21
22 @since 1.17]]
23 return: bool; [[$true, on success or $false, on error]]
24 }
25 keys {
26 size_class: string; [[The name of size class]]
27 }
28 values {
29 minw: int; [[minimum width]]
30 minh: int; [[minimum height]]
31 maxw: int; [[maximum width]]
32 maxh: int; [[maximum height]]
33 }
34 }
35 size_class_del {
36 [[Delete the size class.
37
38 This function deletes any values for the specified size class.
39
40 Deleting the size class will revert it to the values defined
41 by @.size_class.set() or the size class defined in the theme file.
42
43 @since 1.17]]
44 params {
45 @in size_class: string; [[The size class to be deleted.]]
46 }
47 }
48 }
49}
diff --git a/src/lib/efl/interfaces/efl_gfx_text_class.eo b/src/lib/efl/interfaces/efl_gfx_text_class.eo
new file mode 100644
index 0000000000..481202403d
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_gfx_text_class.eo
@@ -0,0 +1,43 @@
1import efl_gfx_types;
2
3interface Efl.Gfx.Text_Class
4{
5 methods {
6 @property text_class {
7 set {
8 [[Set Edje text class.
9
10 This function sets the text class for the Edje.]]
11 return: bool; [[$true, on success or $false, on error]]
12 }
13 get {
14 [[Get font and font size from edje text class.
15
16 This function gets the font and the font size from text class.
17 The font string will only be valid until the text class is changed
18 or the edje object is deleted.]]
19 return: bool; [[$true, on success or $false, on error]]
20 }
21 keys {
22 text_class: string; [[The text class name]]
23 }
24 values {
25 font: string; [[Font name]]
26 size: Efl.Font.Size; [[Font Size]]
27 }
28 }
29 text_class_del {
30 [[Delete the text class.
31
32 This function deletes any values for the specified text class.
33
34 Deleting the text class will revert it to the values defined
35 by @.text_class.set() or the text class defined in the theme file.
36
37 @since 1.17]]
38 params {
39 @in text_class: string; [[The text class to be deleted.]]
40 }
41 }
42 }
43}
diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot
index 1250d43130..58ccdfca49 100644
--- a/src/lib/efl/interfaces/efl_gfx_types.eot
+++ b/src/lib/efl/interfaces/efl_gfx_types.eot
@@ -196,3 +196,11 @@ enum Efl.Image.Load.Error
196 unknown_collection = 9, [[(Edje only) The group/collection set to load from was not found in the file]] 196 unknown_collection = 9, [[(Edje only) The group/collection set to load from was not found in the file]]
197 recursive_reference = 10 [[(Edje only) The group/collection set to load from had recursive references on its components]] 197 recursive_reference = 10 [[(Edje only) The group/collection set to load from had recursive references on its components]]
198} 198}
199
200enum Efl.Gfx.Color_Class.Layer {
201 normal = 0, [[Default color]]
202 outline, [[Outline color]]
203 shadow [[Shadow color]]
204}
205
206type Efl.Font.Size: int; [[Efl font size type]]
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index 778108e699..30769e6433 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -26,6 +26,10 @@
26#include "interfaces/efl_gfx_fill.eo.c" 26#include "interfaces/efl_gfx_fill.eo.c"
27#include "interfaces/efl_gfx_view.eo.c" 27#include "interfaces/efl_gfx_view.eo.c"
28 28
29#include "interfaces/efl_gfx_color_class.eo.c"
30#include "interfaces/efl_gfx_text_class.eo.c"
31#include "interfaces/efl_gfx_size_class.eo.c"
32
29#include "interfaces/efl_gfx_gradient.eo.c" 33#include "interfaces/efl_gfx_gradient.eo.c"
30#include "interfaces/efl_gfx_gradient_linear.eo.c" 34#include "interfaces/efl_gfx_gradient_linear.eo.c"
31#include "interfaces/efl_gfx_gradient_radial.eo.c" 35#include "interfaces/efl_gfx_gradient_radial.eo.c"
diff --git a/src/lib/efl/interfaces/efl_text_properties.eo b/src/lib/efl/interfaces/efl_text_properties.eo
index 3383fa444f..1d755761ed 100644
--- a/src/lib/efl/interfaces/efl_text_properties.eo
+++ b/src/lib/efl/interfaces/efl_text_properties.eo
@@ -1,4 +1,4 @@
1type Efl_Font_Size: int; [[Efl font size type]] 1import efl_gfx_types;
2 2
3interface Efl.Text.Properties 3interface Efl.Text.Properties
4{ 4{
@@ -31,7 +31,7 @@ interface Efl.Text.Properties
31 } 31 }
32 values { 32 values {
33 font: string; [[The font family name or filename.]] 33 font: string; [[The font family name or filename.]]
34 size: Efl_Font_Size; [[The font size, in points.]] 34 size: Efl.Font.Size; [[The font size, in points.]]
35 } 35 }
36 } 36 }
37 @property font_source { 37 @property font_source {