home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Add-Ons / After Dark / BlackLikeMe / BlackLikeMe.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-01  |  2.5 KB  |  85 lines  |  [TEXT/KAHL]

  1.  
  2.  
  3. #include "GraphicsModule_Types.h"
  4. #include "Sounds.h"
  5.  
  6.  
  7. // these are the functs that need defined ...
  8. OSErr DoInitialize(Handle *storage, RgnHandle blankRgn, GMParamBlockPtr params);
  9. OSErr DoClose(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params);
  10. OSErr DoBlank(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params);
  11. OSErr DoDrawFrame(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params);
  12. OSErr DoSetUp(RgnHandle blankRgn, short message, GMParamBlockPtr params);
  13.  
  14. // extra ones
  15. OSErr DoSelected(RgnHandle blankRgn, short message, GMParamBlockPtr params);
  16. OSErr DoAboutBox(RgnHandle blankRgn, short message, GMParamBlockPtr params);
  17.  
  18.  
  19.  
  20. //////////////////////////////////////////////////////////////////////////////////////
  21. // this is the first funct called by AD ... we need to allocate and initialize here
  22. OSErr
  23. DoInitialize(Handle *storage, RgnHandle blankRgn, GMParamBlockPtr params) {
  24.  
  25.     return noErr;
  26. }
  27.  
  28. //////////////////////////////////////////////////////////////////////////////////////
  29. // the screen saver has been awakened! time to ditch the storage and wave goodbye
  30. OSErr 
  31. DoClose(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params) {
  32.  
  33.  
  34.     return noErr;
  35. }
  36.  
  37.  
  38.  
  39. //////////////////////////////////////////////////////////////////////////////////////
  40. // make the screen go black
  41. OSErr
  42. DoBlank(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params) {
  43.  
  44.     // darken the screen ...
  45.     FillRgn(blankRgn, params->qdGlobalsCopy->qdBlack);
  46.     return noErr;
  47.  
  48. }
  49.  
  50. //////////////////////////////////////////////////////////////////////////////////////
  51. // this is the workhorse routine. It does the continual screen work to make
  52. // this screen saver what it is.
  53. OSErr 
  54. DoDrawFrame(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params) 
  55. {
  56.     // do nothing
  57.     return noErr;
  58. }
  59.  
  60. //////////////////////////////////////////////////////////////////////////////////////
  61. // this is called when they click on something in the control panel
  62. OSErr 
  63. DoSetUp(RgnHandle blankRgn, short message, GMParamBlockPtr params) {
  64.     // button got pushed?? 
  65.     return noErr;
  66. }
  67.  
  68.  
  69.  
  70. OSErr DoSelected(RgnHandle blankRgn, short message, GMParamBlockPtr params) {
  71.     // this gets called when your module is selected in the AD control panel
  72.     return noErr;
  73. }
  74.  
  75.  
  76.  
  77. OSErr DoAboutBox(RgnHandle blankRgn, short message, GMParamBlockPtr params) {
  78.     // this is called when folks want to see your "about" box
  79.     // but unless you have a "Cals" resource id 1 telling AD that you want this
  80.     // signal, this won't get called.
  81.     return noErr;
  82. }
  83.  
  84.  
  85.