/*********************** mac specific header file ***********************


*/


#define TRUE	1
#define FALSE	0


#define appleid		1
#define applemenu 	0
#define fileid		256
#define filemenu	1
#define editid		257
#define editmenu	2
#define controlid	258
#define controlmenu 3
#ifdef MINIEDITCODE
#define editorid	259
#define editormenu	4
#define lastmenu	5
#else
#define lastmenu 4
#endif

#define TIMEON	500
#define TIMEOFF	100

/* graphics window */
#define GHORIZONTAL	4
#define GVERTICAL	22
#define GWIDTH		504
#define GHEIGHT		232

/* split screen */
#define SSCRW		80
#define SSCRH		5
#define SHORIZONTAL	4
#define SVERTICAL	275
#define SWIDTH		504
#define SHEIGHT		64

/* normal screen */
#define NSCRW		80
#define NSCRH		24
#define NHORIZONTAL	4
#define NVERTICAL	41
#define NWIDTH		504
#define NHEIGHT		298

/* screen buffer */
#define SCRH	24
#define SCRW	80

#define LINEMAX 200

#define CHARBUFFMAX 100

/*********************************************************************

	from miniedit.h
	
	header file for Miniedit
	
	(C) Copyright THINK Technologies, Inc. 1986.  All rights reserved.
	
*********************************************************************/

/* #define windowID 		128 */
#define ErrorAlert		256
#define	AdviseAlert		257

/* resource IDs of menus 
#define appleID			128
#define fileID			129
#define editID			130 */

/* Edit menu command indices */
#define undoCommand 	1
#define cutCommand		3
#define copyCommand		4
#define pasteCommand	5
#define clearCommand	6

/* Menu indices 
#define appleM			0
#define fileM			1
#define editM			2 */

#define fmTop		1
#define fmNew		3
#define fmOpen		4
#define fmClose		5
#define fmSave		7
#define fmSaveAs	8
#define fmRevert	9
#define fmPageSetUp	11
#define fmPrint		12

#define ldLoad 1
#define ldLoadNosily 2
#define ldQuit 4

#define clBreak 1
#define clCont 2
#define clClean 3
#define clAbort 4
#define clTop 5
#define clSplit 7

#define aaSave		1
#define aaDiscard	2
#define aaCancel	3

/* useful definitions */
#define MenuBarHeight	20
#define TitleBarHeight	20
#define MinWidth	80
#define MinHeight	40
#define ScreenMargin	2
#define TextMargin	4
#define GHeight		232
#define SBarWidth	15 /* 16 in macint.c */

void SetupScreen(void);
void scrsplit(int split);
int scrgetc(void);
int scrnextc(void);

/* osstuff */

void osinit(char *name);
void osfinish(void);
int osrand(int n);
int ostgetc(void);
int ostputc(int ch);
int osaputc(int ch, FILE *fp);
int osagetc(FILE *fp);
int osbgetc(FILE *fp);
int osbputc(int ch, FILE *fp);
FILE *osaopen(char *name, char *mode);
FILE *osbopen(char *name, char *mode);
void oserror(char *msg);
int osclose(FILE *fp);
void osflush(void);
void oscheck(void);
void ossymbols(void);
