I was wonderning if anybody knew how to make a program that would run in full screen with no menu bar or dock. I am able to make the window fully zoomed but that is as far as I can get.
Welcome to Carbon:
http://developer.apple.com/technotes/tn2002/tn2062.html#Section2
If implementing this in an AppleScript Studio app, it’s very easy to wrap in a Cocoa method.
That is perfect but i am not sure how you you make it work in applescript studio. Could you help?
Model: Dual 1Ghz MDD
Browser: Firefox 2.0.0.3
Operating System: Mac OS X (10.4)
-
Create a new Cocoa class.
-
Add the Carbon framework to your project.
-
Import the Carbon.h header into the header of your new Cocoa class.
-
In your Cocoa class, add a method that calls the Carbon SetSystemUIMode() function.
-
Use AppleScript Studio’s “call method” to invoke the Cocoa method.
Before I explain how to do this, what is the situation in which you’ll be invoking this command? (Depending on what you’re doing, you may not need #5, which may also change how I explain things.)
I want the program to launch directly into full screen mode. so it automatically takes over the screen. And i am open to suggestions on how to launch it.
Model: Dual 1Ghz MDD
Browser: Firefox 2.0.0.3
Operating System: Mac OS X (10.4)
You’re also going to need a window that has no title bar (NSBorderlessWindowMask style mask). I should’ve realized this ahead of time, my apologies.
You also have to handle zero, single, and multiple displays when creating the window(s) that will cover the screen. If you’re making a game, you may want to capture the display.
And really, this is just an overview of some of the things you’ll need to handle. To be 100% honest, at this point, I’m not sure I want to write it all for you, because you won’t be able to debug it if/when something doesn’t behave properly. Again, I should’ve realized just how much work you’d really need done to accomplish this task correctly.
How urgent is this project? Is this something you could take the time to learn a little bit of Cocoa for? In the end, what you want to do is simple, but there’s a delta of knowledge you need to cross first.
Edit: There are several discussions about this on Apple’s cocoa-dev mailing list. Give it a quick search and see what you think.
it isn’t that urgent to get it to work right away. Right now it runs full zoomed and that is good enough but before it is done it has to run full screen. If you could tell em what i need to learn i would give it a shot. I can usually debug pritty good even if i dont know the language.
Model: Dual 1Ghz MDD
Browser: Firefox 2.0.0.3
Operating System: Mac OS X (10.4)
What you need to know is pretty much what I covered previously. Off the top of my head, in no order:
-
Creating a borderless window. (This does not require subclassing NSWindow, simply passing NSBorderlessWindowMask for the style mask.)
-
Setting the system UI mode for your application.
-
Capturing the display, but I do not recommend this for a novice. Not handling this properly will cause unwanted behaviour with people’s machines. Don’t bother capturing the display.
-
Making sure you handle different display configurations. (NSScreen is your friend. Gotta handle when there are no displays found, one, two, etc. It’s also a good way to get the extent of the displays, since you’re already working with the NSScreen class anyway, to create the window(s) you need on the screens you wish to display them on.)
-
Setting up AppleScript connections to things you create programmatically (the window, for example).
-
Inserting your prebuilt view into the window’s content view. (-[NSWindow setContentView:]).
-
Linking to Carbon and including the Carbon header.
-
Setting the window level correctly. (There are a bunch defined in Core Graphics, but you should use the ones in NSWindow.h instead, which are mapped to the levels you’re supposed to care about. What makes it more confusing is that I think there are one or two levels in NSWindow.h that are deprecated.)