Tizen Native API
6.0
|
Textgrid objects manage chunks of text as a 2D grid of cells, each of which contains a single unicode character with color and style formatting information. The object's text can be interacted with character-by-character or by row.
- Since (EFL) :
- 1.7
Functions | |
void | evas_object_textgrid_supported_font_styles_set (Evas_Textgrid *obj, Evas_Textgrid_Font_Style styles) |
This function is not implemented yet, do not use. | |
Evas_Textgrid_Font_Style | evas_object_textgrid_supported_font_styles_get (const Evas_Textgrid *obj) |
This function is not implemented yet, do not use. | |
void | evas_object_textgrid_size_set (Evas_Textgrid *obj, int w, int h) |
Set the size of the textgrid object. | |
void | evas_object_textgrid_size_get (const Evas_Textgrid *obj, int *w, int *h) |
Get the size of the textgrid object. | |
void | evas_object_textgrid_cell_size_get (const Evas_Textgrid *obj, int *width, int *height) |
Retrieve the size of a cell of the given textgrid object in pixels. | |
void | evas_object_textgrid_update_add (Evas_Textgrid *obj, int x, int y, int w, int h) |
Indicate for evas that part of a textgrid region (cells) has been updated. | |
void | evas_object_textgrid_cellrow_set (Evas_Textgrid *obj, int y, const Evas_Textgrid_Cell *row) |
Set the string at the given row of the given textgrid object. | |
Evas_Textgrid_Cell * | evas_object_textgrid_cellrow_get (const Evas_Textgrid *obj, int y) |
Get the string at the given row of the given textgrid object. | |
void | evas_object_textgrid_palette_set (Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a) |
The set color to the given palette at the given index of the given textgrid object. | |
void | evas_object_textgrid_palette_get (const Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a) |
The retrieve color to the given palette at the given index of the given textgrid object. |
Function Documentation
void evas_object_textgrid_cell_size_get | ( | const Evas_Textgrid * | obj, |
int * | width, | ||
int * | height | ||
) |
Retrieve the size of a cell of the given textgrid object in pixels.
This functions retrieves the width and height, in pixels, of a cell of the textgrid object obj
and stores them respectively in the buffers width
and height
. Their values depend on the monospace font and style used for the textgrid object. width
and height
can be null
. On error, they are set to 0.
See also efl_text_font_size_set, efl_text_font_family_set and evas_object_textgrid_supported_font_styles_set
- Parameters:
-
[in] obj The object. [out] width A pointer to the location to store the cell's width in pixels. [out] height A pointer to the location to store the cell's height in pixels.
- Since (EFL) :
- 1.7
- Since :
- 3.0
Evas_Textgrid_Cell* evas_object_textgrid_cellrow_get | ( | const Evas_Textgrid * | obj, |
int | y | ||
) |
Get the string at the given row of the given textgrid object.
This function returns a pointer to the first cell of the line y
of the textgrid object obj
. If y
is not between 0 and the number of lines of the grid - 1, or on error, this function return null
.
See also evas_object_textgrid_cellrow_set, evas_object_textgrid_size_set and evas_object_textgrid_update_add.
- Parameters:
-
[in] obj The object. [in] y The row index of the grid.
- Returns:
- A pointer to the first cell of the given row.
- Since (EFL) :
- 1.7
- Since :
- 3.0
void evas_object_textgrid_cellrow_set | ( | Evas_Textgrid * | obj, |
int | y, | ||
const Evas_Textgrid_Cell * | row | ||
) |
Set the string at the given row of the given textgrid object.
This function returns cells to the textgrid taken by evas_object_textgrid_cellrow_get. The row pointer row
should be the same row pointer returned by evas_object_textgrid_cellrow_get for the same row y
.
See also evas_object_textgrid_cellrow_get, evas_object_textgrid_size_set and evas_object_textgrid_update_add.
- Parameters:
-
[in] obj The object. [in] y The row index of the grid. [in] row The string as a sequence of #Evas_Textgrid_Cell.
- Since (EFL) :
- 1.7
- Since :
- 3.0
void evas_object_textgrid_palette_get | ( | const Evas_Textgrid * | obj, |
Evas_Textgrid_Palette | pal, | ||
int | idx, | ||
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
The retrieve color to the given palette at the given index of the given textgrid object.
This function retrieves the color for the palette of type pal
at the index idx
of the textgrid object obj
. The ARGB components are stored in the buffers r
, g
, b
and a
. If idx
is not between 0 and the index of the latest set color, or if pal
is #EVAS_TEXTGRID_PALETTE_NONE or #EVAS_TEXTGRID_PALETTE_LAST, the values of the components are 0. r
, g
, b
and a
can be null
.
See also evas_object_textgrid_palette_set.
- Parameters:
-
[in] obj The object. [in] pal The type of the palette to set the color. [in] idx The index of the palette to which the color is stored. [out] r A pointer to the red component of the color. [out] g A pointer to the green component of the color. [out] b A pointer to the blue component of the color. [out] a A pointer to the alpha component of the color.
- Since (EFL) :
- 1.7
- Since :
- 3.0
void evas_object_textgrid_palette_set | ( | Evas_Textgrid * | obj, |
Evas_Textgrid_Palette | pal, | ||
int | idx, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
The set color to the given palette at the given index of the given textgrid object.
This function sets the color for the palette of type pal
at the index idx
of the textgrid object obj
. The ARGB components are given by r
, g
, b
and a
. This color can be used when setting the #Evas_Textgrid_Cell structure. The components must set a pre-multiplied color. If pal is #EVAS_TEXTGRID_PALETTE_NONE or #EVAS_TEXTGRID_PALETTE_LAST, or if idx
is not between 0 and 255, or on error, this function does nothing. The color components are clamped between 0 and 255. If idx
is greater than the latest set color, the colors between this last index and idx
- 1 are set to black (0, 0, 0, 0).
See also evas_object_textgrid_palette_get.
- Parameters:
-
[in] obj The object. [in] pal The type of the palette to set the color. [in] idx The index of the palette to which the color is stored. [in] r The red component of the color. [in] g The green component of the color. [in] b The blue component of the color. [in] a The alpha component of the color.
- Since (EFL) :
- 1.7
- Since :
- 3.0
void evas_object_textgrid_size_get | ( | const Evas_Textgrid * | obj, |
int * | w, | ||
int * | h | ||
) |
Get the size of the textgrid object.
This function retrieves the number of lines in the buffer h
and the number of columns in the buffer w
of the textgrid object obj
. w
or h
can be null
. On error, they are set to 0.
- Parameters:
-
[in] obj The object. [out] w The number of columns (width in cells) of the grid. [out] h The number of rows (height in cells) of the grid.
- Since (EFL) :
- 1.7
- Since :
- 3.0
void evas_object_textgrid_size_set | ( | Evas_Textgrid * | obj, |
int | w, | ||
int | h | ||
) |
Set the size of the textgrid object.
This function sets the number of lines h
and the number of columns w
for the textgrid object obj
. If w
or h
are less than or equal to 0, this function does nothing.
- Parameters:
-
[in] obj The object. [in] w The number of columns (width in cells) of the grid. [in] h The number of rows (height in cells) of the grid.
- Since (EFL) :
- 1.7
- Since :
- 3.0
Evas_Textgrid_Font_Style evas_object_textgrid_supported_font_styles_get | ( | const Evas_Textgrid * | obj | ) |
This function is not implemented yet, do not use.
- Parameters:
-
[in] obj The object.
- Returns:
- EVAS_TEXTGRID_FONT_STYLE_NORMAL
- Since :
- 3.0
void evas_object_textgrid_supported_font_styles_set | ( | Evas_Textgrid * | obj, |
Evas_Textgrid_Font_Style | styles | ||
) |
This function is not implemented yet, do not use.
- Parameters:
-
[in] obj The object. [in] styles EVAS_TEXTGRID_FONT_STYLE_NORMAL
- Since :
- 3.0
void evas_object_textgrid_update_add | ( | Evas_Textgrid * | obj, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Indicate for evas that part of a textgrid region (cells) has been updated.
This function declares to evas that a region of cells was updated by code and needs refreshing.
See also evas_object_textgrid_cellrow_set, evas_object_textgrid_cellrow_get and evas_object_textgrid_size_set.
- Parameters:
-
[in] obj The object. [in] x The rect region of cells top-left x (column). [in] y The rect region of cells top-left y (row). [in] w The rect region size in number of cells (columns). [in] h The rect region size in number of cells (rows).
- Since (EFL) :
- 1.7
- Since :
- 3.0