Fullscreen NSWindow or NSView?
Fullscreen NSWindow or NSView?
- Subject: Fullscreen NSWindow or NSView?
- From: Audun Frøysaa <email@hidden>
- Date: Sun, 16 Mar 2008 10:46:17 +0100
Hello.
As a learning path I am trying different things.
I want to create a fullscreen app, but i don't now if i should use
NSWindow or NSView.
I do now NSView has the enterfullscreenmode that i could use, but how
can i add and remove other subviews?
For NSWindow i use this code:
NSInteger windowLevel;
NSRect screenRect;
if(CGDisplayCapture( kCGDirectMainDisplay ) != kCGErrorSuccess)
{
NSLog(@"Can't capture display");
}
windowLevel = CGShieldingWindowLevel();
screenRect = [[NSScreen mainScreen] frame];
mainWindow = [[NSWindow alloc] initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered
defer:NO screen:[NSScreen mainScreen]];
[mainWindow setBackgroundColor:[NSColor blackColor]];
But how can i display other views?
Hope someone understand what i am trying to do, but please ask if
something is unclear.
- Audun
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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