Subversion Repositories programming

Rev

Go to most recent revision | Details | 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
 
12
/* Colors */
296 ira 13
#define AQUA    0
14
#define BLACK   1
15
#define BLUE    2
16
#define FUCHSIA 3
17
#define GRAY    4
18
#define GREEN   5
19
#define LIME    6
20
#define MAROON  7
21
#define NAVY    8
22
#define OLIVE   9
23
#define PURPLE  10
24
#define RED     11
25
#define SILVER  12
26
#define TEAL    13
27
#define WHITE   14
28
#define YELLOW  15
29
#define NUM_COLORS 16
292 ira 30
 
31
static ggi_visual_t vis;
296 ira 32
static ggi_color palette[NUM_COLORS];
292 ira 33
 
34
/* Setup functions */
35
extern void draw_init ();
36
extern void draw_close ();
37
 
38
/* Drawing functions */
39
extern void draw_clearscreen ();
40
extern void draw_putpixel (int x, int y, int color);
41
extern void draw_box (int x, int y, int width, int height, int color);
42
extern void draw_line (int x1, int y1, int x2, int y2, int color);
295 ira 43
extern void draw_putc (int x, int y, char c, int color);
44
extern void draw_puts (int x, int y, const char *str, int color);
292 ira 45
 
46
#endif
47