Fullscreen Window
Fullscreen Window
- Subject: Fullscreen Window
- From: Andrew James <email@hidden>
- Date: Tue, 20 Mar 2007 21:17:29 +1030
Hi,
I followed a guide over at http://cocoadevcentral.com/articles/
000028.php to build a fullscreen window, however when i try to use my
panel it doesnt show above the black window, what im trying to
accomplish is my own style login prompt to unlock the machine which i
have the code setup and such but im missing the fullscreen part of it.
Any ideas on how to create a fullscreen window where i can attach a
panel to it and see the login dialog?
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 = NSMainMenuWindowLevel + 1; // 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 setLevel:windowLevel];
[mainWindow setBackgroundColor:[NSColor blackColor]];
[mainWindow makeKeyAndOrderFront:nil];
// display the password panel and wait for input:
[UnlockPanel setFrame:screenRect display:YES];
[mainWindow setContentView:[UnlockPanel contentView]];
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden