Putting up a full screen window
Putting up a full screen window
- Subject: Putting up a full screen window
- From: Adam Radestock <email@hidden>
- Date: Thu, 5 Oct 2006 20:22:11 +0100
Hi,
I've found a tutorial for creating a full screen window after
capturing the screen, but I cannot get it to work... can anyone find
the problem with my code? I'm really frustrated with it now! :-)
I don't think that it is setting the window up correctly...
- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
int windowLevel;
NSRect screenRect;
// Capture the main display
if (CGDisplayCapture( kCGDirectMainDisplay ) != kCGErrorSuccess) {
NSLog( @"Couldn't capture the main display!" );
// Note: you'll probably want to display a proper error
dialog here
}
// Get the shielding window level
windowLevel = CGShieldingWindowLevel();
// Get the screen rect of our main display
screenRect = [[NSScreen mainScreen] frame];
// Put up a new window
mainWindow = [[NSWindow alloc] initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO screen:[NSScreen mainScreen]];
[mainWindow setBackgroundColor:[NSColor blackColor]];
// Load our content view
[slideShowPanel setFrame:screenRect display:YES];
[mainWindow setContentView:[slideShowPanel contentView]];
[mainWindow setLevel:windowLevel];
// Show the window.
[mainWindow makeKeyAndOrderFront:self];
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden