libcaca  0.99.beta19
About: libcaca is a graphics library that outputs text instead of pixels, so that it can work on older video cards or text terminals (something like an advanced AAlib library).
  Fossies Dox: libcaca-0.99.beta19.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

caca.h File Reference

The libcaca public header. More...

#include <caca_types.h>
#include <stdarg.h>
Include dependency graph for caca.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  caca_event
 Handling of user events. More...
 
struct  caca_option
 Option parsing. More...
 
struct  caca_conio_text_info
 DOS text area information. More...
 

Macros

#define __extern   extern
 
#define CACA_API_VERSION_1
 
#define CACA_MAGIC_FULLWIDTH   0x000ffffe
 
#define CACA_DEPRECATED
 
#define CACA_ALIAS(x)
 
#define CACA_WEAK
 
#define CUCUL_COLOR_BLACK   CACA_BLACK
 
#define CUCUL_COLOR_BLUE   CACA_BLUE
 
#define CUCUL_COLOR_GREEN   CACA_GREEN
 
#define CUCUL_COLOR_CYAN   CACA_CYAN
 
#define CUCUL_COLOR_RED   CACA_RED
 
#define CUCUL_COLOR_MAGENTA   CACA_MAGENTA
 
#define CUCUL_COLOR_BROWN   CACA_BROWN
 
#define CUCUL_COLOR_LIGHTGRAY   CACA_LIGHTGRAY
 
#define CUCUL_COLOR_DARKGRAY   CACA_DARKGRAY
 
#define CUCUL_COLOR_LIGHTBLUE   CACA_LIGHTBLUE
 
#define CUCUL_COLOR_LIGHTGREEN   CACA_LIGHTGREEN
 
#define CUCUL_COLOR_LIGHTCYAN   CACA_LIGHTCYAN
 
#define CUCUL_COLOR_LIGHTRED   CACA_LIGHTRED
 
#define CUCUL_COLOR_LIGHTMAGENTA   CACA_LIGHTMAGENTA
 
#define CUCUL_COLOR_YELLOW   CACA_YELLOW
 
#define CUCUL_COLOR_WHITE   CACA_YELLOW
 
#define CUCUL_COLOR_DEFAULT   CACA_DEFAULT
 
#define CUCUL_COLOR_TRANSPARENT   CACA_TRANSPARENT
 
#define cucul_canvas_t   caca_canvas_t
 
#define cucul_dither_t   caca_dither_t
 
#define cucul_font_t   caca_font_t
 
#define cucul_file_t   caca_file_t
 
#define cucul_display_t   caca_display_t
 
#define cucul_event_t   caca_event_t
 
#define CUCUL_BLACK   CACA_BLACK
 
#define CUCUL_BLUE   CACA_BLUE
 
#define CUCUL_GREEN   CACA_GREEN
 
#define CUCUL_CYAN   CACA_CYAN
 
#define CUCUL_RED   CACA_RED
 
#define CUCUL_MAGENTA   CACA_MAGENTA
 
#define CUCUL_BROWN   CACA_BROWN
 
#define CUCUL_LIGHTGRAY   CACA_LIGHTGRAY
 
#define CUCUL_DARKGRAY   CACA_DARKGRAY
 
#define CUCUL_LIGHTBLUE   CACA_LIGHTBLUE
 
#define CUCUL_LIGHTGREEN   CACA_LIGHTGREEN
 
#define CUCUL_LIGHTCYAN   CACA_LIGHTCYAN
 
#define CUCUL_LIGHTRED   CACA_LIGHTRED
 
#define CUCUL_LIGHTMAGENTA   CACA_LIGHTMAGENTA
 
#define CUCUL_YELLOW   CACA_YELLOW
 
#define CUCUL_WHITE   CACA_YELLOW
 
#define CUCUL_DEFAULT   CACA_DEFAULT
 
#define CUCUL_TRANSPARENT   CACA_TRANSPARENT
 
#define CUCUL_BOLD   CACA_BOLD
 
#define CUCUL_ITALICS   CACA_ITALICS
 
#define CUCUL_UNDERLINE   CACA_UNDERLINE
 
#define CUCUL_BLINK   CACA_BLINK
 
#define caca_get_cursor_x   caca_wherex
 
#define caca_get_cursor_y   caca_wherey
 
#define cucul_draw_triangle   caca_draw_triangle
 
#define cucul_draw_thin_triangle   caca_draw_thin_triangle
 
#define cucul_fill_triangle   caca_fill_triangle
 
#define cucul_load_font   caca_load_font
 
#define cucul_get_font_list   caca_get_font_list
 
#define cucul_get_font_width   caca_get_font_width
 
#define cucul_get_font_height   caca_get_font_height
 
#define cucul_get_font_blocks   caca_get_font_blocks
 
#define cucul_render_canvas   caca_render_canvas
 
#define cucul_free_font   caca_free_font
 
#define cucul_gotoxy   caca_gotoxy
 
#define cucul_get_cursor_x   caca_wherex
 
#define cucul_get_cursor_y   caca_wherey
 
#define cucul_put_char   caca_put_char
 
#define cucul_get_char   caca_get_char
 
#define cucul_put_str   caca_put_str
 
#define cucul_printf   caca_printf
 
#define cucul_clear_canvas   caca_clear_canvas
 
#define cucul_set_canvas_handle   caca_set_canvas_handle
 
#define cucul_get_canvas_handle_x   caca_get_canvas_handle_x
 
#define cucul_get_canvas_handle_y   caca_get_canvas_handle_y
 
#define cucul_blit   caca_blit
 
#define cucul_set_canvas_boundaries   caca_set_canvas_boundaries
 
#define cucul_import_memory   caca_import_memory
 
#define cucul_import_file   caca_import_file
 
#define cucul_get_import_list   caca_get_import_list
 
#define cucul_create_canvas   caca_create_canvas
 
#define cucul_manage_canvas   caca_manage_canvas
 
#define cucul_unmanage_canvas   caca_unmanage_canvas
 
#define cucul_set_canvas_size   caca_set_canvas_size
 
#define cucul_get_canvas_width   caca_get_canvas_width
 
#define cucul_get_canvas_height   caca_get_canvas_height
 
#define cucul_get_canvas_chars   caca_get_canvas_chars
 
#define cucul_get_canvas_attrs   caca_get_canvas_attrs
 
#define cucul_free_canvas   caca_free_canvas
 
#define cucul_rand   caca_rand
 
#define cucul_export_memory   caca_export_memory
 
#define cucul_get_export_list   caca_get_export_list
 
#define cucul_get_version   caca_get_version
 
#define cucul_utf8_to_utf32   caca_utf8_to_utf32
 
#define cucul_utf32_to_utf8   caca_utf32_to_utf8
 
#define cucul_utf32_to_cp437   caca_utf32_to_cp437
 
#define cucul_cp437_to_utf32   caca_cp437_to_utf32
 
#define cucul_utf32_to_ascii   caca_utf32_to_ascii
 
#define cucul_utf32_is_fullwidth   caca_utf32_is_fullwidth
 
#define cucul_draw_circle   caca_draw_circle
 
#define cucul_draw_ellipse   caca_draw_ellipse
 
#define cucul_draw_thin_ellipse   caca_draw_thin_ellipse
 
#define cucul_fill_ellipse   caca_fill_ellipse
 
#define cucul_canvas_set_figfont   caca_canvas_set_figfont
 
#define cucul_put_figchar   caca_put_figchar
 
#define cucul_flush_figlet   caca_flush_figlet
 
#define cucul_putchar   caca_putchar
 
#define cucul_getchar   caca_getchar
 
#define cucul_get_attr   caca_get_attr
 
#define cucul_set_attr   caca_set_attr
 
#define cucul_put_attr   caca_put_attr
 
#define cucul_set_color_ansi   caca_set_color_ansi
 
#define cucul_set_color_argb   caca_set_color_argb
 
#define cucul_attr_to_ansi   caca_attr_to_ansi
 
#define cucul_attr_to_ansi_fg   caca_attr_to_ansi_fg
 
#define cucul_attr_to_ansi_bg   caca_attr_to_ansi_bg
 
#define cucul_attr_to_rgb12_fg   caca_attr_to_rgb12_fg
 
#define cucul_attr_to_rgb12_bg   caca_attr_to_rgb12_bg
 
#define cucul_attr_to_argb64   caca_attr_to_argb64
 
#define cucul_invert   caca_invert
 
#define cucul_flip   caca_flip
 
#define cucul_flop   caca_flop
 
#define cucul_rotate_180   caca_rotate_180
 
#define cucul_rotate_left   caca_rotate_left
 
#define cucul_rotate_right   caca_rotate_right
 
#define cucul_stretch_left   caca_stretch_left
 
#define cucul_stretch_right   caca_stretch_right
 
#define cucul_file_open   caca_file_open
 
#define cucul_file_close   caca_file_close
 
#define cucul_file_tell   caca_file_tell
 
#define cucul_file_read   caca_file_read
 
#define cucul_file_write   caca_file_write
 
#define cucul_file_gets   caca_file_gets
 
#define cucul_file_eof   caca_file_eof
 
#define cucul_create_dither   caca_create_dither
 
#define cucul_set_dither_palette   caca_set_dither_palette
 
#define cucul_set_dither_brightness   caca_set_dither_brightness
 
#define cucul_get_dither_brightness   caca_get_dither_brightness
 
#define cucul_set_dither_gamma   caca_set_dither_gamma
 
