Listing 1. Display Structure

/* static display structured initialized by
   XOpenDisplay()*/
typedef struct {
        GR_COORD display_width;
        GR_COORD display_height;
        int      display_bpp;
} Display;
static Display _display;

#define DisplayWidth(d,s)   (_display.display_width)
#define DisplayHeight(d,s)  (_display.display_height)
#define DefaultDepth(d,s)   (_display.display_bpp)
#define DefaultScreen(d)    0
#define RootWindow(d,s)     GR_ROOT_WINDOW_ID
#define BlackPixel(d,s)     BLACK
#define WhitePixel(d,s)     WHITE
#define False               0
#define True                1