You can't do full screen with ruby code in the current release version. The
only way to do it is to modify your own copy of the source right now. I
think full screen is going to be officially supported in the next release,
because in the git repository the source already adds the following feature:
>
> Shoes.app(:width => 1024, :height => 600 :fullscreen => true)

It only makes the window have no border in the most recent build 0.r1243.
The code I added just completes what full screen already does in that
build.



On Fri, Jul 17, 2009 at 10:18 AM, Jeff Dik <[email protected]> wrote:

> Sweet.  Do you have to do anything to make app.fullscreen available to the
> ruby code?
>
> On Fri, Jul 17, 2009 at 12:42 AM, Samuel Peterson <[email protected]>wrote:
>
>> ok, I was bored... and I did this for my application, so I share with you,
>> today, my work! I only did the work for GTK and Windows... I don't know crap
>> about Mac (I don't even like apple), so screw mac..... I have not tested in
>> GTK yet, but I will in about a week.
>> Lets get started....
>> Get the latest copy of the source.... (
>> http://wiki.github.com/why/shoes/recentbuilds)
>> Mine was 0.r1243
>>
>> Download all the dependencies for your platform from:
>> http://wiki.github.com/why/shoes/buildingshoes
>> and place your dependencies as instructed on the page...
>>
>> From now on, everything is being referred to as if we're already in the
>> shoes directory.
>>
>> Open "shoes/native/windows.c"
>>
>> add:
>>
>>> int shoes_native_get_resolution_width()
>>
>> {
>>
>>  return GetSystemMetrics(SM_CXSCREEN);
>>
>> }
>>
>>
>>> int shoes_native_get_resolution_height()
>>
>> {
>>
>>  return GetSystemMetrics(SM_CYSCREEN);
>>
>> }
>>
>>
>> before:
>>
>>> void shoes_native_cleanup(shoes_world_t *world)
>>
>>
>>
>> Open "shoes/native/gtk.c"
>>
>> add:
>>
>>> int shoes_native_get_resolution_width()
>>
>> {
>>
>>  GdkScreen* screen = NULL;
>>
>>
>>>  screen = gtk_window_get_screen(GTK_WINDOW(app->os.window));
>>
>>
>>>  return gdk_screen_get_width(screen);
>>
>> }
>>
>>
>>> int shoes_native_get_resolution_height()
>>
>> {
>>
>>  GdkScreen* screen = NULL;
>>
>>  screen = gtk_window_get_screen(GTK_WINDOW(app->os.window));
>>
>>
>>>  return gdk_screen_get_height(screen);
>>
>> }
>>
>>
>> before:
>>
>>> void shoes_native_cleanup(shoes_world_t *world)
>>
>>
>>
>> Open "shoes/app.c"
>>
>> add:
>>
>>> // If fullscreen is true, this will override the set width/height
>>
>>   if(app->fullscreen == true)
>>
>>   {
>>
>>     width = shoes_native_get_resolution_width();
>>
>>     height = shoes_native_get_resolution_height();
>>
>>   }
>>
>>
>> before:
>>
>>> app->width = width;
>>
>>
>>
>>
>> There you have it. That should completely enable full screen
>> implementation in windows and linux... Mac is out of luck, because I suck at
>> mac..
>>
>> ~Enjoy
>>
>
>

Reply via email to