• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Putting up a full screen window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Putting up a full screen window
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: FileHandle in Threads
  • Next by Date: Re: Always use the constants (was Re: Finding all deleted objects from Core Data)
  • Previous by thread: Re: FileHandle in Threads
  • Next by thread: Re: Putting up a full screen window
  • Index(es):
    • Date
    • Thread