summaryrefslogtreecommitdiff
path: root/lib (follow)
Commit message (Collapse)AuthorAge
* Use buflib for all skin engine allocations.Jonathan Gordon2011-11-15
| | | | | | | | 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
* Fix FS#12320 - need substitute to /.rockbox/skin_buffer_size.txtThomas Martitz2011-10-16
| | | | | | | | | | | Since recent skin engine related commits images aren't stored on the skin buffer anymore. The buffer was decreased accordingly. Now some themes used that buffer more for tokens than images and are now broken. To fix, increase the max token count, while optimizing the two most often allocated structs for size (so no net ram usage increase). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30762 a1c6a512-1295-4272-9138-f99709370657
* de-tabifyNils Wallménius2011-10-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30734 a1c6a512-1295-4272-9138-f99709370657
* Add a simple perl script to display info about what is allocating skin buffer.Jonathan Gordon2011-09-25
| | | | | | To use it enable DEBUG_SKIN_ALLOCATIONS in skin_buffer.h and pipe the rockboxui output to the script git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30597 a1c6a512-1295-4272-9138-f99709370657
* Partial fix for FS#12289 - comment lines would waste lots of buffer space. ↵Jonathan Gordon2011-09-25
| | | | | | Still not perfect but should get 90+% of comments completly ignored now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30596 a1c6a512-1295-4272-9138-f99709370657
* Add "%LN" tag to retrieve the list item number of the current item. This ↵Frank Gevaerts2011-09-18
| | | | | | allows e.g. putting item numbers in skinned lists. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30568 a1c6a512-1295-4272-9138-f99709370657
* Rework how the skin gets the list item text to save some ram. Also allow the ↵Jonathan Gordon2011-09-11
| | | | | | | | | | | | | | | | | %LI and %LT tags to take 2 optional parameters to get a different items text/icon: %LT(offset, nowrap) - get the text for the "being drawn"+offset item (offset being + or -). if the second param is "nowrap" (Without quotes) the text will be blank if the item would need to wrap. Same for the icon e.g: %LT(-1) %LT << %LT(1, nowrap) will display: Four Five << Six (or nothing if Five is the last item) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30502 a1c6a512-1295-4272-9138-f99709370657
* New tag %ss() which lets you get a substring of another tag.Jonathan Gordon2011-09-11
| | | | | | | %ss(start, length, tag) - i.e %ss(0,1,%TL) will get the first letter of the current lines text. use - for the length to get the rest of the tag (e.g %ss(1,-,%TL) will get everything after the first letter). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30500 a1c6a512-1295-4272-9138-f99709370657
* Lists can now be completly draw using the skin engine!Jonathan Gordon2011-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* New skin tags: %Vs() to set the text style and %Vg() to get the viewports ↵Jonathan Gordon2011-08-14
| | | | | | | | | 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
* Fix further 'variable set but not used' warnings reported from GCC 4.6.0.Andree Buschmann2011-05-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29809 a1c6a512-1295-4272-9138-f99709370657
* Remove duplicate #include in skin_parser.cBertrik Sikken2011-04-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29736 a1c6a512-1295-4272-9138-f99709370657
* Skin variables for touchscreen targets (origional implementation by Jens Theeß)Jonathan Gordon2011-03-27
| | | | | | | | | | %vs(name, [set|inc|dec], value [,max]) - name is the id, set sets the value, inc increments by value, dec decrements by value %vg(name) - get the current value %vl(name [,timeout]) - 'has it changed in [timeout]'? values start at 1 and are all reset to 1 on skin load git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29655 a1c6a512-1295-4272-9138-f99709370657
* Theme Editor: make cross compiling on OS X work.Dominik Riebeling2011-03-05
| | | | | | | | | The attempt to detect if building a fat library is necessary for libskin_parser makes cross compiling fail on OS X. Allow overriding the target platform for libskin_parser to fix that. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29515 a1c6a512-1295-4272-9138-f99709370657
* Add an ability to set a setting to a specific value with a touchscreen action.Jonathan Gordon2011-03-01
| | | | | | | | | | | | example: %T(0,0,20,12, setting_set, repeat, off) That will set the repeat mode to "off" when it is pressed. "setting_set" is the action name "repeat" is the name of the setting in the config files "off" is the value to set it to (same values as the legal values in the config files) Not all settings are supported, outright unsupported settings will fail to parse. Some settings might not work too well if they don't apply instantly (Any that work well int he quickscreen should work well here) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29483 a1c6a512-1295-4272-9138-f99709370657
* Remove code duplication in some generic skin touch action handling.Jonathan Gordon2011-03-01
| | | | | | | fix a bug which stopped the setting_inc/dec touch actions from parsing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29477 a1c6a512-1295-4272-9138-f99709370657
* Add the option of linking the %Tl (last touch) tag to a specific ↵Jonathan Gordon2011-02-28
| | | | | | | | | | touchregion. Both tags now accept an optional label param as the first param. %Tl([label,][timeout]) %T([label,] x, y, width, height, action) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29459 a1c6a512-1295-4272-9138-f99709370657
* fix buildJonathan Gordon2011-01-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29145 a1c6a512-1295-4272-9138-f99709370657
* Add some better debug info for when checkwps erros out because of full skin ↵Jonathan Gordon2011-01-27
| | | | | | buffer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29144 a1c6a512-1295-4272-9138-f99709370657
* FS#11867 - Add 2 new tags to allow skins to display themed peakmetersJonathan Gordon2011-01-13
| | | | | | | %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
* Fix FS#11829 - %?xx<....> Crashes on targets where the %xx feature tag isnt ↵Jonathan Gordon2010-12-24
| | | | | | avilable. rather hacky fix though better than crashing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28890 a1c6a512-1295-4272-9138-f99709370657
* Make the %tr (radio RSSI) tag work as a bar tag or as a conditional.Jonathan Gordon2010-11-18
| | | | | | 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
* Signal strength meter for FM radio - FS#8151 by Przemysław HołubowskiBertrik Sikken2010-11-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28559 a1c6a512-1295-4272-9138-f99709370657
* clean up checkwps' verbose output a bitJonathan Gordon2010-11-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28556 a1c6a512-1295-4272-9138-f99709370657
* Add a bit more debug output to checkwpsJonathan Gordon2010-11-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28552 a1c6a512-1295-4272-9138-f99709370657
* Half the number of malloc() calls on APPLICATION builds in ↵Jonathan Gordon2010-11-06
| | | | | | skin_buffer_alloc(). these are still presumably wasteing alot of RAM and could be merged further git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28520 a1c6a512-1295-4272-9138-f99709370657
* More concrete names for the head and the tail of the linked list (no ↵Alexander Levin2010-11-05
| | | | | | functional changes) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28501 a1c6a512-1295-4272-9138-f99709370657
* Undo the part of r28480 that caused the simulator to also use host malloc.Thomas Martitz2010-11-05
| | | | | | | We want simulators to simulate target code where possible, that includes memory constraints and memory allocation schemes. It also removed the sim's ability to show the theme's ram usage. Use malloc only in application builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28498 a1c6a512-1295-4272-9138-f99709370657
* Fix unchecked result skin_parse_tag() exposed by r28480.Thomas Martitz2010-11-05
| | | | | | | It caused the parser to not see that skin parsing failed and to enter an infinite loop. And as a result it continued to endlessly malloc(). In normal build the skin buffer size limit made it end. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28497 a1c6a512-1295-4272-9138-f99709370657
* Correct spelling of 'seperate' in the skin parsing code - FS#11724 by ↵Bertrik Sikken2010-11-05
| | | | | | Alexander Levin git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28485 a1c6a512-1295-4272-9138-f99709370657
* Cleanup and oops spotted by Alexander LevinJonathan Gordon2010-11-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28483 a1c6a512-1295-4272-9138-f99709370657
* RaaA: Use the host's malloc() for the skin engine.Jonathan Gordon2010-11-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28480 a1c6a512-1295-4272-9138-f99709370657
* Fix a bug introduced with r28370 (feature check tag improvements) where ↵Jonathan Gordon2010-11-03
| | | | | | %Rp<foo> would fail to parse if the target had recording. Also enable debugging in the checkwps build line git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28473 a1c6a512-1295-4272-9138-f99709370657
* skin_parser: Change the way hardware conditionals are done (i.e %?cc)Jonathan Gordon2010-10-28
| | | | | | | | They now only parse the correct branch (so only the true branch, or only the false branch). This shuold allow you to load different images/backdrops with the same id's depending on the targets hardware. Add a new %Tp - "touchscreen present?" tag to check if the target has a touchscreen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28370 a1c6a512-1295-4272-9138-f99709370657
* Skin bar tags fix+cleanup:Jonathan Gordon2010-10-12
| | | | | | | | | | | Don't crash when not enough params were given (i.e forgetting the filename) Make the parser enforce the first 4 params as compulsary Be more leniant and don't require the image filename if one isnt going to be loaded (no more need for the - as the 5th param) Add an option "image" to specify the filename (otherwise the first option will be used if it isnt a recognised option). e.g: %pv(0,0,100,10) or %pv(0,0,100,10, bar.bmp) or %pv(0,0,100,10, ..., image, bar.bmp) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28247 a1c6a512-1295-4272-9138-f99709370657
* Touchscreen %T() tag.. don't allow - for width/height params (shouldn't ↵Jonathan Gordon2010-10-10
| | | | | | affect anyway because the current code would crash if you tried it) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28224 a1c6a512-1295-4272-9138-f99709370657
* libskin_parser: fix a annoying bug where viewports required at least one ↵Jonathan Gordon2010-10-05
| | | | | | line (even %Vi()). multiple %Vi lines direclty under eachother should now work git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28210 a1c6a512-1295-4272-9138-f99709370657
* fiddle with the alloc requested size instead of the buffer pointer to keep ↵Jonathan Gordon2010-09-26
| | | | | | the buffer 32bit aligned git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28175 a1c6a512-1295-4272-9138-f99709370657
* m68k/setjmp.S: fix build with gcc 3.4.6 -std=gnu99Rafaël Carré2010-09-07
| | | | | | | The register prefix is always % for the architecture we use (elf), hardcode it instead of confusing the preprocessor git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28025 a1c6a512-1295-4272-9138-f99709370657
* 2 new touch region options... "settings_inc" and "settings_dec" which will ↵Jonathan Gordon2010-09-06
| | | | | | increase or decrease most of the available settings. To use it put the config name of the setting as the next param after settings_inc... i.e %T(0, 0, 32, 32, settings_inc, repeat) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28009 a1c6a512-1295-4272-9138-f99709370657
* The glyph number is required if it is given (i.e you cantt use -)Jonathan Gordon2010-09-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28005 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#11567 by Fred Bauer - better memory management for the skin fontsJonathan Gordon2010-08-25
| | | | | | %Fl now takes an optional 3rd param which is the number of glyphs to cache (default to 256). the smaller the number, the less ram will be used (i.e using 15 for a font which only shown numbers is a good idea) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27882 a1c6a512-1295-4272-9138-f99709370657
* mips is predefined by gcc, but we want it for paths. Don't let others fall ↵Thomas Martitz2010-08-24
| | | | | | into this trap again. Use __mips instead git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27872 a1c6a512-1295-4272-9138-f99709370657
* Add a commentThomas Martitz2010-08-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27871 a1c6a512-1295-4272-9138-f99709370657
* Fix red. Something - I coundn't find it - must be doing '#define mips 1'.Thomas Martitz2010-08-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27870 a1c6a512-1295-4272-9138-f99709370657
* Move setjmp to lib and add setjmp for sh (imported from newlib) and compile ↵Thomas Martitz2010-08-24
| | | | | | | | | it as separate library. It's used by both, plugins and codecs, and sh/hwcodec doesn't compile codecs so it doesn't fit into sources. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27869 a1c6a512-1295-4272-9138-f99709370657
* New skin tag: %if(<tag>, <operator>, <operand> [,option count]) which lets ↵Jonathan Gordon2010-08-19
| | | | | | | | | | | | | | | | | you do very simple logical comparissons on other tags. <tag> is the tag to check against <operator> is the comparisson to do, any one of... =, !=, >, >=, <, <= (when comparring against a string tag like %ia only = and != work, and it is done NOT case sensitive) <operand> is either another tag, a number, or text. [option count] is an optinal number to use for the few tags which scale to the amount of options when used as a conditional (i.e %?pv<a|b|c|d> would have 4 options) example: %?if(%pv, >=, 0)<Warning.. volume clipping|coool...> That says "If the value from %pv (volume) is greater than or equal to 0 then display the warning line, otherwise the cool line." %?if(%ia, =, %Ia)<same artist> <= this artist and next artist are the same. some tags might need a touch of tweaking to work better with this. experiment and have fun git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27846 a1c6a512-1295-4272-9138-f99709370657
* A bunch of new features for the bar type tags (%pb, %pv, %bl, etc):Jonathan Gordon2010-08-15
| | | | | | | | | | | | | | | | | | | | * 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
* Rework the skin playlist viewer so it uses the same drawing code as ↵Jonathan Gordon2010-08-14
| | | | | | | | | | 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
* Change %xd to allow for a number to be used to specify the subimage. i.e ↵Jonathan Gordon2010-08-14
| | | | | | | | | %xd(Ac) can now we written as %xd(A, 3). subimage count start at 1 so a=1, b=2 etc. Also adds the possibility to specify a set of params which a tag can have (i.e a tag or a integer) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27812 a1c6a512-1295-4272-9138-f99709370657