
#ifndef shelltypesinclude
#define shelltypesinclude

#ifdef HEADERTRACE
#pragma message( "**Compiling " __FILE__ )
#endif

#ifdef MACVERSION
	#include <Processes.h>
#endif

#define diskfontnamelength 32 /*number of bytes for a font name stored on disk*/

typedef char diskfontstring [diskfontnamelength + 1];

typedef struct diskrect {
	
	short top;
	
	short left;
	
	short bottom;
	
	short right;
	} diskrect;

typedef struct diskrgb {
	
	short red;
	
	short green;
	
	short blue;
	} diskrgb;

#ifdef NEWFILESPECTYPE
	typedef struct newtyfilespec {
	
		short fileTypeID;
		
		short lengthOfFileSpecifier;
		
		long volumeID;
		
		char fullSpecifier[258];
		
		Handle fileSpecifier;
		
		long macSpecifier;	
		} tyfilespec, *ptrfilespec, **hdlfilespec;
	
	#define fsname(fs) (fs)->fullSpecifier
	
#else
	typedef FSSpec tyfilespec, *ptrfilespec, **hdlfilespec;
	
	#define fsname(fs) (fs)->name
#endif

#ifdef MACVERSION
typedef ControlHandle hdlscrollbar;
#endif

#ifdef WIN95VERSION
typedef struct tyscrollbarrecord
	{
	HWND hWnd;
	int  item;
	} scrollbarrecord, *ptrscrollbarrecord, **hdlscrollbar;
#endif

#ifdef MACVERSION
	typedef MenuHandle hdlmenu;
#endif

#ifdef WIN95VERSION
	typedef HMENU hdlmenu;
#endif


typedef struct tytextdisplayinfo { 

	short h; /*the horizontal pen position for all lines*/
	
	short v; /*the vertical pen position for the first line*/
	
	short lh; /*the uniform lineheight of all lines*/
	
	short screenlines; /*the number of lines that fit within the current window's rectangle*/
	
	Rect r; /*the rectangle within which everything is displayed*/
	
	short horizscrollpixels; /*number of pixels to scroll by for each horiz scroll*/
	} tytextdisplayinfo;


typedef short **hdlintarray;


typedef struct typopuprecord { /*this record isn't currently used*/
	
	Rect popuprect; /*where the whole popup structure is displayed*/
	} typopuprecord, *ptrpopuprecord, **hdlpopuprecord;


typedef OSType tyscraptype;


typedef ProcessSerialNumber typrocessid;


typedef enum clickflags { /*these match #defines in Paige.h*/

	clicknormal = 0,
	
	clickextend = 0x0001, /* extend the selection */
	
	clickwords = 0x0002, /* select whole words only */

	clickparas = 0x0004, /* select whole paragraphs only */

	clicklines = 0x0008, /* highlight whole lines */

	clickvertical = 0x0010, /* allow vertical selection */

	clickdiscontiguous = 0x0020, /* enable discontiguous selection */

	clickstyle = 0x0040, /* select whole style range */

	clickcontrol = 0x0200, /* word advance for arrows, Home-End to doc top and bottom */

	clickoption = 0x0400, /* option key held down */

	clickcommand = 	0x0800	/* alt key (Windows) or command key (Mac) */
	
	} tyclickflags;


typedef enum tykeyflags { /*these match tyclickflags, but apply to keystrokes*/

	keynormal = 0,
	
	keyshift = 0x0001,

	keycontrol = 0x0200,

	keyoption = 0x0400,

	keycommand = 0x0800
	
	} tykeyflags;


typedef struct tybuttonstatus {
	
	boolean fldisplay; /*should button be displayed at all?*/
	
	boolean flenabled; /*if displayed, is it active (or dimmed)?*/
	
	boolean flbold; /*if displayed, should text style be bold?*/
	} tybuttonstatus;

#endif
