home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / SoundSwirl / main.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-14  |  2.3 KB  |  97 lines  |  [TEXT/KAHL]

  1. /*
  2. ** main.h
  3. **
  4. ** This is the main header file
  5. */
  6.  
  7. /********
  8.   Application macros...
  9. *********/
  10.  
  11.  
  12. #define MENU_BAR    128
  13. #define APPLE_MENU    128
  14. #define FILE_MENU    129
  15. #define EDIT_MENU    130
  16. #define LISTEN_MENU    131
  17.  
  18. #define AppleAboutItem    1        /* Apple menu options */
  19.  
  20. #define FileNewItem        1        /* File menu options */
  21. #define FileOpenItem    2
  22. #define    FileCloseItem    3
  23. #define FileSaveItem    5
  24. #define FileSaveAsItem    6
  25. #define    FileQuitItem    8
  26.  
  27. #define EditUndoItem    1        /* Edit menu options */
  28. #define EditCutItem        3
  29. #define EditCopyItem    4
  30. #define EditPasteItem    5
  31. #define EditClearItem    6
  32.  
  33. #define ListenBegin        1        /* Listen menu options */
  34. #define ListenStop        2
  35.  
  36. #define MainWindID        128        /* main window info */
  37. #define MainWindHt        364
  38. #define MainWindWd        512
  39.  
  40. #define ErrorDlogID        128        /* Error dialog window */
  41. #define ErrorOKButt        1
  42. #define AboutDlogID        129        /* dialog window ID */
  43. #define AboutOKButt        1
  44.  
  45. #define kVScrollBarID    128     /* window's vert scroll bar */
  46. #define kDrawIconOffset    13        /* scroll bar offset from draw icon */
  47. #define kScrollBorderOffset    15    /* scroll bar offset from border */
  48.  
  49. #define kIndStringID        128        /* our STR# res ID */
  50. #define kPromptString        1        /* Now for the strings we need */
  51.  
  52. /********
  53.   Data Structures
  54. ********/
  55.  
  56. /********
  57.   Global Variables... located in globals.c
  58. ********/
  59.  
  60. extern MenuHandle    gFileM, gEditM,
  61.                     gAppleM, gListenM;    /* handles to menus */
  62. extern WindowPtr    gMainWindow;        /* the main window  */
  63. extern int            gListening;            /* Are we listening to input? */
  64.  
  65. /*** circle drawing stuff ***/
  66.  
  67. #define PI 3.1415926
  68. extern double gAngleStep;  /* radians per step, initial=30° */
  69. extern short gOffset;      /* offset from radius */
  70. extern short gRadius;    /* radius size, default is 100 */
  71.  
  72. /********
  73.   Functions
  74. ********/
  75.  
  76. void Cleanup(void);                  /* main.c */
  77.  
  78. Boolean TrapAvailable(int theTrap); /* trapavail.c */
  79.  
  80. void DoAbout(void);        /* dostuff.c */
  81. void DoEvent(EventRecord *);
  82. void DoMouseDown(EventRecord *);
  83. void DoCommand(long);
  84. void DoFileNew(void);
  85. void DoFileClose(void);
  86. void DoContent(EventRecord *);
  87. void DoKey(EventRecord *);
  88. void Error(Str255, Str255, Str255, Str255);
  89.  
  90. void DrawStep(void);         /* drawing.c */
  91.  
  92. void InitSound(void);     /* sound.c */
  93. void KillSound(void);
  94. void SndListenStop(void);
  95. void SndListenBegin(void);
  96. int FetchSndOffset(void);
  97.