Tizen Native API
|
Functions | |
void | evas_object_text_shadow_color_set (Evas_Text *obj, int r, int g, int b, int a) |
Sets the shadow color for the given text object. | |
void | evas_object_text_shadow_color_get (const Evas_Text *obj, int *r, int *g, int *b, int *a) |
Retrieves the shadow color for the given text object. | |
void | evas_object_text_ellipsis_set (Evas_Text *obj, double ellipsis) |
Sets the ellipsis that should be used for the text object. | |
double | evas_object_text_ellipsis_get (const Evas_Text *obj) |
Gets the ellipsis currently set on the text object. | |
void | evas_object_text_bidi_delimiters_set (Evas_Text *obj, const char *delim) |
Sets the BiDi delimiters used in the textblock. | |
const char * | evas_object_text_bidi_delimiters_get (const Evas_Text *obj) |
Gets the BiDi delimiters used in the textblock. | |
void | evas_object_text_outline_color_set (Evas_Text *obj, int r, int g, int b, int a) |
Sets the outline color for the given text object. | |
void | evas_object_text_outline_color_get (const Evas_Text *obj, int *r, int *g, int *b, int *a) |
Retrieves the outline color for the given text object. | |
void | evas_object_text_glow2_color_set (Evas_Text *obj, int r, int g, int b, int a) |
Sets the 'glow 2' color for the given text object. | |
void | evas_object_text_glow2_color_get (const Evas_Text *obj, int *r, int *g, int *b, int *a) |
Retrieves the 'glow 2' color for the given text object. | |
void | evas_object_text_style_set (Evas_Text *obj, Evas_Text_Style_Type style) |
Sets the style to apply on the given text object. | |
Evas_Text_Style_Type | evas_object_text_style_get (const Evas_Text *obj) |
Retrieves the style on use on the given text object. | |
void | evas_object_text_glow_color_set (Evas_Text *obj, int r, int g, int b, int a) |
Sets the glow color for the given text object. | |
void | evas_object_text_glow_color_get (const Evas_Text *obj, int *r, int *g, int *b, int *a) |
Retrieves the glow color for the given text object. | |
void | evas_object_text_filter_program_set (Evas_Text *obj, const char *program) |
Set an Evas filter program on this Text Object. | |
void | evas_object_text_filter_source_set (Evas_Text *obj, const char *name, Eo *eobj) |
Bind an object to use as a mask or texture with Evas Filters. | |
void | evas_object_text_style_pad_get (const Evas_Text *obj, int *l, int *r, int *t, int *b) |
Gets the text style pad of a text object. | |
Evas_BiDi_Direction | evas_object_text_direction_get (const Evas_Text *obj) |
Retrieves the direction of the text currently being displayed in the text object. | |
int | evas_object_text_last_up_to_pos (const Evas_Text *obj, Evas_Coord x, Evas_Coord y) |
Returns the logical position of the last char in the text up to the pos given. this is NOT the position of the last char because of the possibility of RTL in the text. | |
Eina_Bool | evas_object_text_char_pos_get (const Evas_Text *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) |
Retrieve position and dimension information of a character within a text Evas_Object . | |
Evas_Object * | evas_object_text_add (Evas *e) |
Creates a new text object on the provided canvas. | |
void | evas_object_text_text_set (Eo *obj, const char *text) |
Sets the text string to be displayed by the given text object. | |
const char * | evas_object_text_text_get (const Eo *obj) |
Retrieves the text string currently being displayed by the given text object. | |
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. | |
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. | |
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. | |
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. | |
Typedefs | |
typedef enum _Evas_Text_Style_Type | Evas_Text_Style_Type |
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) |
Functions that operate on single line, single style text objects.
For multiline and multiple style text, see Textblock Object Functions.
See some Evas text object example 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.
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.
Typedef Documentation
Types of styles to be applied on text objects. The EVAS_TEXT_STYLE_SHADOW_DIRECTION_*
ones are to be ORed together with others imposing shadow, to change shadow's direction
Enumeration Type Documentation
- Enumerator:
Function Documentation
Evas_Object* evas_object_text_add | ( | Evas * | e | ) |
Creates a new text object on the provided canvas.
- Since :
- 2.3
- Parameters:
-
[in] e The canvas to create the text object on.
- Returns:
NULL
on error, a pointer to a new text object on success.
- Remarks:
- Text objects are for simple, single line text elements. If you want more elaborated text blocks, see Textblock Object Functions.
const char* evas_object_text_bidi_delimiters_get | ( | const Evas_Text * | obj | ) |
Gets the BiDi delimiters used in the textblock.
- Since :
- 2.3
- Remarks:
- BiDi delimiters are use for in-paragraph separation of bidi segments. This is useful for example in recipients fields of e-mail clients where bidi oddities can occur when mixing RTL and LTR.
- Returns:
- A null terminated string of delimiters, e.g ",|". If empty, returns NULL.
- Since (EFL) :
- 1.1
- Parameters:
-
[in] obj The text object
void evas_object_text_bidi_delimiters_set | ( | Evas_Text * | obj, |
const char * | delim | ||
) |
Sets the BiDi delimiters used in the textblock.
- Since :
- 2.3
- Remarks:
- BiDi delimiters are use for in-paragraph separation of bidi segments. This is useful for example in recipients fields of e-mail clients where bidi oddities can occur when mixing RTL and LTR.
- Since (EFL) :
- 1.1
- Parameters:
-
[in] obj The text object [in] delim A null terminated string of delimiters, e.g ",|".
Eina_Bool evas_object_text_char_pos_get | ( | const Evas_Text * | obj, |
int | pos, | ||
Evas_Coord * | cx, | ||
Evas_Coord * | cy, | ||
Evas_Coord * | cw, | ||
Evas_Coord * | ch | ||
) |
Retrieve position and dimension information of a character within a text Evas_Object
.
- Since :
- 2.3
- Remarks:
- This function is used to obtain the X, Y, width and height of the character located at
pos
within theEvas_Object
obj
.obj
must be a text object as created with evas_object_text_add(). Any of theEvas_Coord
parameters (cx
,cy
,cw
,ch
) may beNULL
in which case no value will be assigned to that parameter.
- Returns:
EINA_FALSE
on success,EINA_TRUE
on error.
- Parameters:
-
[in] obj The text object [in] pos The character position to request co-ordinates for. [out] cx A pointer to an Evas_Coord
to store the X value in (can be NULL).[out] cy A pointer to an Evas_Coord
to store the Y value in (can be NULL).[out] cw A pointer to an Evas_Coord
to store the Width value in (can be NULL).[out] ch A pointer to an Evas_Coord
to store the Height value in (can be NULL).
Evas_BiDi_Direction evas_object_text_direction_get | ( | const Evas_Text * | obj | ) |
Retrieves the direction of the text currently being displayed in the text object.
- Since :
- 2.3
- Returns:
- the direction of the text
- Parameters:
-
[in] obj The text object
double evas_object_text_ellipsis_get | ( | const Evas_Text * | obj | ) |
Gets the ellipsis currently set on the text object.
- Since :
- 2.3
- Returns:
- The ellipsis set on the text object. The ellipsis is -1.0.
- See also:
- evas_object_text_ellipsis_set.
- Since (EFL) :
- 1.8
- Parameters:
-
[in] obj The text object
void evas_object_text_ellipsis_set | ( | Evas_Text * | obj, |
double | ellipsis | ||
) |
Sets the ellipsis that should be used for the text object.
- Since :
- 2.3
- Remarks:
- This is a value between 0.0 and 1.0 indicating the position of the text to be shown. 0.0 means the start will be shown and the end trimmed, 1.0 means the beginning will be trimmed and the end will be shown, and any value in between will cause ellipsis to be added in both end of the text and the requested part to be shown. -1.0 means ellipsis is turned off.
- Since (EFL) :
- 1.8
- Parameters:
-
[in] obj The text object [in] ellipsis the ellipsis.
void evas_object_text_filter_program_set | ( | Evas_Text * | obj, |
const char * | program | ||
) |
Set an Evas filter program on this Text Object.
- Deprecated:
- Deprecated since Tizen 2.4
- Since :
- 2.3
- Remarks:
- If the program fails to compile (syntax error, invalid buffer name, etc...), the standard text effects will be applied instead (SHADOW, etc...). switch back to the standard text effects.
- Since (EFL) :
- 1.9
- Remarks:
- EXPERIMENTAL FEATURE. This is an unstable API, please use only for testing purposes.
- See also:
- Evas filters reference
- Parameters:
-
[in] obj The text object [in] program The program code, as defined by the Evas filters script language. Pass NULL to remove the former program and switch back to the standard text effect
void evas_object_text_filter_source_set | ( | Evas_Text * | obj, |
const char * | name, | ||
Eo * | eobj | ||
) |
Bind an object to use as a mask or texture with Evas Filters.
- Deprecated:
- Deprecated since Tizen 2.4
- Since :
- 2.3
- Remarks:
- This will create automatically a new RGBA buffer containing the source object's pixels (as it is rendered).
- Since (EFL) :
- 1.9
- Remarks:
- EXPERIMENTAL FEATURE. This is an unstable API, please use only for testing purposes.
- See also:
- Evas filters reference
- Parameters:
-
[in] obj The text object [in] name Object name as used in the program code [in] eobj Eo object to use through proxy rendering
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.
- Since :
- 2.3
- Remarks:
- 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.
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.
- Since :
- 2.3
- Remarks:
- 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 thefc-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.
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.
- Since :
- 2.3
- Returns:
- The font file's path.
- See also:
- evas_object_text_font_get() for more details
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.
- Since :
- 2.3
- Remarks:
- 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.
void evas_object_text_glow2_color_get | ( | const Evas_Text * | obj, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Retrieves the 'glow 2' color for the given text object.
- Since :
- 2.3
- Remarks:
- Use
NULL
pointers on the color components you're not interested in: they'll be ignored by the function.
- See also:
- evas_object_text_glow2_color_set() for more details.
- Parameters:
-
[in] obj The text object [out] r The red component of the given color. [out] g The green component of the given color. [out] b The blue component of the given color. [out] a The alpha component of the given color.
void evas_object_text_glow2_color_set | ( | Evas_Text * | obj, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Sets the 'glow 2' color for the given text object.
- Since :
- 2.3
- Remarks:
- 'Glow 2' effects, which are glowing colors decorating the text's (immediate) surroundings, will just be shown if the object is set to the EVAS_TEXT_STYLE_GLOW style. See also evas_object_text_glow_color_set().
- See also:
- evas_object_text_glow2_color_get()
- Parameters:
-
[in] obj The text object [in] r The red component of the given color. [in] g The green component of the given color. [in] b The blue component of the given color. [in] a The alpha component of the given color.
void evas_object_text_glow_color_get | ( | const Evas_Text * | obj, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Retrieves the glow color for the given text object.
- Since :
- 2.3
- Remarks:
- Use
NULL
pointers on the color components you're not interested in: they'll be ignored by the function.
- See also:
- evas_object_text_glow_color_set() for more details.
- Parameters:
-
[in] obj The text object [out] r The red component of the given color. [out] g The green component of the given color. [out] b The blue component of the given color. [out] a The alpha component of the given color.
void evas_object_text_glow_color_set | ( | Evas_Text * | obj, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Sets the glow color for the given text object.
- Since :
- 2.3
- Remarks:
- Glow effects, which are glowing colors decorating the text's surroundings, will just be shown if the object is set to the EVAS_TEXT_STYLE_GLOW style.
- Glow effects are placed from a short distance of the text itself, but no touching it. For glowing effects right on the borders of the glyphs, see 'glow 2' effects (evas_object_text_glow2_color_set()).
- See also:
- evas_object_text_glow_color_get()
- Parameters:
-
[in] obj The text object [in] r The red component of the given color. [in] g The green component of the given color. [in] b The blue component of the given color. [in] a The alpha component of the given color.
int evas_object_text_last_up_to_pos | ( | const Evas_Text * | obj, |
Evas_Coord | x, | ||
Evas_Coord | y | ||
) |
Returns the logical position of the last char in the text up to the pos given. this is NOT the position of the last char because of the possibility of RTL in the text.
- Since :
- 2.3
- Parameters:
-
[in] obj The text object [in] x in [in] y in
void evas_object_text_outline_color_get | ( | const Evas_Text * | obj, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Retrieves the outline color for the given text object.
- Since :
- 2.3
- Remarks:
- Use
NULL
pointers on the color components you're not interested in: they'll be ignored by the function.
- See also:
- evas_object_text_outline_color_set() for more details.
- Parameters:
-
[in] obj The text object [out] r The red component of the given color. [out] g The green component of the given color. [out] b The blue component of the given color. [out] a The alpha component of the given color.
void evas_object_text_outline_color_set | ( | Evas_Text * | obj, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Sets the outline color for the given text object.
- Since :
- 2.3
- Remarks:
- Outline effects (colored lines around text glyphs) will just be shown if the object is set to one of the following styles:
- See also:
- evas_object_text_outline_color_get()
- Parameters:
-
[in] obj The text object [in] r The red component of the given color. [in] g The green component of the given color. [in] b The blue component of the given color. [in] a The alpha component of the given color.
void evas_object_text_shadow_color_get | ( | const Evas_Text * | obj, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Retrieves the shadow color for the given text object.
- Since :
- 2.3
- Remarks:
- Use
NULL
pointers on the color components you're not interested in: they'll be ignored by the function.
- See also:
- evas_object_text_shadow_color_set() for more details.
- Parameters:
-
[in] obj The text object [out] r The red component of the given color. [out] g The green component of the given color. [out] b The blue component of the given color. [out] a The alpha component of the given color.
void evas_object_text_shadow_color_set | ( | Evas_Text * | obj, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Sets the shadow color for the given text object.
- Since :
- 2.3
- Remarks:
- Shadow effects, which are fading colors decorating the text underneath it, will just be shown if the object is set to one of the following styles:
- EVAS_TEXT_STYLE_SHADOW
- EVAS_TEXT_STYLE_OUTLINE_SHADOW
- EVAS_TEXT_STYLE_FAR_SHADOW
- EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW
- EVAS_TEXT_STYLE_SOFT_SHADOW
- EVAS_TEXT_STYLE_FAR_SOFT_SHADOW
- Remarks:
- One can also change the direction where the shadow grows to, with evas_object_text_style_set().
- See also:
- evas_object_text_shadow_color_get()
- Parameters:
-
[in] obj The text object [in] r The red component of the given color. [in] g The green component of the given color. [in] b The blue component of the given color. [in] a The alpha component of the given color.
Evas_Text_Style_Type evas_object_text_style_get | ( | const Evas_Text * | obj | ) |
Retrieves the style on use on the given text object.
- Since :
- 2.3
- Returns:
- the style type in use.
- See also:
- evas_object_text_style_set() for more details.
- Parameters:
-
[in] obj The text object
void evas_object_text_style_pad_get | ( | const Evas_Text * | obj, |
int * | l, | ||
int * | r, | ||
int * | t, | ||
int * | b | ||
) |
Gets the text style pad of a text object.
- Since :
- 2.3
- Parameters:
-
[in] obj The text object [out] l The left pad (or NULL
).[out] r The right pad (or NULL
).[out] t The top pad (or NULL
).[out] b The bottom pad (or NULL
).
void evas_object_text_style_set | ( | Evas_Text * | obj, |
Evas_Text_Style_Type | style | ||
) |
Sets the style to apply on the given text object.
- Since :
- 2.3
- Remarks:
- Text object styles are one of the values in Evas_Text_Style_Type. Some of those values are combinations of more than one style, and some account for the direction of the rendering of shadow effects.
- One may use the helper macros EVAS_TEXT_STYLE_BASIC_SET and EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value.
- The following figure illustrates the text styles:
- See also:
- evas_object_text_style_get()
- evas_object_text_shadow_color_set()
- evas_object_text_outline_color_set()
- evas_object_text_glow_color_set()
- evas_object_text_glow2_color_set()
- Parameters:
-
[in] obj The text object [in] style a style type.
const char* evas_object_text_text_get | ( | const Eo * | obj | ) |
Retrieves the text string currently being displayed by the given text object.
- Since :
- 2.3
- Returns:
- The text string currently being displayed on it.
- Remarks:
- Do not free() the return value.
- See also:
- evas_object_text_text_set()
void evas_object_text_text_set | ( | Eo * | obj, |
const char * | text | ||
) |
Sets the text string to be displayed by the given text object.
- Since :
- 2.3
- See also:
- evas_object_text_text_get()
- Parameters:
-
[in] text Text string to display on it.