#define max(x,y) (((x) > (y)) ? (x) : (y))
#define DEFAULT_BDWIDTH   1

int halfH,    // Half of the height of the XWindow we create, in pixels.
    halfW,    // Half of the width of the XWindow we create, in pixels.
    scrH,     // Height of the drawing area of the XWindow we create.
    scrW;     // Width of the drawing area of the XWindow we create.

XColor *clr;  // Colors. The calling program will have to set these up.

// Default parameter values (as strings).
char *app_name     = "xhello",
     *display_name = NULL,
     *efont        =  "fixed",
     *mbgcolor     = "Yellow",
     *mfgcolor     = "DarkBlue",
     *mfont        = "fixed",
     *mgeom        = NULL,
     *mgeom_cline  = NULL,
     *mgeom_rsrc   = NULL,
     *msgtext      = "Part of the boilerplate I started with",
     *msgtext_cline= NULL,
     *msgtext_rsrc = NULL;

Colormap clrMap;

// Non-string parameters of xhello.
XFontStruct *mfontstruct, 
            *efontstruct;

// Pixel values:
unsigned int ebgpix,
             efgpix,
             mbgpix,
             mfgpix;

unsigned int eheight,
             ewidth; 
       
int ex, ey,
    extxt, eytxt;

Display *display; // Connection to X display.

char default_geometry[80],
     *window_title;

GC  grCntx;          // The graphics context for main. 

Window Main;         // Window ID of the main window.

XClassHint  *p_ch;   // Class hint for window manager.
XEvent    theEvent;  // Structure for current event.
XSizeHints  *p_xsh;  // Size hints for window manager.

XTextProperty iname, // Icon name for icon label.
              wname; // Window name for title bar.

XWMHints    *p_xwmh; // Hints for the window manager.
