Defines | |
#define | CACA_MAGIC_FULLWIDTH 0x000ffffe |
Functions | |
__extern int | caca_gotoxy (caca_canvas_t *, int, int) |
Set cursor position. | |
__extern int | caca_get_cursor_x (caca_canvas_t const *) |
Get X cursor position. | |
__extern int | caca_get_cursor_y (caca_canvas_t const *) |
Get Y cursor position. | |
__extern int | caca_put_char (caca_canvas_t *, int, int, uint32_t) |
Print an ASCII or Unicode character. | |
__extern uint32_t | caca_get_char (caca_canvas_t const *, int, int) |
Get the Unicode character at the given coordinates. | |
__extern int | caca_put_str (caca_canvas_t *, int, int, char const *) |
Print a string. | |
__extern int | caca_printf (caca_canvas_t *, int, int, char const *,...) |
Print a formated string. | |
__extern int | caca_clear_canvas (caca_canvas_t *) |
Clear the canvas. | |
__extern int | caca_set_canvas_handle (caca_canvas_t *, int, int) |
Set cursor handle. | |
__extern int | caca_get_canvas_handle_x (caca_canvas_t const *) |
Get X handle position. | |
__extern int | caca_get_canvas_handle_y (caca_canvas_t const *) |
Get Y handle position. | |
__extern int | caca_blit (caca_canvas_t *, int, int, caca_canvas_t const *, caca_canvas_t const *) |
Blit a canvas onto another one. | |
__extern int | caca_set_canvas_boundaries (caca_canvas_t *, int, int, int, int) |
Set a canvas' new boundaries. |
|
Used to indicate that the previous character was a fullwidth glyph. |
|
Put the cursor at the given coordinates. Functions making use of the cursor will use the new values. Setting the cursor position outside the canvas is legal but the cursor will not be shown. This function never fails.
|
|
Retrieve the X coordinate of the cursor's position. This function never fails.
|
|
Retrieve the Y coordinate of the cursor's position. This function never fails.
|
|
Print an ASCII or Unicode character at the given coordinates, using the default foreground and background colour values. If the coordinates are outside the canvas boundaries, nothing is printed. If a fullwidth Unicode character gets overwritten, its remaining visible parts are replaced with spaces. If the canvas' boundaries would split the fullwidth character in two, a space is printed instead. The behaviour when printing non-printable characters or invalid UTF-32 characters is undefined. To print a sequence of bytes forming an UTF-8 character instead of an UTF-32 character, use the caca_put_str() function. This function never fails.
|
|
Get the ASCII or Unicode value of the character at the given coordinates. If the value is less or equal to 127 (0x7f), the character can be printed as ASCII. Otherise, it must be handled as a UTF-32 value. If the coordinates are outside the canvas boundaries, a space (0x20) is returned. A special exception is when CACA_MAGIC_FULLWIDTH is returned. This value is guaranteed not to be a valid Unicode character, and indicates that the character at the left of the requested one is a fullwidth character. This function never fails.
|
|
Print an UTF-8 string at the given coordinates, using the default foreground and background values. The coordinates may be outside the canvas boundaries (eg. a negative Y coordinate) and the string will be cropped accordingly if it is too long. See caca_put_char() for more information on how fullwidth characters are handled when overwriting each other or at the canvas' boundaries. This function never fails.
|
|
Format a string at the given coordinates, using the default foreground and background values. The coordinates may be outside the canvas boundaries (eg. a negative Y coordinate) and the string will be cropped accordingly if it is too long. The syntax of the format string is the same as for the C printf() function. This function never fails.
|
|
Clear the canvas using the current foreground and background colours. This function never fails.
|
|
Set the canvas' handle. Blitting functions will use the handle value to put the canvas at the proper coordinates. This function never fails.
|
|
Retrieve the X coordinate of the canvas' handle. This function never fails.
|
|
Retrieve the Y coordinate of the canvas' handle. This function never fails.
|
|
Blit a canvas onto another one at the given coordinates. An optional mask canvas can be used. If an error occurs, -1 is returned and errno is set accordingly:
|
|
Set new boundaries for a canvas. This function can be used to crop a canvas, to expand it or for combinations of both actions. All frames are affected by this function. If an error occurs, -1 is returned and errno is set accordingly:
|