source: libcaca/trunk/src/caca.h @ 192

Last change on this file since 192 was 192, checked in by Sam Hocevar, 18 years ago
  • Changed copyleft to LGPL.
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1/*
2 *   libcaca       ASCII-Art library
3 *   Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org>
4 *                 All Rights Reserved
5 *
6 *   $Id: caca.h 192 2003-11-16 12:28:29Z sam $
7 *
8 *   This library is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU Lesser General Public
10 *   License as published by the Free Software Foundation; either
11 *   version 2 of the License, or (at your option) any later version.
12 *
13 *   This library is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 *   Lesser General Public License for more details.
17 *
18 *   You should have received a copy of the GNU Lesser General Public
19 *   License along with this library; if not, write to the Free Software
20 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 *   02111-1307  USA
22 */
23
24#ifndef __EE_H__
25#define __EE_H__
26
27#ifdef __cplusplus
28extern "C"
29{
30#endif
31
32/*
33 * Colors
34 */
35enum caca_colors
36{
37    EE_BLACK = 0,
38    EE_BLUE = 1,
39    EE_GREEN = 2,
40    EE_CYAN = 3,
41    EE_RED = 4,
42    EE_MAGENTA = 5,
43    EE_BROWN = 6,
44    EE_LIGHTGRAY = 7,
45    EE_DARKGRAY = 8,
46    EE_LIGHTBLUE = 9,
47    EE_LIGHTGREEN = 10,
48    EE_LIGHTCYAN = 11,
49    EE_LIGHTRED = 12,
50    EE_LIGHTMAGENTA = 13,
51    EE_YELLOW = 14,
52    EE_WHITE = 15
53};
54
55/*
56 * Types
57 */
58struct caca_sprite;
59
60/*
61 * Prototypes
62 */
63int caca_init(void);
64void caca_set_delay(unsigned int);
65unsigned int caca_get_rendertime(void);
66unsigned int caca_get_width(void);
67unsigned int caca_get_height(void);
68const char *caca_get_color_name(unsigned int);
69void caca_refresh(void);
70void caca_end(void);
71
72char caca_get_key(void);
73
74void caca_set_color(int);
75int caca_get_color(void);
76void caca_putchar(int, int, char);
77void caca_putstr(int, int, const char *);
78void caca_printf(int, int, const char *, ...);
79void caca_clear(void);
80
81void caca_draw_line(int, int, int, int, char);
82void caca_draw_polyline(const int[], const int[], int, char);
83void caca_draw_thin_line(int, int, int, int);
84void caca_draw_thin_polyline(const int[], const int[], int);
85
86void caca_draw_circle(int, int, int, char);
87void caca_draw_ellipse(int, int, int, int, char);
88void caca_draw_thin_ellipse(int, int, int, int);
89void caca_fill_ellipse(int, int, int, int, char);
90
91void caca_draw_box(int, int, int, int, char);
92void caca_draw_thin_box(int, int, int, int);
93void caca_fill_box(int, int, int, int, char);
94
95void caca_draw_triangle(int, int, int, int, int, int, char);
96void caca_draw_thin_triangle(int, int, int, int, int, int);
97void caca_fill_triangle(int, int, int, int, int, int, char);
98
99int caca_rand(int, int);
100unsigned int caca_sqrt(unsigned int);
101
102struct caca_sprite * caca_load_sprite(const char *);
103int caca_get_sprite_frames(struct caca_sprite *);
104int caca_get_sprite_width(struct caca_sprite *, int);
105int caca_get_sprite_height(struct caca_sprite *, int);
106int caca_get_sprite_dx(struct caca_sprite *, int);
107int caca_get_sprite_dy(struct caca_sprite *, int);
108void caca_draw_sprite(int, int, struct caca_sprite *, int);
109void caca_free_sprite(struct caca_sprite *);
110
111void caca_blit(int, int, int, int, void *, int, int);
112
113#ifdef __cplusplus
114}
115#endif
116
117#endif /* __EE_H__ */
Note: See TracBrowser for help on using the repository browser.