| 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 */
|
|
|
13 |
#define BLACK 0
|
|
|
14 |
#define RED 1
|
|
|
15 |
#define GREEN 2
|
|
|
16 |
#define BLUE 3
|
|
|
17 |
#define WHITE 4
|
|
|
18 |
|
|
|
19 |
static ggi_visual_t vis;
|
|
|
20 |
static ggi_color palette[5];
|
|
|
21 |
|
|
|
22 |
/* Setup functions */
|
|
|
23 |
extern void draw_init ();
|
|
|
24 |
extern void draw_close ();
|
|
|
25 |
|
|
|
26 |
/* Drawing functions */
|
|
|
27 |
extern void draw_clearscreen ();
|
|
|
28 |
extern void draw_putpixel (int x, int y, int color);
|
|
|
29 |
extern void draw_box (int x, int y, int width, int height, int color);
|
|
|
30 |
extern void draw_line (int x1, int y1, int x2, int y2, int color);
|
| 295 |
ira |
31 |
extern void draw_putc (int x, int y, char c, int color);
|
|
|
32 |
extern void draw_puts (int x, int y, const char *str, int color);
|
| 292 |
ira |
33 |
|
|
|
34 |
#endif
|
|
|
35 |
|