#define cucul_get_dither_gamma   caca_get_dither_gamma
 
#define cucul_set_dither_contrast   caca_set_dither_contrast
 
#define cucul_get_dither_contrast   caca_get_dither_contrast
 
#define cucul_set_dither_antialias   caca_set_dither_antialias
 
#define cucul_get_dither_antialias_list   caca_get_dither_antialias_list
 
#define cucul_get_dither_antialias   caca_get_dither_antialias
 
#define cucul_set_dither_color   caca_set_dither_color
 
#define cucul_get_dither_color_list   caca_get_dither_color_list
 
#define cucul_get_dither_color   caca_get_dither_color
 
#define cucul_set_dither_charset   caca_set_dither_charset
 
#define cucul_get_dither_charset_list   caca_get_dither_charset_list
 
#define cucul_get_dither_charset   caca_get_dither_charset
 
#define cucul_set_dither_algorithm   caca_set_dither_algorithm
 
#define cucul_get_dither_algorithm_list   caca_get_dither_algorithm_list
 
#define cucul_get_dither_algorithm   caca_get_dither_algorithm
 
#define cucul_dither_bitmap   caca_dither_bitmap
 
#define cucul_free_dither   caca_free_dither
 
#define cucul_draw_line   caca_draw_line
 
#define cucul_draw_polyline   caca_draw_polyline
 
#define cucul_draw_thin_line   caca_draw_thin_line
 
#define cucul_draw_thin_polyline   caca_draw_thin_polyline
 
#define cucul_draw_box   caca_draw_box
 
#define cucul_draw_thin_box   caca_draw_thin_box
 
#define cucul_draw_cp437_box   caca_draw_cp437_box
 
#define cucul_fill_box   caca_fill_box
 
#define cucul_get_frame_count   caca_get_frame_count
 
#define cucul_set_frame   caca_set_frame
 
#define cucul_get_frame_name   caca_get_frame_name
 
#define cucul_set_frame_name   caca_set_frame_name
 
#define cucul_create_frame   caca_create_frame
 
#define cucul_free_frame   caca_free_frame
 

Typedefs

typedef struct caca_canvas caca_canvas_t
 
typedef struct caca_dither caca_dither_t
 
typedef struct caca_charfont caca_charfont_t
 
typedef struct caca_font caca_font_t
 
typedef struct caca_file caca_file_t
 
typedef struct caca_display caca_display_t
 
typedef struct caca_event caca_event_t
 
typedef struct cucul_buffer cucul_buffer_t
 

Enumerations

enum  caca_color {
  CACA_BLACK = 0x00, CACA_BLUE = 0x01, CACA_GREEN = 0x02, CACA_CYAN = 0x03,
  CACA_RED = 0x04, CACA_MAGENTA = 0x05, CACA_BROWN = 0x06, CACA_LIGHTGRAY = 0x07,
  CACA_DARKGRAY = 0x08, CACA_LIGHTBLUE = 0x09, CACA_LIGHTGREEN = 0x0a, CACA_LIGHTCYAN = 0x0b,
  CACA_LIGHTRED = 0x0c, CACA_LIGHTMAGENTA = 0x0d, CACA_YELLOW = 0x0e, CACA_WHITE = 0x0f,
  CACA_DEFAULT = 0x10, CACA_TRANSPARENT = 0x20
}
 
enum  caca_style { CACA_BOLD = 0x01, CACA_ITALICS = 0x02, CACA_UNDERLINE = 0x04, CACA_BLINK = 0x08 }
 
enum  caca_event_type {
  CACA_EVENT_NONE = 0x0000, CACA_EVENT_KEY_PRESS = 0x0001, CACA_EVENT_KEY_RELEASE = 0x0002, CACA_EVENT_MOUSE_PRESS = 0x0004,
  CACA_EVENT_MOUSE_RELEASE = 0x0008, CACA_EVENT_MOUSE_MOTION = 0x0010, CACA_EVENT_RESIZE = 0x0020, CACA_EVENT_QUIT = 0x0040,
  CACA_EVENT_ANY = 0xffff
}
 User event type enumeration. More...
 
enum  caca_key {
  CACA_KEY_UNKNOWN = 0x00, CACA_KEY_CTRL_A = 0x01, CACA_KEY_CTRL_B = 0x02, CACA_KEY_CTRL_C = 0x03,
  CACA_KEY_CTRL_D = 0x04, CACA_KEY_CTRL_E = 0x05, CACA_KEY_CTRL_F = 0x06, CACA_KEY_CTRL_G = 0x07,
  CACA_KEY_BACKSPACE = 0x08, CACA_KEY_TAB = 0x09, CACA_KEY_CTRL_J = 0x0a, CACA_KEY_CTRL_K = 0x0b,
  CACA_KEY_CTRL_L = 0x0c, CACA_KEY_RETURN = 0x0d, CACA_KEY_CTRL_N = 0x0e, CACA_KEY_CTRL_O = 0x0f,
  CACA_KEY_CTRL_P = 0x10, CACA_KEY_CTRL_Q = 0x11, CACA_KEY_CTRL_R = 0x12, CACA_KEY_PAUSE = 0x13,
  CACA_KEY_CTRL_T = 0x14, CACA_KEY_CTRL_U = 0x15, CACA_KEY_CTRL_V = 0x16, CACA_KEY_CTRL_W = 0x17,
  CACA_KEY_CTRL_X = 0x18, CACA_KEY_CTRL_Y = 0x19, CACA_KEY_CTRL_Z = 0x1a, CACA_KEY_ESCAPE = 0x1b,
  CACA_KEY_DELETE = 0x7f, CACA_KEY_UP = 0x111, CACA_KEY_DOWN = 0x112, CACA_KEY_LEFT = 0x113,
  CACA_KEY_RIGHT = 0x114, CACA_KEY_INSERT = 0x115, CACA_KEY_HOME = 0x116, CACA_KEY_END = 0x117,
  CACA_KEY_PAGEUP = 0x118, CACA_KEY_PAGEDOWN = 0x119, CACA_KEY_F1 = 0x11a, CACA_KEY_F2 = 0x11b,
  CACA_KEY_F3 = 0x11c, CACA_KEY_F4 = 0x11d, CACA_KEY_F5 = 0x11e, CACA_KEY_F6 = 0x11f,
  CACA_KEY_F7 = 0x120, CACA_KEY_F8 = 0x121, CACA_KEY_F9 = 0x122, CACA_KEY_F10 = 0x123,
  CACA_KEY_F11 = 0x124, CACA_KEY_F12 = 0x125, CACA_KEY_F13 = 0x126, CACA_KEY_F14 = 0x127,
  CACA_KEY_F15 = 0x128
}
 Special key values. More...
 
enum  CACA_CONIO_COLORS {
  CACA_CONIO_BLINK = 128, CACA_CONIO_BLACK = 0, CACA_CONIO_BLUE = 1, CACA_CONIO_GREEN = 2,
  CACA_CONIO_CYAN = 3, CACA_CONIO_RED = 4, CACA_CONIO_MAGENTA = 5, CACA_CONIO_BROWN = 6,
  CACA_CONIO_LIGHTGRAY = 7, CACA_CONIO_DARKGRAY = 8, CACA_CONIO_LIGHTBLUE = 9, CACA_CONIO_LIGHTGREEN = 10,
  CACA_CONIO_LIGHTCYAN = 11, CACA_CONIO_LIGHTRED = 12, CACA_CONIO_LIGHTMAGENTA = 13, CACA_CONIO_YELLOW = 14,
  CACA_CONIO_WHITE = 15
}
 DOS colours. More...
 
enum  CACA_CONIO_CURSOR { CACA_CONIO__NOCURSOR = 0, CACA_CONIO__SOLIDCURSOR = 1, CACA_CONIO__NORMALCURSOR = 2 }
 DOS cursor modes. More...
 
enum  CACA_CONIO_MODE {
  CACA_CONIO_LASTMODE = -1, CACA_CONIO_BW40 = 0, CACA_CONIO_C40 = 1, CACA_CONIO_BW80 = 2,
  CACA_CONIO_C80 = 3, CACA_CONIO_MONO = 7, CACA_CONIO_C4350 = 64
}
 DOS video modes. More...
 

Functions

caca_canvas_tcaca_create_canvas (int, int)
 Initialise a libcaca canvas. More...
 
int caca_manage_canvas (caca_canvas_t *, int(*)(void *), void *)
 Manage a canvas. More...
 
int caca_unmanage_canvas (caca_canvas_t *, int(*)(void *), void *)
 unmanage a canvas. More...
 
int caca_set_canvas_size (caca_canvas_t *, int, int)
 Resize a canvas. More...
 
int caca_get_canvas_width (caca_canvas_t const *)
 Get the canvas width. More...
 
int caca_get_canvas_height (caca_canvas_t const *)
 Get the canvas height. More...
 
const uint32_t * caca_get_canvas_chars (caca_canvas_t const *)
 Get the canvas character array. More...
 
const uint32_t * caca_get_canvas_attrs (caca_canvas_t const *)
 Get the canvas attribute array. More...
 
int caca_free_canvas (caca_canvas_t *)
 Free a libcaca canvas. More...
 
int caca_rand (int, int)
 
const char * caca_get_version (void)
 Return the libcaca version. More...
 
int caca_gotoxy (caca_canvas_t *, int, int)
 Set cursor position. More...
 
int caca_wherex (caca_canvas_t const *)
 Get X cursor position. More...
 
