This is FlyingWindow.h in view mode; [Download] [Up]
// Copyright (c) 1997 by Don Yacktman
// All rights reserved.
// Permission to use this code in your application, whether
// commercial, shareware, or freeware, is granted.
// This notice may not be removed or altered.
#import <AppKit/AppKit.h>
// odd number; this number divided by 2 is how far a window
// could move horizontally in one frame's worth of animation.
#define HORIZ_JUMPS	27
// max initial vertical velocity is this + MIN_VERT
#define VERT_JUMPS	10
// minimum initial vertical velocity.
#define MIN_VERT	5
// amount gravity reduces y-velocity
#define GRAVITY		1.0
@interface FlyingWindow:NSWindow
{
	NSPoint velocity;
}
- initAt:(NSPoint *)thePoint;
- reInitAt:(NSPoint *)thePoint;
- move;
- (BOOL)onScreen;
@endThese are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.