#import #import #import #import #import #import #import #import #import #import "undocumented-api.h" #define SPRING_FORCE 0.8 #define SPRING_DAMPING 0.1 @interface MyView : UIView { CGFontRef font; CGPoint tap; struct timeval last; double timestamp; CGPoint position; CGPoint velocity; CGPoint force; float textWidth; } - (void)drawRect:(struct CGRect)rect; - (void)initFont:(CGContextRef)context; - (void)mouseDown:(GSEventRef)event; - (void)mouseUp:(GSEventRef)event; - (void)mouseDragged:(GSEventRef)event; - (void)timerFired:(NSTimer *)timer; - (double)getTimeDifference; @end