Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Full Screen Control

Full Screen Control
Thread Tools
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Apr 7, 2001, 10:13 AM
 
I looked as Apple's ColorBars example and I figured out how to take over a few displays and draw directly to them. This is pretty cool since I can do full screen previews of stuff and be guaranteed not to have any windows above it. Anyway, I was wondering how I might go about getting user input while I have taken over the screen. Since events are handled by windows, and this isn't a window, how can I handle events while it is in full screen mode? This is a big necessity since if you want a slide show or something you're going to need some way of moving to the next slide or quitting.
     
Fresh-Faced Recruit
Join Date: Feb 2001
Location: OR
Status: Offline
Reply With Quote
Apr 7, 2001, 11:50 AM
 
Where is the Color Bar example? I can't find it on Apple's sample code area - assuming it's cocoa.

Anyhow, I created a full screen view using a window the same size as the screen, giving it an NSBorderlessWindowMask, then putting the level at NSScreenSaverWindowLevel (this puts the window above everything, menu and dock, just like a screen saver) Are there any disadvantages in creating a full screen window instead of drawing directly to a screen display? Is it slower? I had a few problems getting keyboard events this way using the Public Beta, but it seems to be fixed in the final.

Sorry if this wasn't what you were looking for.

Ryan
     
Forum Regular
Join Date: Jan 2001
Status: Offline
Reply With Quote
Apr 7, 2001, 01:34 PM
 
Hi, anyone knows if finder still draws the desktop icons on the same layer as the desktop picture, It would be cool whit a app that runs screensavers on the desktop, (a ported freespace for macos x server to public beta and it over drawed the desktop icons). But it looked cool...
     
Dalgo  (op)
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Apr 7, 2001, 02:08 PM
 
You can find the colorbar example at http://developer.apple.com/samplecod.../ColorBars.htm
The description seems to be the same as that for Mode Whacker which you can get at http://developer.apple.com/samplecod...odeWhacker.htm They are two different things, however. The colorbar example locks the focus on a screen and then draws directly to the screen. It's written in C, not objective C although there is no reason why you can't call the core graphics functions in an Objective C method.
     
Junior Member
Join Date: Apr 2001
Location: Sunnyvale, CA
Status: Offline
Reply With Quote
Apr 7, 2001, 05:39 PM
 
Why not use BeginFullScreen() and EndFullScreen()? It doesn't let you "commandeer" the display (you can switch to other apps with command-tab) but I would imagine it to be sufficient for most purposes. BeginFullScreen creates a window for you that covers the entire display, so the standard event handling scheme works fine too.

There's a nice and simple sample code at: http://developer.apple.com/samplecod...FullScreen.htm
     
Dalgo  (op)
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Apr 8, 2001, 09:09 AM
 
Hmmm... I'm not sure if it'll play well with Objective C since the project includes the libstdc++.a and Carbon/Carbon.h but those might not be essential for it's use so I guess that I could try doing it that way without that library and see if it works. The Quicktime headers look like they are all C, not C++ but I didn't look thoroughly.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Apr 8, 2001, 05:43 PM
 
You can call Carbon code from a Cocoa app, take a look at Apple's example in the Cocoa section of their sample code site... It's not particularly pretty, but it works
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:58 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2