/******************************************************************************
 *
 *	Extensions to dvapi.h file
 *	THIS IS NOT A DV DISTRIBUTED FILE!
 *
 *****************************************************************************/
#define ushort		unsigned short
/********
	Structure definition for the DESQview PIF (as of release 2.2)
	The first 369 bytes are the same as for Topview
	The next 13 bytes (optional) are available in all DESQview versions
	The next 34 bytes (optional) are available in DESQview version 2.00+
********/
#define PIF_STD		369	/* Topview standard PIF */
#define PIF_DV_EXT	13	/* DESQview extension */
#define PIF_DV_EXT2	34	/* DESQview release 2.00+ extension */

typedef struct dv_pif {
/* Standard (Topview) section (369 bytes) */
	byte	pi_reserved_1[2];	/* reserved */
	byte	pi_title[30];	/* program title (blank filled) */
	short	pi_maxmem;	/* maximum memory required (in K-bytes) */
	short	pi_minmem;	/* minimum memory required (in K-bytes) */
	byte	pi_startcmd[64];/* cmd to start program - null terminated */
	byte	pi_drive;	/* default drive in ASCII (A, B, etc.) */
	byte	pi_dir[64];	/* default directory name - null terminated */
	byte	pi_parms[64];	/* program parameters - null terminated */
	byte	pi_scrmode;	/* initial screen mode (0-7) */
	byte	pi_firstint;	/* # of first interrupt vector to be saved */
	byte	pi_lastint;	/* # of last interrupt vector to be saved */
	byte	pi_logrows;	/* # of rows in the logical window buffer */
	byte	pi_logcols;	/* # of cols in the logical window buffer */
	byte	pi_rowno;	/* row # for initial window position */
	byte	pi_colno;	/* col # for initial window position */
	short	pi_sysmem;	/* system memory size (in K-bytes) */
	byte	pi_shrname[64];	/* shared program name - null terminated */
	byte	pi_shrdata[64];	/* shared program data - null terminated */
	byte	pi_ctrl1;	/* control byte 1 - encoded as follows:
					0x80 - Writes directly to screen
					0x40 - Foreground only
					0x20 - Uses Math coprocessor
					0x10 - Accesses system keyboard buffer
					0x01 - Swappable */
	byte	pi_ctrl2;	/* control byte 2 - encoded as follows:
					0x40 - Uses cmd line parameters
					0x20 - Swaps interrupt vectors */
/* DESQview section (13 bytes) */
	byte	pi_openkeys[2];	/* keys to use on Open Window menu */
	short	pi_scriptsz;	/* size of script buffer (in bytes) */
	short	pi_pauseval;	/* automatically PAUSE after this many tests
					for keyboard input in one clock tick
					(normally 0) */
	byte	pi_nocolormap;	/* non-zero to disable auto color mapping */
	byte	pi_swappable;	/* non-zero if application is swappable */
	byte	pi_reserved_2[3];	/* reserved - should be 0 */
	byte	pi_autoclose;	/* non-zero to automatically close application
					on exit */
	byte	pi_diskreq;	/* non-zero if copy-protect disk is required */
/* DESQview Version 2 extension section (34 bytes) */
	byte	pi_reserved_3;	/* reserved - MUST HAVE A VALUE OF 1 */
	byte	pi_usesysmem;	/* non-zero if pgm uses shared system memory */
	byte	pi_physrows;	/* # of rows in the physical window buffer */
	byte	pi_physcols;	/* # of cols in the physical window buffer */
	short	pi_maxems;	/* maximum expanded memory available to
					program (in K_bytes) */
	byte	pi_ctrl3;	/* control byte 3 - encoded as follows:
					0x80 - Automatically assign position
					0x20 - Honor maximum memory value
					0x10 - Disallow Close command
					0x08 - FG only when doing graphics
					0x04 - Don't virtualize */
	byte	pi_kbconflict;	/* keyboard conflict level (0-4, normally 0) */
	byte	pi_graphpages;	/* # graphics pages used by the program */
	short	pi_newsysmem;	/* system memory size (overrides pi_sysmem) */
	byte	pi_newscrmode;	/* init screen mode for pgm (normally 0xFF) */
	byte	pi_reserved_4[22];	/* reserved */
	} PIF, *PIFPTR;

