release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > SummerOfCode > SummerOfCode2008 > WpsEditor (r11)

Theme/WPS Editor

This Page is about the new upcoming WPS / Theme editor, which is developed as a gsoc2008 project for rockbox.

General

This application will allow users to preview, create and edit existing WPS's and themes for Rockbox.

Plan

The main aim is - create a GUI application with redefined drawing functions that uses Rockbox' drawing mechanism (second variant).

Status

WPS preview is done.

Who's working on this

Student: RostislavChekan

Mentor: DominikWenger

Co - Mentor: NicolasPennequin

Description

This variant is fully based on rockbox code. Yes! As I see now we can use functions described in gwps-common.h. How? We can redefine struct screen *display; in gui_wps. If I�m right only display is charged with direct drawing to the screen. It calls functions from lcd.h to draw received data. So we can assign functions to draw in our application. If it can be used as a standalone library we will have already made display mechanism. I think it can be done, same as checkwps. If so, I�ll only need to create drawing functions. But there will be needed lots of callbacks which will not be included in the dll. So which of them is another research, I haven�t done yet. Any advices here?

display is used in: gui_splash gui_bitmap_scrollbar_draw gui_scrollbar_draw ab_draw_markers cue_draw_markers draw_albumart peak_meter_screen write_line

so, this functions surely use some other;

display uses:

stop_scroll getymargin get_ foreground get_background clear_display getfont getwidth set_drawmode fillrect mono_bitmap_part transparent_bitmap_part define_pattern setmargins getstringsize getxmargin puts_scroll putsxy get_locked_pattern set_viewport clear_viewport getheight update

gwps is used in: draw_albumart

So if all of this could be reimplemented or used independently, i think we can use gui_wps, and we will have exact mechanism of displaying. Something tells me that it is not full list of functions to be reimplemented.

Update.

Basic mechanism for editing: User clicks left mouse button, editor detects it. Now we know coordinates on the wps. So, we know child viewport. And can calculate the line clicked in that viewport. If we know line - we can take all needed tokens from wps_data structure, and display some basic representation of native rockbox tokens. Than user can edit line. After that we take oroginal text representation of the wps, and replace edited and orriginal line in our viewport.
Edit | Attach | Print version | History: r12 < r11 < r10 < r9 | Backlinks | View wiki text | More topic actions...
r11 - 13 Aug 2008 - 13:37:47 - LinusNielsenFeltzing
Copyright by the contributing authors.