Removing the use of private CoreGraphics APIs to draw shadows, and replacing with...
[ITKit.git] / ITWindowEffect.h
old mode 100755 (executable)
new mode 100644 (file)
index 1c4e3cb..6fd2586
@@ -1,57 +1,62 @@
 /*
  *     ITKit
- *  ITWindowEffect
- *    Protocal and abstract superclass for performing effects on windows.
+ *     ITWindowEffect.h
  *
- *  Original Author : Matt Judy <mjudy@ithinksw.com>
- *   Responsibility : Matt Judy <mjudy@ithinksw.com>
+ *     Protocol and abstract superclass for performing effects on windows.
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 iThink Software
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
-#import "ITWindowPositioning.h"
+#import <ITKit/ITWindowPositioning.h>
 
+@class ITTransientStatusWindow;
 
 #define EFFECT_FPS 30.0
 #define DEFAULT_EFFECT_TIME 0.75
 
-
 typedef enum {
-    ITTransientStatusWindowHiddenState,
-    ITTransientStatusWindowAppearingState,
-    ITTransientStatusWindowVisibleState,
-    ITTransientStatusWindowVanishingState
+       ITWindowHiddenState,
+       ITWindowAppearingState,
+       ITWindowVisibleState,
+       ITWindowVanishingState
 } ITWindowVisibilityState;
 
-
 @protocol ITWindowEffect
+
++ (NSString *)effectName;
++ (NSDictionary *)supportedPositions;
++ (unsigned int)listOrder;
 - (void)performAppear;
 - (void)performVanish;
 - (void)cancelAppear;
 - (void)cancelVanish;
+
 @end
 
+@protocol ITWindowMotility
 
-@protocol ITWindowVisibility
 - (ITWindowVisibilityState)visibilityState;
 - (void)setVisibilityState:(ITWindowVisibilityState)newState;
-@end
+- (float)effectProgress;
+- (void)setEffectProgress:(float)newProgress;
 
+@end
 
-@interface ITWindowEffect : NSObject <ITWindowEffect>
-{
-    NSWindow                   *_window;
-    float                       _effectTime;
-    double                      _effectProgress;
-    ITVerticalWindowPosition    _verticalPosition;
-    ITHorizontalWindowPosition  _horizontalPosition;
-    NSTimer                    *_effectTimer;
+@interface ITWindowEffect : NSObject <ITWindowEffect> {
+       NSWindow <ITWindowPositioning, ITWindowMotility> *_window;
+       float _effectTime;
+       float _effectSpeed;
+       ITVerticalWindowPosition _verticalPosition;
+       ITHorizontalWindowPosition _horizontalPosition;
+       NSTimer *_effectTimer;
+       BOOL __idle;
+       BOOL __shouldReleaseWhenIdle;
 }
 
++ (NSArray *)effectClasses;
+
 // Designated initializer
 - (id)initWithWindow:(NSWindow *)window;
 
@@ -61,4 +66,9 @@ typedef enum {
 
 - (void)setWindowVisibility:(ITWindowVisibilityState)visibilityState;
 
-@end
+- (float)effectTime;
+- (void)setEffectTime:(float)newTime;
+
+- (void)releaseWhenIdle;
+
+@end
\ No newline at end of file