> Hi,
>
> Is there any sample code to make a full screen app? No menu bar and no
> dock. The only code I found is 3 years old and doesn't seem to work
> under Tiger.
There really isn't that much to it. To hide the menu bar and the dock, you
can call SetSystemUIMode(kUIModeAllHidden, 0), then set the frame of a
borderless window to fill the screen. To get back out,
SetSystemUIMode(kUIModeNormal, 0) and close the window.
Here's some code from QTAmateur's fullscreen method. Here, 'movieView' is
the movie view in the regular document window with a title bar, and
fullscreenWindow is a subclassed borderless window which accepts first
responder (so I can still pause the movie with the space bar and things
like that).
- (void)beginFullscreen
{
if(inFullscreen) return;
NSWindow *window = [movieView window];
NSScreen *screen = [window screen];
[window orderOut:self];
[movieView setMovie:nil];
[fullscreenWindow setFrame:[screen frame] display:YES];
[fullscreenMovieView setMovie:movie];
[fullscreenWindow makeKeyAndOrderFront:self];
if([screen isEqual:[NSScreen mainScreen]])
SetSystemUIMode(kUIModeAllHidden, 0);
[fullscreenMovieView play:self];
[self disableSleep];
inFullscreen = YES;
}
And for completeness, the endFullscreen method:
- (void)endFullscreen
{
if(!inFullscreen) return;
SetSystemUIMode(kUIModeNormal, 0);
[fullscreenMovieView pause:self];
[fullscreenWindow orderOut:self];
[fullscreenMovieView setMovie:nil];
[movieView setMovie:movie];
[movieView setControllerVisible:YES];
[[movieView window] makeKeyAndOrderFront:self];
[self enableSleep];
inFullscreen = NO;
}

Signature
Michael Ash
Rogue Amoeba Software
pf - 04 Jan 2006 01:09 GMT
Thanks, I'll give it a go.
Paul
>> Hi,
>>
[quoted text clipped - 56 lines]
> inFullscreen = NO;
>}
pf - 04 Jan 2006 05:43 GMT
Hi Michael,
Where did you find "SetSystemUIMode"? It works but I can't find it in
the API reference, and it seems to need Carbon.h.
Thanks,
Paul
Michael Ash - 04 Jan 2006 12:15 GMT
> Hi Michael,
>
> Where did you find "SetSystemUIMode"? It works but I can't find it in
> the API reference, and it seems to need Carbon.h.
Yes, it's a Carbon function. A friend recommended it to me for this use. I
can't find it in the docs either, but there is a technote about it here:
http://developer.apple.com/technotes/tn2002/tn2062.html
This technote is basically some very thorough documentation about this
function, it's just kind of in the wrong place.

Signature
Michael Ash
Rogue Amoeba Software