@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,14 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file blit.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Bitmap functions | |||
* | |||
* This file contains bitmap blitting functions. | |||
*/ | |||
#include "config.h" | |||
#ifdef HAVE_INTTYPES_H | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,14 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file box.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Simple box drawing functions | |||
* | |||
* This file contains box drawing functions, both filled and outline. | |||
*/ | |||
#include "config.h" | |||
#include <stdlib.h> | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,16 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file caca.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Main \e libcaca functions | |||
* | |||
* This file contains the main functions used by \e libcaca applications to | |||
* initialise the library, get the screen properties, set the framerate and | |||
* so on. | |||
*/ | |||
#include "config.h" | |||
#if defined(USE_SLANG) | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,37 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file caca.h | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief The \e libcaca public header. | |||
* | |||
* This header contains the public types and functions that applications | |||
* using \e libcaca may use. | |||
*/ | |||
/** \mainpage libcaca developer documentation | |||
* | |||
* \section intro Introduction | |||
* | |||
* \e libcaca is a graphics library that outputs text instead of pixels, | |||
* so that it can work on older video cards or text terminals. It is not | |||
* unlike the famous AAlib library. libcaca needs a terminal to work, | |||
* thus it should work on all Unix systems (including Mac OS X) using | |||
* either the slang library or the ncurses library, on DOS using the conio | |||
* library, and on Windows systems using either slang or ncurses (through | |||
* Cygwin emulation) or conio. | |||
* | |||
* \e libcaca is free software, released under the GNU Lesser General | |||
* Public License. This ensures that \e libcaca will always remain free | |||
* software. | |||
* | |||
* \section api The libcaca API | |||
* | |||
* The complete \e libcaca programming interface is available from the | |||
* caca.h file. | |||
*/ | |||
#ifndef __CACA_H__ | |||
#define __CACA_H__ | |||
@@ -29,8 +58,8 @@ extern "C" | |||
{ | |||
#endif | |||
/* | |||
* Colors | |||
/** | |||
* The colour definitions to be used with caca_set_color(). | |||
*/ | |||
enum caca_color | |||
{ | |||
@@ -52,8 +81,8 @@ enum caca_color | |||
CACA_COLOR_WHITE = 15 | |||
}; | |||
/* | |||
* Dithering modes | |||
/** | |||
* The dithering modes to be used with caca_set_dithering(). | |||
*/ | |||
enum caca_dithering | |||
{ | |||
@@ -62,8 +91,8 @@ enum caca_dithering | |||
CACA_DITHER_RANDOM | |||
}; | |||
/* | |||
* Events | |||
/** | |||
* The event types returned by caca_get_event(). | |||
*/ | |||
enum caca_event | |||
{ | |||
@@ -73,8 +102,8 @@ enum caca_event | |||
CACA_EVENT_MOUSE_CLICK = 0x04000000 | |||
}; | |||
/* | |||
* Keys | |||
/** | |||
* The special key values returned by caca_get_event(). | |||
*/ | |||
enum caca_key | |||
{ | |||
@@ -100,12 +129,6 @@ enum caca_key | |||
CACA_KEY_F15 = 296 | |||
}; | |||
/* | |||
* Internal types | |||
*/ | |||
struct caca_sprite; | |||
struct caca_bitmap; | |||
/* | |||
* Basic functions | |||
*/ | |||
@@ -164,6 +187,7 @@ unsigned int caca_sqrt(unsigned int); | |||
/* | |||
* Sprite handling | |||
*/ | |||
struct caca_sprite; | |||
struct caca_sprite * caca_load_sprite(const char *); | |||
int caca_get_sprite_frames(struct caca_sprite *); | |||
int caca_get_sprite_width(struct caca_sprite *, int); | |||
@@ -176,6 +200,7 @@ void caca_free_sprite(struct caca_sprite *); | |||
/* | |||
* Bitmap handling | |||
*/ | |||
struct caca_bitmap; | |||
struct caca_bitmap *caca_create_bitmap(int, int, int, int, int, int, int); | |||
void caca_draw_bitmap(int, int, int, int, struct caca_bitmap *, char *); | |||
void caca_free_bitmap(struct caca_bitmap *); | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,14 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file caca_internals.h | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief The \e libcaca private header. | |||
* | |||
* This header contains the private types and functions used by \e libcaca. | |||
*/ | |||
#ifndef __CACA_INTERNALS_H__ | |||
#define __CACA_INTERNALS_H__ | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,15 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file conic.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Ellipse and circle drawing functions | |||
* | |||
* This file contains ellipse and circle drawing functions, both filled | |||
* and outline. | |||
*/ | |||
#include "config.h" | |||
#ifdef HAVE_INTTYPES_H | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,14 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file graphics.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Character drawing functions | |||
* | |||
* This file contains character and string drawing functions. | |||
*/ | |||
#include "config.h" | |||
#if defined(USE_SLANG) | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,14 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file io.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Event handling functions | |||
* | |||
* This file contains event handling functions for keyboard and mouse input. | |||
*/ | |||
#include "config.h" | |||
#if defined(USE_SLANG) | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,15 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file line.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Line drawing functions | |||
* | |||
* This file contains line and polyline drawing functions, with both thin | |||
* and thick styles. | |||
*/ | |||
#include "config.h" | |||
#ifdef HAVE_INTTYPES_H | |||
@@ -55,7 +62,7 @@ static void draw_thin_line(struct line*); | |||
* \param x2 X coordinate of the second point. | |||
* \param y2 Y coordinate of the second point. | |||
* \param c Character to draw the line with. | |||
* \return nothing | |||
* \return void | |||
*/ | |||
void caca_draw_line(int x1, int y1, int x2, int y2, char c) | |||
{ | |||
@@ -93,7 +100,7 @@ void caca_draw_polyline(const int x[], const int y[], int n, char c) | |||
* \param y1 Y coordinate of the first point. | |||
* \param x2 X coordinate of the second point. | |||
* \param y2 Y coordinate of the second point. | |||
* \return nothing | |||
* \return void | |||
*/ | |||
void caca_draw_thin_line(int x1, int y1, int x2, int y2) | |||
{ | |||
@@ -130,7 +137,7 @@ void caca_draw_thin_polyline(const int x[], const int y[], int n) | |||
* \brief Generic Cohen-Sutherland line clipping function. | |||
* | |||
* \param s a line structure | |||
* \return nothing | |||
* \return void | |||
*/ | |||
static void clip_line(struct line* s) | |||
{ | |||
@@ -212,7 +219,7 @@ static uint8_t clip_bits(int x, int y) | |||
* scan-conversion algorithm. | |||
* | |||
* \param s a line structure | |||
* \return nothing | |||
* \return void | |||
*/ | |||
static void draw_solid_line(struct line* s) | |||
{ | |||
@@ -279,7 +286,7 @@ static void draw_solid_line(struct line* s) | |||
* scan-conversion algorithm and ASCII art graphics. | |||
* | |||
* \param s a line structure | |||
* \return nothing | |||
* \return void | |||
*/ | |||
static void draw_thin_line(struct line* s) | |||
{ | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,14 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file math.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Math functions | |||
* | |||
* This file contains simple mathematical routines. | |||
*/ | |||
#include "config.h" | |||
#include <stdlib.h> | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,14 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file sprite.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Sprite loading and blitting | |||
* | |||
* This file contains a small framework for sprite loading and blitting. | |||
*/ | |||
#include "config.h" | |||
#include <stdio.h> | |||
@@ -3,8 +3,6 @@ | |||
* Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> | |||
* All Rights Reserved | |||
* | |||
* $Id$ | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
@@ -21,6 +19,14 @@ | |||
* 02111-1307 USA | |||
*/ | |||
/** \file triangle.c | |||
* \version \$Id$ | |||
* \author Sam Hocevar <sam@zoy.org> | |||
* \brief Triangle drawing functions | |||
* | |||
* This file contains triangle drawing functions, both filled and outline. | |||
*/ | |||
#include "config.h" | |||
#include <stdlib.h> | |||