int caca_wherey (caca_canvas_t const *)
 Get Y cursor position. More...
 
int caca_put_char (caca_canvas_t *, int, int, uint32_t)
 Print an ASCII or Unicode character. More...
 
uint32_t caca_get_char (caca_canvas_t const *, int, int)
 Get the Unicode character at the given coordinates. More...
 
int caca_put_str (caca_canvas_t *, int, int, char const *)
 Print a string. More...
 
int caca_printf (caca_canvas_t *, int, int, char const *,...)
 Print a formated string. More...
 
int caca_vprintf (caca_canvas_t *, int, int, char const *, va_list)
 Print a formated string (va_list version). More...
 
int caca_clear_canvas (caca_canvas_t *)
 Clear the canvas. More...
 
int caca_set_canvas_handle (caca_canvas_t *, int, int)
 Set cursor handle. More...
 
int caca_get_canvas_handle_x (caca_canvas_t const *)
 Get X handle position. More...
 
int caca_get_canvas_handle_y (caca_canvas_t const *)
 Get Y handle position. More...
 
int caca_blit (caca_canvas_t *, int, int, caca_canvas_t const *, caca_canvas_t const *)
 Blit a canvas onto another one. More...
 
int caca_set_canvas_boundaries (caca_canvas_t *, int, int, int, int)
 Set a canvas' new boundaries. More...
 
int caca_disable_dirty_rect (caca_canvas_t *)
 Disable dirty rectangles. More...
 
int caca_enable_dirty_rect (caca_canvas_t *)
 Enable dirty rectangles. More...
 
int caca_get_dirty_rect_count (caca_canvas_t *)
 Get the number of dirty rectangles in the canvas. More...
 
int caca_get_dirty_rect (caca_canvas_t *, int, int *, int *, int *, int *)
 Get a canvas's dirty rectangle. More...
 
int caca_add_dirty_rect (caca_canvas_t *, int, int, int, int)
 Add an area to the canvas's dirty rectangle list. More...
 
int caca_remove_dirty_rect (caca_canvas_t *, int, int, int, int)
 Remove an area from the dirty rectangle list. More...
 
int caca_clear_dirty_rect_list (caca_canvas_t *)
 Clear a canvas's dirty rectangle list. More...
 
int caca_invert (caca_canvas_t *)
 Invert a canvas' colours. More...
 
int caca_flip (caca_canvas_t *)
 Flip a canvas horizontally. More...
 
int caca_flop (caca_canvas_t *)
 Flip a canvas vertically. More...
 
int caca_rotate_180 (caca_canvas_t *)
 Rotate a canvas. More...
 
int caca_rotate_left (caca_canvas_t *)
 Rotate a canvas, 90 degrees counterclockwise. More...
 
int caca_rotate_right (caca_canvas_t *)
 Rotate a canvas, 90 degrees counterclockwise. More...
 
int caca_stretch_left (caca_canvas_t *)
 Rotate and stretch a canvas, 90 degrees counterclockwise. More...
 
int caca_stretch_right (caca_canvas_t *)
 Rotate and stretch a canvas, 90 degrees clockwise. More...
 
uint32_t caca_get_attr (caca_canvas_t const *, int, int)
 Get the text attribute at the given coordinates. More...
 
int caca_set_attr (caca_canvas_t *, uint32_t)
 Set the default character attribute. More...
 
int caca_unset_attr (caca_canvas_t *, uint32_t)
 Unset flags in the default character attribute. More...
 
int caca_toggle_attr (caca_canvas_t *, uint32_t)
 Toggle flags in the default character attribute. More...
 
int caca_put_attr (caca_canvas_t *, int, int, uint32_t)
 Set the character attribute at the given coordinates. More...
 
int caca_set_color_ansi (caca_canvas_t *, uint8_t, uint8_t)
 Set the default colour pair for text (ANSI version). More...
 
int caca_set_color_argb (caca_canvas_t *, uint16_t, uint16_t)
 Set the default colour pair for text (truecolor version). More...
 
uint8_t caca_attr_to_ansi (uint32_t)
 Get DOS ANSI information from attribute. More...
 
uint8_t caca_attr_to_ansi_fg (uint32_t)
 Get ANSI foreground information from attribute. More...
 
uint8_t caca_attr_to_ansi_bg (uint32_t)
 Get ANSI background information from attribute. More...
 
uint16_t caca_attr_to_rgb12_fg (uint32_t)
 Get 12-bit RGB foreground information from attribute. More...
 
uint16_t caca_attr_to_rgb12_bg (uint32_t)
 Get 12-bit RGB background information from attribute. More...
 
void caca_attr_to_argb64 (uint32_t, uint8_t[8])
 Get 64-bit ARGB information from attribute. More...
 
uint32_t caca_utf8_to_utf32 (char const *, size_t *)
 Convert a UTF-8 character to UTF-32. More...
 
size_t caca_utf32_to_utf8 (char *, uint32_t)
 Convert a UTF-32 character to UTF-8. More...
 
uint8_t caca_utf32_to_cp437 (uint32_t)
 Convert a UTF-32 character to CP437. More...
 
uint32_t caca_cp437_to_utf32 (uint8_t)
 Convert a CP437 character to UTF-32. More...
 
char caca_utf32_to_ascii (uint32_t)
 Convert a UTF-32 character to ASCII. More...
 
int caca_utf32_is_fullwidth (uint32_t)
 Tell whether a UTF-32 character is fullwidth. More...
 
int caca_draw_line (caca_canvas_t *, int, int, int, int, uint32_t)
 Draw a line on the canvas using the given character. More...
 
int caca_draw_polyline (caca_canvas_t *, int const x[], int const y[], int, uint32_t)
 Draw a polyline. More...
 
int caca_draw_thin_line (caca_canvas_t *, int, int, int, int)
 Draw a thin line on the canvas, using ASCII art. More...
 
int caca_draw_thin_polyline (caca_canvas_t *, int const x[], int const y[], int)
 Draw an ASCII art thin polyline. More...
 
int caca_draw_circle (caca_canvas_t *, int, int, int, uint32_t)
 Draw a circle on the canvas using the given character. More...
 
int caca_draw_ellipse (caca_canvas_t *, int, int, int, int, uint32_t)
 Draw an ellipse on the canvas using the given character. More...
 
int caca_draw_thin_ellipse (caca_canvas_t *, int, int, int, int)
 Draw a thin ellipse on the canvas. More...
 
int caca_fill_ellipse (caca_canvas_t *, int, int, int, int, uint32_t)
 Fill an ellipse on the canvas using the given character. More...
 
int caca_draw_box (caca_canvas_t *, int, int, int, int, uint32_t)
 Draw a box on the canvas using the given character. More...
 
int caca_draw_thin_box (caca_canvas_t *, int, int, int, int)
 Draw a thin box on the canvas. More...
 
int caca_draw_cp437_box (caca_canvas_t *, int, int, int, int)
 Draw a box on the canvas using CP437 characters. More...
 
int caca_fill_box (caca_canvas_t *, int, int, int, int, uint32_t)
 Fill a box on the canvas using the given character. More...
 
int caca_draw_triangle (caca_canvas_t *, int, int, int, int, int, int, uint32_t)
 Draw a triangle on the canvas using the given character. More...
 
int caca_draw_thin_triangle (caca_canvas_t *, int, int, int, int, int, int)
 Draw a thin triangle on the canvas. More...
 
int caca_fill_triangle (caca_canvas_t *, int, int, int, int, int, int, uint32_t)
 Fill a triangle on the canvas using the given character. More...
 
int caca_fill_triangle_textured (caca_canvas_t *cv, int coords[6], caca_canvas_t *tex, float uv[6])
 Fill a triangle on the canvas using an arbitrary-sized texture. More...
 
int caca_get_frame_count (caca_canvas_t const *)
 Get the number of frames in a canvas. More...
 
int caca_set_frame (caca_canvas_t *, int)
 Activate a given canvas frame. More...
 
const char * caca_get_frame_name (caca_canvas_t const *)
 Get the current frame's name. More...
 
int caca_set_frame_name (caca_canvas_t *, char const *)
 Set the current frame's name. More...
 
int caca_create_frame (caca_canvas_t *, int)
 Add a frame to a canvas. More...
 
int caca_free_frame (caca_canvas_t *, int)
 Remove a frame from a canvas. More...
 
caca_dither_tcaca_create_dither (int, int, int, int, uint32_t, uint32_t, uint32_t, uint32_t)
 Create an internal dither object. More...
 
int caca_set_dither_palette (caca_dither_t *, uint32_t r[], uint32_t g[], uint32_t b[], uint32_t a[])
 Set the palette of an 8bpp dither object. More...
 
int caca_set_dither_brightness (caca_dither_t *, float)
 Set the brightness of a dither object. More...
 
float caca_get_dither_brightness (caca_dither_t const *)
 Get the brightness of a dither object. More...
 
int caca_set_dither_gamma (caca_dither_t *, float)
 Set the gamma of a dither object. More...
 
float caca_get_dither_gamma (caca_dither_t const *)
 Get the gamma of a dither object. More...
 
int caca_set_dither_contrast (caca_dither_t *, float)
 Set the contrast of a dither object. More...
 
float caca_get_dither_contrast (caca_dither_t const *)
 Get the contrast of a dither object. More...
 
int caca_set_dither_antialias (caca_dither_t *, char const *)
 Set dither antialiasing. More...
 
