summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_display.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-28Fix multiple potential null pointer dereferencessSolomon Peachy1-9/+13
GCC's optimizer thinks all of these _will_ fail at some point Change-Id: I287eeb574162a5d3b3347654d25aa1f53e9f5563
2020-10-26Whitespace cleanup on fb_viewport RewriteWilliam Wilgus1-9/+9
Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
2020-07-24[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.Solomon Peachy1-18/+1
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24[3/4] Completely remove HWCODEC supportSolomon Peachy1-2/+0
'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24[2/4] get rid of HAVE_LCD_CHARCELLSSolomon Peachy1-1/+0
HAVE_LCD_BITMAP is now redundant. lcd_bitmap is always-on in features.txt so manual and lang strings don't have to change Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2014-09-08Correct some file permissions.Szymon Dziok1-0/+0
Change-Id: I4a092a19d6a9c66dfeb2777c9655aa4b19d11e16
2014-04-18skin_engine: Make %Vs affect the whole line.Thomas Martitz1-9/+9
Previously %Vs styles only took effect upon the first character of text, i.e. on the right if the line is %arXXX. Now the style is applied for the whole line width. Fixes FS#12973. Change-Id: I95f2cc76a90bfc0779e5a667d5bfa54c33896c89
2014-03-10ab_repeat: Move GUI bits to the skin engine. This allows ab_repeat to be ↵Thomas Martitz1-0/+67
compiled headless. Change-Id: I4fa3b8ef7139313891ca70df11f7f17c5df38cb7
2014-01-12skin_engine: New param "noborder" for the bar tags.Thomas Martitz1-0/+5
By specifying this param the bar will not have a border/box. Instead the inner part that fills up is maximized on the bar area. Note that this only affects bars using foreground and background colors, not those constructed with images. Change-Id: Ib8dd49ecbaf9e16b96de840f5f365871b73d4fa4
2014-01-09skin_engine: Pass string to put_line() via $t because they can be very large.Thomas Martitz1-4/+6
Change-Id: I02d6bf492bb42e173a7b436427e3cc3560d80183
2014-01-07skin_engine: Adapt put_line().Thomas Martitz1-41/+12
This allows for code unification and removal of a workaround (STYLE_XY_PIXELS). Change-Id: Ie92d377414cad943cdb06976af10b4f315f32710
2013-02-19Theme Engine: Fix progress bar slider (FS#12823)Alex Mayer1-8/+4
Fix the need to resize progress bar when using a slider. Slider stays in bounds. Progress bar is not resized. Works well with square sliders that should not overlap edge of progress bar. also works with rounded sliders. You can also make progress bar the full width of screen while using a slider. Before if you would make the progress bar the full width of the screen and add a slider the progress bar would look like it was padded on both ends. This fixes FS#12823 Change-Id: I60345efc5cd0f46286f2591ed032f0d9320d1c3e Reviewed-on: http://gerrit.rockbox.org/402 Reviewed-by: Hayden Pearce <saint.lascivious@gmail.com> Tested-by: Hayden Pearce <saint.lascivious@gmail.com> Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-12-099 segment bitmap drawing:Jonathan Gordon1-5/+8
Use %x9(id) to draw an image in the whole current viewport using the 9 segment drawer (which draws the corners as normal and *tiles* the middle segments to the needed width/height). Future work is to make it scale instead of tile Change-Id: Ic3ed1cad93f96091694801eb442e0da5a2401203
2012-07-05skin_engine: Allow the %St() (setting) skin tag be used as a barJonathan Gordon1-0/+8
%St(<setting name>) or %St(<bar tags>, setting, <setting name>) Change-Id: I71396d683634d4d1ad2357018c4029ecb4229677
2012-02-29fix warningJonathan Gordon1-1/+1
Change-Id: Iccadc7558b9ffb2d87e5bc7697080dd567f4775f
2012-02-28skin_engine: Clean up %x() handling - beware theme issuesJonathan Gordon1-8/+1
Internally remove some hacks around how %x() is handled. %x() inside the default viewport will no longer work if other viewports are used, so if you are using viewports and %x() make sure it is in a viewport! Change-Id: I8ecab805d55fc0f8476ff0516cba38e23400aa20
2011-12-14FS#12378 : Remove various unused code, and comment out some unused code and ↵Boris Gjenero1-33/+0
data for reference or future use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
2011-12-14Fix FS#12237 (caused by r30302) where centered skin text isnt eqactly centeredJonathan Gordon1-15/+17
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31246 a1c6a512-1295-4272-9138-f99709370657
2011-11-15Use buflib for all skin engine allocations.Jonathan Gordon1-22/+25
Massive thanks to Michael Chicoine and other testers for finding the early bugs. This removes all skin memory limitations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30991 a1c6a512-1295-4272-9138-f99709370657
2011-11-08Add new lcd_bmp and lcd_bmp_part APIs.Thomas Martitz1-51/+7
This new APIs wrap around lcd_[mono|transparent]_bitmap/_part calls and handle all kinds bitmaps. The intended use is to draw bitmaps that come from read_bmp_fd/_file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30936 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg1-1/+0
own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-09-08Use buflib for skin images. Allows much more images to be loadedJonathan Gordon1-6/+14
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30478 a1c6a512-1295-4272-9138-f99709370657
2011-09-06Lists can now be completly draw using the skin engine!Jonathan Gordon1-0/+8
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-08-14Fix last charcell warningFrank Gevaerts1-0/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30307 a1c6a512-1295-4272-9138-f99709370657
2011-08-14need... sleep... try again to fix redJonathan Gordon1-0/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30306 a1c6a512-1295-4272-9138-f99709370657
2011-08-14fix charcell again.... wouldnt it be nice to remove charcell support all ↵Jonathan Gordon1-1/+18
together? :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30305 a1c6a512-1295-4272-9138-f99709370657
2011-08-14New skin tags: %Vs() to set the text style and %Vg() to get the viewports ↵Jonathan Gordon1-17/+12
gradient colours %Vs(mode[, param]) : mode can be "invert", "color" (where param is the colour to use", "clear" to disable the current style, "gradient" where param is the number of lines the gradient should draw over. %Vg(start colour, end colour, [text colour]), if this tag isnt used the list selection colours from the settings will set the gradient colours git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30302 a1c6a512-1295-4272-9138-f99709370657
2011-05-08More tab fixesBertrik Sikken1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29840 a1c6a512-1295-4272-9138-f99709370657
2011-03-07Merge a bunch of code which is 99% identical so it makes it easier to add ↵Jonathan Gordon1-1/+2
more of these later git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29535 a1c6a512-1295-4272-9138-f99709370657
2011-01-24New option for the bar tags: 'backdrop, <label>' will draw another image ↵Jonathan Gordon1-0/+22
under the progressbar (only works with image and slider bars) example: %V(22,253,198,14,-) %xl(a,PLAY_BAR_BACKDROP-240x320x16.bmp,0,0) %pb(0,0,198,14,PLAY_BAR-240x320x16.bmp, backdrop, a) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29127 a1c6a512-1295-4272-9138-f99709370657
2011-01-13remove unecessary (duplicated even) headerJonathan Gordon1-1/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29044 a1c6a512-1295-4272-9138-f99709370657
2011-01-13FS#11867 - Add 2 new tags to allow skins to display themed peakmetersJonathan Gordon1-0/+10
%pL for the left channel, %pR for the right channel... usable as a value, conditional or bar (exactly the same as %pv/%bl/etc) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29043 a1c6a512-1295-4272-9138-f99709370657
2010-11-18Make the %tr (radio RSSI) tag work as a bar tag or as a conditional.Jonathan Gordon1-3/+16
As a conditional it scales its value to the number of options you give it (like volume) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28613 a1c6a512-1295-4272-9138-f99709370657
2010-10-12skin bar tag: Load an image from a label or filename. i.e %xl(bar_image, ↵Jonathan Gordon1-2/+2
pb.bmp,0,0) %pb(0,0,10,10,bar_image) or %pb(0,0,10,10, pb.bmp) both are acceptable. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28249 a1c6a512-1295-4272-9138-f99709370657
2010-10-12improvement for bar tag with slider.Teruaki Kawashima1-21/+37
-fix bug the slider is drawn outside of the bounds (FS#11658). -offset the slider position so that the center of the slider indicates current position. -add nobar option. if this option is set, the bar isn't drawn at all. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28248 a1c6a512-1295-4272-9138-f99709370657
2010-10-10Fix charcell %pb and %pf tags, FS#11592Frank Gevaerts1-143/+1
This also moves draw_player_fullbar() and draw_player_progress() from skin_display.c to skin_tokens.c. Charcell is a bit different from bitmap here because drawing a progress bar is a combination of setting up the LCD controller (custom characters) and providing a format string. The custom character definition might fit in skin_display.c, but the format strings are needed in skin_tokens.c. Putting these functions in skin_tokens.c seemed to fit better. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28241 a1c6a512-1295-4272-9138-f99709370657
2010-10-08fix displaying of the slider when default is used for pb->y and pb->height.Teruaki Kawashima1-22/+16
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28220 a1c6a512-1295-4272-9138-f99709370657
2010-10-04Fix FS#11651 - slider wasnt being drawn correctly with inverted (and ↵Jonathan Gordon1-5/+19
vertical) bars git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28207 a1c6a512-1295-4272-9138-f99709370657
2010-10-03correct drawing of the bar type tags when nofill is set.Teruaki Kawashima1-41/+29
draw the slider bitmap before drawing A-B repeat markers so that they are visible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28204 a1c6a512-1295-4272-9138-f99709370657
2010-09-14fix errors, warnings, tabsJonathan Gordon1-4/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28075 a1c6a512-1295-4272-9138-f99709370657
2010-09-14Another major skin backend update/hopefully bugfix:Jonathan Gordon1-13/+18
Skins are now more self contained in the skin manager which in the future might allow on demand skin loading (i.e smaller skin buffers) Skin backdrops are also managed more intelegently (fixes a bug where you can get a crazy backdrop loaded if a .sbs fails to load) the rockbox_default rescue theme is now called rockbox_failsafe to better express what it actually is. This commit hopefully/maybe fixes the heavily reported data aborts, so please check if you are getting them git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28073 a1c6a512-1295-4272-9138-f99709370657
2010-09-02fix FS#11588 - %t(0) inside conditionals wasnt making that subline skipJonathan Gordon1-9/+8
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27983 a1c6a512-1295-4272-9138-f99709370657
2010-08-15A bunch of new features for the bar type tags (%pb, %pv, %bl, etc):Jonathan Gordon1-8/+69
* the bar orientation (horiz/vert) is now chosen based on the width and heigt values (or can be forced). * the fill direction can now be inverted (fill right to left, or top to bottom is considered inverted) * It can now draw a slider type bar instead of a fill type (or indeed a slider with a fill type) To configure the new bar, any (or all) of the following params can be used after the bmp filename (order makes no difference either): invert - cause the bar to fill in the inverted direction vertical - draw a vertical bar (not needed if the height > width) horizontal - draw a horizontal bar (this is obviously the default) nofill - dont draw the filling bar (this still draws the outline, obviously pointless without the slider param) slider - draw an image for the slider. The next param MUST be the label of the image to draw. No option to use a subimage here, so the whole image needs to be the image you want on the slider. example: %pb(0,0,-,-,-,nofill, slider, slider_image, invert) - draw a boring horizontal progressbar which doesnt fill and only draws the image "slider_image" which moves right to left. the slider type might need some tweaking. let us know how it goes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27821 a1c6a512-1295-4272-9138-f99709370657
2010-08-14Rework the skin playlist viewer so it uses the same drawing code as ↵Jonathan Gordon1-187/+3
everything else. This should mean that all text tags now work as expected. The 2nd code param is no longer needed so drop it (you can use conditionals and sublines and stuff in the one code param. example: %Vp(1, %?it<%in -%it|%fn>) <- show the next tracks strating from the first next track and show info if it is avilable or the filename. Basic cuesheet support here, and will load upcoming track tags from the database if you have load to ram enabled. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27814 a1c6a512-1295-4272-9138-f99709370657
2010-08-12New feature for the %xl (image load) tag. If you give it the filename ↵Jonathan Gordon1-1/+5
__list_icons__ it will use the list icon strip instead of loading a different bmp. example: %xl(I, __list_icons__, 0, 0) %xd(I, %Li) ^ display the list icon at position 0,0 in that viewport. (you can of course %xd(Ia) if you really wanted also.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27787 a1c6a512-1295-4272-9138-f99709370657
2010-08-11Fix FS#11175. playlist_peek() wasn't thread safe (due to a static filename ↵Magnus Holmgren1-2/+3
buffer), so frequent calls from the main thread would cause the audio thread to buffer the wrong track. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27773 a1c6a512-1295-4272-9138-f99709370657
2010-08-02Allow viewport labels to be mostly free text instead of only one character. ↵Jonathan Gordon1-1/+1
If this is useful the same will be done for images git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27665 a1c6a512-1295-4272-9138-f99709370657
2010-07-30Make some global function/variables local (by making them static)Bertrik Sikken1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27631 a1c6a512-1295-4272-9138-f99709370657
2010-07-29FS#11470 - new skin code, finally svn uses the new parser from the theme ↵Jonathan Gordon1-640/+88
editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
2010-06-08hopefully fix the problem with lines in viewports being pushed down one line. Jonathan Gordon1-2/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26682 a1c6a512-1295-4272-9138-f99709370657