Re: Fullscreen Window
Re: Fullscreen Window
- Subject: Re: Fullscreen Window
- From: Ricky Sharp <email@hidden>
- Date: Fri, 30 Mar 2007 16:21:20 -0500
On Mar 29, 2007, at 4:48 AM, Fabio Mancinelli wrote:
On Mar 29, 2007, at 11:19 AM, Andrew James wrote:
So how does one create such a fullscreen window?
I've done this before so I might help...
First you create a borderless window that will be used to cover the
whole screen real estate.
NSRect screenRect = [[NSScreen mainScreen] frame];
NSWindow *window = [[NSWindow alloc] initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO
screen:
[NSScreen mainScreen]];
Then you have to capture the display using:
if(CGDisplayCapture(kCGDirectMainDisplay) != kCGErrorSuccess) {
/* Handle errors here */
}
When using AppKit, you shouldn't capture the display. Bad things can
happen.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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