Rev 312 | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*******************************************************************************
* draw.h - include file for libggi-based drawing on the GNU/Linux framebuffer.
*
* Copyright (c) 2006, Ira W. Snyder (devel@irasnyder.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
******************************************************************************/
#ifndef DRAW_H
#define DRAW_H
#include <ggi/ggi.h>
#ifdef __cplusplus
extern "C"
{
#endif
/* Colors */
#define BLACK 0
#define AQUA 1
#define BLUE 2
#define FUCHSIA 3
#define GRAY 4
#define GREEN 5
#define LIME 6
#define MAROON 7
#define NAVY 8
#define OLIVE 9
#define PURPLE 10
#define RED 11
#define SILVER 12
#define TEAL 13
#define WHITE 14
#define YELLOW 15
#define NUM_COLORS 16
static ggi_visual_t vis;
static ggi_color palette[NUM_COLORS];
/* Setup functions */
extern void draw_init ();
extern void draw_close ();
/* Drawing functions */
extern void draw_clearscreen ();
extern void draw_putpixel (int x, int y, int color);
extern void draw_box (int x, int y, int width, int height, int color);
extern void draw_line (int x1, int y1, int x2, int y2, int color);
extern void draw_putc (int x, int y, char c, int color);
extern void draw_puts (int x, int y, const char *str, int color);
#ifdef __cplusplus
}
#endif
#endif