This is ScreenSaver.m in view mode; [Download] [Up]
#import "ScreenSaver.h" @implementation ScreenSaver void runOneStep (DPSTimedEntry timedEntry, double timeNow, void *data); - startScreenSaver { void runOneStep(); if( !timerRunning ) { PShidecursor(); bouncingView = [[[[NXBundle bundleForClass: [self class]] classNamed: "BouncingView"] alloc] init]; [bouncingView startScreenSaver]; timer = DPSAddTimedEntry(1.0 / 15.0, &runOneStep, bouncingView, NX_BASETHRESHOLD); timerRunning = YES; } return self; } - stopScreenSaver { if( timerRunning ) { PSshowcursor(); DPSRemoveTimedEntry (timer); timerRunning = NO; [bouncingView stopScreenSaver]; [bouncingView free]; } return self; } void runOneStep (DPSTimedEntry timedEntry, double timeNow, void *data) { [(id)data step]; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.