const char *const * caca_get_dither_antialias_list (caca_dither_t const *)
 Get available antialiasing methods. More...
 
const char * caca_get_dither_antialias (caca_dither_t const *)
 Get current antialiasing method. More...
 
int caca_set_dither_color (caca_dither_t *, char const *)
 Choose colours used for dithering. More...
 
const char *const * caca_get_dither_color_list (caca_dither_t const *)
 Get available colour modes. More...
 
const char * caca_get_dither_color (caca_dither_t const *)
 Get current colour mode. More...
 
int caca_set_dither_charset (caca_dither_t *, char const *)
 Choose characters used for dithering. More...
 
const char *const * caca_get_dither_charset_list (caca_dither_t const *)
 Get available dither character sets. More...
 
const char * caca_get_dither_charset (caca_dither_t const *)
 Get current character set. More...
 
int caca_set_dither_algorithm (caca_dither_t *, char const *)
 Set dithering algorithm. More...
 
const char *const * caca_get_dither_algorithm_list (caca_dither_t const *)
 Get dithering algorithms. More...
 
const char * caca_get_dither_algorithm (caca_dither_t const *)
 Get current dithering algorithm. More...
 
int caca_dither_bitmap (caca_canvas_t *, int, int, int, int, caca_dither_t const *, void const *)
 Dither a bitmap on the canvas. More...
 
int caca_free_dither (caca_dither_t *)
 Free the memory associated with a dither. More...
 
caca_charfont_tcaca_load_charfont (void const *, size_t)
 
int caca_free_charfont (caca_charfont_t *)
 
caca_font_tcaca_load_font (void const *, size_t)
 Load a font from memory for future use. More...
 
const char *const * caca_get_font_list (void)
 Get available builtin fonts. More...
 
int caca_get_font_width (caca_font_t const *)
 Get a font's standard glyph width. More...
 
int caca_get_font_height (caca_font_t const *)
 Get a font's standard glyph height. More...
 
const uint32_t * caca_get_font_blocks (caca_font_t const *)
 Get a font's list of supported glyphs. More...
 
int caca_render_canvas (caca_canvas_t const *, caca_font_t const *, void *, int, int, int)
 Render the canvas onto an image buffer. More...
 
int caca_free_font (caca_font_t *)
 Free a font structure. More...
 
int caca_canvas_set_figfont (caca_canvas_t *, char const *)
 load a figfont and attach it to a canvas More...
 
int caca_set_figfont_smush (caca_canvas_t *, char const *)
 set the smushing mode of the figfont rendering More...
 
int caca_set_figfont_width (caca_canvas_t *, int)
 set the width of the figfont rendering More...
 
int caca_put_figchar (caca_canvas_t *, uint32_t)
 paste a character using the current figfont More...
 
int caca_flush_figlet (caca_canvas_t *)
 flush the figlet context More...
 
caca_file_tcaca_file_open (char const *, const char *)
 Open a file for reading or writing. More...
 
int caca_file_close (caca_file_t *)
 Close a file handle. More...
 
uint64_t caca_file_tell (caca_file_t *)
 Return the position in a file handle. More...
 
size_t caca_file_read (caca_file_t *, void *, size_t)
 Read data from a file handle. More...
 
size_t caca_file_write (caca_file_t *, const void *, size_t)
 Write data to a file handle. More...
 
char * caca_file_gets (caca_file_t *, char *, int)
 Read a line from a file handle. More...
 
int caca_file_eof (caca_file_t *)
 Tell whether a file handle reached end of file. More...
 
ssize_t caca_import_canvas_from_memory (caca_canvas_t *, void const *, size_t, char const *)
 Import a memory buffer into a canvas. More...
 
ssize_t caca_import_canvas_from_file (caca_canvas_t *, char const *, char const *)
 Import a file into a canvas. More...
 
ssize_t caca_import_area_from_memory (caca_canvas_t *, int, int, void const *, size_t, char const *)
 Import a memory buffer into a canvas area. More...
 
ssize_t caca_import_area_from_file (caca_canvas_t *, int, int, char const *, char const *)
 Import a file into a canvas area. More...
 
const char *const * caca_get_import_list (void)
 Get available import formats. More...
 
void * caca_export_canvas_to_memory (caca_canvas_t const *, char const *, size_t *)
 Export a canvas into a foreign format. More...
 
void * caca_export_area_to_memory (caca_canvas_t const *, int, int, int, int, char const *, size_t *)
 Export a canvas portion into a foreign format. More...
 
const char *const * caca_get_export_list (void)
 Get available export formats. More...
 
caca_display_tcaca_create_display (caca_canvas_t *)
 Attach a caca graphical context to a caca canvas. More...
 
caca_display_tcaca_create_display_with_driver (caca_canvas_t *, char const *)
 Attach a specific caca graphical context to a caca canvas. More...
 
const char *const * caca_get_display_driver_list (void)
 Get available display drivers. More...
 
const char * caca_get_display_driver (caca_display_t *)
 Return a caca graphical context's current output driver. More...
 
int caca_set_display_driver (caca_display_t *, char const *)
 Set the output driver. More...
 
int caca_free_display (caca_display_t *)
 Detach a caca graphical context from a caca backend context. More...
 
caca_canvas_tcaca_get_canvas (caca_display_t *)
 Get the canvas attached to a caca graphical context. More...
 
int caca_refresh_display (caca_display_t *)
 Flush pending changes and redraw the screen. More...
 
int caca_set_display_time (caca_display_t *, int)
 Set the refresh delay. More...
 
int caca_get_display_time (caca_display_t const *)
 Get the display's average rendering time. More...
 
int caca_get_display_width (caca_display_t const *)
 Get the display width. More...
 
int caca_get_display_height (caca_display_t const *)
 Get the display height. More...
 
int caca_set_display_title (caca_display_t *, char const *)
 Set the display title. More...
 
int caca_set_mouse (caca_display_t *, int)
 Show or hide the mouse pointer. More...
 
int caca_set_cursor (caca_display_t *, int)
 Show or hide the cursor. More...
 
int caca_get_event (caca_display_t *, int, caca_event_t *, int)
 Get the next mouse or keyboard input event. More...
 
int caca_get_mouse_x (caca_display_t const *)
 Return the X mouse coordinate. More...
 
int caca_get_mouse_y (caca_display_t const *)
 Return the Y mouse coordinate. More...
 
enum caca_event_type caca_get_event_type (caca_event_t const *)
 Return an event's type. More...
 
int caca_get_event_key_ch (caca_event_t const *)
 Return a key press or key release event's value. More...
 
uint32_t caca_get_event_key_utf32 (caca_event_t const *)
 Return a key press or key release event's Unicode value. More...
 
int caca_get_event_key_utf8 (caca_event_t const *, char *)
 Return a key press or key release event's UTF-8 value. More...
 
int caca_get_event_mouse_button (caca_event_t const *)
 Return a mouse press or mouse release event's button. More...
 
int caca_get_event_mouse_x (caca_event_t const *)
 Return a mouse motion event's X coordinate. More...
 
int caca_get_event_mouse_y (caca_event_t const *)
 Return a mouse motion event's Y coordinate. More...
 
int caca_get_event_resize_width (caca_event_t const *)
 Return a resize event's display width value. More...
 
int caca_get_event_resize_height (caca_event_t const *)
 Return a resize event's display height value. More...
 
int caca_getopt (int, char *const [], char const *, struct caca_option const *, int *)
 
char * caca_conio_cgets (char *str)
 DOS conio.h cgets() equivalent. More...
 
void caca_conio_clreol (void)
 DOS conio.h clreol() equivalent. More...
 
void caca_conio_clrscr (void)
 DOS conio.h clrscr() equivalent. More...
 
int caca_conio_cprintf (const char *format,...)
 DOS conio.h cprintf() equivalent. More...
 
int caca_conio_cputs (const char *str)
 DOS conio.h cputs() equivalent. More...
 
int caca_conio_cscanf (char *format,...)
 DOS stdio.h cscanf() equivalent. More...
 
void caca_conio_delay (unsigned int)
 DOS dos.h delay() equivalent. More...
 
void caca_conio_delline (void)
 DOS conio.h delline() equivalent. More...
 
int caca_conio_getch (void)
 DOS conio.h getch() equivalent. More...
 
int caca_conio_getche (void)
 DOS conio.h getche() equivalent. More...
 
char * caca_conio_getpass (const char *prompt)
 DOS conio.h getpass() equivalent. More...
 
int caca_conio_gettext (int left, int top, int right, int bottom, void *destin)
 DOS conio.h gettext() equivalent. More...
 
void caca_conio_gettextinfo (struct caca_conio_text_info *r)
 DOS conio.h gettextinfo() equivalent. More...
 
void caca_conio_gotoxy (int x, int y)
 DOS conio.h gotoxy() equivalent. More...
 
void caca_conio_highvideo (void)
 DOS conio.h highvideo() equivalent. More...
 
void caca_conio_insline (void)
 DOS conio.h insline() equivalent. More...
 
int caca_conio_kbhit (void)
 DOS conio.h kbhit() equivalent. More...
 
void caca_conio_lowvideo (void)
 DOS conio.h lowvideo() equivalent. More...
 
int caca_conio_movetext (int left, int top, int right, int bottom, int destleft, int desttop)
 DOS conio.h movetext() equivalent. More...
 
void caca_conio_normvideo (void)
 DOS conio.h normvideo() equivalent. More...
 
void caca_conio_nosound (void)
 DOS dos.h nosound() equivalent. More...
 
