home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / ScreenSavers / BackSpaceViews / SpaceColorView.BackModule / SpaceColorViewPart.h < prev    next >
Encoding:
Text File  |  1995-06-12  |  1.1 KB  |  62 lines

  1. #import <appkit/View.h>
  2.  
  3. #define NSTARS (200)
  4. #define STARSPERIT (100)
  5.  
  6. typedef struct STAR {
  7.     float theta;    // angle
  8.     float distance;
  9.     float delta;    // change in distance
  10.     float ddelta;    // change in delta, a constant multiplier
  11.     int changemode;
  12.     char c;
  13.     float changepoint[6];
  14.     
  15.     NXPoint r1, r2;
  16.     NXPoint *draw;
  17.     NXPoint *erase;
  18.     
  19.     } STAR;
  20.  
  21. @interface SpaceColorView:View
  22. {
  23.     STAR stars[NSTARS];
  24.     int nstars;
  25.     int radius;            // min radius of this view
  26.  
  27.     NXColor starColor[NSTARS];
  28.     
  29.     NXPoint b[NSTARS];
  30.     NXPoint bOffsets[NSTARS];
  31.     char bc [NSTARS+1];
  32.     
  33.     NXColor wColor[NSTARS+1];
  34.     NXPoint w[NSTARS];
  35.     NXPoint wOffsets[NSTARS];
  36.     char wc [NSTARS+1];
  37.     
  38.     NXRect voidRect;    //avoid the void!
  39.     int toggle;
  40.     NXSize oldSize;
  41. }
  42.  
  43. - convertToXY:(STAR *)p;
  44. - oneStep;
  45. - (BOOL) allowStars:(const STAR *)p;
  46. - initFrame:(NXRect *)frameRect;
  47. - drawSelf:(const NXRect *)rects :(int)rectCount;
  48. - sizeTo:(NXCoord)width :(NXCoord)height;
  49. - addStar;
  50. - replaceStarAt:(int)index;
  51. - setRadius;
  52. - (const char *)windowTitle;
  53. - setVoidRect:(const NXRect *)r;
  54. - didLockFocus;
  55. - (BOOL)useBufferedWindow;
  56.  
  57. @end
  58.  
  59. @interface View(nonretainedFillMethod)
  60. - fillBoundsWithBlack;
  61. @end
  62.