home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 May / macformat-024.iso / Shareware City / Developers / appe Windows 1.51 / main.h < prev    next >
Encoding:
Text File  |  1995-01-11  |  2.7 KB  |  87 lines  |  [TEXT/KAHL]

  1. // File "main.h" -
  2. // This header file is Copyright Matt Slot & Slot-Machines Ltd., © 1994
  3.  
  4. #include "event filter.h"
  5.  
  6. // * ****************************************************************************** *
  7.  
  8. // Info about My Application
  9. #define    kCreatorType        'CWnd'
  10. #define kApplFileType        'appe'
  11. #define kPrefsFileType        'PREF'
  12. #define kPrefsFileName        "\pappe Window Prefs"
  13.  
  14. // * ****************************************************************************** *
  15. // * ****************************************************************************** *
  16.  
  17. // By setting the second value to the creator of a given application, the
  18. // window will only be visible in that applications context. The default
  19. // is to leave it visible always.
  20.  
  21. #define    kAllApplications    '****'
  22. #define kMyApplication        '****'
  23.  
  24. // * ****************************************************************************** *
  25. // * ****************************************************************************** *
  26.  
  27. // The current version of the Text Services Manager does not return
  28. // a color window in a color environment. These flags determine whether
  29. // we will patch NewWindow to NewCWindow, or whether we will try to
  30. // get by cleanly without trap-patching.
  31.  
  32. #define    kPatchOutNewWindow     1
  33.  
  34. // * ****************************************************************************** *
  35. // * ****************************************************************************** *
  36.  
  37. #define kAppleMenuID             128
  38. #define kAppleMenuAboutItem           1
  39. #define kAppleMenuSeparator1       2
  40.  
  41. #define kFileMenuID                 129
  42. #define kFileMenuShowHideItem       1
  43. #define kFileMenuCloseItem           2
  44. #define kFileMenuSeparator1           3
  45. #define kFileMenuQuitItem           4
  46.  
  47. #define kEditMenuID                 130
  48. #define kEditMenuUndoItem           1
  49. #define kEditMenuSeparator1           2
  50. #define kEditMenuCutItem           3
  51. #define kEditMenuCopyItem           4
  52. #define kEditMenuPasteItem           5
  53. #define kEditMenuClearItem           6
  54.  
  55. // * ****************************************************************************** *
  56. // * ****************************************************************************** *
  57.  
  58. typedef struct {
  59.     short flags : 11;
  60.     short bkgdOnly : 1;
  61.     short hasColorQD : 1;
  62.     short hasGDevices : 1;
  63.     short hidden : 1;
  64.     short quitting : 1;
  65.     
  66.     short frontMBarHeight;
  67.     long hotApplication;
  68.     long saveNewWindow;
  69.     Ptr myFilter;
  70.  
  71.     EventRecord theEvent;
  72.     WindowPtr window;
  73.     
  74.     short appFile;
  75.     FSSpec cloneSpec;
  76.     ContextPtr myContext, frontContext;
  77.     } GlobalsRec;
  78.  
  79. // * ****************************************************************************** *
  80. // * ****************************************************************************** *
  81. // Function Prototypes
  82.  
  83. void DoInit(void);
  84. void DoLoop(void);
  85. void DoMenuItem(long theMenuAndItem);
  86. short DoDispose(void);
  87. void main(void);