Sphinxter
Says What?
Not affiliated with the project in any way other than loitering on the gp2x side for a couple years, just finished a game, re-emerged my world with a new hard disk and had some bandwidth, few thoughts on an interface for a small device such as the Pandora and thought I'd share my notes. Not exactly poetry in public but almost as annoying so I'll apologize in advance. First I looked at the real estate and the sketches floating about I liked and came up with a butcher chart.
All areas are to be flat faceless unanimated buttons that hold an image. Thinking on first experiment of a gtk frame with areas 1-10 as gEvas canvases or hbox and eventbox and a central clutter stage for 11. Much, much experimentation to be done.
A, 'skin', is a collection of bitmaps sized to fit the canvases in the /skin/<Skin Name>/ directory. Here is a rather crappy reference set from /skin/Default/;
http://pandora.fullsack.com/images/pui/active.png
http://pandora.fullsack.com/images/pui/inactive.png
http://pandora.fullsack.com/images/pui/deactive.png
http://pandora.fullsack.com/images/pui/top.png
http://pandora.fullsack.com/images/pui/bottom.png
http://pandora.fullsack.com/images/pui/left.png
http://pandora.fullsack.com/images/pui/right.png
The data to drive such an interface and how to organize it with room for customization is a problem I leave for XML, it's text, easy to edit and instantly leaves hooks for third party applications to join the fray. Daniel Veillard's excellent libxml2 for C makes it a snap. Sample XML;
CODE
<directory>
<skin>Default</skin>
<page>
<tabicon/>
<item>
<displayname/>
<image/>
<fullpath/>
</item>
<item>
<displayname/>
<image/>
<fullpath/>
</item>
</page>
<page>
<tabicon/>
<item>
<displayname/>
<image/>
<fullpath/>
</item>
<item>
<displayname/>
<image/>
<fullpath/>
</item>
</page>
</directory>
EVENT FLOW
INIT
1. Wake up, look for a default /skin/directory.xml on nand.
2. Load the default directory,xml from nand.
3. Load images from /skin/<name> directory pointed to by the style tag.
4. Set the stage according to it's items. These will be system tools in firmware.
5. Interface displays three tabs, the populated active Pandora tab and one inactive tab for each sd card slot.
TOUCH SD CARD TAB 2-3
1. Check/mount sd card.
2. Check root of sd card for directory.xml.
3. If not found offer to scan and write one.
4. If don't write one then in memory use.
5. As needed scan findfirst findnext for *.box with matching *.png in the same directory and optionally write it.
6. Load images from /Skins/<name> directory pointed to by the style tag.
7. The Pandora tab will be inactive, the other sd card tab will no longer shown as sd card tab chosen is made active.
8. Add tabs for each page tag found in the directory.xml with pages icon, stop scanning after fifth tab.
9. Set stage of first tab according to items in the first page, change icon to icon from first page.
10. Pandora icon/tab is always available and only changes state.
TOUCHING INACTIVE TAB OF OPEN SD CARD 2-6
1. Set current tab inactive.
2. Set chosen tab active.
3. Set stage according to the items in chosen page.
4. The five tabs of the open sd card are indexes into the array of actors, clicking them jump scrolls and switches tab art.
TOUCHING EDGE AREAS 7-10 AROUND CENTRAL STAGE 11
1. Scroll stage actors in the appropriate direction using different effects depending on which canvas hit.
2. This is the only animation except for the changing active/inactive/deactive tabs art.
TOUCHING ITEMS ACTOR ON STAGE 11
1. Launch fullpath from directory.xml replacing itself in memory to be re-launched atexit by app or as a child or
2. possibly in the background, reachable from a window list item in the Pandora tab. The corner areas at the ends of the top and bottom canvases could be used for such things.
USE CASE
User picks up cheap sd card, downloads a ton of games and applications, plugs it into Pandora, unit sees it, writes a directory.xml and starts using it immediately. Possibly pop up something like a bookmark organizer and arrange the items scanned in the future or an editor, use of xml supports third party apps and expansion.
All areas are to be flat faceless unanimated buttons that hold an image. Thinking on first experiment of a gtk frame with areas 1-10 as gEvas canvases or hbox and eventbox and a central clutter stage for 11. Much, much experimentation to be done.
A, 'skin', is a collection of bitmaps sized to fit the canvases in the /skin/<Skin Name>/ directory. Here is a rather crappy reference set from /skin/Default/;
http://pandora.fullsack.com/images/pui/active.png
http://pandora.fullsack.com/images/pui/inactive.png
http://pandora.fullsack.com/images/pui/deactive.png
http://pandora.fullsack.com/images/pui/top.png
http://pandora.fullsack.com/images/pui/bottom.png
http://pandora.fullsack.com/images/pui/left.png
http://pandora.fullsack.com/images/pui/right.png
The data to drive such an interface and how to organize it with room for customization is a problem I leave for XML, it's text, easy to edit and instantly leaves hooks for third party applications to join the fray. Daniel Veillard's excellent libxml2 for C makes it a snap. Sample XML;
CODE
<directory>
<skin>Default</skin>
<page>
<tabicon/>
<item>
<displayname/>
<image/>
<fullpath/>
</item>
<item>
<displayname/>
<image/>
<fullpath/>
</item>
</page>
<page>
<tabicon/>
<item>
<displayname/>
<image/>
<fullpath/>
</item>
<item>
<displayname/>
<image/>
<fullpath/>
</item>
</page>
</directory>
EVENT FLOW
INIT
1. Wake up, look for a default /skin/directory.xml on nand.
2. Load the default directory,xml from nand.
3. Load images from /skin/<name> directory pointed to by the style tag.
4. Set the stage according to it's items. These will be system tools in firmware.
5. Interface displays three tabs, the populated active Pandora tab and one inactive tab for each sd card slot.
TOUCH SD CARD TAB 2-3
1. Check/mount sd card.
2. Check root of sd card for directory.xml.
3. If not found offer to scan and write one.
4. If don't write one then in memory use.
5. As needed scan findfirst findnext for *.box with matching *.png in the same directory and optionally write it.
6. Load images from /Skins/<name> directory pointed to by the style tag.
7. The Pandora tab will be inactive, the other sd card tab will no longer shown as sd card tab chosen is made active.
8. Add tabs for each page tag found in the directory.xml with pages icon, stop scanning after fifth tab.
9. Set stage of first tab according to items in the first page, change icon to icon from first page.
10. Pandora icon/tab is always available and only changes state.
TOUCHING INACTIVE TAB OF OPEN SD CARD 2-6
1. Set current tab inactive.
2. Set chosen tab active.
3. Set stage according to the items in chosen page.
4. The five tabs of the open sd card are indexes into the array of actors, clicking them jump scrolls and switches tab art.
TOUCHING EDGE AREAS 7-10 AROUND CENTRAL STAGE 11
1. Scroll stage actors in the appropriate direction using different effects depending on which canvas hit.
2. This is the only animation except for the changing active/inactive/deactive tabs art.
TOUCHING ITEMS ACTOR ON STAGE 11
1. Launch fullpath from directory.xml replacing itself in memory to be re-launched atexit by app or as a child or
2. possibly in the background, reachable from a window list item in the Pandora tab. The corner areas at the ends of the top and bottom canvases could be used for such things.
USE CASE
User picks up cheap sd card, downloads a ton of games and applications, plugs it into Pandora, unit sees it, writes a directory.xml and starts using it immediately. Possibly pop up something like a bookmark organizer and arrange the items scanned in the future or an editor, use of xml supports third party apps and expansion.