{
NSRect contentRect;
- CGSValueObj key;
- CGSValueObj ignore;
-
- // If no Content View was provided, use a generic NSImageView with the app icon.
+ // If no Content View was provided, use a generic NSView with the app icon.
if ( ! (contentView) ) {
contentView = [[[NSView alloc] initWithFrame:
NSMakeRect(100.0, 100.0, 200.0, 200.0)] autorelease];
backing:NSBackingStoreBuffered
defer:NO] ) ) {
- _visibilityState = ITTransientStatusWindowHiddenState;
- _exitMode = exitMode;
- _exitDelay = DEFAULT_EXIT_DELAY;
- _backgroundType = backgroundType;
- _verticalPosition = ITTransientStatusWindowPositionBottom;
- _horizontalPosition = ITTransientStatusWindowPositionLeft;
- _entryEffect = ITTransientStatusWindowEffectNone;
- _exitEffect = ITTransientStatusWindowEffectDissolve;
-
+ _visibilityState = ITTransientStatusWindowHiddenState;
+ _exitMode = exitMode;
+ _exitDelay = DEFAULT_EXIT_DELAY;
+ _backgroundType = backgroundType;
+ _verticalPosition = ITTransientStatusWindowPositionBottom;
+ _horizontalPosition = ITTransientStatusWindowPositionLeft;
+ _entryEffect = ITTransientStatusWindowEffectNone;
+ _exitEffect = ITTransientStatusWindowEffectDissolve;
+ _effectTime = DEFAULT_EFFECT_TIME;
+ _reallyIgnoresEvents = YES;
_delayTimer = nil;
_fadeTimer = nil;
// [self setContentView:contentView];
// }
-// [self setIgnoresMouseEvents:YES];
-
- key = CGSCreateCString("IgnoreForEvents");
- ignore = CGSCreateBoolean(kCGSTrue);
-
- CGSSetWindowProperty([NSApp contextID], (CGSWindowID)[self windowNumber], key, ignore);
-
- CGSReleaseObj(key);
- CGSReleaseObj(ignore);
-
+ [self setIgnoresMouseEvents:YES];
[self setLevel:NSScreenSaverWindowLevel];
[self setContentView:contentView];
[self rebuildWindow];
#pragma mark INSTANCE METHODS
/*************************************************************************/
+- (void)setRotation:(float)angle
+{
+ CGAffineTransform transform = CGAffineTransformMakeRotation(angle);
+ transform.tx = -32.0;
+ transform.ty = [self frame].size.height + 32.0;
+ CGSSetWindowTransform([NSApp contextID],
+ (CGSWindowID)[self windowNumber],
+ CGAffineTransformTranslate(transform,
+ (([self frame].origin.x - 32.0) * -1),
+ (([[self screen] frame].size.height - ([self frame].origin.y) + 32.0) * -1) ));
+ NSLog(@"%f %f", ([self frame].origin.x * -1), ([self frame].origin.y * -1));
+}
+
+- (BOOL)ignoresMouseEvents
+{
+ return _reallyIgnoresEvents;
+}
+
+- (void)setIgnoresMouseEvents:(BOOL)flag
+{
+ CGSValueObj key;
+ CGSValueObj ignore;
+
+ key = CGSCreateCString("IgnoreForEvents");
+ ignore = CGSCreateBoolean( (flag ? kCGSTrue : kCGSFalse) );
+ CGSSetWindowProperty([NSApp contextID], (CGSWindowID)[self windowNumber], key, ignore);
+ CGSReleaseObj(key);
+ CGSReleaseObj(ignore);
+
+ _reallyIgnoresEvents = flag;
+}
+
- (void)orderFront:(id)sender
{
if ( _exitMode == ITTransientStatusWindowExitAfterDelay ) {
}
}
+- (NSTimeInterval)animationResizeTime:(NSRect)newFrame
+{
+ return _effectTime;
+}
+
/*
- (id)contentView