libcaca dirty rectangle manipulation
#define CACA_MAGIC_FULLWIDTH 0x000ffffe
__extern int caca_gotoxy (caca_canvas_t *, int, int)
Set cursor position.
__extern int caca_wherex (caca_canvas_t const *)
Get X cursor position.
__extern int caca_wherey (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_vprintf (caca_canvas_t *, int, int, char const *, va_list)
Print a formated string (va_list version).
__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.
These functions provide low-level character printing routines and higher level graphics functions.
This function never fails.
Parameters
Returns
Referenced by caca_conio_cgets(), caca_conio_clrscr(), caca_conio_cprintf(), caca_conio_cputs(), caca_conio_gotoxy(), caca_conio_printf(), and caca_conio_putch().
This function never fails.
Parameters
Returns
Referenced by caca_conio_cgets(), caca_conio_clreol(), caca_conio_cprintf(), caca_conio_cputs(), caca_conio_printf(), caca_conio_putch(), and caca_conio_wherex().
This function never fails.
Parameters
Returns
Referenced by caca_conio_cgets(), caca_conio_clreol(), caca_conio_cprintf(), caca_conio_cputs(), caca_conio_printf(), caca_conio_putch(), and caca_conio_wherey().
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 returns the width of the printed character. If it is a fullwidth character, 2 is returned. Otherwise, 1 is returned.
This function never fails.
Parameters
Returns
References caca_add_dirty_rect(), CACA_MAGIC_FULLWIDTH, and caca_utf32_is_fullwidth().
Referenced by caca_conio_cgets(), caca_conio_cputs(), caca_conio_putch(), caca_dither_bitmap(), caca_fill_box(), caca_fill_triangle(), caca_flush_figlet(), caca_put_figchar(), and caca_put_str().
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.
Parameters
Returns
Referenced by caca_flush_figlet(), and caca_put_figchar().
See caca_put_char() for more information on how fullwidth characters are handled when overwriting each other or at the canvas' boundaries.
This function returns the number of cells printed by the string. It is not the number of characters printed, because fullwidth characters account for two cells.
This function never fails.
Parameters
Returns
References caca_put_char(), caca_utf32_is_fullwidth(), and caca_utf8_to_utf32().
This function returns the number of cells printed by the string. It is not the number of characters printed, because fullwidth characters account for two cells.
This function never fails.
Parameters
Returns
This function returns the number of cells printed by the string. It is not the number of characters printed, because fullwidth characters account for two cells.
This function never fails.
Parameters
Returns
References caca_put_str().
Referenced by caca_conio_cprintf(), caca_conio_printf(), and caca_printf().
This function never fails.
Parameters
Returns
References caca_add_dirty_rect().
Referenced by caca_conio_clrscr().
This function never fails.
Parameters
Returns
Referenced by caca_put_figchar().
This function never fails.
Parameters
Returns
This function never fails.
Parameters
Returns
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
References caca_add_dirty_rect(), and CACA_MAGIC_FULLWIDTH.
Referenced by caca_conio_movetext(), caca_export_area_to_memory(), caca_import_area_from_file(), caca_import_area_from_memory(), caca_put_figchar(), and caca_set_canvas_boundaries().
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
References caca_add_dirty_rect(), caca_blit(), caca_create_canvas(), caca_create_frame(), caca_get_frame_count(), and caca_set_frame().
Generated automatically by Doxygen for libcaca from the source code.