Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-Screen Full-Screen?



but still having trouble entering Full screen.

Make sure, that you only have one instance of your QT or QC-View.
I think it's best to retain your QC-View, close the window, create the floating (fullscreen-window) by code, "give it the QC-View", release and you're done.


Maybe this code-snippet helps a bit, although it's far from perfect, this one works (for me :)
Also, you can see what additional code is needed when you're dealing with QC (=also QT) views...


best regards,
Michael





zsView is my "to-toggle-view" (Subclass of NSView)
ZSFullscreenWindow is a simple subclass of NSWindow that just deals with fullScreen issues if you want to receive events within the fs- window:


@implementation ZSFullscreenWindow

-(BOOL)canBecomeKeyWindow {
    return YES;
}
-(BOOL)acceptsFirstResponder {
    return YES;
}

@end


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::


-(IBAction)goFullScreen:(id)sender {
if(zsView == nil) {
NSLog(@"ZSVisualizerController: error_ determining current visualizer view: %@", zsView);
return;
}
// open vis window if not already open
if( (!isFullScreen) && (visualizerWindow == nil) ) { [self openVISWindow:self]; }
[visualizer stop];
// *** fade display
[self fadeOutDisplay];


if(isFullScreen) { // **** LEAVING FULLSCREEN **** //
NSLog(@"Leaving Fullscreen Mode...");
// check for QT fullscreen issues
BOOL isQT = [[visualizer visModule] needsQTFullScreen];
if(isQT) {
// NSMovieView can apparently just exist once :(
[fullScreenWindow setContentView:nil];
}
// restore
[zsView setFrame:[visualizerWindow frame]];
[visualizerWindow setContentView:zsView];
[visualizerWindow makeKeyAndOrderFront:self];
[visualizerWindow setTitle:[visualizer visModuleName]];
[fullScreenWindow setDelegate:nil];
[visualizerWindow setDelegate:self];
// close
[fullScreenWindow close];
fullScreenWindow = nil;
isFullScreen = NO;
} else { // **** GOING FULLSCREEN **** //
if(fullScreenWindow == nil) {
NSLog(@"Entering Fullscreen Mode...");
} else {
NSLog(@"fullScreenWindow already there...");
isFullScreen = YES;
return;
}
NSRect screenRect;
// check if we're on a dualscreen system:
if([[NSScreen screens] count] > 1) {
screenRect = [[[NSScreen screens] objectAtIndex:1] frame];
} else {
screenRect = [[NSScreen mainScreen] frame]; // we're not using [[NSScreen screens] objectAtIndex:0],
// because [NSScreen mainScreen] returns screen of keyWindow!
}
BOOL isQT = [[visualizer visModule] needsQTFullScreen];
if(isQT) {
// NSMovieView can apparently just exist once :(
[visualizerWindow setContentView:nil];
}
// open fullScreen window
fullScreenWindow = [[ZSFullscreenWindow alloc] initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO
screen:[NSScreen mainScreen]];
[fullScreenWindow setTitle:@"VIS (fullscreen)"];
[fullScreenWindow setReleasedWhenClosed:YES];
[fullScreenWindow setContentView:zsView];
[fullScreenWindow setDelegate:self];
[fullScreenWindow makeKeyAndOrderFront:self];
[fullScreenWindow setLevel: (NSScreenSaverWindowLevel - 2)];


        isFullScreen = YES;
    }

    [visualizer start];
    // *** restore display
    [self fadeInDisplay];
}





Am 31.10.2005 um 20:31 schrieb Morgan Barnard:

Thanks for this. I am able to make a spanning QCview at a window size of 2048x768, but still having trouble entering Full screen. I think it is my lack of knowledge with cocoa programming.
It seems like all the examples have too much going on and I am unable to reverse engineer them.
I'll keep at it though.....


thanks,

morgan
On Oct 29, 2005, at 12:57 PM, michael markert wrote:



Morgan,

It's quite easy to make a QCView within Interface-Builder, just drag a QCView into a window.
There are some examples in your /Developer/Examples/ Folder.


However, if you want to make a "fullscreen"-app without menu/Dock things are a bit more complex (esp. when it comes to quicktime). There is an (old, but I found still useful) example @ CocoaDevCentral:

http://www.cocoadevcentral.com/articles/000028.php

I think "Developer/Examples/QC/Player/SlideShow/" also deals with fullscreen display (but does no toggle).


Nevertheless, the main concept of a FS-Window is quite simple:
- create a fresh window without any frames or toolbars (NSBorderlessWindowMask)
- assign a high window level (NSScreenSaverWindowLevel - 1)
and that's it!




Regards,
Michael



Am 27.10.2005 um 19:00 schrieb Morgan Barnard:


is there a link to an example for writing this kind of app? I would be very interested to find out how to do this.
I'm a novice at this, but wanting to dig in deeper. I have written a few small apps in cocoa that deal with video, but I am interested in using quartz composer with video and doing multi monitor spanning.
any help would be great.
thanks,


morgan
On Oct 24, 2005, at 12:13 PM, Pierre-Olivier Latour wrote:



I'd like to have a wide-aspect composition span 2 different monitors, and still be able to hide the menu-bar and dock like fullscreen-mode. Is this possible within QC? Or does it require a cocoa app? If it is the latter, do I have to use two QCViews and somehow split my composition?



If the monitors are driven from the same video card, you can create a cocoa app that displays a window covering the 2 screens and has a QCView inside.
Note that most video cards are limited to rendering up to a maximum of 2048x2048 pixels.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >Multi-Screen Full-Screen? (From: John Taylor <email@hidden>)
 >Re: Multi-Screen Full-Screen? (From: Pierre-Olivier Latour <email@hidden>)
 >Re: Multi-Screen Full-Screen? (From: Morgan Barnard <email@hidden>)
 >Re: Multi-Screen Full-Screen? (From: michael markert <email@hidden>)
 >Re: Multi-Screen Full-Screen? (From: Morgan Barnard <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.