Rockbox mail archiveSubject: Re: brain dump/plan re simplifying viewport/theme support in screens
Re: brain dump/plan re simplifying viewport/theme support in screens
From: Thomas Martitz <thomas.martitz_at_student.htw-berlin.de>
Date: Tue, 24 Nov 2009 03:05:29 +0100
Am 24.11.2009 02:35, schrieb Jonathan Gordon:
> So this is what I'm planning...
> Basically, a screen has exactly 2 choices for their display, either
> the "theme" (which means sbs if loaded, and uivp), or fullscreen.
> Screens should always try to fit in the themes ui area, so they should
> all just assume that viewport_configure(struct *viewport) [or
> whatever its called] will give them what they want. Now, if it turns
> out its too small the screen would then call
> viewportmanager_theme_enable(bool) and then call viewport_configure()
> again which will then use the full display. These 2 steps could be
> merged maybe)...
Why combining two well-defined functions to an obscure one? It could
just call _set_fullscreen() and know what it gets if it's too small.
> Now, when that screen exits it would simply call
> viewportmanager_theme_undo(void) which would put it back to however it
> was (it would work with a stack so screens could enable and disable as
> they please without annoying other screens).
The stack that needs a bogus panicf() if it's exceeded? What's wrong
with the caller saving the state?
> actually... back onto viewport_configure() thing.. it could be done
> even simpler... viewport_configure(struct *viewport, int min_width,
> int min_height) would fix up the viewport so it guarentees to fit (it
> min is smaller than lcd of course), and then we can use
> viewport_undo(*viewport) again to undo anything if it was changed by
> storing the pointer :) as long as the viweport isnt static that should
I don't think that will work in practice. Passing a min_width/height is
quite demanding for screens that are of the sort "just gimme the damn
defaults, I'll cope with it", which doesn't even know how much it needs
The rest sounds ok.
Received on 2009-11-24
Page was last modified "Sat May 23 08:12:40 2020" The Rockbox Crew