/*
 *  This is a totally safe (and straightforward if you are new to C) way
 *  to open a window that was in the original DualPF.c program.
 *
 */

struct	Window *getNewWind(left, top, width, height, flg, iflg)
SHORT	left, top, width, height;
ULONG	flg, iflg;
{
    struct  Window  *OpenWindow();
    struct  NewWindow	nw;

    nw.LeftEdge     =	(SHORT) left;
    nw.TopEdge	    =	(SHORT) top;
    nw.Width	    =	(SHORT) width;
    nw.Height	    =	(SHORT) height;
    nw.DetailPen    =	(UBYTE) -1;
    nw.BlockPen     =	(UBYTE) -1;

    nw.IDCMPFlags   =	(ULONG) iflg;
    nw.Flags	    =	(ULONG) flg;

    nw.FirstGadget  =	(struct Gadget *)   NULL;
    nw.CheckMark    =	(struct Image *)    NULL;
    nw.Title	    =	(UBYTE *)   "TableCloth 1.0 © 1987 John Russell ";  /* vi eats the copyright symbol; if there's just a bracket it should be a "copyright" character */
    nw.Screen	    =	(struct Screen *)   NULL;
    nw.BitMap	    =	(struct BitMap *)   NULL;
    nw.MinWidth     =	(SHORT) 50;
    nw.MinHeight    =	(SHORT) 30;
    nw.MaxWidth     =	(SHORT) nw.Width;
    nw.MaxHeight    =	(SHORT) nw.Height;
    nw.Type	    =	(USHORT) WBENCHSCREEN;

    return ((struct Window *) OpenWindow(&nw));
}
