Subversion Repositories programming

Rev

Rev 311 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
292 ira 1
/*******************************************************************************
2
 * draw.h - include file for libggi-based drawing on the GNU/Linux framebuffer.
3
 *
4
 * Copyright (c) 2006, Ira W. Snyder (devel@irasnyder.com)
5
 ******************************************************************************/
6
 
7
#ifndef DRAW_H
8
#define DRAW_H
9
 
10
#include <ggi/ggi.h>
11
 
312 ira 12
#ifdef __cplusplus
13
extern "C"
14
{
15
#endif
16
 
292 ira 17
/* Colors */
311 ira 18
#define BLACK   0
19
#define AQUA    1
296 ira 20
#define BLUE    2
21
#define FUCHSIA 3
22
#define GRAY    4
23
#define GREEN   5
24
#define LIME    6
25
#define MAROON  7
26
#define NAVY    8
27
#define OLIVE   9
28
#define PURPLE  10
29
#define RED     11
30
#define SILVER  12
31
#define TEAL    13
32
#define WHITE   14
33
#define YELLOW  15
34
#define NUM_COLORS 16
292 ira 35
 
36
static ggi_visual_t vis;
296 ira 37
static ggi_color palette[NUM_COLORS];
292 ira 38
 
39
/* Setup functions */
40
extern void draw_init ();
41
extern void draw_close ();
42
 
43
/* Drawing functions */
44
extern void draw_clearscreen ();
45
extern void draw_putpixel (int x, int y, int color);
46
extern void draw_box (int x, int y, int width, int height, int color);
47
extern void draw_line (int x1, int y1, int x2, int y2, int color);
295 ira 48
extern void draw_putc (int x, int y, char c, int color);
49
extern void draw_puts (int x, int y, const char *str, int color);
292 ira 50
 
312 ira 51
#ifdef __cplusplus
52
}
292 ira 53
#endif
54
 
312 ira 55
#endif
56