int caca_conio_printf (const char *format,...)
 DOS stdio.h printf() equivalent. More...
 
int caca_conio_putch (int ch)
 DOS conio.h putch() equivalent. More...
 
int caca_conio_puttext (int left, int top, int right, int bottom, void *destin)
 DOS conio.h puttext() equivalent. More...
 
void caca_conio__setcursortype (int cur_t)
 DOS conio.h _setcursortype() equivalent. More...
 
void caca_conio_sleep (unsigned int)
 DOS dos.h sleep() equivalent. More...
 
void caca_conio_sound (unsigned int)
 DOS dos.h sound() equivalent. More...
 
void caca_conio_textattr (int newattr)
 DOS conio.h textattr() equivalent. More...
 
void caca_conio_textbackground (int newcolor)
 DOS conio.h textbackground() equivalent. More...
 
void caca_conio_textcolor (int newcolor)
 DOS conio.h textcolor() equivalent. More...
 
void caca_conio_textmode (int newmode)
 DOS conio.h textmode() equivalent. More...
 
int caca_conio_ungetch (int ch)
 DOS conio.h ungetch() equivalent. More...
 
int caca_conio_wherex (void)
 DOS conio.h wherex() equivalent. More...
 
int caca_conio_wherey (void)
 DOS conio.h wherey() equivalent. More...
 
void caca_conio_window (int left, int top, int right, int bottom)
 DOS conio.h window() equivalent. More...
 
int cucul_putchar (caca_canvas_t *, int, int, unsigned long int)
 
unsigned long int cucul_getchar (caca_canvas_t *, int, int)
 
int cucul_putstr (caca_canvas_t *, int, int, char const *)
 
int cucul_set_color (caca_canvas_t *, unsigned char, unsigned char)
 
int cucul_set_truecolor (caca_canvas_t *, unsigned int, unsigned int)
 
unsigned int cucul_get_canvas_frame_count (caca_canvas_t *)
 
int cucul_set_canvas_frame (caca_canvas_t *, unsigned int)
 
int cucul_create_canvas_frame (caca_canvas_t *, unsigned int)
 
int cucul_free_canvas_frame (caca_canvas_t *, unsigned int)
 
cucul_buffer_tcucul_load_memory (void *, unsigned long int)
 
cucul_buffer_tcucul_load_file (char const *)
 
unsigned long int cucul_get_buffer_size (cucul_buffer_t *)
 
void * cucul_get_buffer_data (cucul_buffer_t *)
 
int cucul_free_buffer (cucul_buffer_t *)
 
cucul_buffer_tcucul_export_canvas (caca_canvas_t *, char const *)
 
caca_canvas_tcucul_import_canvas (cucul_buffer_t *, char const *)
 
ssize_t caca_import_memory (caca_canvas_t *, void const *, size_t, char const *)
 
ssize_t caca_import_file (caca_canvas_t *, char const *, char const *)
 
void * caca_export_memory (caca_canvas_t const *, char const *, size_t *)
 
int cucul_rotate (caca_canvas_t *)
 
int cucul_set_dither_invert (caca_dither_t *, int)
 
int cucul_set_dither_mode (caca_dither_t *, char const *)
 
const char *const * cucul_get_dither_mode_list (caca_dither_t const *)
 

Variables

int caca_optind
 
char * caca_optarg
 
int caca_conio_directvideo
 DOS direct video control. More...
 
int caca_conio__wscroll
 DOS scrolling control. More...
 

Detailed Description

The libcaca public header.

Author
Sam Hocevar sam@h.nosp@m.ocev.nosp@m.ar.ne.nosp@m.t This header contains the public types and functions that applications using libcaca may use.

Definition in file caca.h.

Macro Definition Documentation

◆ __extern

#define __extern   extern

Definition at line 37 of file caca.h.

◆ CACA_ALIAS

#define CACA_ALIAS (   x)

Definition at line 689 of file caca.h.

◆ CACA_API_VERSION_1

#define CACA_API_VERSION_1

libcaca API version

Definition at line 41 of file caca.h.

◆ CACA_DEPRECATED

#define CACA_DEPRECATED

Definition at line 683 of file caca.h.

◆ caca_get_cursor_x

#define caca_get_cursor_x   caca_wherex

Definition at line 795 of file caca.h.

◆ caca_get_cursor_y

#define caca_get_cursor_y   caca_wherey

Definition at line 796 of file caca.h.

◆ CACA_WEAK

#define CACA_WEAK

Definition at line 695 of file caca.h.

◆ cucul_attr_to_ansi

#define cucul_attr_to_ansi   caca_attr_to_ansi

Definition at line 856 of file caca.h.

◆ cucul_attr_to_ansi_bg

#define cucul_attr_to_ansi_bg   caca_attr_to_ansi_bg

Definition at line 858 of file caca.h.

◆ cucul_attr_to_ansi_fg

#define cucul_attr_to_ansi_fg   caca_attr_to_ansi_fg

Definition at line 857 of file caca.h.

◆ cucul_attr_to_argb64

#define cucul_attr_to_argb64   caca_attr_to_argb64

Definition at line 861 of file caca.h.

◆ cucul_attr_to_rgb12_bg

#define cucul_attr_to_rgb12_bg   caca_attr_to_rgb12_bg

Definition at line 860 of file caca.h.

◆ cucul_attr_to_rgb12_fg

#define cucul_attr_to_rgb12_fg   caca_attr_to_rgb12_fg

Definition at line 859 of file caca.h.

◆ CUCUL_BLACK

#define CUCUL_BLACK   CACA_BLACK

Definition at line 770 of file caca.h.

◆ CUCUL_BLINK

#define CUCUL_BLINK   CACA_BLINK

Definition at line 792 of file caca.h.

◆ cucul_blit

#define cucul_blit   caca_blit

Definition at line 818 of file caca.h.

◆ CUCUL_BLUE

#define CUCUL_BLUE   CACA_BLUE

Definition at line 771 of file caca.h.

◆ CUCUL_BOLD

#define CUCUL_BOLD   CACA_BOLD

Definition at line 789 of file caca.h.

◆ CUCUL_BROWN

#define CUCUL_BROWN   CACA_BROWN

Definition at line 776 of file caca.h.

◆ cucul_canvas_set_figfont

#define cucul_canvas_set_figfont   caca_canvas_set_figfont

Definition at line 846 of file caca.h.

◆ cucul_canvas_t

#define cucul_canvas_t   caca_canvas_t

Definition at line 763 of file caca.h.

◆ cucul_clear_canvas

#define cucul_clear_canvas   caca_clear_canvas

Definition at line 814 of file caca.h.

◆ CUCUL_COLOR_BLACK

#define CUCUL_COLOR_BLACK   CACA_BLACK

Definition at line 743 of file caca.h.

◆ CUCUL_COLOR_BLUE

#define CUCUL_COLOR_BLUE   CACA_BLUE

Definition at line 744 of file caca.h.

◆ CUCUL_COLOR_BROWN

#define CUCUL_COLOR_BROWN   CACA_BROWN

Definition at line 749 of file caca.h.

◆ CUCUL_COLOR_CYAN

#define CUCUL_COLOR_CYAN   CACA_CYAN

Definition at line 746 of file caca.h.

◆ CUCUL_COLOR_DARKGRAY

#define CUCUL_COLOR_DARKGRAY   CACA_DARKGRAY

Definition at line 751 of file caca.h.

◆ CUCUL_COLOR_DEFAULT

#define CUCUL_COLOR_DEFAULT   CACA_DEFAULT

Definition at line 759 of file caca.h.

◆ CUCUL_COLOR_GREEN

#define CUCUL_COLOR_GREEN   CACA_GREEN

Definition at line 745 of file caca.h.

◆ CUCUL_COLOR_LIGHTBLUE

#define CUCUL_COLOR_LIGHTBLUE   CACA_LIGHTBLUE

Definition at line 752 of file caca.h.

◆ CUCUL_COLOR_LIGHTCYAN

#define CUCUL_COLOR_LIGHTCYAN   CACA_LIGHTCYAN

Definition at line 754 of file caca.h.

◆ CUCUL_COLOR_LIGHTGRAY

#define CUCUL_COLOR_LIGHTGRAY   CACA_LIGHTGRAY

Definition at line 750 of file caca.h.

◆ CUCUL_COLOR_LIGHTGREEN

#define CUCUL_COLOR_LIGHTGREEN   CACA_LIGHTGREEN

Definition at line 753 of file caca.h.

◆ CUCUL_COLOR_LIGHTMAGENTA

#define CUCUL_COLOR_LIGHTMAGENTA   CACA_LIGHTMAGENTA

Definition at line 756 of file caca.h.

◆ CUCUL_COLOR_LIGHTRED

#define CUCUL_COLOR_LIGHTRED   CACA_LIGHTRED

Definition at line 755 of file caca.h.

◆ CUCUL_COLOR_MAGENTA

#define CUCUL_COLOR_MAGENTA   CACA_MAGENTA

Definition at line 748 of file caca.h.

◆ CUCUL_COLOR_RED

#define CUCUL_COLOR_RED   CACA_RED

Definition at line 747 of file caca.h.

◆ CUCUL_COLOR_TRANSPARENT

#define CUCUL_COLOR_TRANSPARENT   CACA_TRANSPARENT

Definition at line 760 of file caca.h.

◆ CUCUL_COLOR_WHITE

#define CUCUL_COLOR_WHITE   CACA_YELLOW

