hi there... i know some of you will look at this code and roll your eyes until they fall out, but it's the farthest i've come over the past several hours to making this code snippet make any sense to me, and at the risk of ridicule, i'm seeking help.
the window starts in full screen... i've simply created two IBActions (full screen mode and window mode) that i want to change the NSwindow's screen mode... simple right? yeahh... right...
the window starts in full screen... i've simply created two IBActions (full screen mode and window mode) that i want to change the NSwindow's screen mode... simple right? yeahh... right...
Code:
#import "mainWindow.h"
#import <Carbon/Carbon.h>
@implementation mainWindow
- (id) initWithContentRect: (NSRect) contentRect
styleMask: (unsigned int) aStyle
backing: (NSBackingStoreType) bufferingType
defer: (BOOL) flag
{
self = [super initWithContentRect: contentRect
styleMask: NSBorderlessWindowMask
backing: bufferingType
defer: flag];
SetSystemUIMode(kUIModeAllHidden, 0);
[self setFrame:[[NSScreen mainScreen] visibleFrame] display:YES animate:NO];
SetSystemUIMode(kUIModeAllSuppressed, 0);
return self;
}
- (IBAction)goWindowMode:(id)sender {
[super initWithContentRect: contentRect
styleMask: NSResizableWindowMask | NSMiniaturizableWindowMask
backing: bufferingType
defer: flag];
SetSystemUIMode(kUIModeNormal, 0);
[self setFrame:[[NSWindow mainWindow] visibleFrame] display:YES animate:NO];
}
- (IBAction)goFullScreenMode:(id)sender {
}
@end