cucul.h(3caca)

NAME
cucul.h - The libcucul public header.

SYNOPSIS

  Defines
#define CUCUL_API_VERSION_1
#define CUCUL_BLACK 0x00
#define CUCUL_BLUE 0x01
#define CUCUL_GREEN 0x02
#define CUCUL_CYAN 0x03
#define CUCUL_RED 0x04
#define CUCUL_MAGENTA 0x05
#define CUCUL_BROWN 0x06
#define CUCUL_LIGHTGRAY 0x07
#define CUCUL_DARKGRAY 0x08
#define CUCUL_LIGHTBLUE 0x09
#define CUCUL_LIGHTGREEN 0x0a
#define CUCUL_LIGHTCYAN 0x0b
#define CUCUL_LIGHTRED 0x0c
#define CUCUL_LIGHTMAGENTA 0x0d
#define CUCUL_YELLOW 0x0e
#define CUCUL_WHITE 0x0f
#define CUCUL_DEFAULT 0x10
#define CUCUL_TRANSPARENT 0x20
#define CUCUL_BOLD 0x01
#define CUCUL_ITALICS 0x02
#define CUCUL_UNDERLINE 0x04
#define CUCUL_BLINK 0x08
#define CUCUL_MAGIC_FULLWIDTH 0x000ffffe

  Typedefs
typedef cucul_canvas cucul_canvas_t
typedef cucul_dither cucul_dither_t
typedef cucul_font cucul_font_t

  Functions
