Go to the source code of this file.
Defines | |
#define | CACA_BACKGROUND_MIN 0x11 /**< First background property */ |
#define | CACA_BACKGROUND_MAX 0x12 /**< Last background property */ |
#define | CACA_ANTIALIASING_MIN 0x21 /**< First antialiasing feature. */ |
#define | CACA_ANTIALIASING_MAX 0x22 /**< Last antialiasing feature. */ |
#define | CACA_DITHERING_MIN 0x31 /**< First dithering feature. */ |
#define | CACA_DITHERING_MAX 0x35 /**< Last dithering feature. */ |
Enumerations | |
enum | caca_color { CACA_COLOR_BLACK = 0, CACA_COLOR_BLUE = 1, CACA_COLOR_GREEN = 2, CACA_COLOR_CYAN = 3, CACA_COLOR_RED = 4, CACA_COLOR_MAGENTA = 5, CACA_COLOR_BROWN = 6, CACA_COLOR_LIGHTGRAY = 7, CACA_COLOR_DARKGRAY = 8, CACA_COLOR_LIGHTBLUE = 9, CACA_COLOR_LIGHTGREEN = 10, CACA_COLOR_LIGHTCYAN = 11, CACA_COLOR_LIGHTRED = 12, CACA_COLOR_LIGHTMAGENTA = 13, CACA_COLOR_YELLOW = 14, CACA_COLOR_WHITE = 15 } |
Colour definitions. More... | |
enum | caca_feature { CACA_BACKGROUND = 0x10, CACA_BACKGROUND_BLACK = 0x11, CACA_BACKGROUND_SOLID = 0x12, CACA_ANTIALIASING = 0x20, CACA_ANTIALIASING_NONE = 0x21, CACA_ANTIALIASING_PREFILTER = 0x22, CACA_DITHERING = 0x30, CACA_DITHERING_NONE = 0x31, CACA_DITHERING_ORDERED2 = 0x32, CACA_DITHERING_ORDERED4 = 0x33, CACA_DITHERING_ORDERED8 = 0x34, CACA_DITHERING_RANDOM = 0x35, CACA_FEATURE_UNKNOWN = 0xffff } |
Internal features. More... | |
enum | caca_event { CACA_EVENT_NONE = 0x00000000, CACA_EVENT_KEY_PRESS = 0x01000000, CACA_EVENT_KEY_RELEASE = 0x02000000, CACA_EVENT_MOUSE_PRESS = 0x04000000, CACA_EVENT_MOUSE_RELEASE = 0x08000000, CACA_EVENT_MOUSE_MOTION = 0x10000000, CACA_EVENT_RESIZE = 0x20000000, CACA_EVENT_ANY = 0xff000000 } |
User events. More... | |
enum | caca_key { CACA_KEY_UNKNOWN = 0, CACA_KEY_BACKSPACE = 8, CACA_KEY_TAB = 9, CACA_KEY_RETURN = 13, CACA_KEY_PAUSE = 19, CACA_KEY_ESCAPE = 27, CACA_KEY_DELETE = 127, CACA_KEY_UP = 273, CACA_KEY_DOWN = 274, CACA_KEY_LEFT = 275, CACA_KEY_RIGHT = 276, CACA_KEY_INSERT = 277, CACA_KEY_HOME = 278, CACA_KEY_END = 279, CACA_KEY_PAGEUP = 280, CACA_KEY_PAGEDOWN = 281, CACA_KEY_F1 = 282, CACA_KEY_F2 = 283, CACA_KEY_F3 = 284, CACA_KEY_F4 = 285, CACA_KEY_F5 = 286, CACA_KEY_F6 = 287, CACA_KEY_F7 = 288, CACA_KEY_F8 = 289, CACA_KEY_F9 = 290, CACA_KEY_F10 = 291, CACA_KEY_F11 = 292, CACA_KEY_F12 = 293, CACA_KEY_F13 = 294, CACA_KEY_F14 = 295, CACA_KEY_F15 = 296 } |
Special key values. More... | |
Functions | |
int | caca_init (void) |
Initialise libcaca. | |
void | caca_set_delay (unsigned int) |
Set the refresh delay. | |
enum caca_feature | caca_get_feature (enum caca_feature) |
Get the current value of a feature. | |
void | caca_set_feature (enum caca_feature) |
Set a feature. | |
char const * | caca_get_feature_name (enum caca_feature) |
Translate a feature value into the feature's name. | |
unsigned int | caca_get_rendertime (void) |
Get the average rendering time. | |
unsigned int | caca_get_width (void) |
Get the screen width. | |
unsigned int | caca_get_height (void) |
Get the screen height. | |
int | caca_set_window_title (char const *) |
Set the window title. | |
unsigned int | caca_get_window_width (void) |
Get the window width. | |
unsigned int | caca_get_window_height (void) |
Get the window height. | |
void | caca_refresh (void) |
Flush pending changes and redraw the screen. | |
void | caca_end (void) |
Uninitialise libcaca. | |
unsigned int | caca_get_event (unsigned int) |
Get the next mouse or keyboard input event. | |
unsigned int | caca_wait_event (unsigned int) |
Wait for the next mouse or keyboard input event. | |
unsigned int | caca_get_mouse_x (void) |
Return the X mouse coordinate. | |
unsigned int | caca_get_mouse_y (void) |
Return the Y mouse coordinate. | |
void | caca_set_color (enum caca_color, enum caca_color) |
Set the default colour pair. | |
enum caca_color | caca_get_fg_color (void) |
Get the current foreground colour. | |
enum caca_color | caca_get_bg_color (void) |
Get the current background colour. | |
char const * | caca_get_color_name (enum caca_color) |
Translate a colour index into the colour's name. | |
void | caca_putchar (int, int, char) |
Print a character. | |
void | caca_putstr (int, int, char const *) |
Print a string. | |
void | caca_printf (int, int, char const *,...) |
Format a string. | |
void | caca_clear (void) |
Clear the screen. | |
void | caca_draw_line (int, int, int, int, char) |
Draw a line on the screen using the given character. | |
void | caca_draw_polyline (int const x[], int const y[], int, char) |
Draw a polyline on the screen using the given character and coordinate arrays. The first and last points are not connected, so in order to draw a polygon you need to specify the starting point at the end of the list as well. | |
void | caca_draw_thin_line (int, int, int, int) |
Draw a thin line on the screen, using ASCII art. | |
void | caca_draw_thin_polyline (int const x[], int const y[], int) |
Draw a thin polyline on the screen using the given coordinate arrays and with ASCII art. The first and last points are not connected, so in order to draw a polygon you need to specify the starting point at the end of the list as well. | |
void | caca_draw_circle (int, int, int, char) |
Draw a circle on the screen using the given character. | |
void | caca_draw_ellipse (int, int, int, int, char) |
Draw an ellipse on the screen using the given character. | |
void | caca_draw_thin_ellipse (int, int, int, int) |
Draw a thin ellipse on the screen. | |
void | caca_fill_ellipse (int, int, int, int, char) |
Fill an ellipse on the screen using the given character. | |
void | caca_draw_box (int, int, int, int, char) |
Draw a box on the screen using the given character. | |
void | caca_draw_thin_box (int, int, int, int) |
Draw a thin box on the screen. | |
void | caca_fill_box (int, int, int, int, char) |
Fill a box on the screen using the given character. | |
void | caca_draw_triangle (int, int, int, int, int, int, char) |
Draw a triangle on the screen using the given character. | |
void | caca_draw_thin_triangle (int, int, int, int, int, int) |
Draw a thin triangle on the screen. | |
void | caca_fill_triangle (int, int, int, int, int, int, char) |
Fill a triangle on the screen using the given character. | |
int | caca_rand (int, int) |
Generate a random integer within a range. | |
unsigned int | caca_sqrt (unsigned int) |
Approximate a square root, using Newton's method to avoid costly floating point calculations. | |
caca_sprite * | caca_load_sprite (char const *) |
Allocate a sprite loaded from a file. | |
int | caca_get_sprite_frames (struct caca_sprite const *) |
Return the number of frames in a sprite. | |
int | caca_get_sprite_width (struct caca_sprite const *, int) |
Return the width of a sprite. | |
int | caca_get_sprite_height (struct caca_sprite const *, int) |
Return the height of a sprite. | |
int | caca_get_sprite_dx (struct caca_sprite const *, int) |
Return the X coordinate of a sprite's handle. | |
int | caca_get_sprite_dy (struct caca_sprite const *, int) |
Return the Y coordinate of a sprite's handle. | |
void | caca_draw_sprite (int, int, struct caca_sprite const *, int) |
Draw a sprite's specific frame at the given coordinates. If the frame does not exist, nothing is displayed. | |
void | caca_free_sprite (struct caca_sprite *) |
Free the memory associated with a sprite. | |
caca_bitmap * | caca_create_bitmap (unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) |
Create an internal bitmap object. | |
void | caca_set_bitmap_palette (struct caca_bitmap *, unsigned int r[], unsigned int g[], unsigned int b[], unsigned int a[]) |
Set the palette of an 8bpp bitmap object. | |
void | caca_draw_bitmap (int, int, int, int, struct caca_bitmap const *, void *) |
Draw a bitmap on the screen. | |
void | caca_free_bitmap (struct caca_bitmap *) |
Free the memory associated with a bitmap. |
|
Colours that can be used with caca_set_color().
|
|
Event types returned by caca_get_event().
|
|
|
Special key values returned by caca_get_event() for which there is no ASCII equivalent.
|