/* Header file for use with ez.lib */

#define GFX	    0x001
#define INTUI	    0x002
#define INTUITION   0x002
#define ARP	    0x004
#define DFONT	    0x008
#define DISKFONT    0x008
#define TRANSLATOR  0x010
#define ICONBASE    0x080
#define REXX	    0x100

#define MSG(a) (Write(Output(), a, strlen(a)))

struct Screen	*makescreen();
struct Window	*makewindow();
struct Window	*createwindow();
struct Gadget	*makeboolgadget();
struct Gadget	*create_boolgadget();
struct BitMap	*getbitmap();
struct TextFont *getfont();
char		*getstring();

/* these functions (and closelibs()) should properly be void, however
 * manx 3.6a seems to think I'm redeclaring the function when a function
 * is defined here as void.  As int it works fine....
 */
int killscreen();
int killwindow();
int free_bitmap();
int getyn();
int openlibs();
int closelibs();

#define setcolor(screen, num, color) (SetRGB4(&screen->ViewPort, num, (0x0f00&color)>>8, (0x00f0&color)>>4, (0x000f&color) ))
#define BLACK	  0x0000
#define WHITE	  0x0fff
#define RED	  0x0f00
#define GREEN	  0x00f0
#define BLUE	  0x000f
#define YELLOW	  0x0ff0
#define CYAN	  0x00ff
#define PINK	  0x0f09
#define PURPLE	  0x0f0f
#define GREY0	  0x0ccc
#define GREY	  0x0aaa
#define GREY1	  0x0888
#define GREY2	  0x0666
#define GREY3	  0x0444
#define GOLD	  0x0ea1
#define ORANGE	  0x0f70
#define INDIGO	  0x070e

#define initgfx()  (openlibs(GFX))
#define closegfx() (closelibs())

#define Print(rp, b) (Text(rp, b, strlen(b)))
#define Line(rp, a, b, c, d) { Move(rp, a, b); Draw(rp, c, d); }
#define Circle(rp, x, y, rad) (DrawEllipse(rp, x, y, rad, rad))

/* just a quickie to make calls to makescreen() a little more clear */
#define LORES 0x0000