cucul_canvas_t * cucul_create_canvas (unsigned int, unsigned int)
Initialise a libcucul canvas.
int cucul_set_canvas_size (cucul_canvas_t *, unsigned int, unsigned int)
Resize a canvas.
unsigned int cucul_get_canvas_width (cucul_canvas_t *)
Get the canvas width.
unsigned int cucul_get_canvas_height (cucul_canvas_t *)
Get the canvas height.
int cucul_free_canvas (cucul_canvas_t *)
Uninitialise libcucul.
int cucul_rand (int, int)
Generate a random integer within a range.
int cucul_gotoxy (cucul_canvas_t *, int, int)
Set cursor position.
int cucul_get_cursor_x (cucul_canvas_t *)
Get X cursor position.
int cucul_get_cursor_y (cucul_canvas_t *)
Get Y cursor position.
int cucul_put_char (cucul_canvas_t *, int, int, unsigned long int)
Print an ASCII or Unicode character.
unsigned long int cucul_get_char (cucul_canvas_t *, int, int)
Get the Unicode character at the given coordinates.
int cucul_put_str (cucul_canvas_t *, int, int, char const *)
Print a string.
unsigned long int cucul_get_attr (cucul_canvas_t *, int, int)
Get the text attribute at the given coordinates.
int cucul_set_attr (cucul_canvas_t *, unsigned long int)
Set the default character attribute.
int cucul_put_attr (cucul_canvas_t *, int, int, unsigned long int)
Set the character attribute at the given coordinates.
int cucul_set_color_ansi (cucul_canvas_t *, unsigned char, unsigned char)
Set the default colour pair for text (ANSI version).
int cucul_set_color_argb (cucul_canvas_t *, unsigned int, unsigned int)
Set the default colour pair for text (truecolor version).
int cucul_printf (cucul_canvas_t *, int, int, char const *,...)
Print a formated string.
int cucul_clear_canvas (cucul_canvas_t *)
Clear the canvas.
int cucul_set_canvas_handle (cucul_canvas_t *, int, int)
Set cursor handle.
int cucul_get_canvas_handle_x (cucul_canvas_t *)
Get X handle position.
int cucul_get_canvas_handle_y (cucul_canvas_t *)
Get Y handle position.
int cucul_blit (cucul_canvas_t *, int, int, cucul_canvas_t const *, cucul_canvas_t const *)
Blit a canvas onto another one.
int cucul_set_canvas_boundaries (cucul_canvas_t *, int, int, unsigned int, unsigned int)
Set a canvas' new boundaries.
int cucul_invert (cucul_canvas_t *)
Invert a canvas' colours.
int cucul_flip (cucul_canvas_t *)
Flip a canvas horizontally.
int cucul_flop (cucul_canvas_t *)
Flip a canvas vertically.
int cucul_rotate (cucul_canvas_t *)
Rotate a canvas.
unsigned char cucul_attr_to_ansi (unsigned long int)
Get DOS ANSI information from attribute.
unsigned char cucul_attr_to_ansi_fg (unsigned long int)
Get ANSI foreground information from attribute.
unsigned char cucul_attr_to_ansi_bg (unsigned long int)
Get ANSI background information from attribute.
unsigned long int cucul_utf8_to_utf32 (char const *, unsigned int *)
Convert a UTF-8 character to UTF-32.
unsigned int cucul_utf32_to_utf8 (char *, unsigned long int)
Convert a UTF-32 character to UTF-8.
unsigned char cucul_utf32_to_cp437 (unsigned long int)
Convert a UTF-32 character to CP437.
unsigned long int cucul_cp437_to_utf32 (unsigned char)
Convert a CP437 character to UTF-32.
int cucul_utf32_is_fullwidth (unsigned long int)
Tell whether a UTF-32 character is fullwidth.
int cucul_draw_line (cucul_canvas_t *, int, int, int, int, unsigned long int)
Draw a line on the canvas using the given character.
int cucul_draw_polyline (cucul_canvas_t *, int const x[], int const y[], int, unsigned long int)
Draw a polyline.
int cucul_draw_thin_line (cucul_canvas_t *, int, int, int, int)
Draw a thin line on the canvas, using ASCII art.
int cucul_draw_thin_polyline (cucul_canvas_t *, int const x[], int const y[], int)
Draw an ASCII art thin polyline.
int cucul_draw_circle (cucul_canvas_t *, int, int, int, unsigned long int)
Draw a circle on the canvas using the given character.
int cucul_draw_ellipse (cucul_canvas_t *, int, int, int, int, unsigned long int)
Draw an ellipse on the canvas using the given character.
int cucul_draw_thin_ellipse (cucul_canvas_t *, int, int, int, int)
Draw a thin ellipse on the canvas.
int cucul_fill_ellipse (cucul_canvas_t *, int, int, int, int, unsigned long int)
Fill an ellipse on the canvas using the given character.
int cucul_draw_box (cucul_canvas_t *, int, int, int, int, unsigned long int)
Draw a box on the canvas using the given character.
int cucul_draw_thin_box (cucul_canvas_t *, int, int, int, int)
Draw a thin box on the canvas.
int cucul_draw_cp437_box (cucul_canvas_t *, int, int, int, int)
Draw a box on the canvas using CP437 characters.
int cucul_fill_box (cucul_canvas_t *, int, int, int, int, unsigned long int)
Fill a box on the canvas using the given character.
int cucul_draw_triangle (cucul_canvas_t *, int, int, int, int, int, int, unsigned long int)
Draw a triangle on the canvas using the given character.
int cucul_draw_thin_triangle (cucul_canvas_t *, int, int, int, int, int, int)
Draw a thin triangle on the canvas.
int cucul_fill_triangle (cucul_canvas_t *, int, int, int, int, int, int, unsigned long int)
Fill a triangle on the canvas using the given character.
unsigned int cucul_get_frame_count (cucul_canvas_t *)
Get the number of frames in a canvas.
int cucul_set_frame (cucul_canvas_t *, unsigned int)
Activate a given canvas frame.
char const * cucul_get_frame_name (cucul_canvas_t *)
Get the current frame's name.
int cucul_set_frame_name (cucul_canvas_t *, char const *)
Set the current frame's name.
int cucul_create_frame (cucul_canvas_t *, unsigned int)
Add a frame to a canvas.
int cucul_free_frame (cucul_canvas_t *, unsigned int)
Remove a frame from a canvas.
cucul_dither_t * cucul_create_dither (unsigned int, unsigned int, unsigned int, unsigned int, unsigned long int, unsigned long int, unsigned long int, unsigned long int)
Create an internal dither object.
int cucul_set_dither_palette (cucul_dither_t *, unsigned int r[], unsigned int g[], unsigned int b[], unsigned int a[])
Set the palette of an 8bpp dither object.
int cucul_set_dither_brightness (cucul_dither_t *, float)
Set the brightness of a dither object.
int cucul_set_dither_gamma (cucul_dither_t *, float)
Set the gamma of a dither object.
int cucul_set_dither_contrast (cucul_dither_t *, float)
Set the contrast of a dither object.
int cucul_set_dither_invert (cucul_dither_t *, int)
Invert colors of dither.
int cucul_set_dither_antialias (cucul_dither_t *, char const *)
Set dither antialiasing.
char const *const * cucul_get_dither_antialias_list (cucul_dither_t const *)
Get available antialiasing methods.
int cucul_set_dither_color (cucul_dither_t *, char const *)
Choose colours used for dithering.
char const *const * cucul_get_dither_color_list (cucul_dither_t const *)
Get available colour modes.
int cucul_set_dither_charset (cucul_dither_t *, char const *)
Choose characters used for dithering.
char const *const * cucul_get_dither_charset_list (cucul_dither_t const *)
Get available dither character sets.
int cucul_set_dither_mode (cucul_dither_t *, char const *)
Set dithering method.
char const *const * cucul_get_dither_mode_list (cucul_dither_t const *)
Get dithering methods.
int cucul_dither_bitmap (cucul_canvas_t *, int, int, int, int, cucul_dither_t const *, void *)
Dither a bitmap on the canvas.
int cucul_free_dither (cucul_dither_t *)
Free the memory associated with a dither.
cucul_font_t * cucul_load_font (void const *, unsigned int)
Load a font from memory for future use.
char const *const * cucul_get_font_list (void)
Get available builtin fonts.
unsigned int cucul_get_font_width (cucul_font_t *)
Get a font's standard glyph width.
unsigned int cucul_get_font_height (cucul_font_t *)
Get a font's standard glyph height.
unsigned long int const * cucul_get_font_blocks (cucul_font_t *)
Get a font's list of supported glyphs.
int cucul_render_canvas (cucul_canvas_t *, cucul_font_t *, void *, unsigned int, unsigned int, unsigned int)
Render the canvas onto an image buffer.
int cucul_free_font (cucul_font_t *)
Free a font structure.
long int cucul_import_memory (cucul_canvas_t *, void const *, unsigned long int, char const *)
Import a memory buffer into a canvas.
long int cucul_import_file (cucul_canvas_t *, char const *, char const *)
Import a file into a canvas.
char const *const * cucul_get_import_list (void)
Get available import formats.
void * cucul_export_memory (cucul_canvas_t *, char const *, unsigned long int *)
Export a canvas into a foreign format.
char const *const * cucul_get_export_list (void)
Get available export formats.

Detailed Description

Version:
    $Id: cucul.h 1063 2006-11-13 23:16:35Z sam $

Author:
    Sam Hocevar <sam@zoy.org>

This header contains the public types and functions that applications using libcucul may use.

Define Documentation

  #define CUCUL_API_VERSION_1

libcucul API version

Typedef Documentation

  typedef struct cucul_canvas cucul_canvas_t

libcucul canvas

  typedef struct cucul_dither cucul_dither_t

dither structure

  typedef struct cucul_font cucul_font_t

font structure

Author

Generated automatically by Doxygen for libcaca from the source code.