caca.h   caca.h 
skipping to change at line 23 skipping to change at line 23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA * 02111-1307 USA
*/ */
/** \file caca.h /** \file caca.h
* \version \$Id: caca.h 173 2003-12-24 16:23:37Z sam $ * \version \$Id: caca.h 202 2004-01-02 16:52:10Z sam $
* \author Sam Hocevar <sam@zoy.org> * \author Sam Hocevar <sam@zoy.org>
* \brief The \e libcaca public header. * \brief The \e libcaca public header.
* *
* This header contains the public types and functions that applications * This header contains the public types and functions that applications
* using \e libcaca may use. * using \e libcaca may use.
*/ */
/** \mainpage libcaca developer documentation /** \mainpage libcaca developer documentation
* *
* \section intro Introduction * \section intro Introduction
skipping to change at line 107 skipping to change at line 107
#ifndef __CACA_H__ #ifndef __CACA_H__
#define __CACA_H__ #define __CACA_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** \brief Colour definitions. /** \brief Colour definitions.
* *
* This enum lists all colours that can be used with caca_set_color(). * Colours that can be used with caca_set_color().
*/ */
enum caca_color enum caca_color
{ {
CACA_COLOR_BLACK = 0, /**< The colour index for black. */ CACA_COLOR_BLACK = 0, /**< The colour index for black. */
CACA_COLOR_BLUE = 1, /**< The colour index for blue. */ CACA_COLOR_BLUE = 1, /**< The colour index for blue. */
CACA_COLOR_GREEN = 2, /**< The colour index for green. */ CACA_COLOR_GREEN = 2, /**< The colour index for green. */
CACA_COLOR_CYAN = 3, /**< The colour index for cyan. */ CACA_COLOR_CYAN = 3, /**< The colour index for cyan. */
CACA_COLOR_RED = 4, /**< The colour index for red. */ CACA_COLOR_RED = 4, /**< The colour index for red. */
CACA_COLOR_MAGENTA = 5, /**< The colour index for magenta. */ CACA_COLOR_MAGENTA = 5, /**< The colour index for magenta. */
CACA_COLOR_BROWN = 6, /**< The colour index for brown. */ CACA_COLOR_BROWN = 6, /**< The colour index for brown. */
skipping to change at line 131 skipping to change at line 131
CACA_COLOR_LIGHTGREEN = 10, /**< The colour index for light green. */ CACA_COLOR_LIGHTGREEN = 10, /**< The colour index for light green. */
CACA_COLOR_LIGHTCYAN = 11, /**< The colour index for light cyan. */ CACA_COLOR_LIGHTCYAN = 11, /**< The colour index for light cyan. */
CACA_COLOR_LIGHTRED = 12, /**< The colour index for light red. */ CACA_COLOR_LIGHTRED = 12, /**< The colour index for light red. */
CACA_COLOR_LIGHTMAGENTA = 13, /**< The colour index for light magenta. */ CACA_COLOR_LIGHTMAGENTA = 13, /**< The colour index for light magenta. */
CACA_COLOR_YELLOW = 14, /**< The colour index for yellow. */ CACA_COLOR_YELLOW = 14, /**< The colour index for yellow. */
CACA_COLOR_WHITE = 15 /**< The colour index for white. */ CACA_COLOR_WHITE = 15 /**< The colour index for white. */
}; };
/** \brief Internal features. /** \brief Internal features.
* *
* This enum lists all possible internal libcaca features such as the * Internal libcaca features such as the rendering method or the dithering
* rendering method or the dithering mode. * mode.
*/ */
enum caca_feature enum caca_feature
{ {
CACA_BACKGROUND = 0x10, /**< Properties of background characters. */ CACA_BACKGROUND = 0x10, /**< Properties of background characters. */
CACA_BACKGROUND_BLACK = 0x11, /**< Draw only black backgrounds. */ CACA_BACKGROUND_BLACK = 0x11, /**< Draw only black backgrounds. */
CACA_BACKGROUND_SOLID = 0x12, /**< Draw coloured solid backgorunds. */ CACA_BACKGROUND_SOLID = 0x12, /**< Draw coloured solid backgorunds. */
#define CACA_BACKGROUND_MIN 0x11 /**< First background property */ #define CACA_BACKGROUND_MIN 0x11 /**< First background property */
#define CACA_BACKGROUND_MAX 0x12 /**< Last background property */ #define CACA_BACKGROUND_MAX 0x12 /**< Last background property */
CACA_ANTIALIASING = 0x20, /**< Antialiasing features. */ CACA_ANTIALIASING = 0x20, /**< Antialiasing features. */
skipping to change at line 174 skipping to change at line 174
#define caca_dithering caca_feature #define caca_dithering caca_feature
#define caca_set_dithering caca_set_feature #define caca_set_dithering caca_set_feature
#define caca_get_dithering_name caca_get_feature_name #define caca_get_dithering_name caca_get_feature_name
#define CACA_DITHER_NONE CACA_DITHERING_NONE #define CACA_DITHER_NONE CACA_DITHERING_NONE
#define CACA_DITHER_ORDERED CACA_DITHERING_ORDERED8 #define CACA_DITHER_ORDERED CACA_DITHERING_ORDERED8
#define CACA_DITHER_RANDOM CACA_DITHERING_RANDOM #define CACA_DITHER_RANDOM CACA_DITHERING_RANDOM
#endif #endif
/** \brief User events. /** \brief User events.
* *
* This enum lists all possible event types returned by caca_get_event(). * Event types returned by caca_get_event().
*/ */
enum caca_event enum caca_event
{ {
CACA_EVENT_NONE = 0x00000000, /**< No event. */ CACA_EVENT_NONE = 0x00000000, /**< No event. */
CACA_EVENT_KEY_PRESS = 0x01000000, /**< A key was pressed. */ CACA_EVENT_KEY_PRESS = 0x01000000, /**< A key was pressed. */
CACA_EVENT_KEY_RELEASE = 0x02000000, /**< A key was released. */ CACA_EVENT_KEY_RELEASE = 0x02000000, /**< A key was released. */
CACA_EVENT_MOUSE_CLICK = 0x04000000 /**< A mouse button was clicked. */ CACA_EVENT_MOUSE_PRESS = 0x04000000, /**< A mouse button was pressed.
*/
CACA_EVENT_MOUSE_RELEASE = 0x08000000, /**< A mouse button was released
. */
CACA_EVENT_MOUSE_MOTION = 0x10000000 /**< The mouse was moved. */
}; };
/** \brief Special key values. /** \brief Special key values.
* *
* This enum lists special key values returned by caca_get_event() for * Special key values returned by caca_get_event() for which there is no
* which there is no ASCII equivalent. * ASCII equivalent.
*/ */
enum caca_key enum caca_key
{ {
CACA_KEY_UP = 273, /**< The up arrow key. */ CACA_KEY_UP = 273, /**< The up arrow key. */
CACA_KEY_DOWN = 274, /**< The down arrow key. */ CACA_KEY_DOWN = 274, /**< The down arrow key. */
CACA_KEY_LEFT = 275, /**< The left arrow key. */ CACA_KEY_LEFT = 275, /**< The left arrow key. */
CACA_KEY_RIGHT = 276, /**< The right arrow key. */ CACA_KEY_RIGHT = 276, /**< The right arrow key. */
CACA_KEY_F1 = 282, /**< The F1 key. */ CACA_KEY_F1 = 282, /**< The F1 key. */
CACA_KEY_F2 = 283, /**< The F2 key. */ CACA_KEY_F2 = 283, /**< The F2 key. */
skipping to change at line 223 skipping to change at line 225
/** \defgroup basic Basic functions /** \defgroup basic Basic functions
* *
* These functions provide the basic \e libcaca routines for library * These functions provide the basic \e libcaca routines for library
* initialisation, system information retrieval and configuration. * initialisation, system information retrieval and configuration.
* *
* @{ */ * @{ */
int caca_init(void); int caca_init(void);
void caca_set_delay(unsigned int); void caca_set_delay(unsigned int);
enum caca_feature caca_get_feature(enum caca_feature); enum caca_feature caca_get_feature(enum caca_feature);
void caca_set_feature(enum caca_feature); void caca_set_feature(enum caca_feature);
const char *caca_get_feature_name(enum caca_feature); char const *caca_get_feature_name(enum caca_feature);
unsigned int caca_get_rendertime(void); unsigned int caca_get_rendertime(void);
unsigned int caca_get_width(void); unsigned int caca_get_width(void);
unsigned int caca_get_height(void); unsigned int caca_get_height(void);
void caca_refresh(void); void caca_refresh(void);
void caca_end(void); void caca_end(void);
/* @} */ /* @} */
/** \defgroup event Event handling functions /** \defgroup event Event handling
* *
* These functions handle user events such as keyboard input and mouse * These functions handle user events such as keyboard input and mouse
* clicks. * clicks.
* *
* @{ */ * @{ */
unsigned int caca_get_event(void); unsigned int caca_get_event(void);
unsigned int caca_wait_event(void); unsigned int caca_wait_event(void);
/* @} */ /* @} */
/** \defgroup char Character printing functions /** \defgroup char Character printing
* *
* These functions provide low-level character printing routines. * These functions provide low-level character printing routines.
* *
* @{ */ * @{ */
void caca_set_color(enum caca_color, enum caca_color); void caca_set_color(enum caca_color, enum caca_color);
enum caca_color caca_get_fg_color(void); enum caca_color caca_get_fg_color(void);
enum caca_color caca_get_bg_color(void); enum caca_color caca_get_bg_color(void);
const char *caca_get_color_name(enum caca_color); char const *caca_get_color_name(enum caca_color);
void caca_putchar(int, int, char); void caca_putchar(int, int, char);
void caca_putstr(int, int, const char *); void caca_putstr(int, int, char const *);
void caca_printf(int, int, const char *, ...); void caca_printf(int, int, char const *, ...);
void caca_clear(void); void caca_clear(void);
/* @} */ /* @} */
/** \defgroup prim Primitives drawing functions /** \defgroup prim Primitives drawing
* *
* These functions provide routines for primitive drawing, such as lines, * These functions provide routines for primitive drawing, such as lines,
* boxes, triangles and ellipses. * boxes, triangles and ellipses.
* *
* @{ */ * @{ */
void caca_draw_line(int, int, int, int, char); void caca_draw_line(int, int, int, int, char);
void caca_draw_polyline(const int x[], const int y[], int, char); void caca_draw_polyline(int const x[], int const y[], int, char);
void caca_draw_thin_line(int, int, int, int); void caca_draw_thin_line(int, int, int, int);
void caca_draw_thin_polyline(const int x[], const int y[], int); void caca_draw_thin_polyline(int const x[], int const y[], int);
void caca_draw_circle(int, int, int, char); void caca_draw_circle(int, int, int, char);
void caca_draw_ellipse(int, int, int, int, char); void caca_draw_ellipse(int, int, int, int, char);
void caca_draw_thin_ellipse(int, int, int, int); void caca_draw_thin_ellipse(int, int, int, int);
void caca_fill_ellipse(int, int, int, int, char); void caca_fill_ellipse(int, int, int, int, char);
void caca_draw_box(int, int, int, int, char); void caca_draw_box(int, int, int, int, char);
void caca_draw_thin_box(int, int, int, int); void caca_draw_thin_box(int, int, int, int);
void caca_fill_box(int, int, int, int, char); void caca_fill_box(int, int, int, int, char);
skipping to change at line 290 skipping to change at line 292
/** \defgroup math Mathematical functions /** \defgroup math Mathematical functions
* *
* These functions provide a few useful math-related routines. * These functions provide a few useful math-related routines.
* *
* @{ */ * @{ */
int caca_rand(int, int); int caca_rand(int, int);
unsigned int caca_sqrt(unsigned int); unsigned int caca_sqrt(unsigned int);
/* @} */ /* @} */
/** \defgroup sprite Sprite handling functions /** \defgroup sprite Sprite handling
* *
* These functions provide high level routines for sprite loading, animati on * These functions provide high level routines for sprite loading, animati on
* and rendering. * and rendering.
* *
* @{ */ * @{ */
struct caca_sprite; struct caca_sprite;
struct caca_sprite * caca_load_sprite(const char *); struct caca_sprite * caca_load_sprite(char const *);
int caca_get_sprite_frames(const struct caca_sprite *); int caca_get_sprite_frames(struct caca_sprite const *);
int caca_get_sprite_width(const struct caca_sprite *, int); int caca_get_sprite_width(struct caca_sprite const *, int);
int caca_get_sprite_height(const struct caca_sprite *, int); int caca_get_sprite_height(struct caca_sprite const *, int);
int caca_get_sprite_dx(const struct caca_sprite *, int); int caca_get_sprite_dx(struct caca_sprite const *, int);
int caca_get_sprite_dy(const struct caca_sprite *, int); int caca_get_sprite_dy(struct caca_sprite const *, int);
void caca_draw_sprite(int, int, const struct caca_sprite *, int); void caca_draw_sprite(int, int, struct caca_sprite const *, int);
void caca_free_sprite(struct caca_sprite *); void caca_free_sprite(struct caca_sprite *);
/* @} */ /* @} */
/** \defgroup bitmap Bitmap handling functions /** \defgroup bitmap Bitmap handling
* *
* These functions provide high level routines for bitmap allocation and * These functions provide high level routines for bitmap allocation and
* rendering. * rendering.
* *
* @{ */ * @{ */
struct caca_bitmap; struct caca_bitmap;
struct caca_bitmap *caca_create_bitmap(unsigned int, unsigned int, struct caca_bitmap *caca_create_bitmap(unsigned int, unsigned int,
unsigned int, unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int); unsigned int, unsigned int);
void caca_set_bitmap_palette(struct caca_bitmap *, void caca_set_bitmap_palette(struct caca_bitmap *,
unsigned int r[], unsigned int g[], unsigned int r[], unsigned int g[],
unsigned int b[], unsigned int a[]); unsigned int b[], unsigned int a[]);
void caca_draw_bitmap(int, int, int, int, const struct caca_bitmap *, void *); void caca_draw_bitmap(int, int, int, int, struct caca_bitmap const *, void *);
void caca_free_bitmap(struct caca_bitmap *); void caca_free_bitmap(struct caca_bitmap *);
/* @} */ /* @} */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __CACA_H__ */ #endif /* __CACA_H__ */
 End of changes. 18 change blocks. 
30 lines changed or deleted 34 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/