home *** CD-ROM | disk | FTP | other *** search
- /*
- HASGlobals.c from Hsoi's App Shell. © 1995-1997 John C. Daub. All rights reserved.
-
- This file contains definitions/declarations for all the global variables for the app shell.
- */
-
- #pragma mark ••• #includes •••
-
- #ifndef _WASTE_
- #include "WASTE.h"
- #endif
- #include "HASGlobals.h"
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __QUICKDRAW__
- #include <Quickdraw.h>
- #endif
- #ifndef __DIALOGS__
- #include <Dialogs.h>
- #endif
- #ifndef __PRINTING__
- #include <Printing.h>
- #endif
- #ifndef __NOTIFICATION__
- #include <Notification.h>
- #endif
- #ifndef __FILES__
- #include <Files.h>
- #endif
-
- #pragma mark -
- #pragma mark ••• global variables •••
-
- Boolean gQuitting = false; // are we gonna quit the program or not? true/1 == YES
-
- Boolean gInBackground = false; // is the program in the background or not?
-
- Boolean gPeriodicTask = false; // do we have a periodic task going? like a progress bar?
-
- unsigned long gSleepTime = 1; // called in WaitNextEvent to deal with processor time
-
- RgnHandle gCursorRgn = nil; // where is the cursor?
-
- short gAppResourceFork = nil; // this is the app's/shell's resource fork id
-
- CursHandle gEditCursor; // handle to the I-Beam cursor
-
- CursHandle gWaitCursor; // handle to the watch cursor
-
- acurHandle gAnimWatchCursor; // handle to the acur animated watch cursor
-
- Boolean gHasColorQD = false; // does the computer we're running on have ColorQuickDraw?
-
- Boolean gHasColorPicker = false; // does sthe computer have PickColor() or do we have to use GetColor()
-
- Boolean gInModalState = false; // set when we want to treat the front window modally
- // doesn't need to be set if the toolbox will handle everything
- // e.g. calling ModalDialog, we don't need to set this, but
- // otherwise, like the movable modal dialog, the help dialog, etc
- // we need to set this
-
- short gCurrentRadio = 0; // item number of the currently selected radio button
-
- DialogRef gModelessDialog = nil; // pointer to mthe modeless dialog box
-
- DialogRef gMovableModalDialog = nil; // pointer to the movable modal progress dialog
-
- DialogRef gHelpDialog = nil; // pointer to our Help dialog
-
- WindowRef gClipboardWindow = nil; // pointer to the clipboard window
-
- Boolean gHasDragAndDrop = false; // true if the Drag Manager is available
-
- Boolean gHasTextServices = false; // true if the Text Services Manager is available
-
- Boolean gHasSpeechManager = false; // true if the Speech Manager is present
-
- Boolean gHasNotification = false; // true if Notification Manager is present
-
- Boolean gCanRecordSound = false; // true if they can record sounds (has a sound input device)
-
- THPrint gPrinterRecord = nil; // hold the info about the document to be printed
-
- TPPrPort gThePrinterPort = nil; // holds the port for printing
-
- short gHelpItem = nil; // holds the menu item number of our help menu item
-
- ModalFilterUPP gMyStdDlogFilterProc; // the procedure pointer for our standard dialog flter proc
-
- HASPreferences gMyPrefs; // holds our preferences settings
-
- short gNewWindowCount = 0; // number of untitled windows, used to title windows
-
- NMRec gNotifyRec; // holds our settings for the Notification Manager
-
- Boolean gNotifying = false; // did we install a Notification or not?
-
- Str255 gNotifyStr = "\p"; // Notification Manager Alert String
-
- FSSpec gPrefsFileSpec; // FSSpec for our prefs file
-
- WindowRef gFirstWindow = nil; // We keep track of our windows in the order in which
- // they were created. This variable points to
- // the first (oldest) window. see HASMenuWindows.c
-
- short gNumWindows = 0; // how many document windows we have open
-
- Boolean gWritePrefs = false; // to write or not to write out the prefs file on quit