Moving to the new means of setting the window visibility state: allowing the effects...
[ITKit.git] / ITWindowEffect.h
index bb1c3b8..1c4e3cb 100755 (executable)
 
 
 #import <Cocoa/Cocoa.h>
+#import "ITWindowPositioning.h"
 
 
-@protocol ITWindowEffect
+#define EFFECT_FPS 30.0
+#define DEFAULT_EFFECT_TIME 0.75
+
+
+typedef enum {
+    ITTransientStatusWindowHiddenState,
+    ITTransientStatusWindowAppearingState,
+    ITTransientStatusWindowVisibleState,
+    ITTransientStatusWindowVanishingState
+} ITWindowVisibilityState;
+
 
+@protocol ITWindowEffect
 - (void)performAppear;
 - (void)performVanish;
+- (void)cancelAppear;
+- (void)cancelVanish;
+@end
 
+
+@protocol ITWindowVisibility
+- (ITWindowVisibilityState)visibilityState;
+- (void)setVisibilityState:(ITWindowVisibilityState)newState;
 @end
 
 
 @interface ITWindowEffect : NSObject <ITWindowEffect>
 {
-    NSWindow *_window;
+    NSWindow                   *_window;
+    float                       _effectTime;
+    double                      _effectProgress;
+    ITVerticalWindowPosition    _verticalPosition;
+    ITHorizontalWindowPosition  _horizontalPosition;
+    NSTimer                    *_effectTimer;
 }
 
 // Designated initializer
@@ -33,7 +57,8 @@
 
 - (NSWindow *)window;
 
-// setWindow: does not retain or release its window.  It simply references it.
 - (void)setWindow:(NSWindow *)newWindow;
 
+- (void)setWindowVisibility:(ITWindowVisibilityState)visibilityState;
+
 @end