.TH "caca.h" 3caca "Wed Mar 10 2021" "Version 0.99.beta19" "libcaca" \" -*- nroff -*- .ad l .nh .SH NAME caca.h \- The \fIlibcaca\fP public header\&. .SH SYNOPSIS .br .PP .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBcaca_event\fP" .br .RI "Handling of user events\&. " .ti -1c .RI "struct \fBcaca_option\fP" .br .RI "Option parsing\&. " .ti -1c .RI "struct \fBcaca_conio_text_info\fP" .br .RI "DOS text area information\&. " .in -1c .SS "Macros" .in +1c .ti -1c .RI "#define \fBCACA_API_VERSION_1\fP" .br .ti -1c .RI "#define \fBCACA_MAGIC_FULLWIDTH\fP 0x000ffffe" .br .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef struct caca_canvas \fBcaca_canvas_t\fP" .br .ti -1c .RI "typedef struct caca_dither \fBcaca_dither_t\fP" .br .ti -1c .RI "typedef struct caca_charfont \fBcaca_charfont_t\fP" .br .ti -1c .RI "typedef struct caca_font \fBcaca_font_t\fP" .br .ti -1c .RI "typedef struct caca_file \fBcaca_file_t\fP" .br .ti -1c .RI "typedef struct caca_display \fBcaca_display_t\fP" .br .ti -1c .RI "typedef struct \fBcaca_event\fP \fBcaca_event_t\fP" .br .in -1c .SS "Enumerations" .in +1c .ti -1c .RI "enum \fBcaca_color\fP { \fBCACA_BLACK\fP = 0x00, \fBCACA_BLUE\fP = 0x01, \fBCACA_GREEN\fP = 0x02, \fBCACA_CYAN\fP = 0x03, \fBCACA_RED\fP = 0x04, \fBCACA_MAGENTA\fP = 0x05, \fBCACA_BROWN\fP = 0x06, \fBCACA_LIGHTGRAY\fP = 0x07, \fBCACA_DARKGRAY\fP = 0x08, \fBCACA_LIGHTBLUE\fP = 0x09, \fBCACA_LIGHTGREEN\fP = 0x0a, \fBCACA_LIGHTCYAN\fP = 0x0b, \fBCACA_LIGHTRED\fP = 0x0c, \fBCACA_LIGHTMAGENTA\fP = 0x0d, \fBCACA_YELLOW\fP = 0x0e, \fBCACA_WHITE\fP = 0x0f, \fBCACA_DEFAULT\fP = 0x10, \fBCACA_TRANSPARENT\fP = 0x20 }" .br .ti -1c .RI "enum \fBcaca_style\fP { \fBCACA_BOLD\fP = 0x01, \fBCACA_ITALICS\fP = 0x02, \fBCACA_UNDERLINE\fP = 0x04, \fBCACA_BLINK\fP = 0x08 }" .br .ti -1c .RI "enum \fBcaca_event_type\fP { \fBCACA_EVENT_NONE\fP = 0x0000, \fBCACA_EVENT_KEY_PRESS\fP = 0x0001, \fBCACA_EVENT_KEY_RELEASE\fP = 0x0002, \fBCACA_EVENT_MOUSE_PRESS\fP = 0x0004, \fBCACA_EVENT_MOUSE_RELEASE\fP = 0x0008, \fBCACA_EVENT_MOUSE_MOTION\fP = 0x0010, \fBCACA_EVENT_RESIZE\fP = 0x0020, \fBCACA_EVENT_QUIT\fP = 0x0040, \fBCACA_EVENT_ANY\fP = 0xffff }" .br .RI "User event type enumeration\&. " .ti -1c .RI "enum \fBcaca_key\fP { \fBCACA_KEY_UNKNOWN\fP = 0x00, \fBCACA_KEY_CTRL_A\fP = 0x01, \fBCACA_KEY_CTRL_B\fP = 0x02, \fBCACA_KEY_CTRL_C\fP = 0x03, \fBCACA_KEY_CTRL_D\fP = 0x04, \fBCACA_KEY_CTRL_E\fP = 0x05, \fBCACA_KEY_CTRL_F\fP = 0x06, \fBCACA_KEY_CTRL_G\fP = 0x07, \fBCACA_KEY_BACKSPACE\fP = 0x08, \fBCACA_KEY_TAB\fP = 0x09, \fBCACA_KEY_CTRL_J\fP = 0x0a, \fBCACA_KEY_CTRL_K\fP = 0x0b, \fBCACA_KEY_CTRL_L\fP = 0x0c, \fBCACA_KEY_RETURN\fP = 0x0d, \fBCACA_KEY_CTRL_N\fP = 0x0e, \fBCACA_KEY_CTRL_O\fP = 0x0f, \fBCACA_KEY_CTRL_P\fP = 0x10, \fBCACA_KEY_CTRL_Q\fP = 0x11, \fBCACA_KEY_CTRL_R\fP = 0x12, \fBCACA_KEY_PAUSE\fP = 0x13, \fBCACA_KEY_CTRL_T\fP = 0x14, \fBCACA_KEY_CTRL_U\fP = 0x15, \fBCACA_KEY_CTRL_V\fP = 0x16, \fBCACA_KEY_CTRL_W\fP = 0x17, \fBCACA_KEY_CTRL_X\fP = 0x18, \fBCACA_KEY_CTRL_Y\fP = 0x19, \fBCACA_KEY_CTRL_Z\fP = 0x1a, \fBCACA_KEY_ESCAPE\fP = 0x1b, \fBCACA_KEY_DELETE\fP = 0x7f, \fBCACA_KEY_UP\fP = 0x111, \fBCACA_KEY_DOWN\fP = 0x112, \fBCACA_KEY_LEFT\fP = 0x113, \fBCACA_KEY_RIGHT\fP = 0x114, \fBCACA_KEY_INSERT\fP = 0x115, \fBCACA_KEY_HOME\fP = 0x116, \fBCACA_KEY_END\fP = 0x117, \fBCACA_KEY_PAGEUP\fP = 0x118, \fBCACA_KEY_PAGEDOWN\fP = 0x119, \fBCACA_KEY_F1\fP = 0x11a, \fBCACA_KEY_F2\fP = 0x11b, \fBCACA_KEY_F3\fP = 0x11c, \fBCACA_KEY_F4\fP = 0x11d, \fBCACA_KEY_F5\fP = 0x11e, \fBCACA_KEY_F6\fP = 0x11f, \fBCACA_KEY_F7\fP = 0x120, \fBCACA_KEY_F8\fP = 0x121, \fBCACA_KEY_F9\fP = 0x122, \fBCACA_KEY_F10\fP = 0x123, \fBCACA_KEY_F11\fP = 0x124, \fBCACA_KEY_F12\fP = 0x125, \fBCACA_KEY_F13\fP = 0x126, \fBCACA_KEY_F14\fP = 0x127, \fBCACA_KEY_F15\fP = 0x128 }" .br .RI "Special key values\&. " .ti -1c .RI "enum \fBCACA_CONIO_COLORS\fP { \fBCACA_CONIO_BLINK\fP = 128, \fBCACA_CONIO_BLACK\fP = 0, \fBCACA_CONIO_BLUE\fP = 1, \fBCACA_CONIO_GREEN\fP = 2, \fBCACA_CONIO_CYAN\fP = 3, \fBCACA_CONIO_RED\fP = 4, \fBCACA_CONIO_MAGENTA\fP = 5, \fBCACA_CONIO_BROWN\fP = 6, \fBCACA_CONIO_LIGHTGRAY\fP = 7, \fBCACA_CONIO_DARKGRAY\fP = 8, \fBCACA_CONIO_LIGHTBLUE\fP = 9, \fBCACA_CONIO_LIGHTGREEN\fP = 10, \fBCACA_CONIO_LIGHTCYAN\fP = 11, \fBCACA_CONIO_LIGHTRED\fP = 12, \fBCACA_CONIO_LIGHTMAGENTA\fP = 13, \fBCACA_CONIO_YELLOW\fP = 14, \fBCACA_CONIO_WHITE\fP = 15 }" .br .RI "DOS colours\&. " .ti -1c .RI "enum \fBCACA_CONIO_CURSOR\fP { \fBCACA_CONIO__NOCURSOR\fP = 0, \fBCACA_CONIO__SOLIDCURSOR\fP = 1, \fBCACA_CONIO__NORMALCURSOR\fP = 2 }" .br .RI "DOS cursor modes\&. " .ti -1c .RI "enum \fBCACA_CONIO_MODE\fP { \fBCACA_CONIO_LASTMODE\fP = -1, \fBCACA_CONIO_BW40\fP = 0, \fBCACA_CONIO_C40\fP = 1, \fBCACA_CONIO_BW80\fP = 2, \fBCACA_CONIO_C80\fP = 3, \fBCACA_CONIO_MONO\fP = 7, \fBCACA_CONIO_C4350\fP = 64 }" .br .RI "DOS video modes\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "__extern \fBcaca_canvas_t\fP * \fBcaca_create_canvas\fP (int, int)" .br .RI "Initialise a \fIlibcaca\fP canvas\&. " .ti -1c .RI "__extern int \fBcaca_manage_canvas\fP (\fBcaca_canvas_t\fP *, int(*)(void *), void *)" .br .RI "Manage a canvas\&. " .ti -1c .RI "__extern int \fBcaca_unmanage_canvas\fP (\fBcaca_canvas_t\fP *, int(*)(void *), void *)" .br .RI "unmanage a canvas\&. " .ti -1c .RI "__extern int \fBcaca_set_canvas_size\fP (\fBcaca_canvas_t\fP *, int, int)" .br .RI "Resize a canvas\&. " .ti -1c .RI "__extern int \fBcaca_get_canvas_width\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get the canvas width\&. " .ti -1c .RI "__extern int \fBcaca_get_canvas_height\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get the canvas height\&. " .ti -1c .RI "__extern uint32_t const * \fBcaca_get_canvas_chars\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get the canvas character array\&. " .ti -1c .RI "__extern uint32_t const * \fBcaca_get_canvas_attrs\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get the canvas attribute array\&. " .ti -1c .RI "__extern int \fBcaca_free_canvas\fP (\fBcaca_canvas_t\fP *)" .br .RI "Free a \fIlibcaca\fP canvas\&. " .ti -1c .RI "__extern int \fBcaca_rand\fP (int, int)" .br .ti -1c .RI "__extern char const * \fBcaca_get_version\fP (void)" .br .RI "Return the \fIlibcaca\fP version\&. " .ti -1c .RI "__extern int \fBcaca_gotoxy\fP (\fBcaca_canvas_t\fP *, int, int)" .br .RI "Set cursor position\&. " .ti -1c .RI "__extern int \fBcaca_wherex\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get X cursor position\&. " .ti -1c .RI "__extern int \fBcaca_wherey\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get Y cursor position\&. " .ti -1c .RI "__extern int \fBcaca_put_char\fP (\fBcaca_canvas_t\fP *, int, int, uint32_t)" .br .RI "Print an ASCII or Unicode character\&. " .ti -1c .RI "__extern uint32_t \fBcaca_get_char\fP (\fBcaca_canvas_t\fP const *, int, int)" .br .RI "Get the Unicode character at the given coordinates\&. " .ti -1c .RI "__extern int \fBcaca_put_str\fP (\fBcaca_canvas_t\fP *, int, int, char const *)" .br .RI "Print a string\&. " .ti -1c .RI "__extern int \fBcaca_printf\fP (\fBcaca_canvas_t\fP *, int, int, char const *,\&.\&.\&.)" .br .RI "Print a formated string\&. " .ti -1c .RI "__extern int \fBcaca_vprintf\fP (\fBcaca_canvas_t\fP *, int, int, char const *, va_list)" .br .RI "Print a formated string (va_list version)\&. " .ti -1c .RI "__extern int \fBcaca_clear_canvas\fP (\fBcaca_canvas_t\fP *)" .br .RI "Clear the canvas\&. " .ti -1c .RI "__extern int \fBcaca_set_canvas_handle\fP (\fBcaca_canvas_t\fP *, int, int)" .br .RI "Set cursor handle\&. " .ti -1c .RI "__extern int \fBcaca_get_canvas_handle_x\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get X handle position\&. " .ti -1c .RI "__extern int \fBcaca_get_canvas_handle_y\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get Y handle position\&. " .ti -1c .RI "__extern int \fBcaca_blit\fP (\fBcaca_canvas_t\fP *, int, int, \fBcaca_canvas_t\fP const *, \fBcaca_canvas_t\fP const *)" .br .RI "Blit a canvas onto another one\&. " .ti -1c .RI "__extern int \fBcaca_set_canvas_boundaries\fP (\fBcaca_canvas_t\fP *, int, int, int, int)" .br .RI "Set a canvas' new boundaries\&. " .ti -1c .RI "__extern int \fBcaca_disable_dirty_rect\fP (\fBcaca_canvas_t\fP *)" .br .RI "Disable dirty rectangles\&. " .ti -1c .RI "__extern int \fBcaca_enable_dirty_rect\fP (\fBcaca_canvas_t\fP *)" .br .RI "Enable dirty rectangles\&. " .ti -1c .RI "__extern int \fBcaca_get_dirty_rect_count\fP (\fBcaca_canvas_t\fP *)" .br .RI "Get the number of dirty rectangles in the canvas\&. " .ti -1c .RI "__extern int \fBcaca_get_dirty_rect\fP (\fBcaca_canvas_t\fP *, int, int *, int *, int *, int *)" .br .RI "Get a canvas's dirty rectangle\&. " .ti -1c .RI "__extern int \fBcaca_add_dirty_rect\fP (\fBcaca_canvas_t\fP *, int, int, int, int)" .br .RI "Add an area to the canvas's dirty rectangle list\&. " .ti -1c .RI "__extern int \fBcaca_remove_dirty_rect\fP (\fBcaca_canvas_t\fP *, int, int, int, int)" .br .RI "Remove an area from the dirty rectangle list\&. " .ti -1c .RI "__extern int \fBcaca_clear_dirty_rect_list\fP (\fBcaca_canvas_t\fP *)" .br .RI "Clear a canvas's dirty rectangle list\&. " .ti -1c .RI "__extern int \fBcaca_invert\fP (\fBcaca_canvas_t\fP *)" .br .RI "Invert a canvas' colours\&. " .ti -1c .RI "__extern int \fBcaca_flip\fP (\fBcaca_canvas_t\fP *)" .br .RI "Flip a canvas horizontally\&. " .ti -1c .RI "__extern int \fBcaca_flop\fP (\fBcaca_canvas_t\fP *)" .br .RI "Flip a canvas vertically\&. " .ti -1c .RI "__extern int \fBcaca_rotate_180\fP (\fBcaca_canvas_t\fP *)" .br .RI "Rotate a canvas\&. " .ti -1c .RI "__extern int \fBcaca_rotate_left\fP (\fBcaca_canvas_t\fP *)" .br .RI "Rotate a canvas, 90 degrees counterclockwise\&. " .ti -1c .RI "__extern int \fBcaca_rotate_right\fP (\fBcaca_canvas_t\fP *)" .br .RI "Rotate a canvas, 90 degrees counterclockwise\&. " .ti -1c .RI "__extern int \fBcaca_stretch_left\fP (\fBcaca_canvas_t\fP *)" .br .RI "Rotate and stretch a canvas, 90 degrees counterclockwise\&. " .ti -1c .RI "__extern int \fBcaca_stretch_right\fP (\fBcaca_canvas_t\fP *)" .br .RI "Rotate and stretch a canvas, 90 degrees clockwise\&. " .ti -1c .RI "__extern uint32_t \fBcaca_get_attr\fP (\fBcaca_canvas_t\fP const *, int, int)" .br .RI "Get the text attribute at the given coordinates\&. " .ti -1c .RI "__extern int \fBcaca_set_attr\fP (\fBcaca_canvas_t\fP *, uint32_t)" .br .RI "Set the default character attribute\&. " .ti -1c .RI "__extern int \fBcaca_unset_attr\fP (\fBcaca_canvas_t\fP *, uint32_t)" .br .RI "Unset flags in the default character attribute\&. " .ti -1c .RI "__extern int \fBcaca_toggle_attr\fP (\fBcaca_canvas_t\fP *, uint32_t)" .br .RI "Toggle flags in the default character attribute\&. " .ti -1c .RI "__extern int \fBcaca_put_attr\fP (\fBcaca_canvas_t\fP *, int, int, uint32_t)" .br .RI "Set the character attribute at the given coordinates\&. " .ti -1c .RI "__extern int \fBcaca_set_color_ansi\fP (\fBcaca_canvas_t\fP *, uint8_t, uint8_t)" .br .RI "Set the default colour pair for text (ANSI version)\&. " .ti -1c .RI "__extern int \fBcaca_set_color_argb\fP (\fBcaca_canvas_t\fP *, uint16_t, uint16_t)" .br .RI "Set the default colour pair for text (truecolor version)\&. " .ti -1c .RI "__extern uint8_t \fBcaca_attr_to_ansi\fP (uint32_t)" .br .RI "Get DOS ANSI information from attribute\&. " .ti -1c .RI "__extern uint8_t \fBcaca_attr_to_ansi_fg\fP (uint32_t)" .br .RI "Get ANSI foreground information from attribute\&. " .ti -1c .RI "__extern uint8_t \fBcaca_attr_to_ansi_bg\fP (uint32_t)" .br .RI "Get ANSI background information from attribute\&. " .ti -1c .RI "__extern uint16_t \fBcaca_attr_to_rgb12_fg\fP (uint32_t)" .br .RI "Get 12-bit RGB foreground information from attribute\&. " .ti -1c .RI "__extern uint16_t \fBcaca_attr_to_rgb12_bg\fP (uint32_t)" .br .RI "Get 12-bit RGB background information from attribute\&. " .ti -1c .RI "__extern void \fBcaca_attr_to_argb64\fP (uint32_t, uint8_t[8])" .br .RI "Get 64-bit ARGB information from attribute\&. " .ti -1c .RI "__extern uint32_t \fBcaca_utf8_to_utf32\fP (char const *, size_t *)" .br .RI "Convert a UTF-8 character to UTF-32\&. " .ti -1c .RI "__extern size_t \fBcaca_utf32_to_utf8\fP (char *, uint32_t)" .br .RI "Convert a UTF-32 character to UTF-8\&. " .ti -1c .RI "__extern uint8_t \fBcaca_utf32_to_cp437\fP (uint32_t)" .br .RI "Convert a UTF-32 character to CP437\&. " .ti -1c .RI "__extern uint32_t \fBcaca_cp437_to_utf32\fP (uint8_t)" .br .RI "Convert a CP437 character to UTF-32\&. " .ti -1c .RI "__extern char \fBcaca_utf32_to_ascii\fP (uint32_t)" .br .RI "Convert a UTF-32 character to ASCII\&. " .ti -1c .RI "__extern int \fBcaca_utf32_is_fullwidth\fP (uint32_t)" .br .RI "Tell whether a UTF-32 character is fullwidth\&. " .ti -1c .RI "__extern int \fBcaca_draw_line\fP (\fBcaca_canvas_t\fP *, int, int, int, int, uint32_t)" .br .RI "Draw a line on the canvas using the given character\&. " .ti -1c .RI "__extern int \fBcaca_draw_polyline\fP (\fBcaca_canvas_t\fP *, int const x[], int const y[], int, uint32_t)" .br .RI "Draw a polyline\&. " .ti -1c .RI "__extern int \fBcaca_draw_thin_line\fP (\fBcaca_canvas_t\fP *, int, int, int, int)" .br .RI "Draw a thin line on the canvas, using ASCII art\&. " .ti -1c .RI "__extern int \fBcaca_draw_thin_polyline\fP (\fBcaca_canvas_t\fP *, int const x[], int const y[], int)" .br .RI "Draw an ASCII art thin polyline\&. " .ti -1c .RI "__extern int \fBcaca_draw_circle\fP (\fBcaca_canvas_t\fP *, int, int, int, uint32_t)" .br .RI "Draw a circle on the canvas using the given character\&. " .ti -1c .RI "__extern int \fBcaca_draw_ellipse\fP (\fBcaca_canvas_t\fP *, int, int, int, int, uint32_t)" .br .RI "Draw an ellipse on the canvas using the given character\&. " .ti -1c .RI "__extern int \fBcaca_draw_thin_ellipse\fP (\fBcaca_canvas_t\fP *, int, int, int, int)" .br .RI "Draw a thin ellipse on the canvas\&. " .ti -1c .RI "__extern int \fBcaca_fill_ellipse\fP (\fBcaca_canvas_t\fP *, int, int, int, int, uint32_t)" .br .RI "Fill an ellipse on the canvas using the given character\&. " .ti -1c .RI "__extern int \fBcaca_draw_box\fP (\fBcaca_canvas_t\fP *, int, int, int, int, uint32_t)" .br .RI "Draw a box on the canvas using the given character\&. " .ti -1c .RI "__extern int \fBcaca_draw_thin_box\fP (\fBcaca_canvas_t\fP *, int, int, int, int)" .br .RI "Draw a thin box on the canvas\&. " .ti -1c .RI "__extern int \fBcaca_draw_cp437_box\fP (\fBcaca_canvas_t\fP *, int, int, int, int)" .br .RI "Draw a box on the canvas using CP437 characters\&. " .ti -1c .RI "__extern int \fBcaca_fill_box\fP (\fBcaca_canvas_t\fP *, int, int, int, int, uint32_t)" .br .RI "Fill a box on the canvas using the given character\&. " .ti -1c .RI "__extern int \fBcaca_draw_triangle\fP (\fBcaca_canvas_t\fP *, int, int, int, int, int, int, uint32_t)" .br .RI "Draw a triangle on the canvas using the given character\&. " .ti -1c .RI "__extern int \fBcaca_draw_thin_triangle\fP (\fBcaca_canvas_t\fP *, int, int, int, int, int, int)" .br .RI "Draw a thin triangle on the canvas\&. " .ti -1c .RI "__extern int \fBcaca_fill_triangle\fP (\fBcaca_canvas_t\fP *, int, int, int, int, int, int, uint32_t)" .br .RI "Fill a triangle on the canvas using the given character\&. " .ti -1c .RI "__extern int \fBcaca_fill_triangle_textured\fP (\fBcaca_canvas_t\fP *cv, int coords[6], \fBcaca_canvas_t\fP *tex, float uv[6])" .br .RI "Fill a triangle on the canvas using an arbitrary-sized texture\&. " .ti -1c .RI "__extern int \fBcaca_get_frame_count\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get the number of frames in a canvas\&. " .ti -1c .RI "__extern int \fBcaca_set_frame\fP (\fBcaca_canvas_t\fP *, int)" .br .RI "Activate a given canvas frame\&. " .ti -1c .RI "__extern char const * \fBcaca_get_frame_name\fP (\fBcaca_canvas_t\fP const *)" .br .RI "Get the current frame's name\&. " .ti -1c .RI "__extern int \fBcaca_set_frame_name\fP (\fBcaca_canvas_t\fP *, char const *)" .br .RI "Set the current frame's name\&. " .ti -1c .RI "__extern int \fBcaca_create_frame\fP (\fBcaca_canvas_t\fP *, int)" .br .RI "Add a frame to a canvas\&. " .ti -1c .RI "__extern int \fBcaca_free_frame\fP (\fBcaca_canvas_t\fP *, int)" .br .RI "Remove a frame from a canvas\&. " .ti -1c .RI "__extern \fBcaca_dither_t\fP * \fBcaca_create_dither\fP (int, int, int, int, uint32_t, uint32_t, uint32_t, uint32_t)" .br .RI "Create an internal dither object\&. " .ti -1c .RI "__extern int \fBcaca_set_dither_palette\fP (\fBcaca_dither_t\fP *, uint32_t r[], uint32_t g[], uint32_t b[], uint32_t a[])" .br .RI "Set the palette of an 8bpp dither object\&. " .ti -1c .RI "__extern int \fBcaca_set_dither_brightness\fP (\fBcaca_dither_t\fP *, float)" .br .RI "Set the brightness of a dither object\&. " .ti -1c .RI "__extern float \fBcaca_get_dither_brightness\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get the brightness of a dither object\&. " .ti -1c .RI "__extern int \fBcaca_set_dither_gamma\fP (\fBcaca_dither_t\fP *, float)" .br .RI "Set the gamma of a dither object\&. " .ti -1c .RI "__extern float \fBcaca_get_dither_gamma\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get the gamma of a dither object\&. " .ti -1c .RI "__extern int \fBcaca_set_dither_contrast\fP (\fBcaca_dither_t\fP *, float)" .br .RI "Set the contrast of a dither object\&. " .ti -1c .RI "__extern float \fBcaca_get_dither_contrast\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get the contrast of a dither object\&. " .ti -1c .RI "__extern int \fBcaca_set_dither_antialias\fP (\fBcaca_dither_t\fP *, char const *)" .br .RI "Set dither antialiasing\&. " .ti -1c .RI "__extern char const *const * \fBcaca_get_dither_antialias_list\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get available antialiasing methods\&. " .ti -1c .RI "__extern char const * \fBcaca_get_dither_antialias\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get current antialiasing method\&. " .ti -1c .RI "__extern int \fBcaca_set_dither_color\fP (\fBcaca_dither_t\fP *, char const *)" .br .RI "Choose colours used for dithering\&. " .ti -1c .RI "__extern char const *const * \fBcaca_get_dither_color_list\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get available colour modes\&. " .ti -1c .RI "__extern char const * \fBcaca_get_dither_color\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get current colour mode\&. " .ti -1c .RI "__extern int \fBcaca_set_dither_charset\fP (\fBcaca_dither_t\fP *, char const *)" .br .RI "Choose characters used for dithering\&. " .ti -1c .RI "__extern char const *const * \fBcaca_get_dither_charset_list\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get available dither character sets\&. " .ti -1c .RI "__extern char const * \fBcaca_get_dither_charset\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get current character set\&. " .ti -1c .RI "__extern int \fBcaca_set_dither_algorithm\fP (\fBcaca_dither_t\fP *, char const *)" .br .RI "Set dithering algorithm\&. " .ti -1c .RI "__extern char const *const * \fBcaca_get_dither_algorithm_list\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get dithering algorithms\&. " .ti -1c .RI "__extern char const * \fBcaca_get_dither_algorithm\fP (\fBcaca_dither_t\fP const *)" .br .RI "Get current dithering algorithm\&. " .ti -1c .RI "__extern int \fBcaca_dither_bitmap\fP (\fBcaca_canvas_t\fP *, int, int, int, int, \fBcaca_dither_t\fP const *, void const *)" .br .RI "Dither a bitmap on the canvas\&. " .ti -1c .RI "__extern int \fBcaca_free_dither\fP (\fBcaca_dither_t\fP *)" .br .RI "Free the memory associated with a dither\&. " .ti -1c .RI "__extern \fBcaca_charfont_t\fP * \fBcaca_load_charfont\fP (void const *, size_t)" .br .ti -1c .RI "__extern int \fBcaca_free_charfont\fP (\fBcaca_charfont_t\fP *)" .br .ti -1c .RI "__extern \fBcaca_font_t\fP * \fBcaca_load_font\fP (void const *, size_t)" .br .RI "Load a font from memory for future use\&. " .ti -1c .RI "__extern char const *const * \fBcaca_get_font_list\fP (void)" .br .RI "Get available builtin fonts\&. " .ti -1c .RI "__extern int \fBcaca_get_font_width\fP (\fBcaca_font_t\fP const *)" .br .RI "Get a font's standard glyph width\&. " .ti -1c .RI "__extern int \fBcaca_get_font_height\fP (\fBcaca_font_t\fP const *)" .br .RI "Get a font's standard glyph height\&. " .ti -1c .RI "__extern uint32_t const * \fBcaca_get_font_blocks\fP (\fBcaca_font_t\fP const *)" .br .RI "Get a font's list of supported glyphs\&. " .ti -1c .RI "__extern int \fBcaca_render_canvas\fP (\fBcaca_canvas_t\fP const *, \fBcaca_font_t\fP const *, void *, int, int, int)" .br .RI "Render the canvas onto an image buffer\&. " .ti -1c .RI "__extern int \fBcaca_free_font\fP (\fBcaca_font_t\fP *)" .br .RI "Free a font structure\&. " .ti -1c .RI "__extern int \fBcaca_canvas_set_figfont\fP (\fBcaca_canvas_t\fP *, char const *)" .br .RI "load a figfont and attach it to a canvas " .ti -1c .RI "__extern int \fBcaca_set_figfont_smush\fP (\fBcaca_canvas_t\fP *, char const *)" .br .RI "set the smushing mode of the figfont rendering " .ti -1c .RI "__extern int \fBcaca_set_figfont_width\fP (\fBcaca_canvas_t\fP *, int)" .br .RI "set the width of the figfont rendering " .ti -1c .RI "__extern int \fBcaca_put_figchar\fP (\fBcaca_canvas_t\fP *, uint32_t)" .br .RI "paste a character using the current figfont " .ti -1c .RI "__extern int \fBcaca_flush_figlet\fP (\fBcaca_canvas_t\fP *)" .br .RI "flush the figlet context " .ti -1c .RI "__extern \fBcaca_file_t\fP * \fBcaca_file_open\fP (char const *, const char *)" .br .RI "Open a file for reading or writing\&. " .ti -1c .RI "__extern int \fBcaca_file_close\fP (\fBcaca_file_t\fP *)" .br .RI "Close a file handle\&. " .ti -1c .RI "__extern uint64_t \fBcaca_file_tell\fP (\fBcaca_file_t\fP *)" .br .RI "Return the position in a file handle\&. " .ti -1c .RI "__extern size_t \fBcaca_file_read\fP (\fBcaca_file_t\fP *, void *, size_t)" .br .RI "Read data from a file handle\&. " .ti -1c .RI "__extern size_t \fBcaca_file_write\fP (\fBcaca_file_t\fP *, const void *, size_t)" .br .RI "Write data to a file handle\&. " .ti -1c .RI "__extern char * \fBcaca_file_gets\fP (\fBcaca_file_t\fP *, char *, int)" .br .RI "Read a line from a file handle\&. " .ti -1c .RI "__extern int \fBcaca_file_eof\fP (\fBcaca_file_t\fP *)" .br .RI "Tell whether a file handle reached end of file\&. " .ti -1c .RI "__extern ssize_t \fBcaca_import_canvas_from_memory\fP (\fBcaca_canvas_t\fP *, void const *, size_t, char const *)" .br .RI "Import a memory buffer into a canvas\&. " .ti -1c .RI "__extern ssize_t \fBcaca_import_canvas_from_file\fP (\fBcaca_canvas_t\fP *, char const *, char const *)" .br .RI "Import a file into a canvas\&. " .ti -1c .RI "__extern ssize_t \fBcaca_import_area_from_memory\fP (\fBcaca_canvas_t\fP *, int, int, void const *, size_t, char const *)" .br .RI "Import a memory buffer into a canvas area\&. " .ti -1c .RI "__extern ssize_t \fBcaca_import_area_from_file\fP (\fBcaca_canvas_t\fP *, int, int, char const *, char const *)" .br .RI "Import a file into a canvas area\&. " .ti -1c .RI "__extern char const *const * \fBcaca_get_import_list\fP (void)" .br .RI "Get available import formats\&. " .ti -1c .RI "__extern void * \fBcaca_export_canvas_to_memory\fP (\fBcaca_canvas_t\fP const *, char const *, size_t *)" .br .RI "Export a canvas into a foreign format\&. " .ti -1c .RI "__extern void * \fBcaca_export_area_to_memory\fP (\fBcaca_canvas_t\fP const *, int, int, int, int, char const *, size_t *)" .br .RI "Export a canvas portion into a foreign format\&. " .ti -1c .RI "__extern char const *const * \fBcaca_get_export_list\fP (void)" .br .RI "Get available export formats\&. " .ti -1c .RI "__extern \fBcaca_display_t\fP * \fBcaca_create_display\fP (\fBcaca_canvas_t\fP *)" .br .RI "Attach a caca graphical context to a caca canvas\&. " .ti -1c .RI "__extern \fBcaca_display_t\fP * \fBcaca_create_display_with_driver\fP (\fBcaca_canvas_t\fP *, char const *)" .br .RI "Attach a specific caca graphical context to a caca canvas\&. " .ti -1c .RI "__extern char const *const * \fBcaca_get_display_driver_list\fP (void)" .br .RI "Get available display drivers\&. " .ti -1c .RI "__extern char const * \fBcaca_get_display_driver\fP (\fBcaca_display_t\fP *)" .br .RI "Return a caca graphical context's current output driver\&. " .ti -1c .RI "__extern int \fBcaca_set_display_driver\fP (\fBcaca_display_t\fP *, char const *)" .br .RI "Set the output driver\&. " .ti -1c .RI "__extern int \fBcaca_free_display\fP (\fBcaca_display_t\fP *)" .br .RI "Detach a caca graphical context from a caca backend context\&. " .ti -1c .RI "__extern \fBcaca_canvas_t\fP * \fBcaca_get_canvas\fP (\fBcaca_display_t\fP *)" .br .RI "Get the canvas attached to a caca graphical context\&. " .ti -1c .RI "__extern int \fBcaca_refresh_display\fP (\fBcaca_display_t\fP *)" .br .RI "Flush pending changes and redraw the screen\&. " .ti -1c .RI "__extern int \fBcaca_set_display_time\fP (\fBcaca_display_t\fP *, int)" .br .RI "Set the refresh delay\&. " .ti -1c .RI "__extern int \fBcaca_get_display_time\fP (\fBcaca_display_t\fP const *)" .br .RI "Get the display's average rendering time\&. " .ti -1c .RI "__extern int \fBcaca_get_display_width\fP (\fBcaca_display_t\fP const *)" .br .RI "Get the display width\&. " .ti -1c .RI "__extern int \fBcaca_get_display_height\fP (\fBcaca_display_t\fP const *)" .br .RI "Get the display height\&. " .ti -1c .RI "__extern int \fBcaca_set_display_title\fP (\fBcaca_display_t\fP *, char const *)" .br .RI "Set the display title\&. " .ti -1c .RI "__extern int \fBcaca_set_mouse\fP (\fBcaca_display_t\fP *, int)" .br .RI "Show or hide the mouse pointer\&. " .ti -1c .RI "__extern int \fBcaca_set_cursor\fP (\fBcaca_display_t\fP *, int)" .br .RI "Show or hide the cursor\&. " .ti -1c .RI "__extern int \fBcaca_get_event\fP (\fBcaca_display_t\fP *, int, \fBcaca_event_t\fP *, int)" .br .RI "Get the next mouse or keyboard input event\&. " .ti -1c .RI "__extern int \fBcaca_get_mouse_x\fP (\fBcaca_display_t\fP const *)" .br .RI "Return the X mouse coordinate\&. " .ti -1c .RI "__extern int \fBcaca_get_mouse_y\fP (\fBcaca_display_t\fP const *)" .br .RI "Return the Y mouse coordinate\&. " .ti -1c .RI "__extern enum \fBcaca_event_type\fP \fBcaca_get_event_type\fP (\fBcaca_event_t\fP const *)" .br .RI "Return an event's type\&. " .ti -1c .RI "__extern int \fBcaca_get_event_key_ch\fP (\fBcaca_event_t\fP const *)" .br .RI "Return a key press or key release event's value\&. " .ti -1c .RI "__extern uint32_t \fBcaca_get_event_key_utf32\fP (\fBcaca_event_t\fP const *)" .br .RI "Return a key press or key release event's Unicode value\&. " .ti -1c .RI "__extern int \fBcaca_get_event_key_utf8\fP (\fBcaca_event_t\fP const *, char *)" .br .RI "Return a key press or key release event's UTF-8 value\&. " .ti -1c .RI "__extern int \fBcaca_get_event_mouse_button\fP (\fBcaca_event_t\fP const *)" .br .RI "Return a mouse press or mouse release event's button\&. " .ti -1c .RI "__extern int \fBcaca_get_event_mouse_x\fP (\fBcaca_event_t\fP const *)" .br .RI "Return a mouse motion event's X coordinate\&. " .ti -1c .RI "__extern int \fBcaca_get_event_mouse_y\fP (\fBcaca_event_t\fP const *)" .br .RI "Return a mouse motion event's Y coordinate\&. " .ti -1c .RI "__extern int \fBcaca_get_event_resize_width\fP (\fBcaca_event_t\fP const *)" .br .RI "Return a resize event's display width value\&. " .ti -1c .RI "__extern int \fBcaca_get_event_resize_height\fP (\fBcaca_event_t\fP const *)" .br .RI "Return a resize event's display height value\&. " .ti -1c .RI "__extern int \fBcaca_getopt\fP (int, char *const[], char const *, struct \fBcaca_option\fP const *, int *)" .br .ti -1c .RI "__extern char * \fBcaca_conio_cgets\fP (char *str)" .br .RI "DOS conio\&.h cgets() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_clreol\fP (void)" .br .RI "DOS conio\&.h clreol() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_clrscr\fP (void)" .br .RI "DOS conio\&.h clrscr() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_cprintf\fP (const char *format,\&.\&.\&.)" .br .RI "DOS conio\&.h cprintf() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_cputs\fP (const char *str)" .br .RI "DOS conio\&.h cputs() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_cscanf\fP (char *format,\&.\&.\&.)" .br .RI "DOS stdio\&.h cscanf() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_delay\fP (unsigned int)" .br .RI "DOS dos\&.h delay() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_delline\fP (void)" .br .RI "DOS conio\&.h delline() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_getch\fP (void)" .br .RI "DOS conio\&.h getch() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_getche\fP (void)" .br .RI "DOS conio\&.h getche() equivalent\&. " .ti -1c .RI "__extern char * \fBcaca_conio_getpass\fP (const char *prompt)" .br .RI "DOS conio\&.h getpass() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_gettext\fP (int left, int top, int right, int bottom, void *destin)" .br .RI "DOS conio\&.h gettext() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_gettextinfo\fP (struct \fBcaca_conio_text_info\fP *r)" .br .RI "DOS conio\&.h gettextinfo() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_gotoxy\fP (int x, int y)" .br .RI "DOS conio\&.h gotoxy() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_highvideo\fP (void)" .br .RI "DOS conio\&.h highvideo() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_insline\fP (void)" .br .RI "DOS conio\&.h insline() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_kbhit\fP (void)" .br .RI "DOS conio\&.h kbhit() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_lowvideo\fP (void)" .br .RI "DOS conio\&.h lowvideo() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_movetext\fP (int left, int top, int right, int bottom, int destleft, int desttop)" .br .RI "DOS conio\&.h movetext() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_normvideo\fP (void)" .br .RI "DOS conio\&.h normvideo() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_nosound\fP (void)" .br .RI "DOS dos\&.h nosound() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_printf\fP (const char *format,\&.\&.\&.)" .br .RI "DOS stdio\&.h printf() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_putch\fP (int ch)" .br .RI "DOS conio\&.h putch() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_puttext\fP (int left, int top, int right, int bottom, void *destin)" .br .RI "DOS conio\&.h puttext() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio__setcursortype\fP (int cur_t)" .br .RI "DOS conio\&.h _setcursortype() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_sleep\fP (unsigned int)" .br .RI "DOS dos\&.h sleep() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_sound\fP (unsigned int)" .br .RI "DOS dos\&.h sound() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_textattr\fP (int newattr)" .br .RI "DOS conio\&.h textattr() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_textbackground\fP (int newcolor)" .br .RI "DOS conio\&.h textbackground() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_textcolor\fP (int newcolor)" .br .RI "DOS conio\&.h textcolor() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_textmode\fP (int newmode)" .br .RI "DOS conio\&.h textmode() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_ungetch\fP (int ch)" .br .RI "DOS conio\&.h ungetch() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_wherex\fP (void)" .br .RI "DOS conio\&.h wherex() equivalent\&. " .ti -1c .RI "__extern int \fBcaca_conio_wherey\fP (void)" .br .RI "DOS conio\&.h wherey() equivalent\&. " .ti -1c .RI "__extern void \fBcaca_conio_window\fP (int left, int top, int right, int bottom)" .br .RI "DOS conio\&.h window() equivalent\&. " .in -1c .SS "Variables" .in +1c .ti -1c .RI "__extern int \fBcaca_optind\fP" .br .ti -1c .RI "__extern char * \fBcaca_optarg\fP" .br .ti -1c .RI "__extern int \fBcaca_conio_directvideo\fP" .br .RI "DOS direct video control\&. " .ti -1c .RI "__extern int \fBcaca_conio__wscroll\fP" .br .RI "DOS scrolling control\&. " .in -1c .SH "Detailed Description" .PP .PP \fBAuthor\fP .RS 4 Sam Hocevar sam@hocevar.net .RE .PP This header contains the public types and functions that applications using \fIlibcaca\fP may use\&. .SH "Macro Definition Documentation" .PP .SS "#define CACA_API_VERSION_1" libcaca API version .SH "Typedef Documentation" .PP .SS "typedef struct caca_canvas \fBcaca_canvas_t\fP" \fIlibcaca\fP canvas .SS "typedef struct caca_dither \fBcaca_dither_t\fP" dither structure .SS "typedef struct caca_charfont \fBcaca_charfont_t\fP" character font structure .SS "typedef struct caca_font \fBcaca_font_t\fP" bitmap font structure .SS "typedef struct caca_file \fBcaca_file_t\fP" file handle structure .SS "typedef struct caca_display \fBcaca_display_t\fP" \fIlibcaca\fP display context .SS "typedef struct \fBcaca_event\fP \fBcaca_event_t\fP" \fIlibcaca\fP event structure .SH "Author" .PP Generated automatically by Doxygen for libcaca from the source code\&.