Definition at line 758 of file caca.h.

◆ CUCUL_COLOR_YELLOW

#define CUCUL_COLOR_YELLOW   CACA_YELLOW

Definition at line 757 of file caca.h.

◆ cucul_cp437_to_utf32

#define cucul_cp437_to_utf32   caca_cp437_to_utf32

Definition at line 839 of file caca.h.

◆ cucul_create_canvas

#define cucul_create_canvas   caca_create_canvas

Definition at line 823 of file caca.h.

◆ cucul_create_dither

#define cucul_create_dither   caca_create_dither

Definition at line 877 of file caca.h.

◆ cucul_create_frame

#define cucul_create_frame   caca_create_frame

Definition at line 911 of file caca.h.

◆ CUCUL_CYAN

#define CUCUL_CYAN   CACA_CYAN

Definition at line 773 of file caca.h.

◆ CUCUL_DARKGRAY

#define CUCUL_DARKGRAY   CACA_DARKGRAY

Definition at line 778 of file caca.h.

◆ CUCUL_DEFAULT

#define CUCUL_DEFAULT   CACA_DEFAULT

Definition at line 786 of file caca.h.

◆ cucul_display_t

#define cucul_display_t   caca_display_t

Definition at line 767 of file caca.h.

◆ cucul_dither_bitmap

#define cucul_dither_bitmap   caca_dither_bitmap

Definition at line 897 of file caca.h.

◆ cucul_dither_t

#define cucul_dither_t   caca_dither_t

Definition at line 764 of file caca.h.

◆ cucul_draw_box

#define cucul_draw_box   caca_draw_box

Definition at line 903 of file caca.h.

◆ cucul_draw_circle

#define cucul_draw_circle   caca_draw_circle

Definition at line 842 of file caca.h.

◆ cucul_draw_cp437_box

#define cucul_draw_cp437_box   caca_draw_cp437_box

Definition at line 905 of file caca.h.

◆ cucul_draw_ellipse

#define cucul_draw_ellipse   caca_draw_ellipse

Definition at line 843 of file caca.h.

◆ cucul_draw_line

#define cucul_draw_line   caca_draw_line

Definition at line 899 of file caca.h.

◆ cucul_draw_polyline

#define cucul_draw_polyline   caca_draw_polyline

Definition at line 900 of file caca.h.

◆ cucul_draw_thin_box

#define cucul_draw_thin_box   caca_draw_thin_box

Definition at line 904 of file caca.h.

◆ cucul_draw_thin_ellipse

#define cucul_draw_thin_ellipse   caca_draw_thin_ellipse

Definition at line 844 of file caca.h.

◆ cucul_draw_thin_line

#define cucul_draw_thin_line   caca_draw_thin_line

Definition at line 901 of file caca.h.

◆ cucul_draw_thin_polyline

#define cucul_draw_thin_polyline   caca_draw_thin_polyline

Definition at line 902 of file caca.h.

◆ cucul_draw_thin_triangle

#define cucul_draw_thin_triangle   caca_draw_thin_triangle

Definition at line 798 of file caca.h.

◆ cucul_draw_triangle

#define cucul_draw_triangle   caca_draw_triangle

Definition at line 797 of file caca.h.

◆ cucul_event_t

#define cucul_event_t   caca_event_t

Definition at line 768 of file caca.h.

◆ cucul_export_memory

#define cucul_export_memory   caca_export_memory

Definition at line 833 of file caca.h.

◆ cucul_file_close

#define cucul_file_close   caca_file_close

Definition at line 871 of file caca.h.

◆ cucul_file_eof

#define cucul_file_eof   caca_file_eof

Definition at line 876 of file caca.h.

◆ cucul_file_gets

#define cucul_file_gets   caca_file_gets

Definition at line 875 of file caca.h.

◆ cucul_file_open

#define cucul_file_open   caca_file_open

Definition at line 870 of file caca.h.

◆ cucul_file_read

#define cucul_file_read   caca_file_read

Definition at line 873 of file caca.h.

◆ cucul_file_t

#define cucul_file_t   caca_file_t

Definition at line 766 of file caca.h.

◆ cucul_file_tell

#define cucul_file_tell   caca_file_tell

Definition at line 872 of file caca.h.

◆ cucul_file_write

#define cucul_file_write   caca_file_write

Definition at line 874 of file caca.h.

◆ cucul_fill_box

#define cucul_fill_box   caca_fill_box

Definition at line 906 of file caca.h.

◆ cucul_fill_ellipse

#define cucul_fill_ellipse   caca_fill_ellipse

Definition at line 845 of file caca.h.

◆ cucul_fill_triangle

#define cucul_fill_triangle   caca_fill_triangle

Definition at line 799 of file caca.h.

◆ cucul_flip

#define cucul_flip   caca_flip

Definition at line 863 of file caca.h.

◆ cucul_flop

#define cucul_flop   caca_flop

Definition at line 864 of file caca.h.

◆ cucul_flush_figlet

#define cucul_flush_figlet   caca_flush_figlet

Definition at line 848 of file caca.h.

◆ cucul_font_t

#define cucul_font_t   caca_font_t

Definition at line 765 of file caca.h.

◆ cucul_free_canvas

#define cucul_free_canvas   caca_free_canvas

Definition at line 831 of file caca.h.

◆ cucul_free_dither

#define cucul_free_dither   caca_free_dither

Definition at line 898 of file caca.h.

◆ cucul_free_font

#define cucul_free_font   caca_free_font

Definition at line 806 of file caca.h.

◆ cucul_free_frame

#define cucul_free_frame   caca_free_frame

Definition at line 912 of file caca.h.

◆ cucul_get_attr

#define cucul_get_attr   caca_get_attr

Definition at line 851 of file caca.h.

◆ cucul_get_canvas_attrs

#define cucul_get_canvas_attrs   caca_get_canvas_attrs

Definition at line 830 of file caca.h.

◆ cucul_get_canvas_chars

#define cucul_get_canvas_chars   caca_get_canvas_chars

Definition at line 829 of file caca.h.

◆ cucul_get_canvas_handle_x

#define cucul_get_canvas_handle_x   caca_get_canvas_handle_x

Definition at line 816 of file caca.h.

◆ cucul_get_canvas_handle_y

#define cucul_get_canvas_handle_y   caca_get_canvas_handle_y

Definition at line 817 of file caca.h.

◆ cucul_get_canvas_height

#define cucul_get_canvas_height   caca_get_canvas_height

Definition at line 828 of file caca.h.

◆ cucul_get_canvas_width

#define cucul_get_canvas_width   caca_get_canvas_width

Definition at line 827 of file caca.h.

◆ cucul_get_char

#define cucul_get_char   caca_get_char

Definition at line 811 of file caca.h.

◆ cucul_get_cursor_x

#define cucul_get_cursor_x   caca_wherex

Definition at line 808 of file caca.h.

◆ cucul_get_cursor_y

#define cucul_get_cursor_y   caca_wherey

Definition at line 809 of file caca.h.

◆ cucul_get_dither_algorithm

#define cucul_get_dither_algorithm   caca_get_dither_algorithm

Definition at line 896 of file caca.h.

◆ cucul_get_dither_algorithm_list

#define cucul_get_dither_algorithm_list   caca_get_dither_algorithm_list

Definition at line 895 of file caca.h.

◆ cucul_get_dither_antialias

#define cucul_get_dither_antialias   caca_get_dither_antialias

Definition at line 887 of file caca.h.

◆ cucul_get_dither_antialias_list

#define cucul_get_dither_antialias_list   caca_get_dither_antialias_list

Definition at line 886 of file caca.h.

◆ cucul_get_dither_brightness

#define cucul_get_dither_brightness   caca_get_dither_brightness

Definition at line 880 of file caca.h.

◆ cucul_get_dither_charset

#define cucul_get_dither_charset   caca_get_dither_charset

Definition at line 893 of file caca.h.

◆ cucul_get_dither_charset_list

#define cucul_get_dither_charset_list   caca_get_dither_charset_list

Definition at line 892 of file caca.h.

◆ cucul_get_dither_color

#define cucul_get_dither_color   caca_get_dither_color

Definition at line 890 of file caca.h.

◆ cucul_get_dither_color_list

#define cucul_get_dither_color_list   caca_get_dither_color_list

Definition at line 889 of file caca.h.

◆ cucul_get_dither_contrast

#define cucul_get_dither_contrast   caca_get_dither_contrast

Definition at line 884 of file caca.h.

◆ cucul_get_dither_gamma

#define cucul_get_dither_gamma   caca_get_dither_gamma

Definition at line 882 of file caca.h.

◆ cucul_get_export_list

#define cucul_get_export_list   caca_get_export_list

Definition at line 834 of file caca.h.

◆ cucul_get_font_blocks

#define cucul_get_font_blocks   caca_get_font_blocks

Definition at line 804 of file caca.h.

◆ cucul_get_font_height

#define cucul_get_font_height   caca_get_font_height

Definition at line 803 of file caca.h.

◆ cucul_get_font_list

#define cucul_get_font_list   caca_get_font_list

Definition at line 801 of file caca.h.

◆ cucul_get_font_width

#define cucul_get_font_width   caca_get_font_width

Definition at line 802 of file caca.h.

◆ cucul_get_frame_count

#define cucul_get_frame_count   caca_get_frame_count

Definition at line 907 of file caca.h.

◆ cucul_get_frame_name

#define cucul_get_frame_name   caca_get_frame_name

