2010-07-29 12:37:48 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002-2007 Björn Stenberg
|
|
|
|
* Copyright (C) 2007-2008 Nicolas Pennequin
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#include "config.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "wps_internals.h"
|
|
|
|
#include "skin_engine.h"
|
|
|
|
#include "statusbar-skinned.h"
|
|
|
|
|
|
|
|
#ifndef _SKIN_DISPLAY_H_
|
|
|
|
#define _SKIN_DISPLAY_H_
|
|
|
|
|
|
|
|
|
2022-10-04 13:08:24 +00:00
|
|
|
void draw_progressbar(struct gui_wps *gwps, struct skin_viewport* skin_viewport,
|
|
|
|
int line, struct progressbar *pb);
|
2010-07-29 12:37:48 +00:00
|
|
|
void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer);
|
|
|
|
/* clears the area where the image was shown */
|
|
|
|
void clear_image_pos(struct gui_wps *gwps, struct gui_img *img);
|
|
|
|
void wps_display_images(struct gui_wps *gwps, struct viewport* vp);
|
Lists can now be completly draw using the skin engine!
due to lack of user feedback the actual tags may change, hopefully not though.
The way it works is the skin specifies a rectangle and a viewport label. For each item in the list that is being displayed all viewports with the specified label are drawn. However, instead of the viewport x/y position being offset from the top left corner like normal they are offset from the rectangle position in the list (so think of them as child-viewports of the rectangle which moves).
Normally the rectangle will move down the screen to show a normal list, this can be changed to move across the screen in a grid pattern.
The UI viewport is used to bound the items (i.e %Vi() )
Scrolling is completly disabled in all items except the currently selected item.
This works well in combination with the %cs tag to show differently styled lists based on the current screen :)
New tags:
%LT - Get the current items text
%LI - Get the current items icon number
%Lc - Use as a conditional to determine if the current item is the selected item
%LB - BAR TAG to show the scroll bar, params/options like other bar types. It still needs a bit of work though. Use as a conditional to find out if the bar is actually needed
%Lb(viewport, width, height [,tile]) - specify the viewport label to draw for each item and the size of each item. if the last param is 'tile' it will form a grid instead of a list
example.sbs:
%?cs<%Lb(a,100,20)|>
%V(0,0,10,-,1)%Vf(aabbcc)
%?LB<%LB(0,0,10,185, invert)>
%Vi(-,10,0,-,-35,1)
%Vl(a,5,5,160,12,1)
%s%?Lc<%Vg(00ffaa, ff0000, 000000)%Vs(gradient)%>%>%>%ac>zzzzzzz %LT zzzzz%s%?Lc<%ar%<%<%<>
%V(0,185,-,-,1)
%s%LT
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30461 a1c6a512-1295-4272-9138-f99709370657
2011-09-06 13:49:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
|
|
|
|
struct skin_viewport* skin_viewport, unsigned long refresh_type);
|
|
|
|
|
2010-07-29 12:37:48 +00:00
|
|
|
|
|
|
|
/* Evaluate the conditional that is at *token_index and return whether a skip
|
|
|
|
has ocurred. *token_index is updated with the new position.
|
|
|
|
*/
|
2010-08-14 15:17:59 +00:00
|
|
|
int evaluate_conditional(struct gui_wps *gwps, int offset,
|
|
|
|
struct conditional *conditional, int num_options);
|
2010-07-29 12:37:48 +00:00
|
|
|
/* Display a line appropriately according to its alignment format.
|
|
|
|
format_align contains the text, separated between left, center and right.
|
|
|
|
line is the index of the line on the screen.
|
|
|
|
scroll indicates whether the line is a scrolling one or not.
|
|
|
|
*/
|
2011-08-14 13:50:07 +00:00
|
|
|
void write_line(struct screen *display, struct align_pos *format_align,
|
2013-12-20 22:34:28 +00:00
|
|
|
int line, bool scroll, struct line_desc *line_desc);
|
2010-07-29 12:37:48 +00:00
|
|
|
void draw_peakmeters(struct gui_wps *gwps, int line_number,
|
|
|
|
struct viewport *viewport);
|
2022-10-17 14:17:53 +00:00
|
|
|
#ifdef HAVE_ALBUMART
|
2022-10-02 17:02:27 +00:00
|
|
|
/* Draw the album art bitmap from the given handle ID onto the given Skin.
|
|
|
|
Call with clear = true to clear the bitmap instead of drawing it. */
|
|
|
|
void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear);
|
2022-10-17 14:17:53 +00:00
|
|
|
#endif
|
2022-10-02 17:02:27 +00:00
|
|
|
|
2010-07-29 12:37:48 +00:00
|
|
|
#endif
|