FS#2714 - Multi screen (remote) support

Attached to Project: Rockbox
Opened by TiMiD (kevinferrare) - Saturday, 08 October 2005, 14:17 GMT
Last edited by Linus Nielsen Feltzing (linusnielsen) - Friday, 28 October 2005, 00:09 GMT
Task Type Patches
Category LCD
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Multi-screen support

This patch currently adds remote support to the
filetree viewer only, but is intended to highly
facilitate the igration of other applications

The idea behind it was to make all the drawing code "screen
independant" (it can draw on any screen you give it
without function call duplication) so that as many
screens as you want can be handled

You have 3 layers
- a screen independant access layer (implemented with
fn ptrs, "screen_access.c"
- some "widget-like" functions that draws on a given
screen (at present, only list, statusbar and buttonbar
are done (and some other little stuffs like splash,
scrollbar, icons, ...) )
- the application which should preferentially use the
widgets but can eventually use the screen-indepdendant
interface for very basic tasks.

At present, there is some duplicated code because
widget-like functions and already present rockbox code
accomplish the same tasks (but these functions are
intended to be removed as soon as they will become unused)
This task depends upon

Closed by  Linus Nielsen Feltzing (linusnielsen)
Friday, 28 October 2005, 00:09 GMT
Reason for closing:  Accepted
Comment by Linus Nielsen Feltzing (linusnielsen) - Thursday, 20 October 2005, 09:06 GMT

Initial style comments:

1) Find yourself a better text editor. The one you are using
saves the files with CR/LF endings, and it saves ISO8859-1
characters as unicode (look in the copyright header, where
the "ö" in "Björn" is changed.

2) Try to limit the lines to 80 columns

3) Can you shorten the "gui_synchronized_" prefix to
something shorter, perhaps "gui_synch_"? Or maybe even

4) I'm not sure we can accept how you "hijacked" the
copyright by moving the code to a new file. When we have
migrated the rest of Rockbox to the gui_ interface, we will
remove the old files, and suddenly all gui code originally
written by other people will be copyrighted by you. I know
that you made significant changes to the original code, but

5) I had to move the extern declaration of the screens[]
array to after the declaration of the screen struct, or it
wouldn't compile in the simulator.

6) I think the scrolling margin is too big on the main screen.

Otherwise, I think it looks damn good. This is certainly CVS
material to me, but I'll have a chat with the other devs first.
Comment by TiMiD (kevinferrare) - Friday, 21 October 2005, 00:31 GMT

Thanks for having looked at my work !
about your comments :

I mainly use kate under Linux, but some files were
writter under windows, that could explain the CR/LF
Also, about the encoding, all my systems are using
UTF-8, so things like that may happen sometimes and I
don't notice them :)

I like clear names which "means", so that when you
read the code it becomes more clear
if it's really aproblem, it can of course be shortened /
sed truncated :D

I'm sorry about that, I didn't intend to "steal" code from
the other, and I thought a lot about what to put in the
headers but I couldn't find a solution so I asked on IRC
and they told me to simply put my name and nothing
else ... (I also wrote the names of the creators of the
code when it was not 100% my work)
Anyway, I was aware of the problem, but for example,
what should I do when the code is taken from differents
files, from different persons ?
Maybe a history of the people who worked on the file in
the header would solve this kind of problems

You're right !
I wonder why I never even got a single warning about
that :(
anyway I moved it right now :)

It starts at 1/3 from the top / bottom of the screen
I thought it was the current behaviour
I can obviously change it !