[maemo-developers] Fremantle fullscreen mode [was Re: Call for testers with N900 for vncviewer]

From: Cornelius Hald hald at icandy.de
Date: Fri Oct 23 18:19:29 EEST 2009
On Fri, 2009-10-23 at 16:31 +0300, Marius Gedminas wrote:
> On Fri, Oct 23, 2009 at 11:44:33AM +0200, Cornelius Hald wrote:
> > On Fri, 2009-10-23 at 11:27 +0200, Luca Donaggio wrote:
> > 
> > > I'm no goot at finding names, but what about
> > > he_fullscreen_toggle_overlay?
> > 
> > It's a good fit I think. Something shorter would be nice, though.
> > 
> > I was thinking about the following names, but they have problems too:
> > 
> > - HeFullscreenButton sounds like it is a very big button
> > - HeFullscreenOverlay sounds like a very big overlay
> 
> How does it work, Gtk-wise?  Is it a widget you add somewhere into your
> widget tree?  If so, where?

Somewhere, where you have access to your window object you do the
following:

he_fullscreen_toggle_new (GTK_WINDOW(win));

The HeFullscreenToggle attaches itself to the window and listens for
"window state changed" events. If the window changes its state to
fullscreen, the HeFullscreenToggle displays itself. If the state of the
window changes back to unfullscreen, the HeFullscreenToggle hides itself
again.

While the window is in fullscreen state. The HeFullscreenToggle also
listens to all "button press" events. So always if you touch the display
it is displayed. After 5 seconds of inactivity its hidden again. Just
like in the browser.

Once you click on the overlay button the parent window is set to
unfullscreen.

This of course means that your application still has to implement the
logic how and when it will switch to fullscreen. I think it's the right
way to go, because different applications have different needs. We'll
see if others find it usefull.

The code still needs cleaning, naming and testing before I put it in HE.
But if you're curious it's currently here:
https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/conboy/src/fullscreenmanager.c?revision=466&root=conboy&view=markup

> HeFullscreenOverlay sounds like a GtkBin subclass that contains your
> main content area and draws the overlay in the corner when the app is
> fullscreened.
> 
> HeFloatingFullscreenButton is too long, I suppose.

Yea, it's a bit difficult to describe it in one word ;)

Cheers!
Conny


More information about the maemo-developers mailing list