#ifndef WIDGETPROG

/* This include file contains definitions needed by widget developers.  */

#ifdef VAXC
#define external globalref
#else
#define external extern
#endif

#define DECHINTS

#include <string.h>
#include <ctype.h>
#ifdef VMS
#include <decw$include/StringDefs.h>
#include <decw$include/IntrinsicP.h>
#include <decw$include/Core.h>
#include <decw$include/Composite.h>
#include <decw$include/Constrain.h>
#include <decw$include/Shell.h>
#include <decw$include/Vendor.h>
#else
#include <X11/StringDefs.h>
#include <X++/Intrinsic.h>
#include <xt++/Core.h>
#include <xt++/Composite.h>
#include <xt++/Constraint.h>
#include <xt++/Shell.h>
#include <xt++/Vendor.h>
#endif


#define WIDGETPROG 1

#ifdef VMS
#include <decw$include/DECwDwtApplProg.h>
#else
#include <xt++/DECwDwtApplProg.h>
#endif


/* macros */

#ifndef MIN
#define MIN(x,y)	((x) < (y) ? (x) : (y))
#endif
#ifndef MAX
#define MAX(x,y)	((x) > (y) ? (x) : (y))
#endif

#define ASSIGN_MAX(x, y) if ((y) > (x)) x = (y)
#define ASSIGN_MIN(x, y) if ((y) < (x)) x = (y)                         

#define MAXHEIGHT	((1 << 31)-1)
#define MAXWIDTH	((1 << 31)-1)

#ifndef MAXINT
#define MAXINT		2147483647 /* Biggest number that can fit in a long. */
#endif

#define DwtInheritMoveFocusToNext ((VoidProc) _XtInherit)
#define DwtInheritMoveFocusToPrev ((VoidProc) _XtInherit)

/*
 * The DECtoolkit internal callback structure which maps the
 * external representation to the intrinsics internal representation
 */
class  DwtCallbackStruct {
    XtCallbackList	ecallback;	/* Xtoolkit callback list */
};

/*
 * used by parents of gadgets to allow geometry treatment independently
 * of whether the kid is a widget or gadget
 */

class DwtKidGeometryRec;
typedef DwtKidGeometryRec *DwtKidGeometry;
class DwtKidGeometryRec {
    char   *kid;				/* ptr to kid */
    XtWidgetGeometry	box;			/* kid geo box */
};

#define DwtColorNull -1

#endif  /* WIDGETPROG */
