Tizen Native API
4.0
|
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.
Defines | |
#define | EVAS_TEXT_STYLE_BASIC_SET(x, s) do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0) |
#define | EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(x, s) do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0) |
Define Documentation
#define EVAS_TEXT_STYLE_BASIC_SET | ( | x, | |
s | |||
) | 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.
#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. 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* evas_object_text_add | ( | Evas * | e | ) |
Creates a new text object on the provided canvas.
- Parameters:
-
e The 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.
- Since :
- 2.3.1
- Examples:
- ecore_evas_window_sizes_example.c, eina_tiler_01.c, and evas-text.c.
Eina_Bool evas_object_text_ellipsis_status_get | ( | const Evas_Object * | eo_obj | ) |
TIZEN_ONLY(20160920): Add fade_ellipsis feature to TEXTBLOCK, TEXT part.
EINA_DEPRECATED void evas_object_text_filter_program_set | ( | Eo * | obj, |
const char * | code | ||
) |
Set an evas filter program on this object.
Valid for Text objects at the moment.
The argument passed to this function is a string containing a valid Lua program based on the filters API as described in the "Evas filters reference" page.
Set to null to disable filtering.
- Parameters:
-
[in] code filter program source code
- Since :
- 2.3.1
- Deprecated:
- Deprecated since Tizen 2.4
EINA_DEPRECATED void evas_object_text_filter_source_set | ( | Eo * | obj, |
const char * | name, | ||
Evas_Object * | eo_source | ||
) |
Bind an object to use as a mask or texture with Evas Filters.
This will create automatically a new RGBA buffer containing the source object's pixels (as it is rendered).
- Parameters:
-
[in] buffer name as used in the program [in] source object to use as a proxy source
- Since :
- 2.3.1
- Deprecated:
- Deprecated since Tizen 2.4
void evas_object_text_font_get | ( | const Eo * | obj, |
const char ** | font, | ||
Evas_Font_Size * | size | ||
) |
Retrieve the font family and size in use on a given text object.
This function allows the font name and size of a text object to be queried. Be aware that the font name string is still owned by Evas and should not have free() called on it by the caller of the function.
- See also:
- evas_object_text_font_set()
- Parameters:
-
[out] font The font family name or filename. [out] size The font size, in points.
- Since :
- 2.3.1
- Examples:
- evas-text.c.
void evas_object_text_font_set | ( | Eo * | obj, |
const char * | font, | ||
Evas_Font_Size | size | ||
) |
Set the font family or filename, and size on a given text object.
This function allows the font name and size of a text object to be set. The font
string has to follow fontconfig's convention on naming fonts, as it's the underlying library used to query system fonts by Evas (see the fc-list
command's output, on your system, to get an idea). Alternatively, one can use a full path to a font file.
- Parameters:
-
[in] font The font family name or filename. [in] size The font size, in points.
- Since :
- 2.3.1
- Examples:
- ecore_evas_window_sizes_example.c, eina_tiler_01.c, and evas-text.c.
const char* evas_object_text_font_source_get | ( | const Eo * | obj | ) |
Get the font file's path which is being used on a given text object.
- Returns:
- The font file's path.
- See also:
- evas_object_text_font_get() for more details
- Since :
- 2.3.1
void evas_object_text_font_source_set | ( | Eo * | obj, |
const char * | font_source | ||
) |
Set the font (source) file to be used on a given text object.
This function allows the font file to be explicitly set for a given text object, overriding system lookup, which will first occur in the given file's contents.
- See also:
- evas_object_text_font_get()
- Parameters:
-
[in] font_source The font file's path.
- Since :
- 2.3.1
const char* evas_object_text_text_get | ( | const Eo * | obj | ) |
Retrieves the text string currently being displayed by the given text object.
- Returns:
- The text string currently being displayed on it.
- Note:
- Do not free() the return value.
- See also:
- evas_object_text_text_set()
- Since :
- 2.3.1
void evas_object_text_text_set | ( | Eo * | obj, |
const char * | text | ||
) |
Sets the text string to be displayed by the given text object.
- See also:
- evas_object_text_text_get()
- Parameters:
-
[in] text Text string to display on it.
- Since :
- 2.3.1
- Examples:
- ecore_evas_window_sizes_example.c, eina_tiler_01.c, and evas-text.c.