Definition at line 909 of file caca.h.

◆ cucul_get_import_list

#define cucul_get_import_list   caca_get_import_list

Definition at line 822 of file caca.h.

◆ cucul_get_version

#define cucul_get_version   caca_get_version

Definition at line 835 of file caca.h.

◆ cucul_getchar

#define cucul_getchar   caca_getchar

Definition at line 850 of file caca.h.

◆ cucul_gotoxy

#define cucul_gotoxy   caca_gotoxy

Definition at line 807 of file caca.h.

◆ CUCUL_GREEN

#define CUCUL_GREEN   CACA_GREEN

Definition at line 772 of file caca.h.

◆ cucul_import_file

#define cucul_import_file   caca_import_file

Definition at line 821 of file caca.h.

◆ cucul_import_memory

#define cucul_import_memory   caca_import_memory

Definition at line 820 of file caca.h.

◆ cucul_invert

#define cucul_invert   caca_invert

Definition at line 862 of file caca.h.

◆ CUCUL_ITALICS

#define CUCUL_ITALICS   CACA_ITALICS

Definition at line 790 of file caca.h.

◆ CUCUL_LIGHTBLUE

#define CUCUL_LIGHTBLUE   CACA_LIGHTBLUE

Definition at line 779 of file caca.h.

◆ CUCUL_LIGHTCYAN

#define CUCUL_LIGHTCYAN   CACA_LIGHTCYAN

Definition at line 781 of file caca.h.

◆ CUCUL_LIGHTGRAY

#define CUCUL_LIGHTGRAY   CACA_LIGHTGRAY

Definition at line 777 of file caca.h.

◆ CUCUL_LIGHTGREEN

#define CUCUL_LIGHTGREEN   CACA_LIGHTGREEN

Definition at line 780 of file caca.h.

◆ CUCUL_LIGHTMAGENTA

#define CUCUL_LIGHTMAGENTA   CACA_LIGHTMAGENTA

Definition at line 783 of file caca.h.

◆ CUCUL_LIGHTRED

#define CUCUL_LIGHTRED   CACA_LIGHTRED

Definition at line 782 of file caca.h.

◆ cucul_load_font

#define cucul_load_font   caca_load_font

Definition at line 800 of file caca.h.

◆ CUCUL_MAGENTA

#define CUCUL_MAGENTA   CACA_MAGENTA

Definition at line 775 of file caca.h.

◆ cucul_manage_canvas

#define cucul_manage_canvas   caca_manage_canvas

Definition at line 824 of file caca.h.

◆ cucul_printf

#define cucul_printf   caca_printf

Definition at line 813 of file caca.h.

◆ cucul_put_attr

#define cucul_put_attr   caca_put_attr

Definition at line 853 of file caca.h.

◆ cucul_put_char

#define cucul_put_char   caca_put_char

Definition at line 810 of file caca.h.

◆ cucul_put_figchar

#define cucul_put_figchar   caca_put_figchar

Definition at line 847 of file caca.h.

◆ cucul_put_str

#define cucul_put_str   caca_put_str

Definition at line 812 of file caca.h.

◆ cucul_putchar

#define cucul_putchar   caca_putchar

Definition at line 849 of file caca.h.

◆ cucul_rand

#define cucul_rand   caca_rand

Definition at line 832 of file caca.h.

◆ CUCUL_RED

#define CUCUL_RED   CACA_RED

Definition at line 774 of file caca.h.

◆ cucul_render_canvas

#define cucul_render_canvas   caca_render_canvas

Definition at line 805 of file caca.h.

◆ cucul_rotate_180

#define cucul_rotate_180   caca_rotate_180

Definition at line 865 of file caca.h.

◆ cucul_rotate_left

#define cucul_rotate_left   caca_rotate_left

Definition at line 866 of file caca.h.

◆ cucul_rotate_right

#define cucul_rotate_right   caca_rotate_right

Definition at line 867 of file caca.h.

◆ cucul_set_attr

#define cucul_set_attr   caca_set_attr

Definition at line 852 of file caca.h.

◆ cucul_set_canvas_boundaries

#define cucul_set_canvas_boundaries   caca_set_canvas_boundaries

Definition at line 819 of file caca.h.

◆ cucul_set_canvas_handle

#define cucul_set_canvas_handle   caca_set_canvas_handle

Definition at line 815 of file caca.h.

◆ cucul_set_canvas_size

#define cucul_set_canvas_size   caca_set_canvas_size

Definition at line 826 of file caca.h.

◆ cucul_set_color_ansi

#define cucul_set_color_ansi   caca_set_color_ansi

Definition at line 854 of file caca.h.

◆ cucul_set_color_argb

#define cucul_set_color_argb   caca_set_color_argb

Definition at line 855 of file caca.h.

◆ cucul_set_dither_algorithm

#define cucul_set_dither_algorithm   caca_set_dither_algorithm

Definition at line 894 of file caca.h.

◆ cucul_set_dither_antialias

#define cucul_set_dither_antialias   caca_set_dither_antialias

Definition at line 885 of file caca.h.

◆ cucul_set_dither_brightness

#define cucul_set_dither_brightness   caca_set_dither_brightness

Definition at line 879 of file caca.h.

◆ cucul_set_dither_charset

#define cucul_set_dither_charset   caca_set_dither_charset

Definition at line 891 of file caca.h.

◆ cucul_set_dither_color

#define cucul_set_dither_color   caca_set_dither_color

Definition at line 888 of file caca.h.

◆ cucul_set_dither_contrast

#define cucul_set_dither_contrast   caca_set_dither_contrast

Definition at line 883 of file caca.h.

◆ cucul_set_dither_gamma

#define cucul_set_dither_gamma   caca_set_dither_gamma

Definition at line 881 of file caca.h.

◆ cucul_set_dither_palette

#define cucul_set_dither_palette   caca_set_dither_palette

Definition at line 878 of file caca.h.

◆ cucul_set_frame

#define cucul_set_frame   caca_set_frame

Definition at line 908 of file caca.h.

◆ cucul_set_frame_name

#define cucul_set_frame_name   caca_set_frame_name

Definition at line 910 of file caca.h.

◆ cucul_stretch_left

#define cucul_stretch_left   caca_stretch_left

Definition at line 868 of file caca.h.

◆ cucul_stretch_right

#define cucul_stretch_right   caca_stretch_right

Definition at line 869 of file caca.h.

◆ CUCUL_TRANSPARENT

#define CUCUL_TRANSPARENT   CACA_TRANSPARENT

Definition at line 787 of file caca.h.

◆ CUCUL_UNDERLINE

#define CUCUL_UNDERLINE   CACA_UNDERLINE

Definition at line 791 of file caca.h.

◆ cucul_unmanage_canvas

#define cucul_unmanage_canvas   caca_unmanage_canvas

Definition at line 825 of file caca.h.

◆ cucul_utf32_is_fullwidth

#define cucul_utf32_is_fullwidth   caca_utf32_is_fullwidth

Definition at line 841 of file caca.h.

◆ cucul_utf32_to_ascii

#define cucul_utf32_to_ascii   caca_utf32_to_ascii

Definition at line 840 of file caca.h.

◆ cucul_utf32_to_cp437

#define cucul_utf32_to_cp437   caca_utf32_to_cp437

Definition at line 838 of file caca.h.

◆ cucul_utf32_to_utf8

#define cucul_utf32_to_utf8   caca_utf32_to_utf8

Definition at line 837 of file caca.h.

◆ cucul_utf8_to_utf32

#define cucul_utf8_to_utf32   caca_utf8_to_utf32

Definition at line 836 of file caca.h.

◆ CUCUL_WHITE

#define CUCUL_WHITE   CACA_YELLOW

Definition at line 785 of file caca.h.

◆ CUCUL_YELLOW

#define CUCUL_YELLOW   CACA_YELLOW

Definition at line 784 of file caca.h.

Typedef Documentation

◆ caca_canvas_t

typedef struct caca_canvas caca_canvas_t

libcaca canvas

Definition at line 49 of file caca.h.

◆ caca_charfont_t

character font structure

Definition at line 53 of file caca.h.

◆ caca_display_t

typedef struct caca_display caca_display_t

libcaca display context

Definition at line 59 of file caca.h.

◆ caca_dither_t

typedef struct caca_dither caca_dither_t

dither structure

Definition at line 51 of file caca.h.

◆ caca_event_t

typedef struct caca_event caca_event_t

libcaca event structure

Definition at line 61 of file caca.h.

◆ caca_file_t

typedef struct caca_file caca_file_t

file handle structure

Definition at line 57 of file caca.h.

◆ caca_font_t

typedef struct caca_font caca_font_t

bitmap font structure

Definition at line 55 of file caca.h.

◆ cucul_buffer_t

typedef struct cucul_buffer cucul_buffer_t

Definition at line 678 of file caca.h.

Enumeration Type Documentation

◆ CACA_CONIO_COLORS

DOS colours.

This enum lists the colour values for the DOS conio.h compatibility layer.

Enumerator
CACA_CONIO_BLINK 
CACA_CONIO_BLACK 
CACA_CONIO_BLUE 
CACA_CONIO_GREEN 
CACA_CONIO_CYAN 
CACA_CONIO_RED 
CACA_CONIO_MAGENTA 
CACA_CONIO_BROWN 
CACA_CONIO_LIGHTGRAY 
CACA_CONIO_DARKGRAY 
CACA_CONIO_LIGHTBLUE 
CACA_CONIO_LIGHTGREEN 
CACA_CONIO_LIGHTCYAN 
CACA_CONIO_LIGHTRED 
CACA_CONIO_LIGHTMAGENTA 
CACA_CONIO_YELLOW 
CACA_CONIO_WHITE 

