Data Structures | |
struct | _Evas_Textgrid_Cell |
The values that describes each cell. More... | |
Typedefs | |
typedef struct _Evas_Textgrid_Cell | Evas_Textgrid_Cell |
The values that describes each cell. More... | |
Enumerations | |
enum | Evas_Textgrid_Palette { EVAS_TEXTGRID_PALETTE_NONE, EVAS_TEXTGRID_PALETTE_STANDARD, EVAS_TEXTGRID_PALETTE_EXTENDED, EVAS_TEXTGRID_PALETTE_LAST } |
The palette to use for the forgraound and background colors. More... | |
enum | Evas_Textgrid_Font_Style { EVAS_TEXTGRID_FONT_STYLE_NORMAL = (1 << 0), EVAS_TEXTGRID_FONT_STYLE_BOLD = (1 << 1), EVAS_TEXTGRID_FONT_STYLE_ITALIC = (1 << 2) } |
The style to give to each character of the grid. More... | |
Functions | |
EAPI Evas_Object * | evas_object_textgrid_add (Evas *e) |
Add a textgrid to the given Evas. More... | |
EAPI void | evas_object_textgrid_size_set (Evas_Object *obj, int w, int h) |
Set the size of the textgrid object. More... | |
EAPI void | evas_object_textgrid_size_get (const Evas_Object *obj, int *w, int *h) |
Get the size of the textgrid object. More... | |
EAPI void | evas_object_textgrid_font_source_set (Evas_Object *obj, const char *font_source) |
Set the font (source) file to be used on a given textgrid object. More... | |
EAPI const char * | evas_object_textgrid_font_source_get (const Evas_Object *obj) |
Get the font file's path which is being used on a given textgrid object. More... | |
EAPI void | evas_object_textgrid_font_set (Evas_Object *obj, const char *font_name, Evas_Font_Size font_size) |
Set the font family and size on a given textgrid object. More... | |
EAPI void | evas_object_textgrid_font_get (const Evas_Object *obj, const char **font_name, Evas_Font_Size *font_size) |
Retrieve the font family and size in use on a given textgrid object. More... | |
EAPI void | evas_object_textgrid_cell_size_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) |
Retrieve the size of a cell of the given textgrid object in pixels. More... | |
EAPI void | evas_object_textgrid_palette_set (Evas_Object *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. More... | |
EAPI void | evas_object_textgrid_palette_get (const Evas_Object *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. More... | |
EAPI void | evas_object_textgrid_cellrow_set (Evas_Object *obj, int y, const Evas_Textgrid_Cell *row) |
Set the string at the given row of the given textgrid object. More... | |
EAPI Evas_Textgrid_Cell * | evas_object_textgrid_cellrow_get (const Evas_Object *obj, int y) |
Get the string at the given row of the given textgrid object. More... | |
EAPI void | evas_object_textgrid_update_add (Evas_Object *obj, int x, int y, int w, int h) |
Indicate for evas that part of a textgrid region (cells) has been updated. More... | |
Detailed Description
- Todo:
- put here some usage examples
- Since
- 1.7
Typedef Documentation
The values that describes each cell.
- Since
- 1.7
Enumeration Type Documentation
Function Documentation
EAPI Evas_Object* evas_object_textgrid_add | ( | Evas * | e | ) |
Add a textgrid to the given Evas.
- Parameters
-
e The given evas.
- Returns
- The new textgrid object.
This function adds a new textgrid object to the Evas e
and returns the object.
- Since
- 1.7
EAPI void evas_object_textgrid_cell_size_get | ( | const Evas_Object * | obj, |
Evas_Coord * | w, | ||
Evas_Coord * | h | ||
) |
Retrieve the size of a cell of the given textgrid object in pixels.
- Parameters
-
obj The textgrid object to query for font information. width A pointer to the location to store the width in pixels of a cell. height A pointer to the location to store the height in pixels of a cell.
This functions retrieves the width and height, in pixels, of a cell of the textgrid object obj
and store them respectively in the buffers width
and height
. Their value depends on the monospace font used for the textgrid object, as well as the style. width
and height
can be NULL
. On error, they are set to 0.
- See also
- evas_object_textgrid_font_set()
- evas_object_textgrid_supported_font_styles_set()
- Since
- 1.7
EAPI Evas_Textgrid_Cell* evas_object_textgrid_cellrow_get | ( | const Evas_Object * | obj, |
int | y | ||
) |
Get the string at the given row of the given textgrid object.
- Parameters
-
obj The textgrid object to query for font information. y The row index of the grid.
- Returns
- A pointer to the first cell of the given row.
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()
- evas_object_textgrid_update_add()
- Since
- 1.7
EAPI void evas_object_textgrid_cellrow_set | ( | Evas_Object * | obj, |
int | y, | ||
const Evas_Textgrid_Cell * | row | ||
) |
Set the string at the given row of the given textgrid object.
- Parameters
-
obj The textgrid object to query for font information. y The row index of the grid. The string as a sequence of Evas_Textgrid_Cell.
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()
- evas_object_textgrid_update_add()
- Since
- 1.7
EAPI void evas_object_textgrid_font_get | ( | const Evas_Object * | obj, |
const char ** | font_name, | ||
Evas_Font_Size * | font_size | ||
) |
Retrieve the font family and size in use on a given textgrid object.
- Parameters
-
obj The textgrid object to query for font information. font_name A pointer to the location to store the font name in. font_size A pointer to the location to store the font size in.
This function allows the font name and size of a textgrid object obj
to be queried and stored respectively in the buffers font_name
and font_size
. 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. On error, the font name is the empty string and the font size is 0. font_name
and font_source
can be NULL
.
- See also
- evas_object_textgrid_font_set()
- evas_object_textgrid_font_source_set()
- evas_object_textgrid_font_source_get()
- Since
- 1.7
EAPI void evas_object_textgrid_font_set | ( | Evas_Object * | obj, |
const char * | font_name, | ||
Evas_Font_Size | font_size | ||
) |
Set the font family and size on a given textgrid object.
- Parameters
-
obj The textgrid object to set font for. font_name The font (family) name. font_size The font size, in points.
This function allows the font name font_name
and size font_size
of the textgrid object obj
to be set. The font_name
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). It also has to be a monospace font. If font_name
is NULL
, or if it is an empty string, or if font_size
is less or equal than 0, or on error, this function does nothing.
- See also
- evas_object_textgrid_font_get()
- evas_object_textgrid_font_source_set()
- evas_object_textgrid_font_source_get()
- Since
- 1.7
References evas_event_feed_mouse_move().
EAPI const char* evas_object_textgrid_font_source_get | ( | const Evas_Object * | obj | ) |
Get the font file's path which is being used on a given textgrid object.
- Parameters
-
obj The textgrid object to set font for.
- Returns
- The font file's path.
This function returns the font source path of the textgrid object obj
. If the font source path has not been set, or on error, NULL
is returned.
- See also
- evas_object_textgrid_font_get()
- evas_object_textgrid_font_set()
- evas_object_textgrid_font_source_set()
- Since
- 1.7
EAPI void evas_object_textgrid_font_source_set | ( | Evas_Object * | obj, |
const char * | font_source | ||
) |
Set the font (source) file to be used on a given textgrid object.
- Parameters
-
obj The textgrid object to set font for. font_source The font file's path.
This function allows the font file font_source
to be explicitly set for the textgrid object obj
, overriding system lookup, which will first occur in the given file's contents. If is NULL
or is an empty string, or the same font_source has already been set, or on error, this function does nothing.
- See also
- evas_object_textgrid_font_get()
- evas_object_textgrid_font_set()
- evas_object_textgrid_font_source_get()
- Since
- 1.7
EAPI void evas_object_textgrid_palette_get | ( | const Evas_Object * | 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.
- Parameters
-
obj The textgrid object to query for font information. pal The type of the palette to set the color. idx The index of the paletter to wich the color is stored. r A pointer to the red component of the color. g A pointer to the green component of the color. b A pointer to the blue component of the color. a A pointer to the alpha component of the color.
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
, and a
can be NULL
.
- Since
- 1.7
References EVAS_TEXTGRID_PALETTE_EXTENDED, and EVAS_TEXTGRID_PALETTE_STANDARD.
EAPI void evas_object_textgrid_palette_set | ( | Evas_Object * | 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.
- Parameters
-
obj The textgrid object to query for font information. pal The type of the palette to set the color. idx The index of the paletter to wich the color is stored. r The red component of the color. g The green component of the color. b The blue component of the color. a The alpha component of the color.
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).
- Since
- 1.7
References EVAS_TEXTGRID_PALETTE_EXTENDED, and EVAS_TEXTGRID_PALETTE_STANDARD.
EAPI void evas_object_textgrid_size_get | ( | const Evas_Object * | obj, |
int * | w, | ||
int * | h | ||
) |
Get the size of the textgrid object.
- Parameters
-
obj The textgrid object. w The number of columns of the grid. h The number of rows of the grid.
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, their value is 0.
- Since
- 1.7
EAPI void evas_object_textgrid_size_set | ( | Evas_Object * | obj, |
int | w, | ||
int | h | ||
) |
Set the size of the textgrid object.
- Parameters
-
obj The textgrid object. w The number of columns (width in cells) of the grid. h The number of rows (height in cells) of the grid.
This function sets the number of lines h
and the number of columns w
to the textgrid object obj
. If w
or h
are less or equal than 0, this functiond does nothing.
- Since
- 1.7
EAPI void evas_object_textgrid_update_add | ( | Evas_Object * | obj, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Indicate for evas that part of a textgrid region (cells) has been updated.
- Parameters
-
obj The textgrid object. x The rect region of cells top-left x (column) y The rect region of cells top-left y (row) w The rect region size in number of cells (columns) h The rect region size in number of cells (rows)
This function declares to evas that a region of cells was updated by code and needs refreshing. An application should modify cells like this as an example:
- See also
- evas_object_textgrid_cellrow_set()
- evas_object_textgrid_cellrow_get()
- evas_object_textgrid_size_set()
- Since
- 1.7