X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/2589c16f443dd6fe9df554eb533df464b5bb919b..bbb399e28121ac71152cef5fc21e106c4b941cbc:/ITWindowEffect.h diff --git a/ITWindowEffect.h b/ITWindowEffect.h index bb1c3b8..9ce6fcf 100755 --- a/ITWindowEffect.h +++ b/ITWindowEffect.h @@ -13,19 +13,48 @@ #import +#import "ITWindowPositioning.h" +@class ITTransientStatusWindow; -@protocol ITWindowEffect +#define EFFECT_FPS 30.0 +#define DEFAULT_EFFECT_TIME 0.75 + + +typedef enum { + ITWindowHiddenState, + ITWindowAppearingState, + ITWindowVisibleState, + ITWindowVanishingState +} ITWindowVisibilityState; + +@protocol ITWindowEffect - (void)performAppear; - (void)performVanish; +- (void)cancelAppear; +- (void)cancelVanish; +@end + +@protocol ITWindowMotility +- (ITWindowVisibilityState)visibilityState; +- (void)setVisibilityState:(ITWindowVisibilityState)newState; +- (float)effectProgress; +- (void)setEffectProgress:(float)newProgress; @end @interface ITWindowEffect : NSObject { - NSWindow *_window; + ITTransientStatusWindow *_window; + float _effectTime; + float _effectSpeed; + ITVerticalWindowPosition _verticalPosition; + ITHorizontalWindowPosition _horizontalPosition; + NSTimer *_effectTimer; + BOOL __idle; + BOOL __shouldReleaseWhenIdle; } // Designated initializer @@ -33,7 +62,13 @@ - (NSWindow *)window; -// setWindow: does not retain or release its window. It simply references it. - (void)setWindow:(NSWindow *)newWindow; +- (void)setWindowVisibility:(ITWindowVisibilityState)visibilityState; + +- (float)effectTime; +- (void)setEffectTime:(float)newTime; + +- (void)releaseWhenIdle; + @end