Definition at line 554 of file caca.h.

◆ CACA_CONIO_CURSOR

DOS cursor modes.

This enum lists the cursor mode values for the DOS conio.h compatibility layer.

Enumerator
CACA_CONIO__NOCURSOR 
CACA_CONIO__SOLIDCURSOR 
CACA_CONIO__NORMALCURSOR 

Definition at line 580 of file caca.h.

◆ CACA_CONIO_MODE

DOS video modes.

This enum lists the video mode values for the DOS conio.h compatibility layer.

Enumerator
CACA_CONIO_LASTMODE 
CACA_CONIO_BW40 
CACA_CONIO_C40 
CACA_CONIO_BW80 
CACA_CONIO_C80 
CACA_CONIO_MONO 
CACA_CONIO_C4350 

Definition at line 592 of file caca.h.

◆ caca_event_type

User event type enumeration.

This enum serves two purposes:

  • Build listening masks for caca_get_event().
  • Define the type of a caca_event_t.
Enumerator
CACA_EVENT_NONE 

No event.

CACA_EVENT_KEY_PRESS 

A key was pressed.

CACA_EVENT_KEY_RELEASE 

A key was released.

CACA_EVENT_MOUSE_PRESS 

A mouse button was pressed.

CACA_EVENT_MOUSE_RELEASE 

A mouse button was released.

CACA_EVENT_MOUSE_MOTION 

The mouse was moved.

CACA_EVENT_RESIZE 

The window was resized.

CACA_EVENT_QUIT 

The user requested to quit.

CACA_EVENT_ANY 

Bitmask for any event.

Definition at line 107 of file caca.h.

◆ caca_key

enum caca_key

Special key values.

Special key values returned by caca_get_event() for which there is no printable ASCII equivalent.

Enumerator
CACA_KEY_UNKNOWN 

Unknown key.

CACA_KEY_CTRL_A 

The Ctrl-A key.

CACA_KEY_CTRL_B 

The Ctrl-B key.

CACA_KEY_CTRL_C 

The Ctrl-C key.

CACA_KEY_CTRL_D 

The Ctrl-D key.

CACA_KEY_CTRL_E 

The Ctrl-E key.

CACA_KEY_CTRL_F 

The Ctrl-F key.

CACA_KEY_CTRL_G 

The Ctrl-G key.

CACA_KEY_BACKSPACE 

The backspace key.

CACA_KEY_TAB 

The tabulation key.

CACA_KEY_CTRL_J 

The Ctrl-J key.

CACA_KEY_CTRL_K 

The Ctrl-K key.

CACA_KEY_CTRL_L 

The Ctrl-L key.

CACA_KEY_RETURN 

The return key.

CACA_KEY_CTRL_N 

The Ctrl-N key.

CACA_KEY_CTRL_O 

The Ctrl-O key.

CACA_KEY_CTRL_P 

The Ctrl-P key.

CACA_KEY_CTRL_Q 

The Ctrl-Q key.

CACA_KEY_CTRL_R 

The Ctrl-R key.

CACA_KEY_PAUSE 

The pause key.

CACA_KEY_CTRL_T 

The Ctrl-T key.

CACA_KEY_CTRL_U 

The Ctrl-U key.

CACA_KEY_CTRL_V 

The Ctrl-V key.

CACA_KEY_CTRL_W 

The Ctrl-W key.

CACA_KEY_CTRL_X 

The Ctrl-X key.

CACA_KEY_CTRL_Y 

The Ctrl-Y key.

CACA_KEY_CTRL_Z 

The Ctrl-Z key.

CACA_KEY_ESCAPE 

The escape key.

CACA_KEY_DELETE 

The delete key.

CACA_KEY_UP 

The up arrow key.

CACA_KEY_DOWN 

The down arrow key.

CACA_KEY_LEFT 

The left arrow key.

CACA_KEY_RIGHT 

The right arrow key.

CACA_KEY_INSERT 

The insert key.

CACA_KEY_HOME 

The home key.

CACA_KEY_END 

The end key.

CACA_KEY_PAGEUP 

The page up key.

CACA_KEY_PAGEDOWN 

The page down key.

CACA_KEY_F1 

The F1 key.

CACA_KEY_F2 

The F2 key.

CACA_KEY_F3 

The F3 key.

CACA_KEY_F4 

The F4 key.

CACA_KEY_F5 

The F5 key.

CACA_KEY_F6 

The F6 key.

CACA_KEY_F7 

The F7 key.

CACA_KEY_F8 

The F8 key.

CACA_KEY_F9 

The F9 key.

CACA_KEY_F10 

The F10 key.

CACA_KEY_F11 

The F11 key.

CACA_KEY_F12 

The F12 key.

CACA_KEY_F13 

The F13 key.

CACA_KEY_F14 

The F14 key.

CACA_KEY_F15 

The F15 key.

Definition at line 161 of file caca.h.

Function Documentation

◆ caca_export_memory()

void* caca_export_memory ( caca_canvas_t const *  ,
char const *  ,
size_t *   
)

◆ caca_import_file()

ssize_t caca_import_file ( caca_canvas_t ,
char const *  ,
char const *   
)

◆ caca_import_memory()

ssize_t caca_import_memory ( caca_canvas_t ,
void const *  ,
size_t  ,
char const *   
)

◆ cucul_create_canvas_frame()

int cucul_create_canvas_frame ( caca_canvas_t ,
unsigned int   
)

Definition at line 152 of file legacy.c.

References caca_create_frame(), and cv.

◆ cucul_export_canvas()

cucul_buffer_t* cucul_export_canvas ( caca_canvas_t ,
char const *   
)

◆ cucul_free_buffer()

int cucul_free_buffer ( cucul_buffer_t )

Definition at line 232 of file legacy.c.

References cucul_buffer::data, and cucul_buffer::user_data.

◆ cucul_free_canvas_frame()

int cucul_free_canvas_frame ( caca_canvas_t ,
unsigned int   
)

Definition at line 157 of file legacy.c.

References caca_free_frame(), and cv.

◆ cucul_get_buffer_data()

void* cucul_get_buffer_data ( cucul_buffer_t )

Definition at line 227 of file legacy.c.

References cucul_buffer::data.

◆ cucul_get_buffer_size()

unsigned long int cucul_get_buffer_size ( cucul_buffer_t )

Definition at line 222 of file legacy.c.

References cucul_buffer::size.

◆ cucul_get_canvas_frame_count()

unsigned int cucul_get_canvas_frame_count ( caca_canvas_t )

Definition at line 142 of file legacy.c.

References caca_get_frame_count(), and cv.

◆ cucul_get_dither_mode_list()

const char* const * cucul_get_dither_mode_list ( caca_dither_t const *  )

Definition at line 87 of file legacy.c.

References caca_get_dither_algorithm_list().

◆ cucul_getchar()

unsigned long int cucul_getchar ( caca_canvas_t ,
int  ,
int   
)

◆ cucul_import_canvas()

caca_canvas_t* cucul_import_canvas ( cucul_buffer_t ,
char const *   
)

◆ cucul_load_file()

cucul_buffer_t* cucul_load_file ( char const *  )

◆ cucul_load_memory()

cucul_buffer_t* cucul_load_memory ( void *  ,
unsigned long int   
)

Definition at line 166 of file legacy.c.

References cucul_buffer::data, cucul_buffer::size, and cucul_buffer::user_data.

◆ cucul_putchar()

int cucul_putchar ( caca_canvas_t ,
int  ,
int  ,
unsigned long int   
)

◆ cucul_putstr()

int cucul_putstr ( caca_canvas_t ,
int  ,
int  ,
char const *   
)

Definition at line 50 of file legacy.c.

References caca_put_str(), cv, x, and y.

◆ cucul_rotate()

int cucul_rotate ( caca_canvas_t )

Definition at line 246 of file legacy.c.

References caca_rotate_180(), and cv.

◆ cucul_set_canvas_frame()

int cucul_set_canvas_frame ( caca_canvas_t ,
unsigned int   
)

Definition at line 147 of file legacy.c.

References caca_set_frame(), and cv.

◆ cucul_set_color()

int cucul_set_color ( caca_canvas_t ,
unsigned char  ,
unsigned char   
)

Definition at line 59 of file legacy.c.

References caca_set_color_ansi(), and cv.

◆ cucul_set_dither_invert()

int cucul_set_dither_invert ( caca_dither_t ,
int   
)

Definition at line 72 of file legacy.c.

References caca_get_dither_gamma(), and caca_set_dither_gamma().

◆ cucul_set_dither_mode()

int cucul_set_dither_mode ( caca_dither_t ,
char const *   
)

Definition at line 82 of file legacy.c.

References caca_set_dither_algorithm().

◆ cucul_set_truecolor()

int cucul_set_truecolor ( caca_canvas_t ,
unsigned int  ,
unsigned int   
)

Definition at line 64 of file legacy.c.

References caca_set_color_argb(), and cv.

Variable Documentation

◆ caca_conio__wscroll

int caca_conio__wscroll

DOS scrolling control.

Definition at line 44 of file caca_conio.c.

◆ caca_conio_directvideo

int caca_conio_directvideo

DOS direct video control.

Definition at line 43 of file caca_conio.c.