Macros
Text Object Functions

Functions that operate on single line, single style text objects. More...

Macros

#define EVAS_TEXT_STYLE_MASK_BASIC   0xf
 
#define EVAS_TEXT_STYLE_BASIC_SET(x, s)   do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0)
 Text style type creation macro. More...
 
#define EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION   (0x7 << 4)
 
#define EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(x, s)   do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0)
 Text style type creation macro. More...
 
Evas_Objectevas_object_text_add (Evas *e)
 Creates a new text object on the provided canvas. More...
 

Detailed Description

Functions that operate on single line, single style text objects.

For multiline and multiple style text, see Textblock Object Functions.

See some examples on this group of functions.

Warning
We don't guarantee any proper results if you create a Text object without setting the evas engine.

Macro Definition Documentation

◆ EVAS_TEXT_STYLE_BASIC_SET

#define EVAS_TEXT_STYLE_BASIC_SET (   x,
 
)    do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0)

Text style type creation macro.

Use style types on the 's' arguments, being 'x' your style variable.

◆ EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET

#define EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET (   x,
 
)    do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0)

Text style type creation macro.

This one will impose shadow directions on the style type variable – use the EVAS_TEXT_STYLE_SHADOW_DIRECTION_* values on 's', incrementally.

Function Documentation

◆ evas_object_text_add()

Evas_Object* evas_object_text_add ( Evas e)

Creates a new text object on the provided canvas.

Parameters
eThe canvas to create the text object on.
Returns
NULL on error, a pointer to a new text object on success.

Text objects are for simple, single line text elements. If you want more elaborated text blocks, see Textblock Object Functions.

See also
evas_object_text_font_source_set()
evas_object_text_font_set()
evas_object_text_text_set()

References efl_add, efl_isa(), EINA_SAFETY_ON_FALSE_RETURN_VAL, and EVAS_CANVAS_CLASS.

Referenced by edje_edit_part_name_set().