home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / SoundMusicDSP / Resound-2.5-MIHS / APIExamples / Math / Module.h < prev    next >
Encoding:
Text File  |  1997-12-05  |  2.1 KB  |  81 lines

  1.  
  2. /* 
  3. Module.h (version 2.2)
  4. A Module Template.  
  5.  
  6. Part of the Resound 2.2 API
  7. Sean Luke
  8. Last Revision: January 23, 1995
  9.  
  10. Copyright 1995, Sean Luke
  11. This code may be used, modified, or distributed freely without 
  12. permission of the author.
  13.  
  14.  
  15.  
  16. All modules you create should subclass from Module.h.
  17. Module.h contains two data items that are defined when the
  18. instance is initialized:  
  19.  
  20. TheModuleController    is the instance that "speaks"
  21.     to modules, using the protocol ModuleProtocol.  
  22.     You don't need to know anything more about the
  23.     Module Controller other than that it is responsible 
  24.     for loading, maintaining, and communicating with
  25.     modules, and that it is your gateway to communicating 
  26.     with Resound.
  27.                                 
  28. TheModuleMenuNode is the root node of your node tree for
  29.     menu items you want to create in Resound's Modules menu.
  30.     This is initially set to NULL--you are responsible for
  31.     setting it a ModuleMenuNode, and setting up that node
  32.     and its subnodes.  For more information on this, see
  33.     ModuleMenuNode.h.  Always set up menu node information
  34.     by overriding init, but remember to call [super init]
  35.     first.
  36.     
  37. There are three methods in Module:
  38.  
  39. init:  where you set up your ModuleMenuNode.  See above.
  40.  
  41. setModuleControllerTo:  Resound calls this to set up
  42.     TheModuleController.  You should ignore this call.
  43.     
  44. getModuleMenuNode:  Resound calls this to get your ModuleMenuNode.
  45.     It is called soon after init:, so be sure to have your node
  46.     set up by then.
  47.  
  48. */
  49.  
  50.  
  51.  
  52. #import <objc/Object.h>
  53. #import "ModuleProtocol.h"
  54. #import "ModuleMenuNode.h"
  55. #import "ModuleSound.h"
  56.  
  57. @interface Module:Object
  58. {
  59.     id            <ModuleProtocol> TheModuleController;
  60.     id             TheModuleMenuNode;
  61. }
  62.  
  63. - free;                    // frees module, TheModuleMenuNode, and submenu nodes
  64. - init;                    // generates TheModuleMenuNode.
  65.  
  66. - setModuleControllerTo: theModuleController;        
  67.           
  68.                           // Returns NULL if unable
  69.                           // to access theModuleController,
  70.                         // self otherwise
  71.  
  72. - getModuleMenuNode;    // returns the ModuleMenuNode.    
  73. - soundDidChange;        // informs the Module that the current sound may have 
  74.                         // changed.
  75. - nowPlaying;
  76. - nowRecording;
  77. - didPlay;
  78. - didRecord;
  79.   
  80. @end
  81.