This is StarShipProtocol.h in view mode; [Download] [Up]
#import <appkit/appkit.h> typedef struct { NXRect avoid; } AvoidStruct; @protocol StarShipProtocol // methods in bodyController object that must be implemented - setStarsOutlet:(id)starsOutlet; //StarShipView passes id of NewSpaceView //to the SpaceController object //so you can control stars - setBoundsRect: (NXRect *)r; - (BOOL)doUntilDone; //just like one step - returns YES if module is //ready to give up control - setStartInterval: (Slider *)sender; - setObjectSpeed: (Slider *)sender; - setStarSpeed:(Slider *)sender; //in case you want to override - (int)setCycleValue:(int)value; - freeResources; // freeing resources before doing next module - setFirstState; // for doing init for each module - windowSizeChanged; //tells object that window resized - starsStopped; // space object tells you when stars are stopped //if you sent it a stopStars message - setPwrDownSnd:(Sound *)theSound; - setPwrUpSnd:(Sound *)theSound; - setSoundEnabled:(BOOL)enabled; //tells module that sound state changed // methods the body object has to know about that //the NewSpaceView implements - (BOOL)isStopped; //asks the stars object if they are now stopped - (BOOL)isStopping; //asks the stars object if they are stopping - startStars; //tells the stars object to start the stars - setStarsStopped; //tells the stars object to stop the stars instantly - stopStars; //tells the stars object to stop the stars slowly - hideStars; //turns off displaying stars from stars object - setAvoidRect:(Storage *)storage; //tells the stars object to avoid //drawings stars here @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.