home *** CD-ROM | disk | FTP | other *** search
- /*
- *
- * globals.h
- *
- * Global variables and constants.
- *
- *
- * Author: Rob Johnston
- * Date: Monday, January 20, 1992
- *
- * Copyright © 1992 Apple Computer, Inc.
- *
- */
-
-
- /*
- * Window Constants.
- */
-
- #define MaxDocumentCount 8
-
- #define InitialH 16
- #define InitialV 42
-
- #define TopMargin 6
- #define LeftMargin 6
- #define RightMargin 6
- #define BottomMargin 6
-
- #define ScrollResolution 12
-
-
- /*
- * File Constants.
- */
-
- #define FileCreator 'dNet'
- #define FileType 'TEXT'
-
-
- /*
- * Data Structures.
- */
-
- typedef struct Document {
- WindowPtr theWindow;
- TEHandle theTE;
- short docTop;
- RgnHandle hiliteRgn;
- ControlHandle vScroll, hScroll;
- short vScrollPos;
- short fRefNum;
- short dirty;
- Handle undoDragText;
- short undoSelStart, undoSelEnd;
- short lastSelStart, lastSelEnd;
- } Document;
-
-
- /*
- * Global Variables.
- *
- * If the flag _AllocateGlobals_ is defined then "extern" is defined as NULL.
- * This makes the following definitions actually declare the variables,
- * otherwise, the variables are declared as extern. This scheme allows all
- * files to include this file to gain access to the program's global variables
- * and also allows the main.c file to define them.
- */
-
- #ifdef _AllocateGlobals_
- #define extern
- #endif
-
-
- extern short gQuit, gQuitting;
- extern short gDocumentCount;
- extern Document *gDocumentList[MaxDocumentCount];
- extern short gFontItem, gSizeItem;
- extern short gInBackground;
- extern Document *gFrontDocument;
- extern short gCanUndoDrag;
- extern WindowPtr gUndoFrontmost, gLastFrontmost;
-
-
- #ifdef _AllocateGlobals_
- #undef extern
- #endif
-
-