home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Frameworks / Hsoi's App Shell 1.0a4 / Hsoi's App Shell Source / HASGlobals.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-28  |  3.7 KB  |  109 lines  |  [TEXT/CWIE]

  1. /*
  2.     HASGlobals.c from Hsoi's App Shell.  © 1995-1997 John C. Daub.  All rights reserved.
  3.  
  4.     This file contains definitions/declarations for all the global variables for the app shell.
  5. */
  6.  
  7. #pragma mark ••• #includes •••
  8.  
  9. #ifndef _WASTE_
  10. #include "WASTE.h"
  11. #endif
  12. #include "HASGlobals.h"
  13. #ifndef __TYPES__
  14. #include <Types.h>
  15. #endif
  16. #ifndef __QUICKDRAW__
  17. #include <Quickdraw.h>
  18. #endif
  19. #ifndef __DIALOGS__
  20. #include <Dialogs.h>
  21. #endif
  22. #ifndef __PRINTING__
  23. #include <Printing.h>
  24. #endif
  25. #ifndef __NOTIFICATION__
  26. #include <Notification.h>
  27. #endif
  28. #ifndef __FILES__
  29. #include <Files.h>
  30. #endif
  31.  
  32. #pragma mark -
  33. #pragma mark ••• global variables •••
  34.  
  35. Boolean        gQuitting = false;            //  are we gonna quit the program or not? true/1 == YES
  36.  
  37. Boolean        gInBackground = false;        //    is the program in the background or not?
  38.  
  39. Boolean        gPeriodicTask = false;        //    do we have a periodic task going? like a progress bar?
  40.  
  41. unsigned long        gSleepTime = 1;                //    called in WaitNextEvent to deal with processor time
  42.  
  43. RgnHandle    gCursorRgn = nil;            //    where is the cursor?
  44.  
  45. short        gAppResourceFork = nil;        //  this is the app's/shell's resource fork id
  46.  
  47. CursHandle    gEditCursor;                //    handle to the I-Beam cursor
  48.  
  49. CursHandle    gWaitCursor;                //  handle to the watch cursor
  50.  
  51. acurHandle    gAnimWatchCursor;            //    handle to the acur animated watch cursor
  52.  
  53. Boolean        gHasColorQD = false;        //    does the computer we're running on have ColorQuickDraw?
  54.  
  55. Boolean        gHasColorPicker = false;    // does sthe computer have PickColor() or do we have to use GetColor()
  56.  
  57. Boolean        gInModalState = false;        //  set when we want to treat the front window modally
  58.                                         //    doesn't need to be set if the toolbox will handle everything
  59.                                         //    e.g. calling ModalDialog, we don't need to set this, but
  60.                                         //    otherwise, like the movable modal dialog, the help dialog, etc
  61.                                         //    we need to set this
  62.                                             
  63. short        gCurrentRadio = 0;            //    item number of the currently selected radio button
  64.  
  65. DialogRef    gModelessDialog = nil;        //     pointer to mthe modeless dialog box
  66.  
  67. DialogRef    gMovableModalDialog = nil;    //    pointer to the movable modal progress dialog
  68.  
  69. DialogRef    gHelpDialog = nil;            //    pointer to our Help dialog
  70.  
  71. WindowRef    gClipboardWindow = nil;        //    pointer to the clipboard window
  72.  
  73. Boolean        gHasDragAndDrop = false;    // true if the Drag Manager is available
  74.  
  75. Boolean        gHasTextServices = false;    // true if the Text Services Manager is available
  76.  
  77. Boolean        gHasSpeechManager = false;    // true if the Speech Manager is present
  78.  
  79. Boolean        gHasNotification = false;    // true if Notification Manager is present
  80.  
  81. Boolean        gCanRecordSound = false;    // true if they can record sounds (has a sound input device)
  82.  
  83. THPrint        gPrinterRecord = nil;        // hold the info about the document to be printed
  84.  
  85. TPPrPort    gThePrinterPort = nil;        // holds the port for printing
  86.  
  87. short        gHelpItem = nil;            // holds the menu item number of our help menu item
  88.  
  89. ModalFilterUPP    gMyStdDlogFilterProc;    // the procedure pointer for our standard dialog flter proc
  90.  
  91. HASPreferences    gMyPrefs;                // holds our preferences settings
  92.  
  93. short        gNewWindowCount = 0;        //    number of untitled windows, used to title windows
  94.  
  95. NMRec        gNotifyRec;                    //    holds our settings for the Notification Manager
  96.  
  97. Boolean        gNotifying = false;            //    did we install a Notification or not?
  98.  
  99. Str255        gNotifyStr = "\p";            //    Notification Manager Alert String
  100.  
  101. FSSpec        gPrefsFileSpec;                //    FSSpec for our prefs file
  102.  
  103. WindowRef    gFirstWindow = nil;            //    We keep track of our windows in    the order in which
  104.                                         //    they were created. This variable points to
  105.                                         //    the first (oldest) window. see HASMenuWindows.c
  106.  
  107. short        gNumWindows = 0;            //    how many document windows we have open
  108.  
  109. Boolean        gWritePrefs = false;        //    to write or not to write out the prefs file on quit