home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Snippets / CustomDialog Demo / Headers / AppGlobals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-31  |  1.9 KB  |  73 lines  |  [TEXT/MMCC]

  1. /**********************************************************************
  2.  *
  3.  *                        CustomGetFile Dialog Demo
  4.  *
  5.  *    AppGlobals.h
  6.  *
  7.  *    Written in CodeWarrior Gold 5.5
  8.  *    August 31, 1995
  9.  *
  10.  *    Copyright © 1995 Carl B. Constantine
  11.  *    Some portions Copyright © 1995 MetroWerks, Inc.
  12.  *    Some portions Copyright © 1995 Apple Computer, Inc.
  13.  *
  14.  **********************************************************************/
  15.  
  16.  /*------------------------------------------------------------------
  17.   #
  18.   #                            File History
  19.   #
  20.   #        Date                Description of Change
  21.   #        ----                ---------------------
  22.   #        Aug 31/93            — Original creation of file
  23.   #
  24.   #
  25.   -------------------------------------------------------------------*/
  26.  
  27. #pragma once
  28.  
  29. /*============================ Constants ==============================*/
  30.  
  31. #define kDITop        0x0050    /* top coord for disk init dialog */
  32. #define kDILeft        0x0070    /* left coord for disk init dialog */
  33. #define NIL            0L        /* NIL or NULL Pointer type */
  34. #define MOVE_TO_FRONT    (WindowPtr) -1L    /* Constant for ToolBox Calls */
  35.  
  36.  
  37. /* define faster and better HiWord & LoWord Macros for convenience */
  38.  
  39. #define HiWrd(aLong)     (((aLong) >> 16) & 0xFFFF)
  40. #define LoWrd(aLong)     ((aLong) & 0xFFFF)
  41.  
  42.  
  43. #ifdef _Main_Module_
  44. #define SCOPE /*GLOBAL*/
  45. #else
  46. #define SCOPE extern
  47. #endif
  48.  
  49. /* 
  50.     there's a trick here:
  51.     
  52.     if _Main_Module_ is defined, and it's only defined in Main.c,
  53.     then SCOPE is a comment and the variables are defined.
  54.     
  55.     if _Main_Module_ is undefined, then SCOPE becomes the keyword
  56.     extern and these variables are declared.
  57.     
  58.     Thus, you can use this file in any file that needs to access 
  59.     the application's globals. There's no need for an "extern.h"
  60.         
  61. */
  62.     
  63. /*========================= Global variables: ===============================*/
  64.  
  65. SCOPE        Boolean        gQuitting,
  66.                         gInBackground;
  67.                         
  68. SCOPE        RgnHandle    gCursorRgn;
  69.  
  70. /*============================ End of File ===================================*/
  71.  
  72. #undef _Main_Module_
  73.