[MacRuby-devel] Fullscreen sample app

Michael Jackson mjijackson at gmail.com
Wed Jul 7 19:23:49 PDT 2010


I was going for the second approach (i.e. resize the window to the
size of the screen but don't "take it over") because I like to keep
the cmd-tab functionality. I've actually enhanced the example today to
work with windows that have toolbars. I'll update it when I get the
chance (may not be for a week because I'm on vacation for the next few
days!).

Thanks,

Michael

--
Michael Jackson
http://mjijackson.com
@mjijackson



On Wed, Jul 7, 2010 at 3:51 PM, Eloy Duran <eloy.de.enige at gmail.com> wrote:
> For completeness sake; I just read this difference explanation in the
> article [1] that the code was based on:
>
> “There are two basic types of fullscreen on the Mac:
>
>        • Screen takeover — where one view gains exclusive control of the
> screen.
>        • Basic fullscreen window — where a regular window occupies the whole
> screen without occlusions.
>
> The first is normally recommended for games where you never want the window
> to be interrupted. For an example of this type of window, see my earlier
> post An Asteroids-Style Game in Core Animation: Part 1.
>
> The second option has the advantage that it can be interrupted by other
> windows. For example: Exposé, Command-Tab and notification windows will
> continue to function. This is the approach that I will detail in this post.”
>
> [1]
> http://cocoawithlove.com/2009/08/animating-window-to-fullscreen-on-mac.html
>
> On 7 jul 2010, at 22:50, Matt Aimonetti wrote:
>
>> +1 for enterFullScreenMode:withOptions:   MacRuby won't run on anything <
>> 10.5 anyway.
>>
>> - Matt
>>
>> On Wed, Jul 7, 2010 at 10:44 AM, Eloy Duran <eloy.de.enige at gmail.com>
>> wrote:
>> Hey Michael,
>>
>> You might also want to consider NSView's enterFullScreenMode:withOptions:
>> [1]
>> It's available from 10.5 and higher only, but with MacRuby that should not
>> be a problem.
>>
>> Cheers,
>> Eloy
>>
>> [1]
>> http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-SW5
>>
>>
>> On 7 jul 2010, at 01:48, Michael Jackson wrote:
>>
>> Hi all,
>>
>> I created a fullscreen sample app in MacRuby, and I thought someone
>> else might be able to get some use out of it.
>>
>> http://mjijackson.com/2010/07/fullscreen-macruby
>> http://github.com/mjijackson/Fullscreen
>>
>> It's basically a port of someone else's Objective-C code, but it uses
>> NSApp's presentation options to control automatic hiding/showing of
>> the menu bar and dock instead of doing it manually. If anyone has any
>> feedback for me, I'd love to hear it.
>>
>> Enjoy,
>>
>> Michael
>>
>> --
>> Michael Jackson
>> http://mjijackson.com
>> @mjijackson
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>


More information about the MacRuby-devel mailing list