summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_text_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_text_eo.h')
-rw-r--r--src/lib/evas/canvas/evas_text_eo.h462
1 files changed, 462 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_text_eo.h b/src/lib/evas/canvas/evas_text_eo.h
new file mode 100644
index 0000000..93ce36e
--- /dev/null
+++ b/src/lib/evas/canvas/evas_text_eo.h
@@ -0,0 +1,462 @@
1#ifndef _EVAS_TEXT_EO_H_
2#define _EVAS_TEXT_EO_H_
3
4#ifndef _EVAS_TEXT_EO_CLASS_TYPE
5#define _EVAS_TEXT_EO_CLASS_TYPE
6
7typedef Eo Evas_Text;
8
9#endif
10
11#ifndef _EVAS_TEXT_EO_TYPES
12#define _EVAS_TEXT_EO_TYPES
13
14
15#endif
16/** Evas text class
17 *
18 * @ingroup Evas_Text
19 */
20#define EVAS_TEXT_CLASS evas_text_class_get()
21
22EWAPI const Efl_Class *evas_text_class_get(void);
23
24/**
25 * @brief Controls the shadow color for the given text object.
26 *
27 * Shadow effects are fading colors decorating the text underneath it. They
28 * will be shown if the object is set to one of the following styles:
29 *
30 * - @c EVAS_TEXT_STYLE_TYPE_SHADOW - @c EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW -
31 * @c EVAS_TEXT_STYLE_TYPE_FAR_SHADOW -
32 * @c EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW -
33 * @c EVAS_TEXT_STYLE_TYPE_SOFT_SHADOW -
34 * @c EVAS_TEXT_STYLE_TYPE_FAR_SOFT_SHADOW
35 *
36 * One can also change the direction where the shadow grows to, with
37 * @ref evas_obj_text_style_get
38 *
39 * See @ref evas_obj_text_shadow_color_get
40 *
41 * @param[in] obj The object.
42 * @param[in] r The red component of the given color.
43 * @param[in] g The green component of the given color.
44 * @param[in] b The blue component of the given color.
45 * @param[in] a The alpha component of the given color.
46 *
47 * @ingroup Evas_Text
48 */
49EOAPI void evas_obj_text_shadow_color_set(Eo *obj, int r, int g, int b, int a);
50
51/**
52 * @brief Controls the shadow color for the given text object.
53 *
54 * Shadow effects are fading colors decorating the text underneath it. They
55 * will be shown if the object is set to one of the following styles:
56 *
57 * - @c EVAS_TEXT_STYLE_TYPE_SHADOW - @c EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW -
58 * @c EVAS_TEXT_STYLE_TYPE_FAR_SHADOW -
59 * @c EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW -
60 * @c EVAS_TEXT_STYLE_TYPE_SOFT_SHADOW -
61 * @c EVAS_TEXT_STYLE_TYPE_FAR_SOFT_SHADOW
62 *
63 * One can also change the direction where the shadow grows to, with
64 * @ref evas_obj_text_style_get
65 *
66 * See @ref evas_obj_text_shadow_color_get
67 *
68 * @note Use @c NULL pointers on the color components you're not interested in:
69 * they'll be ignored by the function.
70 *
71 * @param[in] obj The object.
72 * @param[out] r The red component of the given color.
73 * @param[out] g The green component of the given color.
74 * @param[out] b The blue component of the given color.
75 * @param[out] a The alpha component of the given color.
76 *
77 * @ingroup Evas_Text
78 */
79EOAPI void evas_obj_text_shadow_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
80
81/**
82 * @brief Controls the ellipsis that should be used for the text object.
83 *
84 * This is a value between 0.0 and 1.0 indicating the position of the text to
85 * be shown. 0.0 means the start will be shown and the end trimmed, 1.0 means
86 * the beginning will be trimmed and the end will be shown, and any value in
87 * between will cause ellipsis to be added in both end of the text and the
88 * requested part to be shown. -1.0 means ellipsis is turned off.
89 *
90 * @param[in] obj The object.
91 * @param[in] ellipsis The ellipsis. Allowed values: -1.0 or 0.0-1.0
92 *
93 * @since 1.8
94 *
95 * @ingroup Evas_Text
96 */
97EOAPI void evas_obj_text_ellipsis_set(Eo *obj, double ellipsis);
98
99/**
100 * @brief Controls the ellipsis that should be used for the text object.
101 *
102 * This is a value between 0.0 and 1.0 indicating the position of the text to
103 * be shown. 0.0 means the start will be shown and the end trimmed, 1.0 means
104 * the beginning will be trimmed and the end will be shown, and any value in
105 * between will cause ellipsis to be added in both end of the text and the
106 * requested part to be shown. -1.0 means ellipsis is turned off.
107 *
108 * @param[in] obj The object.
109 *
110 * @return The ellipsis. Allowed values: -1.0 or 0.0-1.0
111 *
112 * @since 1.8
113 *
114 * @ingroup Evas_Text
115 */
116EOAPI double evas_obj_text_ellipsis_get(const Eo *obj);
117
118/**
119 * @brief Sets the BiDi delimiters used in the textblock.
120 *
121 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
122 * is useful for example in recipients fields of e-mail clients where bidi
123 * oddities can occur when mixing RTL and LTR.
124 *
125 * @param[in] obj The object.
126 * @param[in] delim A null terminated string of delimiters, e.g ",|".
127 *
128 * @since 1.1
129 *
130 * @ingroup Evas_Text
131 */
132EOAPI void evas_obj_text_bidi_delimiters_set(Eo *obj, const char *delim);
133
134/**
135 * @brief Sets the BiDi delimiters used in the textblock.
136 *
137 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
138 * is useful for example in recipients fields of e-mail clients where bidi
139 * oddities can occur when mixing RTL and LTR.
140 *
141 * @param[in] obj The object.
142 *
143 * @return A null terminated string of delimiters, e.g ",|".
144 *
145 * @since 1.1
146 *
147 * @ingroup Evas_Text
148 */
149EOAPI const char *evas_obj_text_bidi_delimiters_get(const Eo *obj);
150
151/**
152 * @brief Controls the outline color for the given text object.
153 *
154 * Outline effects (colored lines around text glyphs) will be shown if the
155 * object is set to one of the following styles: -
156 * @c EVAS_TEXT_STYLE_TYPE_OUTLINE - @c EVAS_TEXT_STYLE_TYPE_SOFT_OUTLINE -
157 * @c EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW -
158 * @c EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW
159 *
160 * @param[in] obj The object.
161 * @param[in] r The red component of the given color.
162 * @param[in] g The green component of the given color.
163 * @param[in] b The blue component of the given color.
164 * @param[in] a The alpha component of the given color.
165 *
166 * @ingroup Evas_Text
167 */
168EOAPI void evas_obj_text_outline_color_set(Eo *obj, int r, int g, int b, int a);
169
170/**
171 * @brief Controls the outline color for the given text object.
172 *
173 * Outline effects (colored lines around text glyphs) will be shown if the
174 * object is set to one of the following styles: -
175 * @c EVAS_TEXT_STYLE_TYPE_OUTLINE - @c EVAS_TEXT_STYLE_TYPE_SOFT_OUTLINE -
176 * @c EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW -
177 * @c EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW
178 *
179 * @param[in] obj The object.
180 * @param[out] r The red component of the given color.
181 * @param[out] g The green component of the given color.
182 * @param[out] b The blue component of the given color.
183 * @param[out] a The alpha component of the given color.
184 *
185 * @ingroup Evas_Text
186 */
187EOAPI void evas_obj_text_outline_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
188
189/**
190 * @brief Sets the 'glow 2' color for the given text object.
191 *
192 * 'Glow 2' effects are glowing colors decorating the text's (immediate)
193 * surroundings. They will be shown if the object is set to the
194 * @c EVAS_TEXT_STYLE_TYPE_GLOW style. See also
195 * @ref evas_obj_text_glow_color_get.
196 *
197 * @param[in] obj The object.
198 * @param[in] r The red component of the given color.
199 * @param[in] g The green component of the given color.
200 * @param[in] b The blue component of the given color.
201 * @param[in] a The alpha component of the given color.
202 *
203 * @ingroup Evas_Text
204 */
205EOAPI void evas_obj_text_glow2_color_set(Eo *obj, int r, int g, int b, int a);
206
207/**
208 * @brief Sets the 'glow 2' color for the given text object.
209 *
210 * 'Glow 2' effects are glowing colors decorating the text's (immediate)
211 * surroundings. They will be shown if the object is set to the
212 * @c EVAS_TEXT_STYLE_TYPE_GLOW style. See also
213 * @ref evas_obj_text_glow_color_get.
214 *
215 * @param[in] obj The object.
216 * @param[out] r The red component of the given color.
217 * @param[out] g The green component of the given color.
218 * @param[out] b The blue component of the given color.
219 * @param[out] a The alpha component of the given color.
220 *
221 * @ingroup Evas_Text
222 */
223EOAPI void evas_obj_text_glow2_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
224
225/**
226 * @brief Controls the style to apply on the given text object.
227 *
228 * Text object styles are one of the values in @ref Evas_Text_Style_Type Some
229 * of those values are combinations of more than one style, and some account
230 * for the direction of the rendering of shadow effects.
231 *
232 * @note One may use the helper macros #EVAS_TEXT_STYLE_BASIC_SET and
233 * #EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value.
234 *
235 * @param[in] obj The object.
236 * @param[in] style Style type
237 *
238 * @ingroup Evas_Text
239 */
240EOAPI void evas_obj_text_style_set(Eo *obj, Evas_Text_Style_Type style);
241
242/**
243 * @brief Controls the style to apply on the given text object.
244 *
245 * Text object styles are one of the values in @ref Evas_Text_Style_Type Some
246 * of those values are combinations of more than one style, and some account
247 * for the direction of the rendering of shadow effects.
248 *
249 * @note One may use the helper macros #EVAS_TEXT_STYLE_BASIC_SET and
250 * #EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value.
251 *
252 * @param[in] obj The object.
253 *
254 * @return Style type
255 *
256 * @ingroup Evas_Text
257 */
258EOAPI Evas_Text_Style_Type evas_obj_text_style_get(const Eo *obj);
259
260/**
261 * @brief Sets the glow color for the given text object.
262 *
263 * Glow effects are glowing colors decorating the text's surroundings. They
264 * will be shown if the object is set to the @c EVAS_TEXT_STYLE_TYPE_GLOW
265 * style.
266 *
267 * @note Glow effects are placed from a short distance of the text itself, but
268 * not touching it. For glowing effects right on the borders of the glyphs, see
269 * 'glow 2' effects.
270 *
271 * @param[in] obj The object.
272 * @param[in] r The red component of the given color.
273 * @param[in] g The green component of the given color.
274 * @param[in] b The blue component of the given color.
275 * @param[in] a The alpha component of the given color.
276 *
277 * @ingroup Evas_Text
278 */
279EOAPI void evas_obj_text_glow_color_set(Eo *obj, int r, int g, int b, int a);
280
281/**
282 * @brief Sets the glow color for the given text object.
283 *
284 * Glow effects are glowing colors decorating the text's surroundings. They
285 * will be shown if the object is set to the @c EVAS_TEXT_STYLE_TYPE_GLOW
286 * style.
287 *
288 * @note Glow effects are placed from a short distance of the text itself, but
289 * not touching it. For glowing effects right on the borders of the glyphs, see
290 * 'glow 2' effects.
291 *
292 * @param[in] obj The object.
293 * @param[out] r The red component of the given color.
294 * @param[out] g The green component of the given color.
295 * @param[out] b The blue component of the given color.
296 * @param[out] a The alpha component of the given color.
297 *
298 * @ingroup Evas_Text
299 */
300EOAPI void evas_obj_text_glow_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
301
302/**
303 * @brief Maximal descent property
304 *
305 * @param[in] obj The object.
306 *
307 * @return Evas coordinate
308 *
309 * @ingroup Evas_Text
310 */
311EOAPI int evas_obj_text_max_descent_get(const Eo *obj);
312
313/**
314 * @brief Gets the text style pad of a text object.
315 *
316 * @param[in] obj The object.
317 * @param[out] l The left pad (or @c NULL).
318 * @param[out] r The right pad (or @c NULL).
319 * @param[out] t The top pad (or @c NULL).
320 * @param[out] b The bottom pad (or @c NULL).
321 *
322 * @ingroup Evas_Text
323 */
324EOAPI void evas_obj_text_style_pad_get(const Eo *obj, int *l, int *r, int *t, int *b);
325
326/**
327 * @brief Retrieves the direction of the text currently being displayed in the
328 * text object.
329 *
330 * @param[in] obj The object.
331 *
332 * @return Bidirectional type
333 *
334 * @ingroup Evas_Text
335 */
336EOAPI Efl_Text_Bidirectional_Type evas_obj_text_direction_get(const Eo *obj);
337
338/**
339 * @brief Ascent property
340 *
341 * @param[in] obj The object.
342 *
343 * @return Evas coordinate
344 *
345 * @ingroup Evas_Text
346 */
347EOAPI int evas_obj_text_ascent_get(const Eo *obj);
348
349/**
350 * @brief Horizontal advance property
351 *
352 * @param[in] obj The object.
353 *
354 * @return Evas coordinate
355 *
356 * @ingroup Evas_Text
357 */
358EOAPI int evas_obj_text_horiz_advance_get(const Eo *obj);
359
360/**
361 * @brief Inset property
362 *
363 * @param[in] obj The object.
364 *
365 * @return Evas coordinate
366 *
367 * @ingroup Evas_Text
368 */
369EOAPI int evas_obj_text_inset_get(const Eo *obj);
370
371/**
372 * @brief Maximal ascent property
373 *
374 * @param[in] obj The object.
375 *
376 * @return Evas coordinate
377 *
378 * @ingroup Evas_Text
379 */
380EOAPI int evas_obj_text_max_ascent_get(const Eo *obj);
381
382/**
383 * @brief Vertical advance property
384 *
385 * @param[in] obj The object.
386 *
387 * @return Evas coordinate
388 *
389 * @ingroup Evas_Text
390 */
391EOAPI int evas_obj_text_vert_advance_get(const Eo *obj);
392
393/**
394 * @brief descent property
395 *
396 * @param[in] obj The object.
397 *
398 * @return Evas coordinate
399 *
400 * @ingroup Evas_Text
401 */
402EOAPI int evas_obj_text_descent_get(const Eo *obj);
403
404/**
405 * @brief Returns the logical position of the last char in the text up to the
406 * pos given.
407 *
408 * This is NOT the position of the last char because of the possibility of RTL
409 * in the text.
410 *
411 * @param[in] obj The object.
412 * @param[in] x X coordinate
413 * @param[in] y Y coordinate
414 *
415 * @return Logical position of the last char
416 *
417 * @ingroup Evas_Text
418 */
419EOAPI int evas_obj_text_last_up_to_pos(const Eo *obj, int x, int y);
420
421/**
422 * @brief Get character coordinates
423 *
424 * @param[in] obj The object.
425 * @param[in] x X coordinate
426 * @param[in] y Y coordinate
427 * @param[out] cx X coordinate
428 * @param[out] cy Y coordinate
429 * @param[out] cw Width
430 * @param[out] ch Height
431 *
432 * @return Logical position of char
433 *
434 * @ingroup Evas_Text
435 */
436EOAPI int evas_obj_text_char_coords_get(const Eo *obj, int x, int y, int *cx, int *cy, int *cw, int *ch);
437
438/**
439 * @brief Retrieve position and dimension information of a character within a
440 * text @ref Efl_Canvas_Object
441 *
442 * This function is used to obtain the X, Y, width and height of the character
443 * located at @c pos within the @ref Efl_Canvas_Object @c obj. @c obj must be a
444 * text object Any of the @c Evas_Coord parameters ($cx, @c cy, @c cw, @c ch)
445 * may be @c NULL in which case no value will be assigned to that parameter.
446 *
447 * @param[in] obj The object.
448 * @param[in] pos The character position to request co-ordinates for.
449 * @param[out] cx A pointer to an int to store the X value in (can be NULL).
450 * @param[out] cy A pointer to an int to store the Y value in (can be NULL).
451 * @param[out] cw A pointer to an int to store the Width value in (can be
452 * NULL).
453 * @param[out] ch A pointer to an int to store the Height value in (can be
454 * NULL).
455 *
456 * @return @c false on success, @c true otherwise
457 *
458 * @ingroup Evas_Text
459 */
460EOAPI Eina_Bool evas_obj_text_char_pos_get(const Eo *obj, int pos, int *cx, int *cy, int *cw, int *ch);
461
462#endif